系统内部'波特蒙:错误2
当我尝试连接到本地端口时,计算机 ->使用 Portmon v. 3.02 连接本地,我'我在一个小错误对话框中收到错误消息,错误 2:
我以管理员身份运行该工具(如果不是,我会收到错误 6)。
顺便说一句,这是 Windows 7 x64。在 32 位 Windows 7 x86 中,它运行良好。我该如何解决这个问题?
When I try to connect to local ports, Computer -> Connect local, using Portmon v. 3.02, I'm getting an error message, Error 2, in a small error dialog box:
I run the tool as an administrator (if not, I get error 6).
By the way this is a Windows 7 x64. On 32-bit, in Windows 7 x86, it works fine. How can I fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
Sysinternals 的 Portmon 仅适用于 32 位版本的 Windows。它不支持 64 位(可能其驱动程序未签名)。
从 Portmon 主页:
Sysinternals' Portmon works only on 32-bit versions of Windows. It does not support 64-bit (probably its driver is not signed).
From the Portmon homepage:
在 Windows 资源管理器中,右键单击
portmon.exe
-->选择属性 -->单击兼容性选项卡,然后在 Windows XP 兼容模式下运行。它与 Windows 7 64 位中一样运行良好。In Windows Explorer, right click on
portmon.exe
--> select Properties --> click the Compatibility tab, and Run in Windows XP compatibility mode. It works fine like that in Windows 7 64-bit.“错误2”是“找不到指定的文件”,即找不到所需的DLL文件。
最初,当您尝试从网络位置运行 Portmon 时,您会收到此错误:这破坏了安全信任,导致 Portmon 不受信任(或者可能只是以某种方式弄乱了搜索路径)。
在我的 Windows 7 64 位副本上,Microsoft Dependency Walker (depends.exe) 告诉我: PORTMSYS.SYS(由 Portmon.exe 创建/加载的文件)对 ci.dll、clfs.sys、hal.dll 和 kdcom.dll 具有未解决的依赖关系。
这些是
库,它们实际上并没有丢失:如果丢失了,Windows 将无法启动。但是,我在 SysWow64 中没有看到这些文件的副本。这对我来说问题不在于 portman.sys:问题在于 Windows 7/64 位中的 win32 兼容层:它不支持正确的调试。
现在已经是 2018 年了。Portmon 还没有 64 位版本。串行端口是一个传统标准。 Windows 7 问题已通过 Windows 8.1 的发布得到解决。但是,向后移植到 Windows 7 的某些 Visual Studio 实用程序或安全更新有可能解决该问题。也许熟悉 SysWow 和调试的人会发表评论。
"Error 2" is "Cannot find the file specified", that is, cannot find a required DLL file.
Originally, you got this error when you tried to run Portmon from a network location: that broke the security trust, causing Portmon to be untrusted (or perhaps just messing up the search path somehow).
On my copy of Windows 7 64 bit, Microsoft Dependency Walker (depends.exe) tells me that PORTMSYS.SYS (the file created/loaded by Portmon.exe), has unresolved dependencies on ci.dll, clfs.sys, hal.dll and kdcom.dll.
Those are the
libraries, and they aren't actually missing: if they were, Windows wouldn't boot. However, I don't see a copy of those files in SysWow64. This suggests to me that the problem is not with portman.sys: the problem is with the win32 compatibility layer in Windows 7/64 bit: It doesn't support debug properly.
It is now 2018. There is no 64-bit version of Portmon. Serial ports are a legacy standard. The Windows 7 problem was fixed by the release of Windows 8.1. However, there is a faint chance that some Visual Studio utility or security update back-ported to Windows 7 will fix the problem. Perhaps someone who is familiar with SysWow and debugging will comment.
我用过AccessPort
http://sudt.com/en/ap/download.htm 效果很好。与波特蒙非常相似
I've used AccessPort
http://sudt.com/en/ap/download.htm and it works great. Very similar to Portmon
您可以使用一对虚拟 COM 端口的模拟器和一个简单的程序来代替 Windows x64 的 portmon,该程序将连接物理端口和其中一个虚拟端口,并执行日志记录功能。
要创建一对虚拟 COM 端口,您可以使用:
简单的映射和记录程序可以在这里找到,或者你可以自己编写,很简单。
操作顺序如下:
Instead of portmon for Windows x64, you can use an emulator of a pair of virtual COM ports and a simple program that will connect the physical port and one of the virtual ones, as well as perform the logging function.
To create a pair of virtual COM ports you can use:
Simple mapping and logging program can be found e.g. here or you can write it yourself, it is simple.
The sequence of actions is follows:
我还没有尝试过,但是这个问题< /a> 提及 com0com。它创建两个虚拟串行端口并模拟它们之间的零调制解调器电缆。它声称能够在 64 位 Windows 上运行。我不确定它是否附带软件,可以让您将输入从真实端口传输到虚拟端口之一。常见问题解答之一说您可以打开日志记录。
我想在最坏的情况下,您可以编写自己的小程序,将数据从真实端口传输到虚拟端口之一并记录所有数据。
还有这个关于开源替代方案的问题提到了几个项目。
I haven't tried it yet, but this question mentions com0com. It creates two virtual serial ports and emulates a null modem cable between them. It claims to be able to run on 64 bit Windows. I'm not sure whether it comes with software that lets you just pipe input from a real port into one of the virtual ports. One of the FAQ's says that you can turn on logging.
I guess in the worst case, you could write your own small program that pipes data from a real port to one of the virtual ports and logs it all.
There's also this question on open-source alternatives that mentions a couple of projects.
如果您在兼容模式下运行 Portmon,它将起作用。
检查让旧程序运行在此版本的 Windows 中。
它说:
以上是微软针对在 Windows 中运行旧版应用程序时常见情况的公开解释。
但是,我可以简单地说一下;
我希望它有效!
If you run Portmon in compatibility mode, it will work.
Check Make older programs run in this version of Windows.
It says:
The above is a public explanation from Microsoft for a common situation when running older applications in Windows.
But, I can say it briefly;
I hope it works!
除了 Portmon,您还可以将 IO Ninja 程序与 "串行监视器" 插件。
它提供的信息比 Portmon 少一点,但形式更容易理解。最主要的是,就像Portmon一样,它允许您查看第三方应用程序和外部设备之间通过串行端口传输的数据。该程序可以在现代版本的 Windows 下运行(我自己在 Windows 10 x64 上尝试过)。上述插件“Serial Monitor”是付费的(但有评估期)。
注意:您要监控的端口必须先连接到“IO Ninja”程序,然后在与您要跟踪的外部设备进行交换的第三方应用程序中打开。
Instead of Portmon you can also use the IO Ninja program with the "Serial Monitor" plugin.
It gives a little less information than Portmon, but in a more understandable form. The main thing is, just like a Portmon, it allows you to see the data that is transmitted between a third-party application and an external device via a serial port. The program works under modern versions of Windows (I tried it myself on Windows 10 x64). The aforementioned plugin "Serial Monitor" is paid (but has an evaluation period).
Note: the port that you want to monitor must first be connected to the "IO Ninja" program, and then opened in a third-party application whose exchange with an external device you want to track.
不要从网络驱动器/路径或其他东西启动 Portmon。
复制到硬盘驱动器,例如桌面上,重新启动并重试!
Don't start Portmon from a network drive/path or something else.
Copy on to the hard disk drive, e.g. on the desktop, restart and try again!
只是为了测试硬件是否正常工作,您也许可以启动 Linux live CD 并运行
statserial
和/或minicom
程序来验证其是否有效。 Knoppix 发行版似乎包含这两个程序。Linux 上的串行端口对于 COM1 命名为
/dev/ttyS0
,对于 COM2 命名为/dev/ttyS1
,等等。Just to test that the hardware is working, you could perhaps boot a Linux live CD and run the
statserial
and/orminicom
program to verify that it works. The Knoppix distribution seems to contain both those programs.Serial ports on Linux are named
/dev/ttyS0
for COM1,/dev/ttyS1
for COM2, etc.