Comments (11)
Hi,
it seems like you have compiled the Legacy Wrapper for yourself. If so, please ensure that the LegacyWrapper
project is compiled as 32bit (not AnyCPU) to match your C++ dll.
from legacywrapper.
Hello dsfranzi,
thanks for the quick reply.
The problem above was with the nugget package of Legacy.Wrapper.
I did try to manually build your example, with LegacyWrapper built in x86 and the others (Client and Test) in x64 however then I get the crash message below at Process.Start ("Codefoundry.LegacyWrapper.exe", token);. This was in Win7 x64
Problem Event Name: APPCRASH
Application Name: Codefoundry.LegacyWrapper.exe
Application Version: 1.0.1.0
Application Timestamp: 584fbbf8
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.18015
Fault Module Timestamp: 50b83c8a
Exception Code: e0434352
Exception Offset: 0000c41f
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
from legacywrapper.
In windows10 Legacy.Wrapper doesn't crash but the program just waits at _pipe.Connect();
from legacywrapper.
Thanks for this project, I wonder if the issue above is the same as one I found in that the caller of your client library needs to be compiled for AnyCpu as it causes a deserialisation issue in the 32 bit exe host otherwise, my library which called the client was compiled to 64bit so failed with the badimageformat exception in the exe.
Additionally, it seems the library isn't setup to return reference params to the caller, I assume there is no reason this can't be done and that DynamicInvoke can and does return ref param changes?
from legacywrapper.
@MiroljubA can you post some of your code calling the dll?
from legacywrapper.
@rjm2k I'll try to include support for ref params.
from legacywrapper.
I improved the error handling of the wrapper exe, so that exceptions thrown should be more detailed now. @MiroljubA if there are still unrelated exceptions, feel free to post them here.
Also, ref parameters are possible now, the values in your passed parameters array will get updated.
from legacywrapper.
awesome thanks, I'll try to check it out today and replace my local version with your updates.
Any idea how loading the lib each time affects internal state of any dll loaded? I was wondering it it would be better to create one WrapperClient per library to be called and passing the library name into the constructor instead of every time into invoke, that way a library can be loaded once, used and then disposed when finished.
from legacywrapper.
I think loading the DLL only once is a good idea. I'll think of a solution that won't break the exising API.
from legacywrapper.
@rjm2k please have a look at LegacyWrapper 2.0 ;)
I think this issue is solved now, but feel free to open a new one if you have more suggestions or encounter any problems.
from legacywrapper.
Yes already found it thanks, I can confirm that ref Param's and single load of the DLL work perfectly thanks. Just a comment to others that they still might have to compile the client of your library as msil but I haven't verified that after you introduced the common library.
from legacywrapper.
Related Issues (20)
- Dynamically define import dll HOT 13
- File not found System.ComponentModel.Win32Exception HOT 11
- net core portage HOT 1
- ARM64 Support? HOT 2
- System.ComponentModel.Win32Exception: 'The system cannot find the file specified'
- return 0x0000000000000000 is value HOT 9
- DLLs contain method names that are incompatible with version 3.0.0 + (EntryPointNotFoundException) HOT 1
- EntryPointNotFoundException: Unable to find an entry point named '{function}' in DLL '{MyC#32Bit}.dll' HOT 1
- LegacyWrapper32 will try to load a 64bit Assembly at ProcessMessage() HOT 2
- Performance issue HOT 9
- Example HOT 6
- strong names
- The system can't find the specify File HOT 1
- use for activex object HOT 1
- LegacyWrapper freezing when highlighting address. HOT 1
- cant not package with fody ? HOT 10
- Invalid pointer error for void *lp parameter
- Use LegacyWrapper from a 64bit DLL? HOT 5
- .NET 7 support HOT 1
- Is it possible to wrap a DLL belonging to commercial software? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legacywrapper.