The IWamAdmin::AppDeleteRecoverable method deletes a Web application definition that you can recover later with the IWamAdmin::AppRecover method.
The AppDeleteRecoverable method is primarily used when moving, copying, or renaming metabase keys. This method shuts down the specified application if it is running, and marks the metabase key as deleted. If the application is in-process with IIS, all out-of-process resources associated with the application will be released if the resources are not referenced by another in-process application.
Note Server component DLLs are not released from in-process applications, even if they aren't currently referenced by other applications.
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,
BOOL fRecursive
);
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 an HRESULT will be returned.
It is recommended, but not strictly necessary, that you use AppDeleteRecoverable when copying metabase keys.
If you don't use AppDeleteRecoverable to copy a metabase key, the site that you're moving or copying remains alive during the operation and users can make requests on it if the key was removed mid request.