-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for older versions of game maker
- Loading branch information
1 parent
855d035
commit 409f2ca
Showing
2 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,76 @@ | ||
#define WNetGetConnectionA WNetGetConnectionA_orig | ||
#include <windows.h> | ||
#undef WNetGetConnectionA | ||
#define DLLEXP extern "C" __declspec(dllexport) __stdcall | ||
|
||
extern "C" __declspec(dllexport) __stdcall BOOL SymInitialize(void* a, void* b, void* c) { | ||
//dbghelp.dll | ||
DLLEXP BOOL SymInitialize(void* a, void* b, void* c) { | ||
return TRUE; | ||
} | ||
extern "C" __declspec(dllexport) __stdcall BOOL MiniDumpWriteDump(void* a, void* b, void* c, void* d, void* e, void* f, void* g) { | ||
DLLEXP BOOL MiniDumpWriteDump(void* a, void* b, void* c, void* d, void* e, void* f, void* g) { | ||
return TRUE; | ||
} | ||
extern "C" __declspec(dllexport) __stdcall BOOL SymFromAddr(void* a, void* b, void* c, void* d) { | ||
DLLEXP BOOL SymFromAddr(void* a, void* b, void* c, void* d) { | ||
return TRUE; | ||
} | ||
DLLEXP BOOL SymGetSymFromAddr(void* a, void* b, void* c, void* d) { | ||
return TRUE; | ||
} | ||
DLLEXP BOOL SymSetOptions(void* a) { | ||
return TRUE; | ||
} | ||
DLLEXP DWORD SymGetOptions(void* a) { | ||
return 0; | ||
} | ||
DLLEXP DWORD WNetGetConnectionA(void* a, void* b, void* c) { | ||
return 0; | ||
} | ||
DLLEXP DWORD SymLoadModule64(void* a, void* b, void* c, void* d, void* e, void* f) { | ||
return 4096; | ||
} | ||
DLLEXP BOOL SymGetModuleInfo64(void* a, void* b, void* c) { | ||
return TRUE; | ||
} | ||
DLLEXP BOOL SymGetLineFromAddr64(void* a, void* b, void* c, void* d) { | ||
return TRUE; | ||
} | ||
DLLEXP BOOL SymGetSymFromAddr64(void* a, void* b, void* c, void* d) { | ||
return TRUE; | ||
} | ||
|
||
|
||
#define ClosePrinter ClosePrinter_orig | ||
#undef ClosePrinter | ||
#define DocumentPropertiesW DocumentPropertiesW_orig | ||
#undef DocumentPropertiesW | ||
#define EnumPrintersW EnumPrintersW_orig | ||
#undef EnumPrintersW | ||
#define GetDefaultPrinterW GetDefaultPrinterW_orig | ||
#undef GetDefaultPrinterW | ||
#define OpenPrinterW OpenPrinterW_orig | ||
#undef OpenPrinterW | ||
#define DocumentPropertiesA DocumentPropertiesA_orig | ||
#undef DocumentPropertiesA | ||
#define EnumPrintersA EnumPrintersA_orig | ||
#undef EnumPrintersA | ||
#define GetDefaultPrinterA GetDefaultPrinterA_orig | ||
#undef GetDefaultPrinterA | ||
#define OpenPrinterA OpenPrinterA_orig | ||
#undef OpenPrinterA | ||
|
||
//winspool.drv | ||
DLLEXP WINBOOL ClosePrinter(HANDLE a) {return TRUE;} | ||
DLLEXP LONG DocumentPropertiesW(HWND a, HANDLE b, LPWSTR c, PDEVMODEW d, PDEVMODEW e, DWORD f) {return 0;} | ||
DLLEXP WINBOOL EnumPrintersW(DWORD a, LPWSTR b, DWORD c, LPBYTE d, DWORD e, LPDWORD f, LPDWORD g) {return TRUE;} | ||
DLLEXP WINBOOL GetDefaultPrinterW(LPWSTR a, LPDWORD b) {return TRUE;} | ||
DLLEXP WINBOOL OpenPrinterW(LPWSTR a, LPHANDLE b, LPPRINTER_DEFAULTSW c) {return TRUE;} | ||
DLLEXP LONG DocumentPropertiesA(HWND a, HANDLE b, LPSTR c, PDEVMODEA d, PDEVMODEA e, DWORD f) {return 0;} | ||
DLLEXP WINBOOL EnumPrintersA(DWORD a, LPSTR b, DWORD c, LPBYTE d, DWORD e, LPDWORD f, LPDWORD g) {return TRUE;} | ||
DLLEXP WINBOOL GetDefaultPrinterA(LPSTR a, LPDWORD b) {return TRUE;} | ||
DLLEXP WINBOOL OpenPrinterA(LPSTR a, LPHANDLE b, LPPRINTER_DEFAULTSA c) {return TRUE;} | ||
|
||
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) | ||
{ | ||
switch(fdwReason) | ||
{ | ||
case DLL_PROCESS_ATTACH: | ||
{ | ||
timeBeginPeriod((UINT)1); | ||
break; | ||
} | ||
case DLL_PROCESS_DETACH: | ||
{ | ||
timeEndPeriod((UINT)1); | ||
break; | ||
} | ||
case DLL_THREAD_ATTACH: | ||
{ | ||
break; | ||
} | ||
case DLL_THREAD_DETACH: | ||
{ | ||
break; | ||
} | ||
} | ||
|
||
/* Return TRUE on success, FALSE on failure */ | ||
timeBeginPeriod(1); | ||
return TRUE; | ||
} |