im having issues with getting inet.openurl() and inet.chunk() functions
1- To test the inet.openurl() did you check if the “StrHeader = frmMain.inetDownload.GetHeader(“Content-Length”)” returned the correct content length ?
2- To test the frmMain.inetDownload.GetChunk(CHUNK_SIZE, icByteArray), do the following only for the first call of GetChuck: check if the bytes received equal the bytes in the actual file, would be wise to create a simple sub here that displays the bytes of a byte array (you can do it anyway you want it), the file bytes could be viewed in some hex editor I think
[EDIT] From MSDN
The OpenURL method’s return value depends on the target of the URL. For example, if the target URL is the directory of an FTP server, the directory will be returned. On the other hand, if the target is a file, the file will be retrieved.
The OpenURL method is equivalent to invoking the Execute method with a GET operation, followed by a GetChunk method invoked in the StateChanged event. The OpenURL method, however, results in a synchronous stream of data being returned from the site.
If you are retrieving a binary file, be sure to use a byte array as a temporary variable before writing it to disk, as shown below: