Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Hooks.h"
- //Main thread
- DWORD WINAPI Main(LPVOID param)
- {
- //Call our hooks only once
- //HookSwapBuffers();
- HookglClear();
- HookglDrawElements();
- HookglBindTexture();
- while (true)
- {
- if (GetAsyncKeyState(VK_NUMPAD0) & 1)
- {
- GrabModels = !GrabModels;
- }
- if (GetAsyncKeyState(VK_NUMPAD2) & 1)
- {
- BatchGrab = !BatchGrab;
- }
- if (GetAsyncKeyState(VK_UP) & 1)
- {
- if (BatchGrab)
- {
- ModelCountMin += 100;
- ModelCountMax += 100;
- }
- else
- PrecisionModel++;
- }
- if (GetAsyncKeyState(VK_DOWN) & 1)
- {
- if (BatchGrab)
- {
- ModelCountMin -= 100;
- ModelCountMax -= 100;
- }
- else
- PrecisionModel--;
- }
- //Freeing the DLL
- if (GetAsyncKeyState(VK_NUMPAD9) & 1)
- {
- HMODULE myModule = GetModuleHandleA("OpenGL Model Logger.dll");
- if (myModule)
- FreeLibraryAndExitThread(myModule, NULL);
- else
- continue;
- }
- }
- return NULL;
- }
- //Our entry point
- BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
- {
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- CreateThread(0, 0, Main, 0, 0, 0);
- DisableThreadLibraryCalls(instance);
- AllocConsole();
- AttachConsole(GetProcessId(instance));
- break;
- case DLL_THREAD_DETACH:
- FreeConsole();
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement