IWbemEventProviderSecurity::AccessCheck method (wbemprov.h)
The AccessCheck method is implemented by an event provider and called by Windows Management Instrumentation (WMI) when a consumer subscribes to an event specified in wszQuery. A consumer that has access permission for an event can subscribe to that event. A consumer that does not have access permission for an event cannot subscribe to that event. For more information, see Writing an Event Provider and Securing WMI Events.
For a temporary consumer, WMI sets the PSID supplied in the pSid parameter to NULL and the call is made by impersonating the consumer. For a permanent consumer, WMI sets the PSID with the security identifier (SID) of the user who created the subscription.
Syntax
HRESULT AccessCheck(
[in] WBEM_CWSTR wszQueryLanguage,
[in] WBEM_CWSTR wszQuery,
[in] long lSidLength,
[in] const BYTE *pSid
);
Parameters
[in] wszQueryLanguage
Language of the following query filter, which is "WQL".
[in] wszQuery
Text of the event query filter, which is registered by a logical consumer.
[in] lSidLength
Integer that contains the security identifier (SID) length, or 0 (zero) if the subscription builder token is available.
[in] pSid
Pointer to the constant byte integer type that contains the SID, or NULL if the subscription builder's token is available.
Return value
This method returns an HRESULT that indicates the status of the method call. The following list lists the value contained in an HRESULT.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | wbemprov.h (include Wbemidl.h) |
Library | Wbemuuid.lib |
DLL | Wbemsvc.dll |