You may find your legacy program failed on calling AVIFileOpen when it is trying to open a custom AVI file on Windows Vista. The returned COM error is -2147205011(0x8004406D). But the program works fine on WinXP when opening same AVI file.
If you're the owner of the AVI file, you might want to check your AVI file's header data. You might write incorrect Bitmap header info data or something into the AVI file.
On Vista, AVIFileOpen calls ValidateBitmapInfoHeader internally to validate the source AVI file's bitmap header info; Some custom AVI files may not need a correct bitmap header for decoding and playback. This is not a problem on XP because XP's AVIFileOpen does not call this DShow helper function.
Since this is an inline C++ function, you can read the source in DirectShow SDK's header file.