Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (G)
Guardian Procedure Calls Reference Manual522629-013
6-31
GETSYSTEMSERIALNUMBER Procedure
string-length output
INT .EXT:ref:1
returns the number of numerals in the serial number that is returned in
string-
buffer.
Example
This example calls GETSYSTEMSERIALNUMBER and displays the result.
main()
{
#define MAX_ID_LEN 60
char idbuf[MAX_ID_LEN];
short error;
short idlen;
if (error = GETSYSTEMSERIALNUMBER(idbuf, MAX_ID_LEN,
&idlen))
printf("GETSYSTEMSERIALNUMBER error %d\n",
error);
else {
idbuf[idlen] = '\0';
printf("System serial number is %s\n", idbuf);
}
}