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.

86 lines
2.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: dllmain.cxx
  7. //
  8. // Contents: DLL initialization entrypoint and global variables
  9. //
  10. // History: 4-Apr-95 BruceFo Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #include "headers.hxx"
  14. #pragma hdrstop
  15. //--------------------------------------------------------------------------
  16. // Globals used elsewhere
  17. UINT g_NonOLEDLLRefs = 0;
  18. HINSTANCE g_hInstance = NULL;
  19. //--------------------------------------------------------------------------
  20. // Debugging
  21. DECLARE_INFOLEVEL(NetObjectsUI)
  22. //--------------------------------------------------------------------------
  23. //+--------------------------------------------------------------------------
  24. //
  25. // Function: DllMain
  26. //
  27. // Synopsis: Win32 DLL initialization function
  28. //
  29. // Arguments: [hInstance] - Handle to this dll
  30. // [dwReason] - Reason this function was called. Can be
  31. // Process/Thread Attach/Detach.
  32. //
  33. // Returns: BOOL - TRUE if no error. FALSE otherwise
  34. //
  35. // History: 4-Apr-95 BruceFo Created
  36. //
  37. //---------------------------------------------------------------------------
  38. extern "C"
  39. BOOL
  40. DllMain(
  41. HINSTANCE hInstance,
  42. DWORD dwReason,
  43. LPVOID lpReserved
  44. )
  45. {
  46. switch (dwReason)
  47. {
  48. case DLL_PROCESS_ATTACH:
  49. {
  50. #if DBG == 1
  51. InitializeDebugging();
  52. // NetObjectsUIInfoLevel = DEB_ERROR | DEB_TRACE;
  53. NetObjectsUIInfoLevel = DEB_ERROR;
  54. SetWin4AssertLevel(ASSRT_BREAK | ASSRT_MESSAGE);
  55. #endif // DBG == 1
  56. appDebugOut((DEB_TRACE, "ntlanui2.dll: DllMain enter\n"));
  57. // Disable thread notification from OS
  58. DisableThreadLibraryCalls(hInstance);
  59. g_hInstance = hInstance;
  60. InitCommonControls();
  61. break;
  62. }
  63. case DLL_PROCESS_DETACH:
  64. appDebugOut((DEB_TRACE, "ntlanui2.dll: DllMain leave\n"));
  65. break;
  66. }
  67. return TRUE;
  68. }
  69. extern HRESULT PropDummyFunction();
  70. HRESULT Linkage()
  71. {
  72. return PropDummyFunction();
  73. }