ReactOS  0.4.12-dev-945-g5a2911d
dispmode.c File Reference
#include <ntstatus.h>
#include <windows.h>
#include <winternl.h>
#include <stdio.h>
#include <strsafe.h>
#include "wine/test.h"
#include "apitest_iathook.h"
#include "appshim_apitest.h"
Include dependency graph for dispmode.c:

Go to the source code of this file.

Classes

struct  test_info
 

Macros

#define WIN32_NO_STATUS
 
#define WINVER_ANY   0
 

Functions

static BOOL (WINAPI *pNotifyShims)(DWORD fdwReason
 
DWORD get_module_version (HMODULE mod)
 
static LONG (WINAPI *pChangeDisplaySettingsA)(_In_opt_ PDEVMODEA lpDevMode
 
LONG WINAPI mChangeDisplaySettingsA (_In_opt_ PDEVMODEA lpDevMode, _In_ DWORD dwflags)
 
BOOL WINAPI mEnumDisplaySettingsA (_In_opt_ LPCSTR lpszDeviceName, _In_ DWORD iModeNum, _Inout_ PDEVMODEA lpDevMode)
 
static void (WINAPI *pSetThemeAppProperties)(DWORD dwFlags)
 
void WINAPI mSetThemeAppProperties (DWORD dwFlags)
 
static void pre_8bit (void)
 
static void pre_8bit_2 (void)
 
static void post_8bit (void)
 
static void post_8bit_2 (void)
 
static void post_8bit_no (void)
 
static void post_8bit_2_no (void)
 
static void pre_640 (void)
 
static void pre_640_2 (void)
 
static void post_640 (void)
 
static void post_640_2 (void)
 
static void post_640_no (void)
 
static void post_640_2_no (void)
 
static void pre_theme (void)
 
static void post_theme (void)
 
static void post_theme_no (void)
 
static BOOL hook_disp (HMODULE dll)
 
static VOID unhook_disp (HMODULE dll)
 
static BOOL hook_theme (HMODULE dll)
 
static VOID unhook_theme (HMODULE dll)
 
static void test_one (LPCSTR shim, DWORD dwReason, void(*pre)(), void(*post)(), void(*second)(void))
 
static void run_test (size_t n, BOOL unload)
 
 START_TEST (dispmode)
 

Variables

static DWORD g_Version
 
static tGETHOOKAPIS pGetHookAPIs
 
static PVOID ptr
 
static LONG g_ChangeCount
 
static DEVMODEA g_LastDevmode
 
static DWORD g_LastFlags
 
static _In_ DWORD dwflags
 
static LONG g_EnumCount
 
static BOOL bFix = TRUE
 
static _In_ DWORD iModeNum
 
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
 
static LONG g_ThemeCount
 
static DWORD g_LastThemeFlags
 
static struct test_info tests []
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 9 of file dispmode.c.

◆ WINVER_ANY

#define WINVER_ANY   0

Definition at line 23 of file dispmode.c.

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pNotifyShims)
static

◆ get_module_version()

DWORD get_module_version ( HMODULE  mod)

Definition at line 30 of file dispmode.c.

31 {
32  DWORD dwVersion = 0;
34  DWORD dwSize = SizeofResource(mod, hResInfo);
35  if (hResInfo && dwSize)
36  {
37  VS_FIXEDFILEINFO *lpFfi;
38  UINT uLen;
39 
40  HGLOBAL hResData = LoadResource(mod, hResInfo);
41  LPVOID pRes = LockResource(hResData);
42  HLOCAL pResCopy = LocalAlloc(LMEM_FIXED, dwSize);
43 
44  CopyMemory(pResCopy, pRes, dwSize);
45  FreeResource(hResData);
46 
47  if (VerQueryValueW(pResCopy, L"\\", (LPVOID*)&lpFfi, &uLen))
48  {
49  dwVersion = (HIWORD(lpFfi->dwProductVersionMS) << 8) | LOWORD(lpFfi->dwProductVersionMS);
50  if (!dwVersion)
51  dwVersion = (HIWORD(lpFfi->dwFileVersionMS) << 8) | LOWORD(lpFfi->dwFileVersionMS);
52  }
53 
54  LocalFree(pResCopy);
55  }
56 
57  return dwVersion;
58 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define FindResource
Definition: winbase.h:3607
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
BOOL WINAPI FreeResource(HGLOBAL handle)
Definition: res.c:559
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
#define RT_VERSION
Definition: pedump.c:376
#define LMEM_FIXED
Definition: winbase.h:349
#define CopyMemory
Definition: winbase.h:1633
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
unsigned int UINT
Definition: ndis.h:50
#define VS_VERSION_INFO
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
#define HIWORD(l)
Definition: typedefs.h:246
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
#define LOWORD(l)
Definition: pedump.c:82
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
static int mod
Definition: i386-dis.c:1273
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1054

Referenced by run_test(), and START_TEST().

◆ hook_disp()

static BOOL hook_disp ( HMODULE  dll)
static

Definition at line 295 of file dispmode.c.

296 {
297  return RedirectIat(dll, "user32.dll", "ChangeDisplaySettingsA", (ULONG_PTR)mChangeDisplaySettingsA, (ULONG_PTR*)&pChangeDisplaySettingsA) &&
298  RedirectIat(dll, "user32.dll", "EnumDisplaySettingsA", (ULONG_PTR)mEnumDisplaySettingsA, (ULONG_PTR*)&pEnumDisplaySettingsA);
299 }
LONG WINAPI mChangeDisplaySettingsA(_In_opt_ PDEVMODEA lpDevMode, _In_ DWORD dwflags)
Definition: dispmode.c:65
uint32_t ULONG_PTR
Definition: typedefs.h:63
static HMODULE dll
Definition: str.c:188
static BOOL RedirectIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR *OriginalFunction)
BOOL WINAPI mEnumDisplaySettingsA(_In_opt_ LPCSTR lpszDeviceName, _In_ DWORD iModeNum, _Inout_ PDEVMODEA lpDevMode)
Definition: dispmode.c:78

◆ hook_theme()

static BOOL hook_theme ( HMODULE  dll)
static

Definition at line 307 of file dispmode.c.

308 {
309  return RedirectIat(dll, "uxtheme.dll", "SetThemeAppProperties", (ULONG_PTR)mSetThemeAppProperties, (ULONG_PTR*)&pSetThemeAppProperties);
310 }
void WINAPI mSetThemeAppProperties(DWORD dwFlags)
Definition: dispmode.c:117
uint32_t ULONG_PTR
Definition: typedefs.h:63
static HMODULE dll
Definition: str.c:188
static BOOL RedirectIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR *OriginalFunction)

◆ LONG()

static LONG ( WINAPI pChangeDisplaySettingsA)
static

◆ mChangeDisplaySettingsA()

LONG WINAPI mChangeDisplaySettingsA ( _In_opt_ PDEVMODEA  lpDevMode,
_In_ DWORD  dwflags 
)

Definition at line 65 of file dispmode.c.

66 {
67  g_ChangeCount++;
70 
71  return DISP_CHANGE_FAILED;
72 }
#define DISP_CHANGE_FAILED
Definition: winuser.h:194
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
Definition: dispmode.c:77
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
static LONG g_ChangeCount
Definition: dispmode.c:60
static _In_ DWORD dwflags
Definition: dispmode.c:64
static DWORD g_LastFlags
Definition: dispmode.c:62

Referenced by hook_disp().

◆ mEnumDisplaySettingsA()

BOOL WINAPI mEnumDisplaySettingsA ( _In_opt_ LPCSTR  lpszDeviceName,
_In_ DWORD  iModeNum,
_Inout_ PDEVMODEA  lpDevMode 
)

Definition at line 78 of file dispmode.c.

