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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:36:20+00:00 2026-05-11T09:36:20+00:00

I have a dll which comes from a third party, which was written in

  • 0

I have a dll which comes from a third party, which was written in C++. Here is some information that comes from the dll documentation:

//start documentation  RECO_DATA{ wchar_t Surname[200]; wchar_t Firstname[200]; } 

Description: Data structure for receiving the function result. All function result will be stored as Unicode (UTF-8).

Method:

bool recoCHN_P_Name(char *imgPath,RECO_DATA *o_data); 

Input:

char * imgPath 

the full path of the image location for this function to recognize

RECO_DATA * o_data 

data object for receiving the function result. Function return: True if Success, otherwise false will return.

//end documentation 

I am trying to call the recoCHN_P_Name from my C# application. To this end, I came up with this code:

The code to import the dll:

    public class cnOCRsdk {     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]     public struct RECO_DATA{         [MarshalAs(UnmanagedType.ByValTStr, SizeConst=200)]         public string FirstName;         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 200)]         public string Surname;         }      [DllImport(@'cnOCRsdk.dll', EntryPoint='recoCHN_P_Name')]     public static extern bool recoCHN_P_Name(byte[] imgPath, RECO_DATA o_data); } 

The code to call the function:

            cnOCRsdk.RECO_DATA recoData = new cnOCRsdk.RECO_DATA();          string path = @'C:\WINDOWS\twain_32\twainrgb.bmp';          System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();         byte[] bytes = encoding.GetBytes(path);          bool res = cnOCRsdk.recoCHN_P_Name(bytes, recoData); 

And the error I’m getting is ”Unable to find an entry point named ‘recoCHN_P_Name’ in DLL ‘cnOCRsdk.dll’.’ I’m suspecting that I’m having an error in converting a type from C++ to C#. But where exactly … ?

  • 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. 2026-05-11T09:36:21+00:00Added an answer on May 11, 2026 at 9:36 am

    First make sure the function is actually exported:

    In the Visual Studio Command Prompt, use dumpbin /exports whatever.dll

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

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Actually there is a way to get delete a value… May 11, 2026 at 1:58 pm
  • added an answer http://blogs.msdn.com/vsofficedeveloper/pages/Excel-2007-Extension-Warning.aspx That is a link basically describing that MS knows… May 11, 2026 at 1:58 pm
  • added an answer I like Tetha's solution, but it's unnecessarily complex. Here's something… May 11, 2026 at 1:58 pm

Related Questions

I have a native VC++ project that uses a dll (which is not in
I have a .NET dll which needs to read it's config settings from it's
I have created a .NET DLL which makes some methods COM visible. One method
I have a few C# .dll projects which are common to many applications. Currently,
I have a MS AJAX toolkit DLL which I want to add to the
I have written some code that makes use of an open source library to
I've a native binary dependency for my c# solution which comes in Debug and
The class mshtml.HTMLDocumentClass in Microsoft.mshtml.dll assembly has a method: public virtual void write(params object[]
Usually a mobile dev would not have to do this because the smart-minimise feature

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.