ITsSbResourcePluginStore::AcquireTargetLock method (sbtsv.h)
Locks a target.
Syntax
HRESULT AcquireTargetLock(
[in] BSTR targetName,
[in] DWORD dwTimeout,
[out] IUnknown **ppContext
);
Parameters
[in] targetName
The name of the target to lock.
[in] dwTimeout
The timeout for the operation, in milliseconds.
[out] ppContext
Returns a pointer to the context of the lock. To release the lock, supply this pointer to the ReleaseTargetLock method.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
After the lock is acquired, the calling thread is assumed to have exclusive access to the target object and therefore no other thread (within the same machine) can update it. Therefore the calling thread must call the ReleaseTargetLock method as soon as it has made the necessary updates to the target object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2016 |
Target Platform | Windows |
Header | sbtsv.h |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for