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.

70 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: dllmain.cpp
  7. //
  8. // Contents: DllMain entry point
  9. //
  10. // History: 08-May-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #include <stdpch.h>
  14. //
  15. // Module instance
  16. //
  17. HINSTANCE g_hModule = NULL;
  18. //+---------------------------------------------------------------------------
  19. //
  20. // Function: DllMain
  21. //
  22. // Synopsis: Windows DLL entry point
  23. //
  24. // Arguments: [hInstance] -- module instance
  25. // [dwReason] -- reason code
  26. // [pvReserved] -- reserved
  27. //
  28. // Returns: TRUE if everything ok, FALSE otherwise
  29. //
  30. // Notes:
  31. //
  32. //----------------------------------------------------------------------------
  33. extern "C" BOOL WINAPI
  34. TrustUIDllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID pvReserved)
  35. {
  36. switch ( dwReason )
  37. {
  38. case DLL_PROCESS_ATTACH:
  39. //
  40. // Keep the module instance handle for resource loading usage
  41. //
  42. g_hModule = hInstance;
  43. //
  44. // Initialize rich edit control DLL
  45. //
  46. /* if ( LoadLibrary(TEXT("riched32.dll")) == NULL )
  47. {
  48. return( FALSE );
  49. }*/
  50. //
  51. // Initialize the common controls
  52. //
  53. InitCommonControls();
  54. break;
  55. case DLL_PROCESS_DETACH:
  56. break;
  57. }
  58. return( TRUE );
  59. }