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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:25:14+00:00 2026-06-02T01:25:14+00:00

After googling, i came to know that Dllimport makes the function available for other

  • 0

After googling, i came to know that Dllimport makes the function available for other modules,

is it mandatory to declare function with extern “c” identifier?

Also, Dllexport means, Dll itself uses the function while compiling it says. so by default all

functions present in DLL are dllexport?

  • 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-06-02T01:25:16+00:00Added an answer on June 2, 2026 at 1:25 am

    __declspec(dllexport) exports a symbol. It makes it available from outside a DLL.

    __declspec(dllimport) imports a symbol. It practically says “this symbol is not defined in this application, it needs to be imported from a DLL file”.

    You don’t have to declare it with extern "C". If you don’t use extern "C", then the symbol will be exported as a C++ symbol, and you will only be able to call it from C++ (and languages that support calling C++ DLLs). If you use extern "C", then the symbol will be exported as a C symbol, and you will be able to call it from languages that support caling C DLLs.

    If you want to use your DLL in C#, you will need to use extern "C".

    Here is an excellent tutorial that shows you how to use a C++ DLL in C#: How to marshal a C++ class. I have used solution A in many projects at work.

    Also, here is a short tutorial on how you can use a C++ DLL in another C++ application: How to create and use DLL in C++.

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

Sidebar

Related Questions

After googling i came to know that Index seek is better than scan. How
After googling and landing on SO and having read this other question Is it
Anyone know what this error means? after googling I found a bunch of sites
I've seen the following (bizarre) Javascript rounding function in some legacy code. After googling
After googling, I found many solutions that don't seem to work or require permission
After googling for a while, I'm aware that there quite a few ways to
Update III: After googling around I've found that this is not an uncommon problem.
After googling around I found out that segmentation faults are given when the program
After googling for many hours for a solution for the above Sharepoint exception, I
After googling, browsing SO and reading , there doesn't seem to be a Rails-style

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.