Want more features on Pastebin? Sign Up, it's FREE!
Guest

dll.cpp

By: a guest on Jul 6th, 2011  |  syntax: C++  |  size: 0.54 KB  |  views: 506  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #define WIN32_LEAN_AND_MEAN
  2.  
  3. #include <windows.h>
  4. #include <stdio.h>
  5. #include "main.h"
  6. #include "Urlmon.h"
  7.  
  8. BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
  9. {
  10.         hModule;
  11.         lpReserved;
  12.  
  13.     switch (ul_reason_for_call)
  14.         {
  15.                 case DLL_PROCESS_ATTACH:
  16.                 case DLL_THREAD_ATTACH:
  17.                 case DLL_THREAD_DETACH:
  18.                 case DLL_PROCESS_DETACH:
  19.                         break;
  20.     }
  21.  
  22.     return TRUE;
  23. }
  24.  
  25. DWORD TestFunction(LPVOID str)
  26. {
  27.         char msg[512];
  28.         printf( msg, "%s", str);       
  29.         MessageBox(0, msg, "", MB_OK);
  30.  
  31.         return 1;
  32. }
clone this paste RAW Paste Data