Reactos
at master 67 lines 1.7 kB view raw
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 18TestDllProductVersion(VOID) 19{ 20 HANDLE hAppHeap = GetProcessHeap(); 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 60Cleanup: 61 HeapFree(hAppHeap, 0, lpData); 62} 63 64START_TEST(tooltip) 65{ 66 TestDllProductVersion(); 67}