[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]
Delphi Devsupport

Frequently Asked Questions

Getting a handle on your files

Question:

How do I get a file handle when using Delphi file variables?

Answer:

If you are using a TextFile, typecast your your textfile variable
like this to expose the handle property:

TheHandle := TTextRec(MyFile).handle;

For binary files, typecast your file variable like this:

TheHandle := TFileRec(MyFile).handle;

Back To Faq Index
Borland Online
Trademarks & Copyright © 1997 Borland International, Inc.