On Wed Feb 7 15:16:51 2024 +0000, Yuxuan Shui wrote:
I can change this to use `IStream_Seek` to find out the current position, instead of tracking it across reads. is that reasonable?
The same goes for any validation check that you want to add to your code: write a test for it. If Windows does that check, then you can implement it, if it doesn't, crashes (in which case don't include the test in your contribution), or anything else, don't add the check, it's unnecessary and could even hurt compatibility.
In this case the tests above definitely show that Windows doesn't do that length validation, and that it simply parses how many events as it can, without even caring about END_OF_TRACK either. So this should be removed entirely.