getCurrent method

Throws a WindowsException on failure.

Implementation

IAppxManifestTargetDeviceFamily? getCurrent() {
  final targetDeviceFamily = adaptiveCalloc<VTablePointer>();
  final hr$ = HRESULT(_GetCurrentFn(ptr, targetDeviceFamily));
  if (hr$.isError) {
    free(targetDeviceFamily);
    throw WindowsException(hr$);
  }
  final result$ = targetDeviceFamily.value;
  free(targetDeviceFamily);
  if (result$.isNull) return null;
  return .new(result$);
}