3.1.4.17.3 GetEventClassesForIID (Opnum 5)

This method is called by a client to get information about the event classes associated with an IID that are configured in the Global Partition.

 HRESULT GetEventClassesForIID(
   [in, string, unique] LPWSTR wszIID,
   [out] DWORD* pcClasses,
   [out, string, size_is(, *pcClasses)] 
     LPWSTR** pawszCLSIDs,
   [out, string, size_is(, *pcClasses)] 
     LPWSTR** pawszProgIDs,
   [out, string, size_is(, *pcClasses)] 
     LPWSTR** pawszDescriptions
 );

wszIID: The Curly Braced GUID String Syntax ([MS-DTYP] section 2.3.4.3) representation of an IID for which event classes will be retrieved, or NULL for an empty (zero-length) string to indicate all event classes.

pcClasses: A pointer to a value that, upon successful completion, MUST be set to the number of event classes for which information was returned.

pawszCLSIDs: A pointer to a value that, upon successful completion, MUST be set to an array of Curly Braced GUID String Syntax ([MS-DTYP] section 2.3.4.3) representations of CLSIDs of event classes.

pawszProgIDs: A pointer to a value that, upon successful completion, MUST be set to an array of ProgIDs of event classes, in the same order as pawszCLSIDs.

pawszDescriptions: A pointer to a value that, upon successful completion, MUST be set to an array of descriptions of event classes, in the same order as pawszCLSIDs.

Return Values: This method MUST return S_OK (0x00000000) on success, and a failure result, as specified in [MS-ERREF] section 2.1, on failure. All failure results MUST be treated identically.

Return value/code

Description

0x00000000

S_OK

The call was successful.

Upon receiving a call to this method, the server MUST verify that catalog version negotiation has been performed by checking the negotiated catalog version (see section 3.1.1.5), and fail the call if not.

Upon receiving this method, the server MUST verify that all parameters conform to the preceding specifications, and fail the call if not.

The server then MUST perform the following:

  • If wszIID is NULL or an empty string, the server MUST attempt to retrieve from its catalog the values of the CLSID, ProgID, and Description properties of all entries in the EventClasses table (section 3.1.1.3.22) for which the PartitionIdentifier property is equal to the partition identifier of the Global partition, and fail the call if it cannot.

  • Otherwise, the server then MUST attempt to select all entries from the EventClasses table (section 3.1.1.3.22) for which the IID property is equal to that specified in wszIID, and for which the PartitionIdentifier property is equal to the partition identifier of the Global Partition, and for those entries retrieve the values of the CLSID, ProgID, and Description properties, and fail the call if it cannot.

The server then MUST attempt to set the values referenced by the out parameters as follows:

  • The server MUST attempt to set the value referenced by pcClasses to the number of event classes selected, and the values referenced by pawszCLSIDs, pawszProgIDs, and pawszDescriptions to arrays of values for the CLSID, ProgID, and Descriptions properties for the selected event classes, and fail the call if it cannot.