The IWamAdmin::AppUnload method unloads a Web application that is running out-of-process. All of the application's resources are released and the application's process is terminated. If the application is running in-process, the application is released if it is not being referenced by any other applications.
HRESULT STDMETHODCALLTYPE AppUnLoad(
LPCWSTR szMDPath, // [string][unique][in]
BOOL fRecursive // [in]
);
The method will return NO_ERROR if the method succeeded, including the cases that no application was defined at the specified path, or the application is not running. If the method fails, other error codes converted to HRESULT will be returned.