The Signal method signals the event on the local server. If an alert exists for the event and the conditions for issuing the alert are met, actions may be taken to notify the administrator of the event. Third-party filters can also use this method to signal an event.
HRESULT Signal( [in, optional] long SignalCount, [in, optional] long AdditionalKey, [in, optional] BSTR ShortDesc, [in, optional] BSTR LongDesc, [in, optional] long EventID, [in, optional] BSTR EventSource, [in, optional] VARIANT EventStrings, [in, optional] VARIANT EventData, [in, optional] short EventCategory, [in, optional] short EventType );
The number of instances of the event to be signaled. The default value is 1.
An additional key (index) from the table of subevents for the event. This parameter cannot be set to 0. The default value is –1.
A 32-bit integer that specifies the identifier (ID) of the event to be reported to the system event log. The default value is 0.
BSTR that specifies the name of a registered event source (application, service, or add-in) to be recorded in the Windows event log as the source of the event. The source name must be included in the following registry value:
HKLM\SYSTEM\CurrentControlSet\Services\
Eventlog\Application(System)\Sources
This parameter is required if the event triggers an alert whose actions include recording events in the Windows event log. The default value is an empty string.
Variant that contains insertion strings for the event.
Variant that contains raw data for the event.
A 16-bit integer that specifies the category of the event. The default value is 0.
A 16-bit integer that specifies the type of the event. The default value is 0.
This method returns S_OK if the call is successful; otherwise, it returns an error code.
Sub Signal( _ [ ByVal SignalCount As Long ], _ [ ByVal AdditionalKey As Long ], _ [ ByVal ShortDesc As String ], _ [ ByVal LongDesc As String ], _ [ ByVal EventID As Long ], _ [ ByVal EventSource As String ], _ [ ByVal EventStrings As Variant ], _ [ ByVal EventData As Variant ], _ [ ByVal EventCategory As Integer ], _ [ ByVal EventType As Integer ] _ )
The number of instances of the event to be signaled. The default value is 1.
An additional key (index) from the table of subevents for the event. This parameter cannot be set to 0. The default value is –1.
A 32-bit integer that specifies the identifier (ID) of the event to be reported to the system event log. The default value is 0.
String value that specifies the name of a registered event source (application, service, or add-in) to be recorded in the Windows event log as the source of the event. The source name must be included in the following registry value:
HKLM\SYSTEM\CurrentControlSet\Services\
Eventlog\Application(System)\Sources
This parameter is required if the event triggers an alert whose actions include recording events in the Windows event log. The default value is an empty string.
Variant that contains insertion strings for the event.
Variant that contains raw data for the event.
A 16-bit integer that specifies the category of the event. The default value is 0.
A 16-bit integer that specifies the type of the event. The default value is 0.
This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.
The EventSource parameter is similar to the lpSourceName parameter of the Windows RegisterEventSource function. Other parameters for this function are similar to parameters in the Windows ReportEvent function, as shown in the following table. For more information, see the relevant function in MSDN.
Signal parameter | ReportEvent parameter |
---|---|
EventID | dwEventID |
EventStrings | lpStrings |
EventData | lpRawData |
EventCategory | wCategory |
EventType | wType |
Network data (including URLs and other data that comes from untrusted sources) should not be included in the EventStrings parameter for logging, because this can create a security risk. Such data, however, can be included in the RawData parameter for logging.
Client | Requires Windows Vista or Windows XP. |
---|---|
Server | Requires Windows Server 2008. |
Version | Requires Forefront Threat Management Gateway (TMG). |
IDL |
Declared in Msfpccom.idl. |
DLL |
Requires Msfpccom.dll. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.