Writing Data to an I / O Address

I have a device (cash drawer) and I would like to communicate directly with the device. I know its at f1. Also openbit is 01.

As I understand it so far, I had to send 1 to the memory address f1, and the cash drawer should open. While using asm, I get an access violation. Then I read again that windows do not allow direct contact with I / O addresses of devices (you need to use win). What will be the correct way to send data to this address. Please note that I cannot use drivers because I cannot contact the driver inside my application. Op. system is win7.

Thanks in advance!

+4
source share
3 answers

There was a library called inpout32.dll that allowed direct access to ports, you can find it here

http://logix4u.net/Inpout32.dll_Discussion/write_DELPHI_for_inpout32.dll.html

But I do not know if Windows 7 supports.

+3
source

In addition to the excellent suggestions above, this delphi code is for writing and reading I / O. We used GWIOPM to do what you ask, but note that this will be fine for 32-bit versions of Windows prior to W7, etc. (As is the case for most "free" drivers). For 64-bit Windows, you need a signed kernel driver. There are several things that are currently available for this. We had to write our own.

+1
source

Why can't you communicate with the driver from your application? This is the best way for the Ring 3 app to talk to equipment safely.

However, if you really insist on using drivers, you can try calling 0 and making direct access. This is much more complicated than in previous versions of Windows (XP and earlier), but it is possible. I did not do this myself, since I do not have Windows 7, but you can try asking in the asm programming forum anywhere.

0
source

All Articles