Tech Support > Microsoft Windows > Development Resources > Communicating with Hardware Registers C++ Windows XP
Communicating with Hardware Registers C++ Windows XP
Posted by Brian on September 25th, 2007


Our POS application currently opens the cash drawer via a Epson-like
printer. That works great, but if the receipt printer fails, then
that
creates a choke point because then the cash drawer won't open. The
POS
machine we use have two cash drawer ports that are accessible via I/O
port 4B8h. In the old DOS days, I could use outport and inport... my
question is - can I use CreateFile, ReadFile, and WriteFile to
communicate with this I/O port? I already use these functions to
communicate with the COM ports.

Any examples would be helpful.


Thanks


Brian

Posted by Scott McPhillips [MVP] on September 25th, 2007


"Brian" <bwilkins@gmail.com> wrote in message
news:1190681428.770052.277000@o80g2000hse.googlegr oups.com...

No, you can't access I/O ports with CreateFile, etc. You have to have a
device driver. But, there are lots of freeware device drivers available
that let you do this. See www.lvr.com parallel port section.

--
Scott McPhillips [VC++ MVP]


Posted by karthikbalaguru on September 25th, 2007


On Sep 25, 5:50 am, Brian <bwilk...@gmail.com> wrote:
Explain more about your configuration - OS , Processor, Language,
Hardware, Development Kit if any, Driver if any , etc to get your
solution .

Karthik Balaguru


Posted by Brian on September 25th, 2007


On Sep 25, 5:58 am, karthikbalaguru <karthikbalagur...@gmail.com>
wrote:
Windows XP SP1, 1.2Ghz Intel Processor, English, PC4 (Flytech.tw POS
PC), Borland C++ Builder 5


Posted by Brian on September 26th, 2007


On Sep 25, 8:44 am, Brian <bwilk...@gmail.com> wrote:
Thanks for the help Scott. I went with WinIo. It is working perfectly.
Thank You.



Similar Posts