[in] Command string to send to the device.
QueryStringNoPoll
Performs a write and read of a string result as a single operation without polling for instrument errors after the read.
Syntax
Section titled “Syntax”virtual HRESULT QueryStringNoPoll(const CString& strCommand, CString& strResult, long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT QueryStringNoPoll(const CString& strCommand, BSTR* pbstrResult, long lTimeout = CUR_TIMEOUT) abstract;Parameters
Section titled “Parameters”strCommand
strResult
[out] Response string read from the device.
pbstrResult
[out] Response string read from the device.
lTimeout
[in] I/O timeout value in milliseconds.
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”This function behaves identically to QueryString except that the device is not polled for errors after the data is read.
Example
Section titled “Example”The following example demonstrates use of the QueryStringNoPoll function.
STDMETHODIMP Acme4321::IAcme4321_GetIdentification(BSTR* pbstrId){ HRESULT hr = S_OK;
// Send ID query to device and read the response as a BSTR string hr = io.QueryStringNoPoll(_T("*IDN?"), pbstrId);
return hr;}