hi, why i have this error? there's my code:
ao.setControl("geometry.geometryenvironment");
IGeometryEnvironmentPtr ipGeoEnviron(CLSID_GeometryEnvironment);
IGeometryFactory2Ptr ipGeomFact(ipGeoEnviron);
ao.queryInterface(IID_IGeometryFactory2,(void**)&ipGeomFact);
IGeometryPtr ipGeom;
if (ipGeomFact){
long bytesRead;
if (ipGeomFact->CreateGeometryFromWkbVariant(value, &ipGeom, &bytesRead)))
}
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)))
}
To copy to clipboard, switch view to plain text mode
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
);
HRESULT CreateGeometryFromWkbVariant(
VARIANT wkb,
IGeometry** outGeometry,
long* numBytesRead
);
To copy to clipboard, switch view to plain text mode
so maybe i need to convert QVariant to VARIANT, but how?
Bookmarks