-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Clarification about hdt_load_in_memory_assembly #77375
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsAs stated here,
|
The If you're looking for details on how IJW loading works, some of it is described here: https://github.com/dotnet/runtime/blob/main/docs/design/features/IJW-activation.md /cc @elinor-fung |
Yeah, that was exactly what I was looking for sadly :( |
Sorry - IJW is an old (and bad) term - it stands for "It Just Works" (really bad name). What it really means is CPP/CLI - it's to support loading of CPP/CLI assemblies (so code written in C++ which can be both native and managed in one assembly). One consequence is that the |
@matteoumili could you share details about your scenario and use-case? Do you basically want the equivalent of Assembly.Load(byte[]) from native hosting (that is, you have a pointer to the bytes of the assembly to load)? As @vitek-karas mentioned, we don't have a simple way to do this, so I'd like a better sense of the cases that would benefit from something like this. |
I've seen a similar request (can't find the issue now) where the scenario was basically a native app (think something like a game or similar) where it wanted to use managed code for something. But it had a hard requirement to be a single file on disk. So the idea was to carry the managed dll as embedded resource for the native host. And it would then load it - "from memory" through the hosting APIs. Unfortunately we can't do that currently, we require at least one managed dll on disk. |
Closing for now as the question appears to be answered. |
As stated here,
int hostfxr_get_runtime_delegate(const hostfxr_handle host_context_handle, hostfxr_delegate_type type, void ** delegate);
can be called with the valuehdt_load_in_memory_assembly
fortype
parameter.But it is really unclear what kind of delegate will be returned. By the name we can assume that is some kind of function that loads an assembly from memory, but the method signature can't be found anywhere.
The text was updated successfully, but these errors were encountered: