|
-
April 12th, 2001, 05:02 AM
#1
MSXML2.XMLHTTP30.ResponseStream
I'm using the MSXML2.XMLHTTP30 object to retrieve a file from an internet server. When I receive the file, I write it to disk with the put statement.
For binary files I use the ResponseBody property of the object, for text I use the ResponseText property.
Text files work fine, but the binary files don't. The file is 12 bytes larger then the original file, resulting in the file not working (in this case it was an exe that was being transferred).
The MSXML2.XMLHTTP30 has a property called ResponseStream, does anybody has a clue of how to write this to disk?
MSDN isn't very clear about this:
-- begin of MSDN extract
Variant. The property is read-only. Represents the response entity body as an IStream. This stream returns the raw undecoded bytes as received directly from the server. Therefore, depending on what the server sent, this may appear as binary-encoded data (UTF-8, UCS-2, UCS-4, Shift_JIS, and so on).
Visual Basic Syntax
strValue = oXMLHttpRequest.responseStream
-- end of MSDN extract
However, when I use
Dim strStream As Variant
strStream = xHTTP.responseStream
I get a type mismatch error
Any help is welcome
Tom Cannaerts
[email protected]
The best way to escape a problem, is to solve it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|