SHEnumerateUnreadMailAccountsA function

Enumerates the user accounts that have unread email.

Syntax

HRESULT SHEnumerateUnreadMailAccountsA(
  HKEY  hKeyUser,
  DWORD dwIndex,
  LPSTR pszMailAddress,
  int   cchMailAddress
);

Parameters

hKeyUser

Type: HKEY

A valid HKEY for a given user.

dwIndex

Type: DWORD

The index of the user account.

pszMailAddress

Type: LPTSTR

A pointer to a Unicode string that specifies the email address of an account belonging to the specified user.

cchMailAddress

Type: int

The number of characters in the email address.

Return Value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The hKeyUser parameter is the HKEY for the root of the user's information, for example HKEY_CURRENT_USER, or any key enumerated under HKEY_USERS.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shellapi.h
Library Shell32.lib
DLL Shell32.dll