ISCMtoSCM::ActivationRequest

HRESULT ISCMtoSCM::ActivationRequest(hRpc, orpcthis, orpcthat, rclsid, pwszObjectName, clsctx, grfMode, dwCount, pIIDs, ppInterfaces, pResults);

This single method encapsulates several different forms of activating and instantiating objects on the computer of this SCM.

When pIIDs is NULL, this function behaves roughly as CoGetClassObject(rclsid, clsctx, NULL, IID_IClassFactory, . . . ), returning a class-object to the caller.

When pwszObjectName and pObjectStorage are NULL, this function behaves roughly as CoCreateInstanceEx(rclsid, NULL, clsctx, . . . ).

Otherwise, this function acts roughly similar to CreateFileMoniker(pwszObjectName, . . . ) followed by IMoniker::BindToObject( . . . ) to retrieve the required interfaces.

Argument

Type

Description


hRpc

handle_t

An RPC binding handle used to make the request.

orpcthis

ORPCTHIS*

ORPCTHIS identifying this object.

orpcthat

ORPCTHAT*

ORPCTHAT holding return values.

rclsid

CLSID*

Identifies the class to be run to service the request.

pwszObjectName

WCHAR*

Identifies the persistent representation of the object to this computer. Typically, this is a file name which is used to determine the class, as in CreateFileMoniker(pwszFileName, &pmk) followed by BindMoniker(pmk . . . ).

clsctx

DWORD

Values taken from the CLSCTX enumeration.

grfMode

DWORD

Values taken from the STGM enumeration.

dwCount

DWORD

The number of interfaces to return.

pIIDs

IID*

An array of interfaces to QueryInterface for on the new object.

ppInterfaces

OBJREF**

Location to return an array of interfaces on the object.

pResults

HRESULT*

Location to return an array of return codes about the successful retrieval of each of the dwCount interfaces.


Return Value

Meaning


S_OK

Success.

CO_S_NOTALLINTERFACES

Some but not all of the dwCount interfaces were returned in ppInterfaceData. Examine pResults to identify exactly which [[interf