如何将处于睡眠模式的计算机唤醒?在 Vb 2008 expr 版中
我正在尝试制作一个闹钟。当计算机处于睡眠模式时,当警报被触发时,我希望计算机唤醒并播放警报。能告诉我如何在 VB 2008 中做到这一点吗?
I'm trying to make an alarm clock. When the computer is in sleep mode, when the alarm is triggered i want the computer to wake up and play the alarm. Can tell me how to do this in vb 2008.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请查看此处,看看这是否符合您的需求?本文介绍如何将计算机从待机或休眠状态唤醒。
希望这有帮助,
此致,
汤姆.
Have a look here to see if this fits your needs? This article explains how to wake up a computer from standby or hibernation.
Hope this helps,
Best regards,
Tom.
据我所知,这是不可能的。 “睡眠模式”(ACPI S3) 是一种硬件电源状态,当计算机处于 S3 状态时,不会执行软件指令。要唤醒机器,您必须安排来自硬件实时时钟的中断;并非所有 RTC 都支持通过中断从 S3 唤醒机器,因此这在您的机器上可能完全不可能。即使您的 RTC 能够做到这一点,Visual Basic 似乎也没有提供适当的硬件接口;您可能需要较低级语言(C 甚至汇编)才能访问这些功能。
As far as I know, this cannot be done. "Sleep mode" (ACPI S3) is a hardware power state, and software instructions are not executed while a computer is in the S3 state. To wake the machine, you will have to schedule an interrupt from the hardware's Real-Time Clock; not all RTCs support waking the machine from S3 via interrupts, so this may be completely impossible on your machine. Even if your RTC is capable of doing this, it does not appear that Visual Basic provides an appropriate interface to the hardware; you will probably require a lower-level language (C or even assembly) to access these features.