WriteControl

Sets the state of the ADS system and device.

HRESULT WriteControl(
  ADSSTATE adsState,
  ADSSTATE deviceState,
  long     cbLen,
  byte*    pData
);

Parameters

adsState

[in] The state as ADSSTATE, to be written to the ADS system. 

deviceState

[in] The state as ADSSTATE, to be written to the ADS device. 

cbLen

[in]  Number of bytes to be written to the variable.

pData

[in, size_is(cbLen)] Pointer to the first element of a byte array with length cbLen of the additional data to be written to the ADS device.

Return values

S_OK

The function was called successfully.

ADSERRORCODES

An error occurs.