02-26-04 04:34 PM
I've been attempting to use HttpSendRequest in a VB6 application to perform
an HTTP PUT to a Windows 2000 Server Web server (IIS 5.0). The code looks s
omething like:
Public Declare Function HttpOpenRequest Lib "wininet.dll" Alias "HttpOpenReq
uestA" (ByVal hConnect As Long, ByVal sVerb As String, ByVal sObjectName As
String, ByVal sVersion As String, ByVal sReferer As String, ByVal sAcceptTyp
es As String, ByVal lFlags
As Long, ByVal lContext As Long) As Long
Public Declare Function HttpSendRequest Lib "wininet.dll" Alias "HttpSendReq
uestA" (ByVal hRequest As Long, ByVal sHeaders As String, ByVal lHeadersLeng
th As Long, ByVal sOptional As String, ByVal lOptionalLength As Long) As Int
eger
.
.
.
hHTTPOpenRequestHandle = HttpOpenRequest(hInternetConnectHandle, "PUT", "/te
st.txt", sVersion, sReferrer, sAcceptTypes, lFlagsHttpOpenRequest, lContextH
ttpOpenRequest)
iHttpSendRequestEx = HttpSendRequest(hHTTPOpenRequestHandle, "", 0, "Test_st
ring", Len("Test_string"))
When I run this code, HttpSendRequest returns TRUE as desired, indicating (I
believe) that the request was sent to the Web server machine. But the file
test.txt does not get written to the machine! What am I doing wrong? Plea
se help or advise where I m
ight find help.
Thank you.
Ron Sochanski
[ Post a follow-up to this message ]
|