UnlockServiceDatabase

来源:互联网 发布:mac系统有安卓模拟器吗 编辑:程序博客网 时间:2024/06/08 00:20

UnlockServiceDatabase

The UnlockServiceDatabase function unlocks a service control manager database by releasing the specified lock.

BOOL UnlockServiceDatabase(  SC_LOCK ScLock);

Parameters

ScLock
[in] Lock obtained from a previous call to the LockServiceDatabase function.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

The following error codes can be set by the service control manager. Other error codes can be set by the registry functions that are called by the service control manager.

Return codeDescriptionERROR_INVALID_SERVICE_LOCKThe specified lock is invalid.

Example Code

For an example, see Changing A Service Configuration.

Requirements

ClientRequires Windows XP, Windows 2000 Professional, or Windows NT Workstation.ServerRequires Windows Server 2003, Windows 2000 Server, or Windows NT Server.Header

Declared in Winsvc.h; include Windows.h.

Library

Link to Advapi32.lib.

DLLRequires Advapi32.dll.
原创粉丝点击