Source code of Windows XP (NT5)
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.

43 lines
825 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. int WINAPI _DllMainCRTStartup(HINSTANCE hDllInst,
  29. DWORD dwReason,
  30. LPVOID fImpLoad)
  31. {
  32. int rv = TRUE;
  33. if (dwReason == DLL_PROCESS_ATTACH)
  34. rv = InitDone(hDllInst, TRUE);
  35. else if (dwReason == DLL_PROCESS_DETACH)
  36. rv = InitDone(hDllInst, FALSE);
  37. return rv;
  38. }