Would AVIFileWriteData do the trick? "The AVIFileWriteData function writes supplementary data (other than normal header, format, and stream data) to the file."
I hope you are well aware that there are at least three Win32 API for working on audio / video files. The "AVI", "capAVI" and "wave". I am curently using capAVI and recomend always to use whatever standard status/ error reporting API's are avaiable in the particular set. Cheers Vaclav