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.

64 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1991-1999 Microsoft Corporation
  3. Module Name:
  4. dllmain.c
  5. Abstract:
  6. This is the dll entry point for the web dav mini redir service dll.
  7. Author:
  8. Andy Herron (andyhe) 29-Mar-1999
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #include "pch.h"
  14. #pragma hdrstop
  15. #include <ntumrefl.h>
  16. #include <usrmddav.h>
  17. #include "global.h"
  18. //+---------------------------------------------------------------------------
  19. // DLL Entry Point
  20. //
  21. // DllMain should do as little work as possible.
  22. //
  23. BOOL
  24. WINAPI
  25. DllMain (
  26. HINSTANCE hinst,
  27. DWORD dwReason,
  28. LPVOID pvReserved
  29. )
  30. {
  31. if (DLL_PROCESS_ATTACH == dwReason) {
  32. InitializeCriticalSection (&g_DavServiceLock);
  33. // Save our instance handle in a global variable to be used
  34. // when loading resources etc.
  35. //
  36. g_hinst = hinst;
  37. // DisableThreadLibraryCalls tells the loader we don't need to
  38. // be informed of DLL_THREAD_ATTACH and DLL_THREAD_DETACH events.
  39. //
  40. DisableThreadLibraryCalls (hinst);
  41. } else if (DLL_PROCESS_DETACH == dwReason) {
  42. DeleteCriticalSection (&g_DavServiceLock);
  43. }
  44. return TRUE;
  45. }