What option do we need, on the Buildh command line to include the FW Ole functions?
I put PingValidate.prg, containing WebPageContents() in the samples folder. But we have some missing externals.
Which library has olefuncs.prg already linked in?
Error: Unresolved external '_HB_FUN_FWGETOLEOBJECT' referenced from C:\FWH\SAMPLES\PINGVALIDATE.OBJ
Error: Unresolved external '_HB_FUN_FW_GT' referenced from C:\FWH\SAMPLES\PINGVALIDATE.OBJ
Error: Unable to perform link
* Linking errors *
- Code: Select all Expand view
#include "fivewin.ch"
function WebPageContents( cUrl, lText )
local oHttp, cContents := ""
local nOle := 0
local aOle := { "MSXML2.XMLHTTP", "WINHTTP.WinHttpRequest.5.1" }
if Lower( Left( cUrl, 7 ) ) == "http://" .or. Lower( Left( cUrl, 8 ) ) == "https://"
do while Empty( cContents ) .and. nOle < 2
nOle++
TRY
oHttp := FWGetOleObject( aOle[ nOle ] )
oHttp:Open("GET", cUrl, .f. )
oHttp:Send()
DEFAULT lText := .f.
if lText
cContents := oHttp:ResponseText()
else
cContents := oHttp:ResponseBody()
endif
CATCH
END
enddo
endif
return cContents
//----------------------------------------------------------------------------//