Resources | Resources |



IDL interface references in C++

IDL interface references are mapped to C++ pointers. A parameter of IDL type IFoo will be mapped to a parameter in C++ of type IFoo*. When a rout or inrout parameter is of interface type, an extra level of indirection is needed, and the parameter will be passed as a double pointer (IFoo**).

Interface references in C++ may be NULL unless qualified with notnil in the original IDL, in which case they must not be NULL. Since C++ does not have a notion of a non-NULL pointer , an interface reference qualified with notnil is mapped in exactly the same way as an unqualified interface reference, except for the /NOT NULL/ comment inserted before the reference to alert readers to this additional requirement. The validity (notnil-ness) of a notnil interface reference is guaranteed by the stub and skeleton, but no guarantees can be made for a direct invocation.