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.

80 lines
2.2 KiB

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