“Unable to find an entry point named [function] in dll” (c++ to c# type conversion)

前端 未结 9 1413
夕颜
夕颜 2020-12-14 02:09

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
         


        
9条回答
  •  一个人的身影
    2020-12-14 02:37

    Solved - at least to the point where the program does not break and actually returns me a bool value.

    The key, I guess, was to specify the entry point as the 'mangled' name

        [DllImport(@"cnOCRsdk.dll", EntryPoint="?recoCHN_P_Name@CcnOCRsdk@@QAE_NPADPAURECO_DATA@@@Z")]
        public static extern bool recoCHN_P_Name(ref string imgPath, ref RECO_DATA o_data);
    

    After that I got some other errors but the 'unable to find entry point' went away.

提交回复
热议问题