Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Indicates whether the user credentials permit access to a specified IWbemServices object.
Note
This API is for internal use only. It's not intended for use from developer code.
Syntax
HRESULT BlessIWbemServicesObject (
[in] IUnknown* pIUnknown,
[in] BSTR strUser,
[in] BSTR strPassword,
[in] BSTR strAuthority,
[in] DWORD impLevel,
[in] DWORD authnLevel
);
Parameters
pIWbemServices
[in] A pointer to a WMI service object.
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