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.

74 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. sample\ipsample.c
  5. Abstract:
  6. The file contains the entry point to the ip sample protocol's dll.
  7. --*/
  8. #include "pchsample.h"
  9. #pragma hdrstop
  10. #define SAMPLEAPI __declspec(dllexport)
  11. #include "ipsample.h"
  12. BOOL
  13. WINAPI
  14. DllMain(
  15. IN HINSTANCE hInstance,
  16. IN DWORD dwReason,
  17. IN PVOID pvImpLoad
  18. )
  19. /*++
  20. Routine Description
  21. DLL entry and exit point handler.
  22. It calls CE_Initialize to initialize the configuration entry...
  23. It calls CD_Cleanup to cleanup the configuration entry...
  24. Locks
  25. None
  26. Arguments
  27. hInstance Instance handle of DLL
  28. dwReason Reason function called
  29. pvImpLoad Implicitly loaded DLL?
  30. Return Value
  31. TRUE Successfully loaded DLL
  32. --*/
  33. {
  34. BOOL bError = TRUE;
  35. UNREFERENCED_PARAMETER(hInstance);
  36. UNREFERENCED_PARAMETER(pvImpLoad);
  37. switch(dwReason)
  38. {
  39. case DLL_PROCESS_ATTACH:
  40. DisableThreadLibraryCalls(hInstance);
  41. bError = (CE_Create(&g_ce) is NO_ERROR) ? TRUE : FALSE;
  42. break;
  43. case DLL_PROCESS_DETACH:
  44. CE_Destroy(&g_ce);
  45. break;
  46. default:
  47. break;
  48. }
  49. return bError;
  50. }