Example 5
Overloading
[DllImport("Kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)] public static extern int CreateFile(String lpFileName, int dwDesiredAccess, int dwShareMode, IntPtr lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, int hTemplateFile); [DllImport("Kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)] public static extern int CreateFile(String lpFileName, int dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, int hTemplateFile);