Share via


ICcService::LockService (Windows CE 5.0)

Send Feedback

This method increments the lock count of the service. Lock count of the service is equal to the number of external clients who have reference to this service.

HRESULT LockService()

Return Values

The following table shows the return values for this service.

Value Description
S_OK Indicates success.
E_FAIL Indicates failure.

Remarks

The lock count of a service is the count of external clients who have access to this service object.

The lock count controls the service lifetime within the service host process, based on the count of external clients.

A Core Connectivity service host calls this method whenever clients request a service through ICcSvcHost::GetService.

Clients should not call this method directly, unless they create the service without going through the service host.

If the service is loaded by the service host, LockService is called by the service host on behalf of external clients when external clients call ICcSvcHost::GetService.

Clients must call ICcService::UnlockService before they release the service.

Requirements

OS Version: Windows CE 5.0 and later.
Header: CcService.h.
Link Library: none.

See Also

Core Connectivity Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.