3.7.4.5 AppDeleteRecoverable (Opnum 7)

The AppDeleteRecoverable method deletes the application from the specified metabase path and saves external state needed to recreate the application if it is recovered.

 HRESULT AppDeleteRecoverable(
   [in, unique, string] LPCWSTR szMDPath,
   [in] BOOL fRecursive
 );

szMDPath:  A pointer to a Unicode string that contains the metabase path of the application.

fRecursive:  A flag indicating whether application definitions are also to be deleted from all subkeys (TRUE) or just from the application at this key (FALSE).

Return Values:  A signed 32-bit value that indicates return status. If the method returns a negative value, it failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF].

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0x80070003

ERROR_PATH_NOT_FOUND

The system cannot find the path specified.

The opnum field value for this method is 7.

When processing this call, the server MUST do the following:

  • If the string length of the szMDPath parameter is <= 10, return E_INVALIDARG.

  • If the metabase path specified by szMDPath does not exist, return ERROR_PATH_NOT_FOUND.

  • If there is no application defined at the metabase path specified by szMDPath, return S_OK.

If the preceding conditions do not apply, the server MAY mark the application in such a way as to prevent it from being run. The server MUST NOT change the value of MD_APP_ISOLATED and MD_APP_ROOT at the metabase key specified by szMDPath.