NTSTATUS
SoundCreateDevice(
IN PCSOUND_DEVICE_INIT DeviceInit,
IN UCHAR CreationFlags,
IN PDRIVER_OBJECT pDriverObject,
IN PVOID pGDI,
IN PVOID DeviceSpecificData,
IN PVOID pHw,
IN int i,
OUT PDEVICE_OBJECT *ppDevObj
);
The SoundCreateDevice function creates a device object and an associated LOCAL_DEVICE_INFO structure.
Flag |
Definition |
SOUND_CREATION_NO_NAME_RANGE |
Don’t append number to name prototype when creating device name. |
SOUND_CREATION_NO_VOLUME |
Volume setting not supported. |
Structure |
Usage |
For waveform devices | |
For MIDI devices | |
For mixer devices | |
NULL |
For other devices |
Returns STATUS_SUCCESS if device creation succeeds. Returns STATUS_INSUFFICIENT_RESOURCES if device creation fails.
The SOUND_DEVICE_INIT structure must be nonpaged.
The SoundCreateDevice function creates a device object by calling IoCreateDevice. If the object creation succeeds, the function returns the address of a DEVICE_OBJECT structure. The function also allocates a LOCAL_DEVICE_INFO structure and assigns its address to the DeviceExtension member of the DEVICE_OBJECT structure.
The function calls IoCreateSymbolicLink to map the NT generic name for the device object to the corresponding Win32 logical name.
For more information about device objects, see the Kernel-Mode Drivers Design Guide.