将数据写入I / O地址 [英] Writing data to I/O address
问题描述
我有一个设备(现金抽屉),我想直接与设备通信。我知道它的地址为f1。 openbit是01.
i have a device (cash drawer) and i would like to directly communicate with the device. I know that its on address f1. Also openbit is 01.
据我所知,到目前为止,我需要将1发送到内存地址f1,现金抽屉应该打开。虽然使用asm,但我得到了访问冲突。然后我再次读到Windows不允许您直接与设备I / O地址通信(需要使用win)。将数据发送到该地址的正确方法是什么。
请注意,我无法使用驱动程序,因为我无法与应用程序内的驱动程序通信。
Op。系统是win7。
As i've understood so far, i'd need to send 1 to memory address f1 and the cash drawer should open. Though using asm, i get access violation. Then again i've read that windows does not let you communicate directly to device i/o addresses (need to use win). What would be the correct way to send the data to that address. Note that i cannot use drivers, because i can't communicate with the driver inside my application. Op. system is win7.
提前致谢!
推荐答案
有一个名为inpout32.dll的库允许直接访问端口,你可以在这里找到它
There was a library called inpout32.dll that allowed direct port access you can find it here
http://logix4u.net/Inpout32.dll_Discussion/write_DELPHI_for_inpout32.dll.html
但我不喜欢知道是否支持Windows 7.
But i don't know if supports windows 7.
这篇关于将数据写入I / O地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!