Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- -----------------------------------------
- * Game hacking QTS ( Quickie Tip Series )
- * no. 28 - Printing to console in a dll
- -----------------------------------------
- * Author: SEGnosis
- * 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
- */
- //----------------------------------//
- DWORD WINAPI StartUp(LPVOID lpvParam)
- {
- AllocConsole(); // Allocate a new console
- AttachConsole(GetCurrentProcessId()); // Attach it to our current process
- freopen("CON", "w", stdout); // Reopen it for writing
- printf("Hello World!\n");
- return 0;
- }
- BOOL WINAPI DllMain(HMODULE hInstance, DWORD dwReason, LPVOID lpvReserved)
- {
- switch(dwReason)
- {
- case DLL_PROCESS_ATTACH:
- CreateThread(0, 0, &StartUp, 0, 0, 0);
- break;
- }
- return TRUE;
- }
- //----------------------------------//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement