On NT (i.e. WIndows 2000, XP, and beyond), the DSound device GUID is generated within dsound.dll, based on a simple algorithm which picks a base GUID dependant on the device type, and modifies the last byte of the GUID to match the "wave" device ID corresponding to the device. For example, the base GUID for (non-emulated) audio rendering devices is: {0xbd6dd71a-3deb-11d1-b171-00c04fc20000} So if you have a soundcard whose device ID in the waveOutXxx API is 2, then its device GUID in the dsound API would be: {0xbd6dd71a-3deb-11d1-b171-00c04fc20002} <<< 2 at the end. Similarly for capture devices and emulated render and capture devices. Dugan Porter - Audio API Dev Lead - Microsoft This posting is provided "as is" with no warranties, and confers no rights ________________________________ From: wdmaudiodev-bounce@xxxxxxxxxxxxx on behalf of Art Edwards Sent: Thu 7/10/2003 1:58 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Correlation of DSound device with PnP device ID Please disregard my earlier post. I finally understand how to use the SetupDiXxx functions to do this. Duh ! I am curious about something though. In the DSEnumCallback function, where does the lpGuid ("GUID that identifies the DirectSound driver") come from ? It appears to be generated dynamically (on WinXPSP1 at least). Is there any documented use for it other than as a parameter to DirectSoundCreate ? >Does anyone know how to correlate a DirectSound device with the PnP ID of the hardware ? > >I would like my application to run only on certain hardware. > >I know I could test the lpcstrDescription parameter in my DSEnumCallback routine. For example: > > if (strcmp (lpcstrDescription, "My Device Name")) > { > // don't wanna use this device... > } > >But, I would like to be a bit more certain that it's really the correct device. So, I'd like to (somehow) get the hardware ID (e.g. VEN_1234&DEV_5678&SUBSYS_AA55AA55&REV_01) associated with the device and do a strcmp or regular expression match on that instead.