CloseIO Method
Closes the instrument I/O communication layer (often VISA or VISA-COM).
Syntax
Section titled “Syntax”virtual HRESULT CloseIO();Co<MainClass>.cpp
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
When to Override
Section titled “When to Override”Override this function when you want to perform additional closing at the same time as when the I/O is closed. A common case is if an external DLL library is being used for instrument I/O. You would want to close the external DLL here and release any I/O related resources.
Remarks
Section titled “Remarks”This function is used in the implementation of the IIviDriver::Close method.
Example
Section titled “Example”class ATL_NO_VTABLE Acme4321 :{ // ...
virtual HRESULT CloseIO() { // Call the base class implementation HRESULT hr = __super::CloseIO(); if (SUCCEEDED(hr)) { // TODO: additional I/O shutdown here, such as closing an external DLL }
return hr; }
// ...}