Home > database >  Why the outer function calls go wrong
Why the outer function calls go wrong

Time:09-22

The function of VC

The return value is the following structure

Typedef struct _LPR_RESULT
{
Struct _LPR_RESULT * pNext;

Char license [16].
Char color [8].
Int nColor;
The int type.
Int reliability;
The RECT location;
Int bright;
Int msDecode;
Int msDetect;
Int msLocate;
Int msRecognise;
Int msEncode;
LPBYTE pBits;
Int cbBits;

DWORD dwReserved [61].
} LPR_RESULT;


BOOL WINAPI LPR_File (char * lpszFileName, LPR_RESULT * pResult, int cbBuffer, char * lpszPlateFile);
Parameter description:
* BOOL __stdcall: whether recognition success
Char * * lpszFileName: IN the image file name
* * pResult LPR_RESULT: OUT output
* int cbBuffer: result IN buffer length
* lpszPlateFile: capture images saved into a file, only supports BMP, JPG



1, declare global external function

The Function Boolean LPR_File (ref String lpszFileName, ref st_lpr_result pResult, long cbBuffer, ref String platefile_name) Library "XLernel. DLL" ALIAS FOR "LPR_File
"






2, the software called:



String ls_name, ls_name2
St_lpr_result st_t
Ls_name="d: \ BMP \ property place _1_121511 BMP"
Ls_name2="d: \ BMP \ 55 JPG"
LPR_File (ls_name, ref st_t, 255, ls_name2)



3, the error message:



Bad runtime function reference at line 6 clicked in the event of o b j e c t pb_1 of w_wjdr









Consult everybody, where is the wrong should be how to change?

CodePudding user response:

No comment?

CodePudding user response:

No comment?

CodePudding user response:

General string to ref
The output of the structure is correctly defined in it? Will return data beyond the 255 bytes?

CodePudding user response:

There is no other way, by c + +
  • Related