Hello,
I tested several version without luck.
Code: Select all
Prototype CallBackStrProto(param.p-utf8)
Procedure CallBack1(CallBackParam.CallBackStrProto)
; theString.s = PeekS(CallBackParam,-1,#PB_UTF8)
; MessageRequester("CallBackDemo", "Param; "+ theString)
MessageRequester("CallBackDemo", "Param; ")
EndProcedure
or
Code: Select all
Prototype CallBackStrProto(param.p-utf8)
Procedure CallBack1(*CallBackParam.CallBackStrProto)
; theString.s = PeekS(CallBackParam,-1,#PB_UTF8)
; MessageRequester("CallBackDemo", "Param; "+ theString)
MessageRequester("CallBackDemo", "Param; ")
EndProcedure
or
Code: Select all
Prototype CallBackStrProto(param.p-utf8)
ProcedureDLL CallBack1(*CallBackParam.CallBackStrProto)
; theString.s = PeekS(CallBackParam,-1,#PB_UTF8)
; MessageRequester("CallBackDemo", "Param; "+ theString)
MessageRequester("CallBackDemo", "Param; ")
EndProcedure
Import of the callback (seems to work)
Code: Select all
Prototype newlispCallbackStrProto(input.p-utf8, callbackaddress.i , calltype.p-utf8 )
newlispCallbackStr.newlispCallbackStrProto = GetFunction(0, "newlispCallback")
MessageRequester("Debug", "CallBackAdress: "+ @CallBack1)
MessageRequester("Debug", "ExeAdress: "+ @hpwNewLisp)
newlispCallbackStr("foo", @CallBack1 ,"stdcall")
newlispEvalStr("(setq MainModulAdress " + @hpwNewLisp + ")")
Programm starts and when I eval foo I get the symbol returen as expected and when I eval MainModulAdress I get the integer from the debug message.
But when I call the callback function itself I get:
Code: Select all
[00:01:41] [ERROR] hpwNewLisp.pb (Zeile: 60)
[00:01:41] [ERROR] Illegale Anweisung. (Ausführen von binären Daten?)
Translation: Illegal code. Execution of binary data
Without Debugger it crashes.
Regards