piut_getserverversion

This function gets information about the current PI System. You must be connected to PI to get results from this function.

Visual Basic format

Declare Function piut_getserverversion Lib "piapi32.dll" (
NodeID&,
ByVal ServerName$,
ByVal servernamelen&,
ByVal version$,
ByVal versionlen&,
ByVal buildid$,
ByVal buildidlen&) As Long

C format

int32 PIPROC piut_getserverversion(
int32 PIPTR *nodeid,
char PIPTR *servername,
int32 servernamelen,
char PIPTR *version,
int32 versionlen,
char PIPTR *buildid,
int32 buildidlen);

Returns

 

Success

-411

Buffer too small

-991

Not implemented (PI 2.1.0, PI 3.0)

-1000

Not implemented (PI 2.1.1)

 

Arguments

nodeid (modified)

An integer uniquely identifying the connected PI System.

servername (modified)

Name of the PI System server, as it is known to the network. For TCP/IP networks, this name does not include the domain name.

servernamelen (passed)

Length of the servername string buffer.

version (modified)

Release version of the connected PI System. The returned string has the format "PI x.x" or "PI x.x.x", where "x" represents a digit.

versionlen (passed)

Length of the version string buffer.

buildid (modified)

Build number for the connected PI System. The format of the returned string is "x.xx", where "x" represents a digit.

buildidlen (passed)

Length of the buildid string buffer.

Usage Notes

This function was first implemented in PI 2.1.2 and PI 3.1. Calling this function when connected to earlier versions of PI cause it to return one of the "not implemented" errors, depending on the type of connected PI System.

The PI 2.0 System does not have the notion of a build number. The buildid value returned for PI 2.0 will always be "1.00".

Enabling Operational Intelligence