Lock Method

DTS Programming

DTS Programming

Lock Method

The Lock method locks a GlobalVariable2 object for exclusive use.

Applies To
GlobalVariable2 Object
Syntax

globalvar.Lock timeout

Part Description
globalvar Expression that evaluates to a GlobalVariable2 object
timeout Time-out value, in milliseconds

Remarks

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.

Prototype (C/C++)

HRESULT Lock( long TimeOut );

See Also

Adding DTS Lookups and Global Variables

Unlock Method