Leaked source code of windows server 2003
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.

82 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. intidll.c
  5. Abstract:
  6. This file handles the DLLInitialize spooler API
  7. Environment:
  8. Win32 subsystem, DriverUI module, user mode
  9. Revision History:
  10. 07/17/96 -amandan-
  11. Created it.
  12. --*/
  13. #include "precomp.h"
  14. //
  15. // Global instance handle and critical section
  16. //
  17. HINSTANCE ghInstance;
  18. // CRITICAL_SECTION gCriticalSection;
  19. BOOL WINAPI
  20. DllMain(
  21. HANDLE hModule,
  22. ULONG ulReason,
  23. PCONTEXT pContext
  24. )
  25. /*++
  26. Routine Description:
  27. This function is called when the system loads/unloads the DriverUI module.
  28. At DLL_PROCESS_ATTACH, InitializeCriticalSection is called to initialize
  29. the critical section objects.
  30. At DLL_PROCESS_DETACH, DeleteCriticalSection is called to release the
  31. critical section objects.
  32. Arguments:
  33. hModule handle to DLL module
  34. ulReason reason for the call
  35. pContext pointer to context (not used by us)
  36. Return Value:
  37. TRUE if DLL is initialized successfully, FALSE otherwise.
  38. --*/
  39. {
  40. switch (ulReason)
  41. {
  42. case DLL_PROCESS_ATTACH:
  43. ghInstance = hModule;
  44. // InitializeCriticalSection(&gCriticalSection);
  45. break;
  46. case DLL_PROCESS_DETACH:
  47. // DeleteCriticalSection(&gCriticalSection);
  48. break;
  49. }
  50. return TRUE;
  51. }