![]() | CloseIO Method |
Closes the instrument I/O communication layer (often VISA or VISA-COM).
virtual HRESULT CloseIO();
Co<MainClass>.cpp
Returns S_OK if successful, otherwise a failure HRESULT.
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.
This function is used in the implementation of the IIviDriver::Close method.
// CoAcme4321.cpp 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; } // ... }