79 {
80  g_EnumCount++;
81  if (pEnumDisplaySettingsA(lpszDeviceName, iModeNum, lpDevMode))
82  {
83  if (bFix)
84  {
85  if (lpDevMode && lpDevMode->dmBitsPerPel == 8)
86  {
87  trace("Running at 8bpp, faking 16\n");
88  lpDevMode->dmBitsPerPel = 16;
89  }
90  if (lpDevMode && lpDevMode->dmPelsWidth == 640 && lpDevMode->dmPelsHeight == 480)
91  {
92  trace("Running at 640x480, faking 800x600\n");
93  lpDevMode->dmPelsWidth = 800;
94  lpDevMode->dmPelsHeight = 600;
95  }
96  }
97  else
98  {
99  if (lpDevMode)
100  {
101  lpDevMode->dmBitsPerPel = 8;
102  lpDevMode->dmPelsWidth = 640;
103  lpDevMode->dmPelsHeight = 480;
104  }
105  }
106  return TRUE;
107  }
108  return FALSE;
109 }
#define trace(...)
Definition: kmt_test.h:217
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
static _In_ DWORD iModeNum
Definition: dispmode.c:77
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
Definition: dispmode.c:77
DWORD dmPelsHeight
Definition: wingdi.h:1575
DWORD dmBitsPerPel
Definition: wingdi.h:1573
static BOOL bFix
Definition: dispmode.c:75
DWORD dmPelsWidth
Definition: wingdi.h:1574

Referenced by hook_disp().

◆ mSetThemeAppProperties()

void WINAPI mSetThemeAppProperties ( DWORD  dwFlags)

Definition at line 117 of file dispmode.c.

118 {
119  g_ThemeCount++;
121 }
static LONG g_ThemeCount
Definition: dispmode.c:113
static DWORD g_LastThemeFlags
Definition: dispmode.c:114
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175

Referenced by hook_theme().

◆ post_640()

static void post_640 ( void  )
static

Definition at line 210 of file dispmode.c.

