iid_is attribute
The [iid_is] pointer attribute specifies the IID of the COM interface pointed to by an interface pointer.
[ iid_is(limited-expression) ]
Parameters
-
limited-expression
-
Specifies a C-language expression. The MIDL compiler supports conditional expressions, logical expressions, relational expressions, and arithmetic expressions. MIDL does not allow function invocations in expressions and does not allow increment and decrement operators.
Remarks
You can use [iid_is] in attribute lists for function parameters and for structure or union members. The stubs use the IID to determine how to marshal the interface pointer. This is useful for an interface pointer that is typed as a base class parameter.
Files that use the [iid_is] attribute must be compiled with the MIDL compiler in default mode, that is not using the /osf switch.
Examples
HRESULT CreateInstance(
[in] REFIID riid,
[out, iid_is(riid)] IUnknown ** ppvObject);
See also