Share via


IStoreNamespace::DeleteFolder method

Recursively deletes a specified message folder and all items that are inside it, including child folders.

Syntax

HRESULT DeleteFolder(
  [in] STOREFOLDERID dwFolderId,
  [in] DWORD         dwReserved
);

Parameters

dwFolderId [in]

Type: STOREFOLDERID

Specifies the folder to be deleted.

dwReserved [in]

Type: DWORD

Reserved value. Must be 0.

Return value

Type: HRESULT

Returns S_OK if successful, or one of the following error values.

Return code Description
E_INVALIDARG
The value of dwFolderId is invalid.
MSOEAPI_E_STORE_INITIALIZE
The namespace has not been initialized. To initialize the namespace, call IStoreNamespace::Initialize.

Remarks

Only user-created folders may be deleted. Special folders may not be deleted.

Deleted folders will be moved to the deleted items folder. If the folder specified by dwFolderId is already a child of the deleted items folder, the folder specified by dwFolderId and all items within it will be permanently deleted.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Msoeapi.h
IDL
Msoeapi.idl
DLL
Inetcomm.dll (version 6.0 or later)