ICallFactory::CreateCall method (objidlbase.h)

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

Syntax

HRESULT CreateCall(
  REFIID   riid,
  IUnknown *pCtrlUnk,
  REFIID   riid2,
  IUnknown **ppv
);

Parameters

riid

A reference to the identifier for the asynchronous interface.

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.

riid2

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

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

   
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

ICallFactory