Subversion Repositories WoWGM

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
43 tristanc 1
#pragma once
2
#include <windows.h>
3
#include "resource.h"
4
#include <strsafe.h>	/* For ErrorExit() */
5
#include <Psapi.h>		/* For EnumProcesses() */
6
#include <iostream>		/* For std::wstring */
7
 
8
 
9
#if DEBUG_BUILD
10
#define DLL_FILENAME "WowD.dll"
11
#define DLL_RESOURCEID IDR_DLL2
12
#else
13
#define DLL_FILENAME "WoW.dll"
14
#define DLL_RESOURCEID IDR_DLL1
15
#endif
16
 
17
struct ClientVersion
18
{
19
	int m_major;
20
	int m_minor;
21
	int m_revision;
22
	int m_build;
23
};
24
 
25
LPCSTR GetWowClientFileName()
26
{
27
	/* The client name differs depending on the build type and version */
28
#ifdef BUILDVERSION_CL
29
	LPCSTR fileName = "WoW.exe";
30
#elif _WIN64
31
	LPCSTR fileName = "Wow-64.exe";
32
#else
33
	LPCSTR fileName = "Wow.exe";
34
#endif
35
 
36
	return fileName;
37
};
38
 
39
ClientVersion GetGmClientVersion () {
40
	ClientVersion version = {};
41
 
42
    version.m_major = 3;
43
    version.m_minor = 3;
44
    version.m_revision = 5;
45
    version.m_build = 12340;
46
 
47
	return version;
48
}
49
 
50
void CheckBuildCompatibility();
51
BOOL EnableSeDebugPrivilege ();
52
void ExtractResource(const HINSTANCE hInstance, WORD resourceID, LPCSTR szFilename);
53
void ErrorExit(LPSTR lpszFunction);
54
PROCESS_INFORMATION CreateWowProcess(LPSTR lpCmdLine);
55
void InjectDLL(DWORD dwid);
56
LPSTR GetProcessNameById(DWORD processId);
57
HWND FindWindowByName(LPCSTR name);