I was trying to make something with libcurl. I wanted to grab the contents of an online XML file and put this into a XML file on my PC. But when I try to use libcurl, I cannot use Createfile to make a new stream to put the contents in!? I get an Complie Error - Identifier 'CreateFile' not found.
SuperStrict
Framework BaH.libcurl
Import BRL.StandardIO
Global docname:String = "balans-delta.xml"
Local file:TStream=CreateFile(docname)
Local curl:TCurlEasy = TCurlEasy.Create()
curl.setOptInt(CURLOPT_VERBOSE, 1)
curl.setOptInt(CURLOPT_FOLLOWLOCATION, 1)
curl.setOptString(CURLOPT_URL, "http://www.tennet.org/xml/balancedeltaprices/balans-delta.xml")
curl.setWriteStream(file)
Local res:Int = curl.perform()
curl.cleanup()
|