I think I did not pose the problem correctly. The implementation of interfaces by co-class is well-known. The co-class can initialize itself and its method implementation can validate interface inputs etc. However, I am talking of structure data types in IDL which are used in interface methods. e.g.
Interface I{
typedef struct S{
data_type1 m1;
data_type2 m2;
};
HRESULT Method([in] S s, [out]IObject *pObject);
};
The structure S is not available with me in C++ header/source files.
It cannot have constructor. Hence, when user creates an instance of S, and uses the interface method I::Method, the I::Method cannot be sure of what all members of S have been initialized by the user and what have not been?
The unitilized members of instance of S can have junk values which I::Method cannot understand? The programmer's problem is how to provide default initialiation of S?