ICallFactory::CreateCall method (objidl.h)

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

Syntax

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

Parameters

[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, and the riid2 parameter must be IID_IUnknown. 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
S_OK
The call object was created successfully.
E_NOINTERFACE
The riid parameter does not reference the identifier for the asynchronous interface, such as IID_AsyncIEventSourceCallback.

Requirements

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

See also

ICallFactory