home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / MPRUI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  5.2 KB  |  204 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  2. /*++
  3.  
  4. Copyright (c) 1996, Microsoft Corporation
  5.  
  6. Module Name:
  7.     mprui.h
  8.  
  9. Abstract:
  10.     Declarations for the Multi-Protocol router's UI plugin interface.
  11.  
  12. --*/
  13.  
  14. // forward declarations
  15. #ifdef _cplusplus
  16.   struct IMprUIHost;
  17.   struct IMprUIPlugin;
  18. #else
  19.   typedef struct IMprUIHost IMprUIHost;
  20.   typedef struct IMprUIPlugin IMprUIPlugin;
  21. #endif
  22.  
  23. // {73A827F0-FF6E-11cf-AA6B-00805F0C9232}
  24. DEFINE_GUID(IID_IMprUIHost, 
  25. 0x73a827f0, 0xff6e, 0x11cf, 0xaa, 0x6b, 0x0, 0x80, 0x5f, 0xc, 0x92, 0x32);
  26.  
  27. // {73A827F1-FF6E-11cf-AA6B-00805F0C9232}
  28. DEFINE_GUID(IID_IMprUIPlugin, 
  29. 0x73a827f1, 0xff6e, 0x11cf, 0xaa, 0x6b, 0x0, 0x80, 0x5f, 0xc, 0x92, 0x32);
  30.  
  31. #undef INTERFACE
  32. #define INTERFACE IMprUIHost
  33.  
  34. DECLARE_INTERFACE_(IMprUIHost, IUnknown)
  35. {
  36.   // *** IUnknown methods ***
  37.   STDMETHOD(QueryInterface) (
  38.     THIS_
  39.     REFIID riid,
  40.     LPVOID FAR* ppvObj
  41.     ) PURE;
  42.   
  43.   STDMETHOD_(ULONG,AddRef) (
  44.     THIS
  45.     ) PURE;
  46.   
  47.   STDMETHOD_(ULONG,Release) (
  48.     THIS
  49.     ) PURE;
  50.  
  51.   // *** IMprUIHost methods ***
  52.  
  53.   // Create a floating window for the given control
  54.   //  Use CoTaskMemAlloc to allocate pszTitle
  55.   STDMETHOD(FloatWindow) (
  56.     THIS_
  57.     REFCLSID rguidModule,            // CLSID representing the object
  58.     REFCLSID rclsidCtrl,             // CLSID of Ole Control to create
  59.     IMprUIPlugin* pConnection,       // Plugin in node making request
  60.     DWORD dwContext,                 // constant context passed back to Ole Control
  61.     PWCHAR pszTitle                  // Title of floating window
  62.     ) PURE;
  63.  
  64.   // Force all nodes to be refreshed
  65.   STDMETHOD(GlobalRefresh) (
  66.     THIS
  67.     ) PURE;
  68. };
  69.  
  70. #undef INTERFACE
  71. #define INTERFACE IMprUIPlugin
  72.  
  73. DECLARE_INTERFACE_(IMprUIPlugin, IUnknown)
  74. {
  75.   // *** IUnknown methods ***
  76.   STDMETHOD(QueryInterface) (
  77.     THIS_
  78.     REFIID riid,
  79.     LPVOID FAR* ppvObj
  80.     ) PURE;
  81.   
  82.   STDMETHOD_(ULONG,AddRef) (
  83.     THIS
  84.     ) PURE;
  85.   
  86.   STDMETHOD_(ULONG,Release) (
  87.     THIS
  88.     ) PURE;
  89.  
  90.   // *** IMprUIPlugin Methods ***
  91.   
  92.   // Connect to router.  The plugin module should disconnect from the
  93.   //  router when the IMprUIPlugin is released.
  94.   STDMETHOD(ConnectToRouter) (
  95.     THIS_
  96.     LPCTSTR pRouterName,
  97.     IMprUIHost *pMprUIHost
  98.     ) PURE;
  99.  
  100.   // Returns the text for the given node.
  101.   //  Use CoTaskMemAlloc to allocate memory for ppszTitle
  102.   STDMETHOD(GetTitle) (
  103.     THIS_
  104.     PWSTR*      ppszTitle
  105.     ) PURE;
  106.  
  107.   // Returns a context menu for the given node.
  108.   //  Menu will be destroyed by host.
  109.   STDMETHOD(GetContextMenu) (
  110.     THIS_
  111.     HMENU*      phMenu
  112.     ) PURE;
  113.  
  114.   // Processes the command returned by the context menu
  115.   // There are reserved commands (used to pass down the Hotkeys)
  116.   // such as IDM_HOTKEY_INSERT, IDM_HOTKEY_DELETE, and
  117.   // IDM_HOTKEY_RETURN.  These commands are to be assigned to
  118.   // the appropriate task by the implementor of this interface.
  119.   STDMETHOD(ProcessCommand) (
  120.     THIS_
  121.     WPARAM      wParam,
  122.     LPARAM      lParam,
  123.     HWND        hWndParent
  124.     ) PURE;
  125.  
  126.   // Returns CLSID for the ole control which displays right hand pane
  127.   //  Use CoTaskMemAlloc to allocate space for CLSID*
  128.   STDMETHOD(GetCLSID) (
  129.     THIS_
  130.     CLSID**     ppClsid
  131.     ) PURE;
  132. };
  133.  
  134. #define IDM_HOTKEY_INSERT        (1024)
  135. #define IDM_HOTKEY_DELETE        (1025)
  136. #define IDM_HOTKEY_RETURN        (1026)
  137.  
  138. /* name mangling off */
  139. #ifdef __cplusplus
  140. extern "C" {
  141. #endif
  142.  
  143. typedef DWORD
  144. (APIENTRY* PFNMPRUITRANSPORTCONFIG)(
  145.     IN      HWND        hwndParent,
  146.     IN      LPCWSTR     pwsMachine,
  147.     IN      DWORD       dwTransportId,
  148.     IN      DWORD       dwReserved
  149.     );
  150.  
  151. #define MPRUITRANSPORTCONFIG                    MprUITransportConfig
  152. #define SZMPRUITRANSPORTCONFIG                  "MprUITransportConfig"
  153.  
  154.  
  155. typedef DWORD
  156. (APIENTRY* PFNMPRUIPROTOCOLCONFIG)(
  157.     IN      HWND        hwndParent,
  158.     IN      LPCWSTR     pwsMachine,
  159.     IN      DWORD       dwTransportId,
  160.     IN      DWORD       dwProtocolId,
  161.     IN      DWORD       dwReserved
  162.     );
  163.  
  164. #define MPRUIPROTOCOLCONFIG                     MprUIProtocolConfig
  165. #define SZMPRUIPROTOCOLCONFIG                   "MprUIProtocolConfig"
  166.  
  167.  
  168.  
  169. typedef DWORD
  170. (APIENTRY* PFNMPRUITRANSPORTINTERFACECONFIG)(
  171.     IN      HWND        hwndParent,
  172.     IN      LPCWSTR     pwsMachine,
  173.     IN      LPCWSTR     pwsInterface,
  174.     IN      DWORD       dwIfType,
  175.     IN      DWORD       dwTransportId,
  176.     IN      DWORD       dwReserved
  177.     );
  178.  
  179. #define MPRUITRANSPORTINTERFACECONFIG           MprUITransportInterfaceConfig
  180. #define SZMPRUITRANSPORTINTERFACECONFIG         "MprUITransportInterfaceConfig"
  181.  
  182.  
  183.  
  184. typedef DWORD
  185. (APIENTRY* PFNMPRUIPROTOCOLINTERFACECONFIG)(
  186.     IN      HWND        hwndParent,
  187.     IN      LPCWSTR     pwsMachine,
  188.     IN      LPCWSTR     pwsInterface,
  189.     IN      DWORD       dwIfType,
  190.     IN      DWORD       dwTransportId,
  191.     IN      DWORD       dwProtocolId,
  192.     IN      DWORD       dwReserved
  193.     );
  194.  
  195. #define MPRUIPROTOCOLINTERFACECONFIG            MprUIProtocolInterfaceConfig
  196. #define SZMPRUIPROTOCOLINTERFACECONFIG          "MprUIProtocolInterfaceConfig"
  197.  
  198.  
  199. #ifdef __cplusplus
  200. }
  201. #endif
  202.  
  203. #pragma option pop /*P_O_Pop*/
  204.