ReactOS 0.4.15-dev-7788-g1ad9096
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 34 of file v6util.h.

Function Documentation

◆ load_v6_module()

static BOOL load_v6_module ( ULONG_PTR pcookie,
HANDLE hCtx 
)
inlinestatic

Definition at line 71 of file v6util.h.

72{
73 ACTCTX_SECTION_KEYED_DATA data;
74 DWORD written;
76 ACTCTXA ctx;
78 BOOL ret;
79
80 /* create manifest */
83 {
84 ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) &&
85 written == sizeof(manifest)-1);
87 if (!ret)
88 {
90 skip("Failed to fill manifest file. Skipping comctl32 V6 tests.\n");
91 return FALSE;
92 }
93 else
94 trace("created %s\n", manifest_name);
95 }
96 else
97 {
98 skip("Failed to create manifest file. Skipping comctl32 V6 tests.\n");
99 return FALSE;
100 }
101
102 memset(&ctx, 0, sizeof(ctx));
103 ctx.cbSize = sizeof(ctx);
104 ctx.lpSource = manifest_name;
105
106 *hCtx = CreateActCtxA(&ctx);
107 ok(*hCtx != 0, "Expected context handle\n");
108
109 hmod = GetModuleHandleA("comctl32.dll");
110
111 ret = ActivateActCtx(*hCtx, pcookie);
112 ok(ret, "Failed to activate context, error %d.\n", GetLastError());
113
114 if (!ret)
115 {
116 win_skip("A problem during context activation occurred.\n");
118 }
119
120 data.cbSize = sizeof(data);
121 ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
122 "comctl32.dll", &data);
123 ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError());
124 if (ret)
125 {
127 LoadLibraryA("comctl32.dll");
128 }
129
130 return ret;
131}
#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:28
BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
Definition: actctx.c:124
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:160
#define memset(x, y, z)
Definition: compat.h:39
Definition: fci.c:127
static const CHAR manifest[]
Definition: v6util.h:39
static const CHAR manifest_name[]
Definition: v6util.h:37
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 
)
inlinestatic

Definition at line 63 of file v6util.h.

64{
66 ReleaseActCtx(hCtx);
67
69}
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:34

Definition at line 39 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 37 of file v6util.h.

Referenced by load_v6_module(), and unload_v6_module().