Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- -----------------------------------------
- * Game hacking QTS ( Quickie Tip Series )
- * no. 2 - How to attain the injector's location
- -----------------------------------------
- * Author: SEGnosis - GHAnon.net
- * Thanks to:
- * bitterbanana - No known site
- * Drunken Cheetah - No known site
- * fatboy88 - No known site
- * Geek4Ever - No known site
- * learn_more - www.uc-forum.com
- * Novocaine - http://ilsken.net/blog/?page_id=64
- * Philly0494 - No known site
- * Roverturbo - www.uc-forum.com
- * SilentKarma - www.halocoders.com - offline
- * Strife - www.uc-forum.com
- * Wieter20 - No known site
- */
- //----------------------------------//
- BOOL WINAPI DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpvReserved )
- {
- switch( dwReason )
- {
- case DLL_PROCESS_ATTACH:
- char szString[ MAX_PATH ]; // Create a character array buffer with the maximum path length ( besides unicode )
- GetModuleFileName( hModule, szString, sizeof( szString ) ); // This function uses the module handle to input the module file path into the string array ie. "C:\\foo\\fee\\module.exe".
- // The file path will be that of the injector, not the current process.
- // If you wish to get the file location of the executable; you can set the parameter for HMODULE to null and it will use the module handle of the current executable. This can save time if you aren't looking into getting the file path from within DllMain.
- break;
- }
- return TRUE;
- }
- //----------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement