UID | title | description | tech.root | ms.date | ms.keywords | targetos | req.assembly | req.construct-type | req.ddi-compliance | req.dll | req.header | req.idl | req.include-header | req.irql | req.kmdf-ver | req.lib | req.max-support | req.namespace | req.redist | req.target-min-winverclnt | req.target-min-winversvr | req.target-type | req.type-library | req.umdf-ver | req.unicode-ansi | topic_type | api_type | api_location | api_name | f1_keywords | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:winsvc.GetServiceRegistryStateKey |
GetServiceRegistryStateKey |
Returns a handle for a registry key for a service to read and/or write state to. |
security |
4/26/2019 |
GetServiceRegistryStateKey |
Windows |
function |
winsvc.h |
Onecore.lib |
Windows 10, version 2004 (10.0; Build 19041) |
Windows Server, version 2004 (10.0; Build 19041) |
|
|
|
|
|
Returns a handle for a registry key for a service to read and/or write state to.
A handle to the status information structure for the current service. This handle is returned by the RegisterServiceCtrlHandler function.
A member of the SERVICE_REGISTRY_STATE_TYPE specifying the state type for which the service registry key is retreived.
The access mask with which to attempt to open the state key. For more information, see Registry Key Security and Access Rights.
Receives the output registry key handle.
ERROR_SUCCESS when all operations complete successfully; otherwise, a Win32 error code.
For ServiceRegistryStatePersistent, the security of the directory is set to only provide write access to the local system account and the service SID. Ensure service SIDs are enabled for any service that calls this API. For more information, see SERVICE_SID_INFO.
For a similar API that provides service state that can be shared with associated programs, see GetSharedServiceRegistryStateKey.
All service state registry keys are deleted by the service control manager once the service is uninstalled.