Link to home
Start Free TrialLog in
Avatar of peterviau
peterviau

asked on

Safearray problem c++

I'm trying to call a function that requires safearrays as parameters.
I declared the safearray as such:
CString sCar;
sCar = "102559"
SAFEARRAY  *saAccession = NULL;
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 1
saAccession = SafeArrayCreate(VT_BSTR, 1, rgsabound);
hresult = SafeArrayPutElement(saAccession, &i, sCar.AllocSysString());
My fuction called is:
m_oRSControlDict->QueryReportCreationForOrders(saAccession, saRelateId, saUnfinishedId,ReportAction, FailReason);

The error I'm getting is "Cannot convert parameter1 from "SAFEARRAY*" to "SAFEARRAY**"

Anyone have any ideas?


ASKER CERTIFIED SOLUTION
Avatar of themrrobert
themrrobert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Agree with expert. The method expects a pointer to a pointer and you are passing in a pointer