Hi,
I try to write a DLL-function in PowerBasic, witch should be called from my Alaska Xbase++ program. As long I only use BYVAL cTxt as STRING all works perfect.
But I need a changed string back to my calling program.
If I call by reference from Xbase++ the STRING parameter will be passed as a ASCIIZ string with needed length.
FUNCTION MYINFO(BYREF cTxt AS ASCIIZ * 40) EXPORT AS LONG
will work, but I want the PowerBasic DLL to accept shorter and longer strings too. Is it possible to do ?
FUNCTION MYINFO(BYREF cTxt AS STRING) EXPORT AS LONG
will not work, because the runtime errorhandler from my Xbase++ program reports a data corruption.
I thought of a pointer in the declaration to the ASCIIZ String, but I dont know how to do ...
Thanks for your help
by
Hubert
I try to write a DLL-function in PowerBasic, witch should be called from my Alaska Xbase++ program. As long I only use BYVAL cTxt as STRING all works perfect.
But I need a changed string back to my calling program.
If I call by reference from Xbase++ the STRING parameter will be passed as a ASCIIZ string with needed length.
FUNCTION MYINFO(BYREF cTxt AS ASCIIZ * 40) EXPORT AS LONG
will work, but I want the PowerBasic DLL to accept shorter and longer strings too. Is it possible to do ?
FUNCTION MYINFO(BYREF cTxt AS STRING) EXPORT AS LONG
will not work, because the runtime errorhandler from my Xbase++ program reports a data corruption.
I thought of a pointer in the declaration to the ASCIIZ String, but I dont know how to do ...
Thanks for your help
by
Hubert
Comment