jj2007, thanks for the warning.
Microsoft has more surprises for us:
CoTaskMemFree,
void CoTaskMemFree(
void pv
);
Passing into this function any invalid and, under some circumstances, NULL pointers result in unexpected termination of the application.
And it does, if I free the VIDEO_INFO.pBitMapBuffer and pass NULL to it, it result in unexpected termination of the application.
So, I removed this.
The result is when no codec is found ( "No combination of intermediate filters could be found to make the connection." ) to play the movie, the application now terminates in a normal way.
Also corrected a sloppy mistake at the end of the VideoGrabber routine, mov eax,S_FALSE ( was cmp eax,S_FALSE )
Updated the sources in Reply #7 again...