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.

66 lines
1.4 KiB

  1. //***************************************************************************
  2. //
  3. // MAINDLL.CPP
  4. //
  5. // Purpose: Contains DLL entry points. Also has code that controls
  6. // when the DLL can be unloaded by tracking the number of
  7. // objects and locks.
  8. //
  9. // Copyright (c) 1996-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #include <precomp.h>
  13. #include <provimex.h>
  14. #include <provexpt.h>
  15. #include <provtempl.h>
  16. #include <provmt.h>
  17. #include <process.h>
  18. #include <objbase.h>
  19. #include <provcont.h>
  20. #include "provevt.h"
  21. #include "provlog.h"
  22. //***************************************************************************
  23. //
  24. // LibMain32
  25. //
  26. // Purpose: Entry point for DLL. Good place for initialization.
  27. // Return: TRUE if OK.
  28. //***************************************************************************
  29. BOOL APIENTRY DllMain (
  30. HINSTANCE hInstance,
  31. ULONG ulReason ,
  32. LPVOID pvReserved
  33. )
  34. {
  35. BOOL status = TRUE ;
  36. if ( DLL_PROCESS_DETACH == ulReason )
  37. {
  38. }
  39. else if ( DLL_PROCESS_ATTACH == ulReason )
  40. {
  41. DisableThreadLibraryCalls(hInstance); // 158024
  42. status = !CStaticCriticalSection::AnyFailure();
  43. }
  44. else if ( DLL_THREAD_DETACH == ulReason )
  45. {
  46. }
  47. else if ( DLL_THREAD_ATTACH == ulReason )
  48. {
  49. }
  50. return status ;
  51. }