-
Notifications
You must be signed in to change notification settings - Fork 4
/
errout.h
55 lines (42 loc) · 1.12 KB
/
errout.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
errout.h - Header file for common definitions.
Jason Hood, 29 June to 3 July, 2011.
*/
#ifndef ERROUT_H
#define ERROUT_H
#ifndef UNICODE
# define UNICODE
#endif
#define WIN32_LEAN_AND_MEAN
#ifdef _WIN64
#define _WIN32_WINNT 0x0600 // MinGW-w64 wants this defined for Wow64 stuff
#else
#define _WIN32_WINNT 0x0500 // MinGW wants this defined for OpenThread
#endif
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#define lenof(array) (sizeof(array)/sizeof(*(array)))
#define TSIZE(size) ((size) * sizeof(TCHAR))
struct Globals
{
HANDLE hStdOut; // the original stdout
HANDLE hStdCon; // direct to console
HANDLE hFilOut; // file for stdout
HANDLE hFilErr; // file for stderr
HANDLE hFilCon; // file for combined output
WORD console; // flags to write to the console
WORD errcol; // colour to use for stderr
};
typedef struct Globals Globals;
int ProcessType( LPPROCESS_INFORMATION );
void InjectDLL32( LPPROCESS_INFORMATION );
#ifdef DO_IMPORT
__declspec(dllimport)
#else
__declspec(dllexport)
#endif
void InjectDLL64( LPPROCESS_INFORMATION );
#define CODE32SIZE 20
#define GLOBAL32SIZE (6*4)
#endif