Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Checking a computer has a sound card programatically

Posted on 2004-08-16
2
Medium Priority
?
208 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
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…

722 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