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