Solved

Checking a computer has a sound card programatically

Posted on 2004-08-16
2
207 Views
Last Modified: 2010-05-18
I have written a program using vb.net and the framework that plays a video, however if the user mutes the sound on a video when they do not have a sound card installed it generates an error.

Can someone tell me how to check a sound card exists before attempting to mute the sound.

Bot
0
Comment
Question by:LenBot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 total points
ID: 11814276
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
Private Sub cmdCanPlay_Click()
    Dim i As Long
    i = waveOutGetNumDevs()
    If i > 0 Then
        MsgBox "Your system can play sound files.", _
        vbInformation, "Sound Card Test"
    Else
        MsgBox "Your system can not play sound Files.", _
        vbInformation, "Sound Card Test"
    End If
End Sub
0
 

Author Comment

by:LenBot
ID: 11814459
Nice one thanks for  the quick responce.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question