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

  • SEARCH
  • Home
  • 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 6809921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:08:36+00:00 2026-05-26T20:08:36+00:00

I have been provided with an unmanaged C++ DLL that contains several classes. I

  • 0

I have been provided with an unmanaged C++ DLL that contains several classes.

I need to be able to use some of these classes in C#. Based on my research so far, it sounds like I need to create a C++/CLI wrapper DLL that would handle converting between managed and unmanaged types. I have seen some examples where someone would basically create a C++/CLI version of each class and it would contain an instance of the unmanaged C++ type. What is the best way to implement what I am trying to do here? There are maybe 10-15 classes provided in the unmanaged DLL. Right now I only need to use a few of them but may need to use more in the future. Thanks!

  • 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-26T20:08:37+00:00Added an answer on May 26, 2026 at 8:08 pm

    Yes, you need to create C++/CLI wrapper for this library, and use unmanaged classes internally in this wrapper. For unmanaged library which exposes C-style API, there is also PInvoke option, but it doesn’t work for C++ classes.

    You can also think about making COM wrapper, it you want to use this library both in native COM clients and .NET. But making C++/CLI wrapper is more simple task, I think.

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

Sidebar

Related Questions

I have been provided an XSD and a sample Xml file that contains the
I have been provided with an xsd that I compiled to Java classes using
I have been provided with a C++ DLL and associated header file in order
I have tried all the solutions that have been provided including using PRAGMA but
I'm developing an iPad application. I have been provided with a PNG image that
I have a C# application that uses an unmanaged C++ DLL. I've found a
I have been trying to call some functions from a library provided by a
I have been provided with a rotation matrix to use: and have entered the
I have been provided with a WSDL and have generated the proxy class based
I have been trying to use the server side api provided by Urban Airship

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.