reactos/modules/rostests/apitests/shell32/SHEnumerateUnreadMailAccountsW.cpp
Katayama Hirofumi MZ aa52c3f5eb
[SHELL32][SHELL32_APITEST][SDK] Implement SHEnumerateUnreadMailAccountsW (#7619)
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from stubs.cpp into utils.cpp.
- Add prototype to <shellapi.h>.
2025-01-20 08:32:07 +09:00

33 lines
1.1 KiB
C++

/*
* PROJECT: ReactOS API tests
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Test for SHEnumerateUnreadMailAccountsW
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#include "shelltest.h"
START_TEST(SHEnumerateUnreadMailAccountsW)
{
HRESULT hr;
WCHAR szMailAddress[MAX_PATH];
HKEY hKey;
LSTATUS error;
DWORD dwDisposition;
error = RegCreateKeyExW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com",
0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition);
ok_long(error, ERROR_SUCCESS);
szMailAddress[0] = UNICODE_NULL;
hr = SHEnumerateUnreadMailAccountsW(NULL, 0, szMailAddress, _countof(szMailAddress));
ok_hex(hr, S_OK);
ok(szMailAddress[0] != UNICODE_NULL, "szMailAddress was empty\n");
if (dwDisposition == REG_CREATED_NEW_KEY)
{
RegDeleteKeyW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\UnreadMail\\example.com");
}
}