Hello,I am trying to use liblouis and liblouisutdml from .NET, but I am having some problems with some function calls causing a crash.
I am using it from a C# project, using it using platform/invoke (IE. with DllImport). This seemed simpler than using it through C++-cli.
For a time I am sure I had this all working, but then suddenly the lou_setDataPath function call seemed to stop working, although other function calls seem to still be working fine. My function definition of the lou_setDataPath function is: [DllImport("liblouis.dll", EntryPoint="lou_setDataPath", CharSet=CharSet.Ansi, ExactSpelling=true)]
[return: MarshalAs(UnmanagedType.LPStr)]public static extern String SetDataPath([MarshalAs(UnmanagedType.LPStr)] String path);
I get no exceptions and the only information I get is that my application exits with error code 0x4000001f on 32-bit and the 64-bit version exits with error code 0x80000003. The Microsoft information is less than helpful on these matters, giving me no clue as to the cause.
Interestingly if I load the 32-bit liblouis.dll in dependency walker it reports errors in the DLL and the following appears in its warnings box: Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.I have tried recompiling a few times, even on a 32-bit system but still get these warnings.
I do not get the warnings in dependency walker for the 64-bit DLL.Other function calls I make to the liblouis.dll from my application seem to work, but I need to use the lou_setDataPath function for it to be possible to place files where I want and so of any use in my application.
What is wrong with this? How might I get more information as to the cause of the problem?
Michael Whapples For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com