Defining struct in IDL File (ATL/COM)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<pre> typedef struct
{
int i;
char * strName;
}MYSTRUCT;
interface ITestATL1 : IDispatch
{
[propget, id(1), helpstring("property Value1")] HRESULT Value1([out, retval] MYSTRUCT *pVal);
[propput, id(1), helpstring("property Value1")] HRESULT Value1([in] MYSTRUCT newVal);
};[/code]
I have to use structure (struct) as a property how can i do this?<br/><br/>but above code gives me following error <br/>
<pre>error MIDL2025 : syntax error : expecting a type specification near "MYSTRUCT"[/code]
<br/><br/><br/>  <hr class="sig Kishore

View the full article
 
Back
Top