I am experimenting with VFW in VB6 for controlling Webcams. To access the actual bytes of video stream data, I need to define a callback function according to the specs at http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx for a callback function type they call capVideoStreamCallback. It is defined on that MSDN webpage like this in C++ code:
This would be equivalent to this VB6 code:
Now as with any callback function which has an output (return value), the calling function (some code internal to VFW, which I'm not able to examine the source code) is likely to expect the callback function to return a certain value, in order to work properly, but unfortunately the above linked MS page on the callback function, say NOTHING AT ALL about what a valid return value would be. So I do not know where to go from here. Is this one of those, super top secret, Microsoft proprietary trade secret, undocumented things, that is kept out of the public knowledge, so that Microsoft is the only one that can properly use the function (leaving everyone else with buggy software that uses this callback function, due to not being able to figure out the correct return values), and thus empowers Microsoft to have a competitive edge over its opponents?
Code:
LRESULT CALLBACK capVideoStreamCallback(
HWND hWnd,
LPVIDEOHDR lpVHdr
);
This would be equivalent to this VB6 code:
Code:
'code to define user-defined type VIDEOHDR goes here
Public Function capVideoStreamCallback(Byval hWnd as Long, Byref VHdr as VIDEOHDR) as Long
'code for processing video frames goes in here
capVideoStreamCallback = SomeReturnValue
End Function