[in] Command to send to the device before sending the binary block.
WriteBinaryBlockNoPoll
Sends an IEEE 488.2 definite-length binary block to a device without polling for instrument errors after the write.
Syntax
Section titled “Syntax”virtual HRESULT WriteBinaryBlock(double* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(float* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(long* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(short* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(BYTE* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(SAFEARRAY* pValues, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, double* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, float* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, long* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, short* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, BYTE* pValues, long lLength, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteBinaryBlock(const CString& strCommand, SAFEARRAY* pValues, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;Parameters
Section titled “Parameters”strCommand
pValues
[in] Array of numeric values to compose into a definite-length block and send to the device.
lLength
[in] Number of elements (not bytes) to send to the device. If the input is a SAFEARRAY, then all elements of the SAFEARRAY are sent.
bFlush
[in] If true, the formatted I/O write buffer is flushed to 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 WriteBinaryBlock except that the device is not polled for errors after the data is sent.
Example
Section titled “Example”The following example demonstrates use of the WriteBinaryBlockNoPoll function.
STDMETHODIMP Acme4321::IAcme4321_Configure(SAFEARRAY* psaData){ HRESULT hr = S_OK;
// Sends contents of psaData as an IEEE 488.2 definite-length binary block hr = io.WriteBinaryBlockNoPoll(psaData);
return hr;}