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.4 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. #include "SwingPage.h"
  16. #include "VelocityPage.h"
  17. CComModule _Module;
  18. BEGIN_OBJECT_MAP(ObjectMap)
  19. OBJECT_ENTRY(CLSID_EchoPage, CEchoPage)
  20. OBJECT_ENTRY(CLSID_TransposePage, CTransposePage)
  21. OBJECT_ENTRY(CLSID_DurationPage, CDurationPage)
  22. OBJECT_ENTRY(CLSID_QuantizePage, CQuantizePage)
  23. OBJECT_ENTRY(CLSID_TimeShiftPage, CTimeShiftPage)
  24. OBJECT_ENTRY(CLSID_SwingPage, CSwingPage)
  25. OBJECT_ENTRY(CLSID_VelocityPage, CVelocityPage)
  26. END_OBJECT_MAP()
  27. /////////////////////////////////////////////////////////////////////////////
  28. // DLL Entry Point
  29. extern "C"
  30. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
  31. {
  32. if (dwReason == DLL_PROCESS_ATTACH)
  33. {
  34. _Module.Init(ObjectMap, hInstance, &LIBID_TOOLPROPSLib);
  35. DisableThreadLibraryCalls(hInstance);
  36. }
  37. else if (dwReason == DLL_PROCESS_DETACH)
  38. _Module.Term();
  39. return TRUE; // ok
  40. }
  41. /////////////////////////////////////////////////////////////////////////////
  42. // Used to determine whether the DLL can be unloaded by OLE
  43. STDAPI DllCanUnloadNow(void)
  44. {
  45. return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
  46. }
  47. /////////////////////////////////////////////////////////////////////////////
  48. // Returns a class factory to create an object of the requested type
  49. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  50. {
  51. return _Module.GetClassObject(rclsid, riid, ppv);
  52. }
  53. /////////////////////////////////////////////////////////////////////////////
  54. // DllRegisterServer - Adds entries to the system registry
  55. STDAPI DllRegisterServer(void)
  56. {
  57. // registers object, typelib and all interfaces in typelib
  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. }