On Wed, Jun 11, 1997 at 07:39:15AM -0400, Alan G. Smith wrote: > Actually VxD's are only for Win 3.x and Win 95. To write to hardware in NT > you have to write a Kernel mode Physical Device Driver. Yes and no. You do need a kernel mode driver, but this is only directly accessible to Win32 programs that explicitly call it. If you want to virtualize a piece of hardware, you also need a virtual device driver for Win16 programs running under NT. What happens is that the Win16 program does an IN or OUT instruction, NT traps it, and passes it to the virtual device driver (which has registered itself to handle such traps for the appropriate addresses). The VxD then makes calls to the real (kernel) device driver to perform the I/O, and passes the result back to the 16 bit program. This is how the serial and parallel ports are virtualized under NT - I have a multi-port serial card in my PC under NT4.0, and I can map these very different hardware ports via the standard serial port VxD to be accessed from a 16 bit DOS program! The DOS program thinks it's accessing COM3 or COM4 as a standard 16450 UART, but in fact it's talking to a device driver which in turn is talking to the processor on the intelligent multi-port card. All this stuff is well covered in the MSDN library CD. Writing such a virtual device driver is not overly difficult, nor is a simple kernel device driver for a dumb piece of hardware like the PICMaster interface board. In fact there is a skeleton driver in the DDK that will allow access to any I/O port you care to configure. Using this plus a VxD would allow MPLAB to work. I toyed with doing this myself at one time, but it seems you need Visual C++ to compile kernel device drivers and I couldn't persuade myself to use it (I use Watcom for casting spells under Windoze.) Microsoft used to supply a pre-compiled version of the generic port driver, but it's only in source form on the NT4.0 DDK so far as I can see. -- Clyde Smith-Stubbs |HI-TECH Software, |Voice: +61 7 3354 2411 clyde@htsoft.com |P.O. Box 103, Alderley,|Fax: +61 7 3354 2422 http://www.htsoft.com|QLD, 4051, AUSTRALIA. |PGP: finger clyde@htsoft.com --------------------------------------------------------------------------- Download a FREE beta version of our new ANSI C compiler for the PIC microcontroller! Point your WWW browser at http://www.htsoft.com/