다음을 통해 공유


3.5.4.8.5 NetrLogonSetServiceBits (Opnum 22)

The NetrLogonSetServiceBits method SHOULD<240> be used to notify Netlogon whether a domain controller is running specified services, as detailed in the following section.

 NTSTATUS NetrLogonSetServiceBits(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [in] DWORD ServiceBitsOfInterest,
   [in] DWORD ServiceBits
 );

ServerName: The custom binding handle, as defined in section 3.5.4.1, representing the connection to a DC.

ServiceBitsOfInterest: A set of bit flags used as a mask to indicate which service's state (running or not running) is being set by this call. The value is constructed from zero or more bit flags from the following table.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

C

0

0

0

B

0

0

A

0

0

0

0

0

0

The flags SHOULD<241> be defined as follows.

Value

Description

A

The state of the time service is being set.

B

The state of the time service with clock hardware is being set.

C

The state of the Active Directory Web service is being set.

All other bits MUST be set to zero; otherwise, the error STATUS_ACCESS_DENIED is returned.

ServiceBits: A set of bit flags used as a mask to indicate whether the service indicated by ServiceBitsOfInterest is running. If the flag is set to 0, the corresponding service indicated by ServiceBitsOfInterest is not running. Otherwise, if the flag is set to 1, the corresponding service indicated by ServiceBitsOfInterest is running. The value is constructed from zero or more bit flags from the following table.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

C

0

0

0

B

0

0

A

0

0

0

0

0

0

The flags SHOULD<242> be defined as follows.

Value

Description

A

Time service is running.

B

Time service with clock hardware is running.

C

Active Directory Web service is running.

All other bits MUST be set to zero; otherwise, the error STATUS_INVALID_PARAMETER is returned.

If a flag is set to 1 and the same flag is set to 0 in the ServiceBitsOfInterest parameter, the error STATUS_INVALID_PARAMETER is returned.

Return Values: The method returns 0x00000000 on success; otherwise, it returns a nonzero error code.

The server SHOULD<243> return ERROR_ACCESS_DENIED if the caller is not local.

If the client does not have sufficient privilege, the server MUST return ERROR_ACCESS_DENIED.

The server MUST return STATUS_ACCESS_DENIED if bits other than those previously specified are passed in.

For every service state being set by this call, as indicated by ServiceBitsOfInterest, the state of the corresponding service ([MS-ADTS] section 6.3.1.2), as indicated by ServiceBits, is updated in the ServerServiceBits ADM element.