by Syed Adeel Rizvi (6 Submissions)
Category: Coding Standards
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
This Code Show Your Sound Card information if you like my code please vote
API DeclarationsPrivate Declare Function waveOutGetDevCaps Lib "winmm.dll" Alias "waveOutGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As WAVEOUTCAPS, ByVal uSize As Long) As Long
Private Const MAXPNAMELEN = 32
Private Type WAVEOUTCAPS
wMid As Integer
wPid As Integer
vDriverVersion As Long
szPname As String * MAXPNAMELEN
dwFormats As Long
wChannels As Integer
dwSupport As Long
End Type
Private Sub Command1_Click()
Dim x As WAVEOUTCAPS
waveOutGetDevCaps 0, x, Len(x)
Label1.Caption = "Sound Card - " & x.szPname
Label2.Caption = "Sound Formats - " & x.dwFormats
Label3.Caption = "Sound Support - " & x.dwSupport
Label4.Caption = "Sound DriverVersion - " & x.vDriverVersion
Label5.Caption = "Sound Channels - " & x.wChannels
Label6.Caption = "Sound Mid - " & x.wMid
Label7.Caption = "Sound Pid - " & x.wPid
End Sub