ReactOS 0.4.16-dev-1612-g0f4e223
tooltip.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API Tests
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Unit tests for the comctl32 tooltips
5 * COPYRIGHT: Copyright 2025 Dmitry Borisov <di.sean@protonmail.com>
6 */
7
8/* INCLUDES *******************************************************************/
9
10#include "wine/test.h"
11
12#include <windows.h>
13
14/* FUNCTIONS ******************************************************************/
15
16static
17VOID
19{
21 DWORD dwInfoSize;
22 LPVOID lpData;
23 VS_FIXEDFILEINFO* pInfo;
24 UINT uInfoLen;
25
26 dwInfoSize = GetFileVersionInfoSizeW(L"comctl32.dll", NULL);
27 if (dwInfoSize == 0)
28 {
29 skip("GetModuleFileNameW failed\n");
30 return;
31 }
32
33 lpData = HeapAlloc(hAppHeap, 0, dwInfoSize);
34 if (!lpData)
35 {
36 skip("No memory\n");
37 return;
38 }
39
40 if (!GetFileVersionInfoW(L"comctl32.dll", 0, dwInfoSize, lpData))
41 {
42 skip("Unable to retrieve the file version information\n");
43 goto Cleanup;
44 }
45
46 if (!VerQueryValueW(lpData, L"\\", (LPVOID *)&pInfo, &uInfoLen) || uInfoLen == 0)
47 {
48 skip("Unable to retrieve the root block\n");
49 goto Cleanup;
50 }
51
52 /*
53 * SIV 5.80 expects that the "product version" string of the comctl32.dll file
54 * will have the "file version" format. This value is used to determine
55 * whether tooltip support is available.
56 */
57 ok(pInfo->dwProductVersionMS >= MAKELONG(5, 0),
58 "Unknown comctl32.dll version %lx\n", pInfo->dwProductVersionMS);
59
61 HeapFree(hAppHeap, 0, lpData);
62}
63
64START_TEST(tooltip)
65{
67}
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
HANDLE hAppHeap
Definition: mmc.c:24
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:967
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1171
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:738
static const WCHAR Cleanup[]
Definition: register.c:80
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned int UINT
Definition: ndis.h:50
DWORD dwProductVersionMS
Definition: compat.h:904
static VOID TestDllProductVersion(VOID)
Definition: tooltip.c:18
#define MAKELONG(a, b)
Definition: typedefs.h:249