andyburrow
Programmer
Does anyone know how else I can put this?
The error message received is:
'Value' is not a member of 'Microsoft.VisualBasic.VBFixedStringAttribute'.
This refers to the 'lpszName.Value' calls... check out the Sub below.. lines 12 and 14.
Sub MapWebcamToWindow(ByRef lWidth As Integer, ByRef lHeight As Integer, ByRef hWnd As Integer)
Dim lpszName As New VBFixedStringAttribute(100)
Dim bmp As BITMAPINFO
With bmp.bmiHeader
.biSize = Len(bmp.bmiHeader)
.biWidth = 320
.biHeight = 240
.biPlanes = 1
.biBitCount = 24
End With
capGetDriverDescriptionA(0, lpszName.Value, 100, Nothing, 100)
lwndC = capCreateCaptureWindowA(lpszName.Value, _
WS_VISIBLE Or WS_CHILD, 0, 0, lWidth, lHeight, hWnd, 0)
If capDriverConnect(lwndC, 0) Then
capPreviewRate(lwndC, 66)
capPreview(lwndC, True)
capSetVideoFormat(lwndC, bmp, Len(bmp))
SetWindowPos(lwndC, 0, 0, 0, bmp.bmiHeader.biWidth, _
bmp.bmiHeader.biHeight, SWP_NOMOVE Or SWP_NOZORDER)
End If
End Sub
The error message received is:
'Value' is not a member of 'Microsoft.VisualBasic.VBFixedStringAttribute'.
This refers to the 'lpszName.Value' calls... check out the Sub below.. lines 12 and 14.
Sub MapWebcamToWindow(ByRef lWidth As Integer, ByRef lHeight As Integer, ByRef hWnd As Integer)
Dim lpszName As New VBFixedStringAttribute(100)
Dim bmp As BITMAPINFO
With bmp.bmiHeader
.biSize = Len(bmp.bmiHeader)
.biWidth = 320
.biHeight = 240
.biPlanes = 1
.biBitCount = 24
End With
capGetDriverDescriptionA(0, lpszName.Value, 100, Nothing, 100)
lwndC = capCreateCaptureWindowA(lpszName.Value, _
WS_VISIBLE Or WS_CHILD, 0, 0, lWidth, lHeight, hWnd, 0)
If capDriverConnect(lwndC, 0) Then
capPreviewRate(lwndC, 66)
capPreview(lwndC, True)
capSetVideoFormat(lwndC, bmp, Len(bmp))
SetWindowPos(lwndC, 0, 0, 0, bmp.bmiHeader.biWidth, _
bmp.bmiHeader.biHeight, SWP_NOMOVE Or SWP_NOZORDER)
End If
End Sub