Acquire and decrease the object count by 1.
[ bAcquired = ] Object.Lock ( [lTimeOut] )
The Lock method syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
ASemaphore |
ASemaphore object |
|
lTimeOut |
Val Variant |
The length of time in milliseconds to attempt to acquire the object. |
|
bAcquired |
Bool |
A boolean expression that specifies whether the object is acquired and the count decreased by one. |
bAcquired can be one of the following:
|
Value |
Description |
|
True * |
The ASemaphore object is acquired and the count is decreased by one. |
|
False |
The ASemaphore object is not acquired or changed. |
The following statement attempts to acquire the ASemaphore object in 100 milliseconds and decreases the count by one:
bsem1Locked = sem1.Lock(100)