Documentation

xPCFSReadFile

Read open file on target computer

Prototype

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

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

fileHandle

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

start

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

numbytes

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

data

The contents of the file are stored in data.

Description

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

Was this topic helpful?