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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:52:59+00:00 2026-06-15T08:52:59+00:00

I have a C function, which is part of a VS 2010 project and

  • 0

I have a C function, which is part of a VS 2010 project and has this signature:

real_T wrapper(void)

where

typedef double real_T;

In my C# code I attempt this:

[DllImport(@"C:\Users\bla\Documents\Visual Studio 2010\Projects\bla\bla\Debug\bladibla.dll")]
public static extern double wrapper();

static void Main(string[] args)
{
    wrapper();
}

but get:

Unable to find an entry point named ‘wrapper’ in DLL ‘C:\Users\bla\Documents\Visual Studio 2010\Projects\bla\bla\Debug\bladibla.dll’.

The dll is definitely there. What else could be wrong?

  • 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-15T08:53:00+00:00Added an answer on June 15, 2026 at 8:53 am

    Possibly the function is being exported with a mangled name. You can suppress the mangling like this:

    extern "C" {
        real_T wrapper(void);
    }
    

    You aren’t obviously exporting the function either. The simple way to do that is like this:

    extern "C" {
        __declspec(dllexport) real_T wrapper(void);
    }
    

    If that still doesn’t resolve the missing export, use a tool like Dependency Walker to check whether the function is in fact being exported, and if so under what name.

    Finally, you should declare the calling convention on the C# side to be cdecl to match the calling convention of your native function.

    [DllImport(@"...", CallingConvention=CallingConvention.Cdecl)]
    public static extern double wrapper();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have this anonymous function in our code, which is part of the jQuery's
I have a function which is part of a class and in this function
I have a security function which is part of a script. It's supposed to
I have a function which looks something like this, it returns a noncopyable class
I have a function which is used as part of a calculator. I had
So, I have a function which returns a pointer to a dynamically allocated double,
I have some code (it's part of a wordpress plugin) which takes a text
I have a function which reads a big text file,splits a part(from a given
The wierdest thing. I have a function which calls: var clicked_el = event.target.id; This
I have the following function which is part of the Trie structure implementation: int

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.