[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>.
This commit is contained in:
Katayama Hirofumi MZ 2025-01-20 08:32:07 +09:00 committed by GitHub
parent 0bb8b46ba8
commit aa52c3f5eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 76 additions and 15 deletions

View file

@ -34,6 +34,7 @@ list(APPEND SOURCE
SHParseDisplayName.cpp
SHRestricted.cpp
SHShouldShowWizards.cpp
SHEnumerateUnreadMailAccountsW.cpp
She.cpp
ShellExec_RunDLL.cpp
ShellExecCmdLine.cpp

View file

@ -0,0 +1,33 @@
/*
* 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");
}
}

View file

@ -34,6 +34,7 @@ extern void func_SHChangeNotify(void);
extern void func_SHCreateDataObject(void);
extern void func_SHCreateFileDataObject(void);
extern void func_SHCreateFileExtractIconW(void);
extern void func_SHEnumerateUnreadMailAccountsW(void);
extern void func_She(void);
extern void func_ShellExec_RunDLL(void);
extern void func_ShellExecCmdLine(void);
@ -84,6 +85,7 @@ const struct test winetest_testlist[] =
{ "SHCreateDataObject", func_SHCreateDataObject },
{ "SHCreateFileDataObject", func_SHCreateFileDataObject },
{ "SHCreateFileExtractIconW", func_SHCreateFileExtractIconW },
{ "SHEnumerateUnreadMailAccountsW", func_SHEnumerateUnreadMailAccountsW },
{ "She", func_She },
{ "ShellExec_RunDLL", func_ShellExec_RunDLL },
{ "ShellExecCmdLine", func_ShellExecCmdLine },