ReactOS 0.4.16-dev-927-g467dec4
SHEnumerateUnreadMailAccountsW.cpp File Reference
#include "shelltest.h"
Include dependency graph for SHEnumerateUnreadMailAccountsW.cpp:

Go to the source code of this file.

Functions

 START_TEST (SHEnumerateUnreadMailAccountsW)
 

Function Documentation

◆ START_TEST()

Definition at line 10 of file SHEnumerateUnreadMailAccountsW.cpp.

11{
12 HRESULT hr;
13 WCHAR szMailAddress[MAX_PATH];
14 HKEY hKey;
16 DWORD dwDisposition;
17
19 L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com",
20 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition);
22
23 szMailAddress[0] = UNICODE_NULL;
24 hr = SHEnumerateUnreadMailAccountsW(NULL, 0, szMailAddress, _countof(szMailAddress));
25 ok_hex(hr, S_OK);
26 ok(szMailAddress[0] != UNICODE_NULL, "szMailAddress was empty\n");
27
28 if (dwDisposition == REG_CREATED_NEW_KEY)
29 {
31 L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com");
32 }
33}
#define ok_hex(expression, result)
Definition: atltest.h:94
#define ok_long(expression, result)
Definition: atltest.h:133
#define ok(value,...)
Definition: atltest.h:57
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239
#define MAX_PATH
Definition: compat.h:34
EXTERN_C HRESULT WINAPI SHEnumerateUnreadMailAccountsW(_In_opt_ HKEY hKeyUser, _In_ DWORD dwIndex, _Out_writes_(cchMailAddress) PWSTR pszMailAddress, _In_ INT cchMailAddress)
Definition: utils.cpp:1111
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
#define S_OK
Definition: intsafe.h:52
#define error(str)
Definition: mkdosfs.c:1605
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1084
#define KEY_WRITE
Definition: nt_native.h:1031
#define UNICODE_NULL
#define L(x)
Definition: ntvdm.h:50
HRESULT hr
Definition: shlfolder.c:183
#define _countof(array)
Definition: sndvol32.h:70
#define HKEY_CURRENT_USER
Definition: winreg.h:11
__wchar_t WCHAR
Definition: xmlstorage.h:180