summaryrefslogtreecommitdiff
path: root/plugins/YAMN/debug.h
blob: df6977259cad34610c2ce1bb4904f6fbc1fc1521 (plain)
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
56
57
58
59
60
61
62
63
64
#ifndef __DEBUG_H
#define __DEBUG_H

//	#define YAMN_DEBUG

//#define YAMN_VER_BETA
//#define YAMN_VER_BETA_CRASHONLY

#ifdef YAMN_DEBUG

//#pragma comment(lib, "th32.lib")

#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT 0x0501 // WinXP only
#endif
#define VC_EXTRALEAN
#include <windows.h>
#include <tlhelp32.h>
#include <stdio.h>
#include <shlwapi.h>

//#define DEBUG_SYNCHRO			//debug synchro to a file
//#define DEBUG_COMM			//debug communiation to a file
//#define DEBUG_DECODE			//debug header decoding to a file
//#define DEBUG_DECODECODEPAGE		//add info about codepage used in conversion
//#define DEBUG_DECODEBASE64		//add info about base64 result
//#define DEBUG_DECODEQUOTED		//add info about quoted printable result
//#define DEBUG_FILEREAD			//debug file reading to message boxes
//#define DEBUG_FILEREADMESSAGES		//debug file reading messages to message boxes

void DebugLog(HANDLE,const char *fmt,...);
void DebugLogW(HANDLE File,const WCHAR *fmt,...);

#ifdef DEBUG_SYNCHRO
// Used for synchronization debug
extern HANDLE SynchroFile;
#endif

#ifdef DEBUG_COMM
// Used for communication debug
extern HANDLE CommFile;
#endif

#ifdef DEBUG_DECODE
// Used for decoding debug
extern HANDLE DecodeFile;
#endif

#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES)
DWORD ReadStringFromMemory(TCHAR **Parser,TCHAR *End,TCHAR **StoreTo,TCHAR *DebugString);
	#ifndef UNICODE
DWORD ReadStringFromMemoryW(TCHAR **Parser,TCHAR *End,TCHAR **StoreTo,TCHAR *DebugString);
	#else
#define ReadStringFromMemoryW	ReadStringFromMemory
	#endif
#endif

//#ifdef DEBUG_ACCOUNTS
//int GetAccounts();
//void WriteAccounts();
//#endif

#endif	//YAMN_DEBUG
#endif	//_DEBUG_H