- ts maniam
- PowerBuilder
- Tuesday, 21 April 2020 04:04 AM UTC
1. We have a c++ dll compiled in CodeBlocks which has a function declared as below
__declspec(dllexport) char * __cdecl vc_encrypt(char* vol, char* id);
(MingGW compiler suffixes @8 to the function name when __stdcall is used in c++)
2. The function has been called with the code in a user event as below
ls_setcode = vc_encrypt(ls_mvol, ls_code)
The error message we get is
error calling external function %s
3. The declaration in Global External Function in PB is as below
Function String vc_encrypt(char vol, char id) library "exdll.dll" alias for "vc_encrypt;Ansi"
(when string is used as datatype in input, the error message "specified argument type differs from required argument type at run time in DLL function vc_encrypt - invalid stack pointer on return from function call at line ....)
I do not have experience in c++ and tried different combinations. The C++ code not written by me. Imported from visual studio solution of an earlier version. Searched in google and appeon community - some improvements made but could not find the solution for this specific problem. We use Appeon PB 2017 R3. Can you please help me out
TS Maniam, tsmaniamca@gmail.com
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.