211 {
212  ok_int(g_ChangeCount, 1);
217  ok_int(g_EnumCount, 1);
218 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define ok_int(x, y)
Definition: sprintf.c:21
#define CDS_FULLSCREEN
Definition: winuser.h:183
#define DM_PELSWIDTH
Definition: wingdi.h:1251
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
#define ok_hex(expression, result)
Definition: test.h:759
DWORD dmPelsHeight
Definition: wingdi.h:1575
static LONG g_ChangeCount
Definition: dispmode.c:60
DWORD dmFields
Definition: wingdi.h:1548
static DWORD g_LastFlags
Definition: dispmode.c:62
#define DM_PELSHEIGHT
Definition: wingdi.h:1252
DWORD dmPelsWidth
Definition: wingdi.h:1574

◆ post_640_2()

static void post_640_2 ( void  )
static

Definition at line 220 of file dispmode.c.

221 {
222  ok_int(g_ChangeCount, 0);
223  ok_hex(g_LastFlags, 0xffffffff);
224  ok_int(g_EnumCount, 1);
225 
226  bFix = TRUE;
227 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define ok_int(x, y)
Definition: sprintf.c:21
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
static BOOL bFix
Definition: dispmode.c:75

◆ post_640_2_no()

static void post_640_2_no ( void  )
static

Definition at line 250 of file dispmode.c.

251 {
253  {
254  ok_int(g_ChangeCount, 0);
255  ok_hex(g_LastFlags, 0xffffffff);
256  ok_int(g_EnumCount, 1);
257  }
258  else
259  {
260  ok_int(g_ChangeCount, 0);
261  ok_hex(g_LastFlags, 0xffffffff);
262  ok_int(g_EnumCount, 0);
263  }
264 
265  bFix = TRUE;
266 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
#define ok_int(x, y)
Definition: sprintf.c:21
static DWORD g_Version
Definition: dispmode.c:22
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
static BOOL bFix
Definition: dispmode.c:75

◆ post_640_no()

static void post_640_no ( void  )
static

Definition at line 229 of file dispmode.c.

230 {
232  {
233  ok_int(g_ChangeCount, 1);
238  ok_int(g_EnumCount, 1);
239  }
240  else
241  {
242  ok_int(g_ChangeCount, 0);
243  ok_hex(g_LastFlags, 0xffffffff);
244  ok_int(g_EnumCount, 0);
245  }
246 
247  bFix = TRUE;
248 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
#define ok_int(x, y)
Definition: sprintf.c:21
#define CDS_FULLSCREEN
Definition: winuser.h:183
static DWORD g_Version
Definition: dispmode.c:22
#define DM_PELSWIDTH
Definition: wingdi.h:1251
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
#define ok_hex(expression, result)
Definition: test.h:759
DWORD dmPelsHeight
Definition: wingdi.h:1575
static LONG g_ChangeCount
Definition: dispmode.c:60
DWORD dmFields
Definition: wingdi.h:1548
static DWORD g_LastFlags
Definition: dispmode.c:62
#define DM_PELSHEIGHT
Definition: wingdi.h:1252
static BOOL bFix
Definition: dispmode.c:75
DWORD dmPelsWidth
Definition: wingdi.h:1574

◆ post_8bit()

static void post_8bit ( void  )
static

Definition at line 139 of file dispmode.c.

140 {
141  ok_int(g_ChangeCount, 1);
145  ok_int(g_EnumCount, 1);
146 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define ok_int(x, y)
Definition: sprintf.c:21
#define CDS_FULLSCREEN
Definition: winuser.h:183
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
DWORD dmFields
Definition: wingdi.h:1548
DWORD dmBitsPerPel
Definition: wingdi.h:1573
static DWORD g_LastFlags
Definition: dispmode.c:62
#define DM_BITSPERPEL
Definition: wingdi.h:1250

◆ post_8bit_2()

static void post_8bit_2 ( void  )
static

Definition at line 148 of file dispmode.c.

149 {
150  ok_int(g_ChangeCount, 0);
151  ok_hex(g_LastFlags, 0xffffffff);
152  ok_int(g_EnumCount, 1);
153 
154  bFix = TRUE;
155 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define ok_int(x, y)
Definition: sprintf.c:21
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
static BOOL bFix
Definition: dispmode.c:75

◆ post_8bit_2_no()

static void post_8bit_2_no ( void  )
static

Definition at line 177 of file dispmode.c.

178 {
180  {
181  ok_int(g_ChangeCount, 0);
182  ok_hex(g_LastFlags, 0xffffffff);
183  ok_int(g_EnumCount, 1);
184  }
185  else
186  {
187  ok_int(g_ChangeCount, 0);
188  ok_hex(g_LastFlags, 0xffffffff);
189  ok_int(g_EnumCount, 0);
190  }
191 
192  bFix = TRUE;
193 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
#define ok_int(x, y)
Definition: sprintf.c:21
static DWORD g_Version
Definition: dispmode.c:22
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
static BOOL bFix
Definition: dispmode.c:75

◆ post_8bit_no()

static void post_8bit_no ( void  )
static

Definition at line 157 of file dispmode.c.

158 {
160  {
161  ok_int(g_ChangeCount, 1);
165  ok_int(g_EnumCount, 1);
166  }
167  else
168  {
169  ok_int(g_ChangeCount, 0);
170  ok_hex(g_LastFlags, 0xffffffff);
171  ok_int(g_EnumCount, 0);
172  }
173 
174  bFix = TRUE;
175 }
static LONG g_EnumCount
Definition: dispmode.c:74
#define TRUE
Definition: types.h:120
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
#define ok_int(x, y)
Definition: sprintf.c:21
#define CDS_FULLSCREEN
Definition: winuser.h:183
static DWORD g_Version
Definition: dispmode.c:22
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
#define ok_hex(expression, result)
Definition: test.h:759
static LONG g_ChangeCount
Definition: dispmode.c:60
DWORD dmFields
Definition: wingdi.h:1548
DWORD dmBitsPerPel
Definition: wingdi.h:1573
static DWORD g_LastFlags
Definition: dispmode.c:62
#define DM_BITSPERPEL
Definition: wingdi.h:1250
static BOOL bFix
Definition: dispmode.c:75

◆ post_theme()

static void post_theme ( void  )
static

Definition at line 274 of file dispmode.c.

275 {
276  ok_int(g_ThemeCount, 1);
278 }
#define ok_int(x, y)
Definition: sprintf.c:21
static LONG g_ThemeCount
Definition: dispmode.c:113
static DWORD g_LastThemeFlags
Definition: dispmode.c:114
#define ok_hex(expression, result)
Definition: test.h:759

◆ post_theme_no()

static void post_theme_no ( void  )
static

Definition at line 280 of file dispmode.c.

281 {
283  {
284  ok_int(g_ThemeCount, 1);
286  }
287  else
288  {
289  ok_int(g_ThemeCount, 0);
290  ok_hex(g_LastThemeFlags, 0xffffffff);
291  }
292 }
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
#define ok_int(x, y)
Definition: sprintf.c:21
static LONG g_ThemeCount
Definition: dispmode.c:113
static DWORD g_Version
Definition: dispmode.c:22
static DWORD g_LastThemeFlags
Definition: dispmode.c:114
#define ok_hex(expression, result)
Definition: test.h:759

◆ pre_640()

static void pre_640 ( void  )
static

Definition at line 195 of file dispmode.c.

196 {
197  g_ChangeCount = 0;
198  memset(&g_LastDevmode, 0, sizeof(g_LastDevmode));
199  g_LastFlags = 0xffffffff;
200  g_EnumCount = 0;
201 }
static LONG g_EnumCount
Definition: dispmode.c:74
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
#define memset(x, y, z)
Definition: compat.h:39

Referenced by pre_640_2().

◆ pre_640_2()

static void pre_640_2 ( void  )
static

Definition at line 203 of file dispmode.c.

204 {
205  bFix = FALSE;
206 
207  pre_640();
208 }
static void pre_640(void)
Definition: dispmode.c:195
static BOOL bFix
Definition: dispmode.c:75

◆ pre_8bit()

static void pre_8bit ( void  )
static

Definition at line 124 of file dispmode.c.

125 {
126  g_ChangeCount = 0;
127  memset(&g_LastDevmode, 0, sizeof(g_LastDevmode));
128  g_LastFlags = 0xffffffff;
129  g_EnumCount = 0;
130 }
static LONG g_EnumCount
Definition: dispmode.c:74
static DEVMODEA g_LastDevmode
Definition: dispmode.c:61
static LONG g_ChangeCount
Definition: dispmode.c:60
static DWORD g_LastFlags
Definition: dispmode.c:62
#define memset(x, y, z)
Definition: compat.h:39

Referenced by pre_8bit_2().

◆ pre_8bit_2()

static void pre_8bit_2 ( void  )
static

Definition at line 132 of file dispmode.c.

133 {
134  bFix = FALSE;
135 
136  pre_8bit();
137 }
static void pre_8bit(void)
Definition: dispmode.c:124
static BOOL bFix
Definition: dispmode.c:75

◆ pre_theme()

static void pre_theme ( void  )
static

Definition at line 268 of file dispmode.c.

269 {
270  g_ThemeCount = 0;
271  g_LastThemeFlags = 0xffffffff;
272 }
static LONG g_ThemeCount
Definition: dispmode.c:113
static DWORD g_LastThemeFlags
Definition: dispmode.c:114

◆ run_test()

static void run_test ( size_t  n,
BOOL  unload 
)
static

Definition at line 387 of file dispmode.c.

388 {
389  BOOL ret;
390  HMODULE dll;
391 
392  if (!LoadShimDLL(tests[n].dll, &dll, &pGetHookAPIs))
393  pGetHookAPIs = NULL;
394  pNotifyShims = (void*)GetProcAddress(dll, "NotifyShims");
395 
396  if (!pGetHookAPIs || !pNotifyShims)
397  {
398  skip("%s not loaded, or does not export GetHookAPIs or pNotifyShims (%s, %p, %p)\n",
399  wine_dbgstr_w(tests[n].dll), tests[n].name, pGetHookAPIs, pNotifyShims);
400  return;
401  }
402 
404 
405  if (!g_Version)
406  {
408  trace("Module %s has no version, faking 2k3\n", wine_dbgstr_w(tests[n].dll));
409  }
410 
411  if (g_Version >= tests[n].winver)
412  {
413  ret = tests[n].hook(dll);
414  if (ret)
415  {
416  test_one(tests[n].name, tests[n].reason, tests[n].pre, tests[n].post, tests[n].second);
417  tests[n].unhook(dll);
418  }
419  else
420  {
421  ok(0, "Unable to redirect functions!\n");
422  }
423  }
424  FreeLibrary(dll);
425  if (unload)
426  {
428  ok(dll == NULL, "Unable to unload %s\n", wine_dbgstr_w(tests[n].dll));
429  }
430 }
#define trace(...)
Definition: kmt_test.h:217
BOOL LoadShimDLL(PCWSTR ShimDll, HMODULE *module, tGETHOOKAPIS *ppGetHookAPIs)
Definition: versionlie.c:301
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
static void test_one(LPCSTR shim, DWORD dwReason, void(*pre)(), void(*post)(), void(*second)(void))
Definition: dispmode.c:317
static struct test_info tests[]
GLdouble n
Definition: glext.h:7729
static DWORD g_Version
Definition: dispmode.c:22
static HMODULE dll
Definition: str.c:188
DWORD get_module_version(HMODULE mod)
Definition: dispmode.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: CString.cpp:62
smooth NULL
Definition: ftsmooth.c:416
#define ok(value,...)
Definition: CComObject.cpp:34
#define FreeLibrary(x)
Definition: compat.h:405
static tGETHOOKAPIS pGetHookAPIs
Definition: dispmode.c:26
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
int ret
#define skip(...)
Definition: CString.cpp:57
Definition: name.c:36
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( dispmode  )

Definition at line 433 of file dispmode.c.

434 {
435  HMODULE dll = LoadLibraryA("apphelp.dll");
436  size_t n;
437  int argc;
438  char **argv;
439 
441  if (argc < 3)
442  {
445  dll = GetModuleHandleW(L"aclayers.dll");
446  if (!dll)
447  dll = GetModuleHandleW(L"acgenral.dll");
448  if (dll != NULL)
449  trace("Loaded under a shim, running each test in it's own process\n");
450 
451  for (n = 0; n < _countof(tests); ++n)
452  {
453  LONG failures = winetest_get_failures();
454 
455  if (dll == NULL)
456  {
457  run_test(n, TRUE);
458  }
459  else
460  {
461  WCHAR buf[MAX_PATH+40];
462  STARTUPINFOW si = { sizeof(si) };
464  BOOL created;
465 
466  StringCchPrintfW(buf, _countof(buf), L"\"%ls\" dispmode %u", path, n);
467  created = CreateProcessW(NULL, buf, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
468  ok(created, "Expected CreateProcess to succeed\n");
469  if (created)
470  {
472  CloseHandle(pi.hThread);
473  CloseHandle(pi.hProcess);
474  }
475  }
476 
477  ok(failures == winetest_get_failures(), "Last %u failures are from %d (%s)\n",
478  winetest_get_failures() - failures, n, tests[n].name);
479  }
480  }
481  else
482  {
483  n = (size_t)atoi(argv[2]);
484  if (n < _countof(tests))
485  {
486  run_test(n, FALSE);
487  }
488  else
489  {
490  ok(0, "Test out of range: %u\n", n);
491  }
492  }
493 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:607
static int argc
Definition: ServiceArgs.c:12
#define trace(...)
Definition: kmt_test.h:217
LONG winetest_get_failures(void)
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static struct test_info tests[]
#define _countof(array)
Definition: fontsub.cpp:30
GLdouble n
Definition: glext.h:7729
#define argv
Definition: mplay32.c:18
static HMODULE dll
Definition: str.c:188
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
smooth NULL
Definition: ftsmooth.c:416
static void run_test(size_t n, BOOL unload)
Definition: dispmode.c:387
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4623
#define ok(value,...)
Definition: CComObject.cpp:34
__kernel_size_t size_t
Definition: linux.h:237
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
int winetest_get_mainargs(char ***pargv)
static DWORD pi
Definition: protocol.c:150
static const WCHAR L[]
Definition: oid.c:1250
void winetest_wait_child_process(HANDLE process)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
Definition: services.c:325
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
Definition: name.c:36
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845

◆ test_one()

static void test_one ( LPCSTR  shim,
DWORD  dwReason,
void(*)()  pre,
void(*)()  post,
void(*)(void second 
)
static

Definition at line 317 of file dispmode.c.

318 {
319  DWORD num_shims = 0;
320  WCHAR wide_shim[50] = { 0 };
321  PVOID hook;
322  BOOL ret;
323  MultiByteToWideChar(CP_ACP, 0, shim, -1, wide_shim, 50);
324 
325  if (pre)
326  pre();
327 
328  hook = pGetHookAPIs("", wide_shim, &num_shims);
329  if (hook == NULL)
330  {
331  skip("Skipping tests for layers (%s) not present in this os (0x%x)\n", shim, g_Version);
332  return;
333  }
334  ok(hook != NULL, "Expected hook to be a valid pointer for %s\n", shim);
335  ok(num_shims == 0, "Expected not to find any apihooks, got: %u for %s\n", num_shims, shim);
336 
337  ret = pNotifyShims(dwReason, NULL);
338 
339  /* Win7 and Win10 return 1, w2k3 returns a pointer */
340  ok(ret != 0, "Expected pNotifyShims to succeed (%i)\n", ret);
341 
342  if (post)
343  post();
344 
345  /* Invoking it a second time does not call the init functions again! */
346  if (pre && second)
347  {
348  pre();
349 
350  ret = pNotifyShims(dwReason, NULL);
351  ok(ret != 0, "Expected pNotifyShims to succeed (%i)\n", ret);
352 
353  second();
354  }
355 }
#define CP_ACP
Definition: compat.h:99
static DWORD g_Version
Definition: dispmode.c:22
DWORD dwReason
Definition: misc.cpp:154
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define ok(value,...)
Definition: CComObject.cpp:34
Definition: msg.h:42
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
static tGETHOOKAPIS pGetHookAPIs
Definition: dispmode.c:26
int ret
#define skip(...)
Definition: CString.cpp:57
#define MultiByteToWideChar
Definition: compat.h:100

Referenced by run_test().

◆ unhook_disp()

static VOID unhook_disp ( HMODULE  dll)
static

Definition at line 301 of file dispmode.c.

302 {
303  RestoreIat(dll, "user32.dll", "ChangeDisplaySettingsA", (ULONG_PTR)pChangeDisplaySettingsA);
304  RestoreIat(dll, "user32.dll", "EnumDisplaySettingsA", (ULONG_PTR)pEnumDisplaySettingsA);
305 }
uint32_t ULONG_PTR
Definition: typedefs.h:63
static HMODULE dll
Definition: str.c:188
static BOOL RestoreIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR OriginalFunction)

◆ unhook_theme()

static VOID unhook_theme ( HMODULE  dll)
static

Definition at line 312 of file dispmode.c.

313 {
314  RestoreIat(dll, "uxtheme.dll", "SetThemeAppProperties", (ULONG_PTR)pSetThemeAppProperties);
315 }
uint32_t ULONG_PTR
Definition: typedefs.h:63
static HMODULE dll
Definition: str.c:188
static BOOL RestoreIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR OriginalFunction)

◆ void()

static void ( WINAPI pSetThemeAppProperties)
static

Variable Documentation

◆ bFix

◆ dwflags

◆ g_ChangeCount

◆ g_EnumCount

◆ g_LastDevmode

DEVMODEA g_LastDevmode
static

◆ g_LastFlags

◆ g_LastThemeFlags

DWORD g_LastThemeFlags
static

Definition at line 114 of file dispmode.c.

Referenced by mSetThemeAppProperties(), post_theme(), post_theme_no(), and pre_theme().

◆ g_ThemeCount

LONG g_ThemeCount
static

Definition at line 113 of file dispmode.c.

Referenced by mSetThemeAppProperties(), post_theme(), post_theme_no(), and pre_theme().

◆ g_Version

DWORD g_Version
static

◆ iModeNum

◆ lpDevMode

◆ pGetHookAPIs

tGETHOOKAPIS pGetHookAPIs
static

Definition at line 26 of file dispmode.c.

Referenced by run_test(), SeiCreateShimModuleInfo(), START_TEST(), and test_one().

◆ ptr

PVOID ptr

Definition at line 27 of file dispmode.c.

Referenced by ___realloc(), __CppXcptFilter(), __rpc_set_netbuf(), _encode_pointer(), _Locale_codecvt_create(), _Locale_ctype_create(), ios_base::_M_throw_failure(), _mesa_ColorPointer(), _mesa_EdgeFlagPointer(), _mesa_IndexPointer(), _mesa_NormalPointer(), _mesa_TexCoordPointer(), _mesa_VertexPointer(), _SetOperationTexts(), _test_GetCurMoniker(), _texecle(), _texeclpe(), _tspawnle(), _tspawnlpe(), _wcslwr_s(), _wcsupr_s(), abort_import(), access_virt_barray(), access_virt_sarray(), acm_driver_func(), AcpiOsFree(), AcpiRegQueryValue(), ACTION_AppSearchComponents(), ACTION_AppSearchReg(), ACTION_ConvertRegValue(), ACTION_CustomAction(), ACTION_ExpandAnyPath(), ACTION_ProcessComponents(), ACTION_RegisterClassInfo(), add_assembly(), add_compat_context(), add_data_reloc(), add_data_reloc_extent_item(), add_dependent_assembly_id(), add_dll_redirect(), add_entity(), add_file_to_entry(), add_known_usages_to_list(), add_local_oid_text_to_control(), add_metadata_reloc(), add_metadata_reloc_extent_item(), add_rollback(), add_wildcard(), add_zone_to_listview(), AddServiceToList(), AddUserProfile(), align_pointer(), align_pointer_clear(), align_pointer_offset(), align_pointer_offset_clear(), alpha_blend_image(), ansi_to_unicode_list(), CPointerArray< CUiPrimitive >::Append(), append_namespace(), append_transform_feedback_varying(), vertexArray::appendVertex(), ApphelpCheckInstallShieldPackage(), argvtosT(), array_join(), Array_on_put(), asmshader_free(), asmshader_realloc(), assembly_get_external_files(), assembly_get_name(), assembly_get_pubkey_token(), AtlAxCreateDialogW(), AtlAxDialogBoxW(), AtlAxWin_wndproc(), AtlLoadTypeLib(), ATL::AtlLoadTypeLib(), AtlRegisterClassCategoriesHelper(), ATL::AtlRegisterClassCategoriesHelper(), ShellFolder::attach(), bin_search(), BinaryToBase64A(), BinaryToBase64W(), BiosInitialize(), BITMAP_LoadImageW(), BlockEnvToEnvironA(), BlockEnvToEnvironW(), bmi_has_alpha(), body(), bsc_OnStopBinding(), BuildCommDCBAndTimeoutsW(), BZ2_blockSort(), canonicalize_fragment(), canonicalize_password(), canonicalize_path_hierarchical(), canonicalize_path_opaque(), canonicalize_query(), canonicalize_reg_name(), canonicalize_username(), cert_from_ptr(), cert_mgr_advanced_dlg_proc(), CertRDNValueToStrW(), CertVerifyRevocation(), cf2_arrstack_push(), cf2_free_instance(), CharNextA(), CharNextExA(), CharPrevA(), CharPrevExA(), check_dec_octet(), check_hierarchical(), check_implicit_ipv4(), check_ipv4address(), check_output(), check_output_raw(), check_pct_encoded(), check_prev_session(), cmd_copy(), codeview_add_type_enum_field_list(), codeview_add_type_struct(), codeview_add_type_struct_field_list(), codeview_snarf_linetab(), combine_uri(), COMDLG32_AllocMem(), COMM_ParseByteSize(), COMM_ParseNumber(), COMM_ParseOnOff(), COMM_ParseParity(), COMM_ParseStart(), COMM_ParseStopBits(), CommandAlias(), comp_value(), compare_attributes(), compare_cert_by_name_str(), COMPOBJ_DllList_Get(), compose_request_url(), ComputeConformanceOrVariance(), cond_free(), cond_track_mem(), ConioResizeBuffer(), construct_function(), context_from_ptr(), context_load_numbered_arrays(), Control_DoLaunch(), convert_input_data(), convert_text2number_2(), convert_to_dos_path(), convert_usages_str_to_usage(), ConvertNtPathToWin32Path(), CClassNode::ConvertResourceDescriptorToString(), cookie_set_to_string(), copy_headers_to_buf(), copy_name(), copy_value(), CopyBlock(), CopyLines(), CopyMemToClipboard(), CoTaskMemFree(), crc32(), create_advanced_filter(), create_alpha_bitmap(), create_automatic_entry(), create_body_offset_list(), create_cab_file(), create_cache_entry(), create_dest_dirs(), create_dib(), create_execute(), create_inf_file(), create_stream_on_data(), create_stream_on_file(), create_taskdialog_template(), create_testfontfile(), CreateDialogParamA(), CreateDialogParamW(), crl_from_ptr(), CRYPT_AsnDecodeArray(), CRYPT_AsnDecodeOidIgnoreTag(), CRYPT_AsnDecodeSequence(), CRYPT_AsnDecodeSequenceItems(), CRYPT_AsnDecodeSequenceOfAny(), CRYPT_AsnDecodeSPCLinkInternal(), CRYPT_AsnEncodeIA5String(), CRYPT_AsnEncodeNumericString(), CRYPT_AsnEncodeOid(), CRYPT_AsnEncodePrintableString(), CRYPT_EncodeValueWithType(), CRYPT_FindStringInMultiString(), CRYPT_FormatHexString(), CRYPT_GetMultiStringCharacterLen(), CRYPT_GetTypeKeyName(), ctl_from_ptr(), CURSORICON_LoadImageW(), d3d_draw_quad1(), d3dcompiler_free(), d3dcompiler_parse_rdef(), d3dcompiler_parse_shdr(), d3dcompiler_parse_signature(), d3dcompiler_parse_stat(), d3dcompiler_parse_type(), d3dcompiler_parse_type_members(), d3dcompiler_parse_variables(), d3dcompiler_realloc(), d3dx9_base_effect_init(), d3dx9_copy_data(), d3dx9_parse_array_selector(), d3dx9_parse_effect(), d3dx9_parse_effect_annotation(), d3dx9_parse_effect_parameter(), d3dx9_parse_effect_pass(), d3dx9_parse_effect_technique(), d3dx9_parse_effect_typedef(), d3dx9_parse_init_value(), d3dx9_parse_name(), d3dx9_parse_resource(), d3dx9_parse_sampler(), d3dx9_parse_state(), d3dx9_parse_value(), d3dx_create_param_eval(), d3dx_include_from_file_open(), D3DXDisassembleShader(), D3DXFindShaderComment(), D3DXGetShaderSize(), Date_toLocaleDateString(), Date_toLocaleString(), Date_toLocaleTimeString(), dde_connect(), dde_msg_client_wndproc(), dde_server_wndproc(), debugstr_flags(), declare_var(), decode_base64(), decode_file_attrs(), decode_pct_val(), decode_qp(), decodeA(), decodeW(), decrease_extent_refcount(), deformat_string_internal(), delhist_dlgproc(), demangle_datatype(), dfree(), DIALOG_DlgDirSelect(), DialogBoxParamA(), DialogBoxParamW(), disp_delete_name(), Display_GetFullName(), DlgMainProc(), dns_name_matches(), do_attribute_tag_format(), do_attributeless_tag_format(), do_barray_io(), do_import(), do_sarray_io(), domain_matches(), doWinMain(), DPA_Grow(), DPA_LoadStream(), DPA_Merge(), DPA_SaveStream(), draw_cursor(), draw_cursor_under(), draw_primitive_arrays(), draw_primitive_immediate_mode(), DrawTextFromClipboard(), DRIVER_TryOpenDriver32(), DSA_Clone(), dump(), dump_obj_locator(), dumpMenu(), dwarf2_compute_location_attr(), dwarf2_get_addr(), dwarf2_get_byte(), dwarf2_get_leb128_as_signed(), dwarf2_get_leb128_as_unsigned(), dwarf2_get_u2(), dwarf2_get_u4(), dwarf2_get_u8(), dwarf2_location_compute(), dwarf2_lookup_loclist(), dxbc_parse(), dxbc_write_blob(), EDIT_WM_Paste(), emit_end(), emit_process_vertices(), emit_set_rs(), emit_set_ts(), emit_tquad(), encode_compare_base64_W(), encode_file_attrs(), encodeA(), encodeAndCompareBase64_A(), encodeBase64A(), encodeBase64W(), encodeW(), ConfigTest::endianess(), entry_to_handle(), enum_gac_assemblies(), enum_gac_assembly_dirs(), enum_source_files_W_to_A(), EnumerateDevices(), EnumSystemGeoID(), env_parse_flags(), Error_toString(), Escape(), exec_composesettings(), expand_command(), expand_right_edge(), ExpandInstallerPath(), export_validate_filename(), ext4_ext_insert_index(), extract_cab_file(), extract_emf_from_comment(), FD31_Validate(), fdi_notify_extract(), fetch_long(), fetch_module_versioninfo(), fetch_short(), fetch_ulong(), fetch_ushort(), field_format_extension_hex_with_ascii(), file_get_Name(), FileProtocol_StartEx(), filesys_GetFileVersion(), CDefView::fill_list(), find_bytecode_comment(), find_cert_by_name_str_a(), find_default_printer(), find_end_of_word(), find_extent_data_refcount(), find_extent_shared_data_refcount(), find_extent_shared_tree_refcount(), find_mime_from_url(), find_name(), find_next(), find_prop_name(), FindDfltProvRegVals(), fix_px_value(), fix_url_value(), folder_get_Name(), format_hex_string(), format_namespace(), format_replace(), format_str_is_number(), fread(), CCRTAllocator::Free(), CLocalAllocator::Free(), CGlobalAllocator::Free(), free(), ATL::CComAllocator::Free(), free_accept_types(), free_hash_bucket(), free_information_tree(), free_key_translation(), free_mdinfo(), free_resource_directory(), FreeChangeNotifications(), FSE_buildCTable_raw(), FSE_buildCTable_rle(), FSE_buildCTable_wksp(), FSE_buildDTable_raw(), FSE_buildDTable_rle(), FSE_decompress_usingDTable(), ftGdiGetGlyphOutline(), function_to_string(), function_value(), fwrite(), gdb_send_debug_io(), gdb_send_exception(), gdb_send_register(), GdipCreateHBITMAPFromBitmap(), GdipFree(), GdipSetStringFormatTabStops(), gen_color_correction(), general_on_initdialog(), generate_security_id(), generate_uuid(), generateMTFValues(), get_attr(), get_block_bh_mdl(), get_boot_addr(), get_boot_platid(), get_boot_size(), get_cert_usages(), get_context_reg(), get_cookie_domain(), get_cookie_header(), get_current_dataobject(), get_current_ole_clip_window(), get_defaultipgateway(), get_dnsserversearchorder(), get_escaped_string(), get_event_target_data(), get_fat(), get_filename(), get_first_last_from_cmap0(), get_first_last_from_cmap4(), get_geoinfo_dataptr(), get_info_log_line(), get_ini_file_name(), get_ipaddress(), get_ipsubnet(), get_line(), get_literal_string(), get_manifest_in_module(), get_mmioFromProfile(), get_next_wstr(), get_node_name(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_number(), get_operation(), get_orphan_name(), get_ptr_hash(), get_server(), get_src_file_info(), get_temp_filename(), get_uri_path(), get_value(), get_wine_loader_name(), get_working_dir(), GetAdaptersInfo(), GetClipboardDataDimensions(), GetCmdLineCommand(), getDataType(), getdomainname(), GetGeneralGroupData(), GetGeoInfoW(), getICMPStats(), GetLineExtentA(), GetLineExtentW(), GetListOfTestExes(), GetLongValue(), GetMessageStringFromDll(), GetOutlineTextMetricsA(), GetUsedPorts(), GetUser32Handle(), gl_clear_stencil_buffer(), gl_ColorPointer(), gl_EdgeFlagPointer(), gl_IndexPointer(), gl_NormalPointer(), gl_render_bitmap(), gl_TexCoordPointer(), gl_VertexPointer(), Global_Hex(), Global_InStr(), Global_InStrRev(), Global_LCase(), Global_LTrim(), Global_Oct(), Global_RTrim(), Global_UCase(), glsl_blitter_generate_program(), grow_output_buffer(), GspFindThread(), GspQuery(), GspQueryThreadStatus(), GspSetThread(), GspStopReply(), GuiCopyFromTextModeBuffer(), handle_exception(), handle_gdb_query(), handle_gdb_set_thread(), handle_insert_comment(), handle_sequence_input(), HandleDoubleFault(), HandleGPFault(), HandleInDebuggerFault(), HandlePageFault(), CEnumIDListBase::HasItemWithCLSID(), hex_str(), HexDump(), hexToInt(), HLPFILE_AddPage(), HLPFILE_BPTreeEnum(), HLPFILE_BPTreeSearch(), HLPFILE_BrowseParagraph(), HLPFILE_FindSubFile(), HLPFILE_PageByHash(), HLPFILE_RtfAddBitmap(), HLPFILE_RtfAddGfxByAddr(), HLPFILE_RtfAddHexBytes(), HLPFILE_RtfAddMetaFile(), HLPFILE_SystemCommands(), HLPFILE_Uncompress2(), HLPFILE_Uncompress_Phrases40(), HLPFILE_Uncompress_Topic(), HLPFILE_UncompressedLZ77_Size(), HLPFILE_UncompressLZ77(), hlsl_free(), hlsl_realloc(), Host_Echo(), HTMLDOMChildrenCollection_get_dispid(), HTMLElementCollection_get_dispid(), HTMLFiltersCollection_get_dispid(), HTMLSelectElement_get_dispid(), HTTP_DomainMatches(), HTTP_ParseDateAsAsctime(), HTTP_ParseRfc1123Date(), HTTP_ParseRfc850Date(), HTTP_ParseTime(), HTTP_ProcessExpires(), HTTP_ShouldBypassProxy(), IdnToNameprepUnicode(), idx_to_str(), ImageList_Read(), IMM_FreeAllImmHkl(), IMM_GetImmHkl(), ImmCreateBlankCompStr(), ImmIsIME(), import_validate_filename(), increase_extent_refcount(), CPointerArray< CUiPrimitive >::IndexOf(), init(), init_function_pointers(), init_paths(), init_strings(), init_xpcom(), Initialize(), initialize_purpose_selection(), InitializeDefaultUserLocale(), InitializeFreeLDRDialog(), CPointerArray< CUiPrimitive >::Insert(), insert_authorization_header(), install_file(), install_init(), InstallService(), instr_comment(), instr_dcl(), instr_def(), instr_generic(), interface_variant_unmarshal(), INTERNET_FindProxyForProtocol(), InternetSetCookieExW(), interp_throw_type(), InterpretMain(), InterpretScript(), ipv4toui(), is_basic_auth_value(), is_domain_legal_for_cookie(), is_eof(), is_eol(), IS_ERR(), is_extent_unique(), is_fixed(), is_gecko_path(), is_gecko_special_uri(), is_hierarchical_uri(), is_moveable(), is_valid_oid(), IsBlockFromHeap(), ITERATE_InstallODBCDriver(), ITERATE_InstallODBCTranslator(), ITSProtocol_Start(), ITSProtocolInfo_CombineUrl(), ITypeLib2_Constructor_SLTG(), JoystickAGenericImpl_GetDeviceState(), JoystickWGenericImpl_GetDeviceState(), JSGlobal_decodeURI(), JSGlobal_decodeURIComponent(), JSGlobal_encodeURI(), JSGlobal_encodeURIComponent(), JSGlobal_escape(), JSGlobal_parseInt(), JSGlobal_unescape(), json_quote(), jsstr_alloc_len(), jsstr_concat(), jsstr_substr(), KdpGdbEnterDebuggerException(), kmem_cache_alloc(), LaunchINFSectionExW(), ldap_first_attributeA(), ldap_first_attributeW(), ldap_next_attributeA(), ldap_next_attributeW(), LdrpAccessResource(), list_count(), load_functions(), load_mesh_data(), load_resource(), load_string(), LoadAppInitDlls(), LoadCurrentLocale(), LoadSoundFiles(), ATL::CComBSTR::LoadString(), log_unrecoverable_error(), LPSAFEARRAY_UserUnmarshal(), LsapLookupFullyQualifiedWellKnownNames(), LsapLookupIsolatedNames(), LsapLookupWellKnownSids(), LsapRegEnumerateValue(), LsapRegQueryValue(), lznt1_decompress(), MACRO_ChangeButtonBinding(), MACRO_CreateButton(), MACRO_JumpID(), main(), mainQSort3(), mainSimpleSort(), mainSort(), make_export_file_filter(), make_import_file_filter(), MakePath(), map_A_to_W(), map_fileW(), map_security_uri_to_zone(), map_W_to_A(), MarshalConnectionInfo(), match_dns_to_subject_dn(), match_ext(), matches_domain_pattern(), MCI_GetDWord(), MCI_GetString(), MCI_MapMsgAtoW(), MCI_Open(), MCI_UnmapMsgAtoW(), MCICDA_playLoop(), mem_malloc(), mem_trim(), memchrW(), memrchrW(), memrpbrkW(), MenuFill(), merge_paths(), MIDI_Starter(), MIDIMAP_FindPort(), MIDL_user_free(), midl_user_free(), MLLoadLibraryA(), MLLoadLibraryW(), module_fill_module(), MSFT_ReadValue(), msi_build_createsql_columns(), msi_build_createsql_postlude(), msi_check_product_patches(), MSI_CloseView(), MSI_DatabaseImport(), msi_dialog_directorylist_up(), msi_dialog_text_control(), msi_dialog_vcl_add_drives(), msi_dialog_vsc_add_drives(), MSI_EvaluateConditionW(), msi_get_disk_file_version(), msi_import_stream_filename(), MSI_OpenPackageW(), msi_parse_command_line(), msi_parse_line(), msi_parse_version_string(), msi_publish_product_properties(), MsiReinstallFeatureW(), MsiSIPGetSignedDataMsg(), MsiSourceListEnumMediaDisksW(), MsiSourceListGetInfoW(), MSVCRT___non_rtti_object_vector_dtor(), MSVCRT_bad_cast_vector_dtor(), MSVCRT_bad_typeid_vector_dtor(), MSVCRT_exception_vector_dtor(), msvcrt_get_thread_data(), MSVCRT_type_info_vector_dtor(), mswBufferAppendPtr(), my_free(), my_ltoa(), MyAppendUnicodeToString_(), MyInitUnicodeString(), NBNameCacheWalk(), ND_RI2(), ND_RI4(), ND_RI8(), ND_RU1(), ND_WI2(), ND_WI4(), ND_WI8(), ND_WU1(), NetBTInit(), NetBTWaitForNameResponse(), NETCON_send(), netconn_send(), next_xml_attr(), next_xml_elem(), nfs41_GetConnectionInfoFromBuffer(), Notify(), NotifyShims(), nsChannelBSC_beginning_transaction(), nsstr_to_truncated_bstr(), nsstyle_to_bstr(), nsURI_GetHostPort(), nsURI_SetUserPass(), nsuri_to_url(), nsURL_GetQuery(), NtLdrEnumerateBootEntries(), NtUserxGetDesktopMapping(), Object_toString(), OF(), CUiCollection::OnRemoveItem(), CExplorerBand::OnTreeItemDeleted(), operator delete(), operator delete[](), ATL::CSimpleArray< T, TEqual >::ConstructImpl::operator new(), pack_ptr(), pagesetup_set_devnames(), parse_arguments(), parse_authority(), parse_canonicalize(), parse_classid(), parse_clr_metadata(), parse_content_type(), parse_data_type(), parse_decimal(), parse_display_name(), parse_event_str(), parse_file_list(), parse_fragment(), parse_hierpart(), parse_host(), parse_identifier(), parse_index_obj_node_param(), parse_ip_literal(), parse_ipv4address(), parse_ipv6address(), parse_ipvfuture(), parse_json_string(), parse_li(), parse_metadata_header(), parse_numeric_literal(), parse_nummethods(), parse_obj_node_param(), parse_password(), parse_path_from_url(), parse_path_hierarchical(), parse_path_opaque(), parse_port(), parse_pres_arg(), parse_pres_ins(), parse_pres_reg(), parse_preshader(), parse_query(), parse_reg_name(), parse_rootdocument(), parse_rundll(), parse_schema(), parse_scheme(), parse_scheme_name(), parse_string_literal(), parse_text_content(), parse_typelib_version(), parse_ul(), parse_uri(), parse_userinfo(), parse_username(), parse_value(), parse_version(), parse_xml_header(), TMapLoader::ParseKeyDef(), parser_free(), PARSER_get_dest_dir(), parser_realloc(), ParseURLA(), ParseURLFromOutsideSourceW(), ParseURLW(), path_find_symbol_file(), pdb_parse_cmd_string(), pdb_process_symbol_imports(), pdb_process_types(), pe_locate_with_coff_symbol_table(), peget2(), peget4(), peget8(), pev_get_val(), pev_set_value(), pipe_thread(), pop_import(), post_dde_message(), ppy_free(), ppy_realloc(), pre_process_uri(), prepare_rpn_result_2(), PrepareFileCopy(), print_getaddrinfo(), print_glsl_info_log(), print_rpc_gss_sec(), PrintAlias(), PrintDialog(), PrintDlgA(), PrintDlgW(), PrintMenu(), PrintNameOrOrdinal(), PrintStrangeMenu(), process_state_property(), DesktopBar::ProcessCopyData(), PropertyStorage_ReadDictionary(), PsaiFree(), PsaiRealloc(), pSetupGetFileTitle(), PSStringFromPropertyKey(), PTR_ERR(), push_data(), query_http_info(), queue_add_timer(), quote_rdn_value_to_str_a(), quote_rdn_value_to_str_w(), RChangeServiceConfig2A(), rd_read_file(), rd_write_file(), read_dword(), read_post_data_stream(), read_prop(), read_properties_from_data(), read_vc(), reader_cmp(), reader_get_ptr(), reader_get_value(), reader_more(), reader_parse_attvalue(), reader_parse_cdata(), reader_parse_chardata(), reader_parse_comment(), reader_parse_encname(), reader_parse_local(), reader_parse_name(), reader_parse_pi(), reader_parse_pitarget(), reader_parse_qname(), reader_parse_reference(), reader_parse_versionnum(), reader_skipn(), reader_skipspaces(), readerinput_is_utf8(), readerinput_switchencoding(), ReadPassword(), realloc(), CCRTAllocator::Reallocate(), CLocalAllocator::Reallocate(), CGlobalAllocator::Reallocate(), ATL::CComAllocator::Reallocate(), reg_data_to_wchar(), RegEnumValueW(), RegExp_toString(), register_service(), RegQueryValueExW(), CPointerArray< CUiPrimitive >::Remove(), CPointerArray< CUiPrimitive >::RemoveAt(), request_send(), ResolvePattern(), ResProtocol_Start(), ResProtocolInfo_ParseUrl(), riff_find_chunk(), RtlAllocateHeap(), RtlAppendUnicodeToString(), RtlCompareMemoryUlong(), RtlFindActivationContextSectionGuid(), RtlFindActivationContextSectionString(), RtlGetFullPathName_Ustr(), RtlQueryInformationActivationContext(), RtlRunDecodeUnicodeString(), RtlRunEncodeUnicodeString(), CPointerArray< CUiPrimitive >::s_OnRemoveItem(), safe_realloc(), safe_str(), SAFEARRAY_AllocDescriptor(), SAFEARRAY_Free(), SampRegEnumerateValue(), SampRegQueryValue(), save_cert_mgr_usages(), ScmLogonService(), ScmReadString(), script_parse_event(), SdbGetFileAttributes(), search_manifest_in_module(), SECUR32_initializeProviders(), select_file_name(), send_add_tlv_clone_path(), send_gdb_partial_binary(), send_gdb_partial_memory(), send_gdb_partial_packet(), serialize(), serialize_dword(), serialize_string(), server_ddeml_callback(), CPointerArray< CUiPrimitive >::Set(), set_constants_device(), set_context_reg(), set_default_value(), set_environment(), set_guid(), set_installer_properties(), set_ldids(), set_print_template(), set_value(), SetChmPath(), setOidWithItemAndIpAddr(), setup_dinput_options(), SetupCreateDiskSpaceListW(), SetupDiCallClassInstaller(), SetupQueryInfFileInformationW(), SHADD_create_add_mru_data(), SHAddToRecentDocs(), shader_arb_compile(), shader_arb_get_swizzle(), shader_arb_get_write_mask(), shader_generate_code(), shader_get_param(), shader_get_registers_used(), shader_glsl_compile(), shader_glsl_dump_program_source(), shader_glsl_load_constants_i(), shader_glsl_load_constantsB(), shader_init(), shader_signature_copy(), shader_skip_unrecognized(), shader_sm1_is_end(), shader_sm1_read_comment(), shader_sm1_read_dst_param(), shader_sm1_read_header(), shader_sm1_read_immconst(), shader_sm1_read_instruction(), shader_sm1_read_src_param(), shader_sm4_is_end(), shader_sm4_read_dst_param(), shader_sm4_read_header(), shader_sm4_read_instruction(), shader_sm4_read_param(), shader_sm4_read_reg_idx(), shader_sm4_read_src_param(), shader_trace_init(), SHChangeNotify(), ShellFolder::ShellFolder(), ShellMessageBoxWrapW(), ShimLib_NotifyShims(), SHLoadInProc(), should_bypass_proxy(), TestCase::shouldRunThis(), show_msgbox(), ShowParallelStatus(), sic_free(), skip_code(), skip_dword_unknown(), SLTG_ReadLibBlk(), SLTG_ReadString(), SLTG_ReadStringA(), SoundsDlgProc(), SplitDeviceInstanceId(), SplitDeviceInstanceID(), src_callback_read(), SspiPromptForCredentialsW(), stab_strcpy(), stabs_parse(), stabs_parse_typedef(), START_TEST(), StartInstaller(), str_array_push(), Str_SetPtrA(), Str_SetPtrAtoW(), Str_SetPtrW(), Str_SetPtrWtoA(), str_to_number(), StrangeMenuFill(), strcspnW(), strdupW(), strdupWW(), streamout_wstring(), strerror_s(), String_concat(), String_indexOf(), String_lastIndexOf(), String_replace(), String_split(), stringify(), strspnW(), sw_read_mem(), swap_columns(), switch_to_acf(), SymEnumLines(), SymEnumSourceFilesW(), SymFindFileInPathW(), symt_enum_module(), symt_find_type_by_name(), symt_ptr2index(), SysKeyboardAImpl_GetDeviceState(), SysKeyboardWImpl_GetDeviceState(), SysMouseAImpl_GetDeviceState(), SysMouseWImpl_GetDeviceState(), system_icmp(), taskdialog_add_control(), tcp_build_and_update_options(), tcp_send(), tcp_syn_build_options(), template_write_data(), test_Alloc(), test_appsearch_inilocator(), test_appsearch_reglocator(), test_bitmap_data(), test_bom(), test_bstr_cache(), test_BuildCommDCB(), test_BuildPath(), test_calloc(), test_cf_dataobject(), test_conf_complex_array(), test_conf_complex_struct(), test_conformant_array(), test_conformant_string(), test_copy(), test_create(), test_create_attribute(), test_CreateFileMapping_protection(), test_CreateMRUListLazyA(), test_CredIsMarshaledCredentialA(), test_cryptTls(), test_currentworkingdir(), test_data_cache_dib_contents_stream(), test_data_handles(), test_DdeCreateDataHandle(), test_decodePKCSSMimeCapabilities(), test_dispid(), test_dns(), test_DriveExists(), test_EM_STREAMIN(), test_Environment(), test_FakeDLL(), test_file_disposition_information(), test_find_com_redirection(), test_find_window_class(), test_FindFirstFile_wildcards(), test_freethreadedmarshaldata(), test_get_known_usages(), test_GetAdaptersAddresses(), test_GetChildContainer(), test_GetDIBits_BI_BITFIELDS(), test_GetDrive(), test_GetDriveName(), test_getElementsByTagName(), test_GetFileInformationByHandleEx(), test_GetLocaleInfoEx(), test_GetLocaleInfoW(), test_GetLogicalDriveStringsA(), test_GetLogicalDriveStringsW(), test_getQualifiedItem(), test_GetShortPathNameW(), test_GetStateText(), test_Global(), test_handles(), test_handles_process(), test_handles_process_open(), test_handles_thread2(), test_iface_ptr(), test_IME(), test_import_resolution(), test_inet_pton(), test_inffilelist(), test_invariant(), test_IQueryAssociations_GetString(), test_IsBadCodePtr(), test_IsBadReadPtr(), test_IsBadWritePtr(), test_load(), test_Loader(), test_LoadIconWithScaleDown(), test_LocaleNameToLCID(), test_mapping(), test_MapViewOfFile(), test_message_invalid_flags(), test_message_invalid_flags_wide(), test_MsiSourceListAddSource(), test_mxattr_clear(), test_mxwriter_encoding(), test_nodeValue(), test_nonconformant_string(), test_nontrivial_pointer_types(), test_NtAreMappedFilesTheSame(), test_NtMapViewOfSection(), test_OleLoadPicturePath(), test_omitxmldeclaration(), test_output(), test_PackDDElParam(), test_pointer_marshal(), test_PrintDlgA(), test_put_dataType(), test_put_nodeTypedValue(), test_query_process_vm(), test_query_process_wow64(), test_readwrite(), test_refs(), test_registerDefaultOIDFunction(), test_RtlHashUnicodeString(), test_save(), test_saxreader(), test_saxreader_properties(), test_ScriptGetLogicalWidths(), test_set_clipboard(), test_simple_struct_marshal(), test_sscanf(), test_string_pointers(), test_stringtable_layout(), test_struct_align(), test_supporterrorinfo(), test_synthesized(), test_TB_GET_SET_EXTENDEDSTYLE(), test_UnpackDDElParam(), test_VarRound(), test_VirtualAlloc_protection(), test_VirtualProtect(), test_WithWSAStartup(), test_write_ex(), test_writeenddocument(), test_XDR_datatypes(), test_XMLHTTP(), test_XPath(), test_XSLPattern(), testGetAdaptersInfo(), TestMessageHandler(), testRegStore(), text_plain_filter(), textstream_writecrlf(), TLB_MultiByteToBSTR(), to_array(), to_safearray(), transfer_file_local(), translateinfstringex_test(), TREEVIEW_EndEditLabelNow(), try_clone(), UDFCrc(), UDFDissectName(), UDFUnicodeCksum(), UDFUnicodeCksum150(), und_alloc(), und_free(), UnDecorateSymbolNameW(), ungif_free(), ungif_realloc(), UnloadAppInitDlls(), unpack_dde_message(), unserialize(), unserialize_dword(), unserialize_string(), update_checksum(), update_devmode_handleA(), update_devmode_handleW(), update_filter(), update_result_text(), UrlCombineW(), USP10_FindGlyphInLogClust(), validate_fragment(), validate_host(), validate_password(), validate_path(), validate_query(), validate_scheme_name(), validate_username(), valisttosT(), VideoRenderer_GetStaticImage(), VidMemFree(), VMR9_GetStaticImage(), warning(), wave_generate_la(), wcscat_s(), WDML_CreateString(), WDML_QueryString(), WDML_ServerHandleExecute(), WdtpInterfacePointer_UserMarshal(), WdtpInterfacePointer_UserUnmarshal(), WHERE_CreateView(), while(), Widget_myint(), widMapperStatus(), wildcard_to_file(), wined3d_parse_gl_version(), wined3d_private_store_set_private_data(), WINHELP_HandleCommand(), winhttp_request_get_ResponseBody(), WinMain(), WINTRUST_enumUsages(), WINTRUST_ReAlloc(), WLDAP32_ber_scanf(), wmain(), wnetInit(), wodMapperStatus(), write_cabinet(), write_dword(), write_dword_unknown(), write_output_buffer(), write_typelib(), write_vc(), WshShell3_RegRead(), WshShortcut_put_IconLocation(), wvnsprintfA(), wvnsprintfW(), WVTAsn1SpcLinkEncode(), xkeymap_from_locale(), xkeymap_send_keys(), xkeymap_translate_key(), xmlInitCharEncodingHandlers(), xmlMemFree(), xmlMemRealloc(), xmlParseStringCharRef(), xmlParseStringEntityRef(), xmlParseStringPEReference(), xmlReallocLoc(), xmlUTF8Strsize(), xsltTestCompMatchDirect(), xsltTestPredicateMatch(), XXH_readBE32(), XXH_readBE64(), XXH_readLE32(), XXH_readLE32_align(), XXH_readLE64(), XXH_readLE64_align(), yyfree(), yyrealloc(), zcfree(), zlib_free(), ZSTD_buildSeqTable_rle(), ZSTD_calloc(), ZSTD_free(), ZSTD_getFSEMaxSymbolValue(), ZSTD_getLongOffsetsShare(), ZSTD_hash3Ptr(), ZSTD_hash4Ptr(), ZSTD_initFseState(), ZSTD_initStaticCCtx(), ZSTD_initStaticCDict(), ZSTD_reset_matchState(), and ZSTD_resetCCtx_internal().

◆ tests

struct test_info tests[]
static
Initial value:
=
{
{ "Force8BitColor", L"aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_8bit, post_8bit, post_8bit_no },
{ "Force8BitColor", L"aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp,pre_8bit, post_8bit, post_8bit_no },
{ "Force640x480", L"aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_640, post_640, post_640_no },
{ "Force640x480", L"aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_640, post_640, post_640_no },
{ "DisableThemes", L"acgenral.dll", WINVER_ANY, 1, hook_theme, unhook_theme, pre_theme, post_theme, post_theme_no },
{ "DisableThemes", L"acgenral.dll", _WIN32_WINNT_VISTA, 100, hook_theme, unhook_theme, pre_theme, post_theme, post_theme_no },
{ "Force8BitColor", L"aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no },
{ "Force8BitColor", L"aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_8bit_2, post_8bit_2, post_8bit_2_no },
{ "Force640x480", L"aclayers.dll", WINVER_ANY, 1, hook_disp, unhook_disp, pre_640_2, post_640_2, post_640_2_no },
{ "Force640x480", L"aclayers.dll", _WIN32_WINNT_VISTA, 100, hook_disp, unhook_disp, pre_640_2, post_640_2, post_640_2_no },
}
static void post_640_2_no(void)
Definition: dispmode.c:250
static void pre_8bit_2(void)
Definition: dispmode.c:132
static void post_theme_no(void)
Definition: dispmode.c:280
static void post_8bit_2(void)
Definition: dispmode.c:148
#define _WIN32_WINNT_VISTA
Definition: sdkddkver.h:25
static void pre_theme(void)
Definition: dispmode.c:268
static void post_640_2(void)
Definition: dispmode.c:220
static void post_640(void)
Definition: dispmode.c:210
static VOID unhook_disp(HMODULE dll)
Definition: dispmode.c:301
static BOOL hook_theme(HMODULE dll)
Definition: dispmode.c:307
static const WCHAR L[]
Definition: oid.c:1250
static void pre_640(void)
Definition: dispmode.c:195
static void post_8bit(void)
Definition: dispmode.c:139
#define WINVER_ANY
Definition: dispmode.c:23
static VOID unhook_theme(HMODULE dll)
Definition: dispmode.c:312
static void post_theme(void)
Definition: dispmode.c:274
static void pre_8bit(void)
Definition: dispmode.c:124
static BOOL hook_disp(HMODULE dll)
Definition: dispmode.c:295
static void pre_640_2(void)
Definition: dispmode.c:203
static void post_640_no(void)
Definition: dispmode.c:229
static void post_8bit_2_no(void)
Definition: dispmode.c:177
static void post_8bit_no(void)
Definition: dispmode.c:157

Referenced by run_test(), and START_TEST().