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.

65 lines
1005 B

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name :
  4. prop.c
  5. Abstract :
  6. Implementation of DllMain
  7. Revision History :
  8. --*/
  9. #include "propp.h"
  10. HMODULE ModuleInstance = NULL;
  11. BOOL WINAPI
  12. DllMain(HINSTANCE DllInstance, DWORD Reason, PVOID Reserved)
  13. {
  14. switch (Reason)
  15. {
  16. case DLL_PROCESS_ATTACH:
  17. {
  18. ModuleInstance = DllInstance;
  19. DisableThreadLibraryCalls(DllInstance);
  20. break;
  21. }
  22. case DLL_PROCESS_DETACH:
  23. {
  24. ModuleInstance = NULL;
  25. break;
  26. }
  27. }
  28. return TRUE;
  29. }
  30. #if DBG
  31. ULONG StorPropDebug = 0;
  32. VOID
  33. StorPropDebugPrint(ULONG DebugPrintLevel, PCHAR DebugMessage, ...)
  34. {
  35. va_list ap;
  36. va_start(ap, DebugMessage);
  37. if ((DebugPrintLevel <= (StorPropDebug & 0x0000ffff)) || ((1 << (DebugPrintLevel + 15)) & StorPropDebug))
  38. {
  39. DbgPrint(DebugMessage, ap);
  40. }
  41. va_end(ap);
  42. }
  43. #endif