概述
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 code | Description |
---|---|
ERROR_INVALID_SERVICE_LOCK | The specified lock is invalid. |
Example Code
For an example, see Changing A Service Configuration.
Requirements
Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation. |
---|---|
Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server. |
Header | Declared in Winsvc.h; include Windows.h. |
Library | Link to Advapi32.lib. |
DLL | Requires Advapi32.dll. |
最后
以上就是如意微笑为你收集整理的UnlockServiceDatabaseUnlockServiceDatabase的全部内容,希望文章能够帮你解决UnlockServiceDatabaseUnlockServiceDatabase所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复