//+------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1992 - 1995. // // File: lclor.idl // // Synopsis: This is the local interface to the object exporter. // // Clients can // Register object ids to be pinged. // Deregister object ids that no longer need to be pinged. // Lookup an OXID and register an object id for that OXID. // // Servers can // Register their OXID. // Register an object id so they receive a death notification. // //-------------------------------------------------------------------------- [ uuid(e60c73e6-88f9-11cf-9af1-0020af6e72f4), version(2.0) ] interface ILocalObjectExporter { import "obase.idl"; typedef [context_handle] void *PHPROCESS; ////////////////////////////////////////////////// ////////// Shared client and server APIs // Client and Server both call this to establish a context handle // in the local oxid resolver/ping process. // Security provider list typedef struct { [string,unique] WCHAR* pName; USHORT wId; } SECPKG; const unsigned long MAX_IDS = 0x20000; // 131072 const unsigned long MAX_OIDS = 0x100000; // 1048576 // Flags for use in Connect. const unsigned long CONNECT_DISABLEDCOM = 0x1; const unsigned long CONNECT_MUTUALAUTH = 0x2; const unsigned long CONNECT_SECUREREF = 0x4; const unsigned long CONNECT_CATCH_SERVER_EXCEPTIONS = 0x8; const unsigned long CONNECT_BREAK_ON_SILENCED_SERVER_EXCEPTIONS = 0x10; error_status_t Connect ( [in] handle_t hServer, [in,string,unique] WCHAR *pwszWinstaDesktop, [out] PHPROCESS *pProcess, [out] ULONG *pdwTimeoutInSeconds, [out] DUALSTRINGARRAY **ppdsaOrBindings, [out] MID *pLocalMid, [in,range(0,MAX_IDS)] ULONG cIdsToReserve, [out,size_is(cIdsToReserve)] ID aIdsReserved[], [out] ULONG *pcIdsReserved, [out] DWORD *pfConnectFlags, [out,string] WCHAR **pLegacySecurity, [out] DWORD *pAuthnLevel, [out] DWORD *pImpLevel, [out] DWORD *pcServerSvc, [out, size_is(,*pcServerSvc)] USHORT** aServerSvc, [out] DWORD *pcClientSvc, [out, size_is(,*pcClientSvc)] SECPKG** aClientSvc, [out] LONG *pcChannelHook, [out, size_is(,*pcChannelHook)] GUID **aChannelHook, [out] DWORD * pProcessID, [out] DWORD * pScmProcessID, [out] ULONG64 * pSignature, [out] GUID* pguidRPCSSProcessIdentifier ); // Called by local clients to reserve a range of IDs which will // not conflict with any other local IDs. error_status_t AllocateReservedIds ( [in] handle_t hServer, [in] PHPROCESS phProcess, [in,range(0,MAX_IDS)] unsigned long cIdsToAlloc, [out, size_is(cIdsToAlloc)] ID aIdsAllocated[], [out] unsigned long *pcIdsAllocated ); // Clients and server of call this to update the state of OID // they are using. // Clients may add OIDs to the set of OID in use by their process // Clients may remove OIDs from those in use by their process // Servers may free OIDs they allocated but are no longer using. // Clients may free OXIDs they are no longer using. typedef struct { MID mid; OXID oxid; unsigned long refs; } OXID_REF; typedef struct { MID mid; OID oid; } OID_MID_PAIR; typedef struct { MID mid; OXID oxid; OID oid; } OXID_OID_PAIR; // Returned if at least one OID was not successful added/removed. const long OR_PARTIAL_UPDATE = 1003L; error_status_t BulkUpdateOIDs ( [in] handle_t hServer, [in] PHPROCESS phProcess, [in,range(0,MAX_OIDS)] unsigned long cOidsToBeAdded, // can be zero [in, size_is(cOidsToBeAdded)] OXID_OID_PAIR aOidsToBeAdded[], [out, size_is(cOidsToBeAdded)] long aStatusOfAdds[], [in,range(0,MAX_OIDS)] unsigned long cOidsToBeRemoved, // can be zero [in, size_is(cOidsToBeRemoved)] OID_MID_PAIR aOidsToBeRemoved[], [in,range(0,MAX_OIDS)] unsigned long cServerOidsToFree, // can be zero [in, size_is(cServerOidsToFree)] OID aServerOids[], [in,range(0,MAX_OIDS)] unsigned long cServerOidsToUnPin, // can be zero [in, size_is(cServerOidsToUnPin)] OID aServerOidsToUnPin[], [in,range(0,MAX_OIDS)] unsigned long cOxidsToFree, // can be zero [in, size_is(cOxidsToFree)] OXID_REF aOxidsToFree[] ); ////////////////////////////////////////////////// ////////// Client specific APIs // Clients to remote OXIDs call this to lookup the OXID_INFO for an oxid. // psaRemoteOrBindings - compressed string bindings from the long // form of the marshalled interface (if any). // pwstrBindingToServer - expanded string binding to the client which // passed the IN interface pointer to the server. error_status_t ClientResolveOXID ( [in] handle_t hServer, [in] PHPROCESS phProcess, [in, ref] OXID *poxidServer, [in, unique] DUALSTRINGARRAY *pssaServerObjectResolverBindings, [in] long fApartment, [out, ref] OXID_INFO *poxidInfo, // Contains a single expanded stringbinding + security bindings [out] MID *pLocalMidOfRemote, [out] unsigned long *pulMarshaledTargetInfoLength, // contains credman credentials, if any [out, size_is(,*pulMarshaledTargetInfoLength)] unsigned char **pucMarshaledTargetInfo, [out] unsigned short* pAuthnSvc // contains the exact authentication svc used to talk to the server ); ////////////////////////////////////////////////// //////////////// Server specific APIs // Called to register an OXID and associated information. The server may // simultaneously register a number of OIDs. error_status_t ServerAllocateOXIDAndOIDs ( [in] handle_t hServer, [in] PHPROCESS phProcess, [out, ref] OXID *poxidServer, [in] long fApartment, [in,range(0,MAX_OIDS)]unsigned long cOids, [out, size_is(cOids)] OID aOid[], [out] unsigned long *pcOidsAllocated, [in, ref] OXID_INFO *poxidInfo, // no strings [in, unique] DUALSTRINGARRAY *pdsaStringBindings, // Expanded, NULL if not changed [in, unique] DUALSTRINGARRAY *pdsaSecurityBindings, // Compressed, NULL if not first OXID for process. [out] DWORD64 *pdwOrBindingsID, // id of ppdsaOrBindings [out] DUALSTRINGARRAY **ppdsaOrBindings // if non-NULL, contains up-to-date or bindings ); // Server calls this to register additional OIDs with the ping server. error_status_t ServerAllocateOIDs ( [in] handle_t hServer, [in] PHPROCESS phProcess, [in, ref] OXID *poxidServer, [in,range(0,MAX_OIDS)]unsigned long cOidsReturn, [in, size_is(cOidsReturn)] OID aOidsReturn[], [in,range(0,MAX_OIDS)]unsigned long cOidsAlloc, [out, size_is(cOidsAlloc)] OID aOidsAlloc[], [out] unsigned long *pcOidsAllocated ); // Called when a particular OXID is being removed. This is only // necessary if the server may continue running but is destroying // a thead (apartment model) or is unloading com. // The unused oids are used as a hint for cleaning up object resolver // faster. error_status_t ServerFreeOXIDAndOIDs ( [in] handle_t hServer, [in] PHPROCESS phProcess, [in] OXID oxidServer, [in,range(0,MAX_OIDS)]unsigned long cOids, [in, size_is(cOids)] OID aOids[] ); // Called when a particular process is completely uninitializing // COM. error_status_t Disconnect( [in] handle_t hClient, [in,out] PHPROCESS* pphProcess ); }