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; /* Pointer to the ULONG in which the number of bytes actually read is returned. */
FHLOCK fhFileHandleLockID; /* The filehandle lockid obtained from DosProtectOpen. */
APIRET ulrc; /* Return Code. */
ulrc = DosProtectRead(hFile, pBuffer, cbRead,
pcbActual, fhFileHandleLockID);