B
brettsbignose
Sub InitDevices()
Dim Caps As WaveInCaps, x As Long
For x = 0 To waveInGetNumDevs - 1
Call waveInGetDevCaps(x, VarPtr(Caps), Len(Caps))
If Caps.Formats And WAVE_FORMAT_1M16 Then '16-bit mono devices
Call DevicesBox.AddItem(StrConv(Caps.ProductName,
vbUnicode), x)
End If
Next x
That code is supposed to fill a listbox full of the audio devices
available, but I can't seem to be able to convert this to VB.NET. It
really doesn't like the structure(or type) of WaveInCaps. Could anyone
attempt to convert this code over? .Net really complains about
whichever method I use to send the pointer of the structure into the
API.
Any ideas?
Thanks,
Brett
Dim Caps As WaveInCaps, x As Long
For x = 0 To waveInGetNumDevs - 1
Call waveInGetDevCaps(x, VarPtr(Caps), Len(Caps))
If Caps.Formats And WAVE_FORMAT_1M16 Then '16-bit mono devices
Call DevicesBox.AddItem(StrConv(Caps.ProductName,
vbUnicode), x)
End If
Next x
That code is supposed to fill a listbox full of the audio devices
available, but I can't seem to be able to convert this to VB.NET. It
really doesn't like the structure(or type) of WaveInCaps. Could anyone
attempt to convert this code over? .Net really complains about
whichever method I use to send the pointer of the structure into the
API.
Any ideas?
Thanks,
Brett