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.

73 lines
1.4 KiB

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: dllentry.cpp
  9. //
  10. //
  11. // PURPOSE: Source module for DLL entry function(s).
  12. //
  13. //
  14. // Functions:
  15. //
  16. // DllMain
  17. //
  18. //
  19. // PLATFORMS: Windows 2000, Windows XP, Windows Server 2003
  20. //
  21. //
  22. #include "precomp.h"
  23. #include "oemuni.h"
  24. #include "debug.h"
  25. // StrSafe.h needs to be included last
  26. // to disallow bad string functions.
  27. #include <STRSAFE.H>
  28. // Need to export these functions as c declarations.
  29. extern "C" {
  30. ///////////////////////////////////////////////////////////
  31. //
  32. // DLL entry point
  33. //
  34. // DllMain isn't called/used for kernel mode version.
  35. BOOL WINAPI DllMain(HINSTANCE hInst, WORD wReason, LPVOID lpReserved)
  36. {
  37. switch(wReason)
  38. {
  39. case DLL_PROCESS_ATTACH:
  40. VERBOSE(DLLTEXT("Process attach.\r\n"));
  41. break;
  42. case DLL_THREAD_ATTACH:
  43. VERBOSE(DLLTEXT("Thread attach.\r\n"));
  44. break;
  45. case DLL_PROCESS_DETACH:
  46. VERBOSE(DLLTEXT("Process detach.\r\n"));
  47. break;
  48. case DLL_THREAD_DETACH:
  49. VERBOSE(DLLTEXT("Thread detach.\r\n"));
  50. break;
  51. }
  52. return TRUE;
  53. }
  54. } // extern "C" closing bracket