共用方式為


3.1.1.2 Subscriptions

The server also maintains a table of subscriptions. As with event classes, subscriptions have a set of properties. Some of the properties can also be specified as part of the query (as specified in section 2.2.1). The following properties are specific to a subscription.

SubscriptionID: A UUID that uniquely identifies the subscription. The KNOWNCOLUMNID for this property is "SUBSCRIPTIONID".

SubscriptionName: An application-specific name for the subscriber. The KNOWNCOLUMNID for this property is "SUBSCRIPTIONNAME".

PublisherID: The UUID of the publisher for which the subscriber application is to receive events. The publisher identity is defined on the event class by specifying its publisher identity property. The KNOWNCOLUMNID for this property is "PUBLISHERID".

EventClassID: The CLSID of the event class for which the subscription is created. The KNOWNCOLUMNID for this property is "EVENTCLASSID".

MethodName: The name of the event method for the specific event interface defined for the specific event class for which the application is creating a subscription.

SubscriberCLSID: The CLSID for the subscriber application's DCOM object, which can be activated and then called by the publisher application after the event occurs. This MUST be mutually exclusive with the SubscriberInterface property. A subscription can have both SubscriberCLSID and SubscriberMoniker properties. A subscription with this property is a persistent subscription. The KNOWNCOLUMNID for this property is "SUBSCRIBERCLSID".

SubscriberInterface: The DCOM object interface pointer for the subscriber application that receives the notification as a method call when the event occurs. This MUST be mutually exclusive with the SubscriberCLSID and SubscriberMoniker properties. A subscription with this property is a transient subscription.

PerUser: A Boolean that is set to "True" when the subscription is associated with a logon session; otherwise, it is set to "False". The KNOWNCOLUMNID for this property is "PERUSER".

OwnerSID: The owner security identity for the subscription. The KNOWNCOLUMNID for this property is "OWNERSID".

Enabled: A Boolean value that specifies whether the subscription is enabled or disabled. If a subscription is enabled, the value of this property is TRUE and the subscribing application receives a notification when the publisher fires an event. If the subscription is disabled, the value of this property is FALSE and the subscribing application does not receive any notification when the publisher application fires the event. The KNOWNCOLUMNID for this property is "ENABLED".

Description: An application-specific description for the subscription. The KNOWNCOLUMNID for this property is "DESCRIPTION".

MachineName: The computer name of the server machine where the subscriber application component resides. The KNOWNCOLUMNID for this property is "MACHINENAME".

InterfaceID: The UUID that identifies the event interface for the event class for which the subscriber is going to receive an event. The KNOWNCOLUMNID for this property is "INTERFACEID".

FilterCriteria: The filtering criteria for the subscription. The KNOWNCOLUMNID for this property is "FILTERCRITERIA".<7>

SubscriberMoniker: A string that identifies the subscriber component. This MUST be mutually exclusive with the SubscriberInterface property. A subscription can have both SubscriberCLSID and SubscriberMoniker properties. A subscription with this property is a persistent subscription. The KNOWNCOLUMNID for this property is "SUBSCRIBERMONIKER".

EventClassPartitionID: The UUID of the partition of the event class. The KNOWNCOLUMNID for this property is "EVENTCLASSPARTITIONID".

EventClassApplicationID: The UUID of the conglomeration of the event class. The KNOWNCOLUMNID for this property is "EVENTCLASSAPPLICATIONID". This property always has the value GUID_NULL.

SubscriberPartitionID: The UUID of the partition of the subscriber. It is used in addition to the SubscriberCLSID and SubscriberApplicationID properties to uniquely identify the subscriber component. The KNOWNCOLUMNID for this property is "SUBSCRIBERPARTITIONID".

SubscriberApplicationID: The UUID of the conglomeration of the subscriber. It is used in addition to the SubscriberCLSID and SubscriberPartitionID properties to uniquely identify the subscriber component. The KNOWNCOLUMNID for this property is "SUBSCRIBERAPPLICATIONID".

PublisherProperties: A set of application-specific properties that are associated with the subscription that pertains to the publisher, as specified in section 2.2.2.

SubscriberProperties: A set of application-specific properties that are associated with the subscription that pertains to the subscriber, as specified in section 2.2.2.