-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Why not just name it litehtml.dll and avoid all this muck?
public class LibInterop : ILibInterop
{
#if WINDOWS
const string LiteHtmlLibFile = "LiteHtmlLib.dll";
public const CharSet cs = CharSet.Unicode;
#else
const string LiteHtmlLibFile = "litehtml";
public const CharSet cs = CharSet.Ansi;
#endif
const string LiteHtmlLibFile_x64 = "x64\\LiteHtmlLib.dll";
const string LiteHtmlLibFile_x86 = "x86\\LiteHtmlLib.dll";
public const CallingConvention cc = CallingConvention.Cdecl;
readonly static Lazy<LibInterop> _instance = new Lazy<LibInterop>(() => new LibInterop());
public static LibInterop Instance => _instance.Value;
LibInterop()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
LoadLibrary(Environment.Is64BitProcess ? LiteHtmlLibFile_x64 : LiteHtmlLibFile_x86);
}
}
I've got things working groovy on Linux with my dotnet Core 3.1 app and I'd rather not have compilation conditionals. The easiest fix would be to just name the library htmllib.dll.
Metadata
Metadata
Assignees
Labels
No labels