Some on Docs mentioned errorcodes are not in the latest SDK.

Tony 96 Reputation points
2020-10-15T18:19:25.993+00:00

Hi,

While working om WASAPI, I noticed some error result codes from the AudioClient are documented on Docs but not present in the latest SDK.

These are:

AUDCLNT_E_INVALIDTYPE and AUDCLNT_E_DEVICEINVALIDATED.

And which headerfile should contain the AudioClient result codes?
As I understand these should be in AudioClient.h, but they are not.

Also using the Microsoft Error Lookup Tool (Err_6.4.5.exe) does not recognise the 1st 2 codes, and reports all others should be in AudioClient.h.

Thank you.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,502 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rita Han - MSFT 2,161 Reputation points
    2020-10-16T01:09:02.123+00:00

    Hello @Tony ,

    Could you show the document link of AUDCLNT_E_INVALIDTYPE because I didn't find it.

    For AUDCLNT_E_DEVICEINVALIDATED, I can find it in the document of IAudioClient2::GetBufferSizeLimits(). There is a AUDCLNT_E_DEVICE_INVALIDATED defined in AudioClient.h. So it seems the document needs some update to correct it. Thanks for reporting this. I'll report an issue internally.

    Thank you!

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tony 96 Reputation points
    2020-10-16T09:45:17.877+00:00

    Hello @RitaHan=MSFT

    On Docs this has been corrected after pointing this out (Is this page helpful?) (IAudioClient::IsFormatSupported method)

    The wrong definitions are still present in the latest audioclient.idl (SDK 10.0.19041.0)

    line
    108
    interface IAudioClient : IUnknown
    // ...
    // Return values:
    //
    // ...
    189 // AUDCLNT_E_DEVICEINVALIDATED, if WAS device was removed.

    line
    350
    // Return Values:
    //
    // S_OK if format is supported.
    // S_FALSE if input format is not supported but ppClosestMatch is.
    // E_POINTER if ppClosestMatch is NULL & AUDCLNT_SHAREMODE_SHARED.
    355 // AUDCLNT_E_INVALIDTYPE if type isn't supported.
    356 // AUDCLNT_E_DEVICEINVALIDATED if WAS device was removed.
    // ...
    HRESULT IsFormatSupported(

    Thank you.

    0 comments No comments