I have the following interface. The interface returns ISystemCmds interface as part of GetSystemCommandInterface method. We are using ATL for creating the COM.
interface IDevice : IDispatch{
[id(1), helpstring("method Connect")] HRESULT Connect([in] VARIANT varPortNo);
[id(2), helpstring("method GetSystemCommandInterface")] HRESULT GetSystemCommandInterface([out,retval] ISystemCmds** pISystemCmd);
};
What code should add (and where) for creating the COM object for ISystemCmds if
a. I am creating the COM object for ISystemCmds as part of COM object creation of IDevice?
b. I am creating the COM object in GetSystemCommandInterface() method?