-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method calling fails after loading and also multiple instances issue #12
Comments
Hmm, can you provide an example project that I can reproduce? Also, check if your library uses thread-local storage, they are still not properly supported on Windows (even with the original MemoryModule, check this issue). |
Forgot to mention, this dll uses some huge data files which are needed for its operation but l don’t know if I can share those out. |
Without data files I cannot check whether your app worked as expected. Try using the latest stable version from NuGet, here. Using the source from |
I have reproduced the error using the latest prerelease. Clearly the latest packages contain some regressions. Once again, I advise you to use the latest stable version from NuGet, and avoid using any thread-local storage (the C++11 |
Update: I used the DotNetAccess code here and it works. So, not sure what is different in your library, so for now, I will settle with copy/loading from disk. Thank you for your responses! |
There is a known issue with function pointer resolution that has been fixed in a517af1. If you are still interested, you might want to try the latest dev package (version I've tried it with your demo project, things seem to work. |
hi, I am trying to use your library to run a legacy dll in multiple threads to avoid global data overwrite.
issue1: method call succeeds if using dllimport, but fails for the dll loaded with this library even though getdelegate works fine.
e.g. new declaration:
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void StartSession(out int SessionId);
old declaration:
[DllImport("xyz.dll")]
private static extern void StartSession(out int sessionId);
issue2: if I copy dll into 2 and rename both to dll-1.dll and dll-2.dll, the first one succeeds loading while the second one fails at
"// notify library about attaching to process
bool successfull /sic/ = DllEntry(code, Dll.ProcessAttach, null);" in your NativeAssemblyImpl.cs.
Do you have any advice of how to fix both of these issues?
Note: looks like I need to use WINDOWS symbol but then I get compilation error?
The text was updated successfully, but these errors were encountered: