getArchitecture method
Gets the processor architecture as defined in the manifest.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/appxpackaging/nf-appxpackaging-iappxmanifestpackageid-getarchitecture.
Implementation
APPX_PACKAGE_ARCHITECTURE getArchitecture() {
final architecture = adaptiveCalloc<Int32>();
final hr$ = HRESULT(_GetArchitectureFn(ptr, architecture));
if (hr$.isError) {
free(architecture);
throw WindowsException(hr$);
}
final result$ = architecture.value;
free(architecture);
return .new(result$);
}