Skip to content

Ijwhost.dll loading not always working for C++/CLI assembly. #37972

@obiwanjacobi

Description

@obiwanjacobi

I am working on a solution where managed plugins are loaded into (3rd party) native host applications. The managed plugins use a C++/CLI interop library (part of my project) to let the native host recognize it as an native plugin and load it. That interop library then loads the managed plugin and marshals the calls between host and plugin. All plugin files are deployed into a single directory (ala dotnet publish) - including ijwhost.dll. So far so good.

But some hosts fail to load the plugin. I am uncertain of the reason why but I think it has to do with where the current directory is pointing to? Anyway when I copy the ijwhost.dll into the host's .exe location, it works again. In this situation setting the environment variables to do a core-host trace does not produce any results - not even a trace file. Which seem to indicate that the whole ijwhost-mechanism is not starting up (I have no knowledge of how that works in detail).

I am looking for ideas and suggestions of how I could try to fix this problem because having to copy a dll into a 3rd parties install folder is very 'suboptimal' for me and all the people that will use products build with my library.

Here is the project source code and ask if you need more info or want me to try something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions