Advertisement

Enumerating graphics adapters and sound boards

Started by October 19, 2000 07:18 AM
3 comments, last by carfesh 24 years, 3 months ago
Hi all! I''m participating at the WinFellow Amiga emulator project which uses DirectX3/5 DirectDraw and DirectSound for multimedia code (we want to keep it on DX3 to have it compatible with WinNT). Now I want to enumerate installed graphics and sound cards to output them into a logfile for debugging purposes so that users don''t need to give us this information manually when reporting bugs. Does anyone know an API or a simple way to retrieve this information on all Windows versions? The DX3 enumerations don''t tell very much, as information like "primary display adapter" is not very helpful.. Any help would be appreciated, carfesh..
For sound cards (assuming you want waveform), waveOutGetNumDevs and waveOutGetDevCaps are the two functions I use. There''s actually another interface to sound (MDI, I believe?) but I''m not familiar with it.
Advertisement
These sound good, I''ll try them out. The other interface for sound is MCI, I think. It''s for all kinds of multimedia devices.
IIRC, DDEnumCallback should give you both a name and a description. Anyway, under Windows 9x/Me, you should be able to find the hardware descriptions that the Device Manager uses in the registry keys:

HKEY_LOCAL_MACHINE\Enum\*

where * is the directory of the type of hardware you wish to find. You should be able to use the Windows registry functions to read the values from these keys.

Here are some of the subfolders and the device types they contain:

ESDI: most IDE hard drives
FLOP: floppy drives
HID: addition devices for USB controllers
INFARED: infared devices
ISAPNP: data for the ISA PNP extensions device
LPTENUM: printers
MF: IDE controllers children
MONITOR: monitors
NETWORK: subdirectories containing Network Neighborhood Properties info
PCI: all PCI devices, including AGP display adapters
Root: BIOS and software-based "devices"
SCSI: some CD-ROMs (including IDE? why is my CD-ROM listed here?)
USB: USB hubs, controllers, and devices
VIRTUAL: more software-based devices


You can check the processor type and capabilities under these directories:

HKEY_LOCAL_MACHINE\Hardware\*


There is a _lot_ of information in those registry keys! You would have to process most of this stuff in a loop somehow to find the display adapter(s) and other devices for sound and input. Most sound/input devices should be either found in either the ISA or PCI bus listings. This information should be found in Windows NT/2000 in a similar location. There is also a way to check whether you are running Windows 9x/Me or Windows NT/2000 by using GetWindowsVersion() or something like that. Check out MSDN, if you have it, or go to MS''s web site and view the MSDN docs there.

Good Luck!


- null_pointer
Sabre Multimedia
DDEnumCallback gives "primary display adapter" as driver and "driver" as description (or the other way around) so this was not what I needed. But those registry keys sound nice. The problem is that MSDN doesn''t seem to have valuable information on that topic (especially in which keys you find it regarding to the windows version, as this seems to be different between them). But that enum thing was new to me, I think these keys could be the solution. Does anyone know where this information can be found in NT?

This topic is closed to new replies.

Advertisement