| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Upload files from VB with WININET Error!
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 and logged in with an appropriate account. Rem *** hConnect paramater is returned by a previous function to return a Valid connection handle 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 fast -> 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: rgutery@mentorits.com |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Upload files from VB with WININET Error! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|