Share via


IStoreNamespace::CompactAll method

Compacts the contents of all message folders.

Syntax

HRESULT CompactAll(
  [in] DWORD dwReserved
);

Parameters

dwReserved [in]

Type: DWORD

Reserved value. Must be 0 or 1. If the value is 0, the user will be presented with a UI if the compacting operation fails. If the value is 1, the user will not be shown the UI if the compacting operation fails.

Return value

Type: HRESULT

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

Return code Description
E_INVALIDARG
The value of dwReserved is not 0 or 1.
MSOEAPI_E_STORE_INITIALIZE
The namespace has not been initialized. To initialize the namespace, call IStoreNamespace::Initialize.

Remarks

Messages marked as deleted will be permanently removed when compacted.

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)