This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#define DEVNAME_LEN 32 | |
#define A2I(x) ((uint8_t)(x-48)) | |
static DEVMODEA dmActive; | |
static DEVMODEA dmWanted; | |
static char nameActive[DEVNAME_LEN]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <windows.h> | |
#define DEFFUN_OBJ(_HMOD, _ERR, _FNAME) __typeof__(_FNAME) *pf##_FNAME = NULL | |
#define DEFFUN_EXT(_HMOD, _ERR, _FNAME) extern __typeof__(_FNAME) *pf##_FNAME | |
#define DYNLOAD(_HMOD, _ERR, _FNAME) _ERR = _ERR ? _ERR : !(pf##_FNAME = (void*)GetProcAddress(_HMOD, #_FNAME)) | |
//usage scenario | |
//You have a header full of function definitions that would result in linking to dll | |
//But you want to use them as dynamically loaded functions instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <windows.h> | |
//Use: copy text to clipboard and press HOTKEY to type it back | |
// for those places where system clipboard doesn't reach. | |
#define HOTKEY VK_SCROLL | |
#define BLEEP_PITCH 2000 | |
//#define KDELAY 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <assert.h> | |
#include <math.h> | |
#include <windows.h> | |
#include <conio.h> |