NetLogonSetServiceBits function
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.
Syntax
NTSTATUS WINAPI NetLogonSetServiceBits( _In_ LPWSTR ServerName, _In_ DWORD ServiceBitsOfInterest, _In_ DWORD ServiceBits );
Parameters
- 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.
Return value
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.
| Return code | Description |
|---|---|
|
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. |
Remarks
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.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
DLL |
|
See also
- Directory Service functions
- DsGetDcName
- GetProcAddress
- LoadLibrary
- NetGetAnyDCName
- NetGetDCName
- Network Management Overview
- Network Management Functions