MailOpenNotifyEx

This function, an extension of MailOpenNotify, attempts to open a mail database, specify a window handle to receive DB_CEIOD messages, and distinguish between different versions of the message store.

At a Glance

Header file: Msgstor2.h
Platforms: H/PC 3.0
Windows CE versions: 2.10 and later

Syntax

BOOL MailOpenNotifyEx (HANDLE * phMail, WORD* pwVersion
BOOL fAllowCreate, HWND hwndNotify);

Parameters

phMail
[out] Pointer to the mail handle. This handle is set even if the function fails. Upon failure, call the function MailError against the returned handle to obtain the specific error message.
pwVersion
[out] Pointer to the message store version number. If set to NULL, this function does not return anything in this parameter. Otherwise, this function returns 0x0300 on an H/PC 3.0 and 0x0200 on an H/PC.
fAllowCreate
[in] Boolean for creating a new database. If set to TRUE, this function creates a new mail database when a mail database does not currently exist. If set to FALSE, this function fails when it cannot open or find the mail database.
hwndNotify
[in] Handle to the window to receive DB_CEOID_* notifications. These notifications represent changes made to the database by other handles.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

A desktop computer can use the pwVersion parameter to determine whether it is connected to an H/PC or an H/PC 3.0.