Desktop Functions: Smart Device Functions:
|
Search Results for "WriteFile" in [All]Structures1: COMMTIMEOUTS
setupapiPrivate Declare Function WriteFile Lib “kernel32″ _ Ret = WriteFile(DeviceHandle, PrintOut, _ kernel32
private static extern bool WriteFile(IntPtr handle,
bool result = WriteFile(_handle, buffer, (uint)count, ref written, IntPtr.Zero); 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.
if (!WriteFile(hDevice, pBuffer, dwBytesToWrite, ref lpNumberOfBytesWritten, ref lpOverlapped) && 5: ReadFile
6: WriteFile
static extern bool WriteFileGather(IntPtr hFile, [Out] FILE_SEGMENT_ELEMENT []
static extern unsafe int WriteFileGather(IntPtr hFile, ReadFileScatter, ReadFile, WriteFile 7: WriteFileEx
static extern bool WriteFileEx(IntPtr hFile, byte [] lpBuffer,
WriteFileCompletionDelegate lpCompletionRoutine);
public delegate void WriteFileCompletionDelegate(UInt32 dwErrorCode,
static extern bool WriteFileEx(IntPtr hFile, byte [] lpBuffer,
WriteFileCompletionDelegate lpCompletionRoutine);
WriteFileEx(hfile, new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t' }, 4, ref ol, new WriteFileCompletionDelegate(Class1.callback));
static extern bool WriteFileGather(IntPtr hFile, [Out] FILE_SEGMENT_ELEMENT []
static extern unsafe int WriteFileGather(IntPtr hFile, 9: _lwrite This function is provided for compatibility with 16-bit versions of Windows. New applications should use the WriteFile function. rapi10: CeWriteFile
public static extern int CeWriteFile( function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeWriteFileRAPI.asp coredll11: WriteFile
|