Desktop Functions: Smart Device Functions:
|
Search Results for "WriteFile" in [All]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) && 3: 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. The same applies to the overlapped structure. 4: WriteFile
static extern bool WriteFile(IntPtr hFile, byte [] lpBuffer,
static extern unsafe int WriteFile(IntPtr handle, IntPtr buffer,
static extern bool WriteFile(IntPtr hFile, System.Text.StringBuilder lpBuffer,
static extern bool WriteFile(IntPtr hFile, System.Text.StringBuilder lpBuffer,
Private Shared Function WriteFile(ByVal hFile As IntPtr, ByVal Buffer As IntPtr,
<DllImport("kernel32.dll", SetlastError:=True)> Friend Shared Function WriteFile( _
Public Shared Function WriteFile( _ The documentation states that if using unbuffered IO, the memory must be "storage aligned" (aligned to the sector size of the storage device). Either this is not enforced, or managed allocations (specifically byte arrays) are automatically storage aligned because there seems to be no problem using it. Note that storage aligned and page aligned are not the same, and managed allocations are not in general page aligned (required for WriteFileScatter). 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(hDriver, ip, DataLength + 6, dwBytesWritten, Nothing) Then ReadFile, WriteFileGather, ReadFileScatter 5: 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, 7: _lwrite This function is provided for compatibility with 16-bit versions of Windows. New applications should use the WriteFile function. advapi328: Tyde
rapi9: 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 setupapi10: Option Explicit Private Declare Function WriteFile Lib “kernel32″ _ Ret = WriteFile(DeviceHandle, PrintOut, _ Structures11: COMMTIMEOUTS
coredll12: WriteFile
|