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.

124 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. iisui.cpp
  5. Abstract:
  6. DLL Main entry point.
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. --*/
  14. #include "stdafx.h"
  15. #include "common.h"
  16. #include "iisdebug.h"
  17. #include <winsock2.h>
  18. #ifdef _COMEXPORT
  19. HINSTANCE hDLLInstance;
  20. //
  21. // Dll Version Only
  22. //
  23. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  24. STDAPI
  25. DllRegisterServer()
  26. {
  27. return S_OK;
  28. }
  29. STDAPI
  30. DllUnregisterServer()
  31. {
  32. return S_OK;
  33. }
  34. static AFX_EXTENSION_MODULE commonDLL = {NULL, NULL};
  35. extern "C" int APIENTRY
  36. DllMain(
  37. IN HINSTANCE hInstance,
  38. IN DWORD dwReason,
  39. IN LPVOID lpReserved
  40. )
  41. /*++
  42. Routine Description:
  43. DLL Main entry point
  44. Arguments:
  45. HINSTANCE hInstance : Instance handle
  46. DWORD dwReason : DLL_PROCESS_ATTACH, etc
  47. LPVOID lpReserved : Reserved value
  48. Return Value:
  49. 1 for succesful initialisation, 0 for failed initialisation
  50. --*/
  51. {
  52. lpReserved;
  53. int res = 1;
  54. switch (dwReason)
  55. {
  56. case DLL_PROCESS_ATTACH:
  57. ASSERT(hInstance != NULL);
  58. hDLLInstance = hInstance;
  59. res = ::AfxInitExtensionModule(commonDLL, hInstance);
  60. InitErrorFunctionality();
  61. InitIntlSettings();
  62. WSADATA wsaData;
  63. {
  64. BOOL WinSockInit = (::WSAStartup(MAKEWORD(1, 1), &wsaData) == 0);
  65. }
  66. #if defined(_DEBUG) || DBG
  67. afxTraceEnabled = TRUE;
  68. GetOutputDebugFlag();
  69. #endif // _DEBUG
  70. break;
  71. case DLL_PROCESS_DETACH:
  72. //
  73. // termination
  74. //
  75. TerminateIntlSettings();
  76. TerminateErrorFunctionality();
  77. ::AfxTermExtensionModule(commonDLL);
  78. break;
  79. }
  80. return res;
  81. }
  82. extern "C" void WINAPI
  83. InitCommonDll()
  84. {
  85. new CDynLinkLibrary(commonDLL);
  86. // hDLLInstance = commonDLL.hResource;
  87. }
  88. #endif // IISUI_EXPORTS