Desktop Functions: Smart Device Functions:
|
Search Results for "SafeFileHandle" in [All]kernel321: CloseHandle For .NET 2.0, consider using Microsoft.Win32.SafeHandles.SafeFileHandle instead. It can be used where IntPtr is used. If you use a SafeFileHandle, do not call CloseHandle as the CLR will close it for you (even if it's already closed). 2: CreateFile
return CreateFileMapping(File.SafeFileHandle.DangerousGetHandle(), IntPtr.Zero, flProtect, Hi, Lo, lpName);
return CreateFileMapping(File.SafeFileHandle.DangerousGetHandle(), IntPtr.Zero, flProtect, Hi, Lo, lpName);
Microsoft.Win32.SafeHandles.SafeFileHandle hDevice,
ByVal hDevice As Microsoft.Win32.SafeHandles.SafeFileHandle, _
SafeFileHandle hDevice,
IntPtr fileHandle=f.SafeFileHandle.DangerousGetHandle();
static extern bool FlushFileBuffers(SafeFileHandle hFile);
static extern bool GetCommModemStatus(SafeFileHandle hFile, out uint lpModemStat); Get the SafeFileHandle from call to CreateFile
static extern SafeFileHandle CreateFile(string lpFileName, uint dwDesiredAccess,
Private Shared Function CreateFile(ByVal lpFileName As String, ByVal dwDesiredAccess As System.UInt32, ByVal dwShareMode As System.UInt32, ByVal lpSecurityAttributes As IntPtr, ByVal dwCreationDisposition As System.UInt32, ByVal dwFlagsAndAttributes As System.UInt32, ByVal hTemplateFile As IntPtr) As Microsoft.Win32.SafeHandles.SafeFileHandle 8: SetCommBreak
static extern bool SetCommBreak([InAttribute] SafeFileHandle fileHandle);
SetFileInformationByHandle(fileStream.SafeFileHandle, FileInformationClass.FileDispositionInfo, ref FileInformation, Marshal.SizeOf(FileInformation.FILE_DISPOSITION_INFO)); 10: SetFilePointer
SafeFileHandle hFile, long liDistanceToMove, 11: SetFilePointerEx
SafeFileHandle hFile, long liDistanceToMove, In the Microsoft .NET Framework version 2.0, you should use a SafeFileHandle instead of an IntPtr to refer to hNamedPipe.
static extern bool SetNamedPipeHandleState(SafeFileHandle hNamedPipe, IntPtr lpMode,
ByVal hNamedPipe As SafeFileHandle, _ ntdll13: NtCreateFile
public static extern int NtCreateFile(out SafeFileHandle handle, FileAccess access, OBJECT_ATTRIBUTES* objectAttributes, IO_STATUS_BLOCK* ioStatus, ref long allocSize, uint fileAttributes, FileShare share, uint createDisposition, uint createOptions, IntPtr eaBuffer, uint eaLength);
out Microsoft.Win32.SafeHandles.SafeFileHandle handle,
Microsoft.Win32.SafeHandles.SafeFileHandle hFile;
out SafeFileHandle DirectoryHandle,
SafeFileHandle h;
out SafeFileHandle LinkHandle,
SafeFileHandle h;
SafeFileHandle DirectoryHandle,
static extern IntPtr NtQueryInformationFile(SafeFileHandle fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);
IntPtr iprc = NtQueryInformationFile(fs.SafeFileHandle, ref iosb, p_fbi, (uint)Marshal.SizeOf(fbi), FILE_INFORMATION_CLASS.FileBasicInformation);
SafeFileHandle LinkHandle, wintrust19: IsCatalogFile
SafeFileHandle hFile, For .NET versions prior to 2.0, replace SafeFileHandle with IntPtr
SafeFileHandle invalidHandle = new SafeFileHandle(new IntPtr(-1), true);
if (IsCatalogFile(fs.SafeFileHandle, null)) dbghelp
MiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), file.SafeFileHandle.DangerousGetHandle(), MiniDumpWithFullMemory, ref info, IntPtr.Zero, IntPtr.Zero ); hid21: HidD_FlushQueue
static extern Boolean HidD_FlushQueue(SafeFileHandle HidDeviceObject);
Declare Function HidD_FlushQueue Lib "hid.dll" (SafeFileHandle HidDeviceObject) As Boolean
internal HIDP_CAPS GetDeviceCapabilities( SafeFileHandle hidHandle ) 23: HidD_GetFeature
static extern Boolean HidD_GetFeature(SafeFileHandle HidDeviceObject, ref Byte lpReportBuffer, Int32 ReportBufferLength);
Declare Function HidD_GetFeature Lib "hid.dll" (ByVal HidDeviceObject As SafeFileHandle, out lpReportBuffer As Byte, ReportBufferLength As Int32) As Boolean
Public Shared Function HidD_GetFeature(hidDeviceObject As SafeFileHandle, ByVal reportBuffer As Byte(), ByVal reportBufferLength As UInt32) As Boolean
SafeFileHandle HidDeviceObject,
ByVal HidDeviceObject As SafeFileHandle, _ |