The IWamAdmin::AppDeleteRecoverable method deletes a Web application definition and allows it to be recovered later with the IWamAdmin::AppRecover method. You use this method primarily when moving, copying, or renaming metabase keys.
This method shuts down the specified application if it is running, marks the metabase key as deleted, and frees up resources such as registered MTS transaction packages. The metabase key is marked as stopped and subsequent requests to run the application will return an error. The metabase properties MD_APP_ROOT (Automation name AppRoot) and MD_APP_FRIENDLY_NAME (Automation name AppFriendlyName will not be deleted.
HRESULT STDMETHODCALLTYPE AppDeleteRecoverable(
LPCWSTR szMDPath, // [string][unique][in]
BOOL fRecursive // [in]
);
The method will return NO_ERROR if the method succeeded, including the case that no application was defined at the specified path. If the method fails, other error codes converted to HRESULT will be returned.
It is recommended, but not strictly necessary, that you use this method when copying metabase keys. However, keys that have not been marked as deleted with this method are available during the copy process and may receive user requests that may cause unexpected results.