Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - fhandle() return the file handle of a file stream http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 fhandle()           Return the file handle of a file stream
------------------------------------------------------------------------------
 Declaration
   fileio.hdr

 Syntax
   func _HFILE fhandle extern
   param file fStream

 Arguments
   fStream is the file stream to manipulate.

 Return
   The handle of the file stream.

 Description
   The fhandle() function returns the DOS file handle associated with a
   previously opened buffered file stream.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_fhandle
   vardef
      file fTemp
   enddef
   if fopen( fTemp, "c:\autoexec.bat", F_READ, F_TEXT ) // open file
      ? "File handle is", istr( fhandle( fTemp ) ) // print file handle number
      fclose( fTemp )                              // close file
   endif
   endproc

   proc main
   Test_fhandle()
   endproc

See Also: fopen()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson