Home > database >  Questions about PB DLL call C
Questions about PB DLL call C

Time:09-24

You need to call an external DLL function, the DLL function is:
HRESULT XJCA_KeyInsert (BSTR CSP [in], [out, retval] int * ok);


In my pb8.0 LOCAL EXTERNAL FUNCTION made the following definition:
The FUNCTION long XJCA_KeyInsert (string CSP, ref int ok) LIBRARY "xjcaTechATL. DLL
"
But running,
The Error calling external function XJCA_KeyInsert at line 6 in function of_check_ca_key of object n_ca_xjca_hos.
The error of

Don't know whether is HRESULT corresponding wrong or BSTR corresponding wrong

Please grant instruction!

CodePudding user response:

Try:
The FUNCTION long XJCA_KeyInsert (string CSP) LIBRARY "xjcaTechATL. DLL
"

CodePudding user response:

Tried, no matter use, still the same error

reference 1st floor wag_enu response:
try:
The FUNCTION long XJCA_KeyInsert (string CSP) LIBRARY "xjcaTechATL. DLL"

CodePudding user response:

Estimation is a question of character
Statement to
The FUNCTION long XJCA_KeyInsert (blob CSP, ref int ok) LIBRARY "xjcaTechATL. DLL
"Then call
String ls_csp
Blob lbl_csp
Lbl_csp=ToUnicode (ls_csp)
Int li_ok
XJCA_KeyInsert (lbl_csp li_ok)

So look at

CodePudding user response:

Try:
The FUNCTION Boolean XJCA_KeyInsert (string CSP, ref st_login ok) LIBRARY "xjcaTechATL. DLL
"
Int * ok this seems to be a pointer,

St_login is user defined structure,

CodePudding user response:

Tried, this also not line!

The
reference 3 floor my_aa response:
estimates that is a question of character
Statement to
The FUNCTION long XJCA_KeyInsert (blob CSP, ref int ok) LIBRARY "xjcaTechATL. DLL
"Then call
String ls_csp
Blob lbl_csp
Lbl_csp=ToUnicode (ls_csp)
Int li_ok
XJCA_KeyInsert (lbl_csp li_ok)
.

CodePudding user response:

If is a callback function, PB is not supported!
  • Related