IOCTL_FARC_GET_HW_VERSIONS

Description:
query the serial number of the hardware, hardware version and firmware version

Parameters:

Parameter Type Description
Input
- - -
Output
versions struct S_HW_VERSIONS Returns following information:
  • serial number, baSN[0]=0 wenn ARCNET controller does not provide this information
  • hardware version, uHardware.w=0 wenn ARCNET controller does not provide this information
  • firmware version, uFirmware.w=0 wenn ARCNET controller does not provide this information

Possible errors (see also Error codes):
E_FARC_INVALID_HANDLE
E_FARC_BUFFER_TOO_SMALL

Example:
Note, that the following example is only a fragment. It is recommended, that the driver is opened in asynchronous mode and a handle to the driver is available.

OVERLAPPED overlapped; DWORD read, err; BOOL ret; S_HW_VERSIONS sVersion; overlapped.Offset = 0; overlapped.OffsetHigh = 0; overlapped.hEvent = CreateEvent(NULL,TRUE,FALSE,NULL); ... ret = DeviceIoControl(drvhandle, IOCTL_FARC_GET_HW_VERSIONS, NULL, 0, &sVersion, sizeof(sVersion), &read, &overlapped); if (!ret) { err = GetLastError(); if (err == E_FARC_PENDING) { ret = GetOverlappedResult(drvhandle, &overlapped, &read, TRUE); if (!ret) { err = GetLastError(); // do errorhandling here } } else { // other error occured, perhaps wrong handle } } printf("Serial number = %c%c%c%c%c%c%c%c, sVersion.baSN[0], sVersion.baSN[1], sVersion.baSN[2],sVersion.baSN[3], sVersion.baSN[4], sVersion.baSN[5], sVersion.baSN[6],sVersion.baSN[7]); ...

See also:
DeviceIoControl()
S_HW_VERSIONS

Back to Programming Guide Contact Copyright and Disclaimer