IStoreFolder::RegisterNotification method

Registers a window to receive notification messages whenever an operation is performed on the folder associated with this interface.

Syntax

HRESULT RegisterNotification(
  [in] DWORD dwReserved,
  [in] HWND  hwnd
);

Parameters

dwReserved [in]

Type: DWORD

Reserved value. Must be 0.

hwnd [in]

Type: HWND

Handle to a window that will receive the notifications.

Return value

Type: HRESULT

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

Return code Description
E_INVALIDARG
The dwReserved parameter is not 0, or the hwnd value is NULL or does not specify a valid window.
E_FAIL
A notification has already been registered. To remove the notification, call IStoreFolder::UnregisterNotification.

Remarks

Once registered, the window specified by hwnd can receive the following messages.

WM_NEWMSGS Sent when a new message has arrived. The WPARAM value is a pointer to the ID of the new message.
WM_MARKEDASREAD Sent when a message has been marked as read. The WPARAM value is a pointer to the ID of the message. If the WPARAM value is equal to 0xffffffff, all messages in the folder have been marked as read.
WM_MARKEDASUNREAD Sent when a message has been marked as unread. The WPARAM value is a pointer to the ID of the message. If the WPARAM value is equal to 0xffffffff, all messages in the folder have been marked as unread.
WM_DELETEMSGS Sent when a message has been deleted. WPARAM is a pointer to the ID of the message.
WM_DELETEFOLDER Sent when a folder has been deleted. The WPARAM value is a pointer to the STOREFOLDERID of the folder.

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)

See also

IStoreFolder

IStoreFolder::UnregisterNotification