Read open file on target computer


void xPCFSReadFile(int port, int fileHandle, unsigned int start,
unsigned int numbytes, unsigned char *data);


Do not use this C API type definition. Support for this type definition relies on support for the C API, which will be removed in a future release.



Enter the value returned by the function xPCOpenTcpIpPort.


Enter the file handle of an open file on the target computer.


Enter an offset from the beginning of the file from which this function can start to read.


Enter the number of bytes this function is to read from the file.


The contents of the file are stored in data.


The xPCFSReadFile function reads an open file on the target computer and places the results of the read operation in the array data. fileHandle is the file handle of a file previously opened by xPCFSOpenFile. You can specify that the read operation begin at the beginning of the file (default) or at a certain offset into the file (start). The numbytes parameter specifies how many bytes the xPCFSReadFile function is to read from the file.

The largest single file that you can create on the target computer is 4 GB.

Introduced before R2006a