2.2.17 iid_is IDL Attribute

iid_is IDL Attribute is an IDL extension that specifies the uuid ([C706] section 4.2.4.1) of an interface type method parameter.

An interface type parameter attributed with iid_is MUST be marshaled as an MInterfacePointer containing an OBJREF instance with its iid field set to the value of uuid.

When unmarshaling an interface type parameter attributed with iid_is, the implementation of target level 5.0 Correlation Validation extensions, as specified in [MS-RPCE] section 3.1.1.5.3.2, SHOULD validate that the iid specified in the OBJREF is equal to the uuid specified by the iid_is attribute. If different, the implementation MUST indicate that the octet stream is invalid, as specified in [MS-RPCE] section 3.1.2.5.1 and [MS-RPCE] section 3.1.3.5.2.

See the following for an example.

 HRESULT CreateInstance([in]REFIID riid, 
                  [out, iid_is(riid)]Iunknown** ppUnknown);
  
  

In this example, the client MUST pass the uuid of the interface parameter, ppUnknown, in the riid parameter. When returning a successful result, the server MUST marshal the ppUnknown parameter as an MInterfacePointer containing an OBJREF instance with its iid field set to the value of riid.