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.

50 lines
915 B

  1. /*++
  2. * File name:
  3. * main.c
  4. * Contents:
  5. * Dll entry point. Call initialization/clean procedures
  6. *
  7. * Copyright (C) 1998-1999 Microsoft Corp.
  8. *
  9. --*/
  10. #include <windows.h>
  11. /*
  12. * External functions
  13. */
  14. int InitDone(HINSTANCE, int);
  15. /*++
  16. * Function:
  17. * DllEntry
  18. * Description:
  19. * Dll entry point
  20. * Arguments:
  21. * hDllInst - dll instance
  22. * dwReason - action
  23. * fImpLoad - unused
  24. * Return value:
  25. * TRUE on success
  26. *
  27. --*/
  28. #if 0
  29. _DllMainCRTStartup
  30. #endif
  31. int APIENTRY DllMain(
  32. HINSTANCE hDllInst,
  33. DWORD dwReason,
  34. LPVOID fImpLoad
  35. )
  36. {
  37. int rv = TRUE;
  38. UNREFERENCED_PARAMETER(fImpLoad);
  39. if (dwReason == DLL_PROCESS_ATTACH)
  40. rv = InitDone(hDllInst, TRUE);
  41. else if (dwReason == DLL_PROCESS_DETACH)
  42. rv = InitDone(hDllInst, FALSE);
  43. return rv;
  44. }