wMid As Integer ‘ manufacturer id
wPid As Integer ‘ product id
vDriverVersion As Long ‘ version of the driver
szPname As String * MAXPNAMELEN ‘ product name
fdwSupport As Long ‘ misc. support bits
cDestinations As Long ‘ count of destinations
End Type
Private Declare Function mixerGetNumDevs Lib "winmm.dll" () As Long
Private Declare Function mixerGetDevCaps Lib "winmm.dll" Alias "mixerGetDevCapsA" ( _
ByVal uMxId As Long, _
pmxcaps As MIXERCAPS, _
ByVal cbmxcaps As Long) As Long
Dim ctr As MIXERCAPS
Dim count As Long
count = mixerGetNumDevs()
MsgBox "混音設備數量:" & count
For i = 0 To count – 1
ret = mixerGetDevCaps(i, ctr, Len(ctr))
MsgBox ctr.szPname
Next
End Sub
其他相關的API或與多媒體有關的可以參考 Microsoft Multimedia