Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function queries a specified waveform device to determine its capabilities.
Syntax
MMRESULT waveOutGetDevCaps( UINT uDeviceID, LPWAVEOUTCAPS pwoc, UINT cbwoc ); |
Parameters
- uDeviceID
-
Identifier of the waveform-audio output device. It can be either a device identifier or a Handle to an open waveform-audio output device.
- pwoc
-
Pointer to a WAVEOUTCAPSstructure to be filled with information about the capabilities of the device.
- cbwoc
-
Size, in bytes, of the WAVEOUTCAPSstructure.
Return Value
One of the values described in the following table is returned.
Value | Description |
---|---|
MMSYSERR_NOERROR |
Success. |
MMSYSERR_INVALHANDLE |
Specified device handle is invalid. |
MMSYSERR_NODRIVER |
No device driver is present. |
MMSYSERR_BADDEVICEID |
uDeviceIDis invalid. |
MMSYSERR_NOMEM |
Unable to allocate or lock memory. |
Remarks
Use the waveOutGetNumDevsfunction to determine the number of waveform-audio output devices present in the system. If the value specified by the uDeviceIDparameter is a device identifier, it can vary from zero to one less than the number of devices present. The WAVE_MAPPER constant can also be used as a device identifier. Only cbwocbytes (or less) of information is copied to the location pointed to by pwoc. If cbwocis zero, nothing is copied and the function returns zero.
You can determine which of the standard audio formats a driver supports by examining the contents of WAVEOUTCAPS.dwFormats. To determine whether a driver supports a particular format that is not explicitly described by the WAVEOUTCAPS, call waveOutOpenand specify the audio format and the WAVE_FORMAT_QUERY flag. If the device does not support the format, it will return WAVERR_BADFORMAT.
Requirements
Header | mmsystem.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |