loh
16th July 2008, 00:07
hi, why i have this error? there's my code:
QAxObject ao;
ao.setControl("geometry.geometryenvironment");
IGeometryEnvironmentPtr ipGeoEnviron(CLSID_GeometryEnvironment);
IGeometryFactory2Ptr ipGeomFact(ipGeoEnviron);
ao.queryInterface(IID_IGeometryFactory2,(void**)&ipGeomFact);
IGeometryPtr ipGeom;
QVariant value = query.value(0);
if (ipGeomFact){
long bytesRead;
if (ipGeomFact->CreateGeometryFromWkbVariant(value, &ipGeom, &bytesRead)))
}
VARIANT type is supported COM datataype, but as i understand it's supported only with calling methods using dynamicCall, i cant use dynamicCall because there's parameters of unsupported datatypes in CreateGeometryFromWkbVariant function:
HRESULT CreateGeometryFromWkbVariant(
VARIANT wkb,
IGeometry** outGeometry,
long* numBytesRead
);
so maybe i need to convert QVariant to VARIANT, but how?
QAxObject ao;
ao.setControl("geometry.geometryenvironment");
IGeometryEnvironmentPtr ipGeoEnviron(CLSID_GeometryEnvironment);
IGeometryFactory2Ptr ipGeomFact(ipGeoEnviron);
ao.queryInterface(IID_IGeometryFactory2,(void**)&ipGeomFact);
IGeometryPtr ipGeom;
QVariant value = query.value(0);
if (ipGeomFact){
long bytesRead;
if (ipGeomFact->CreateGeometryFromWkbVariant(value, &ipGeom, &bytesRead)))
}
VARIANT type is supported COM datataype, but as i understand it's supported only with calling methods using dynamicCall, i cant use dynamicCall because there's parameters of unsupported datatypes in CreateGeometryFromWkbVariant function:
HRESULT CreateGeometryFromWkbVariant(
VARIANT wkb,
IGeometry** outGeometry,
long* numBytesRead
);
so maybe i need to convert QVariant to VARIANT, but how?