[out] ISharedRegister pointer.
GetISharedRegisterPointer
Retrieves an ISharedRegister pointer from the VISA-COM I/O session.
Syntax
Section titled “Syntax”virtual HRESULT GetISharedRegisterPointer(ISharedRegister** ppSharedRegister) override;Parameters
Section titled “Parameters”ppSharedRegister
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”This function returns an ISharedRegister pointer to the current VISA-COM I/O session. This can be useful for accessing VISA-COM functionality not directly exposed in the Nimbus Template Library. Also, the ISharedRegister pointer 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
Section titled “Example”The following example demonstrates use of the GetISharedRegisterPointer function.
HRESULT Acme4321::OnFinalInitialize(){ HRESULT hr = S_OK;
CComPtr<ISharedRegister> spSharedRegister; hr = io.DirectIo.GetISharedRegisterPointer(&spSharedRegister);
// Note that the CComPtr smart pointer class automatically calls release when the function exits
return hr;}