OnErrorCall inside DLL
Posted: Fri Aug 14, 2020 3:21 pm
I know exist some posts already, but cannot find the right solution, i have a simple example code:
If i compile this source as dll and call from an external program (openlibrary) i cannot see any messagerequester, what's wrong ?
Code: Select all
Declare ErrorHandler()
ProcedureDLL AttachProcess ( Instance )
OnErrorCall ( @ErrorHandler () )
RaiseError(#PB_OnError_InvalidMemory)
MessageRequester("3","4")
ProcedureReturn #true
EndProcedure
ProcedureDLL DetachProcess ( Instance )
ProcedureReturn #true
EndProcedure
ProcedureDLL AttachThread ( Instance )
ProcedureReturn #true
EndProcedure
ProcedureDLL DetachThread ( Instance )
ProcedureReturn #true
EndProcedure
ProcedureDLL DllInitialize ()
ProcedureReturn #true
EndProcedure
Procedure ErrorHandler ()
MessageRequester("1","2")
EndProcedure