IOCTL_FARC_GET_EXTNODEID

Purpose: get the NODE-ID, that is set on the ARCNET-adapter

Parameter:
IN:   -
OUT:  UCHAR (size of output buffer > = 1 byte)

Comment:
This function returns the NODE-ID, that is set by jumper on the adapter (only PCX20 and PCMCIA).

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;
 UCHAR extNodeID;

 overlapped.Offset = 0;
 overlapped.OffsetHigh = 0;
 overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

...
 ret = DeviceIoControl(drvhandle,
     IOCTL_FARC_GET_NEXTNODEID,
     NULL, 0,
     &extNodeID, sizeof(extNodeID),
     &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("external Node-ID = %u",extNodeID)
...

Programmers Guide
Contents