home *** CD-ROM | disk | FTP | other *** search
- January 9, 1993
- Robert R. Howell
-
- This file contains additional notes concerning the I/O port drivers which I
- uploaded on January 8.
-
- ----------------------------------------------------------------------------
- TABS:
-
- The Quick-C for Windows editor that I used left tabs within the files. If you
- want print-outs to LOOK NICE, load the files into an editor such as QC-Win
- which understands tabs, with a setting of one tab stop every 4 characters.
- Then save the files with the tabs converted to spaces.
-
-
- ----------------------------------------------------------------------------
- CORRECTIONS to the COMMENTS in the files:
-
- In several places I discovered that I had not eliminated comments appropriate
- only to the ADLIB drivers. I also have a few clarifications.
-
- --------
- in WKD.H
-
- The comment on the structure member "DeviceType" is: // in or out.
- Ignore that comment. This variable stores the DeviceType which should be used
- in the IOCTL code, and checks this when IOCTL call is serviced. I'm not sure
- if these needs to be done, but it doesn't hurt.
-
- ------------
- in WKDINIT.C
-
- Change the comment which reads // Maps 1 byte of IO space ...
- to // Maps (NUMBER_PORTS) bytes of IO space
-
- -------------
- in DISPATCH.C
-
- After IRP_MJ_CREATE there is a block of code from the ADLIB driver which I've
- commented out and my explanation is confusing. I should have simply said that
- I was always allowing the CreateFile call to succeed, without performing any
- of the access checks.
-
- The BREAK which ends the CASE is also commented out. It shouldn't be.
- The driver works anyway, because the next CASE block ALSO does nothing but
- return STATUS_SUCCESS. Eliminate the // before the BREAK;
-
- At the start of the wkdIoctlReadPort and wkdIoctlWritePort routines, the
- return values listed are left over from the ADLIB code. The returns SHOULD
- BE:
-
- STATUS_SUCCESS -- Read or write succeeded
-
- STATUS_BUFFER_TOO_SMALL -- On WRITE: The buffer sent to the driver was
- too small to contain both the port and the
- value to be written.
- on READ: The buffer sent to the driver was
- too small to contain the port, or the buffer
- which would be sent back to the driver is
- too small to contain the datae.
-
- STATUS_ACCESS_VIOLATION -- An illegal port number was given.
-
-
-