When I use P/Invoke for calling CreateFile like:
[DllImport("kernel32.dll")]
public static extern SafeFileHandle CreateFile(
string lpFileName,
uint dwDesiredAccess,
uint dwShareMode,
IntPtr SecurityAttributes,
uint dwCreationDisposition,
uint dwFlagsAndAttributes,
IntPtr hTemplateFile
);
how does Windows decide to call CreateFileA or CreateFileW?