87 trace(
"Running at 8bpp, faking 16\n");
92 trace(
"Running at 640x480, faking 800x600\n");
320 WCHAR wide_shim[50] = { 0 };
331 skip(
"Skipping tests for layers (%s) not present in this os (0x%x)\n", shim,
g_Version);
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);
340 ok(
ret != 0,
"Expected pNotifyShims to succeed (%i)\n",
ret);
351 ok(
ret != 0,
"Expected pNotifyShims to succeed (%i)\n",
ret);
398 skip(
"%s not loaded, or does not export GetHookAPIs or pNotifyShims (%s, %p, %p)\n",
421 ok(0,
"Unable to redirect functions!\n");
449 trace(
"Loaded under a shim, running each test in it's own process\n");
468 ok(created,
"Expected CreateProcess to succeed\n");
490 ok(0,
"Test out of range: %u\n",
n);
std::map< E_MODULE, HMODULE > mod
static BOOL RestoreIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR OriginalFunction)
static BOOL RedirectIat(HMODULE TargetDll, PCSTR DllName, PCSTR FunctionName, ULONG_PTR NewFunction, ULONG_PTR *OriginalFunction)
PHOOKAPI(WINAPI * tGETHOOKAPIS)(LPCSTR szCommandLine, LPCWSTR wszShimName, PDWORD pdwHookCount)
BOOL LoadShimDLL(PCWSTR ShimDll, HMODULE *module, tGETHOOKAPIS *ppGetHookAPIs)
#define ok_hex(expression, result)
#define ok_int(expression, result)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
#define MultiByteToWideChar
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
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)
BOOL WINAPI FreeResource(HGLOBAL handle)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
GLenum GLuint GLenum GLsizei const GLchar * buf
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static void post_theme(void)
static void post_theme_no(void)
static void post_8bit_2_no(void)
DWORD get_module_version(HMODULE mod)
static VOID unhook_theme(HMODULE dll)
static _In_ DWORD dwflags
static void test_one(LPCSTR shim, DWORD dwReason, void(*pre)(), void(*post)(), void(*second)(void))
static LONG g_ChangeCount
static void post_640_2(void)
static DEVMODEA g_LastDevmode
LONG WINAPI mChangeDisplaySettingsA(_In_opt_ PDEVMODEA lpDevMode, _In_ DWORD dwflags)
static DWORD g_LastThemeFlags
static void pre_theme(void)
static void post_8bit_no(void)
static _In_ DWORD iModeNum
static BOOL hook_disp(HMODULE dll)
static void post_8bit_2(void)
static void post_640_no(void)
static VOID unhook_disp(HMODULE dll)
static void pre_8bit_2(void)
static void post_8bit(void)
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
static void pre_640_2(void)
static BOOL hook_theme(HMODULE dll)
BOOL WINAPI mEnumDisplaySettingsA(_In_opt_ LPCSTR lpszDeviceName, _In_ DWORD iModeNum, _Inout_ PDEVMODEA lpDevMode)
static void post_640_2_no(void)
void WINAPI mSetThemeAppProperties(DWORD dwFlags)
static tGETHOOKAPIS pGetHookAPIs
static struct test_info tests[]
static void post_640(void)
static void pre_640(void)
static void pre_8bit(void)
LONG winetest_get_failures(void)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
#define _WIN32_WINNT_WS03
#define _WIN32_WINNT_VISTA
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define DISP_CHANGE_FAILED