Using Win32 functions in Visual FoxPro Image Gallery
Event Logging
Code examples:
..msdn    Add comment     W32 Constants      Translate this page
Writes an entry at the end of the specified event log.
Code examples:
BOOL ReportEvent(
  HANDLE hEventLog,
  WORD wType,
  WORD wCategory,
  DWORD dwEventID,
  PSID lpUserSid,
  WORD wNumStrings,
  DWORD dwDataSize,
  LPCTSTR* lpStrings,
  LPVOID lpRawData
FoxPro declaration:
DECLARE INTEGER ReportEvent IN advapi32;
    INTEGER hEventLog,;
    INTEGER wType,;
    INTEGER wCategory,;
    LONG dwEventID,;
    INTEGER lpUserSid,;
    INTEGER wNumStrings,;
    LONG dwDataSize,;
    STRING @lpStrings,;
    STRING @lpRawData

[in] A handle to the event log. This handle is returned by the RegisterEventSource function.

[in] The type of event to be logged -- list of predefined values .

[in] The event category. This is source-specific information; the category can have any value.

[in] The event identifier. The event identifier specifies the entry in the message file associated with the event source.

[in] A pointer to the current user"s security identifier. This parameter can be NULL if the security identifier is not required.

[in] The number of insert strings in the array pointed to by the lpStrings parameter. A value of zero indicates that no strings are present.

[in] The number of bytes of event-specific raw (binary) data to write to the log. If this parameter is zero, no event-specific data is present.

[in] A pointer to a buffer containing an array of null-terminated strings that are merged into the message before Event Viewer displays the string to the user.

[in] A pointer to the buffer containing the binary data. This parameter must be a valid pointer (or NULL), even if the dwDataSize parameter is zero.
Return value:
If the function succeeds, the return value is nonzero, indicating that the entry was written to the log.
My comment:
As of Windows XP SP2, hEventLog parameter cannot be a handle to the Security log. To write an event to the Security log, use the AuthzReportSecurityEvent function.

Word Index links for the ReportEvent :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2007-09-09 20:32:20
Modified: 2007-09-09 20:35:27
Visited in last 7 days: 15
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
20 sec.Function: 'ReleaseSemaphore'
40 sec.Function: 'DuplicateHandle'
59 sec.Function: 'ExitWindowsEx'
1.3 min.Function: 'ReleaseCapture'
1.58 min.Function: 'SetConsoleTitle'
1.88 min.Function: 'GetTextAlign'
2.17 min.Function: 'mixerGetControlDetails'
2.45 min.Function: 'ShellAbout'
2.77 min.Function: 'ConfigurePort'
3.08 min.
Function group: 'Shell Functions'
Advertise here!