Premetto che non ho testato il programma (sicché non ho una webcam), tuttavia ho guardato all'interno del codice.
Tu ottieni un errore in questo metodo
Public Sub initCam(ByVal parentH As Integer,ByVal currentDevice As String)
If iRunning = False Then
currentDevice = iDevice
hHwnd = capCreateCaptureWindowA(currentDevice, WS_VISIBLE Or WS_CHILD, 0, 0, OutputWidth, CShort(OutputHeight), parentH, 0)
If setCam() = False Then
StatusString = "Errore nel set-up della WebCam"
End If
Else
StatusString = "WebCam già avviata"
End If
End Sub
che viene richiamato (apparentemente) quando inizializzi la webcam.
Per ottenere l'errore che ottieni tu, setCam() dev'essere uguale a False (da notare che si tratta di una funzione () non di una variabile).
La funzione setCam() è questa
Private Function setCam() As Boolean
Try
If SendMessage(hHwnd, WM_CAP_DRIVER_CONNECT, CShort(iDevice), CType(0, String)) = 1 Then
SendMessage(hHwnd, WM_CAP_SET_PREVIEWRATE, CShort(CamFrameRate), CType(0, String))
SendMessage(hHwnd, WM_CAP_SET_PREVIEW, 1, CType(0, String))
Me.iRunning = True
Return True
Else
Me.iRunning = False
Return False
End If
Catch
StatusString = "Errore impostazioni WebCam"
Return False
End Try
End Function
Affinché la funzione restituisca false e ti dia poi quell'errore, la funzione SendMessage(...) deve restituire un valore diverso da 1 (come nel tuo caso).
Si può intuire che ciò avviene quando la webcam non è connessa al computer o quando comunque i suoi driver non funzionano.
Beh, che dire, controlla con software di terze parti che la tua webcam funzioni correttamente e fammi sapere.
(comunque un moderatore potrebbe spostare il topic nella corretta sezione?)