将LPT端口程序转换为USB端口 [英] converting lpt port program into usb port

查看:238
本文介绍了将LPT端口程序转换为USB端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友
我已经用c#编写了一个程序,可以将信息发送到LPT端口,并且连接到它的设备可以接收此信息

hi friends
i have wrote a program in c# that can send information to the LPT port and the device that connected to it can recive this information

using System.Runtime.InteropServices;




using System;
using System.Runtime.InteropServices;
public class LptPort
{
    [DllImport("inpout32.dll", EntryPoint = "Out32")]
    public static extern void Output(int adress, int value);
}


我使用输出方法将信息发送到LPT(888)端口


i use the output method to send information to the LPT(888) port

LptPort.output(888,10);


现在我想使用USB代替LPT.
我的意思是我想使用USB转LPT适配器


now i want to use usb instead of LPT.
i mean i want to use usb to lpt adaptor
https://www.google.com/search?q=usb+to+lpt+adaptor&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a[^]
but the program don''t work when i use this adaptor
can you help me?
thanks

update : no idea for how to do it ?

推荐答案

我认为您不能以这种方式完成. >
如果您已将设备连接到USB端口,您看到了吗?尝试枚举
usb设备 [ usb虚拟端口 [如何向USB端口? [ ^ ]
I think you can''t do it in that way.

If you have connected your devices to USB port, do you see it? Try to enum usb devices[^] with the following software.

Maybe in your job, you''ll need to create usb virtual port[^] to send data into it.

And a little tip: How to send and receive data to USB port?[^]


使用USB/并行适配器可能完全不走运.

参见 http://www.logix4u.net/parallel-port/15 -a-tutorial-on-parallel-port-interface [ ^ ]

他们是inpout.dll人,他们说

我的机器上没有并行端口!我该怎么办?

不幸的是,到目前为止,并行端口是一个完全不推荐使用的接口标准.这些天来不可能找到一台新的带有并行端口的笔记本电脑.甚至几乎所有品牌的PC都已经从其背面板上卸下了并行端口.市场上其他可用的替代产品,例如PCI并行端口扩展卡和USB到并行端口转换器,由于它们的体系结构差异,除了连接您的旧打印机外,其他都无济于事.


艾伦.
You are probably completely out of luck with a USB/parallel adaptor.

See http://www.logix4u.net/parallel-port/15-a-tutorial-on-parallel-port-interfacing[^]

They are the inpout.dll people and they say

I don''t have parallel port on My machine! What do I do ?

Unfortunately, as of today parallel port is a completely deprecated interfacing standard. It is impossible finding a new laptop with parallel port these days. Even almost all branded PCs already shed Parallel Ports from their back panels. Other alternative available in market such as PCI parallel port expansion cards and USB to Parallel Port converters aren''t good for anything other than connecting your old printer because of their architectural difference.


Alan.


这篇关于将LPT端口程序转换为USB端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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