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

Related Questions

Question I have a third-party DLL that throws an unhandled exception when attempting to
I have some COM component which I call from some c# dll. I also
I have a C++ dll which implements several COM interfaces, that I'm trying to
I have a base DLL which defines some basic structure and operation for a
I have written some code that makes use of an open source library to
I have a COM Interop DLL that I'm automatically generating from an existing COM
I have a DLL which outpus data to a stream. But it adds a
I have a DLL which cause to an error when I run the application.
I have a DLL which contains a class with static members . I use
I have a DLL which provided a decoding function, as follows: function MyDecode (Source:

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.