createToastNotifierWithId method
Implementation
Pointer<COMObject> createToastNotifierWithId(String applicationId) {
final retValuePtr = calloc<COMObject>();
final applicationIdHstring = convertToHString(applicationId);
final hr = ptr.ref.vtable
.elementAt(7)
.cast<
Pointer<
NativeFunction<
HRESULT Function(Pointer, IntPtr applicationId,
Pointer<COMObject>)>>>()
.value
.asFunction<
int Function(Pointer, int applicationId, Pointer<COMObject>)>()(
ptr.ref.lpVtbl, applicationIdHstring, retValuePtr);
if (FAILED(hr)) {
free(retValuePtr);
throw WindowsException(hr);
}
WindowsDeleteString(applicationIdHstring);
return retValuePtr;
}