waveOutGetDevCapsEx(3mms) — Subroutines
Name
waveOutGetDevCapsEx --- Query the specified waveform audio output device to determine its capabilities and its supported standard formats
Syntax
#include <mme/mme_api.h>
MMRESULT waveOutGetDevCapsEx(UINT uDeviceID,
LPWAVEOUTCAPS lpCaps,
UINT uSize);
Arguments
UINT uDeviceID
Identifies the waveform audio output device to query. Use a valid waveform audio output device ID or the WAVE_MAPPER constant.
LPWAVEOUTCAPS lpCaps
Specifies a pointer to a WAVEOUTCAPS data structure. This data structure is filled with information about the capabilities of the device.
The WAVEOUTCAPS data structure must be allocated with the mmeAllocMem function before being passed to the waveOutGetDevCapsEx function. See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
UINT uSize
Specifies the size, in bytes, of the WAVEOUTCAPS data structure.
Description
The waveOutGetDevCapsEx function queries the specified waveform audio output device to determine its capabilities. The device ID specified by the uDeviceID argument varies from zero to one fewer than the number of devices present. Use the waveOutGetNumDevs function to determine the number of waveform output devices present in the system.
Only uSize bytes (or fewer) of information is copied to the location pointed to by the lpCaps argument. If uSize is zero, nothing is copied and the function returns the MMSYSERR_NOERROR error code.
The waveOutGetDevCapsEx function will always return all standard formats supported by the device.
The dwFormat field of the WAVEOUTCAPS data structure will return all the standard formats supported by the device. See Chapter 3 of the Programmer’s Guide for more information about specifying this waveform audio format.
Extensions
The waveOutGetDevCapsEx function is a Digital extension to the Microsoft multimedia API specification.
Return Values
Returns MMSYSERR_NOERROR if the function is successful; otherwise, it returns one of the following error codes:
MMSYSERR_BADDEVICEID@T{ The specified device ID is out of range. T} MMSYSERR_NODRIVER@T{ No waveOut driver is installed. T} MMSYSERR_INVALPARAM@T{ The size of the WAVEOUTCAPS data structure is invalid. T}