Source code of Windows XP (NT5)
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.

121 lines
2.1 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. HCAPIlib.h
  5. Abstract:
  6. This file contains the declaration of the common code for the
  7. Help Center Launch API.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 04/15/2000
  10. created
  11. ******************************************************************************/
  12. #if !defined(__INCLUDED___PCH___HCAPILIB_H___)
  13. #define __INCLUDED___PCH___HCAPILIB_H___
  14. //
  15. // From HelpServiceTypeLib.idl
  16. //
  17. #include <HelpServiceTypeLib.h>
  18. //
  19. // From HelpCenterTypeLib.idl
  20. //
  21. #include <HelpCenterTypeLib.h>
  22. //
  23. // From HCApi.idl
  24. //
  25. #include <HCApi.h>
  26. namespace HCAPI
  27. {
  28. // BUILD BREAK
  29. interface IPCHHelpCenterIPC : public IUnknown
  30. {
  31. };
  32. class CmdData
  33. {
  34. public:
  35. CLSID m_clsidCaller;
  36. ////////////////////
  37. bool m_fMode;
  38. DWORD m_dwFlags;
  39. ////////////////////
  40. bool m_fWindow;
  41. HWND m_hwndParent;
  42. ////////////////////
  43. bool m_fSize;
  44. LONG m_lX;
  45. LONG m_lY;
  46. LONG m_lWidth;
  47. LONG m_lHeight;
  48. ////////////////////
  49. bool m_fCtx;
  50. CComBSTR m_bstrCtxName;
  51. CComBSTR m_bstrCtxInfo;
  52. ////////////////////
  53. bool m_fURL;
  54. CComBSTR m_bstrURL;
  55. ////////////////////
  56. bool m_fError;
  57. CLSID m_clsidError;
  58. ////////////////////
  59. CmdData();
  60. HRESULT Serialize ( /*[out]*/ CComBSTR& bstrBLOB );
  61. HRESULT Unserialize( /*[in ]*/ const CComBSTR& bstrBLOB );
  62. };
  63. class Locator
  64. {
  65. CComPtr<IPCHHelpCenterIPC> m_ipc;
  66. CComPtr<IRunningObjectTable> m_rt;
  67. CComPtr<IMoniker> m_moniker;
  68. DWORD m_dwRegister;
  69. public:
  70. Locator();
  71. ~Locator();
  72. void Cleanup();
  73. HRESULT Init( /*[in]*/ REFCLSID clsid, /*[in]*/ IPCHHelpCenterIPC* ipc = NULL );
  74. HRESULT Register();
  75. HRESULT Revoke ();
  76. HRESULT IsOpen( /*[out]*/ bool& fOpen, /*[in]*/ CLSID* pclsid = NULL );
  77. HRESULT ExecCommand( /*[out]*/ CmdData& cd );
  78. HRESULT PopUp();
  79. HRESULT Close();
  80. HRESULT WaitForTermination( /*[in]*/ DWORD dwTimeout );
  81. };
  82. };
  83. #endif // !defined(__INCLUDED___PCH___HCAPILIB_H___)