I declared a structure in atl com dll's idl file as below:
typedef struct _mystruct{
char mydata[10];
int num;
}MySturct;
I could use this structure in vc client. But, not in vb client. How to
achieve this?
thanks in advance.
Regards,
Jjoohhnn.
It should work you need to provide more information on why you "can't use it
in vb client"?
In the meantime here are several issues ...
A C/C++ int is a VB Long, not a VB Integer. This can occasionally causes
surprises.
Note you are declaring a 'fixed string'. VB defaults to dynamic strings,
thus not appreciating the difference can also lead to surprises.
The underscore could be a problem. VB does not recognize a valid name if it
is the leading char. But you can get around this by delimiting (or
'escaping') the identifier with square brackets with in VB, eg
"[_mystruct]". But should not be a problem as you have typedef'd it to be
"MyStruct" which is a legal VB identity.
Where are you publishing it? For use with VB it must be within a published
interface or library.
Are other items in this typelib working correctly? Or is this as far as you
got?
-ralph
Thank you. It's working fine.
Regards,
jjoohhnn.
"Ralph" <nt_cons...@yahoo.com> wrote in message
news:O0E4M8cw...@TK2MSFTNGP06.phx.gbl...