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.

72 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. dllmain.cxx
  5. Abstract:
  6. Main file for the NT LONSI(Library of Non-Standard Interfaces)
  7. Author:
  8. Johnson Apacible (johnsona) 13-Nov-1996
  9. --*/
  10. #include "lonsint.hxx"
  11. #include <inetsvcs.h>
  12. DECLARE_DEBUG_VARIABLE();
  13. DECLARE_DEBUG_PRINTS_OBJECT();
  14. extern CRITICAL_SECTION Logon32Lock;
  15. extern "C"
  16. BOOL WINAPI
  17. DllEntry(
  18. HINSTANCE hDll,
  19. DWORD dwReason,
  20. LPVOID lpvReserved
  21. )
  22. {
  23. BOOL fReturn = TRUE;
  24. switch ( dwReason ) {
  25. case DLL_PROCESS_ATTACH:
  26. CREATE_DEBUG_PRINT_OBJECT("lonsint");
  27. if ( !VALID_DEBUG_PRINT_OBJECT()) {
  28. IIS_PRINTF((buff,"Cannot create debug object\n"));
  29. return ( FALSE);
  30. }
  31. LOAD_DEBUG_FLAGS_FROM_REG_STR("System\\CurrentControlSet\\Services\\InetInfo\\Parameters", 0);
  32. DisableThreadLibraryCalls(hDll);
  33. INITIALIZE_CRITICAL_SECTION( &Logon32Lock );
  34. break;
  35. case DLL_PROCESS_DETACH:
  36. DeleteCriticalSection( &Logon32Lock );
  37. DELETE_DEBUG_PRINT_OBJECT();
  38. break;
  39. default:
  40. break ;
  41. }
  42. return ( fReturn);
  43. } // DllEntry