IIS 7.0

Shuts down an instance of the Hosted Web Core.

   IN DWORD fImmediate  


A DWORD that specifies whether the shutdown should be immediate or graceful.

An HRESULT. Possible values include, but are not limited to, those in the following table.

S_OKIndicates that the operation was successful.
ERROR_SERVICE_NOT_ACTIVEIndicates that the Hosted Web Core is not running.
ERROR_INVALID_SERVICE_CONTROLIndicates that a shutdown is already in progress.
ERROR_SERVICE_REQUEST_TIMEOUTIndicates that a graceful shutdown was requested but was not able to complete in the time period specified by the ShutdownTimeLimit setting in the configuration file.

The PFN_WEB_CORE_SHUTDOWN function is a prototype for the WebCoreShutdown DLL entry point in Hwebcore.dll that is used to shut down the Hosted Web Core. The hosting process may choose to shut down the Hosted Web Core either gracefully or immediately. If the hosting process chooses a graceful shutdown, the Hosted Web Core will stop receiving new requests and wait for any currently executing requests to finish based on the time period specified by the ShutdownTimeLimit setting in the configuration file for the application pool.

Client- IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server- IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product- IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- IIS Express 7.5, IIS Express 8.0, IIS Express 10.0

Hosted Web Core API Reference