ReactOS 0.4.16-dev-927-g467dec4
SHGetUserDisplayName.cpp
Go to the documentation of this file.
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
12{
13 HRESULT hr;
14 WCHAR szBuf[MAX_PATH];
15 ULONG cchBuf;
16
19
22
23 cchBuf = _countof(szBuf);
24 hr = SHGetUserDisplayName(NULL, &cchBuf);
26
27 cchBuf = _countof(szBuf);
28 hr = SHGetUserDisplayName(szBuf, &cchBuf);
29 ok_hex(hr, S_OK);
30}
#define ok_hex(expression, result)
Definition: atltest.h:94
#define START_TEST(x)
Definition: atltest.h:75
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
EXTERN_C HRESULT WINAPI SHGetUserDisplayName(_Out_writes_to_(*puSize, *puSize) PWSTR pName, _Inout_ PULONG puSize)
Definition: utils.cpp:1844
#define S_OK
Definition: intsafe.h:52
HRESULT hr
Definition: shlfolder.c:183
#define _countof(array)
Definition: sndvol32.h:70
uint32_t ULONG
Definition: typedefs.h:59
__wchar_t WCHAR
Definition: xmlstorage.h:180