create method
Implementation
Geopoint create(BasicGeoposition position) {
final retValuePtr = calloc<COMObject>();
final hr = ptr.ref.vtable
.elementAt(6)
.cast<
Pointer<
NativeFunction<
HRESULT Function(Pointer, BasicGeoposition position,
Pointer<COMObject>)>>>()
.value
.asFunction<
int Function(Pointer, BasicGeoposition position,
Pointer<COMObject>)>()(ptr.ref.lpVtbl, position, retValuePtr);
if (FAILED(hr)) {
free(retValuePtr);
throw WindowsException(hr);
}
return Geopoint.fromRawPointer(retValuePtr);
}