Classes | |
| class | ImportedFunctions |
Public Member Functions | |
| bool | CreateFile (string lpFileName, GenericAccessRights dwDesiredAccess, ShareMode dwShareMode, CreationDisposition dwCreationDisposition, FileAttrib dwFlagsAndAttributes) |
| This method opens a file or device. | |
| int | WriteFile (byte[] buffer) |
| Writes all of the buffer to the opened file or device. | |
| int | WriteFile (byte[] buffer, int BytesToWrite) |
| Writes data to the opened device. | |
| int | ReadFile (byte[] buffer) |
| Reads data from the file or device into a buffer. | |
| int | ReadFile (byte[] buffer, int BytesToRead) |
| Reads data from the file or device into buffer. | |
| int | DeviceIOControl (uint IOControlCode, ref byte[] WriteBuffer, ref byte[] ReadBuffer) |
| Sends a IO Control to the device. | |
| int | DeviceIOControl (uint IOControlCode, ref byte[] WriteBuffer, int WriteBufferLength, ref byte[] ReadBuffer, int ReadBufferLength) |
| Sends a IO Control to the device. | |
| bool | Close () |
| Closes the device or file. | |
Public Attributes | |
| IntPtr | FileHandle = (IntPtr)InvalidHandleValue |
| Handle to the Device or driver. | |
| public bool Digi::Common.DriverIO::Close | ( | ) |
Closes the device or file.
| public bool Digi::Common.DriverIO::CreateFile | ( | string | lpFileName, | |
| GenericAccessRights | dwDesiredAccess, | |||
| ShareMode | dwShareMode, | |||
| CreationDisposition | dwCreationDisposition, | |||
| FileAttrib | dwFlagsAndAttributes | |||
| ) |
This method opens a file or device.
| lpFileName | Pointer to a null-terminated string that specifies the name of the object, such as file, COM port, disk device, or console, to create or open. | |
| dwDesiredAccess | Type of access to the object. An application can obtain read-only access, write-only access, read/write access, or device-query access. | |
| dwShareMode | Share mode for the object. If this parameter is set to zero, the object cannot be shared. Subsequent open operations on the object fail until the handle is closed. | |
| dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist. The following table shows possible values. | |
| dwFlagsAndAttributes | File attributes and flags for the file. |
| public int Digi::Common.DriverIO::DeviceIOControl | ( | uint | IOControlCode, | |
| ref byte[] | WriteBuffer, | |||
| int | WriteBufferLength, | |||
| ref byte[] | ReadBuffer, | |||
| int | ReadBufferLength | |||
| ) |
Sends a IO Control to the device.
| IOControlCode | The IOCTL code to send | |
| WriteBuffer | A buffer with data to send to the file or device. | |
| WriteBufferLength | Size of the buffer to send | |
| ReadBuffer | A buffer to read data from the file or device. | |
| ReadBufferLength | Size of the boffer to read |
| public int Digi::Common.DriverIO::DeviceIOControl | ( | uint | IOControlCode, | |
| ref byte[] | WriteBuffer, | |||
| ref byte[] | ReadBuffer | |||
| ) |
Sends a IO Control to the device.
| IOControlCode | The IOCTL code to send | |
| WriteBuffer | A buffer with data to send to the file or device. | |
| ReadBuffer | A buffer to read data from the file or device. |
| public int Digi::Common.DriverIO::ReadFile | ( | byte[] | buffer, | |
| int | BytesToRead | |||
| ) |
Reads data from the file or device into buffer.
| buffer | The buffer to write data to. | |
| BytesToRead | Number of bytes to read |
| public int Digi::Common.DriverIO::ReadFile | ( | byte[] | buffer | ) |
Reads data from the file or device into a buffer.
| buffer | The buffer to write data to. |
| public int Digi::Common.DriverIO::WriteFile | ( | byte[] | buffer, | |
| int | BytesToWrite | |||
| ) |
Writes data to the opened device.
| buffer | A byte buffer containing data to write | |
| BytesToWrite | The number of bytes to write. |
| public int Digi::Common.DriverIO::WriteFile | ( | byte[] | buffer | ) |
Writes all of the buffer to the opened file or device.
| buffer | A byte buffer containing data to write. |
| IntPtr Digi.Common.DriverIO.FileHandle = (IntPtr)InvalidHandleValue |
Handle to the Device or driver.
1.5.9