AdsSyncReadReqEx

Reads data synchronously from an ADS server.

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

Parameter

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. This variable returns the number of succesfully read data bytes.

Return value

Returns the function's error status.