Guavaman
Guavaman

Reputation: 450

Loading a native library from a byte array in managed code (Mono) in OSX/Linux/Windows

Is it possible to load a native unmanaged library from managed code (Mono) from a byte array? I know DLLImport can be used to load a library from the system, but I want to be able to load a library on-demand from within the managed assembly stored as a byte array.

I'm primarily concerned with how to do it in OSX, but Linux and/or Windows would be an extra bonus.

Upvotes: 0

Views: 321

Answers (1)

jstedfast
jstedfast

Reputation: 38608

No, it's not possible to do this. You might be able to extract the native library and save it to disk, and then P/Invoke into it, though.

Upvotes: 2

Related Questions