32#include "interfaces.h"
34#define SXS_LOOKUP_CLR_GUID_USE_ACTCTX 0x00000001
35#define SXS_LOOKUP_CLR_GUID_FIND_SURROGATE 0x00010000
36#define SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS 0x00020000
37#define SXS_LOOKUP_CLR_GUID_FIND_ANY (SXS_LOOKUP_CLR_GUID_FIND_SURROGATE | SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS)
39#define SXS_GUID_INFORMATION_CLR_FLAG_IS_SURROGATE 0x00000001
40#define SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS 0x00000002
64 if (!rsrc)
return FALSE;
67 if (!rsrc_data)
return FALSE;
70 if (!rsrc_size)
return FALSE;
72 strcpy(path_file, path_tmp);
88 WCHAR expected_type_name[] = {
'D',
'L',
'L',
'.',
'T',
'e',
's',
't',0};
89 WCHAR expected_runtime_version[] = {
'v',
'4',
'.',
'0',
'.',
'0',
'.',
'0',0};
90 WCHAR expected_assembly_identity[] = {
'c',
'o',
'm',
't',
'e',
's',
't',
',',
't',
'y',
'p',
'e',
'=',
'"',
'w',
'i',
'n',
'3',
'2',
'"',
',',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'=',
'"',
'1',
'.',
'0',
'.',
'0',
'.',
'0',
'"',0};
102 ok(
lstrcmpW(
info->pcwszTypeName, expected_type_name) == 0,
"Got %s\n",
104 ok(
lstrcmpW(
info->pcwszAssemblyIdentity, expected_assembly_identity) == 0,
"Got %s\n",
106 ok(
lstrcmpW(
info->pcwszRuntimeVersion, expected_runtime_version) == 0,
"Got %s\n",
124 if (!
write_resource_file(path_tmp,
"comtest_exe.manifest",
"exe.manifest", path_manifest_exe))
126 ok(0,
"Failed to create file for testing\n");
130 if (!
write_resource_file(path_tmp,
"comtest_dll.manifest",
"comtest.manifest", path_manifest_dll))
132 ok(0,
"Failed to create file for testing\n");
136 context.cbSize =
sizeof(ACTCTXA);
137 context.lpSource = path_manifest_exe;
138 context.lpAssemblyDirectory = path_tmp;
139 context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
146 ok(0,
"Failed to create activation context\n");
162 if (*path_manifest_exe)
167 if(*path_manifest_dll)
char * strstr(char *String1, char *String2)
char * strcpy(char *DstString, const char *SrcString)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define ERROR_INSUFFICIENT_BUFFER
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
static void cleanup(void)
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
#define SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS
#define SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS
BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buffer, SIZE_T buffer_len, SIZE_T *buffer_len_required)
struct _SXS_GUID_INFORMATION_CLR SXS_GUID_INFORMATION_CLR
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
#define sprintf(buf, format,...)
static const GUID CLSID_Test
static void prepare_and_run_test(void)
static void run_test(void)
static void run_child_process(void)
static void test_SxsLookupClrGuid(void)
static BOOL write_resource_file(const char *path_tmp, const char *name_res, const char *name_file, char *path_file)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)