Each AVI file uses an index of a specified size to locate video and audio data chunks within the file. An entry in the index locates one video frame or waveform-audio buffer. Consequently, the value of the index size indirectly sets the upper limit on the number of frames that can be captured in a file.
You can retrieve the current index size by using the WM_CAP_GET_SEQUENCE_SETUP message (or the capCaptureGetSetup macro). The current index size is stored in the dwIndexSize member of the CAPTUREPARMS structure. You can specify a new index size as the value of dwIndexSize and then send the updated CAPTUREPARMS structure to the capture window by using the WM_CAP_SET_SEQUENCE_SETUP message (or the capCaptureSetSetup macro). The default index size is 34,952 entries (allowing 32K frames and a proportional number of audio buffers).