1 /*
2  * PROJECT:     ReactOS API tests
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     Test for SHGetUserDisplayName
5  * COPYRIGHT:   Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6  */
7 
8 #include "shelltest.h"
9 #include <undocshell.h>
10 
11 START_TEST(SHGetUserDisplayName)
12 {
13     HRESULT hr;
14     WCHAR szBuf[MAX_PATH];
15     ULONG cchBuf;
16 
17     hr = SHGetUserDisplayName(NULL, NULL);
18     ok_hex(hr, E_INVALIDARG);
19 
20     hr = SHGetUserDisplayName(szBuf, NULL);
21     ok_hex(hr, E_INVALIDARG);
22 
23     cchBuf = _countof(szBuf);
24     hr = SHGetUserDisplayName(NULL, &cchBuf);
25     ok_hex(hr, E_INVALIDARG);
26 
27     cchBuf = _countof(szBuf);
28     hr = SHGetUserDisplayName(szBuf, &cchBuf);
29     ok_hex(hr, S_OK);
30 }
31