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.7 KiB

  1. //--------------------------------------------------------------------------------------------
  2. //
  3. // Copyright (c) Microsoft Corporation, 1996-97
  4. //
  5. // Description:
  6. //
  7. // Microsoft Internet LDAP Client DLL.
  8. //
  9. // Authors:
  10. //
  11. // Umesh Madan
  12. // RobertC 4/17/96 Modified for LDAPCLI
  13. //
  14. //--------------------------------------------------------------------------------------------
  15. //--------------------------------------------------------------------------------------------
  16. //
  17. // INCLUDES
  18. //
  19. //--------------------------------------------------------------------------------------------
  20. #include "ldappch.h"
  21. #include "ldapsspi.h"
  22. //--------------------------------------------------------------------------------------------
  23. //
  24. // GLOBALS
  25. //
  26. //--------------------------------------------------------------------------------------------
  27. //--------------------------------------------------------------------------------------------
  28. //
  29. // PROTOTYPES
  30. //
  31. //--------------------------------------------------------------------------------------------
  32. //--------------------------------------------------------------------------------------------
  33. //
  34. // FUNCTIONS
  35. //
  36. //--------------------------------------------------------------------------------------------
  37. extern "C" BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpReserved)
  38. {
  39. switch (dwReason)
  40. {
  41. case DLL_PROCESS_ATTACH:
  42. {
  43. if (!FInitSocketDLL())
  44. {
  45. return FALSE;
  46. }
  47. g_hrInitSSPI = HrInitializeSSPI();
  48. } break;
  49. case DLL_PROCESS_DETACH:
  50. FreeSocketDLL();
  51. HrTerminateSSPI();
  52. break;
  53. default:
  54. break;
  55. }
  56. return TRUE;
  57. }