Click or drag to resize

GetSession

Retrieves a handle to the VISA-C I/O session.

virtual HRESULT GetSession(ViSession* pSession) abstract;
Parameters
pSession

[out] VISA-C I/O session handle.

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

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.

Example

The following example demonstrates use of the GetSession function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
  HRESULT hr = S_OK;

  ViSession vi;
  hr = io.DirectIo.GetSession(&vi);

  return hr;
}

Download a complete CHM version of this documentation here.