ReactOS 0.4.16-dev-737-g3368adc
v6util.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARCH   "none"
 

Functions

static void unload_v6_module (ULONG_PTR cookie, HANDLE hCtx)
 
static BOOL load_v6_module (ULONG_PTR *pcookie, HANDLE *hCtx)
 

Variables

static const CHAR manifest_name [] = "cc6.manifest"
 
static const CHAR manifest []
 

Macro Definition Documentation

◆ ARCH

#define ARCH   "none"

Definition at line 36 of file v6util.h.

Function Documentation

◆ load_v6_module()

static BOOL load_v6_module ( ULONG_PTR pcookie,
HANDLE hCtx 
)
static

Definition at line 73 of file v6util.h.

74{
75 ACTCTX_SECTION_KEYED_DATA data;
76 DWORD written;
78 ACTCTXA ctx;
80 BOOL ret;
81
82 /* create manifest */
85 {
86 ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) &&
87 written == sizeof(manifest)-1);
89 if (!ret)
90 {
92 skip("Failed to fill manifest file. Skipping comctl32 V6 tests.\n");
93 return FALSE;
94 }
95 else
96 trace("created %s\n", manifest_name);
97 }
98 else
99 {
100 skip("Failed to create manifest file. Skipping comctl32 V6 tests.\n");
101 return FALSE;
102 }
103
104 memset(&ctx, 0, sizeof(ctx));
105 ctx.cbSize = sizeof(ctx);
106 ctx.lpSource = manifest_name;
107
108 *hCtx = CreateActCtxA(&ctx);
109 ok(*hCtx != 0, "Expected context handle\n");
110
111 hmod = GetModuleHandleA("comctl32.dll");
112
113 ret = ActivateActCtx(*hCtx, pcookie);
114 ok(ret, "Failed to activate context, error %d.\n", GetLastError());
115
116 if (!ret)
117 {
118 win_skip("A problem during context activation occurred.\n");
120 }
121
122 data.cbSize = sizeof(data);
123 ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
124 "comctl32.dll", &data);
125 ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError());
126 if (ret)
127 {
129 LoadLibraryA("comctl32.dll");
130 }
131
132 return ret;
133}
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define FreeLibrary(x)
Definition: compat.h:748
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx)
Definition: actctx.c:26
BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
Definition: actctx.c:206
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define CREATE_ALWAYS
Definition: disk.h:72
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:143
#define GENERIC_WRITE
Definition: nt_native.h:90
#define win_skip
Definition: test.h:163
#define memset(x, y, z)
Definition: compat.h:39
Definition: fci.c:127
static const CHAR manifest[]
Definition: v6util.h:41
static const CHAR manifest_name[]
Definition: v6util.h:39
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by START_TEST().

◆ unload_v6_module()

static void unload_v6_module ( ULONG_PTR  cookie,
HANDLE  hCtx 
)
static

Definition at line 65 of file v6util.h.

66{
68 ReleaseActCtx(hCtx);
69
71}
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
Definition: actctx.c:208
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
Definition: cookie.c:34

Referenced by START_TEST().

Variable Documentation

◆ manifest

const CHAR manifest[]
static
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n"
" <assemblyIdentity\n"
" type=\"win32\"\n"
" name=\"Wine.ComCtl32.Tests\"\n"
" version=\"1.0.0.0\"\n"
" processorArchitecture=\"" ARCH "\"\n"
" />\n"
"<description>Wine comctl32 test suite</description>\n"
"<dependency>\n"
" <dependentAssembly>\n"
" <assemblyIdentity\n"
" type=\"win32\"\n"
" name=\"microsoft.windows.common-controls\"\n"
" version=\"6.0.0.0\"\n"
" processorArchitecture=\"" ARCH "\"\n"
" publicKeyToken=\"6595b64144ccf1df\"\n"
" language=\"*\"\n"
" />\n"
"</dependentAssembly>\n"
"</dependency>\n"
"</assembly>\n"
#define ARCH
Definition: v6util.h:36

Definition at line 41 of file v6util.h.

Referenced by activate_context(), build_source_filename(), create_manifest_file(), create_wide_manifest(), install_assembly(), install_policy(), load_v6_module(), msi_install_assembly(), test_create_and_fail(), test_create_wide_and_fail(), test_publish_assemblies(), and write_manifest().

◆ manifest_name

const CHAR manifest_name[] = "cc6.manifest"
static

Definition at line 39 of file v6util.h.

Referenced by load_v6_module(), and unload_v6_module().