gpt4 book ai didi

c++ - 在 Windows 7 下使用 VC++ 进行 LPT 错误 : "External component has thrown an exception."

转载 作者:行者123 更新时间:2023-11-28 08:02:17 26 4
gpt4 key购买 nike

我正在尝试在 Windows 7 和 Visual Studio 2010 下通过 C++ 使用 LPT 端口

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

但是我收到了这个错误

"External component has thrown an exception."

那么如何处理呢?

最佳答案

据我所知,出于所有实际目的,Windows 7 不再支持 LPT1,除非可能系统 BIOS 已知物理 LPT1 设备。

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

关于c++ - 在 Windows 7 下使用 VC++ 进行 LPT 错误 : "External component has thrown an exception.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11110430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com