using Microsoft.Win32.SafeHandles; C# Signature: [DllImport("kernel32.dll", SetLastError = true, CharSet=CharSet.Unicode)] static extern SafeFileHandle CreateFile(string lpFileName, uint dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile); VB.NET <DllImport("kernel32.dll", SetLastError:=True, CharSet:=CharSet.Unicode)> _ 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
Edit kernel32.SafeFile...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.