AdsSyncReadDeviceInfoReqEx

Reads the identification and version number of an ADS server.

LONG AdsSyncReadDeviceInfoReqEx(
  LONG          port,
  PAmsAddr      pAddr,
  PCHAR         pDevName,
  PAdsVersion   pVersion
);

Parameter

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.

pDevName

[out] Pointer to a string that will receive the name of the ADS device.

pVersion

[out] Address of a variable of type AdsVersion, which will receive the version number, revision number and the build number.

Return value

Returns the function's error state.

Sample

See Sample 5: Read ADS information.