Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 20th, 2005, 03:21 PM
Goomba Goomba is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 20 Goomba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 47 m 17 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Upload files from VB with WININET Error!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway