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.

92 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1999-1999 Microsoft Corporation
  3. Module Name:
  4. init.c
  5. Abstract:
  6. DLL initialization/termination routines.
  7. Author:
  8. Keith Moore (keithmo) 02-Aug-1999
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. //
  13. // Private macros.
  14. //
  15. //
  16. // Private prototypes.
  17. //
  18. //
  19. // Public functions.
  20. //
  21. /***************************************************************************++
  22. Routine Description:
  23. Performs DLL initialization/termination.
  24. Arguments:
  25. DllHandle - Supplies a handle to the current DLL.
  26. Reason - Supplies the notification code.
  27. pContext - Optionally supplies a context.
  28. Return Value:
  29. BOOLEAN - TRUE if initialization completed successfully, FALSE
  30. otherwise. Ignored for notifications other than process
  31. attach.
  32. --***************************************************************************/
  33. BOOL
  34. WINAPI
  35. DllMain(
  36. IN HMODULE DllHandle,
  37. IN DWORD Reason,
  38. IN LPVOID pContext OPTIONAL
  39. )
  40. {
  41. BOOL result = TRUE;
  42. //
  43. // Interpret the reason code.
  44. //
  45. switch (Reason)
  46. {
  47. case DLL_PROCESS_ATTACH:
  48. DisableThreadLibraryCalls( DllHandle );
  49. break;
  50. case DLL_PROCESS_DETACH:
  51. break;
  52. }
  53. return result;
  54. } // DllMain
  55. //
  56. // Private functions.
  57. //