Reading msdn.com, it seems that InternetSetFilePointer (in juce_seekInInternetFile) will fail if HttpOpenRequest was called with the flag INTERNET_FLAG_NO_CACHE_WRITE.
For now I’ve just removed it from the code on my computer, but maybe this should be an option (in case it’s useful for some purpose)?
You’re right, but InternetSetFilePointer won’t work otherwise.
But even this isn’t a working solution, apparently. It seems that InternetSetFilePointer does the same thing as is done in WebInputStream::setPosition, i.e. it downloads content until it reaches the specified position, and then returns.
So I’ll probably just have to adjust the http header to insert a “range:” value.
Weird, now InternetSetFilePointer did work with the cache flag. But since it still skips bytes, I’ll have to mess with the header.
I’ll have to adjust juce_openInternetFile for this, though. I’d like to change as little as possible to the Juce files, so I’m wondering if it would be best to add a callback or just set the range through parameters.
I don’t think you could rely on InternetSetFilePointer to work anyway. If you know some kind of http header flag that will resume on your particular server, I’d say use that.