getName method
Gets the name of the package on which the current package has a dependency.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/appxpackaging/nf-appxpackaging-iappxmanifestpackagedependency-getname.
Implementation
PWSTR getName() {
final name = adaptiveCalloc<Pointer<Utf16>>();
final hr$ = HRESULT(_GetNameFn(ptr, name));
if (hr$.isError) {
free(name);
throw WindowsException(hr$);
}
final result$ = name.value;
free(name);
return .new(result$);
}