未验证 提交 ea8ece4a 编写于 作者: J Jeremy Koritzinsky 提交者: GitHub

Change HostPolicyMock to use CharSet.Auto now that it correctly switches to...

Change HostPolicyMock to use CharSet.Auto now that it correctly switches to Ansi (aka Utf8) on non-Windows. (#2031)
上级 53e8fea8
......@@ -10,37 +10,31 @@ namespace TestLibrary
{
public class HostPolicyMock
{
#if PLATFORM_WINDOWS
private const CharSet HostpolicyCharSet = CharSet.Unicode;
#else
private const CharSet HostpolicyCharSet = CharSet.Ansi;
#endif
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern int Set_corehost_resolve_component_dependencies_Values(
int returnValue,
string assemblyPaths,
string nativeSearchPaths,
string resourceSearchPaths);
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern void Set_corehost_set_error_writer_returnValue(IntPtr error_writer);
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr Get_corehost_set_error_writer_lastSet_error_writer();
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Auto)]
internal delegate void Callback_corehost_resolve_component_dependencies(
string component_main_assembly_path);
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[DllImport("hostpolicy", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern void Set_corehost_resolve_component_dependencies_Callback(
IntPtr callback);
private static Type _assemblyDependencyResolverType;
private static Type _corehost_error_writer_fnType;
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = HostpolicyCharSet)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public delegate void ErrorWriterDelegate(string message);
public static void Initialize(string testBasePath, string coreRoot)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册