|
-
Apr 20th, 2005, 04:35 PM
#1
Thread Starter
New Member
Problems with WININET and VB6 - Please Assist
Good day to all. I have a problem using WinInet to upload a file to a web server. I get error 87 when I try to execute HTTPsendRequesstEX. I'm using sendRequestEX as I need Async communications.
I have a valid internet File Handle and there are no permissions issues on the server (IIS is installed on my laptop).
Here is the code snippet:
**** START OF SNIPPET ****
hRequest = HttpOpenRequest(hConnect, "PUT", "/filer/test.txt", vbNullString, vbNullString, 0, INTERNET_FLAG_NO_CACHE_WRITE, 0)
Rem *** All GOOD to here. at this point I have a valid connection to the server.
' This is the way it Must be called.
'BOOL HttpSendRequestEx(
' HINTERNET hRequest, Handle returned by HttpOpenRequest.
' LPINTERNET_BUFFERS lpBuffersIn, Optional. Pointer to an INTERNET_BUFFERS structure
' LPINTERNET_BUFFERS lpBuffersOut, Optional. Pointer to an INTERNET_BUFFERS structure
' DWORD dwFlags, reserved and MUST be set to zero
' DWORD dwContext Application-defined context value
');
Status = HttpSendRequestEx(hRequest, IB, vbNull, 0, 0) ' THISS CAUSES THE ERROR
If Status = 0 Then ' HERE IS WHERE I CATCH THE ERROR
MsgBox ("HttpSendRequestEx Err: " & Err.LastDllError)
Unload Me
End
End If
**** END OF SNIPPET ****
I have already developed FILE DOWNLOAD code (which is extremely fass -> 80 mb in about 2 minutes). I need to have an UPLOAD FILE piece for a project that I am working on in house.
Any help would be greatly appreciated.
Thanks
Goomba
ps: please feel free to email me directly at: [email protected]
Last edited by Goombaa; Apr 20th, 2005 at 05:10 PM.
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
|