Microsoft DirectX 8.1 (Visual Basic)

EnumDevice

Description

The EnumDevice sample shows how to enumerate and create playback and capture devices.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\EnumDevice

Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\Bin

User's Guide

Select a playback and capture device from the dropdown lists. Click Create.

Programming Notes

The LoadEnum procedure populates the listboxes. The primary devices on the system are always enumerated twice, once under their proper names and once as "Primary Sound Driver" or "Primary Sound Capture Driver." The value returned by DirectSoundEnum8.GetGuid for the primary driver is all zeros.

The DirectSound8 object is released as soon as it has been created. On systems that do not support full duplex, the creation of DirectSoundCapture8 could fail if the DirectSound8 object exists.