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 4110908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:59:47+00:00 2026-05-20T21:59:47+00:00

I am in the process of creating a CLI project to wrap around an

  • 0

I am in the process of creating a CLI project to wrap around an existing native c++ project (two separate projects in the same solution file). I’d like to include a pointer to a native class as a member in a managed class. From the documentation that I’ve read online, this can be done if both the managed and unmanaged code are together in the same project. If the native and managed code are in separate projects, then the only option is to use dllimport and dllexport attributes between the two projects, and to export the native code class functions as static functions.

Are these my only options, or can I import and export an entire native class between two separate projects? I’m asking because this determines how I design my managed wrapper. Thanks in advance.

  • 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-20T21:59:48+00:00Added an answer on May 20, 2026 at 9:59 pm

    Well the word “pointer” threw me for a minute. You mean you want to use some native code from your C++/CLI code without P/Invoke? Sure. Just include-the-header, link-to-the-lib. Exactly what you’d do if they were both native. These days it’s called C++ Interop – I like the old name (It Just Works Interop) better.

    You can of course include a header from anywhere, and add a linker input from anywhere, so they technically don’t have to be in the same .sln, but Visual Studio will make your life a little easier if they are.

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

Sidebar

Related Questions

We are creating a Real-Time Process in VxWorks 6.x, and we would like to
I am creating a new build process for a DotNet project which is to
I'm in the process of creating a class that stores metadata about a particular
I am in the process of creating an XML Schema and one of my
I am currently in the process of creating my own blog and I have
I'm passing some numeric arguments while creating a process (in VC++) I'm stuck at
I am creating a pdf document using C# code in my process. I need
I have been tasked with creating a reusable process for our Finance Dept to
I'm thinking of creating a generic message queue to handle various inter-process messages. (WCF
I'm creating child processes with fork() in C/C++. When the parent process ends (or

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.