home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / os2prgc.zip / file_io.h < prev    next >
Text File  |  1995-03-06  |  2KB  |  41 lines

  1. /*****************************************************************************
  2.  
  3.   FILE_IO.H -- Sample code for handling FILE I/O with Dos...() API functions.
  4.   Copyright (C) 1993,94,95 by Craig Morrison, All Rights Reserved.
  5.  
  6.   You may use this code in your own projects, regardless of renumeration.
  7.   All I ask is that you prominently display the above copyright notice.
  8.  
  9.   Should you need assistance, I can be contacted at the following addresses:
  10.  
  11.         Fidonet:        Craig Morrison, 1:201/60@fidonet.org
  12.         Internet:       cam@wpc.cioe.com
  13.         Post:           Craig Morrison
  14.                         1316 Ferry St.
  15.                         Lafayette, IN 47901-1533
  16.                         USA
  17.  
  18.   NOTES:
  19.  
  20.     You'll notice the complete lack of any references to run-time
  21.     library functions. This was done on purpose so that *I* could
  22.     control what happens when a thread gets killed. This package
  23.     contains just about everything you'll need to do comm port/file
  24.     I/O, string manipulation and ordinal number conversions.
  25.  
  26.  *****************************************************************************/
  27.  
  28. BOOL InitFileIO(VOID);
  29. VOID CleanUpFileIO(VOID);
  30. HFILE GetHandleFromInt(INT fIndex);
  31. INT OpenFile(PSZ pszFileName, PULONG pulAction, ULONG cbFile,
  32.              ULONG ulAttribute, ULONG fsOpenFlags, ULONG fsOpenMode,
  33.              PEAOP2 peaop2);
  34. VOID CloseFile(INT fIndex);
  35. VOID CloseAllFiles(VOID);
  36. APIRET BlockRead(INT fIndex, PVOID p, PULONG cbBuffer);
  37. APIRET BlockWrite(INT fIndex, PVOID p, PULONG cbBuffer);
  38. APIRET LineRead(INT fIndex, PSZ pszBuf);
  39. APIRET LineWrite(INT fIndex, PSZ pszBuf);
  40. APIRET FileSeek(INT fIndex, LONG *plMove, ULONG ulDirection);
  41.