static LtpFactory() { string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, string.Format("{0}\\ltpcsharp.native.dll", (IntPtr.Size == 4) ? "x86" : "x64")); Assembly dll = Assembly.LoadFile(fileName); factory = (LtpCsharp.Common.ILtpFactory)dll.CreateInstance("ltpcsharp_native.LtpFactory"); if (factory == null) { throw new Exception("ltpcsharp.native.dll 加载错误"); } }
static LtpFactory() { string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, string.Format("{0}\\ltpcsharp.native.dll", (IntPtr.Size == 4) ? "x86" : "x64")); Assembly dll = Assembly.LoadFile(fileName); factory = (LtpCsharp.Common.ILtpFactory)dll.CreateInstance("ltpcsharp_native.LtpFactory"); if (factory == null) { throw new Exception("ltpcsharp.native.dll 加载错误"); } }