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.

108 lines
3.2 KiB

  1. // FaxComEx.cpp : Implementation of DLL Exports.
  2. // Note: Proxy/Stub Information
  3. // To build a separate proxy/stub DLL,
  4. // run nmake -f FaxComExps.mk in the project directory.
  5. #include "stdafx.h"
  6. #include "resource.h"
  7. #include <initguid.h>
  8. #include "FaxComEx.h"
  9. #include "FaxComEx_i.c"
  10. #include "FaxSender.h"
  11. #include "FaxDevice.h"
  12. #include "FaxServer.h"
  13. #include "FaxDevices.h"
  14. #include "FaxFolders.h"
  15. #include "FaxActivity.h"
  16. #include "FaxSecurity.h"
  17. #include "FaxDocument.h"
  18. #include "FaxRecipient.h"
  19. #include "FaxDeviceIds.h"
  20. #include "FaxRecipients.h"
  21. #include "FaxIncomingJob.h"
  22. #include "FaxOutgoingJob.h"
  23. #include "FaxIncomingJobs.h"
  24. #include "FaxOutgoingJobs.h"
  25. #include "FaxEventLogging.h"
  26. #include "FaxOutgoingQueue.h"
  27. #include "FaxIncomingQueue.h"
  28. #include "FaxInboundRouting.h"
  29. #include "FaxLoggingOptions.h"
  30. #include "FaxReceiptOptions.h"
  31. #include "FaxDeviceProvider.h"
  32. #include "FaxIncomingMessage.h"
  33. #include "FaxIncomingArchive.h"
  34. #include "FaxOutgoingArchive.h"
  35. #include "FaxOutgoingMessage.h"
  36. #include "FaxOutboundRouting.h"
  37. #include "FaxDeviceProviders.h"
  38. #include "FaxActivityLogging.h"
  39. #include "FaxOutboundRoutingRule.h"
  40. #include "FaxOutboundRoutingRules.h"
  41. #include "FaxOutboundRoutingGroup.h"
  42. #include "FaxInboundRoutingMethod.h"
  43. #include "FaxInboundRoutingMethods.h"
  44. #include "FaxOutboundRoutingGroups.h"
  45. #include "FaxIncomingMessageIterator.h"
  46. #include "FaxOutgoingMessageIterator.h"
  47. #include "FaxInboundRoutingExtension.h"
  48. #include "FaxInboundRoutingExtensions.h"
  49. CComModule _Module;
  50. BEGIN_OBJECT_MAP(ObjectMap)
  51. OBJECT_ENTRY(CLSID_FaxDocument, CFaxDocument)
  52. OBJECT_ENTRY(CLSID_FaxServer, CFaxServer)
  53. END_OBJECT_MAP()
  54. /////////////////////////////////////////////////////////////////////////////
  55. // DLL Entry Point
  56. extern "C"
  57. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
  58. {
  59. if (dwReason == DLL_PROCESS_ATTACH)
  60. {
  61. _Module.Init(ObjectMap, hInstance, &LIBID_FAXCOMEXLib);
  62. DisableThreadLibraryCalls(hInstance);
  63. }
  64. else if (dwReason == DLL_PROCESS_DETACH)
  65. _Module.Term();
  66. return TRUE; // ok
  67. }
  68. /////////////////////////////////////////////////////////////////////////////
  69. // Used to determine whether the DLL can be unloaded by OLE
  70. STDAPI DllCanUnloadNow(void)
  71. {
  72. return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
  73. }
  74. /////////////////////////////////////////////////////////////////////////////
  75. // Returns a class factory to create an object of the requested type
  76. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  77. {
  78. return _Module.GetClassObject(rclsid, riid, ppv);
  79. }
  80. /////////////////////////////////////////////////////////////////////////////
  81. // DllRegisterServer - Adds entries to the system registry
  82. STDAPI DllRegisterServer(void)
  83. {
  84. // registers object, typelib and all interfaces in typelib
  85. return _Module.RegisterServer(TRUE);
  86. }
  87. /////////////////////////////////////////////////////////////////////////////
  88. // DllUnregisterServer - Removes entries from the system registry
  89. STDAPI DllUnregisterServer(void)
  90. {
  91. return _Module.UnregisterServer(TRUE);
  92. }