LockResource(int, string)
- Updated2026-08-05
- 1 minute(s) read
Locks the resource for this session with a shared lock, with the specified timeout period.
Syntax
Namespace: NationalInstruments.Visa
public string LockResource(int timeoutMilliseconds, string sharedKey)
Parameters
| Name | Type | Description |
|---|---|---|
| timeoutMilliseconds | int | The timeout period for obtaining the lock. If the timeout is Ivi.Visa.VisaConstants.ImmediateTimeout (0), the operation will not block. If the timeout is Ivi.Visa.VisaConstants.InfiniteTimeout (–1), the operation will not timeout. |
| sharedKey | string | The name of the requested key. |
Returns
Then name of the key that was granted.