Thanks in Advance for any help you may offer
I am working on a function that passes GETs and POSTs via wininet.dll
to IIS and then Recieving the results in a string
Everything works fine in VB, however I am having a dificult time
implementing this in PB DLL
here is my declaration (assume hRequest is a valid connection handle)
Declare Function InternetReadFile Lib "wininet.dll"
Alias "InternetReadFile"
(ByVal hFile As Long,
ByVal sBuffer As String,
ByVal lNumBytesToRead As Long,
lNumberOfBytesRead As Long) As Integer
In my Function - Navigate
dim lRes as long
dim sReadBuffer as string
lRes = -1
Do While lRes
sReadBuffer = String$(1024, Chr$(0))
lRes = InternetReadFile(hRequest, sReadBuffer, Len(sReadBuffer), lNumberOfBytesRead)
If lNumberOfBytesRead = 0 Then
lRes = 0
End If
Loop
when InternetReadFile returns I get a True (passing) returned
and the lNumberOfBytesRead is 325 and correct, But there is no data
in sReadBuffer.
Changing string declarations from string to AsciiZ causes the value
of lNumberOfBytesRead to return 0 which is not correct.
Any help or advice would be appreciated
Thanks
[email protected]
------------------
I am working on a function that passes GETs and POSTs via wininet.dll
to IIS and then Recieving the results in a string
Everything works fine in VB, however I am having a dificult time
implementing this in PB DLL
here is my declaration (assume hRequest is a valid connection handle)
Declare Function InternetReadFile Lib "wininet.dll"
Alias "InternetReadFile"
(ByVal hFile As Long,
ByVal sBuffer As String,
ByVal lNumBytesToRead As Long,
lNumberOfBytesRead As Long) As Integer
In my Function - Navigate
dim lRes as long
dim sReadBuffer as string
lRes = -1
Do While lRes
sReadBuffer = String$(1024, Chr$(0))
lRes = InternetReadFile(hRequest, sReadBuffer, Len(sReadBuffer), lNumberOfBytesRead)
If lNumberOfBytesRead = 0 Then
lRes = 0
End If
Loop
when InternetReadFile returns I get a True (passing) returned
and the lNumberOfBytesRead is 325 and correct, But there is no data
in sReadBuffer.
Changing string declarations from string to AsciiZ causes the value
of lNumberOfBytesRead to return 0 which is not correct.
Any help or advice would be appreciated
Thanks
[email protected]
------------------
Comment