次の方法で共有


IIisServiceControl::Reboot

The IIisServiceControl::Reboot method reboots the computer. It uses InitiateSystemShutdown to cause the system to reboot. The caller must have privileges to shut down the system for this call to succeed.

STDMETHODIMP Reboot(
      DWORD dwTimeoutMsecs,
      DWORD dwForceAppsClosed
);

Parameters

  • dwTimeoutMsecs
    Timeout for apps to be closed by user (in ms).

  • dwForceAppsClosed
    Force apps to be closed when they become unresponsive.

Return Values

This method returns ERROR_RESOURCE_DISABLED if remote access is disabled. Otherwise, COM status is returned.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Header: Declared in iisrsta.h.