Completely new to this library, but just thought would flag this up to someone who is a bit more experienced with this.
This function calls InternetReadFile.
Looking a the Microsoft usage of this function at:
"To ensure all data is retrieved, an application must continue to call the InternetReadFile function until the function returns TRUE and the lpdwNumberOfBytesRead parameter equals zero. This is especially important if the requested data is written to the
cache, because otherwise the cache will not be properly updated and the file downloaded will not be committed to the cache."
This is not currently happening and someone may wish to look into it, it is just being invoked once, or it maybe as designed.