UnlockServiceDatabase function

[This function has no effect as of Windows Vista.]

Unlocks a service control manager database by releasing the specified lock.

Syntax


BOOL WINAPI UnlockServiceDatabase(
  _In_  SC_LOCK ScLock
);

Parameters

ScLock [in]

The lock, which is obtained from a previous call to the LockServiceDatabase function.

Return value

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 codeDescription
ERROR_INVALID_SERVICE_LOCK

The specified lock is invalid.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winsvc.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

LockServiceDatabase
QueryServiceLockStatus
Service Configuration
Service Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft