32#include "interfaces.h"
36DEFINE_GUID(IID_ITest2, 0x50adb433, 0xf6c5, 0x3b30, 0x92,0x0a, 0x55,0x57,0x11,0x86,0x75,0x09);
54 if (!rsrc)
return FALSE;
57 if (!rsrc_data)
return FALSE;
60 if (!rsrc_size)
return FALSE;
62 strcpy(path_file, path_tmp);
75 const char *path_csc =
"C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe";
84 skip(
"Can't find csc.exe\n");
91 sprintf(
cmdline,
"%s /t:library /out:\"%s\" \"%s\"", path_csc, path_temp, source_path);
102 ok(
ret,
"Compilation failed\n");
114 _DllGetClassObject getClassObject;
120 ok(
hr == result_expected,
"Expected %lx, got %lx\n", result_expected,
hr);
127 ok(
i == 42,
"Expected 42, got %d\n",
i);
134 ok(
hr == result_expected,
"Expected %lx, got %lx\n", result_expected,
hr);
139 hr = IClassFactory_CreateInstance(classFactory,
NULL, &IID_ITest, (
void **)&
test2);
148 ok(
i == 42,
"Expected 42, got %d\n",
i);
149 ITest_Release(
test2);
151 IClassFactory_Release(classFactory);
173 win_skip(
"cannot run the registry tests due to user not being admin\n");
181 ret =
RegSetKeyValueA(hkey,
"InprocServer32",
"Assembly",
REG_SZ,
"comtest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 74);
190 ok(
hr == result_expected,
"Expected %lx, got %lx\n", result_expected,
hr);
196 ok(
i == 42,
"Expected 42, got %d\n",
i);
197 hr = ITest_QueryInterface(
test, &IID_ITest2, (
void**)&unk);
198 ok(
hr ==
S_OK,
"ITest_QueryInterface returned %lx\n",
hr);
199 if (
hr ==
S_OK) IUnknown_Release(unk);
220 strcpy(path_dll, path_tmp);
245 HANDLE handle_context = 0;
247 path_manifest_exe[0] = path_manifest_dll[0] = path_dll_source[0] = 0;
259 skip(
"Can't test dll in system32 due to user not being admin.\n");
266 ok(0,
"run: %d, Failed to create file for testing\n", run);
275 if (!
write_resource_file(path_tmp_manifest,
"comtest_exe.manifest",
"exe.manifest", path_manifest_exe))
277 ok(0,
"run: %d, Failed to create file for testing\n", run);
281 if (!
write_resource_file(path_tmp_manifest,
"comtest_dll.manifest",
"comtest.manifest", path_manifest_dll))
283 ok(0,
"run: %d, Failed to create file for testing\n", run);
287 context.cbSize =
sizeof(ACTCTXA);
288 context.lpSource = path_manifest_exe;
289 context.lpAssemblyDirectory = path_tmp_manifest;
290 context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
297 ok(0,
"run: %d, Failed to create activation context\n", run);
317 if (*path_manifest_exe)
322 if(*path_manifest_dll)
396 skip(
".NET or mono not available\n");
403 const char *dll_source =
argv[2];
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
static void run_registry_test(run_type run)
static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
static void get_dll_path_for_run(char *path_dll, UINT path_dll_size, run_type run)
@ run_type_current_working_directory
static BOOL write_resource_file(const char *path_tmp, const char *name_res, const char *name_file, char *path_file)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
LONG WINAPI RegDeleteKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define ERROR_ACCESS_DENIED
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 RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
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)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
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)
BOOL WINAPI PathRemoveFileSpecA(char *path)
BOOL WINAPI PathFileExistsA(const char *path)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
_ACRTIMP int __cdecl atoi(const char *)
_ACRTIMP char *__cdecl strstr(const char *, const char *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define todo_wine_if(is_todo)
#define ERROR_FILE_NOT_FOUND
static const GUID CLSID_Test
static void run_child_process(void)
static PROCESS_INFORMATION pi
static void prepare_and_run_test(void)
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
static __inline const char * wine_dbgstr_guid(const GUID *id)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
static void cleanup_test(void)
BOOL WINAPI IsUserAnAdmin(void)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define HKEY_CLASSES_ROOT