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

The Archive Base Latest Questions

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

In my new project I want to use a existing C C++ functions .

  • 0

In my new project I want to use a existing C C++ functions . For that I would need to add the C/C++ dlls to C# project.

My C/C++ projects is of type UnManaged and it is not a COM Project. I have seen few articles after from MSDN and tried:

[DllImport("user32.dll", EntryPoint="MessageBoxA")]

But I am not sure Where should I place the user32.dll or my.dll. Do I need to place my dll in GAC or in some other physical folder.

If that is going to be a physical folder then , Don’t I need to use either relative or absolute path?

Also read few articles talking about porting the C++ dlls using InterOp but not quite sure how to start with.

  • 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-16T06:25:47+00:00Added an answer on May 16, 2026 at 6:25 am

    Please don’t put your own dll’s in C:\Windows\system32. If you’re going to use part of Windows, like user32.dll, you don’t put it anywhere, it’s already there and will be found at runtime because C:\Windows\system32 is on the path. If you’re going to use your own DLL, put it in the bin or bin\Debug or whatever folder, right next to your exe. This is most easily accomplished by adding it to the project so it will copy into the output directory when you build, but you could have an MSI or whatever. If it’s used by multiple applications you have to decide if you want them all to start using the new one when it’s updated, or to sit happy with their existing copies. That can be a complicated question and you have enough going on getting it working for one app, right?

    As for Entry Point, it’s the name of the function inside the DLL. If you’re using the same name in your managed code, you can leave it out. It lets you map a DLL function name that you may find complicated into a simpler name you’re using in your managed code.

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

Sidebar

Related Questions

I have an existing project in AppCode that I would like to use as
I'm working on a new project where I want to use Phil Haack Areas
i want to use stripes in our new project. This will take care of
I'm setting up a new project and I want to choose a license that
I want to create a new project in Xcode (4.2), but I don't need
I want to add a new filter to the Project Explorer, to hide from
I'm adding a new WPF project to an existing Visual Studio solution and would
I need to add some new functionality to an existing interface. There are already
I am starting development on a new project in an existing workspace. I want
We have the following code in wizard to add existing project to a new

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.