Purpose: query the manufacturer of the ARCNET adapter
Parameter:
IN: -
OUT: PUCHAR (Size of output buffer must be >= 13 bytes)
Possible errors (see also Error codes):
E_FARC_INVALID_HANDLE
E_FARC_BUFFER_TOO_SMALL
Comment:
Return buffer contains SOHARD FARC, if a SH FARC-E3 or a SH ARC-PCMCIA
adapter is detected.
Return buffer contains SH ARC-PCI or SH ARC-PCIU if a SOHARD ARCNET PCI
adapter is detected.
In all other cases an empty string (filled with blanks) is returned .
Can be called at any time. No previous initialization (IOCTL_FARC_INIT)
required.
Note: When used with SH ARC66, this function returns blanks.
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;
char outbuf[13];
overlapped.Offset = 0;
overlapped.OffsetHigh = 0;
overlapped.hEvent =
CreateEvent(NULL,TRUE,FALSE,NULL);
...
ret = DeviceIoControl(drvhandle,
IOCTL_FARC_GET_CARDID,
NULL, 0,
outbuf, 13,
&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("Card-ID: %s",outbuf)
...