IOCTL_FARC_GET_SWVERSION
Purpose: query the software version of the driver
Parameter:
IN: -
OUT: PUCHAR (size of output buffer must be >= 26 bytes)
Comment:
Return buffer contains driver version.
Can be called at any time. No previous initialization (IOCTL_FARC_INIT)
required.
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;
BOOL ret;
DWORD read, err;
char outbuf[26];
overlapped.Offset = 0;
overlapped.OffsetHigh = 0;
overlapped.hEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
...
ret = DeviceIoControl(drvhandle,
IOCTL_FARC_GET_CARDID,
NULL, 0,
outbuf, 26,
&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("SW-Version: %s",outbuf)
...