TIdHTTP in c++

Giganews Newsgroups
Subject: TIdHTTP in c++
Posted by:  xdiscent (xdisce…@yahoo.com)
Date: Sat, 25 Dec 2004

Anyone got a better example of using IdHTTP for borland?
Cause in my sample code returns an error.
Hoping you guys could help my code or point me to a better samples
Thanks

--sample-code--
        TMemoryStream *MStream = new TMemoryStream();
        if( FileExists("index.txt") )
        {
                DeleteFile("index.txt");
        }
        FileCreate("index.txt");

        TIdHTTP *IdHTTP;
        IdHTTP->Get(strUrl, MStream);  //ERROR IS ON HERE
--eof--

--error-msg--
---------------------------
Debugger Exception Notification
---------------------------
Project ****.exe raised exception class EAccessViolation with message
'Access violation at address 00655C21. Read of address 00000020'.
Process stopped. Use Step or Run to continue.
---------------------------
OK  Help
---------------------------
--eof--

Replies