AdsSyncReadReqEx2

Reads data synchronously from an ADS server.

LONG AdsSyncReadReqEx2(
     LONG  port,
     PAmsAddr  pAddr,
     ULONG  nIndexGroup,
     ULONG  nIndexOffset,
     ULONG  nLength,
     PVOID  pData,
     ULONG  *pcbReturn
);

Parameters

port

[in] port number of an Ads port that had previously been opened with AdsPortOpenEx or AdsPortOpen.

pAddr

[in] Structure with NetId and port number of the ADS server.

nIndexGroup

[in] Index Group.

nIndexOffset

[in] Index Offset.

nLength

[in] Length of the data in bytes.

pData

[out] Pointer to a data buffer that will receive the data.

pcbReturn

[out] pointer to a variable. If successful, this variable will return the number of actually read data bytes.

Return value

Returns the function's error status.