Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
930 B

  1. // - - - - - - - - -
  2. // LIBMAIN.C
  3. //
  4. // This file contains the default forms of the DLL library initialization
  5. // and cleanup functions.
  6. // - - - - - - - - -
  7. #include <mvopsys.h>
  8. #include <mvsearch.h>
  9. #ifndef _NT
  10. PRIVATE HANDLE NEAR s_hModule;
  11. // - - - - - - - - -
  12. PUBLIC BOOL FAR PASCAL LibMain(
  13. HANDLE hModule,
  14. CB cbHeapSize,
  15. LSZ lszCmdLine)
  16. {
  17. s_hModule = hModule;
  18. return TRUE;
  19. }
  20. #else
  21. PUBLIC BOOL FAR PASCAL LibMain( HANDLE hModule, BOOL bAttaching)
  22. {
  23. return TRUE;
  24. }
  25. #endif
  26. #ifdef _NT
  27. BOOL WINAPI DllMain( hinstDll, fdwReason, lpvReserved )
  28. HINSTANCE hinstDll; /* Handle for our convenience */
  29. DWORD fdwReason; /* Why we are called */
  30. LPVOID lpvReserved; /* Additional details of why we are here */
  31. {
  32. switch( fdwReason )
  33. {
  34. case DLL_PROCESS_ATTACH:
  35. LibMain( hinstDll, 0 );
  36. break;
  37. case DLL_PROCESS_DETACH:
  38. break;
  39. }
  40. return TRUE;
  41. }
  42. #endif