typedef struct _LOCAL_DEVICE_INFO {
ULONG Key;
#define LDI_WAVE_IN_KEY (*(ULONG *)"LDWi")
#define LDI_WAVE_OUT_KEY (*(ULONG *)"LDWo")
#define LDI_MIDI_IN_KEY (*(ULONG *)"LDMi")
#define LDI_MIDI_OUT_KEY (*(ULONG *)"LDMo")
#define LDI_AUX_KEY (*(ULONG *)"LDAx")
#define LDI_MIX_KEY (*(ULONG *)"LDMx")
PVOID pGlobalInfo;
UCHAR DeviceType;
UCHAR DeviceNumber;
UCHAR DeviceIndex;
UCHAR CreationFlags;
#define SOUND_CREATION_NO_NAME_RANGE ((UCHAR)0x01)
#define SOUND_CREATION_NO_VOLUME ((UCHAR)0x02)
BOOLEAN PreventVolumeSetting;
UCHAR VolumeControlId;
PSOUND_LINE_NOTIFY LineNotify;
#ifndef SOUNDLIB_NO_OLD_VOLUME
WAVE_DD_VOLUME Volume;
#endif
#ifdef VOLUME_NOTIFY
LIST_ENTRY VolumeQueue;
struct _LOCAL_DEVICE_INFO * MixerDevice;
#endif
#ifdef MASTERVOLUME
BOOLEAN MasterVolume;
#endif
BOOLEAN VolumeChanged;
PVOID DeviceSpecificData;
PVOID HwContext;
ULONG State;
PCSOUND_DEVICE_INIT DeviceInit;
} LOCAL_DEVICE_INFO, *PLOCAL_DEVICE_INFO;
Within soundlib.lib, the LOCAL_DEVICE_INFO structure is used as the device extension for each device object created by IoCreateDevice. Device objects and device extensions are described in the Kernel-Mode Drivers Design Guide. The LOCAL_DEVICE_INFO structure is defined in devices.h. One LOCAL_DEVICE_INFO structure exists for each device created by SoundCreateDevice.
Drivers do not allocate LOCAL_DEVICE_INFO structures locally. When a driver calls SoundCreateDevice, a pointer to a DEVICE_OBJECT structure is returned. The structure’s DeviceExtension member is used as the device’s LOCAL_DEVICE_INFO structure.