Condividi tramite


DirectSound Return Values

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

This section provides a brief explanation of the various error codes that can be returned by DirectSound methods.

For a partial list of the specific codes that each method can return, see the individual method descriptions.

Note

The lists of error codes in method descriptions are not necessarily comprehensive. Applications should always check for method failure and not just for specific codes. For example, most methods can return DSERR_NODRIVER if the driver is removed while the application is running, or DSERR_OUTOFMEMORY if no more memory is available for operations.

Error codes are presented in the following sections: