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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:03:06+00:00 2026-05-19T04:03:06+00:00

Long time reader, first time poster. One day I hope to be answering questions

  • 0

Long time reader, first time poster. One day I hope to be answering questions on here…

So it’s kind of similar to: "Unable to find an entry point named [function] in dll" (c++ to c# type conversion)

But I can’t seem to apply the same solution…

Basically, I wrote a new Method:

Defined in the header file of the C++ project as :

extern "C" {
     __declspec(dllexport) bool IsDataValid();
}

Defined in the source file of the C++ project as: (signiature only)

extern bool __cdecl IsDataValid() { 
//function stuf......... returns a bool
}

Imported into a forms C# application within the C# Project as:

[DllImport("CarChipSDK_C_Sharp.dll", EntryPoint = "IsDataValid")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsDataValid();

It is called from the same place within C# forms .cs file as:

bool isDataValid = IsDataValid();

It is returning an exception with the message:

“Unable to find an entry point
‘IsDataValid()’ named in DLL
‘CarChipSDK_C_Sharp.dll’.

I have used dumpbin.exe and dependency walker on the .dll generated from the c++ code and it shows that it has the IsDataValid() entry point.

All help is much appreciated…

Problem Solved! Stupid me, this was the code from a previous co-op at my current company, turns out he was reading the .dll from the bin/release folder where as I was building to the bin/debug folder. Should have known. My sincere apologies.

  • 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-19T04:03:06+00:00Added an answer on May 19, 2026 at 4:03 am

    You are encountering C++ name mangling. Declare the C++ functions as extern “C”. So, in your C++ module…

    extern "C" __declspec(dllexport) bool IsDataValid();
    

    You really don’t need the entry point specification attribute either. Your C# declaration will be:

    [DllImport("CarChipSDK_C_Sharp.dll")]
    [return: MarshalAs(UnmanagedType.Bool)]
    public static extern bool IsDataValid();
    

    For future reference, dumpbin.exe is a very useful program for analyzing problems like this. If you run it on your DLL you will see what those functions are actually named by the time they are compiled.

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

Sidebar

Related Questions

long time reader/first time poster here. So I've got a checkbox array that posted
First time poster, long time reader. I searched and found no questions that answered
Long time reader, first time poster. Working on a web site at http://www.howardpitch.com/ ,
Long time reader, first time poster asks: After many weeks of google and forum
Long time reader, first time poster. I'm a big noob when it comes to
Long time reader, first time poster. Any help is greatly appreciated. I have crafted
long time reader, first time poster. I’m coming with an issue that many of
first time poster, long time reader so be gentle with me :) See the
Long term lurker, first time poster here. I have written a class to model
Hy everyone, Long time reader, first time poster. This sounds like it should be

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.