Shutdown and Cleanup

For an application to terminate gracefully, it must perform the following cleanup operations:

  • Remove all registered URLs from the URL group by calling the HttpRemoveUrlFromUrlGroup function to deregister URLs previously registered in the call to HttpAddUrlToUrlGroup.
  • Close the URL Group by calling the HttpCloseUrlGroup function. All the URL groups created under a server session must be closed before closing the server session.
  • Close the server session by calling HttpCloseServerSession.
  • Close the handle to the request queue by calling HttpCloseRequestQueue.
  • Terminate the resources created by the HTTP Server API by calling the HttpTerminate function with matching flag settings for each call the application originally made to HttpInitialize. Each of these calls terminates all resources created in the call to HttpInitialize.