CodefoundryDE / LegacyWrapper

LegacyWrapper uses a x86 wrapper to call legacy dlls from a 64 bit process (or vice versa).
MIT License
80 stars 20 forks source link

Deserialization issue #8

Closed ssrakesh closed 5 years ago

ssrakesh commented 6 years ago

I am sending private delegate (as shown in Readme) through Invoke function template, during de-serialization in client, it tries to load my main app assembly and fails. Any solution to this?

zalintyre commented 6 years ago

Can you share some code and explanation what triggers the exception?

zalintyre commented 5 years ago

Please have a look at the new version 3.0 and see if the issue persists.

ssrakesh commented 5 years ago

Please have a look at the new version 3.0 and see if the issue persists.

Thanks a lot, I used v 3.0 in my project and got following exceptions

Exception thrown: 'Castle.DynamicProxy.Generators.GeneratorException' in Castle.Core.dll Exception thrown: 'System.TypeInitializationException' in project.exe An exception of type 'System.TypeInitializationException' occurred in project.exe but was not handled in user code The type initializer for 'Project.Settings.NativeOldDllWrapper' threw an exception.

I cannot share more info, but some detailed error message could have helpful from library. I suspect the issue with dll loading from different output folder, and will try to investigate further.

New interface is certainly easy to use.

ssrakesh commented 5 years ago

-Update: The issue was solved by making the interface public. and it works with my project. this certainly brings life to old projects stuck with 32bit helper libraries, now we can easily migrate to 64bit. Thanks a lot for your work.

zalintyre commented 5 years ago

That's great to hear, thanks! :)

zalintyre commented 5 years ago

I just released a fix that throws a more specific exception when the interface is not public.