Home > database >  About a few C DLL call
About a few C DLL call

Time:09-24

Prototype 1: int __stdcall GetDLLVersion (uchar * bufVer)
PB: reference FUNCTION ulong GetVer (ref string bufVer) LIBRARY "sock_com. DLL" alias for "GetDLLVersion
"Call: li_ret=getver (ls_ver)
Results: error

Prototype 2: int __stdcall initUSB (uchar d12)
PB: reference FUNCTION ulong InitUSBA (char) d12 LIBRARY "proRFL. DLL" alias for "initUSB
"Call: li_ret=InitUSBA (' 1 ')
Results: error

CodePudding user response:

Try this:
Prototype 1: int __stdcall GetDLLVersion (uchar * bufVer)
PB: reference FUNCTION int GetVer (ref string bufVer) LIBRARY "sock_com. DLL" alias for "GetDLLVersion; ANSI
"
Prototype 2: int __stdcall initUSB (uchar d12)
PB: reference FUNCTION int InitUSBA (char) d12 LIBRARY "proRFL. DLL" alias for "initUSB; ANSI"

CodePudding user response:

The best is to put the error message posted up

CodePudding user response:

Or not, the error is:
Aplication termilated
Error: bad runtime function reference at line 4,,,,,,,

CodePudding user response:

The incoming string with a space () function to initialize the allocated memory size, again

CodePudding user response:

If the are you? Do you have any initialization string variable?

CodePudding user response:

Tried
Ls_ver=space (128)
Li_ret=getver (ls_ver)
The same error

CodePudding user response:

Well, it seems that should have nothing to do with PB calls, check your DLL, whether the corresponding function parameters are different

CodePudding user response:

Others provide DLL, here are the prototype, I quote out of the mistake?

CodePudding user response:

refer to the eighth floor w15880087596 response:
others provide DLL, provide prototypes have, isn't me a reference out of the mistake?

If there is nothing wrong with it provides prototype, this call should also not wrong

CodePudding user response:

The FUNCTION int GetVer (ref char bufVer []) LIBRARY "sock_com. DLL" alias for "GetDLLVersion"

CodePudding user response:

The FUNCTION ulong GetVer (ref char bufVer []) LIBRARY "sock_com. DLL" alias for "GetDLLVersion
"The FUNCTION ulong InitUSBA (char []) d12 LIBRARY "proRFL. DLL" alias for "initUSB"

CodePudding user response:

11 references yyoinge response:
FUNCTION ulong GetVer (ref char bufVer []) LIBRARY "sock_com. DLL" alias for "GetDLLVersion
"The FUNCTION ulong InitUSBA (char []) d12 LIBRARY "proRFL. DLL" alias for "initUSB"


Char ls_ver []
Ulong li_ret
Ls_ver=space (128)
Li_ret=getver (ls_ver)

Run or an error

CodePudding user response:

In can't use a blob
  • Related