This function is used to register an event in the Windows events log (Application section).
Context
Windows client,
Windows server.
Parameters
ALPHA(n) |
SrcAppName |
Name of the application generating the event. |
ALPHA(n) |
ErrMessFile |
Name of the error message Dll. If this parameter only contains the name of the DLL, a full file path is built. This path is saved when the event is saved, so that the event name can be located later via the Windows event log . The DLL path is built to suit a standard Windows file search, which searches in the following order:
|
NUM_BIN_4 |
ErrType |
Error type (ERROR = 1; WARNING = 2; INFORMATION = 4). |
NUM_BIN_4 |
Cat |
Event category. |
NUM_BIN_4 |
EventID |
Internal number for the message in the error message Dll ErrMessFile (use the VaToolBxGetAdeliaMsgId function to retrieve this number from the information in an Adelia message). |
ALPHA(n) |
VarMsg |
Variable for the message (*BLANK if no variable is requested by the message; at the most one variable can be specified). |
BOOL |
OK |
Will return *TRUE if the event has been saved. |
Example
CALL_DLL 'VaToolBx' 'VaToolBxRegisterEvent' 'MyIWSApp' 'ERRMSG' 1 0 MsgIntNb
'Name' OK
Registers, in the Windows events log in the Application section for the application 'MyIWSApp', the ID message MsgIntNb located in the 'ERRMSG.dll' file. This message contains a variable (&1) which is replaced by the string 'Name'
List of the VaToolBx functions by topic