8000 Failed loading '...': Check used architecture or existence of file.[Error: 126] · Issue #18 · 3F/Conari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Failed loading '...': Check used architecture or existence of file.[Error: 126] #18

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

Closed
zy97 opened this issue Apr 13, 2021 · 5 comments
Closed
Labels

Comments

@zy97
Copy link
zy97 commented Apr 13, 2021

Describe the bug
I have a net5 wpf x32 program that references a dynamic link library where a function opens a dialog box with the current program as its owner, the first call without any problems, but when the dynamic library is re-instantiated later and the call throws an exception like the title
What code is involved

image

Expected behavior

Screenshots

@3F
Copy link
Owner
3F commented Apr 13, 2021

126 (0x7E) means specified module could not be found. Including its dependencies and dependencies of each dependency... make sure.

but when the dynamic library is re-instantiated later and the call throws an exception like the title

Please provide some details how the mentioned "re-instantiated" was implemented there. And how is access going? DlR? lambda?
It would be better to see some demo project to reproduce same error for my machine.

@zy97
Copy link
Author
zy97 commented Apr 14, 2021

Re-instantiation is to new class again inherited from ConariL, and the function of the dynamic link library is operated by the DLR, which, sorry, does not provide demo because it requires a specific environment to invoke the dynamic link library

@3F
Copy link
Owner
3F commented Apr 14, 2021

Well I need at least know the hierarchy of the calling for the first requests and the second.

Re-instantiation is to new class

How? Did you release all resources before new trying?

Also keep this in your mind #15 (comment)

btw,

inherited from ConariL, and the function of the dynamic link library is operated by the DLR,

I recommend ConariX if DLR is for primary use

@zy97
Copy link
Author
zy97 commented Apr 15, 2021

Thanks for answering my question, now I use singleton to solve this problem

@3F
Copy link
Owner
3F commented Apr 15, 2021

Thanks for answering my question, now I use singleton to solve this problem

Good! Nice to hear that everything works well!

For everyone, please note the following

  • ConariX and ConariL implements IDisposable interface. Disposing must be processed with other objects to release all managed and unmanaged resources. 'Where' and 'How' depends on specific implementation. To clarify, please use MSDN and so on.

  • Starting with 1.4 Conari provides optional isolation between processes according to LoadLibrary/Ex vs Conari. Same memory regions between processes and threads #15 (comment). Configure it through IConfig if you need. See our mta tests for details, for example:

await mtaRun(() =>

Also note that starting with 1.5 you will be able provide your custom isolation as needed, for example:

ModuleIsolationRecipe = rcp

Thanks for using!

@3F 3F added the question label Apr 15, 2021
@3F 3F closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0