diff --git a/HTMLconvert/Core/Services/WkHtmlTox.cs b/HTMLconvert/Core/Services/WkHtmlTox.cs index f5919b6..29edace 100644 --- a/HTMLconvert/Core/Services/WkHtmlTox.cs +++ b/HTMLconvert/Core/Services/WkHtmlTox.cs @@ -35,7 +35,7 @@ public unsafe static class WkHtmlTox [DllImport(DLLNAME, CharSet = CHARSET)] public static extern int wkhtmltoimage_get_global_setting(IntPtr settings, IntPtr name, IntPtr value, int vs); - [DllImport(DLLNAME, CharSet = CHARSET, CallingConvention = CallingConvention.StdCall)] + [DllImport(DLLNAME, CharSet = CHARSET, CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr wkhtmltoimage_create_converter(IntPtr globalSettings, IntPtr data); [DllImport(DLLNAME, CharSet = CHARSET, CallingConvention = CallingConvention.Cdecl)] diff --git a/HTMLconvert/HTMLconvert.csproj b/HTMLconvert/HTMLconvert.csproj index db2e530..3161b81 100644 --- a/HTMLconvert/HTMLconvert.csproj +++ b/HTMLconvert/HTMLconvert.csproj @@ -13,10 +13,10 @@ https://github.com/imaxs/HTMLconvert - 1.0.0 - 1.0.0 - 1.0.0 - 1.0.0 + 1.0.1 + 1.0.1 + 1.0.1 + 1.0.1 diff --git a/HTMLconvert/ImageTools.cs b/HTMLconvert/ImageTools.cs index edf1c16..30d34fe 100644 --- a/HTMLconvert/ImageTools.cs +++ b/HTMLconvert/ImageTools.cs @@ -98,7 +98,7 @@ public IntPtr CreateConverter(IntPtr globalSettings) public IntPtr CreateConverter(IntPtr globalSettings, string htmlContent) { - return WkHtmlTox.wkhtmltoimage_create_converter(globalSettings, ToPointer(htmlContent)); + return WkHtmlTox.wkhtmltoimage_create_converter(globalSettings, Marshal.StringToHGlobalUni(htmlContent)); } public void DestroyConverter(IntPtr converter)