SoundDispatch

NTSTATUS
SoundDispatch(
IN PDEVICE_OBJECT
pDO,
IN PIRP
pIrp
);

The SoundDispatch function is the main dispatcher for IRP function codes within soundlib.lib

Parameters

pDO

Pointer to a device object.

pIrp

Pointer to an IRP.

Return Value

Returns STATUS_SUCCESS if the operation succeeds. Otherwise returns an NTSTATUS error code.

Comments

For more information about device objects and IRPs, see the Kernel-Mode Drivers Design Guide.

Within the DEVICE_OBJECT structure passed to a kernel-mode driver's DriverEntry function, SoundDispatch must be specified as the dispatcher for the following IRP control codes:

·IRP_MJ_CLEANUP

·IRP_MJ_CLOSE

·IRP_MJ_CREATE

·IRP_MJ_DEVICE_CONTROL

·IRP_MJ_READ

·IRP_MJ_WRITE

SoundDispatch does not process the IRPs. Instead, it calls the secondary dispatcher specified as the DispatchRoutine member of the appropriate SOUND_DEVICE_INIT structure. (A pointer to the SOUND_DEVICE_INIT structure is contained in the device object.) Secondary dispatchers provided by soundlib.lib are:

·SoundAuxDispatch

·SoundMidiDispatch

·SoundMixerDispatch

·SoundWaveDispatch