getClassName function
Gets the fully qualified name of the Windows Runtime object
.
Implementation
@Deprecated('No replacement')
String getClassName(IInspectable object) {
final hClassName = calloc<HSTRING>();
try {
final hr = (object.ptr.ref.vtable + 4)
.cast<
Pointer<
NativeFunction<
Int32 Function(VTablePointer lpVtbl,
Pointer<IntPtr> className)>>>()
.value
.asFunction<
int Function(
VTablePointer lpVtbl, Pointer<IntPtr> className)>()(
object.ptr.ref.lpVtbl, hClassName);
if (FAILED(hr)) throw WindowsException(hr);
return hClassName.toDartString();
} finally {
WindowsDeleteString(hClassName.value);
free(hClassName);
}
}