PDA

View Full Version : Discover SoundCard name



fabiano.salles
21-05-2009, 04:37 PM
OS: Windows Vista
IDE: Delphi2009
Libraries: Win32API

Hi folks,

I'm really stuck with this question: how to discover the soundcard name with Win32?
I know that the DirectSound could easily do this but I cannot use it nor other 3th part libraries, my only option is Win32API.

Any clues will be of great help.

Thanks.

Brainer
21-05-2009, 05:10 PM
You can use WMI. Read up on it on Wikipedia.

And here's an example written in Delphi - http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=7&lngCodeId=628&strZipAccessCode=tp%2FG6282254

Hope it helps. ;)

noeska
21-05-2009, 05:57 PM
Why would you want to read out the sound card name? Just curious.

fabiano.salles
22-05-2009, 12:22 AM
Why would you want to read out the sound card name? Just curious.


For use in a bug report tool I'm writting.
The idea is to compose a report containing the call stack and the hardware components of the user computer. Almost all the other specs (video card, free memory, total physical memory, processor family and speed, etc...) I could get using some Win32API, but I could not discover nothing about the sound cards hardware.



You can use WMI. Read up on it on Wikipedia.

And here's an example written in Delphi - http://www.planet-source-code.com/vb/scripts/ShowZip.asp?lngWId=7&lngCodeId=628&strZipAccessCode=tp%2FG6282254

Hope it helps. ;)


I could not compile the source with Delphi2009 because the unit generated by importting the WMI Scripting Library is not compatible with the one used in the project, but even so, it is a really interesting lecture for me.

By the way, I found an article here (http://www.prototypical.co.uk/pdf/are%20you%20wmi%202.pdf) explaining how to use WMI with delphi. Tomorrow I'll try implement the functions and see where I could reach.

Thanks a lot.

AthenaOfDelphi
22-05-2009, 07:57 AM
Have you considered using something that already exists?

Like madExcept from http://www.madshi.net/. If it's non-commercial, you can use madExcept for free but you don't get the source. If you want the full freedom to use it for commercial products (and get the source), it's $99.

It gives you lots of options including mailing the report (amongst others) and includes options to collect a list of installed hardware.

I purchased a licence and it's been very useful.

fabiano.salles
25-05-2009, 08:18 PM
Have you considered using something that already exists?
Hmmm, well, I didn't knew that there where something like that for Delphi. :scared: Ill give it a try, but Im afraid it came too late for me since Im almost finishing my tool( whith WMI, as Brainer suggested).
Anyway, thanks a lot for the help.