From 6d0f733ac7060baf1be306d30c0ff360ca03ba0a Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Fri, 6 Jan 2017 22:06:53 +0000 Subject: [PATCH] [KERNEL32_APITEST] - Use the full path to the manifest files when testing FindActCtxSectionStringW. This is needed because in most cases they are not in the current directory. svn path=/trunk/; revision=73509 --- rostests/apitests/kernel32/FindActCtxSectionStringW.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rostests/apitests/kernel32/FindActCtxSectionStringW.c b/rostests/apitests/kernel32/FindActCtxSectionStringW.c index 2c65e56882a..eab2f86b695 100644 --- a/rostests/apitests/kernel32/FindActCtxSectionStringW.c +++ b/rostests/apitests/kernel32/FindActCtxSectionStringW.c @@ -79,8 +79,16 @@ struct assemply_data HANDLE _CreateActCtxFromFile(LPCWSTR FileName, int line) { - ACTCTXW ActCtx = {sizeof(ACTCTX), 0, FileName}; + ACTCTXW ActCtx = {sizeof(ACTCTX)}; HANDLE h; + WCHAR buffer[MAX_PATH] , *separator; + + ok (GetModuleFileNameW(NULL, buffer, MAX_PATH), "GetModuleFileName failed\n"); + separator = wcsrchr(buffer, L'\\'); + if (separator) + wcscpy(separator + 1, FileName); + + ActCtx.lpSource = buffer; SetLastError(0xdeaddead); h = CreateActCtxW(&ActCtx);