Dela via


3.1.5.5.1 SamrQueryInformationDomain2 (Opnum 46)

The SamrQueryInformationDomain2 method obtains attributes from a domain object.

 long SamrQueryInformationDomain2(
   [in] SAMPR_HANDLE DomainHandle,
   [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
   [out, switch_is(DomainInformationClass)] 
     PSAMPR_DOMAIN_INFO_BUFFER* Buffer
 );

DomainHandle: An RPC context handle, as specified in section 2.2.7.2, representing a domain object.

DomainInformationClass: An enumeration indicating which attributes to return. See section 2.2.3.16 for a listing of possible values.

Buffer: The requested attributes on output. See section 2.2.3.17 for structure details.

This protocol asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.

Upon receiving this message, the server MUST process the data from the message subject to the following constraints:

  1. The server MUST return an error if DomainHandle.HandleType is not equal to "Domain".

  2. DomainHandle.GrantedAccess MUST have the required access specified in section 3.1.2.2. Otherwise, the server MUST return STATUS_ACCESS_DENIED.

  3. The following information levels MUST be processed by setting the appropriate output field name to the associated database attribute, as specified in section 3.1.5.14.8. Processing is completed by returning 0 on success.

    DomainInformationClass

    DomainPasswordInformation

    DomainLockoutInformation

    DomainLogoffInformation

    DomainOemInformation

    DomainNameInformation

    DomainModifiedInformation

    DomainModifiedInformation2

    DomainReplicationInformation

  4. If DomainInformationClass does not meet the criteria of constraint 3, the constraints associated with the DomainInformationClass input value in the following subsections MUST be satisfied; if there is no subsection for the DomainInformationClass value, an error MUST be returned to the client.