Desktop Functions: Smart Device Functions:
|
Search Results for "ReadFile" in [All]Structures1: COMMTIMEOUTS Maximum time allowed to elapse between the arrival of two bytes on the communications line, in milliseconds. During a ReadFile operation, the time period begins when the first byte is received. If the interval between the arrival of any two bytes exceeds this amount, the ReadFile operation is completed and any buffered data is returned. A value of zero indicates that interval time-outs are not used. If an application sets ReadIntervalTimeout and ReadTotalTimeoutMultiplier to MAXDWORD and sets ReadTotalTimeoutConstant to a value greater than zero and less than MAXDWORD, one of the following occurs when the ReadFile function is called: ->If there are any bytes in the input buffer, ReadFile returns immediately with the bytes in the buffer. ->If there are no bytes in the input buffer, ReadFile waits until a byte arrives and then returns immediately. ->If no bytes arrive within the time specified by ReadTotalTimeoutConstant, ReadFile times out. setupapiPrivate Declare Function ReadFile Lib “kernel32″ _ rapi3: CeReadFile
kernel32
private static extern bool ReadFile(IntPtr handle,
// first read the data into an internal buffer since ReadFile cannot read into a buf at
bool f = ReadFile(_handle, buf, (uint)count, ref read, IntPtr.Zero);
throw new Win32Exception(Marshal.GetLastWin32Error(), "ReadFile failed");
if (!Win32.ReadFile(handle, data, length, out len, IntPtr.Zero))
FsctlReadFileUsnData = (EFileDevice.FileSystem << 16) | (58 << 2) | EMethod.Neither | (0 << 14), 6: FreeLibrary
private void ReadFile() { Warning! GetOverlappedResult writes to the address of the buffer specified in the ORIGINAL OPERATION (ie/ ReadFile or WriteFile). .NET may move the address of the buffer before GetOverlappedResult returns, resulting in a buffer overflow. Use AllocHGlobal and FreeHGlobal or otherwise ensure the buffer is pinned between the two calls. 8: ReadFile
static extern bool ReadFileScatter(IntPtr hFile, FILE_SEGMENT_ELEMENT []
static extern unsafe int ReadFileScatter(IntPtr hFile, 9: ReadFileEx
static extern bool ReadFileEx(IntPtr hFile, [Out] byte [] lpBuffer, ReadFileCompletionDelegate <- need to define this 10: ReadFileScatter
11: WriteFile
12: WriteFileGather
|