format method
String
format(
- PhoneNumberInfo number
)
Implementation
String format(PhoneNumberInfo number) {
final retValuePtr = calloc<HSTRING>();
try {
final hr = ptr.ref.vtable
.elementAt(6)
.cast<
Pointer<
NativeFunction<
HRESULT Function(Pointer, Pointer<COMObject> number,
Pointer<IntPtr>)>>>()
.value
.asFunction<
int Function(
Pointer, Pointer<COMObject> number, Pointer<IntPtr>)>()(
ptr.ref.lpVtbl,
number.ptr.cast<Pointer<COMObject>>().value,
retValuePtr);
if (FAILED(hr)) throw WindowsException(hr);
final retValue = retValuePtr.toDartString();
return retValue;
} finally {
WindowsDeleteString(retValuePtr.value);
free(retValuePtr);
}
}