Function EventLogWriteStr() Foundation
Appends a string to the operating system's event log.
EventLogWriteStr( <cMessage>, <cLogSource>, ; [<cMachineName>], [<nEventType>] ) --> lSuccess
|LOG_INFORMATION_TYPE *)||Informational message|
|LOG_AUDIT_SUCCESS||Success on audit event|
|LOG_AUDIT_FAILURE||Error on audit event|
The function returns .T. (true) when the string is successfully appended to the log file. Otherwise .F. (false) is returned.
The function can be used to write information to the system event log on WindowsNT, Windows 2000 and Windows XP. Event logs are not supported by Windows 95, Windows 98 and Windows ME.
Prior using this function, the log source must be made known to the operating system by modifying the registry. For this proceed as follows: Create an empty text file (with notepad.exe for example) and paste the following lines into it. Replace <installation directory> with the path of your Xbase++ installation:
In line 4, the name of the log source is defined (TestLog). In line 5 the resource dll must be entered. Please modify the path to the resource dll according to your Xbase++ installation.
Save the file to disk and import it with the operating systems regedit.exe application to the registry.
After this is done a messge <cMessage> can be appended to the application log and the string TestLog is entered to the Source column with following lines of code:
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.