Object IOFile

Object IOFile serves for realization of interaction with:

Server subroutines

GP.IOFILECREATE

Creates object IOFile.

GP.IOFILEDELETE

Deletes objectIOFile.

GP.IOFILEFN

Executes a method (function) of object IOFile.

GP.IOFILESUB

Executes a method (procedure) of object IOFile.

 

Communications Resource

A process uses the OPENCOMFILE function to open a handle to a communications resource. For example, specifying COM1 opens a handle to a serial port, and LPT1 opens a handle to a parallel port. If the specified resource is currently being used by another process, CreateFile fails. Any thread of the process can use the handle returned by CreateFile to identify the resource in any of the functions that access the resource.

When using CreateFile to open a handle directly to a device, an application must use the special characters " \\ .\" to identify the device. For example, to open a handle to drive A, specify " \\ .\a:" for the lpszName parameter of CreateFile. The calling process can use the handle in the DeviceIoControl function to send control codes to the device.

When the process calls CreateFile to open a communications resource, it specifies the following attributes:

When the process uses OPENCOMFILE TO OPEN A COMMUNICATIONS resource, it must specify certain values for the following parameters:

Methods

GETTYPE Returns type IOFile
OPENCOMFILE Opens communication port.
CLOSEHANDLE Closing of the communication port open by method  OPENCOMFILE
SETSTYLE Sets styles
GetStyle Returns styles
SETSUBNAME Sets a name of the server subroutine which will be caused at occurrence of events
GETSUBNAME Retrieves a name of the server subroutine
READ Reads the information
WRITE Writes the information
WRITESTR Writes a string, coming to an end line feed.
WRITECHAR Writes the symbol
READSTR Reads the string
ReadChar Reads  the symbol
WRITEBLOCK Writes the block
READBLOCK Reads the block
SETDCB Sets the current configuration of a communications device.
GETDCB Retrieves the current configuration of a communications device.
SetCommState Configures a communications device according to the specifications in a device-control block.
PURGECOMM Discards all characters from the output or input buffer of a specified communications resource.
FlushFileBuffers Clears the buffers for the specified file and causes all buffered data to be written to the file.
ClearCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state.
BUILDCOMMDCB Fills a specified DCB structure with values specified in a device-control string.
BUILDCOMMTIMEOUTS Translates a device-definition string into appropriate device-control block codes and places them into a device control block.
SETTIMEOUTS Sets the time-out parameters for all read and write operations on a specified communications device.
GetTimeouts Retrieves the time-out parameters for all read and write operations on a specified communications device.
ClearCommError Retrieves information about a communications error and reports the current status of a communications device.
COMMCONFIGDIALOG Displays a driver-supplied configuration dialog box.
GETCOMMCONFIG Retrieves the current configuration of a communications device.
ESCAPECOMMFUNCTION Directs a specified communications device to perform an extended function.
GetCommMask Retrieves the value of the event mask for a specified communications device.
SETCOMMMASK Specifies a set of events to be monitored for a communications device.
GetCommModemStatus Retrieves modem control-register values.
GetCommProperties Retrieves information about the communications properties for a specified communications device.
GetCommState Retrieves the current control settings for a specified communications device.
GetDefaultCommConfig Retrieves the default configuration for the specified communications device.
SETCOMMBREAK Suspends character transmission for a specified communications device and places the transmission line in a break state.
SETCOMMCONFIG Sets the current configuration of a communications device.
SETDEFAULTCOMMCONFIG Sets the default configuration for a communications device.
SETUPCOMM Initializes the communications parameters for a specified communications device.
TRANSMITCOMMCHAR Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
SETERRORMODE

Controls whether the system will handle the specified types of serious errors, or whether the process will handle them.

CANCELIO Cancels all pending I/O operations that were issued by the calling thread for the specified file handle.
GetFileInformation Retrieves file information for a specified file.
LOCKFILE Locks a region in an open file.
GetFileSizeEx Retrieves the size of a specified file.
GetFileType Retrieves the file type of the specified file.
UNLOCKFILE Unlocks a previously locked region in an open file.
SETFILEVALIDDATA Sets the valid data length of the specified file.
SETFILESHORTNAME Sets the short name for the specified file.
SetEndOfFile Moves the end-of-file position for the specified file.
SETFILEPOINTER Moves the file pointer of an open file.
READDIRECTORYCHANGES Retrieves information describing the changes occurring within a directory.
SetBookMark Sets the bookmark indicating certain item
DeleteBookMark Deletes the bookmark
GETCRC16 Returns a check sum on algorithm CRC16 on an existing array
MOVEBOOKMARK Moves a bookmark
ClearReadBuffer Clears the buffer
GetArrCRC16 Returns a check sum on algorithm CRC16, after transfer to a file of an array