Thanks Andrew,
“To get a list of devices use the capGetDriverDescriptionW function:” works but only the built-in camera is displayed…
Microsoft WDM image Capture (Win32)
The other capture device is not listed
The camera, Nikon D3200, http://imaging.nikon.com/lineup/dslr/d3200/, is connected via Video2PC, https://noterepeat.com/products/ion/vcrs-and-video-conversion/383-ion-audio-video-2-pc-mkii-driver-installation-and-software-setup, through a USB port.
I had to modify it like this though…
Declare Function capGetDriverDescriptionW Lib "Avicap32" (DriverIndex As UInt16, DriverName As Ptr, _
NameLen As Integer, DriverVersion As Ptr, VersionLen As Integer) As Boolean
Dim count As Integer
Dim names() As String
Dim DeviceNames As String
Dim nm As New MemoryBlock(1024)
While capGetDriverDescriptionW(count, nm, nm.Size, Nil, 0)
count = count + 1
DeviceNames = DeviceNames + chr(13) + nm.WString(0)
Wend
msgbox DeviceNames
If I use the camera with Video2PC I have to use a program that came with it, PowerDirector 9, I can capture images with the Nikon D3200.
Any suggestion why the other capture device is not listed?
I tried your suggestion from https://forum.xojo.com/32493-help-with-c-to-xojo-conversion-solved/…
Try creating a new blank project and copy this into the Window1.Open event:
Declare Function capGetDriverDescriptionW Lib "Avicap32" (DriverIndex As UInt16, DriverName As Ptr, NameLen As Integer, DriverVersion As Ptr, VersionLen As Integer) As Boolean
Dim i As Integer
Dim nm As New MemoryBlock(1024)
Do Until Not capGetDriverDescriptionW(i, nm, nm.Size, Nil, 0)
MsgBox(nm.WString(0))
i = i + 1
nm = New MemoryBlock(1024)
Loop
It should pop-up a msgbox for each available camera interface. I’m kind of skeptical but it’s the only thing I can think of.
Only the built in camera pops up… Microsoft WDM image Capture (Win32)
Thanks.