【问题标题】:LPT with VC++ under Windows 7 ERROR: "External component has thrown an exception."在 Windows 7 下使用 VC++ 进行 LPT 错误:“外部组件已引发异常。”
【发布时间】:2012-06-19 22:31:47
【问题描述】:

我正在尝试在 Windows 7 和 Visual Studio 2010 下将 LPT 端口与 c++ 一起使用

#include <conio.h>
int main()
{
    _outp(0x378,00000000);
    int input=_inp(0x278);
}

但是我收到了这个错误

"External component has thrown an exception."

那么如何处理呢?

【问题讨论】:

    标签: c++ windows-7 lpt


    【解决方案1】:

    据我所知,出于所有实际目的,Windows 7 不再支持 LPT1,除非,也许如果系统 BIOS 存在已知的物理 LPT1 设备。

    但是,您仍然可以使用 8 个逻辑打印机端口,编号为 LPT2 到 LPT9。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-05
      • 2013-04-19
      • 2011-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-14
      • 2020-11-13
      相关资源
      最近更新 更多