2019-09-07 15:51:30 +00:00
|
|
|
#ifndef GENERALLOADLIBRARY_H
|
|
|
|
#define GENERALLOADLIBRARY_H
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2019-09-25 18:08:44 +00:00
|
|
|
#ifndef CALLBACK
|
|
|
|
#define CALLBACK WINAPI
|
|
|
|
#endif
|
|
|
|
|
2019-09-07 15:51:30 +00:00
|
|
|
HMODULE MyLoadLibrary(LPCSTR, void *, void *);
|
2019-09-26 12:02:43 +00:00
|
|
|
HMODULE MyLoadLibraryEx(LPCSTR, const PVOID, PVOID, PVOID, DWORD);
|
2019-09-25 11:29:54 +00:00
|
|
|
|
2019-09-25 18:08:44 +00:00
|
|
|
HMODULE CALLBACK MyLoadLibraryA(LPCSTR);
|
|
|
|
HMODULE CALLBACK MyLoadLibraryW(LPCWSTR);
|
|
|
|
HMODULE CALLBACK MyLoadLibraryExA(LPCSTR name, HANDLE hFile, DWORD dwFlags);
|
|
|
|
HMODULE CALLBACK MyLoadLibraryExW(LPCWSTR name, HANDLE hFile, DWORD dwFlags);
|
|
|
|
HMODULE CALLBACK MyGetModuleHandleA(LPCSTR name);
|
|
|
|
HMODULE CALLBACK MyGetModuleHandleW(LPCWSTR name);
|
2020-03-12 14:22:12 +00:00
|
|
|
BOOL CALLBACK MyGetModuleHandleExA(DWORD dwFlags, LPVOID lpArg, HMODULE *phModule);
|
|
|
|
BOOL CALLBACK MyGetModuleHandleExW(DWORD dwFlags, LPVOID lpArg, HMODULE *phModule);
|
2019-09-26 12:02:43 +00:00
|
|
|
DWORD CALLBACK MyGetModuleFileNameW(HMODULE, LPWSTR, DWORD);
|
|
|
|
DWORD CALLBACK MyGetModuleFileNameA(HMODULE, LPSTR, DWORD);
|
2019-09-25 18:08:44 +00:00
|
|
|
FARPROC CALLBACK MyGetProcAddress(HMODULE, LPCSTR);
|
|
|
|
BOOL CALLBACK MyFreeLibrary(HMODULE module);
|
2019-09-24 18:27:23 +00:00
|
|
|
|
2019-09-26 12:02:43 +00:00
|
|
|
HRSRC CALLBACK MyFindResourceA(HMODULE module, LPCSTR name, LPCSTR type);
|
|
|
|
HRSRC CALLBACK MyFindResourceW(HMODULE module, LPCWSTR name, LPCWSTR type);
|
|
|
|
HRSRC CALLBACK MyFindResourceExA(HMODULE hModule, LPCSTR name, LPCSTR type, WORD language);
|
|
|
|
HRSRC CALLBACK MyFindResourceExW(HMODULE hModule, LPCWSTR name, LPCWSTR type, WORD language);
|
|
|
|
DWORD CALLBACK MySizeofResource(HMODULE module, HRSRC resource);
|
|
|
|
LPVOID CALLBACK MyLoadResource(HMODULE module, HRSRC resource);
|
|
|
|
int CALLBACK MyLoadStringA(HMODULE module, UINT id, LPSTR buffer, int maxsize);
|
|
|
|
int CALLBACK MyLoadStringW(HMODULE module, UINT id, LPWSTR buffer, int maxsize);
|
|
|
|
|
2019-09-07 15:51:30 +00:00
|
|
|
FARPROC MyFindProcAddress(LPCSTR modulename, LPCSTR procname);
|
|
|
|
|
2020-02-17 21:37:03 +00:00
|
|
|
HANDLE CALLBACK MyCreateThread(
|
|
|
|
LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
|
|
|
SIZE_T dwStackSize,
|
|
|
|
LPTHREAD_START_ROUTINE lpStartAddress,
|
|
|
|
LPVOID lpParameter,
|
|
|
|
DWORD dwCreationFlags,
|
|
|
|
LPDWORD lpThreadId
|
|
|
|
);
|
|
|
|
|
2019-09-07 15:51:30 +00:00
|
|
|
VOID MySetLibraries(PVOID pLibraries);
|
2020-02-18 12:23:40 +00:00
|
|
|
BOOL MySetUnhandledExceptionFilter(
|
|
|
|
LPCSTR pszModuleName, LPTOP_LEVEL_EXCEPTION_FILTER handler
|
|
|
|
);
|
|
|
|
|
2020-02-17 21:37:03 +00:00
|
|
|
LPTOP_LEVEL_EXCEPTION_FILTER MyGetUnhandledExceptionFilter(VOID);
|
2019-09-07 15:51:30 +00:00
|
|
|
PVOID MyGetLibraries();
|
|
|
|
|
2020-02-17 14:18:24 +00:00
|
|
|
typedef BOOL (*LibraryInfoCb_t) (
|
|
|
|
PVOID pvCallbackData, LPCSTR pszName, PVOID pvBaseImage, ULONG ulSize
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID MyEnumerateLibraries(LibraryInfoCb_t callback, PVOID pvCallbackData);
|
2020-02-18 12:23:40 +00:00
|
|
|
BOOL MyFindMemoryModuleNameByAddr(
|
|
|
|
PVOID pvAddress, LPCSTR *ppszName, PVOID *ppvBaseAddress,
|
|
|
|
LPTOP_LEVEL_EXCEPTION_FILTER *pehFilter
|
|
|
|
);
|
2020-02-17 14:18:24 +00:00
|
|
|
|
2019-09-07 15:51:30 +00:00
|
|
|
#ifndef DLL_QUERY_HMODULE
|
|
|
|
#define DLL_QUERY_HMODULE 6
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|