IOCTL_FARC_GET_CARDID

Description:
Query the card ID

Parameters:

Parameter Type Description
Input
- - -
Output
card id UCHAR[20] Char buffer with size >= 20 bytes
The buffer can contain following values:
  • SOHARD FARC, if a SH ARC-ISA or a SH ARC-PCMCIA adapter is detected
  • SH ARC-PCI or SH ARC-PCIu if a SOHARD ARCNET PCI adapter is detected
  • SH ARC-USB if a SH ARC-USB adapter is detected
  • empty string (filled with blanks) by all other adapters (for example for SH ARC-66)

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; char outbuf[20]; overlapped.Offset = 0; overlapped.OffsetHigh = 0; overlapped.hEvent = CreateEvent(NULL,TRUE,FALSE,NULL); ... ret = DeviceIoControl(drvhandle, IOCTL_FARC_GET_CARDID, NULL, 0, outbuf, sizeof(outbuf), &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); ...

See also:
DeviceIoControl()

Back to Programming Guide Contact Copyright and Disclaimer