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.

106 lines
3.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. // TapiDialer.cpp : Implementation of DLL Exports.
  23. // Note: Proxy/Stub Information
  24. // To build a separate proxy/stub DLL,
  25. // run nmake -f TapiDialerps.mk in the project directory.
  26. #include "stdafx.h"
  27. #include "resource.h"
  28. #include "initguid.h"
  29. #include "TapiDialer.h"
  30. #include "TapiDialer_i.c"
  31. #include "confpriv.h"
  32. #include "AVTapi.h"
  33. #include "PageAddress.h"
  34. #include "PageTerm.h"
  35. #include "VideoFeed.h"
  36. #include "GenNtfy.h"
  37. #include "AVGenNtfy.h"
  38. #include "PersExp.h"
  39. #include "PETreeView.h"
  40. #include "PEDtlsVw.h"
  41. #include "EnumSite.h"
  42. CTapiModule _Module;
  43. BEGIN_OBJECT_MAP(ObjectMap)
  44. OBJECT_ENTRY(CLSID_AVTapi, CAVTapi)
  45. OBJECT_ENTRY(CLSID_AVGeneralNotification, CAVGeneralNotification)
  46. OBJECT_ENTRY(CLSID_PageAddress, CPageAddress)
  47. OBJECT_ENTRY(CLSID_PageTerminals, CPageTerminals)
  48. END_OBJECT_MAP()
  49. /////////////////////////////////////////////////////////////////////////////
  50. // DLL Entry Point
  51. extern "C"
  52. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
  53. {
  54. if (dwReason == DLL_PROCESS_ATTACH)
  55. {
  56. _Module.Init(ObjectMap, hInstance);
  57. DisableThreadLibraryCalls(hInstance);
  58. }
  59. else if (dwReason == DLL_PROCESS_DETACH)
  60. _Module.Term();
  61. return TRUE; // ok
  62. }
  63. /////////////////////////////////////////////////////////////////////////////
  64. // Used to determine whether the DLL can be unloaded by OLE
  65. STDAPI DllCanUnloadNow(void)
  66. {
  67. return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
  68. }
  69. /////////////////////////////////////////////////////////////////////////////
  70. // Returns a class factory to create an object of the requested type
  71. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  72. {
  73. return _Module.GetClassObject(rclsid, riid, ppv);
  74. }
  75. /////////////////////////////////////////////////////////////////////////////
  76. // DllRegisterServer - Adds entries to the system registry
  77. STDAPI DllRegisterServer(void)
  78. {
  79. // registers object
  80. return _Module.RegisterServer(FALSE);
  81. }
  82. /////////////////////////////////////////////////////////////////////////////
  83. // DllUnregisterServer - Removes entries from the system registry
  84. STDAPI DllUnregisterServer(void)
  85. {
  86. _Module.UnregisterServer();
  87. return S_OK;
  88. }