PCI并行端口通信 [英] PCI parallel port communication

查看:101
本文介绍了PCI并行端口通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上没有安装pci并行端口卡,所以在计算机上安装了pci并行端口卡.分配给端口的地址是c100-c107.由于dll接受短数据类型,因此我无法将此地址传递给inpout32.dll.
请帮助我

解决方案

short是16位dtaatype,但已签名-因此您不能轻易使用最高位,您将得到如果直接尝试,则会出现编译错误.
请使用ushort代替:

  ushort  u = 0xC106;
Console.WriteLine(" ,u); 


I have installed pci parallel port card on my computer as my motherboard does not have one. The address assigned to the Port is c100 - c107 . I am unable pass this address to inpout32.dll as the dll accepts short data type.
Please help me

解决方案

short is a 16 bit dtaatype, but it is signed - so you can''t use the top bit easily, and you will get a compilation error if you try directly.
Use a ushort instead:

ushort u = 0xC106;
Console.WriteLine("{0:X}", u);


这篇关于PCI并行端口通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