by EskoHC (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 9th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This is the easy example of Fatal Application Error Exit
API Declarations
Private declare sub FatalAppExit lib "kernel32" alias "FatalAppExitA"(byval uAction as long,byval lpMessageText as string)
public sub FatalError(Message as string)
on error goto Handle_Error
FatalAppExit 1,Message$
exit sub
Handle_Error:
debug.print "Error number :" , err.number
debug.print "Error description :" , err.description
debug.print "Error source :" , err.source
end sub
Dim commands As NEW Class1
Private sub Form_Load()
commands.FatalError "Hello world !!!"
end sub