1

如何使用 perl 在 Windows 中“捕获”一个 SUSPEND 和一个 APMRESUME 消息?

目标是制作一个程序,在该程序中,只要有可能就向服务器发出用户断开连接的警告是个好主意。

我已经尝试在很多地方搜索如何做到这一点。我只能找到如何在.net 中使用/或 C# 但我找不到 perl。

4

1 回答 1

0

I presume you mean the Windows Advanced Power Management API? The closest I can find is Sys::Apm, but that provides only for fetching current status values and will not handle events

Since ACPI has superseded APM I don't think a module is likely to be written that does what you want, but perhaps you could use Win32::API to write a Perl interface to the relevant DLL

I'm afraid that's all I can suggest

于 2012-09-18T20:04:50.477 回答