getAudioOutputs method

ISpeechObjectTokens? getAudioOutputs(
  1. BSTR requiredAttributes,
  2. BSTR optionalAttributes
)

Throws a WindowsException on failure.

Implementation

ISpeechObjectTokens? getAudioOutputs(
  BSTR requiredAttributes,
  BSTR optionalAttributes,
) {
  final objectTokens = adaptiveCalloc<VTablePointer>();
  final hr$ = HRESULT(
    _GetAudioOutputsFn(
      ptr,
      requiredAttributes,
      optionalAttributes,
      objectTokens,
    ),
  );
  if (hr$.isError) {
    free(objectTokens);
    throw WindowsException(hr$);
  }
  final result$ = objectTokens.value;
  free(objectTokens);
  if (result$.isNull) return null;
  return ISpeechObjectTokens(result$);
}