Prev: Clickwrap Products: InstallShield Express, Wise Installation Studio
Next: ANN: Seed7 Release 2010-03-07
From: Paul on 6 Mar 2010 16:49 Is it possible to read from and write to a parallel port with Windows? I have produced Parallel Port I/O with DOS (using interrupts or inp/outp) and OS/2 using DosDevIOCtl (roughly equivalent to DeviceIoControl). I have tried opening a port using CreateFile. This seemed to work. But when I tried to read from the port using ReadFile or DeviceIOControl, the read failed. I cannot use third party drivers, or even a driver that I might write, since I cannot change the configuration of the computers I am writing for. (So I cannot use inpout32.dll since it requires a driver--hwinterface.ocx.) I understand that device I/O under Windows must be done through device drivers--as with other, more advanced OSs--and why this must be. But, I though Windows (95,NT,98,...,XP,Vista, 7) _did_ have a parallel port driver. Is this driver just for show?
From: ScottMcP [MVP] on 6 Mar 2010 19:31 On Mar 6, 4:49 pm, Paul <pminott...(a)yahoo.ca> wrote: > Is it possible to read from and write to a parallel port with Windows? I > have produced Parallel Port I/O with DOS (using interrupts or inp/outp) > and OS/2 using DosDevIOCtl (roughly equivalent to DeviceIoControl). > > I have tried opening a port using CreateFile. This seemed to work. But > when I tried to read from the port using ReadFile or DeviceIOControl, > the read failed. > > I cannot use third party drivers, or even a driver that I might write, > since I cannot change the configuration of the computers I am writing > for. (So I cannot use inpout32.dll since it requires a > driver--hwinterface.ocx.) > > I understand that device I/O under Windows must be done through device > drivers--as with other, more advanced OSs--and why this must be. But, I > though Windows (95,NT,98,...,XP,Vista, 7) _did_ have a parallel port > driver. Is this driver just for show? I have not looked into this for the last couple of Windows versions, but in the old days the Windows driver for the parallel port supported output only, and only in basic mode. I.e., just enough for printers.
From: Paul on 7 Mar 2010 07:04 On 03/06/10 07:31 PM, ScottMcP [MVP] wrote: > On Mar 6, 4:49 pm, Paul<pminott...(a)yahoo.ca> wrote: >> Is it possible to read from and write to a parallel port with Windows? I >> have produced Parallel Port I/O with DOS (using interrupts or inp/outp) >> and OS/2 using DosDevIOCtl (roughly equivalent to DeviceIoControl). >> >> I have tried opening a port using CreateFile. This seemed to work. But >> when I tried to read from the port using ReadFile or DeviceIOControl, >> the read failed. >> >> I cannot use third party drivers, or even a driver that I might write, >> since I cannot change the configuration of the computers I am writing >> for. (So I cannot use inpout32.dll since it requires a >> driver--hwinterface.ocx.) >> >> I understand that device I/O under Windows must be done through device >> drivers--as with other, more advanced OSs--and why this must be. But, I >> though Windows (95,NT,98,...,XP,Vista, 7) _did_ have a parallel port >> driver. Is this driver just for show? > > I have not looked into this for the last couple of Windows versions, > but in the old days the Windows driver for the parallel port supported > output only, and only in basic mode. I.e., just enough for printers. > That is a pity. Parallel ports are extremely convenient for interfacing with sensors and robots. Do you know if the same applies to serial I/O?
From: Bob Masta on 7 Mar 2010 08:01 On Sat, 06 Mar 2010 16:49:58 -0500, Paul <pminottawa(a)yahoo.ca> wrote: >Is it possible to read from and write to a parallel port with Windows? I >have produced Parallel Port I/O with DOS (using interrupts or inp/outp) >and OS/2 using DosDevIOCtl (roughly equivalent to DeviceIoControl). > >I have tried opening a port using CreateFile. This seemed to work. But >when I tried to read from the port using ReadFile or DeviceIOControl, >the read failed. > >I cannot use third party drivers, or even a driver that I might write, >since I cannot change the configuration of the computers I am writing >for. (So I cannot use inpout32.dll since it requires a >driver--hwinterface.ocx.) > >I understand that device I/O under Windows must be done through device >drivers--as with other, more advanced OSs--and why this must be. But, I >though Windows (95,NT,98,...,XP,Vista, 7) _did_ have a parallel port >driver. Is this driver just for show? The place to go for all kinds of port info is Jan Axelson's Lakeview Research <www.lvr.com>. As I understand it, the ports were freely accessible from user mode under Windows versions through Win98, but XP and later require special Ring 0 drivers, installed at boot time. There are a number of such drivers out there, but it sounds like this is not the approach you need. On the other hand, if there is a way to make the standard Windows drivers work, I suspect it will be discussed somewhere on Jan's site, or one of the many links she has there. Best regards, Bob Masta DAQARTA v5.10 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, FREE Signal Generator Pitch Track, Pitch-to-MIDI DaqMusic - FREE MUSIC, Forever! (Some assembly required) Science (and fun!) with your sound card!
From: ScottMcP [MVP] on 7 Mar 2010 11:03 On Mar 7, 7:04 am, Paul <pminott...(a)yahoo.ca> wrote: > That is a pity. Parallel ports are extremely convenient for interfacing > with sensors and robots. > > Do you know if the same applies to serial I/O?- Hide quoted text - All versions of Windows since Win95 have very complete support for serial ports. Find the article "Serial Communications in Win32" in MSDN and the associated MTTTY sample. I tried to give you a link to it, but the MSDN site is flaky at the moment.
|
Next
|
Last
Pages: 1 2 Prev: Clickwrap Products: InstallShield Express, Wise Installation Studio Next: ANN: Seed7 Release 2010-03-07 |