3.1.4.1.4 IWbemLevel1Login::NTLMLogin (Opnum 6)

The IWbemLevel1Login::NTLMLogin method MUST connect a user to the management services interface in a specified namespace.

 HRESULT NTLMLogin(
   [in, unique, string] LPWSTR wszNetworkResource,
   [in, unique, string] LPWSTR wszPreferredLocale,
   [in] long lFlags,
   [in] IWbemContext* pCtx,
   [out] IWbemServices** ppNamespace
 );

wszNetworkResource: The string MUST represent the namespace on the server to which the returned IWbemServices object is associated. This parameter MUST NOT be NULL and MUST match the namespace syntax as specified in section 2.2.2.

wszPreferredLocale: MUST be a pointer to a string that MUST specify the locale values in the preferred order, separated by a comma. If the client does not supply it, the server creates a default list which is implementation-specific.<29> Each locale format SHOULD conform to the WMI locale format, as specified in WMI Locale Formats (section 2.2.29). Any subsequent calls that request CIM localizable information (WBEM_FLAG_USE_AMENDED_QUALIFIERS) SHOULD return the localized information in the order of preference if the information is available in the LCID.<30> The server MUST save this information in ClientPreferredLocales.

lFlags: MUST be 0. The server SHOULD consider any other value as not valid and return WBEM_E_INVALID_PARAMETER; otherwise, the server behavior is implementation-specific.<31>

pCtx: MUST be a pointer to an IWbemContext interface, which MUST contain additional information sent by the client. If pCtx is NULL, the parameter MUST be ignored.

ppNamespace: If the call succeeds, ppNamespace MUST return a pointer to an IWbemServices interface pointer. This parameter MUST be set to NULL when an error occurs.

Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR, as specified in section 2.2.11, to indicate the successful completion of the method.

WBEM_S_NO_ERROR (0x00)

The server MUST return WBEM_E_INITIALIZATION_FAILURE if InitSuccess is false.

The server MUST determine the client's access rights by comparing RpcImpersonationAccessToken.Sids[UserIndex] as defined in [MS-RPCE] section 3.3.3.4.3 against the security descriptor stored in NamespaceConnection.

The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE access to the namespace; otherwise, WBEM_ACCESS_DENIED MUST be returned.

In response to the IWbemLevel1Login::NTLMLogin method, the server MUST return an IWbemServices interface that corresponds to the wszNetworkResource parameter.

The server SHOULD enforce a maximum length for the wszNetworkResource parameter, and return WBEM_E_QUOTA_VIOLATION if the limit is exceeded.<32>

When the call succeeds, the server MUST create an IWbemServices object. The server MUST store the wszPreferredLocale inside the object. The server MUST find the NamespaceConnection object for wszNetworkResource passed into the NamespaceConnectionTable, and store its reference in the IWbemServices object. The server MUST return WBEM_E_INVALID_NAMESPACE if the NamespaceConnection object cannot be found. The server MUST set GrantedAccess to the set of access rights granted to the client by the namespace security descriptor.

All subsequent IWbemServices method invocations that request localized information MUST return the information in the language that is specified in wszPreferredLocale. When the preferred locale is NULL, the server SHOULD<33> use implementation-specific logic to decide the locale.

The successful method execution MUST fill the ppNamespace parameter with an IWbemServices interface pointer and MUST return WBEM_S_NO_ERROR.

The failed method execution MUST set the output parameter to NULL and MUST return an error in the format specified in section 2.2.3. If the namespace does not exist, the server MUST return a WBEM_E_INVALID_NAMESPACE HRESULT value.

Show: