23#define STRSECTION_MAGIC 0x64487353
76 ACTCTXW
ActCtx = {
sizeof(ACTCTX)};
118 ACTCTX_SECTION_KEYED_DATA KeyedData = { 0 };
122 LPCWSTR VersionedClass, ClassLib;
126 KeyedData.cbSize =
sizeof(KeyedData);
129 ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION,
132 ok(
res ==
TRUE,
"FindActCtxSectionString failed\n");
135 ok(KeyedData.ulDataFormatVersion == 1,
"Wrong format version: %lu\n", KeyedData.ulDataFormatVersion);
136 ok(KeyedData.hActCtx ==
h,
"Wrong handle\n");
137 ok(KeyedData.lpSectionBase !=
NULL,
"Expected non null lpSectionBase\n");
138 ok(KeyedData.lpData !=
NULL,
"Expected non null lpData\n");
144 skip(
"Can't read data for class. Skipping\n");
150 ok(
header->count == ExpectedClassCount,
"Expected %lu classes, got %lu\n", ExpectedClassCount,
header->count );
155 ok(KeyedData.ulLength == data_lenght,
"Got lenght %lu instead of %d\n", KeyedData.ulLength, data_lenght);
156 ok(classData->
size ==
sizeof(*classData),
"Got %lu instead of %d\n", classData->
size,
sizeof(*classData));
157 ok(classData->
res == 0,
"Got res %lu\n", classData->
res);
159 ok(
wcscmp(ClassLib, ExpectedModule) == 0,
"Got %S, expected %S\n", ClassLib, ExpectedModule);
161 ok(
memcmp(VersionedClass, ExpectedClassPart,
sizeof(
WCHAR) *
wcslen(ExpectedClassPart)) == 0,
"Expected %S to start with %S\n", VersionedClass, ExpectedClassPart);
167 ACTCTX_SECTION_KEYED_DATA KeyedData = { 0 };
174 KeyedData.cbSize =
sizeof(KeyedData);
177 ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
180 ok(
res ==
TRUE,
"FindActCtxSectionString failed\n");
183 ok(KeyedData.ulDataFormatVersion == 1,
"Wrong format version: %lu", KeyedData.ulDataFormatVersion);
184 ok(KeyedData.hActCtx ==
h,
"Wrong handle\n");
185 ok(KeyedData.lpSectionBase !=
NULL,
"Expected non null lpSectionBase\n");
186 ok(KeyedData.lpData !=
NULL,
"Expected non null lpData\n");
190 if(
res ==
FALSE || KeyedData.ulDataFormatVersion != 1 || SectionHeader ==
NULL || redirData ==
NULL)
192 skip(
"Can't read data for dep1.dll. Skipping\n");
197 ok(SectionHeader->
size ==
sizeof(*SectionHeader),
"Got %lu instead of %d\n", SectionHeader->
size,
sizeof(*SectionHeader));
198 ok(SectionHeader->
count == 2,
"%lu\n", SectionHeader->
count );
199 ok(redirData->
size ==
sizeof(*redirData),
"Got %lu instead of %d\n", redirData->
size,
sizeof(*redirData));
203 KeyedData.cbSize =
sizeof(KeyedData);
206 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
209 ok(
res ==
TRUE,
"FindActCtxSectionString failed\n");
211 ok(KeyedData.ulDataFormatVersion == 1,
"Wrong format version: %lu", KeyedData.ulDataFormatVersion);
212 ok(KeyedData.hActCtx ==
h,
"Wrong handle\n");
213 ok(KeyedData.lpSectionBase !=
NULL,
"Expected non null lpSectionBase\n");
214 ok(KeyedData.lpData !=
NULL,
"Expected non null lpData\n");
218 if(
res ==
FALSE || KeyedData.ulDataFormatVersion != 1 || SectionHeader ==
NULL || assemplyData ==
NULL)
220 skip(
"Can't read data for dep1. Skipping\n");
224 LPCWSTR AssemblyIdentity, ManifestPath, AssemblyDirectory;
227 PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
details = (PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION)
buffer;
230 ok(SectionHeader->
size ==
sizeof(*SectionHeader),
"Got %lu instead of %d\n", SectionHeader->
size,
sizeof(*SectionHeader));
231 ok(SectionHeader->
count == 2,
"%lu\n", SectionHeader->
count );
233 data_lenght = assemplyData->
size +
237 ok(assemplyData->
size ==
sizeof(*assemplyData),
"Got %lu instead of %d\n", assemplyData->
size,
sizeof(*assemplyData));
238 ok(KeyedData.ulLength == data_lenght,
"Got lenght %lu instead of %d\n", KeyedData.ulLength, data_lenght);
246 AssemblyDetailedInformationInActivationContext,
248 ok(
res ==
TRUE,
"QueryActCtxW failed\n");
256 ok(
wcscmp(ManifestPath,
details->lpAssemblyManifestPath) == 0,
"Expected path %S, got %S\n",
details->lpAssemblyManifestPath, ManifestPath);
257 ok(
wcscmp(AssemblyDirectory,
details->lpAssemblyDirectoryName) == 0,
"Expected path %S, got %S\n",
details->lpAssemblyManifestPath, ManifestPath);
288 skip(
"Failed to create context for classtest.manifest\n");
305 skip(
"Failed to create context for classtest.manifest\n");
318 skip(
"Failed to create context for deptest.manifest\n");
333 skip(
"Failed to create context for comctl32dep.manifest\n");
VOID _DeactivateCtx(ULONG_PTR cookie, int line)
void TestClassRedirection(HANDLE h, LPCWSTR ClassToTest, LPCWSTR ExpectedClassPart, LPCWSTR ExpectedModule, ULONG ExpectedClassCount)
HANDLE _CreateActCtxFromFile(LPCWSTR FileName, int line)
VOID TestLibDependency(HANDLE h)
VOID _ActivateCtx(HANDLE h, ULONG_PTR *cookie, int line)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define INVALID_HANDLE_VALUE
static const WCHAR separator[]
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI QueryActCtxW(IN DWORD dwFlags, IN HANDLE hActCtx, IN PVOID pvSubInstance, IN ULONG ulInfoClass, IN PVOID pvBuffer, IN SIZE_T cbBuffer, IN OUT SIZE_T *pcbWrittenOrRequired OPTIONAL)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCWSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
struct _FileName FileName
GLfloat GLfloat GLfloat GLfloat h
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ PCWSTR _Out_ PVOID * ActCtx
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD ulEncodedAssemblyIdentityLength
LARGE_INTEGER liManifestLastWriteTime
DWORD ulAssemblyDirectoryNameLength
DWORD ulManifestPathOffset
DWORD ulAssemblyDirectoryNameOffset
DWORD ulEncodedAssemblyIdentityOffset
DWORD ulManifestPathLength
DWORD WINAPI GetLastError(void)
#define ERROR_BAD_EXE_FORMAT