[in] String describing the format of the write arguments. See the topic I/O Format Specifiers for Write Operations for details.
QueryfWithTimeoutNoPoll
Performs a formatted write and read as a single operation without polling for instrument errors after the read.
Syntax
Section titled “Syntax”virtual HRESULT QueryfWithTimeoutNoPoll(const CString strWriteFormat, const CString strReadFormat, long lTimeout [, argument] ...) abstract;Parameters
Section titled “Parameters”strWriteFormat
strReadFormat
[in] String describing the format of the read arguments. See the topic I/O Format Specifiers for Read Operations for details.
argument
[in] Optional arguments interpreted by the write and read format strings.
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 QueryfWithTimeout 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 QueryfWithTimeoutNoPoll function. Note that the topics I/O Format Specifiers for Write Operations and I/O Format Specifiers for Read Operations have many more examples of format strings that can be used with QueryfWithTimeoutNoPoll.
STDMETHODIMP Acme4321::IAcme4321_Configure(){ HRESULT hr = S_OK;
// Start a measurement that will generate a lot of data and { // read an IEEE 488.2 binary block as the response. // Needs up to 10 seconds to complete SAFEARRAY* psaData = NULL; hr = io.QueryfWithTimeoutNoPoll(_T("MEAS:DATA?"), _T("%$Sb"), 10000, &psaData);
// I/O timeout automatically changed back to previous value before ScanfWithTimeout call
return hr;}