Showing posts with label Indy. Show all posts
Showing posts with label Indy. Show all posts

Thursday, 5 July 2007

Where'd the CopyFileTo command go?

What a busy month for me. It feels like I've barely got back from the wedding in Brisbane and that was a couple of weeks ago.

I was working with an older Delphi program today that I hadn't loaded in Delphi 2007 as yet (possibly not since Delphi 6 or 7). When I tried to compile, it failed - it couldn't find CopyFileTo().

CopyFileTo() is an Indy function that used to reside in idGlobals. It now resides in idglobalProtocols. I simply include ", idglobalProtocols" in the 'uses' statement and it compiled.

Strangely a search of the internet did not come up with the answer - other than to point me in the direction of Indy. A search of all *.pas files under "..\CodeGear\Delphi\5.0\source\Indy\Indy10" showed me the correct file I should "Use".