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.

88 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: D L L M A I N . C P P
  7. //
  8. // Contents: Networking Optional component DLL
  9. //
  10. // Notes:
  11. //
  12. // Author: danielwe 18 Dec 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. #include <ncxbase.h>
  18. #include <ncreg.h>
  19. // Optional component setup
  20. #include "netoc.h"
  21. #include "netocp.h"
  22. BEGIN_OBJECT_MAP(ObjectMap)
  23. END_OBJECT_MAP()
  24. // Global
  25. CComModule _Module;
  26. EXTERN_C
  27. BOOL
  28. WINAPI
  29. DllMain (
  30. HINSTANCE hInstance,
  31. DWORD dwReason,
  32. LPVOID /*lpReserved*/)
  33. {
  34. if (DLL_PROCESS_ATTACH == dwReason)
  35. {
  36. InitializeDebugging();
  37. _Module.Init (ObjectMap, hInstance);
  38. DisableThreadLibraryCalls (hInstance);
  39. }
  40. else if (DLL_PROCESS_DETACH == dwReason)
  41. {
  42. _Module.Term ();
  43. UnInitializeDebugging();
  44. }
  45. return TRUE; // ok
  46. }
  47. //+---------------------------------------------------------------------------
  48. //
  49. // Function: NetOcSetupProc
  50. //
  51. // Purpose:
  52. //
  53. // Arguments:
  54. // pvComponentId []
  55. // pvSubcomponentId []
  56. // uFunction []
  57. // uParam1 []
  58. // pvParam2 []
  59. //
  60. // Returns:
  61. //
  62. // Author: danielwe 12 Dec 1997
  63. //
  64. // Notes:
  65. //
  66. EXTERN_C
  67. DWORD
  68. WINAPI
  69. NetOcSetupProc (
  70. LPCVOID pvComponentId,
  71. LPCVOID pvSubcomponentId,
  72. UINT uFunction,
  73. UINT uParam1,
  74. LPVOID pvParam2)
  75. {
  76. return NetOcSetupProcHelper(pvComponentId, pvSubcomponentId, uFunction,
  77. uParam1, pvParam2);
  78. }