The Lock method locks a GlobalVariable2 object for exclusive use.
globalvar.Lock timeout
Part | Description |
---|---|
globalvar | Expression that evaluates to a GlobalVariable2 object |
timeout | Time-out value, in milliseconds |
If the global variable is already locked, the Lock method waits until the holder of the lock unlocks the global variable, or until the time-out occurs. When the time-out period elapses, an error occurs.
If 0 is specified for the time-out value, an error occurs immediately if the global variable is already locked.
HRESULT Lock( long TimeOut );