Marshaling to and from COM interface pointers isn't supported (.net core 2.1)
See original GitHub issuecentos7 64bit .net core2.1 exception was thrown when running
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal ‘parameter #2’: Invalid managed/unmanaged type combination (Marshaling to and from COM interface pointers isn’t supported). at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t) at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t) at InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation…ctor(LibraryLoader loader) — End of inner exception stack trace — at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at InteropDotNet.InteropRuntimeImplementer.CreateInstanceT at Tesseract.Interop.TessApi.Initialize() at Tesseract.Interop.TessApi.get_Native() at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode, IEnumerable
1 configFiles, IDictionary
2 initialOptions, Boolean setOnlyNonDebugVariables) at TesseractCore.Program.Main(String[] args)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Yes thanks for the info I’ll have a look at why that call fails and see if we can get a linux build together.
On Tue., 4 Sep. 2018, 03:16 HelgeL, notifications@github.com wrote:
Well, my code started to work after commenting BaseAPIProcessPage declaration.