NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2348

'type name' : illegal type in embedded-IDL

To place a struct in a .idl file with the export attribute, the struct must contain only data.

The following code shows how this error could occur because variables of type _bstr_t and _variant_t have contructors.

#include <comdef.h>

[emitidl];
[ module(name="SimpleMidlTest", uuid="38f23b6e-2721-11d2-a97e-00c04fa37ddb", version=1.0) ];

[export]
struct SomeStruct {
   DWORD m_dword;
   _bstr_t m_bstring;
   _variant_t m_var;
};

__interface IMyInterface {
   HRESULT func([in, out] stuff *pStuff);
};