Hi El_Choni,
Im trying to make as small lib from a procedure i find here in the forums (cant remember who code it!

)
Code: Select all
ProcedureDLL.s xxGetWebPage(URL.s) ; Get a web Page
OpenType = 1
isLoop.b=1
INET_RELOAD.l = $80000000
hInet.l=0
hURL.l=0
Bytes.l=0
Buffer.s=Space(2048)
res.s=""
hInet = InternetOpen_("PB@INET", OpenType, #NULL, #NULL, 0)
hURL = InternetOpenUrl_(hInet, URL, #NULL, 0, INET_RELOAD, 0)
Repeat
Delay(0)
InternetReadFile_(hURL,@Buffer, Len(Buffer), @Bytes)
If Bytes = 0
isLoop=0
Else
Delay(0)
res = res + Left(Buffer, Bytes)
EndIf
Until isLoop=0
InternetCloseHandle_(hURL)
InternetCloseHandle_(hInet)
ProcedureReturn res
EndProcedure
Now, when the lib is mades, if i try to call it from a code i get an error telling this:
TBTemp\Function .text: undefined reference to 'GetWebPage_S2'
GetWebPage is the name of the lib.
What im doing wrong?