The parameter of the procedure in the DLL is an integer array, which showed in VB is "Dim Buffer(9) As Integer". However, when it was imported in VC, the parameter was changed into "SAFEARRAY * * Buffer".
SAFEARRAY is a structure.
BOOL ReadUO(long Index, SAFEARRAY * * Buffer, long Count)
static BYTE parms = VTS_I4 VTS_UNKNOWN VTS_I4 ;
InvokeHelper(0x60030015, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, Index, Buffer, Count);
My code is as follows:
long UOIndex = 1;
long Count = 10;
COleSafeArray *pSA_Buffer = new COleSafeArray((LPCSAFEARRAY)Buffer, VT_R4);
this->m_pCore->ReadUO(UOIndex, (SAFEARRAY **)&pSA_Buffer, Count);
But I was failed when constructure the COleSafeArray object.
== blueeyesblue ==