FiveWin / Internet use Wininet.dll
Posted: Tue Sep 04, 2007 11:35 am
I found an example, so that I get the XML return from a PHP program. Unfortunately I cannot pick the values out.
Someone already solved the problem
regards,
Carsten
sbuffer = empty
function InternetReadFile( hFile ,sBuffer,lNumBytesToRead,lNumberOfBytesRead )
local hDLL := iIf( ValType( xdll ) == "N", xdll, LoadLib32( "xdll" ) )
local uResult
local cFarProc
local sb1 := sbuffer , sb2, sb3
if Abs( hDLL ) > 32
cFarProc = GetProcAdd( hDLL, "InternetReadFile" ,.T., 7 , 7 , 8 , 7, 7 )
uResult = CallDLL( cFarProc , hFile , @sBuffer, lNumBytesToRead, @lNumberOfBytesRead )
nGelesen := lNumberOfBytesRead
sb2 := sbuffer
/*
uResult = CallDLL( cFarProc , hFile , @sBuffer, nGelesen , @lNumberOfBytesRead )
nGelesen := lNumberOfBytesRead
*/
iIf( ValType( xdll ) == "N",, FreeLib32( hDLL ) )
else
MsgAlert( "Error code: " + LTrim( Str( hDLL ) ) + " loading " + If( ValType( xdll ) == "C", xdll, Str( xdll ) ) )
end
return uResult
Someone already solved the problem
regards,
Carsten
sbuffer = empty
function InternetReadFile( hFile ,sBuffer,lNumBytesToRead,lNumberOfBytesRead )
local hDLL := iIf( ValType( xdll ) == "N", xdll, LoadLib32( "xdll" ) )
local uResult
local cFarProc
local sb1 := sbuffer , sb2, sb3
if Abs( hDLL ) > 32
cFarProc = GetProcAdd( hDLL, "InternetReadFile" ,.T., 7 , 7 , 8 , 7, 7 )
uResult = CallDLL( cFarProc , hFile , @sBuffer, lNumBytesToRead, @lNumberOfBytesRead )
nGelesen := lNumberOfBytesRead
sb2 := sbuffer
/*
uResult = CallDLL( cFarProc , hFile , @sBuffer, nGelesen , @lNumberOfBytesRead )
nGelesen := lNumberOfBytesRead
*/
iIf( ValType( xdll ) == "N",, FreeLib32( hDLL ) )
else
MsgAlert( "Error code: " + LTrim( Str( hDLL ) ) + " loading " + If( ValType( xdll ) == "C", xdll, Str( xdll ) ) )
end
return uResult