home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
os2prgc.zip
/
file_io.h
< prev
next >
Wrap
Text File
|
1995-03-06
|
2KB
|
41 lines
/*****************************************************************************
FILE_IO.H -- Sample code for handling FILE I/O with Dos...() API functions.
Copyright (C) 1993,94,95 by Craig Morrison, All Rights Reserved.
You may use this code in your own projects, regardless of renumeration.
All I ask is that you prominently display the above copyright notice.
Should you need assistance, I can be contacted at the following addresses:
Fidonet: Craig Morrison, 1:201/60@fidonet.org
Internet: cam@wpc.cioe.com
Post: Craig Morrison
1316 Ferry St.
Lafayette, IN 47901-1533
USA
NOTES:
You'll notice the complete lack of any references to run-time
library functions. This was done on purpose so that *I* could
control what happens when a thread gets killed. This package
contains just about everything you'll need to do comm port/file
I/O, string manipulation and ordinal number conversions.
*****************************************************************************/
BOOL InitFileIO(VOID);
VOID CleanUpFileIO(VOID);
HFILE GetHandleFromInt(INT fIndex);
INT OpenFile(PSZ pszFileName, PULONG pulAction, ULONG cbFile,
ULONG ulAttribute, ULONG fsOpenFlags, ULONG fsOpenMode,
PEAOP2 peaop2);
VOID CloseFile(INT fIndex);
VOID CloseAllFiles(VOID);
APIRET BlockRead(INT fIndex, PVOID p, PULONG cbBuffer);
APIRET BlockWrite(INT fIndex, PVOID p, PULONG cbBuffer);
APIRET LineRead(INT fIndex, PSZ pszBuf);
APIRET LineWrite(INT fIndex, PSZ pszBuf);
APIRET FileSeek(INT fIndex, LONG *plMove, ULONG ulDirection);