The NetLogonSetServiceBits function notifies the Netlogon service of the running state of the services on a domain controller. The caller must be running in the context of either the LocalSystem or the LocalService account.
NTSTATUS WINAPI NetLogonSetServiceBits( _In_ LPWSTR ServerName, _In_ DWORD ServiceBitsOfInterest, _In_ DWORD ServiceBits );
- ServerName [in]
A pointer to a null-terminated string that specifies the name of the domain controller. If this parameter is NULL, the local computer is used.
- ServiceBitsOfInterest [in]
A set of flags used as a mask to indicate which service's state (running or not running) is being set. This parameter can be a combination of the following values.
- ServiceBits [in]
A set of flags used as a mask to indicate whether the service indicated by ServiceBitsOfInterest parameter is running or not. If the flag is set to 0, the corresponding service indicated by the ServiceBitsOfInterest parameter is not running. Otherwise, if the flag is set to 1, the corresponding service indicated by the ServiceBitsOfInterest parameter is running. This parameter can be a combination of the following values.
The time service is running.
The time service with clock hardware is running.
The Active Directory web service is running.
If the function succeeds, the return value is STATUS_SUCCESS.
If the function fails, the return value can be one of the following error codes or one of the system error codes.
Access is denied. This error is returned if the caller was not a member of the Administrators local group on the target computer.
A parameter is incorrect. This error is returned if one or more specified service bits are not valid.
The list of running services for the domain controller returned by the DsGetDcName function will contain the running services notified by the NetLogonSetServiceBits function.
No header file is available for the NetLogonSetServiceBits function . Include the function definition at the top of this page in your source code.
An import library containing the NetLogonSetServiceBits function is not included in the Microsoft Windows Software Development Kit (SDK). Applications must use the LoadLibrary and GetProcAddress functions to retrieve the function pointer from the corresponding DLL and call this function.
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
- Directory Service functions
- Network Management Overview
- Network Management Functions
Build date: 10/26/2012