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(saAcce ssion, &i, sCar.AllocSysString());
My fuction called is:
m_oRSControlDict->QueryRep ortCreatio nForOrders (saAccessi on, saRelateId, saUnfinishedId,ReportActio n, FailReason);
The error I'm getting is "Cannot convert parameter1 from "SAFEARRAY*" to "SAFEARRAY**"
Anyone have any ideas?
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(saAcce
My fuction called is:
m_oRSControlDict->QueryRep
The error I'm getting is "Cannot convert parameter1 from "SAFEARRAY*" to "SAFEARRAY**"
Anyone have any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agree with expert. The method expects a pointer to a pointer and you are passing in a pointer