anju_a_sagar
01-03-2008, 03:17 AM
Hello I m using the following code to connect my webcam. The webcam is working fine but I want to capture a frame.
http://ej.bantz.com/video/detail/
I read the above web page and I think each time a frame is captured this code is used.
Function MyFrameCallback(ByVal lwnd As Long, ByVal lpVHdr As Long) As Long
Debug.Print "FrameCallBack"
Dim VideoHeader As VIDEOHDR
Dim VideoData() As Byte
'//Fill VideoHeader with data at lpVHdr
RtlMoveMemory VarPtr(VideoHeader), lpVHdr, Len(VideoHeader)
'// Make room for data
ReDim VideoData(VideoHeader.dwBytesUsed)
'//Copy data into the array
RtlMoveMemory VarPtr(VideoData(0)), VideoHeader.lpData, VideoHeader.dwBytesUsed
Debug.Print VideoHeader.dwBytesUsed
Debug.Print VideoData
End Function
I am thinking as the RtlMoveMemory has 3 parameters...according to that the following part
'//Copy data into the array
RtlMoveMemory VarPtr(VideoData(0)), VideoHeader.lpData, VideoHeader.dwBytesUsed
is used to save the data of the current frame in the VideoData(0) array.
Can anyone plz help in this. How to retrive the values from array and i need to store it in memory location.
I need to get it on webpage... Anyone can help in this ??
http://ej.bantz.com/video/detail/
I read the above web page and I think each time a frame is captured this code is used.
Function MyFrameCallback(ByVal lwnd As Long, ByVal lpVHdr As Long) As Long
Debug.Print "FrameCallBack"
Dim VideoHeader As VIDEOHDR
Dim VideoData() As Byte
'//Fill VideoHeader with data at lpVHdr
RtlMoveMemory VarPtr(VideoHeader), lpVHdr, Len(VideoHeader)
'// Make room for data
ReDim VideoData(VideoHeader.dwBytesUsed)
'//Copy data into the array
RtlMoveMemory VarPtr(VideoData(0)), VideoHeader.lpData, VideoHeader.dwBytesUsed
Debug.Print VideoHeader.dwBytesUsed
Debug.Print VideoData
End Function
I am thinking as the RtlMoveMemory has 3 parameters...according to that the following part
'//Copy data into the array
RtlMoveMemory VarPtr(VideoData(0)), VideoHeader.lpData, VideoHeader.dwBytesUsed
is used to save the data of the current frame in the VideoData(0) array.
Can anyone plz help in this. How to retrive the values from array and i need to store it in memory location.
I need to get it on webpage... Anyone can help in this ??