Hi,

First of all, I do not know where to post the question in subcategory.

My question is that I have C++ function which has a IDispatch input as argument.

I am trying to read the struct from IDispatch.

So basically, the struct definition is

struct MyStruct
{
void *m_pValue;
};


I can get the ITypeInfo and read the whole structure definition from it.

But I do not know how to read the struct instance value.

I am dumping all the info from ITypeInfo


TYPEATTR
========
guid {A1CB710C-8D50-3181-BB38-65CE2E98F9A6} _GUID
lcid 0x00000000 unsigned long
dwReserved 0x00000000 unsigned long
memidConstructor 0xffffffff long
memidDestructor 0xffffffff long
lpstrSchema 0x00000000 <NULL> wchar_t *
cbSizeInstance 0x00000004 unsigned long
typekind TKIND_RECORD (0x00000001) tagTYPEKIND
cFuncs 0x0000 unsigned short
cVars 0x0001 unsigned short
cImplTypes 0x0000 unsigned short
cbSizeVft 0x0000 unsigned short
cbAlignment 0x0004 unsigned short
wTypeFlags 0x0000 unsigned short
wMajorVerNum 0x0001 unsigned short
wMinorVerNum 0x0000 unsigned short
tdescAlias {lptdesc=0xbaadf00d {lptdesc=??? lpadesc=??? hreftype=??? ...} lpadesc=0xbaadf00d {tdescElem={lptdesc=...} ...} ...} tagTYPEDESC
idldescType {dwReserved=0x00000000 wIDLFlags=0x0000 } tagIDLDESC

VARDESC[0]
==========
memid 0x40000000 long
lpstrSchema 0x00000000 <NULL> wchar_t *
oInst 0x00000000 unsigned long
lpvarValue 0x00000000 <NULL> tagVARIANT *
elemdescVar tagELEMDESC
tdesc tagTYPEDESC
lptdesc 0x003e32f8 tagTYPEDESC *
lptdesc 0x00000000 <NULL> tagTYPEDESC *
lpadesc 0x00000000 <NULL> tagARRAYDESC *
hreftype 0x00000000 unsigned long
vt 0x0018 unsigned short
lpadesc 0x003e32f8 tagARRAYDESC *
hreftype 0x003e32f8 unsigned long
vt 0x001a unsigned short
idldesc {dwReserved=0x00000000 wIDLFlags=0x0000 } tagIDLDESC
paramdesc {pparamdescex=0x00000000 <NULL> wParamFlags=0x0000 } tagPARAMDESC
wVarFlags 0x0000 unsigned short
varkind VAR_PERINSTANCE (0x00000000) tagVARKIND



Any help will be highly appreciated.

Regards.