Código:
BOOL IsOpenGL32Loaded(HANDLE hProcess) { DWORD dwResult; LPCSTR lpOpenGL32=(LPCSTR)&(“opengl32.dll”); LPVOID lpvExternBuff; SIZE_T stDummyOut; lpvExternBuff=VirtualAllocEx( hProcess, NULL, (SIZE_T)13, MEM_COMMIT, PAGE_READWRITE); WriteProcessMemory( hProcess, (LPCVOID)lpvExternBuff, (LPVOID)lpOpenGL32, (SZIE_T)13, &stDummyOut); HANDLE hThread=CreateRemoteThread( hProcess, NULL, NULL, (LPTHREAD_START_ROUTINE)(INT64)GetProcAddress, lpvExternBuff, NULL, NULL); WaitForSingleObject(hThread, INFINITE); GetExitCodeThread(hThread, &dwResult); CloseHandle(hThread); VirtualFree( hProcess, lpvExternBuff, NULL, MEM_RELEASE); return (BOOL)dwResult; }