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.

84 lines
2.2 KiB

  1. // T30PropSheetExt.cpp : Implementation of DLL Exports.
  2. // Note: Proxy/Stub Information
  3. // To build a separate proxy/stub DLL,
  4. // run nmake -f T30PropSheetExtps.mk in the project directory.
  5. #include "stdafx.h"
  6. #include "resource.h"
  7. #include <initguid.h>
  8. #include "T30PropSheetExt.h"
  9. #include "T30Prop_i.c"
  10. #include "T30Config.h"
  11. #include <faxres.h>
  12. CComModule _Module;
  13. BEGIN_OBJECT_MAP(ObjectMap)
  14. OBJECT_ENTRY(CLSID_T30Config, CT30Config)
  15. OBJECT_ENTRY(CLSID_T30ConfigAbout, CT30ConfigAbout)
  16. END_OBJECT_MAP()
  17. /////////////////////////////////////////////////////////////////////////////
  18. // DLL Entry Point
  19. extern "C"
  20. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
  21. {
  22. if (dwReason == DLL_PROCESS_ATTACH)
  23. {
  24. _Module.Init(ObjectMap, hInstance, &LIBID_T30PROPSHEETEXTLib);
  25. DisableThreadLibraryCalls(hInstance);
  26. _Module.m_hInstResource = GetResInstance(hInstance);
  27. if(!_Module.m_hInstResource)
  28. {
  29. return FALSE;
  30. }
  31. }
  32. else if (dwReason == DLL_PROCESS_DETACH)
  33. {
  34. _Module.Term();
  35. FreeResInstance();
  36. }
  37. return TRUE; // ok
  38. }
  39. /////////////////////////////////////////////////////////////////////////////
  40. // Used to determine whether the DLL can be unloaded by OLE
  41. STDAPI DllCanUnloadNow(void)
  42. {
  43. return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
  44. }
  45. /////////////////////////////////////////////////////////////////////////////
  46. // Returns a class factory to create an object of the requested type
  47. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  48. {
  49. return _Module.GetClassObject(rclsid, riid, ppv);
  50. }
  51. /////////////////////////////////////////////////////////////////////////////
  52. // DllRegisterServer - Adds entries to the system registry
  53. STDAPI DllRegisterServer(void)
  54. {
  55. //
  56. // registers object, typelib and all interfaces in typelib
  57. //
  58. return _Module.RegisterServer(TRUE);
  59. }
  60. /////////////////////////////////////////////////////////////////////////////
  61. // DllUnregisterServer - Removes entries from the system registry
  62. STDAPI DllUnregisterServer(void)
  63. {
  64. return _Module.UnregisterServer(TRUE);
  65. }