libcurl and CreateFile not working?

BlitzMax Forums/Brucey's Modules/libcurl and CreateFile not working?

Snader(Posted 2010) [#1]
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()



Brucey(Posted 2010) [#2]
Trying using WriteStream() instead of CreateFile().


Snader(Posted 2010) [#3]
Thanks Brucey! Now going to try the libXML mod with this!