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.

223 lines
8.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: lclor.idl
  7. //
  8. // Synopsis: This is the local interface to the object exporter.
  9. //
  10. // Clients can
  11. // Register object ids to be pinged.
  12. // Deregister object ids that no longer need to be pinged.
  13. // Lookup an OXID and register an object id for that OXID.
  14. //
  15. // Servers can
  16. // Register their OXID.
  17. // Register an object id so they receive a death notification.
  18. //
  19. //--------------------------------------------------------------------------
  20. [
  21. uuid(e60c73e6-88f9-11cf-9af1-0020af6e72f4),
  22. version(2.0)
  23. ]
  24. interface ILocalObjectExporter
  25. {
  26. import "obase.idl";
  27. typedef [context_handle] void *PHPROCESS;
  28. //////////////////////////////////////////////////
  29. ////////// Shared client and server APIs
  30. // Client and Server both call this to establish a context handle
  31. // in the local oxid resolver/ping process.
  32. // Security provider list
  33. typedef struct
  34. {
  35. [string,unique] WCHAR* pName;
  36. USHORT wId;
  37. } SECPKG;
  38. // Flags for use in Connect.
  39. const unsigned long CONNECT_DISABLEDCOM = 0x1;
  40. const unsigned long CONNECT_MUTUALAUTH = 0x2;
  41. const unsigned long CONNECT_SECUREREF = 0x4;
  42. const unsigned long CONNECT_CATCH_SERVER_EXCEPTIONS = 0x8;
  43. const unsigned long CONNECT_BREAK_ON_SILENCED_SERVER_EXCEPTIONS = 0x10;
  44. // Bit flags for use in dwFlags param of Connect
  45. const unsigned long CONNECT_FLAGS_64BIT = 0x1;
  46. error_status_t Connect
  47. (
  48. [in] handle_t hServer,
  49. [in,string,unique]
  50. WCHAR *pwszWinstaDesktop,
  51. [in] DWORD procID,
  52. [in] DWORD dwFlags,
  53. [out] PHPROCESS *pProcess,
  54. [out] ULONG *pdwTimeoutInSeconds,
  55. [out] DUALSTRINGARRAY **ppdsaOrBindings,
  56. [out] MID *pLocalMid,
  57. [in] long cIdsToReserve,
  58. [out, ref] ID *pidReservedBase,
  59. [out] DWORD *pfConnectFlags,
  60. [out,string] WCHAR **pLegacySecurity,
  61. [out] DWORD *pAuthnLevel,
  62. [out] DWORD *pImpLevel,
  63. [out] DWORD *pcServerSvc,
  64. [out, size_is(,*pcServerSvc)] USHORT** aServerSvc,
  65. [out] DWORD *pcClientSvc,
  66. [out, size_is(,*pcClientSvc)] SECPKG** aClientSvc,
  67. [out] LONG *pcChannelHook,
  68. [out, size_is(,*pcChannelHook)] GUID **aChannelHook,
  69. [out] DWORD * pProcessID,
  70. [out] DWORD * pScmProcessID,
  71. [out] ULONG64 * pSignature,
  72. [out] GUID* pguidRPCSSProcessIdentifier
  73. );
  74. // Called by local clients to reserve a range of IDs which will
  75. // not conflict with any other local IDs.
  76. error_status_t AllocateReservedIds
  77. (
  78. [in] handle_t hServer,
  79. [in] long cIdsToReserve, // Max of ten will be returned
  80. [out, ref] ID *pidReservedBase
  81. );
  82. // Clients and server of call this to update the state of OID
  83. // they are using.
  84. // Clients may add OIDs to the set of OID in use by their process
  85. // Clients may remove OIDs from those in use by their process
  86. // Servers may free OIDs they allocated but are no longer using.
  87. // Clients may free OXIDs they are no longer using.
  88. typedef struct
  89. {
  90. MID mid;
  91. OXID oxid;
  92. unsigned long refs;
  93. } OXID_REF;
  94. typedef struct
  95. {
  96. MID mid;
  97. OID oid;
  98. } OID_MID_PAIR;
  99. typedef struct
  100. {
  101. MID mid;
  102. OXID oxid;
  103. OID oid;
  104. } OXID_OID_PAIR;
  105. // Returned if at least one OID was not successful added/removed.
  106. const long OR_PARTIAL_UPDATE = 1003L;
  107. error_status_t
  108. BulkUpdateOIDs
  109. (
  110. [in] handle_t hServer,
  111. [in] PHPROCESS phProcess,
  112. [in] unsigned long cOidsToBeAdded, // can be zero
  113. [in, size_is(cOidsToBeAdded)] OXID_OID_PAIR aOidsToBeAdded[],
  114. [out, size_is(cOidsToBeAdded)] long aStatusOfAdds[],
  115. [in] unsigned long cOidsToBeRemoved, // can be zero
  116. [in, size_is(cOidsToBeRemoved)] OID_MID_PAIR aOidsToBeRemoved[],
  117. [in] unsigned long cServerOidsToFree, // can be zero
  118. [in, size_is(cServerOidsToFree)] OID aServerOids[],
  119. [in] unsigned long cServerOidsToUnPin, // can be zero
  120. [in, size_is(cServerOidsToUnPin)] OID aServerOidsToUnPin[],
  121. [in] unsigned long cOxidsToFree, // can be zero
  122. [in, size_is(cOxidsToFree)] OXID_REF aOxidsToFree[]
  123. );
  124. //////////////////////////////////////////////////
  125. ////////// Client specific APIs
  126. // Clients to remote OXIDs call this to lookup the OXID_INFO for an oxid.
  127. // psaRemoteOrBindings - compressed string bindings from the long
  128. // form of the marshalled interface (if any).
  129. // pwstrBindingToServer - expanded string binding to the client which
  130. // passed the IN interface pointer to the server.
  131. error_status_t
  132. ClientResolveOXID
  133. (
  134. [in] handle_t hServer,
  135. [in] PHPROCESS phProcess,
  136. [in, ref] OXID *poxidServer,
  137. // [in, ref] MID *pMidHint,
  138. [in, unique] DUALSTRINGARRAY *pssaServerObjectResolverBindings,
  139. [in] long fApartment,
  140. [out, ref] OXID_INFO *poxidInfo, // Contains a single expanded stringbinding + security bindings
  141. [out] MID *pLocalMidOfRemote,
  142. [out] unsigned short* pAuthnSvc // contains the exact authentication svc used to talk to the server
  143. );
  144. //////////////////////////////////////////////////
  145. //////////////// Server specific APIs
  146. // Called to register an OXID and associated information. The server may
  147. // simultaneously register a number of OIDs.
  148. error_status_t
  149. ServerAllocateOXIDAndOIDs
  150. (
  151. [in] handle_t hServer,
  152. [in] PHPROCESS phProcess,
  153. [out, ref] OXID *poxidServer,
  154. [in] long fApartment,
  155. [in] unsigned long cOids,
  156. [out, size_is(cOids)] OID aOid[],
  157. [out] unsigned long *pcOidsAllocated,
  158. [in, ref] OXID_INFO *poxidInfo, // no strings
  159. [in, unique] DUALSTRINGARRAY *pdsaStringBindings, // Expanded, NULL if not changed
  160. [in, unique] DUALSTRINGARRAY *pdsaSecurityBindings, // Compressed, NULL if not first OXID for process.
  161. [out] DWORD64 *pdwOrBindingsID, // id of ppdsaOrBindings
  162. [out] DUALSTRINGARRAY **ppdsaOrBindings // if non-NULL, contains up-to-date or bindings
  163. );
  164. // Server calls this to register additional OIDs with the ping server.
  165. error_status_t
  166. ServerAllocateOIDs
  167. (
  168. [in] handle_t hServer,
  169. [in] PHPROCESS phProcess,
  170. [in, ref] OXID *poxidServer,
  171. [in] unsigned long cOidsReturn,
  172. [in, size_is(cOidsReturn)] OID aOidsReturn[],
  173. [in] unsigned long cOidsAlloc,
  174. [out, size_is(cOidsAlloc)] OID aOidsAlloc[],
  175. [out] unsigned long *pcOidsAllocated
  176. );
  177. // Called when a particular OXID is being removed. This is only
  178. // necessary if the server may continue running but is destroying
  179. // a thead (apartment model) or is unloading com.
  180. // The unused oids are used as a hint for cleaning up object resolver
  181. // faster.
  182. error_status_t ServerFreeOXIDAndOIDs
  183. (
  184. [in] handle_t hServer,
  185. [in] PHPROCESS phProcess,
  186. [in] OXID oxidServer,
  187. [in] unsigned long cOids,
  188. [in, size_is(cOids)] OID aOids[]
  189. );
  190. }