Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6371349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:03:16+00:00 2026-05-25T01:03:16+00:00

How to dynamically load a managed (.Net) DLL in unmanaged code? I’m creating a

  • 0

How to dynamically load a managed (.Net) DLL in unmanaged code?

I’m creating a plugin system in C++ that gets injected into an application and I would like to be able to write C# plugins.

I’ve searched a bit but could only find COM loading (with #import), but I don’t know how to do that at runtime, if it’s possible.

The C# DLL (Plugin) could call functions in the C++ DLL (Plugin Manager).

I would prefer a solution that doesn’t require me to compile the C++ DLL with /clr.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:03:16+00:00Added an answer on May 25, 2026 at 1:03 am

    There are multiple issues here.

    I would prefer a solution that doesn’t require me to compile the C++ DLL with /clr.

    At some level, to use a C# DLL, you’ll need to bootstrap the CLR. Using /clr has a huge advantage – you can provide a truly managed API for the C# plugin to work against.

    Your main other options are to either use COM, and provide a COM based API. This will work fine from C# as well as other languages, and take care of loading the CLR for you. The only other API is to self-host the CLR using the hosting APIs. This provides you the most control, but is definitely a fair amount of extra work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code that dynamically load 10 different textfields in viewdidload method now if
I dynamically load a UserControl into a View that's in a MultiView control. Although
How can I dynamically load a usercontrol in ASP.NET if I dont have access
I am using an JavaScript (and AJAX) to dynamically load a PHP page into
I know. It is possible to dynamically load JavaScript and style sheet file into
I've recently been told to use Panels to dynamically load content into different sections
I want to dynamically load (AJAX) the text from some Microsoft Word files into
I'd like to dynamically load and use a .Net assembly created in C# from
I dynamically load in a few li's that have a label and a checkbox
How can I dynamically load stylesheets into the head section in Magento only on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.