Reads the specified number of bytes from a file, pipe, or device to a buffer location.

#define INCL_DOSFILEMGR
#include <os2.h>

HFILE     hFile;      /*  File handle obtained from DosOpen. */
PVOID     pBuffer;    /*  Address of the buffer to receive the bytes read. */
ULONG     cbRead;     /*  The length, in bytes, of pBuffer. */
PULONG    pcbActual;  /*  Address of the variable to receive the number of bytes actually read. */
APIRET    ulrc;       /*  Return Code. */

ulrc = DosRead(hFile, pBuffer, cbRead, pcbActual);


[Back] [Next]