Using Win32 functions in Visual FoxPro Image Gallery
Event Logging
..msdn
ClearEventLog
CloseEventLog
DeregisterEventSource
GetEventLogInformation
GetNumberOfEventLogRecords
GetOldestEventLogRecord
OpenEventLog
ReadEventLog
RegisterEventSource
ReportEvent
Code examples:
ReportEvent
..msdn    Add comment     W32 Constants      Translate this page
Writes an entry at the end of the specified event log.
Code examples:
Declaration:
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

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

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

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

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

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

wNumStrings
[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.

dwDataSize
[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.

lpStrings
[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.

lpRawData
[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  
FreeTranslation.com 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: 12
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.234.255.29)
13 sec.Function: 'ws_select'
29 sec.Function: 'InetIsOffline'
44 sec.Function: 'GetDefaultPrinter'
59 sec.Function: 'midiOutReset'
1.22 min.Function: 'MQOpenQueue'
1.43 min.Function: 'GetTextColor'
1.67 min.Function: 'GdipDeleteStringFormat'
1.92 min.Function: 'waveOutWrite'
2.2 min.Function: 'LoadIcon'
2.42 min.Function: 'ReleaseCapture'
Google
Advertise here!