Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 1
    The assembly.Load() method or its overloads cannot load unmanaged libraries (e.g. C/C++ dlls). You need to use C#'s interoperability functionalities (e.g. DllImportAttribtute). Google for C/C++ interoprability/pinvoke for further information. Commented Oct 8, 2016 at 17:53
  • This question may help. Commented Oct 8, 2016 at 17:56
  • @f.nasim Thanks. But in that question I think the user is trying to execute a function that is inside the dll itself. I don't want that. I have a full application written in C++ that I want to run, but directly from its binary code. Commented Oct 8, 2016 at 18:09
  • @f.nasim And also, I need to decrypt the C++ application before running it. Commented Oct 8, 2016 at 18:12
  • @MichalHainc But I don't want to create any file to run it. I want to run it from the memory or inject the code in other process. Commented Oct 8, 2016 at 19:07