viUnlock
Syntax
viUnlock(ViSession vi);
Description
This function is used to relinquish a lock previously obtained using the viLock function.
Parameters
| 
                                                     Name  | 
                                                
                                                     Dir  | 
                                                
                                                     Type  | 
                                                
                                                     Description  | 
                                            
|---|---|---|---|
| 
                                                     vi  | 
                                                
                                                     IN  | 
                                                
                                                     ViSession  | 
                                                
                                                     Unique logical identifier to a session.  | 
                                            
Return Values
| 
                                                     Type ViStatus  | 
                                                
                                                     This is the function return status. It returns either a completion code or an error code as follows.  | 
                                            
| 
                                                     Completion Code  | 
                                                
                                                     Description  | 
                                            
|---|---|
| 
                                                     VI_SUCCESS  | 
                                                
                                                     Session was successfully unlocked.  | 
                                            
| 
                                                     VI_SUCCESS_NESTED_EXCLUSIVE  | 
                                                
                                                     The call succeeded, but this session still has nested exclusive locks.  | 
                                            
| 
                                                     VI_SUCCESS_NESTED_SHARED  | 
                                                
                                                     The call succeeded, but this session still has nested shared locks.  | 
                                            
| 
                                                     Error Code  | 
                                                
                                                     Description  | 
                                            
| 
                                                     VI_ERROR_INV_SESSION  | 
                                                
                                                     The given vi does not identify a valid session or object.  | 
                                            
| 
                                                     VI_ERROR_SESN_NLOCKED  | 
                                                
                                                     The current session did not have any lock on the resource.  | 
                                            
See Also
viLock. For more information on locking, see Programming with VISA.