From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



在LabVIEW中如何关闭Windows?



主要软件: LabVIEW Development Systems
主要软件版本: N/A
主要软件修正版本: N/A
次要软件: N/A

问题:
在LabVIEW中我应该调用哪一个DLL或函数来关闭Windows?

解答:
根据您的需要,可以调用以下两个函数中的任意一个:

ExitWindows
ExitWindows函数会注销当前用户的帐号,但这并不会关闭Windows。该函数会发送"WM_QUERYENDSESSION" 消息给所有的应用程序,来决定是否他们能被终止。

ExitWindowsEx
这个函数或者注销当前用户,重启机器,或者完全关闭机器。该函数也会发送"WM_QUERYENDSESSION" 消息给所有的应用程序,来决定是否他们能被终止。

这两个函数都在“User32.dll”文件中,该文件在Windows 95/98/Me中位于
c:\windows\system
,在Windows NT/2000中位于
c:\winnt\system32


相关链接:
Developer Zone Example: Integrating LabVIEW Code into Other Programming Languages
Developer Zone Example: Windows API Functions Utilities (32-bit) for LabVIEW
Developer Zone Example: Shutting Down Windows 2000/NT Programmatically
Developer Zone Example: Display Exported Functions in DLL

附件:





报告日期: 10/25/2000
最近更新: 12/11/2007
文档编号: 22OC040A