This example presents the AviBrowser class. This class can open AVI file and convert its frames into bitmap files. The AviBrowser object is shown used as a control on FoxPro form. For that reason, it is subclassed from the Image control.
The AVIStreamGetFrame returns the address of a decompressed video frame. It points to a globally allocated memory block. The block contains already populated BITMAPINFOHEADER structure followed by optional color table and the binary data.
Practically, this is a bitmap file. All you have to do is to populate the BITMAPFILEHEADER structure and add it on top of the block. Then save the result to a file with "DIB" or "BMP" extension.
* * *
There is an issue not answered yet: the AVIStreamGetFrameOpen returns an error for some AVI files. Otherwise these are normal AVI files. I`m looking what can be done...