Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 4.44 KB

ns-winsvc-service_required_privileges_infoa.md

File metadata and controls

92 lines (69 loc) · 4.44 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:winsvc._SERVICE_REQUIRED_PRIVILEGES_INFOA
SERVICE_REQUIRED_PRIVILEGES_INFOA (winsvc.h)
Represents the required privileges for a service. (ANSI)
*LPSERVICE_REQUIRED_PRIVILEGES_INFOA
LPSERVICE_REQUIRED_PRIVILEGES_INFO
LPSERVICE_REQUIRED_PRIVILEGES_INFO structure pointer
SERVICE_REQUIRED_PRIVILEGES_INFO
SERVICE_REQUIRED_PRIVILEGES_INFO structure
SERVICE_REQUIRED_PRIVILEGES_INFOA
SERVICE_REQUIRED_PRIVILEGES_INFOW
base.service_required_privileges_info
winsvc/LPSERVICE_REQUIRED_PRIVILEGES_INFO
winsvc/SERVICE_REQUIRED_PRIVILEGES_INFO
winsvc/SERVICE_REQUIRED_PRIVILEGES_INFOA
winsvc/SERVICE_REQUIRED_PRIVILEGES_INFOW
base\service_required_privileges_info.htm
security
15a2e042-cfd5-443e-a3b8-822f48eb9654
12/05/2018
*LPSERVICE_REQUIRED_PRIVILEGES_INFOA, LPSERVICE_REQUIRED_PRIVILEGES_INFO, LPSERVICE_REQUIRED_PRIVILEGES_INFO structure pointer, SERVICE_REQUIRED_PRIVILEGES_INFO, SERVICE_REQUIRED_PRIVILEGES_INFO structure, SERVICE_REQUIRED_PRIVILEGES_INFOA, SERVICE_REQUIRED_PRIVILEGES_INFOW, base.service_required_privileges_info, winsvc/LPSERVICE_REQUIRED_PRIVILEGES_INFO, winsvc/SERVICE_REQUIRED_PRIVILEGES_INFO, winsvc/SERVICE_REQUIRED_PRIVILEGES_INFOA, winsvc/SERVICE_REQUIRED_PRIVILEGES_INFOW
winsvc.h
Windows.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
SERVICE_REQUIRED_PRIVILEGES_INFOW (Unicode) and SERVICE_REQUIRED_PRIVILEGES_INFOA (ANSI)
Windows
SERVICE_REQUIRED_PRIVILEGES_INFOA, *LPSERVICE_REQUIRED_PRIVILEGES_INFOA
19H1
_SERVICE_REQUIRED_PRIVILEGES_INFOA
winsvc/_SERVICE_REQUIRED_PRIVILEGES_INFOA
LPSERVICE_REQUIRED_PRIVILEGES_INFOA
winsvc/LPSERVICE_REQUIRED_PRIVILEGES_INFOA
SERVICE_REQUIRED_PRIVILEGES_INFOA
winsvc/SERVICE_REQUIRED_PRIVILEGES_INFOA
c++
APIRef
kbSyntax
HeaderDef
Winsvc.h
SERVICE_REQUIRED_PRIVILEGES_INFO
SERVICE_REQUIRED_PRIVILEGES_INFOA
SERVICE_REQUIRED_PRIVILEGES_INFOW

SERVICE_REQUIRED_PRIVILEGES_INFOA structure

-description

Represents the required privileges for a service.

-struct-fields

-field pmszRequiredPrivileges

A multi-string that specifies the privileges. For a list of possible values, see Privilege Constants.

A multi-string is a sequence of null-terminated strings, terminated by an empty string (\0). The following is an example: String1\0String2\0String3\0LastString\0\0.

-remarks

The change in required privileges takes effect the next time the service is started. The SCM determines whether the service can support the specified privileges when it attempts to start the service.

It is best to analyze your service and use the minimum set of privileges required.

If you do not set the required privileges, the SCM uses all the privileges assigned by default to the process token. If you specify privileges for a service, the SCM will remove the privileges that are not required from the process token when the process starts. If multiple services share a process, the SCM computes the union of privileges required by all services in the process.

For compatibility, the SeChangeNotifyPrivilege privilege is never removed from a process token, even if no service in the process has requested the privilege. Therefore, a service need not explicitly specify this privilege.

Note

The winsvc.h header defines SERVICE_REQUIRED_PRIVILEGES_INFO as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

ChangeServiceConfig2

QueryServiceConfig2