AdsWriteControlReq
The AdsWriteControlReq method can be used to send an ADS write control command to change the ADS and device state of an ADS server. AdsWriteControlCon is called when the response is received.
Syntax
int AdsWriteControlReq( AmsAddr& rAddr, ULONG invokeId, USHORT adsState,
USHORT deviceState, ULONG cbLength, PVOID pData ); Parameter
Name | Type | Description |
|---|---|---|
rAddr | AmsAddr& | [in] Structure with NetId and port number of the ADS server. |
invokeId | ULONG | [in] Handle of the command, which was sent. The InvokeId is specified by the source device and is used for the identification of the commands. |
adsState | USHORT | [in] new ADS state (see enum nAdsState in Ads.h). |
deviceState | USHORT | [in] new device state. |
cbLength | ULONG | [in] contains the length in bytes of the data (pData). |
pData | PVOID | [in] pointer to the data buffer in which the written data are located. |
Return value