Cannot open LPT1(Printer Port) on win7 (64bit). The same applicaion works on win XP

╄→гoц情女王★ 提交于 2019-12-06 05:28:20

Have you tried running the executable in WinXP compatability-mode? It could have some trouble with the new Windows driver model in Windows 7.

What portName you've specified ? Have you tried:

pipeHandle = CreateFile("NONSPOOLED_LPT1", GENERIC_READ | GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero);

?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!