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.

32 lines
783 B

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: main.cpp
  4. //
  5. // Module: CMSAMPLE.DLL
  6. //
  7. // Synopsis: Main entry point for cmsample.dll
  8. //
  9. // Copyright (c) 2000 Microsoft Corporation
  10. //
  11. //+----------------------------------------------------------------------------
  12. #include <windows.h>
  13. extern "C" BOOL WINAPI DllMain(
  14. HINSTANCE hinstDLL, // handle to DLL module
  15. DWORD fdwReason, // reason for calling function
  16. LPVOID lpvReserved // reserved
  17. )
  18. {
  19. if (fdwReason == DLL_PROCESS_ATTACH)
  20. {
  21. //
  22. // Disable the DLL_THREAD_ATTACH notification calls.
  23. //
  24. if (DisableThreadLibraryCalls(hinstDLL) == 0)
  25. {
  26. return FALSE;
  27. }
  28. }
  29. return TRUE;
  30. }