3.9.4.4 DeleteApplicationPool (Opnum 6)

The DeleteApplicationPool method deletes an application pool.

 HRESULT DeleteApplicationPool(
   [in, unique, string] LPCWSTR szPool
 );

szPool: A pointer to a Unicode string that contains the name of the application pool to delete.

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.

0x80070490

ERROR_NOT_FOUND

Element not found.

0x800710D3

ERROR_NOT_EMPTY

The library, drive, or media pool must be empty to perform this operation.

The opnum field value for this method is 6.

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

  • Determine whether the application pool specified by the szPool parameter exists. If it does not, return ERROR_NOT_FOUND.

  • Enumerate the applications in the application pool specified by szPool (see section 3.9.4.5). If any applications are associated with the pool, return ERROR_NOT_EMPTY.

  • Delete the application pool.