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.

118 lines
3.2 KiB

  1. /***************************************************************************
  2. *
  3. * Copyright (C) 2001-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dpnhpastdllmain.cpp
  6. *
  7. * Content: DPNHPAST DLL entry points.
  8. *
  9. * History:
  10. * Date By Reason
  11. * ======== ======== =========
  12. * 04/16/01 VanceO Split DPNATHLP into DPNHUPNP and DPNHPAST.
  13. *
  14. ***************************************************************************/
  15. #include "dpnhpasti.h"
  16. #undef DPF_MODNAME
  17. #define DPF_MODNAME "DllMain"
  18. //=============================================================================
  19. // DllMain
  20. //-----------------------------------------------------------------------------
  21. //
  22. // Description: DLL entry point.
  23. //
  24. // Arguments:
  25. // HANDLE hDllInst - Handle to this DLL module.
  26. // DWORD dwReason - Reason for calling this function.
  27. // LPVOID lpvReserved - Reserved.
  28. //
  29. // Returns: TRUE if all goes well, FALSE otherwise.
  30. //=============================================================================
  31. BOOL WINAPI DllMain(HANDLE hDllInst,
  32. DWORD dwReason,
  33. LPVOID lpvReserved)
  34. {
  35. DPFX(DPFPREP, 0, "DllMain(0x%px, %u, 0x%p), ignored.", hDllInst, dwReason, lpvReserved);
  36. return TRUE;
  37. } // DllMain
  38. #undef DPF_MODNAME
  39. #define DPF_MODNAME "DllRegisterServer"
  40. //=============================================================================
  41. // DllRegisterServer
  42. //-----------------------------------------------------------------------------
  43. //
  44. // Description: Registers the DirectPlay NAT Helper PAST COM object.
  45. //
  46. // Arguments: None.
  47. //
  48. // Returns: HRESULT
  49. // S_OK - Successfully unregistered DirectPlay NAT Helper PAST.
  50. // E_FAIL - Failed unregistering DirectPlay NAT Helper PAST.
  51. //=============================================================================
  52. HRESULT WINAPI DllRegisterServer(void)
  53. {
  54. DPFX(DPFPREP, 0, "DllRegisterServer, ignored.");
  55. return S_OK;
  56. } // DllRegisterServer
  57. #undef DPF_MODNAME
  58. #define DPF_MODNAME "DllUnregisterServer"
  59. //=============================================================================
  60. // DllUnregisterServer
  61. //-----------------------------------------------------------------------------
  62. //
  63. // Description: Unregisters the DirectPlay NAT Helper PAST COM object.
  64. //
  65. // Arguments: None.
  66. //
  67. // Returns: HRESULT
  68. // S_OK - Successfully unregistered DirectPlay NAT Helper PAST.
  69. // E_FAIL - Failed unregistering DirectPlay NAT Helper PAST.
  70. //=============================================================================
  71. STDAPI DllUnregisterServer(void)
  72. {
  73. DPFX(DPFPREP, 0, "DllUnregisterServer, ignored.");
  74. return S_OK;
  75. } // DllUnregisterServer
  76. /*
  77. * DllGetClassObject
  78. *
  79. * Entry point called by COM to get a ClassFactory pointer
  80. */
  81. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppvObj)
  82. {
  83. DPFX(DPFPREP, 0, "DllGetClassObject (0x%p, 0x%p, 0x%p), ignored.",
  84. &rclsid, &riid, ppvObj);
  85. return CLASS_E_CLASSNOTAVAILABLE;
  86. } /* DllGetClassObject */
  87. /*
  88. * DllCanUnloadNow
  89. *
  90. * Entry point called by COM to see if it is OK to free our DLL
  91. */
  92. STDAPI DllCanUnloadNow(void)
  93. {
  94. DPFX(DPFPREP, 0, "DllCanUnloadNow, ignored.");
  95. return S_OK;
  96. } /* DllCanUnloadNow */