![]() | GetSession |
Retrieves a handle to the VISA-C I/O session.
virtual HRESULT GetSession(ViSession* pSession) abstract;
[out] VISA-C I/O session handle.
Returns S_OK if successful, otherwise a failure HRESULT.
This function returns a session handle for the current VISA-C I/O session. This can be useful for accessing VISA-C functionality not directly exposed in the Nimbus Template Library. Also, the session can be passed out of the driver to the client application so that end users can directly manipulate aspects of the I/O session.
The following example demonstrates use of the GetSession function.
// CoAcme4321.cpp HRESULT Acme4321::OnFinalInitialize() { HRESULT hr = S_OK; ViSession vi; hr = io.DirectIo.GetSession(&vi); return hr; }