The AccessCheck2 method returns a value that specifies whether the principal represented by the current client context is allowed to perform the specified operation.
HRESULT AccessCheck2( BSTR bstrObjectName, BSTR bstrScopeName, long lOperation, unsigned long *plResult );
The name of the accessed object. This string is used in audits.
The name of the scope that contains the operation specified by the lOperation parameter.
A pointer to a value that indicates whether the principal represented by the current client context is allowed to perform the operation specified by the lOperation parameter.
A value of NO_ERROR indicates that the principal does have permission. Any other value indicates that the principal does not have permission.
If the method succeeds, it returns S_OK.
If the method fails, it returns an error code. For a list of common error codes, see Common HRESULT Values.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|