Export (0) Print
Expand All

SERVICE_REQUIRED_PRIVILEGES_INFO structure

Represents the required privileges for a service.

Syntax


typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFO {
  LPTSTR pmszRequiredPrivileges;
} SERVICE_REQUIRED_PRIVILEGES_INFO, *LPSERVICE_REQUIRED_PRIVILEGES_INFO;

Members

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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Winsvc.h (include Windows.h)

Unicode and ANSI names

SERVICE_REQUIRED_PRIVILEGES_INFOW (Unicode) and SERVICE_REQUIRED_PRIVILEGES_INFOA (ANSI)

See also

ChangeServiceConfig2
QueryServiceConfig2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft