ICallFactory::CreateCall method (objidlbase.h)

Creates an instance of the call object that corresponds to a specified asynchronous interface.


HRESULT CreateCall(
  [in]  REFIID   riid,
  [in]  IUnknown *pCtrlUnk,
  [in]  REFIID   riid2,
  [out] IUnknown **ppv


[in] riid

A reference to the identifier for the asynchronous interface.

[in] pCtrlUnk

A pointer to the controlling IUnknown of the call object. If this parameter is not NULL, the call object is aggregated in the specified object. If this parameter is NULL, the call object is not aggregated.

[in] riid2

The identifier of an interface on the call object. Typical values are IID_IUnknown and IID_ISynchronize.

[out] ppv

The address of a pointer to the interface specified by riid2. This parameter cannot be NULL.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.

Return code Description
The call object was created successfully.
The riid parameter does not reference the identifier for the asynchronous interface, such as IID_AsyncIEventSourceCallback.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidlbase.h (include ObjIdl.h)

See also