hi, why i have this error? there's my code:

Qt Code:
  1. ao.setControl("geometry.geometryenvironment");
  2.  
  3. IGeometryEnvironmentPtr ipGeoEnviron(CLSID_GeometryEnvironment);
  4. IGeometryFactory2Ptr ipGeomFact(ipGeoEnviron);
  5.  
  6. ao.queryInterface(IID_IGeometryFactory2,(void**)&ipGeomFact);
  7.  
  8. IGeometryPtr ipGeom;
  9.  
  10. QVariant value = query.value(0);
  11.  
  12. if (ipGeomFact){
  13. long bytesRead;
  14. if (ipGeomFact->CreateGeometryFromWkbVariant(value, &ipGeom, &bytesRead)))
  15. }
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:

Qt Code:
  1. HRESULT CreateGeometryFromWkbVariant(
  2. VARIANT wkb,
  3. IGeometry** outGeometry,
  4. long* numBytesRead
  5. );
To copy to clipboard, switch view to plain text mode 

so maybe i need to convert QVariant to VARIANT, but how?