I'd like to define a struct in typelib definition language to create a typelib.
So far I have a struct and two interfaces:
typedef [uuid(FD68C55A-A933-4c4a-BD26-A1967ABA6F8F), version(1.0)]
struct tagVerbListEntry {
[helpstring("Key")]
BSTR Key;
[helpstring("Description")]
BSTR Description;
} VerbListEntry;
[
odl,
uuid(2EACD14A-E5B4-4236-A9FC-DEFB01464977),
version(1.0),
dual,
nonextensible,
oleautomation
]
interface IDesignObject : IDispatch {
[id(0xfffff447)] HRESULT Activate([in] BSTR pGUID);
[id(0xfffff446)] HRESULT AddControl([in] BSTR ProgID, [in] float PosX, [in] float PosY, [in] float Width, [in] float Height, [out, retval] long* ret);
[id(0xfffff445)] HRESULT FormularSize([in, out] float* Width, [in, out] float* Height);
[id(0x60030001)] HRESULT GetParameter([in] VARIANT ParamType, [out, retval] VARIANT* ret);
[id(0xfffff444)] HRESULT MouseDown([in, out] short* Button, [in, out] short* Shift, [in, out] float* X, [in, out] float* Y);
[id(0xfffff441)] HRESULT Move([in] float Left, [in] float Top, [in] float Width, [in] float Height);
[id(0x68030000), propget] HRESULT Name([out, retval] BSTR* RHS);
[id(0xfffff440), propget] HRESULT NoFormDesigner([out, retval] boolean* RHS);
[id(0xfffff43f), propget] HRESULT ParentName([out, retval] BSTR* RHS);
[id(0xfffff443)] HRESULT MouseMove([in, out] short* Button, [in, out] short* Shift, [in, out] float* X, [in, out] float* Y);
[id(0xfffff442)] HRESULT MouseUp([in, out] float* Button, [in, out] float* Shift, [in, out] float* X, [in, out] float* Y);
[id(0xfffff43e)] HRESULT Save();
[id(0xfffff43c)] HRESULT SetExtendedAttributes([in] long NewAttributes);
[id(0x60030002)] HRESULT SetParameter([in] VARIANT ParamType, [in, out] VARIANT* ParamValue);
};
[
odl,
uuid(4C410B09-B6A7-4754-9BC0-88214F4BE7AC),
version(1.0),
dual,
nonextensible,
oleautomation
]
interface IDesigner : IDispatch {
[id(0x60030001)] HRESULT AfterCreate();
[id(0x60030002)] HRESULT DoVerb([in] BSTR Key, [out, retval] long* Ret);
[id(0x60030003)] HRESULT GetVerbList([in] BSTR LanguageID, [in, out] SAFEARRAY(VerbListEntry)* VerbList, [out, retval] long* Ret);
[id(0x60030004)] HRESULT ImportantMembers([out, retval] _Collection** ret);
[id(0x60030005)] HRESULT ForbiddenBaseElements([out, retval] VARIANT* ret);
[id(0x68030000), propget] HRESULT DefinitionProperties([out, retval] long* ret);
[id(0x60030006)] HRESULT SetDesignMode([in, out] IDesignObject** DesignMaster, [out, retval] boolean* ret);
[id(0x60030007)] HRESULT SetContainerControl([in, out] IDispatch** Container);
[id(0x60030008)] HRESULT DefinitionRefresh([in, out] IDispatch** F, [in, out] IDispatch** ChildList);
};
But when running the compiler I get the message for line
[id(0x60030003)] HRESULT GetVerbList([in] BSTR LanguageID, [in, out] SAFEARRAY(VerbListEntry)*
fatal error M0001: Syntax error near line xx column 100: Type is not OleAutomation-compatible
This is the line with the use of VerbListEntry. What must be done to make the struct ole-compatible?
Please give me help!