Skip to content

Method calling fails after loading and also multiple instances issue #12

Open
@gl2007

Description

@gl2007

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions