IID_PPV_ARGS macro (combaseapi.h)
Used to retrieve an interface pointer, supplying the IID value of the requested interface automatically based on the type of the interface pointer used. This avoids a common coding error by checking the type of the value passed at compile time.
void IID_PPV_ARGS( ppType );
An address of an interface pointer whose type T is used to determine the type of object being requested. The macro returns the interface pointer through this parameter.
- An [in] parameter, normally of type REFIID, to specify the IID of the interface to retrieve.
- An [out] parameter, normally of type void**, to receive the interface pointer.
While Windows 7 is the first inclusion of this macro in a public header, it can be used on older systems by defining it manually in your project headers or source code.
The following example shows the use of IID_PPV_ARGS to create the memory property store object using IPropertyStore.
IPropertyStore *pPropertyStore; CoCreateInstance(CLSID_PropertyStore, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pPropertyStore));
|Minimum supported client||Windows 7 [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|