1 /* 2 * PROJECT: ReactOS API tests 3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4 * PURPOSE: Test for SHEnumerateUnreadMailAccountsW 5 * COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) 6 */ 7 8 #include "shelltest.h" 9 10 START_TEST(SHEnumerateUnreadMailAccountsW) 11 { 12 HRESULT hr; 13 WCHAR szMailAddress[MAX_PATH]; 14 HKEY hKey; 15 LSTATUS error; 16 DWORD dwDisposition; 17 18 error = RegCreateKeyExW(HKEY_CURRENT_USER, 19 L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com", 20 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition); 21 ok_long(error, ERROR_SUCCESS); 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 { 30 RegDeleteKeyW(HKEY_CURRENT_USER, 31 L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com"); 32 } 33 } 34