BlessIWbemServices function
Indicates whether the user credentials permit access to the specified IWbemServices class.
Note
This API is for internal use only. It's not intended for use from developer code.
Syntax
HRESULT BlessIWbemServices (
[in] IWbemServices* pIWbemServices,
[in] BSTR strUser,
[in] BSTR strPassword,
[in] BSTR strAuthority,
[in] DWORD impLevel,
[in] DWORD authnLevel
);
Parameters
pIWbemServices
[in] A pointer to the IWbemServices object for which permissions are required.
strUser
[in] The user name.
strPassword
[in] The password associated with strUser
.
strAuthority
[in] The domain name of the user. See the ConnectServerWmi function for more information.
impLevel
[in] The impersonation level.
authnLevel
[in] The authorization level.
Return value
The following values returned by this function are defined in the WinError.h header file, or you can define them as constants in your code:
Constant | Value | Description |
---|---|---|
E_INVALIDARG |
0x80070057 | One or more arguments are invalid. |
E_POINTER |
0x80004003 | pIWbemServices is null . |
E_FAIL |
0x80000008 | An unspecified error has occurred. |
E_OUTOFMEMORY |
0x80000002 | Insufficient memory is available to perform the operation. |
S_OK |
0 | The function call was successful. |
Requirements
Platforms: See System Requirements.
Header: WMINet_Utils.idl
.NET Framework Versions: Available since 4.7.2