[DllImport("msvcrt.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi, SetLastError=true)]
public static extern IntPtr fopen(String filename, String mode);
[DllImport("msvcrt.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Unicode, SetLastError=true)]
public static extern IntPtr _wfopen(String filename, String mode);
<DllImport("msvcrt.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Ansi, SetLastError:=True)> _
Public Shared Function fopen(ByVal filename As String, ByVal mode As String) As IntPtr
End Function
<DllImport("msvcrt.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, SetLastError:=True)> _
Public Shared Function _wfopen(ByVal filename As String, ByVal mode As String) As IntPtr
End Function
Use _wfopen whenever possible; fopen doesn't support Unicode.
Please add some!
Please add some!