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.

202 lines
4.9 KiB

  1. typedef unsigned long RPCOLEDATAREP;
  2. typedef enum tagRPCFLG
  3. {
  4. RPCFLG_ASYNCHRONOUS = 1073741824,
  5. RPCFLG_INPUT_SYNCHRONOUS = 536870912
  6. }
  7. RPCFLG;
  8. typedef struct tagRPCOLEMESSAGE
  9. {
  10. void *reserved1;
  11. RPCOLEDATAREP dataRepresentation;
  12. void *Buffer;
  13. ULONG cbBuffer;
  14. ULONG iMethod;
  15. DWORD reserved2[5];
  16. ULONG rpcFlags;
  17. }
  18. RPCOLEMESSAGE;
  19. typedef RPCOLEMESSAGE *PRPCOLEMESSAGE;
  20. interface IRpcChannelBuffer : public IUnknown
  21. {
  22. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  23. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  24. STDMETHOD_(ULONG,Release) (THIS) PURE;
  25. virtual HRESULT STDMETHODCALLTYPE GetBuffer
  26. (
  27. RPCOLEMESSAGE *pMessage,
  28. REFIID riid
  29. ) = 0;
  30. virtual HRESULT STDMETHODCALLTYPE SendReceive
  31. (
  32. RPCOLEMESSAGE *pMessage,
  33. ULONG *pStatus
  34. ) = 0;
  35. virtual HRESULT STDMETHODCALLTYPE FreeBuffer
  36. (
  37. RPCOLEMESSAGE *pMessage
  38. ) = 0;
  39. virtual HRESULT STDMETHODCALLTYPE GetDestCtx
  40. (
  41. DWORD *pdwDestContext,
  42. void **ppvDestContext
  43. ) = 0;
  44. virtual HRESULT STDMETHODCALLTYPE IsConnected
  45. (
  46. void
  47. ) = 0;
  48. };
  49. interface IRpcProxyBuffer : public IUnknown
  50. {
  51. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  52. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  53. STDMETHOD_(ULONG,Release) (THIS) PURE;
  54. virtual HRESULT STDMETHODCALLTYPE Connect
  55. (
  56. IRpcChannelBuffer *pRpcChannelBuffer
  57. ) = 0;
  58. virtual void STDMETHODCALLTYPE Disconnect
  59. (
  60. void
  61. ) = 0;
  62. };
  63. interface IRpcStubBuffer : public IUnknown
  64. {
  65. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  66. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  67. STDMETHOD_(ULONG,Release) (THIS) PURE;
  68. virtual HRESULT STDMETHODCALLTYPE Connect
  69. (
  70. IUnknown *pUnkServer
  71. ) = 0;
  72. virtual void STDMETHODCALLTYPE Disconnect
  73. (
  74. void
  75. ) = 0;
  76. virtual HRESULT STDMETHODCALLTYPE Invoke
  77. (
  78. RPCOLEMESSAGE *_prpcmsg,
  79. IRpcChannelBuffer *_pRpcChannelBuffer
  80. ) = 0;
  81. virtual IRpcStubBuffer FAR *STDMETHODCALLTYPE IsIIDSupported
  82. (
  83. REFIID riid
  84. ) = 0;
  85. virtual ULONG STDMETHODCALLTYPE CountRefs
  86. (
  87. void
  88. ) = 0;
  89. virtual HRESULT STDMETHODCALLTYPE DebugServerQueryInterface
  90. (
  91. IUnknown **ppunk
  92. ) = 0;
  93. virtual void STDMETHODCALLTYPE DebugServerRelease
  94. (
  95. void *pv
  96. ) = 0;
  97. };
  98. interface IPSFactoryBuffer : public IUnknown
  99. {
  100. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  101. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  102. STDMETHOD_(ULONG,Release) (THIS) PURE;
  103. virtual HRESULT STDMETHODCALLTYPE CreateProxy
  104. (
  105. IUnknown *pUnkOuter,
  106. REFIID riid,
  107. IRpcProxyBuffer **ppProxy,
  108. void **ppv
  109. ) = 0;
  110. virtual HRESULT STDMETHODCALLTYPE CreateStub
  111. (
  112. REFIID riid,
  113. IUnknown *pUnkServer,
  114. IRpcStubBuffer **ppStub
  115. ) = 0;
  116. };
  117. interface IRpcChannel : public IUnknown
  118. {
  119. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  120. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  121. STDMETHOD_(ULONG,Release) (THIS) PURE;
  122. STDMETHOD(GetStream)(REFIID iid, int iMethod, BOOL fSend,
  123. BOOL fNoWait, DWORD size, IStream FAR* FAR* ppIStream) = 0;
  124. STDMETHOD(Call)(IStream FAR* pIStream) = 0;
  125. STDMETHOD(GetDestCtx)(DWORD FAR* lpdwDestCtx, LPVOID FAR* lplpvDestCtx) = 0;
  126. STDMETHOD(IsConnected)(void) = 0;
  127. };
  128. interface IRpcProxy : public IUnknown
  129. {
  130. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  131. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  132. STDMETHOD_(ULONG,Release) (THIS) PURE;
  133. STDMETHOD(Connect)(IRpcChannel FAR* pRpcChannel) = 0;
  134. STDMETHOD_(void, Disconnect)(void) = 0;
  135. };
  136. interface IRpcStub : public IUnknown
  137. {
  138. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  139. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  140. STDMETHOD_(ULONG,Release) (THIS) PURE;
  141. STDMETHOD(Connect)(IUnknown FAR* pUnk) = 0;
  142. STDMETHOD_(void, Disconnect)(void) = 0;
  143. STDMETHOD(Invoke)(REFIID iid, int iMethod, IStream FAR* pIStream,
  144. DWORD dwDestCtx, LPVOID lpvDestCtx) = 0;
  145. STDMETHOD_(BOOL, IsIIDSupported)(REFIID iid) = 0;
  146. STDMETHOD_(ULONG, CountRefs)(void) = 0;
  147. };
  148. interface IPSFactory : public IUnknown
  149. {
  150. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  151. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  152. STDMETHOD_(ULONG,Release) (THIS) PURE;
  153. STDMETHOD(CreateProxy)(IUnknown FAR* pUnkOuter, REFIID riid,
  154. IRpcProxy FAR* FAR* ppProxy, void FAR* FAR* ppv) = 0;
  155. STDMETHOD(CreateStub)(REFIID riid, IUnknown FAR* pUnkServer,
  156. IRpcStub FAR* FAR* ppStub) = 0;
  157. };
  158. STDAPI ReadOleStg
  159. (LPSTORAGE pstg, DWORD FAR* pdwFlags, DWORD FAR* pdwOptUpdate,
  160. DWORD FAR* pdwReserved, LPMONIKER FAR* ppmk, LPSTREAM FAR* ppstmOut);
  161. STDAPI WriteOleStg
  162. (LPSTORAGE pstg, IOleObject FAR* pOleObj,
  163. DWORD dwReserved, LPSTREAM FAR* ppstmOut);
  164. STDAPI CoGetState(IUnknown FAR * FAR *ppunk);
  165. STDAPI CoSetState(IUnknown FAR *punk);