111,129
社区成员
发帖
与我相关
我的任务
分享[DllImport("OutPutDLL.dll", EntryPoint = "VC_InitGetPlate", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
public static extern int GetPlateCarInfo(string pImageDir, StringBuilder szPlate, UInt16 Top, UInt16 Left, UInt16 Bottom, UInt16 Right, int Type); UInt16 top = new UInt16(), left = new UInt16(), bottom = new UInt16(), right = new UInt16();
StringBuilder strBld=new StringBuilder(255);
MessageBox.Show(GetPlateCarInfo(filePath, strBld, top, left, bottom, right, 4).ToString());
[Quote=引用 12 楼 zhouzhangkui 的回复:]char *JpegFileName=new char[255];
CString mystr;
mystr.Format(PathName);
//识别
strcpy(JpegFileName,mystr);
char *HPHM=new char[500];
WORD *Top=new WORD;
WORD *Left=new WORD;
WORD *Bottom=new WORD;
WORD *Right=new WORD;
//WORD *Top,*Left,*Bottom,*Right;//:获得车牌结果坐标
int result =GetPlateCarInfoFUNCTION(JpegFileName,HPHM,Top,Left,Bottom,Right,4); 这是 C++的代码,直接调用C++的函数原型,正常。