次の方法で共有


IFPCEventDefinitions::Add method

Applies to: desktop apps only

The Add method creates a new FPCEventDefinition object in the collection and returns a reference to it. A new event definition can be created only through the Forefront TMG administration COM objects, not in Forefront TMG Management.

Syntax

HRESULT Add(
  [in]                 BSTR Name,
  [in]                 BSTR EventGUID,
  [in, ref, optional]  Variant &AdditionalKeys,
  [in, optional]       VARIANT *pAdditionalKeys,
  [out]                IFPCEventDefinition **ppNewEvent
);
FPCEventDefinitions.Add( _
  ByVal Name As String, _
  ByVal EventGUID As String, _
  [ ByRef AdditionalKeys As Variant ], _
  [ ByVal pAdditionalKeys As VARIANT ], _
  ByRef ppNewEvent As IFPCEventDefinition _
) As FPCEventDefinition

Parameters

  • Name [in]

    C++ Required. BSTR that specifies the name of the new event. The name should be unique in the collection.
    VB Required. String that specifies the name of the new event. The name should be unique in the collection.
  • EventGUID [in]
    Required. String-formatted globally unique identifier (GUID) of the new event.

  • AdditionalKeys [in, ref, optional]
    Array of strings that define subevents for the event. The index of each string is the additional key for the corresponding subevent. The additional key with an index equal to 0 is reserved to indicate all of the subevents defined for the event.

  • pAdditionalKeys [in, optional]
    Pointer to a VARIANT containing an array of strings that define subevents for the event. The index of each string is the additional key for the corresponding subevent. The additional key with an index equal to 0 is reserved to indicate all of the subevents defined for the event.

  • ppNewEvent [out]
    Address of an interface pointer that on return points to the new IFPCEventDefinition interface created.

Return value

C++

This method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • An error code, indicating that the operation failed. In this case, the [out] parameter returned is a null object.

VB

This method returns a reference to an FPCEventDefinition object if successful. Otherwise, an error is raised that can be intercepted by using an error handler.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCEventDefinitions

 

 

Build date: 7/12/2010