Re: How can I check for sound card?

Tech-Archive recommends: Fix windows errors by optimizing your registry



This works fine. Thanks!

"Vitaly Zayko" <vitaly_at_zayko_dot_net> wrote in message
news:emBLBxm9FHA.2120@xxxxxxxxxxxxxxxxxxxxxxx
> That's right - you need to import a winmm.dll function.
> If you just want to make sure that this PC does have a sound card you may
> use this:
> [DllImport("winmm.dll", SetLastError = true)]
> public static extern uint waveOutGetNumDevs();
> If result is non-zero then you can expect a device.
>
> Mats-Lennart Hansson wrote:
>> Hi,
>> Is there a way to check for sound cards in c#? I don't want to force the
>> user to have DirectX9 or so, can I perhaps use winmm.dll?
>>
>> Any help, and code snippets, is highly appreciated!
>>
>> Thanks,
>> Mats-Lennart
>
>
> --
> Vit Zayko


.