End the program and release the test set using the Dispose() method. As well as releasing memory space used by the WLAN DLL, this also releases the handle on the VISA resource allowing communication with the test set through other means.
// Close the session
Inst.Dispose();