ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
13 participants
263 discussions
Start a n
N
ew thread
[akhaldi] 70977: [SHELL32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Mar 9 08:43:20 2016 New Revision: 70977 URL:
http://svn.reactos.org/svn/reactos?rev=70977&view=rev
Log: [SHELL32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/shell32/progman_dde.c trunk/rostests/winetests/shell32/shellole.c trunk/rostests/winetests/shell32/shlexec.c trunk/rostests/winetests/shell32/shlfolder.c Modified: trunk/rostests/winetests/shell32/progman_dde.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/progman…
============================================================================== --- trunk/rostests/winetests/shell32/progman_dde.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/progman_dde.c [iso-8859-1] Wed Mar 9 08:43:20 2016 @@ -372,7 +372,13 @@ for (i = 0; window == NULL && i < PDDE_POLL_NUM; i++) { Sleep(PDDE_POLL_TIME); - window = FindWindowA(NULL, winName); + /* Specify the window class name to make sure what we find is really an + * Explorer window. Explorer used two different window classes so try + * both. + */ + window = FindWindowA("ExplorerWClass", winName); + if (!window) + window = FindWindowA("CabinetWClass", winName); } ok (window != NULL, "Window \"%s\" was not created in %i seconds - assumed failure.%s\n", winName, PDDE_POLL_NUM*PDDE_POLL_TIME/1000, GetStringFromTestParams(testParams)); Modified: trunk/rostests/winetests/shell32/shellole.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shellol…
============================================================================== --- trunk/rostests/winetests/shell32/shellole.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shellole.c [iso-8859-1] Wed Mar 9 08:43:20 2016 @@ -74,6 +74,7 @@ static HRESULT (WINAPI *pSHPropStgWriteMultiple)(IPropertyStorage*, UINT*, ULONG, const PROPSPEC*, PROPVARIANT*, PROPID); static HRESULT (WINAPI *pSHCreateQueryCancelAutoPlayMoniker)(IMoniker**); +static HRESULT (WINAPI *pSHCreateSessionKey)(REGSAM, HKEY*); static void init(void) { @@ -83,6 +84,7 @@ pSHPropStgReadMultiple = (void*)GetProcAddress(hmod, "SHPropStgReadMultiple"); pSHPropStgWriteMultiple = (void*)GetProcAddress(hmod, "SHPropStgWriteMultiple"); pSHCreateQueryCancelAutoPlayMoniker = (void*)GetProcAddress(hmod, "SHCreateQueryCancelAutoPlayMoniker"); + pSHCreateSessionKey = (void*)GetProcAddress(hmod, (char*)723); } static HRESULT WINAPI PropertyStorage_QueryInterface(IPropertyStorage *This, @@ -857,6 +859,36 @@ } #undef DROPTEST_FILENAME +static void test_SHCreateSessionKey(void) +{ + HKEY hkey, hkey2; + HRESULT hr; + + if (!pSHCreateSessionKey) + { + skip("SHCreateSessionKey is not implemented\n"); + return; + } + +if (0) /* crashes on native */ + hr = pSHCreateSessionKey(KEY_READ, NULL); + + hkey = (HKEY)0xdeadbeef; + hr = pSHCreateSessionKey(0, &hkey); + todo_wine ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr); + todo_wine ok(hkey == NULL, "got %p\n", hkey); + + hr = pSHCreateSessionKey(KEY_READ, &hkey); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = pSHCreateSessionKey(KEY_READ, &hkey2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2); + + RegCloseKey(hkey); + RegCloseKey(hkey2); +} + START_TEST(shellole) { init(); @@ -864,4 +896,5 @@ test_SHPropStg_functions(); test_SHCreateQueryCancelAutoPlayMoniker(); test_DragQueryFile(); -} + test_SHCreateSessionKey(); +} Modified: trunk/rostests/winetests/shell32/shlexec.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlexec…
============================================================================== --- trunk/rostests/winetests/shell32/shlexec.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlexec.c [iso-8859-1] Wed Mar 9 08:43:20 2016 @@ -1,7 +1,7 @@ /* * Unit test of the ShellExecute function. * - * Copyright 2005 Francois Gouget for CodeWeavers + * Copyright 2005, 2016 Francois Gouget for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,8 +26,6 @@ * - ShellExecute("foo.shlexec") with no path should work if foo.shlexec is * in the PATH * - test associations that use %l, %L or "%1" instead of %1 - * - we may want to test ShellExecuteEx() instead of ShellExecute() - * and then we could also check its return value * - ShellExecuteEx() also calls SetLastError() with meaningful values which * we could check */ @@ -64,18 +62,421 @@ /*** * + * Helpers to read from / write to the child process results file. + * (borrowed from dlls/kernel32/tests/process.c) + * + ***/ + +static const char* encodeA(const char* str) +{ + static char encoded[2*1024+1]; + char* ptr; + size_t len,i; + + if (!str) return ""; + len = strlen(str) + 1; + if (len >= sizeof(encoded)/2) + { + fprintf(stderr, "string is too long!\n"); + assert(0); + } + ptr = encoded; + for (i = 0; i < len; i++) + sprintf(&ptr[i * 2], "%02x", (unsigned char)str[i]); + ptr[2 * len] = '\0'; + return ptr; +} + +static unsigned decode_char(char c) +{ + if (c >= '0' && c <= '9') return c - '0'; + if (c >= 'a' && c <= 'f') return c - 'a' + 10; + assert(c >= 'A' && c <= 'F'); + return c - 'A' + 10; +} + +static char* decodeA(const char* str) +{ + static char decoded[1024]; + char* ptr; + size_t len,i; + + len = strlen(str) / 2; + if (!len--) return NULL; + if (len >= sizeof(decoded)) + { + fprintf(stderr, "string is too long!\n"); + assert(0); + } + ptr = decoded; + for (i = 0; i < len; i++) + ptr[i] = (decode_char(str[2 * i]) << 4) | decode_char(str[2 * i + 1]); + ptr[len] = '\0'; + return ptr; +} + +static void WINETEST_PRINTF_ATTR(2,3) childPrintf(HANDLE h, const char* fmt, ...) +{ + va_list valist; + char buffer[1024]; + DWORD w; + + va_start(valist, fmt); + vsprintf(buffer, fmt, valist); + va_end(valist); + WriteFile(h, buffer, strlen(buffer), &w, NULL); +} + +static char* getChildString(const char* sect, const char* key) +{ + char buf[1024]; + char* ret; + + GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), child_file); + if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; + assert(!(strlen(buf) & 1)); + ret = decodeA(buf); + return ret; +} + + +/*** + * + * Child code + * + ***/ + +#define CHILD_DDE_TIMEOUT 2500 +static DWORD ddeInst; +static HSZ hszTopic; +static char ddeExec[MAX_PATH], ddeApplication[MAX_PATH]; +static BOOL post_quit_on_execute; + +/* Handle DDE for doChild() and test_dde_default_app() */ +static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, + HSZ hsz1, HSZ hsz2, HDDEDATA hData, + ULONG_PTR dwData1, ULONG_PTR dwData2) +{ + DWORD size = 0; + + if (winetest_debug > 2) + trace("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", + uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); + + switch (uType) + { + case XTYP_CONNECT: + if (!DdeCmpStringHandles(hsz1, hszTopic)) + { + size = DdeQueryStringA(ddeInst, hsz2, ddeApplication, MAX_PATH, CP_WINANSI); + ok(size < MAX_PATH, "got size %d\n", size); + assert(size < MAX_PATH); + return (HDDEDATA)TRUE; + } + return (HDDEDATA)FALSE; + + case XTYP_EXECUTE: + size = DdeGetData(hData, (LPBYTE)ddeExec, MAX_PATH, 0); + ok(size < MAX_PATH, "got size %d\n", size); + assert(size < MAX_PATH); + DdeFreeDataHandle(hData); + if (post_quit_on_execute) + PostQuitMessage(0); + return (HDDEDATA)DDE_FACK; + + default: + return NULL; + } +} + +static HANDLE hEvent; +static void init_event(const char* child_file) +{ + char* event_name; + event_name=strrchr(child_file, '\\')+1; + hEvent=CreateEventA(NULL, FALSE, FALSE, event_name); +} + +/* + * This is just to make sure the child won't run forever stuck in a + * GetMessage() loop when DDE fails for some reason. + */ +static void CALLBACK childTimeout(HWND wnd, UINT msg, UINT_PTR timer, DWORD time) +{ + trace("childTimeout called\n"); + + PostQuitMessage(0); +} + +static void doChild(int argc, char** argv) +{ + char *filename, buffer[MAX_PATH]; + HANDLE hFile, map; + int i; + UINT_PTR timer; + + filename=argv[2]; + hFile=CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + if (hFile == INVALID_HANDLE_VALUE) + return; + + /* Arguments */ + childPrintf(hFile, "[Child]\r\n"); + if (winetest_debug > 2) + { + trace("cmdlineA='%s'\n", GetCommandLineA()); + trace("argcA=%d\n", argc); + } + childPrintf(hFile, "cmdlineA=%s\r\n", encodeA(GetCommandLineA())); + childPrintf(hFile, "argcA=%d\r\n", argc); + for (i = 0; i < argc; i++) + { + if (winetest_debug > 2) + trace("argvA%d='%s'\n", i, argv[i]); + childPrintf(hFile, "argvA%d=%s\r\n", i, encodeA(argv[i])); + } + GetModuleFileNameA(GetModuleHandleA(NULL), buffer, sizeof(buffer)); + childPrintf(hFile, "longPath=%s\r\n", encodeA(buffer)); + + /* Check environment variable inheritance */ + *buffer = '\0'; + SetLastError(0); + GetEnvironmentVariableA("ShlexecVar", buffer, sizeof(buffer)); + childPrintf(hFile, "ShlexecVarLE=%d\r\n", GetLastError()); + childPrintf(hFile, "ShlexecVar=%s\r\n", encodeA(buffer)); + + map = OpenFileMappingA(FILE_MAP_READ, FALSE, "winetest_shlexec_dde_map"); + if (map != NULL) + { + HANDLE dde_ready; + char *shared_block = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 4096); + CloseHandle(map); + if (shared_block[0] != '\0' || shared_block[1] != '\0') + { + HDDEDATA hdde; + HSZ hszApplication; + MSG msg; + UINT rc; + + post_quit_on_execute = TRUE; + ddeInst = 0; + rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | + CBF_FAIL_POKES | CBF_FAIL_REQUESTS, 0); + ok(rc == DMLERR_NO_ERROR, "DdeInitializeA() returned %d\n", rc); + hszApplication = DdeCreateStringHandleA(ddeInst, shared_block, CP_WINANSI); + ok(hszApplication != NULL, "DdeCreateStringHandleA(%s) = NULL\n", shared_block); + shared_block += strlen(shared_block) + 1; + hszTopic = DdeCreateStringHandleA(ddeInst, shared_block, CP_WINANSI); + ok(hszTopic != NULL, "DdeCreateStringHandleA(%s) = NULL\n", shared_block); + hdde = DdeNameService(ddeInst, hszApplication, 0, DNS_REGISTER | DNS_FILTEROFF); + ok(hdde != NULL, "DdeNameService() failed le=%u\n", GetLastError()); + + timer = SetTimer(NULL, 0, CHILD_DDE_TIMEOUT, childTimeout); + + dde_ready = OpenEventA(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); + SetEvent(dde_ready); + CloseHandle(dde_ready); + + while (GetMessageA(&msg, NULL, 0, 0)) + { + if (winetest_debug > 2) + trace("msg %d lParam=%ld wParam=%lu\n", msg.message, msg.lParam, msg.wParam); + DispatchMessageA(&msg); + } + + Sleep(500); + KillTimer(NULL, timer); + hdde = DdeNameService(ddeInst, hszApplication, 0, DNS_UNREGISTER); + ok(hdde != NULL, "DdeNameService() failed le=%u\n", GetLastError()); + ok(DdeFreeStringHandle(ddeInst, hszTopic), "DdeFreeStringHandle(topic)\n"); + ok(DdeFreeStringHandle(ddeInst, hszApplication), "DdeFreeStringHandle(application)\n"); + ok(DdeUninitialize(ddeInst), "DdeUninitialize() failed\n"); + } + else + { + dde_ready = OpenEventA(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); + SetEvent(dde_ready); + CloseHandle(dde_ready); + } + + UnmapViewOfFile(shared_block); + + childPrintf(hFile, "ddeExec=%s\r\n", encodeA(ddeExec)); + } + + childPrintf(hFile, "Failures=%d\r\n", winetest_get_failures()); + CloseHandle(hFile); + + init_event(filename); + SetEvent(hEvent); + CloseHandle(hEvent); +} + +static void dump_child_(const char* file, int line) +{ + if (winetest_debug > 1) + { + char key[18]; + char* str; + int i, c; + + str=getChildString("Child", "cmdlineA"); + trace_(file, line)("cmdlineA='%s'\n", str); + c=GetPrivateProfileIntA("Child", "argcA", -1, child_file); + trace_(file, line)("argcA=%d\n",c); + for (i=0;i<c;i++) + { + sprintf(key, "argvA%d", i); + str=getChildString("Child", key); + trace_(file, line)("%s='%s'\n", key, str); + } + + c=GetPrivateProfileIntA("Child", "ShlexecVarLE", -1, child_file); + trace_(file, line)("ShlexecVarLE=%d\n", c); + str=getChildString("Child", "ShlexecVar"); + trace_(file, line)("ShlexecVar='%s'\n", str); + + c=GetPrivateProfileIntA("Child", "Failures", -1, child_file); + trace_(file, line)("Failures=%d\n", c); + } +} + + +/*** + * + * Helpers to check the ShellExecute() / child process results. + * + ***/ + +static char shell_call[2048]; +static void WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...) +{ + va_list valist; + char buffer[2048]; + + strcpy(buffer, shell_call); + strcat(buffer, " "); + va_start(valist, msg); + vsprintf(buffer+strlen(buffer), msg, valist); + va_end(valist); + winetest_ok(condition, "%s", buffer); +} +#define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell +#define okShell okShell_(__FILE__, __LINE__) + +static char assoc_desc[2048]; +void reset_association_description(void) +{ + *assoc_desc = '\0'; +} + +static void okChildString_(const char* file, int line, const char* key, const char* expected, const char* bad) +{ + char* result; + result=getChildString("Child", key); + if (!result) + { + okShell_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); + return; + } + okShell_(file, line)(lstrcmpiA(result, expected) == 0 || + broken(lstrcmpiA(result, bad) == 0), + "%s expected '%s', got '%s'\n", key, expected, result); +} +#define okChildString(key, expected) okChildString_(__FILE__, __LINE__, (key), (expected), (expected)) +#define okChildStringBroken(key, expected, broken) okChildString_(__FILE__, __LINE__, (key), (expected), (broken)) + +static int StrCmpPath(const char* s1, const char* s2) +{ + if (!s1 && !s2) return 0; + if (!s2) return 1; + if (!s1) return -1; + while (*s1) + { + if (!*s2) + { + if (*s1=='.') + s1++; + return (*s1-*s2); + } + if ((*s1=='/' || *s1=='\\') && (*s2=='/' || *s2=='\\')) + { + while (*s1=='/' || *s1=='\\') + s1++; + while (*s2=='/' || *s2=='\\') + s2++; + } + else if (toupper(*s1)==toupper(*s2)) + { + s1++; + s2++; + } + else + { + return (*s1-*s2); + } + } + if (*s2=='.') + s2++; + if (*s2) + return -1; + return 0; +} + +static void okChildPath_(const char* file, int line, const char* key, const char* expected) +{ + char* result; + int equal, shortequal; + result=getChildString("Child", key); + if (!result) + { + okShell_(file,line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); + return; + } + shortequal = FALSE; + equal = (StrCmpPath(result, expected) == 0); + if (!equal) + { + char altpath[MAX_PATH]; + DWORD rc = GetLongPathNameA(expected, altpath, sizeof(altpath)); + if (0 < rc && rc < sizeof(altpath)) + equal = (StrCmpPath(result, altpath) == 0); + if (!equal) + { + rc = GetShortPathNameA(expected, altpath, sizeof(altpath)); + if (0 < rc && rc < sizeof(altpath)) + shortequal = (StrCmpPath(result, altpath) == 0); + } + } + okShell_(file,line)(equal || broken(shortequal) /* XP SP1 */, + "%s expected '%s', got '%s'\n", key, expected, result); +} +#define okChildPath(key, expected) okChildPath_(__FILE__, __LINE__, (key), (expected)) + +static void okChildInt_(const char* file, int line, const char* key, int expected) +{ + INT result; + result=GetPrivateProfileIntA("Child", key, expected, child_file); + okShell_(file,line)(result == expected, + "%s expected %d, but got %d\n", key, expected, result); +} +#define okChildInt(key, expected) okChildInt_(__FILE__, __LINE__, (key), (expected)) + +static void okChildIntBroken_(const char* file, int line, const char* key, int expected) +{ + INT result; + result=GetPrivateProfileIntA("Child", key, expected, child_file); + okShell_(file,line)(result == expected || broken(result != expected), + "%s expected %d, but got %d\n", key, expected, result); +} +#define okChildIntBroken(key, expected) okChildIntBroken_(__FILE__, __LINE__, (key), (expected)) + + +/*** + * * ShellExecute wrappers * ***/ -static void dump_child(void); - -static HANDLE hEvent; -static void init_event(const char* child_file) -{ - char* event_name; - event_name=strrchr(child_file, '\\')+1; - hEvent=CreateEventA(NULL, FALSE, FALSE, event_name); -} static void strcat_param(char* str, const char* name, const char* param) { @@ -93,23 +494,24 @@ static int _todo_wait = 0; #define todo_wait for (_todo_wait = 1; _todo_wait; _todo_wait = 0) -static char shell_call[2048]=""; static int bad_shellexecute = 0; -static INT_PTR shell_execute(LPCSTR verb, LPCSTR file, LPCSTR parameters, LPCSTR directory) + +static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR filename, LPCSTR parameters, LPCSTR directory) { INT_PTR rc, rcEmpty = 0; if(!verb) - rcEmpty = shell_execute("", file, parameters, directory); + rcEmpty = shell_execute_(file, line, "", filename, parameters, directory); strcpy(shell_call, "ShellExecute("); strcat_param(shell_call, "verb", verb); - strcat_param(shell_call, "file", file); + strcat_param(shell_call, "file", filename); strcat_param(shell_call, "params", parameters); strcat_param(shell_call, "dir", directory); strcat(shell_call, ")"); + strcat(shell_call, assoc_desc); if (winetest_debug > 1) - trace("%s\n", shell_call); + trace_(file, line)("Called %s\n", shell_call); DeleteFileA(child_file); SetLastError(0xcafebabe); @@ -118,7 +520,7 @@ * association it displays the 'Open With' dialog and I could not find * a flag to prevent this. */ - rc=(INT_PTR)ShellExecuteA(NULL, verb, file, parameters, directory, SW_HIDE); + rc=(INT_PTR)ShellExecuteA(NULL, verb, filename, parameters, directory, SW_HIDE); if (rc > 32) { @@ -137,58 +539,70 @@ rc = SE_ERR_NOASSOC; } } - if (!_todo_wait) - ok(wait_rc==WAIT_OBJECT_0 || rc <= 32, "%s WaitForSingleObject returned %d\n", shell_call, wait_rc); - else todo_wine - ok(wait_rc==WAIT_OBJECT_0 || rc <= 32, "%s WaitForSingleObject returned %d\n", shell_call, wait_rc); + todo_wine_if(_todo_wait) + okShell_(file, line)(wait_rc==WAIT_OBJECT_0 || rc <= 32, + "WaitForSingleObject returned %d\n", wait_rc); } /* The child process may have changed the result file, so let profile * functions know about it */ WritePrivateProfileStringA(NULL, NULL, NULL, child_file); - if (rc > 32) - dump_child(); + if (GetFileAttributesA(child_file) != INVALID_FILE_ATTRIBUTES) + { + int c; + dump_child_(file, line); + c = GetPrivateProfileIntA("Child", "Failures", -1, child_file); + if (c > 0) + winetest_add_failures(c); + okChildInt_(file, line, "ShlexecVarLE", 0); + okChildString_(file, line, "ShlexecVar", "Present", "Present"); + } if(!verb) { if (rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */ bad_shellexecute = 1; - ok(rc == rcEmpty || broken(rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */, - "%s Got different return value with empty string: %lu %lu\n", shell_call, rc, rcEmpty); + okShell_(file, line)(rc == rcEmpty || + broken(rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */, + "Got different return value with empty string: %lu %lu\n", rc, rcEmpty); } return rc; } - -static INT_PTR shell_execute_ex(DWORD mask, LPCSTR verb, LPCSTR file, - LPCSTR parameters, LPCSTR directory, - LPCSTR class) -{ +#define shell_execute(verb, filename, parameters, directory) \ + shell_execute_(__FILE__, __LINE__, verb, filename, parameters, directory) + +static INT_PTR shell_execute_ex_(const char* file, int line, + DWORD mask, LPCSTR verb, LPCSTR filename, + LPCSTR parameters, LPCSTR directory, + LPCSTR class) +{ + char smask[11]; SHELLEXECUTEINFOA sei; BOOL success; INT_PTR rc; + /* Add some flags so we can wait for the child process */ + mask |= SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE; + strcpy(shell_call, "ShellExecuteEx("); - if (mask) - { - char smask[11]; - sprintf(smask, "0x%x", mask); - strcat_param(shell_call, "mask", smask); - } + sprintf(smask, "0x%x", mask); + strcat_param(shell_call, "mask", smask); strcat_param(shell_call, "verb", verb); - strcat_param(shell_call, "file", file); + strcat_param(shell_call, "file", filename); strcat_param(shell_call, "params", parameters); strcat_param(shell_call, "dir", directory); strcat_param(shell_call, "class", class); strcat(shell_call, ")"); + strcat(shell_call, assoc_desc); if (winetest_debug > 1) - trace("%s\n", shell_call); + trace_(file, line)("Called %s\n", shell_call); sei.cbSize=sizeof(sei); - sei.fMask=SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE | mask; + sei.fMask=mask; sei.hwnd=NULL; sei.lpVerb=verb; - sei.lpFile=file; + sei.lpFile=filename; sei.lpParameters=parameters; sei.lpDirectory=directory; sei.nShow=SW_SHOWNORMAL; @@ -198,39 +612,70 @@ sei.hkeyClass=NULL; sei.dwHotKey=0; U(sei).hIcon=NULL; - sei.hProcess=NULL; /* Out */ + sei.hProcess=(HANDLE)0xdeadbeef; /* Out */ DeleteFileA(child_file); SetLastError(0xcafebabe); success=ShellExecuteExA(&sei); rc=(INT_PTR)sei.hInstApp; - ok((success && rc > 32) || (!success && rc <= 32), - "%s rc=%d and hInstApp=%ld is not allowed\n", shell_call, success, rc); + okShell_(file, line)((success && rc > 32) || (!success && rc <= 32), + "rc=%d and hInstApp=%ld is not allowed\n", + success, rc); if (rc > 32) { - int wait_rc; + DWORD wait_rc, rc; if (sei.hProcess!=NULL) { wait_rc=WaitForSingleObject(sei.hProcess, 5000); - ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject(hProcess) returned %d\n", wait_rc); + okShell_(file, line)(wait_rc==WAIT_OBJECT_0, + "WaitForSingleObject(hProcess) returned %d\n", + wait_rc); + wait_rc = GetExitCodeProcess(sei.hProcess, &rc); + okShell_(file, line)(wait_rc, "GetExitCodeProcess() failed le=%u\n", GetLastError()); + todo_wine_if(_todo_wait) + okShell_(file, line)(rc == 0, "child returned %u\n", rc); + CloseHandle(sei.hProcess); } wait_rc=WaitForSingleObject(hEvent, 5000); - if (!_todo_wait) - ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc); - else todo_wine - ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc); - } + todo_wine_if(_todo_wait) + okShell_(file, line)(wait_rc==WAIT_OBJECT_0, + "WaitForSingleObject returned %d\n", wait_rc); + } + else + okShell_(file, line)(sei.hProcess==NULL, + "returned a process handle %p\n", sei.hProcess); + /* The child process may have changed the result file, so let profile * functions know about it */ WritePrivateProfileStringA(NULL, NULL, NULL, child_file); - if (rc > 32) - dump_child(); + if (GetFileAttributesA(child_file) != INVALID_FILE_ATTRIBUTES) + { + int c; + dump_child_(file, line); + c = GetPrivateProfileIntA("Child", "Failures", -1, child_file); + if (c > 0) + winetest_add_failures(c); + /* When NOZONECHECKS is specified the environment variables are not + * inherited if the process does not have elevated privileges. + */ + if ((mask & SEE_MASK_NOZONECHECKS) && skip_shlexec_tests) + { + okChildInt_(file, line, "ShlexecVarLE", 203); + okChildString_(file, line, "ShlexecVar", "", ""); + } + else + { + okChildInt_(file, line, "ShlexecVarLE", 0); + okChildString_(file, line, "ShlexecVar", "Present", "Present"); + } + } return rc; } - +#define shell_execute_ex(mask, verb, filename, parameters, directory, class) \ + shell_execute_ex_(__FILE__, __LINE__, mask, verb, filename, parameters, directory, class) /*** @@ -248,6 +693,8 @@ sprintf(class, "shlexec%s", extension); rc=RegCreateKeyExA(HKEY_CLASSES_ROOT, extension, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, NULL); + ok(rc == ERROR_SUCCESS || rc == ERROR_ACCESS_DENIED, + "could not create association %s (rc=%d)\n", class, rc); if (rc != ERROR_SUCCESS) return FALSE; @@ -355,6 +802,17 @@ char* cmd; LONG rc; + strcpy(assoc_desc, " Assoc "); + strcat_param(assoc_desc, "ext", extension); + strcat_param(assoc_desc, "verb", verb); + sprintf(shell, "%d", rawcmd); + strcat_param(assoc_desc, "rawcmd", shell); + strcat_param(assoc_desc, "cmdtail", cmdtail); + strcat_param(assoc_desc, "ddeexec", ddeexec); + strcat_param(assoc_desc, "app", application); + strcat_param(assoc_desc, "topic", topic); + strcat_param(assoc_desc, "ifexec", ifexec); + sprintf(shell, "shlexec%s\\shell", extension); rc=RegOpenKeyExA(HKEY_CLASSES_ROOT, shell, 0, KEY_CREATE_SUB_KEY, &hkey_shell); @@ -431,337 +889,18 @@ CloseHandle(hkey_cmd); } +/* Creates a class' non-DDE test verb. + * This function is meant to be used to create long term test verbs and thus + * does not trace them. + */ static void create_test_verb(const char* extension, const char* verb, int rawcmd, const char* cmdtail) { create_test_verb_dde(extension, verb, rawcmd, cmdtail, NULL, NULL, NULL, NULL); -} - -/*** - * - * Functions to check that the child process was started just right - * (borrowed from dlls/kernel32/tests/process.c) - * - ***/ - -static const char* encodeA(const char* str) -{ - static char encoded[2*1024+1]; - char* ptr; - size_t len,i; - - if (!str) return ""; - len = strlen(str) + 1; - if (len >= sizeof(encoded)/2) - { - fprintf(stderr, "string is too long!\n"); - assert(0); - } - ptr = encoded; - for (i = 0; i < len; i++) - sprintf(&ptr[i * 2], "%02x", (unsigned char)str[i]); - ptr[2 * len] = '\0'; - return ptr; -} - -static unsigned decode_char(char c) -{ - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'a' && c <= 'f') return c - 'a' + 10; - assert(c >= 'A' && c <= 'F'); - return c - 'A' + 10; -} - -static char* decodeA(const char* str) -{ - static char decoded[1024]; - char* ptr; - size_t len,i; - - len = strlen(str) / 2; - if (!len--) return NULL; - if (len >= sizeof(decoded)) - { - fprintf(stderr, "string is too long!\n"); - assert(0); - } - ptr = decoded; - for (i = 0; i < len; i++) - ptr[i] = (decode_char(str[2 * i]) << 4) | decode_char(str[2 * i + 1]); - ptr[len] = '\0'; - return ptr; -} - -static void childPrintf(HANDLE h, const char* fmt, ...) -{ - va_list valist; - char buffer[1024]; - DWORD w; - - va_start(valist, fmt); - vsprintf(buffer, fmt, valist); - va_end(valist); - WriteFile(h, buffer, strlen(buffer), &w, NULL); -} - -static DWORD ddeInst; -static HSZ hszTopic; -static char ddeExec[MAX_PATH], ddeApplication[MAX_PATH]; -static BOOL post_quit_on_execute; - -static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, - HSZ hsz1, HSZ hsz2, HDDEDATA hData, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - DWORD size = 0; - - if (winetest_debug > 2) - trace("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", - uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); - - switch (uType) - { - case XTYP_CONNECT: - if (!DdeCmpStringHandles(hsz1, hszTopic)) - { - size = DdeQueryStringA(ddeInst, hsz2, ddeApplication, MAX_PATH, CP_WINANSI); - ok(size < MAX_PATH, "got size %d\n", size); - assert(size < MAX_PATH); - return (HDDEDATA)TRUE; - } - return (HDDEDATA)FALSE; - - case XTYP_EXECUTE: - size = DdeGetData(hData, (LPBYTE)ddeExec, MAX_PATH, 0); - ok(size < MAX_PATH, "got size %d\n", size); - assert(size < MAX_PATH); - DdeFreeDataHandle(hData); - if (post_quit_on_execute) - PostQuitMessage(0); - return (HDDEDATA)DDE_FACK; - - default: - return NULL; - } -} - -/* - * This is just to make sure the child won't run forever stuck in a GetMessage() - * loop when DDE fails for some reason. - */ -static void CALLBACK childTimeout(HWND wnd, UINT msg, UINT_PTR timer, DWORD time) -{ - trace("childTimeout called\n"); - - PostQuitMessage(0); -} - -static void doChild(int argc, char** argv) -{ - char *filename, longpath[MAX_PATH] = ""; - HANDLE hFile, map; - int i; - int rc; - HSZ hszApplication; - UINT_PTR timer; - HANDLE dde_ready; - MSG msg; - char *shared_block; - - filename=argv[2]; - hFile=CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - if (hFile == INVALID_HANDLE_VALUE) - return; - - /* Arguments */ - childPrintf(hFile, "[Arguments]\r\n"); - if (winetest_debug > 2) - { - trace("cmdlineA='%s'\n", GetCommandLineA()); - trace("argcA=%d\n", argc); - } - childPrintf(hFile, "cmdlineA=%s\r\n", encodeA(GetCommandLineA())); - childPrintf(hFile, "argcA=%d\r\n", argc); - for (i = 0; i < argc; i++) - { - if (winetest_debug > 2) - trace("argvA%d='%s'\n", i, argv[i]); - childPrintf(hFile, "argvA%d=%s\r\n", i, encodeA(argv[i])); - } - GetModuleFileNameA(GetModuleHandleA(NULL), longpath, MAX_PATH); - childPrintf(hFile, "longPath=%s\r\n", encodeA(longpath)); - - map = OpenFileMappingA(FILE_MAP_READ, FALSE, "winetest_shlexec_dde_map"); - if (map != NULL) - { - shared_block = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 4096); - CloseHandle(map); - if (shared_block[0] != '\0' || shared_block[1] != '\0') - { - post_quit_on_execute = TRUE; - ddeInst = 0; - rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | - CBF_FAIL_POKES | CBF_FAIL_REQUESTS, 0); - ok(rc == DMLERR_NO_ERROR, "got %d\n", rc); - hszApplication = DdeCreateStringHandleA(ddeInst, shared_block, CP_WINANSI); - hszTopic = DdeCreateStringHandleA(ddeInst, shared_block + strlen(shared_block) + 1, CP_WINANSI); - assert(hszApplication && hszTopic); - assert(DdeNameService(ddeInst, hszApplication, 0, DNS_REGISTER | DNS_FILTEROFF)); - - timer = SetTimer(NULL, 0, 2500, childTimeout); - - dde_ready = OpenEventA(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); - SetEvent(dde_ready); - CloseHandle(dde_ready); - - while (GetMessageA(&msg, NULL, 0, 0)) - DispatchMessageA(&msg); - - Sleep(500); - KillTimer(NULL, timer); - assert(DdeNameService(ddeInst, hszApplication, 0, DNS_UNREGISTER)); - assert(DdeFreeStringHandle(ddeInst, hszTopic)); - assert(DdeFreeStringHandle(ddeInst, hszApplication)); - assert(DdeUninitialize(ddeInst)); - } - else - { - dde_ready = OpenEventA(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); - SetEvent(dde_ready); - CloseHandle(dde_ready); - } - - UnmapViewOfFile(shared_block); - - childPrintf(hFile, "ddeExec=%s\r\n", encodeA(ddeExec)); - } - - CloseHandle(hFile); - - init_event(filename); - SetEvent(hEvent); - CloseHandle(hEvent); -} - -static char* getChildString(const char* sect, const char* key) -{ - char buf[1024]; - char* ret; - - GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), child_file); - if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; - assert(!(strlen(buf) & 1)); - ret = decodeA(buf); - return ret; -} - -static void dump_child(void) -{ - if (winetest_debug > 1) - { - char key[18]; - char* str; - int i, c; - - str=getChildString("Arguments", "cmdlineA"); - trace("cmdlineA='%s'\n", str); - c=GetPrivateProfileIntA("Arguments", "argcA", -1, child_file); - trace("argcA=%d\n",c); - for (i=0;i<c;i++) - { - sprintf(key, "argvA%d", i); - str=getChildString("Arguments", key); - trace("%s='%s'\n", key, str); - } - } -} - -static int StrCmpPath(const char* s1, const char* s2) -{ - if (!s1 && !s2) return 0; - if (!s2) return 1; - if (!s1) return -1; - while (*s1) - { - if (!*s2) - { - if (*s1=='.') - s1++; - return (*s1-*s2); - } - if ((*s1=='/' || *s1=='\\') && (*s2=='/' || *s2=='\\')) - { - while (*s1=='/' || *s1=='\\') - s1++; - while (*s2=='/' || *s2=='\\') - s2++; - } - else if (toupper(*s1)==toupper(*s2)) - { - s1++; - s2++; - } - else - { - return (*s1-*s2); - } - } - if (*s2=='.') - s2++; - if (*s2) - return -1; - return 0; -} - -static void _okChildString(const char* file, int line, const char* key, const char* expected, const char* bad) -{ - char* result; - result=getChildString("Arguments", key); - if (!result) - { - ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); - return; - } - ok_(file, line)(lstrcmpiA(result, expected) == 0 || - broken(lstrcmpiA(result, bad) == 0), - "%s expected '%s', got '%s'\n", key, expected, result); -} - -static void _okChildPath(const char* file, int line, const char* key, const char* expected) -{ - char* result; - result=getChildString("Arguments", key); - if (!result) - { - ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected); - return; - } - ok_(file, line)(StrCmpPath(result, expected) == 0, - "%s expected '%s', got '%s'\n", key, expected, result); -} - -static void _okChildInt(const char* file, int line, const char* key, int expected) -{ - INT result; - result=GetPrivateProfileIntA("Arguments", key, expected, child_file); - ok_(file, line)(result == expected, - "%s expected %d, but got %d\n", key, expected, result); -} - -static void _okChildIntBroken(const char* file, int line, const char* key, int expected) -{ - INT result; - result=GetPrivateProfileIntA("Arguments", key, expected, child_file); - ok_(file, line)(result == expected || broken(result != expected), - "%s expected %d, but got %d\n", key, expected, result); -} - -#define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected), (expected)) -#define okChildStringBroken(key, expected, broken) _okChildString(__FILE__, __LINE__, (key), (expected), (broken)) -#define okChildPath(key, expected) _okChildPath(__FILE__, __LINE__, (key), (expected)) -#define okChildInt(key, expected) _okChildInt(__FILE__, __LINE__, (key), (expected)) -#define okChildIntBroken(key, expected) _okChildIntBroken(__FILE__, __LINE__, (key), (expected)) + reset_association_description(); +} + /*** * @@ -836,6 +975,7 @@ return tmplen; } + /*** * @@ -901,6 +1041,8 @@ {"QuotedLowerL", "%s\\test file.shlexec", 0x0, 33}, {"QuotedUpperL", "%s\\test file.shlexec", 0x0, 33}, + {"notaverb", "%s\\test file.shlexec", 0x10, SE_ERR_NOASSOC}, + /* Test file masked due to space */ {NULL, "%s\\masked file.shlexec", 0x0, 33}, /* Test if quoting prevents the masking */ @@ -935,48 +1077,48 @@ /* existing "drawback_file.noassoc" prevents finding "drawback_file.noassoc foo.shlexec" on wine */ sprintf(fileA, "%s\\drawback_file.noassoc foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32, "failed: rc=%lu\n", rc); /* if quoted, existing "drawback_file.noassoc" not prevents finding "drawback_file.noassoc foo.shlexec" on wine */ sprintf(fileA, "\"%s\\drawback_file.noassoc foo.shlexec\"", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, - "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, + "failed: rc=%lu\n", rc); /* error should be SE_ERR_FNF, not SE_ERR_NOASSOC */ sprintf(fileA, "\"%s\\drawback_file.noassoc\" foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc == SE_ERR_FNF, "%s succeeded: rc=%lu\n", shell_call, rc); + okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); /* ""command"" not works on wine (and real win9x and w2k) */ sprintf(fileA, "\"\"%s\\simple.shlexec\"\"", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - todo_wine ok(rc > 32 || broken(rc == SE_ERR_FNF) /* Win9x/2000 */, - "%s failed: rc=%lu\n", shell_call, rc); + todo_wine okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win9x/2000 */, + "failed: rc=%lu\n", rc); /* nonexisting "drawback_nonexist.noassoc" not prevents finding "drawback_nonexist.noassoc foo.shlexec" on wine */ sprintf(fileA, "%s\\drawback_nonexist.noassoc foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32, "failed: rc=%lu\n", rc); /* is SEE_MASK_DOENVSUBST default flag? Should only be when XP emulates 9x (XP bug or real 95 or ME behavior ?) */ rc=shell_execute(NULL, "%TMPDIR%\\simple.shlexec", NULL, NULL); - todo_wine ok(rc == SE_ERR_FNF, "%s succeeded: rc=%lu\n", shell_call, rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); /* quoted */ rc=shell_execute(NULL, "\"%TMPDIR%\\simple.shlexec\"", NULL, NULL); - todo_wine ok(rc == SE_ERR_FNF, "%s succeeded: rc=%lu\n", shell_call, rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); /* test SEE_MASK_DOENVSUBST works */ rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, "%TMPDIR%\\simple.shlexec", NULL, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32, "failed: rc=%lu\n", rc); /* quoted lpFile does not work on real win95 and nt4 */ rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, "\"%TMPDIR%\\simple.shlexec\"", NULL, NULL, NULL); - ok(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, - "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, + "failed: rc=%lu\n", rc); } typedef struct @@ -1169,24 +1311,18 @@ count = 0; while (test->args[count]) count++; - if ((test->todo & 0x1) == 0) + todo_wine_if(test->todo & 0x1) ok(cl2a_count == count, "%s: expected %d arguments, but got %d\n", test->cmd, count, cl2a_count); - else todo_wine - ok(cl2a_count == count, "%s: expected %d arguments, but got %d\n", test->cmd, count, cl2a_count); for (i = 0; i < cl2a_count; i++) { if (i < count) { MultiByteToWideChar(CP_ACP, 0, test->args[i], -1, argW, sizeof(argW)/sizeof(*argW)); - if ((test->todo & (1 << (i+4))) == 0) + todo_wine_if(test->todo & (1 << (i+4))) ok(!lstrcmpW(*argsW, argW), "%s: arg[%d] expected %s but got %s\n", test->cmd, i, wine_dbgstr_w(argW), wine_dbgstr_w(*argsW)); - else todo_wine - ok(!lstrcmpW(*argsW, argW), "%s: arg[%d] expected %s but got %s\n", test->cmd, i, wine_dbgstr_w(argW), wine_dbgstr_w(*argsW)); - } - else if ((test->todo & 0x1) == 0) - ok(0, "%s: got extra arg[%d]=%s\n", test->cmd, i, wine_dbgstr_w(*argsW)); - else todo_wine + } + else todo_wine_if(test->todo & 0x1) ok(0, "%s: got extra arg[%d]=%s\n", test->cmd, i, wine_dbgstr_w(*argsW)); argsW++; } @@ -1416,6 +1552,18 @@ const char* cmd; unsigned i, count; + /* Test with a long parameter */ + for (rc = 0; rc < MAX_PATH; rc++) + fileA[rc] = 'a' + rc % 26; + fileA[MAX_PATH-1] = '\0'; + sprintf(params, "shlexec \"%s\" %s", child_file, fileA); + + /* We need NOZONECHECKS on Win2003 to block a dialog */ + rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, NULL, NULL); + okShell(rc > 32, "failed: rc=%lu\n", rc); + okChildInt("argcA", 4); + okChildPath("argvA3", fileA); + if (skip_shlexec_tests) { skip("No argify tests due to lack of .shlexec association\n"); @@ -1439,40 +1587,33 @@ /* trace("***** verb='%s' params='%s'\n", test->verb, test->params); */ rc = shell_execute_ex(SEE_MASK_DOENVSUBST, test->verb, fileA, test->params, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + okShell(rc > 32, "failed: rc=%lu\n", rc); count = 0; while (test->cmd.args[count]) count++; - if ((test->todo & 0x1) == 0) - /* +4 for the shlexec arguments, -1 because of the added "" - * argument for the CommandLineToArgvW() tests. - */ + /* +4 for the shlexec arguments, -1 because of the added "" + * argument for the CommandLineToArgvW() tests. + */ + todo_wine_if(test->todo & 0x1) okChildInt("argcA", 4 + count - 1); - else todo_wine - okChildInt("argcA", 4 + count - 1); - - cmd = getChildString("Arguments", "cmdlineA"); + + cmd = getChildString("Child", "cmdlineA"); /* Our commands are such that the verb immediately precedes the * part we are interested in. */ if (cmd) cmd = strstr(cmd, test->verb); if (cmd) cmd += strlen(test->verb); if (!cmd) cmd = "(null)"; - if ((test->todo & 0x2) == 0) - ok(!strcmp(cmd, test->cmd.cmd) || broken(!strcmp(cmd, bad->cmd)), - "%s: the cmdline is '%s' instead of '%s'\n", shell_call, cmd, test->cmd.cmd); - else todo_wine - ok(!strcmp(cmd, test->cmd.cmd) || broken(!strcmp(cmd, bad->cmd)), - "%s: the cmdline is '%s' instead of '%s'\n", shell_call, cmd, test->cmd.cmd); + todo_wine_if(test->todo & 0x2) + okShell(!strcmp(cmd, test->cmd.cmd) || broken(!strcmp(cmd, bad->cmd)), + "the cmdline is '%s' instead of '%s'\n", cmd, test->cmd.cmd); for (i = 0; i < count - 1; i++) { char argname[18]; sprintf(argname, "argvA%d", 4 + i); - if ((test->todo & (1 << (i+4))) == 0) - okChildStringBroken(argname, test->cmd.args[i+1], bad->args[i+1]); - else todo_wine + todo_wine_if(test->todo & (1 << (i+4))) okChildStringBroken(argname, test->cmd.args[i+1], bad->args[i+1]); } @@ -1480,18 +1621,6 @@ has_cl2a = test_one_cmdline(&(test->cmd)); test++; } - - /* Test with a long parameter */ - for (rc = 0; rc < MAX_PATH; rc++) - fileA[rc] = 'a' + rc % 26; - fileA[MAX_PATH-1] = '\0'; - sprintf(params, "shlexec \"%s\" %s", child_file, fileA); - - /* We need NOZONECHECKS on Win2003 to block a dialog */ - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); - okChildInt("argcA", 4); - okChildString("argvA3", fileA); } static void test_filename(void) @@ -1544,38 +1673,19 @@ } if (rc > 32) rc=33; - ok(rc==test->rc || - broken(quotedfile && rc == SE_ERR_FNF), /* NT4 */ - "%s failed: rc=%ld err=%u\n", shell_call, - rc, GetLastError()); + okShell(rc==test->rc || + broken(quotedfile && rc == SE_ERR_FNF), /* NT4 */ + "failed: rc=%ld err=%u\n", rc, GetLastError()); if (rc == 33) { const char* verb; - if ((test->todo & 0x2)==0) - { + todo_wine_if(test->todo & 0x2) okChildInt("argcA", 5); - } - else todo_wine - { - okChildInt("argcA", 5); - } verb=(test->verb ? test->verb : "Open"); - if ((test->todo & 0x4)==0) - { + todo_wine_if(test->todo & 0x4) okChildString("argvA3", verb); - } - else todo_wine - { - okChildString("argvA3", verb); - } - if ((test->todo & 0x8)==0) - { + todo_wine_if(test->todo & 0x8) okChildPath("argvA4", filename); - } - else todo_wine - { - okChildPath("argvA4", filename); - } } test++; } @@ -1587,16 +1697,8 @@ rc=shell_execute(test->verb, filename, NULL, NULL); if (rc > 32) rc=33; - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc, "%s failed: rc=%ld err=%u\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc, "%s failed: rc=%ld err=%u\n", shell_call, - rc, GetLastError()); - } + todo_wine_if(test->todo & 0x1) + okShell(rc==test->rc, "failed: rc=%ld err=%u\n", rc, GetLastError()); if (rc==0) { int count; @@ -1604,14 +1706,8 @@ char* str; verb=(test->verb ? test->verb : "Open"); - if ((test->todo & 0x4)==0) - { + todo_wine_if(test->todo & 0x4) okChildString("argvA3", verb); - } - else todo_wine - { - okChildString("argvA3", verb); - } count=4; str=filename; @@ -1623,27 +1719,15 @@ if (space) *space='\0'; sprintf(attrib, "argvA%d", count); - if ((test->todo & 0x8)==0) - { + todo_wine_if(test->todo & 0x8) okChildPath(attrib, str); - } - else todo_wine - { - okChildPath(attrib, str); - } count++; if (!space) break; str=space+1; } - if ((test->todo & 0x2)==0) - { + todo_wine_if(test->todo & 0x2) okChildInt("argcA", count); - } - else todo_wine - { - okChildInt("argcA", count); - } } test++; } @@ -1658,8 +1742,7 @@ */ sprintf(filename, "\"%s\\test file.shlexec\"", tmpdir); rc=shell_execute(NULL, filename, NULL, NULL); - ok(rc > 32, "%s failed: rc=%ld err=%u\n", shell_call, rc, - GetLastError()); + okShell(rc > 32, "failed: rc=%ld err=%u\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); sprintf(filename, "%s\\test file.shlexec", tmpdir); @@ -1726,7 +1809,8 @@ return; } - rc = (INT_PTR)ShellExecuteA(NULL, NULL, "file:///nosuchfile.shlexec", NULL, NULL, SW_SHOWNORMAL); + rc = shell_execute_ex(SEE_MASK_FLAG_NO_UI, NULL, + "file:///nosuchfile.shlexec", NULL, NULL, NULL); if (rc > 32) { win_skip("shell32 is too old (likely < 4.72). Skipping the file URL tests\n"); @@ -1769,37 +1853,23 @@ } if (test->flags & URL_SUCCESS) { - if ((test->todo & 0x1) == 0) - ok(rc > 32, "%s failed: bad rc=%lu\n", shell_call, rc); - else todo_wine - ok(rc > 32, "%s failed: bad rc=%lu\n", shell_call, rc); + todo_wine_if(test->todo & 0x1) + okShell(rc > 32, "failed: bad rc=%lu\n", rc); } else { - if ((test->todo & 0x1) == 0) - ok(rc == SE_ERR_FNF || rc == SE_ERR_PNF || - broken(rc == SE_ERR_ACCESSDENIED) /* win2000 */, - "%s failed: bad rc=%lu\n", shell_call, rc); - else todo_wine - ok(rc == SE_ERR_FNF || rc == SE_ERR_PNF || - broken(rc == SE_ERR_ACCESSDENIED) /* win2000 */, - "%s failed: bad rc=%lu\n", shell_call, rc); + todo_wine_if(test->todo & 0x1) + okShell(rc == SE_ERR_FNF || rc == SE_ERR_PNF || + broken(rc == SE_ERR_ACCESSDENIED) /* win2000 */, + "failed: bad rc=%lu\n", rc); } if (rc == 33) { - if ((test->todo & 0x2) == 0) + todo_wine_if(test->todo & 0x2) okChildInt("argcA", 5); - else todo_wine - okChildInt("argcA", 5); - - if ((test->todo & 0x4) == 0) + todo_wine_if(test->todo & 0x4) okChildString("argvA3", "Open"); - else todo_wine - okChildString("argvA3", "Open"); - - if ((test->todo & 0x8) == 0) - okChildPath("argvA4", filename); - else todo_wine + todo_wine_if(test->todo & 0x8) okChildPath("argvA4", filename); } test++; @@ -1922,30 +1992,17 @@ rc=(INT_PTR)FindExecutableA(filename, NULL, command); if (rc > 32) rc=33; - if ((test->todo & 0x10)==0) - { + todo_wine_if(test->todo & 0x10) ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); - } - else todo_wine - { - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); - } if (rc > 32) { BOOL equal; equal=strcmp(command, argv0) == 0 || /* NT4 returns an extra 0x8 character! */ (strlen(command) == strlen(argv0)+1 && strncmp(command, argv0, strlen(argv0)) == 0); - if ((test->todo & 0x20)==0) - { + todo_wine_if(test->todo & 0x20) ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n", filename, command, argv0); - } - else todo_wine - { - ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n", - filename, command, argv0); - } } test++; } @@ -1982,7 +2039,7 @@ /* Should open through our association */ sprintf(filename, "%s\\test_shortcut_shlexec.lnk", tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); + okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); sprintf(params, "%s\\test file.shlexec", tmpdir); @@ -1990,7 +2047,7 @@ okChildPath("argvA4", filename); todo_wait rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_DOENVSUBST, NULL, "%TMPDIR%\\test_shortcut_shlexec.lnk", NULL, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); + okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); okChildInt("argcA", 5); todo_wine okChildString("argvA3", "Open"); sprintf(params, "%s\\test file.shlexec", tmpdir); @@ -2001,15 +2058,19 @@ /* Should just run our executable */ sprintf(filename, "%s\\test_shortcut_exe.lnk", tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); + okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); okChildInt("argcA", 4); okChildString("argvA3", "Lnk"); - /* Lnk's ContextMenuHandler has priority over an explicit class */ - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, "shlexec.shlexec"); - ok(rc > 32, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); - okChildInt("argcA", 4); - okChildString("argvA3", "Lnk"); + if (!skip_shlexec_tests) + { + /* An explicit class overrides lnk's ContextMenuHandler */ + rc=shell_execute_ex(SEE_MASK_CLASSNAME | SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, "shlexec.shlexec"); + okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okChildInt("argcA", 5); + okChildString("argvA3", "Open"); + okChildPath("argvA4", filename); + } if (dllver.dwMajorVersion>=6) { @@ -2026,8 +2087,7 @@ c++; } rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu err=%u\n", shell_call, rc, - GetLastError()); + okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); okChildInt("argcA", 4); okChildString("argvA3", "Lnk"); } @@ -2043,43 +2103,16 @@ NULL, NULL); if (rc > 32) rc=33; - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc, "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc, "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } + todo_wine_if(test->todo & 0x1) + okShell(rc==test->rc, "failed: rc=%lu err=%u\n", rc, GetLastError()); if (rc==0) { - if ((test->todo & 0x2)==0) - { + todo_wine_if(test->todo & 0x2) okChildInt("argcA", 5); - } - else - { - okChildInt("argcA", 5); - } - if ((test->todo & 0x4)==0) - { + todo_wine_if(test->todo & 0x4) okChildString("argvA3", "Lnk"); - } - else todo_wine - { - okChildString("argvA3", "Lnk"); - } sprintf(params, test->basename, tmpdir); - if ((test->todo & 0x8)==0) - { - okChildPath("argvA4", params); - } - else - { - okChildPath("argvA4", params); - } + okChildPath("argvA4", params); } test++; } @@ -2097,7 +2130,7 @@ /* We need NOZONECHECKS on Win2003 to block a dialog */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, NULL, NULL); - ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); @@ -2108,7 +2141,7 @@ { rc=shell_execute(NULL, filename, params, NULL); todo_wine { - ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%lu\n", shell_call, rc); + okShell(rc==SE_ERR_NOASSOC, "returned %lu\n", rc); } } } @@ -2120,11 +2153,28 @@ /* test combining executable and parameters */ sprintf(filename, "%s shlexec \"%s\" Exec", argv0, child_file); rc = shell_execute(NULL, filename, NULL, NULL); - ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); sprintf(filename, "\"%s\" shlexec \"%s\" Exec", argv0, child_file); rc = shell_execute(NULL, filename, NULL, NULL); - ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + + /* A verb, even if invalid, overrides the normal handling of executables */ + todo_wait rc = shell_execute_ex(SEE_MASK_FLAG_NO_UI, + "notaverb", argv0, NULL, NULL, NULL); + todo_wine okShell(rc == SE_ERR_NOASSOC, "returned %lu\n", rc); + + if (!skip_shlexec_tests) + { + /* A class overrides the normal handling of executables too */ + /* FIXME SEE_MASK_FLAG_NO_UI is only needed due to Wine's bug */ + rc = shell_execute_ex(SEE_MASK_CLASSNAME | SEE_MASK_FLAG_NO_UI, + NULL, argv0, NULL, NULL, ".shlexec"); + todo_wine okShell(rc > 32, "returned %lu\n", rc); + okChildInt("argcA", 5); + todo_wine okChildString("argvA3", "Open"); + todo_wine okChildPath("argvA4", argv0); + } } typedef struct @@ -2143,32 +2193,37 @@ { /* Test passing and not passing command-line * argument, no DDE */ - {"", NULL, NULL, NULL, NULL, FALSE, ""}, - {"\"%1\"", NULL, NULL, NULL, NULL, TRUE, ""}, + {"", NULL, NULL, NULL, NULL, 0, ""}, + {"\"%1\"", NULL, NULL, NULL, NULL, 1, ""}, /* Test passing and not passing command-line * argument, with DDE */ - {"", "[open(\"%1\")]", "shlexec", "dde", NULL, FALSE, "[open(\"%s\")]"}, - {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, TRUE, "[open(\"%s\")]"}, + {"", "[open(\"%1\")]", "shlexec", "dde", NULL, 0, "[open(\"%s\")]"}, + {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, 1, "[open(\"%s\")]"}, /* Test unquoted %1 in command and ddeexec * (test filename has space) */ {"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", TRUE /* before vista */}, /* Test ifexec precedence over ddeexec */ - {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]"}, + {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", 0, "[ifexec(\"%s\")]"}, /* Test default DDE topic */ - {"", "[open(\"%1\")]", "shlexec", NULL, NULL, FALSE, "[open(\"%s\")]"}, + {"", "[open(\"%1\")]", "shlexec", NULL, NULL, 0, "[open(\"%s\")]"}, /* Test default DDE application */ - {"", "[open(\"%1\")]", NULL, "dde", NULL, FALSE, "[open(\"%s\")]"}, + {"", "[open(\"%1\")]", NULL, "dde", NULL, 0, "[open(\"%s\")]"}, {NULL} }; +static int waitforinputidle_count; static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout) { + waitforinputidle_count++; + if (winetest_debug > 1) + trace("WaitForInputIdle() waiting for dde event timeout=min(%u,5s)\n", timeout); + timeout = timeout < 5000 ? timeout : 5000; return WaitForSingleObject(dde_ready_event, timeout); } @@ -2187,6 +2242,7 @@ PIMAGE_NT_HEADERS nt_headers; DWORD import_directory_rva; PIMAGE_IMPORT_DESCRIPTOR import_descriptor; + int hook_count = 0; base = (char *) GetModuleHandleA("shell32.dll"); nt_headers = (PIMAGE_NT_HEADERS)(base + ((PIMAGE_DOS_HEADER) base)->e_lfanew); @@ -2224,6 +2280,9 @@ VirtualProtect(&iat_entry->u1.Function, sizeof(ULONG_PTR), PAGE_READWRITE, &old_prot); iat_entry->u1.Function = (ULONG_PTR) new_func; VirtualProtect(&iat_entry->u1.Function, sizeof(ULONG_PTR), old_prot, &old_prot); + if (winetest_debug > 1) + trace("Hooked %s.WaitForInputIdle\n", import_module_name); + hook_count++; break; } } @@ -2235,6 +2294,7 @@ import_descriptor++; } + ok(hook_count, "Could not hook WaitForInputIdle()\n"); } static void test_dde(void) @@ -2245,6 +2305,7 @@ INT_PTR rc; HANDLE map; char *shared_block; + DWORD ddeflags; hook_WaitForInputIdle(hooked_WaitForInputIdle); @@ -2258,6 +2319,7 @@ 4096, "winetest_shlexec_dde_map"); shared_block = MapViewOfFile(map, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 4096); + ddeflags = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI; test = dde_tests; while (test->command) { @@ -2281,10 +2343,33 @@ } ddeExec[0] = 0; - dde_ready_event = CreateEventA(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); - rc = shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, filename, NULL, NULL, NULL); + waitforinputidle_count = 0; + dde_ready_event = CreateEventA(NULL, TRUE, FALSE, "winetest_shlexec_dde_ready"); + rc = shell_execute_ex(ddeflags, NULL, filename, NULL, NULL, NULL); CloseHandle(dde_ready_event); - ok(32 < rc, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); + if (!(ddeflags & SEE_MASK_WAITFORINPUTIDLE) && rc == SE_ERR_DDEFAIL && + GetLastError() == ERROR_FILE_NOT_FOUND && + strcmp(winetest_platform, "windows") == 0) + { + /* Windows 10 does not call WaitForInputIdle() for DDE which creates + * a race condition as the DDE server may not have time to start up. + * When that happens the test fails with the above results and we + * compensate by forcing the WaitForInputIdle() call. + */ + trace("Adding SEE_MASK_WAITFORINPUTIDLE for Windows 10\n"); + ddeflags |= SEE_MASK_WAITFORINPUTIDLE; + delete_test_association(".sde"); + Sleep(CHILD_DDE_TIMEOUT); + continue; + } + okShell(32 < rc, "failed: rc=%lu err=%u\n", rc, GetLastError()); + if (test->ddeexec) + okShell(waitforinputidle_count == 1 || + broken(waitforinputidle_count == 0) /* Win10 race */, + "WaitForInputIdle() was called %u times\n", + waitforinputidle_count); + else + okShell(waitforinputidle_count == 0, "WaitForInputIdle() was called %u times for a non-DDE case\n", waitforinputidle_count); if (32 < rc) { @@ -2298,6 +2383,7 @@ sprintf(params, test->expectedDdeExec, filename); okChildPath("ddeExec", params); } + reset_association_description(); delete_test_association(".sde"); test++; @@ -2308,7 +2394,7 @@ hook_WaitForInputIdle((void *) WaitForInputIdle); } -#define DDE_DEFAULT_APP_VARIANTS 2 +#define DDE_DEFAULT_APP_VARIANTS 3 typedef struct { const char* command; @@ -2319,42 +2405,44 @@ static dde_default_app_tests_t dde_default_app_tests[] = { - /* Windows XP and 98 handle default DDE app names in different ways. - * The application name we see in the first test determines the pattern - * of application names and return codes we will look for. */ + /* There are three possible sets of results: Windows <= 2000, XP SP1 and + * >= XP SP2. Use the first two tests to determine which results to expect. + */ /* Test unquoted existing filename with a space */ - {"%s\\test file.exe", {"test file", "test"}, 0x0, {33, 33}}, - {"%s\\test file.exe param", {"test file", "test"}, 0x0, {33, 33}}, + {"%s\\test file.exe", {"test file", "test file", "test"}, 0x0, {33, 33, 33}}, + {"%s\\test2 file.exe", {"test2", "", "test2"}, 0x0, {33, 5, 33}}, + + /* Test unquoted existing filename with a space */ + {"%s\\test file.exe param", {"test file", "test file", "test"}, 0x0, {33, 33, 33}}, /* Test quoted existing filename with a space */ - {"\"%s\\test file.exe\"", {"test file", "test file"}, 0x0, {33, 33}}, - {"\"%s\\test file.exe\" param", {"test file", "test file"}, 0x0, {33, 33}}, + {"\"%s\\test file.exe\"", {"test file", "test file", "test file"}, 0x0, {33, 33, 33}}, + {"\"%s\\test file.exe\" param", {"test file", "test file", "test file"}, 0x0, {33, 33, 33}}, /* Test unquoted filename with a space that doesn't exist, but * test2.exe does */ - {"%s\\test2 file.exe", {"test2", "test2"}, 0x0, {33, 33}}, - {"%s\\test2 file.exe param", {"test2", "test2"}, 0x0, {33, 33}}, + {"%s\\test2 file.exe param", {"test2", "", "test2"}, 0x0, {33, 5, 33}}, /* Test quoted filename with a space that does not exist */ - {"\"%s\\test2 file.exe\"", {"", "test2 file"}, 0x0, {5, 33}}, - {"\"%s\\test2 file.exe\" param", {"", "test2 file"}, 0x0, {5, 33}}, + {"\"%s\\test2 file.exe\"", {"", "", "test2 file"}, 0x0, {5, 2, 33}}, + {"\"%s\\test2 file.exe\" param", {"", "", "test2 file"}, 0x0, {5, 2, 33}}, /* Test filename supplied without the extension */ - {"%s\\test2", {"test2", "test2"}, 0x0, {33, 33}}, - {"%s\\test2 param", {"test2", "test2"}, 0x0, {33, 33}}, + {"%s\\test2", {"test2", "", "test2"}, 0x0, {33, 5, 33}}, + {"%s\\test2 param", {"test2", "", "test2"}, 0x0, {33, 5, 33}}, /* Test an unquoted nonexistent filename */ - {"%s\\notexist.exe", {"", "notexist"}, 0x0, {5, 33}}, - {"%s\\notexist.exe param", {"", "notexist"}, 0x0, {5, 33}}, + {"%s\\notexist.exe", {"", "", "notexist"}, 0x0, {5, 2, 33}}, + {"%s\\notexist.exe param", {"", "", "notexist"}, 0x0, {5, 2, 33}}, /* Test an application that will be found on the path */ - {"cmd", {"cmd", "cmd"}, 0x0, {33, 33}}, - {"cmd param", {"cmd", "cmd"}, 0x0, {33, 33}}, + {"cmd", {"cmd", "cmd", "cmd"}, 0x0, {33, 33, 33}}, + {"cmd param", {"cmd", "cmd", "cmd"}, 0x0, {33, 33, 33}}, /* Test an application that will not be found on the path */ - {"xyzwxyzwxyz", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, - {"xyzwxyzwxyz param", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, + {"xyzwxyzwxyz", {"", "", "xyzwxyzwxyz"}, 0x0, {5, 2, 33}}, + {"xyzwxyzwxyz param", {"", "", "xyzwxyzwxyz"}, 0x0, {5, 2, 33}}, {NULL, {NULL}, 0, {0}} }; @@ -2431,47 +2519,36 @@ while (GetMessageA(&msg, NULL, 0, 0)) DispatchMessageA(&msg); rc = msg.wParam > 32 ? 33 : msg.wParam; - /* First test, find which set of test data we expect to see */ - if (test == dde_default_app_tests) - { - int i; - for (i=0; i<DDE_DEFAULT_APP_VARIANTS; i++) + /* The first two tests determine which set of results to expect. + * First check the platform as only the first set of results is + * acceptable for Wine. + */ + if (strcmp(winetest_platform, "wine")) + { + if (test == dde_default_app_tests) { - if (!strcmp(ddeApplication, test->expectedDdeApplication[i])) - { - which = i; - break; - } + if (strcmp(ddeApplication, test->expectedDdeApplication[0])) + which = 2; } - if (i == DDE_DEFAULT_APP_VARIANTS) - skip("Default DDE application test does not match any available results, using first expected data set.\n"); - } - - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc[which], "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc[which], "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } + else if (test == dde_default_app_tests + 1) + { + if (which == 0 && rc == test->rc[1]) + which = 1; + trace("DDE result variant %d\n", which); + } + } + + todo_wine_if(test->todo & 0x1) + okShell(rc==test->rc[which], "failed: rc=%lu err=%u\n", + rc, GetLastError()); if (rc == 33) { - if ((test->todo & 0x2)==0) - { + todo_wine_if(test->todo & 0x2) ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), "Expected application '%s', got '%s'\n", test->expectedDdeApplication[which], ddeApplication); - } - else todo_wine - { - ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), - "Expected application '%s', got '%s'\n", - test->expectedDdeApplication[which], ddeApplication); - } - } + } + reset_association_description(); delete_test_association(".sde"); test++; @@ -2606,6 +2683,9 @@ create_test_verb(".shlexec", "QuotedLowerL", 0, "QuotedLowerL \"%l\""); create_test_verb(".shlexec", "UpperL", 0, "UpperL %L"); create_test_verb(".shlexec", "QuotedUpperL", 0, "QuotedUpperL \"%L\""); + + /* Set an environment variable to see if it is inherited */ + SetEnvironmentVariableA("ShlexecVar", "Present"); } static void cleanup_test(void) @@ -2650,7 +2730,7 @@ SetCurrentDirectoryA(tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, NULL, NULL); - ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); todo_wine okChildPath("longPath", path); @@ -2658,12 +2738,12 @@ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, NULL, NULL); - ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); /* Explicitly specify the directory to use */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, tmpdir, NULL); - ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); todo_wine okChildPath("longPath", path); @@ -2671,11 +2751,11 @@ /* Specify it through an environment variable */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, "%TMPDIR%", NULL); - todo_wine ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); rc=shell_execute_ex(SEE_MASK_DOENVSUBST|SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, "%TMPDIR%", NULL); - ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); todo_wine okChildPath("longPath", path); @@ -2684,7 +2764,7 @@ sprintf(dirpath, "%s:%s", curdir, tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, dirpath, NULL); - ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); } START_TEST(shlexec) @@ -2694,7 +2774,8 @@ if (myARGC >= 3) { doChild(myARGC, myARGV); - exit(0); + /* Skip the tests/failures trace for child processes */ + ExitProcess(winetest_get_failures()); } init_test(); Modified: trunk/rostests/winetests/shell32/shlfolder.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlfold…
============================================================================== --- trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] Wed Mar 9 08:43:20 2016 @@ -388,6 +388,14 @@ SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM, SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM, }; + static const ULONG full_attrs[5] = + { + SFGAO_CAPABILITYMASK | SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR, + SFGAO_CAPABILITYMASK | SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR, + SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM, + SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM, + SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM, + }; hr = IShellFolder_EnumObjects(iFolder, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &iEnumList); ok(hr == S_OK, "EnumObjects failed %08x\n", hr); @@ -440,6 +448,11 @@ ok(flags == attrs[i] || flags == (attrs[i] & ~SFGAO_FILESYSANCESTOR), /* Win9x, NT4 */ "GetAttributesOf[%i] got %08x, expected %08x\n", i, flags, attrs[i]); + + flags = ~0u; + hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); + ok(hr == S_OK, "GetAttributesOf returns %08x\n", hr); + ok((flags & ~SFGAO_HASSUBFOLDER) == full_attrs[i], "%d: got %08x expected %08x\n", i, flags, full_attrs[i]); } for (i=0;i<5;i++) @@ -1889,14 +1902,14 @@ if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES, 0, SHGFP_TYPE_CURRENT, path ); - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILESX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); if (hr == E_FAIL) { win_skip( "Program Files (x86) not supported\n" ); return; } - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); if (is_win64) { ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); @@ -1924,14 +1937,14 @@ } hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMON, 0, SHGFP_TYPE_CURRENT, path ); - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMONX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); if (hr == E_FAIL) { win_skip( "Common Files (x86) not supported\n" ); return; } - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); if (is_win64) { ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); @@ -5256,6 +5269,63 @@ IShellFolder_Release(desktop); } +static void test_DataObject(void) +{ + IShellFolder *desktop; + IDataObject *data_obj; + HRESULT hres; + IEnumIDList *peidl; + LPITEMIDLIST apidl; + FORMATETC fmt; + DWORD cf_shellidlist; + STGMEDIUM medium; + + SHGetDesktopFolder(&desktop); + + hres = IShellFolder_EnumObjects(desktop, NULL, + SHCONTF_NONFOLDERS|SHCONTF_FOLDERS|SHCONTF_INCLUDEHIDDEN, &peidl); + ok(hres == S_OK, "got %x\n", hres); + + if(IEnumIDList_Next(peidl, 1, &apidl, NULL) != S_OK) { + skip("no files on desktop - skipping GetDataObject tests\n"); + IEnumIDList_Release(peidl); + IShellFolder_Release(desktop); + return; + } + IEnumIDList_Release(peidl); + + hres = IShellFolder_GetUIObjectOf(desktop, NULL, 1, (LPCITEMIDLIST*)&apidl, + &IID_IDataObject, NULL, (void**)&data_obj); + ok(hres == S_OK, "got %x\n", hres); + pILFree(apidl); + IShellFolder_Release(desktop); + + cf_shellidlist = RegisterClipboardFormatW(CFSTR_SHELLIDLISTW); + fmt.cfFormat = cf_shellidlist; + fmt.ptd = NULL; + fmt.dwAspect = DVASPECT_CONTENT; + fmt.lindex = -1; + fmt.tymed = TYMED_HGLOBAL; + hres = IDataObject_QueryGetData(data_obj, &fmt); + ok(hres == S_OK, "got %x\n", hres); + + fmt.tymed = TYMED_HGLOBAL | TYMED_ISTREAM; + hres = IDataObject_QueryGetData(data_obj, &fmt); + ok(hres == S_OK, "got %x\n", hres); + + fmt.tymed = TYMED_ISTREAM; + hres = IDataObject_QueryGetData(data_obj, &fmt); + todo_wine ok(hres == S_FALSE, "got %x\n", hres); + + fmt.tymed = TYMED_HGLOBAL | TYMED_ISTREAM; + hres = IDataObject_GetData(data_obj, &fmt, &medium); + ok(hres == S_OK, "got %x\n", hres); + ok(medium.tymed == TYMED_HGLOBAL, "medium.tymed = %x\n", medium.tymed); + ReleaseStgMedium(&medium); + + IDataObject_Release(data_obj); +} + START_TEST(shlfolder) { init_function_pointers(); @@ -5296,6 +5366,7 @@ test_SHCreateDefaultContextMenu(); test_SHCreateShellFolderView(); test_SHCreateShellFolderViewEx(); + test_DataObject(); OleUninitialize(); }
8 years, 9 months
1
0
0
0
[akhaldi] 70976: [MSVCRT_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Mar 9 08:36:59 2016 New Revision: 70976 URL:
http://svn.reactos.org/svn/reactos?rev=70976&view=rev
Log: [MSVCRT_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/msvcrt/cpp.c trunk/rostests/winetests/msvcrt/locale.c trunk/rostests/winetests/msvcrt/misc.c trunk/rostests/winetests/msvcrt/scanf.c Modified: trunk/rostests/winetests/msvcrt/cpp.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/cpp.c?re…
============================================================================== --- trunk/rostests/winetests/msvcrt/cpp.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/cpp.c [iso-8859-1] Wed Mar 9 08:36:59 2016 @@ -146,7 +146,7 @@ } #define call_func1(func,_this) call_thiscall_func1(func,_this) -#define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)a) +#define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)(a)) #else @@ -452,8 +452,7 @@ { /* Check the rtti */ type_info *ti = p__RTtypeid(&e); - ok (ti && ti->mangled && - !strcmp(ti->mangled, ".?AVexception@@"), "bad rtti for e\n"); + ok (ti && !strcmp(ti->mangled, ".?AVexception@@"), "bad rtti for e\n"); if (ti) { @@ -1036,15 +1035,13 @@ child_class_sig0_rtti.object_locator.type_hierarchy = RTTI_REF_SIG0(child_class_sig0_rtti, object_hierarchy, base); ti = p__RTtypeid(&simple_class_sig0); - ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), - "incorrect rtti data\n"); + ok (ti && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n"); casted = p__RTCastToVoid(&simple_class_sig0); ok (casted == (void*)&simple_class_sig0, "failed cast to void\n"); ti = p__RTtypeid(&child_class_sig0); - ok (ti && ti->mangled && !strcmp(ti->mangled, "child_class"), - "incorrect rtti data\n"); + ok (ti && !strcmp(ti->mangled, "child_class"), "incorrect rtti data\n"); casted = p__RTCastToVoid(&child_class_sig0); ok (casted == (void*)&child_class_sig0, "failed cast to void\n"); @@ -1064,15 +1061,13 @@ } ti = p__RTtypeid(&simple_class); - ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), - "incorrect rtti data\n"); + ok (ti && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n"); casted = p__RTCastToVoid(&simple_class); ok (casted == (void*)&simple_class, "failed cast to void\n"); ti = p__RTtypeid(&child_class); - ok (ti && ti->mangled && !strcmp(ti->mangled, "child_class"), - "incorrect rtti data\n"); + ok (ti && !strcmp(ti->mangled, "child_class"), "incorrect rtti data\n"); casted = p__RTCastToVoid(&child_class); ok (casted == (void*)&child_class, "failed cast to void\n"); @@ -1323,6 +1318,11 @@ /* 128 */ {"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", "class std::complex<float> & std::operator*=(class std::complex<float> &,class std::complex<float> const &)", "??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", 2}, +/* 129 */ {"??$run@XVTask_Render_Preview@@@QtConcurrent@@YA?AV?$QFuture@X@@PEAVTask_Render_Preview@@P82@EAAXXZ@Z", + "class QFuture<void> __cdecl QtConcurrent::run<void,class Task_Render_Preview>(class Task_Render_Preview * __ptr64,void (__cdecl Task_Render_Preview::*)(void) __ptr64)", + "??$run@XVTask_Render_Preview@@@QtConcurrent@@YA?AV?$QFuture@X@@PEAVTask_Render_Preview@@P82@EAAXXZ@Z"}, +/* 130 */ {"??_E?$TStrArray@$$BY0BAA@D$0BA@@@UAEPAXI@Z", + "public: virtual void * __thiscall TStrArray<char [256],16>::`vector deleting destructor'(unsigned int)"}, }; int i, num_test = (sizeof(test)/sizeof(test[0])); char* name; Modified: trunk/rostests/winetests/msvcrt/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/locale.c…
============================================================================== --- trunk/rostests/winetests/msvcrt/locale.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/locale.c [iso-8859-1] Wed Mar 9 08:36:59 2016 @@ -148,11 +148,11 @@ ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); if(ret) { + trace("Chinese_China.936=%s\n", ret); todo_wine - ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") - || !strcmp(ret, "Chinese (Simplified)_China.936") + ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") /* Vista - Win7 */ + || !strcmp(ret, "Chinese (Simplified)_China.936") /* Win8 - Win10 */ || broken(!strcmp(ret, "Chinese_People's Republic of China.936")), "ret = %s\n", ret); - trace("ret is %s\n", ret); } ret = setlocale(LC_ALL, "csy"); @@ -450,33 +450,39 @@ ret = setlocale(LC_ALL, "non"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); if(ret) - ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252") + ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252") /* XP - Win10 */ || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252") || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")) - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); + || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */ + "ret = %s\n", ret); ret = setlocale(LC_ALL, "nor"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); if(ret) - ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") + ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") /* XP - Win8 */ + || !strcmp(ret, "Norwegian Bokm\xe5l_Norway.1252") /* Win10 */ || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); + || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */ + "ret = %s\n", ret); ret = setlocale(LC_ALL, "norwegian-bokmal"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); if(ret) - ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") + ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") /* XP - Win8 */ + || !strcmp(ret, "Norwegian Bokm\xe5l_Norway.1252") /* Win10 */ || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); + || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */ + "ret = %s\n", ret); ret = setlocale(LC_ALL, "norwegian-nynorsk"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); if(ret) - ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252") + ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252") /* Vista - Win10 */ || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")) + || broken(!strcmp(ret, "Norwegian_Norway.1252")) /* WinME */ || broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252")) - || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")), "ret = %s\n", ret); + || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")) /* XP & 2003 */, + "ret = %s\n", ret); ret = setlocale(LC_ALL, "plk"); ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); @@ -671,12 +677,12 @@ return; ret = _Gettnames(); - size = ret->data-(char*)ret; + size = ret->str[0]-(char*)ret; /* Newer version of the structure stores both ascii and unicode strings. * Unicode strings are only initialized on Windows 7 */ if(sizeof(void*) == 8) - ok(size==0x2c0 || broken(size==0x170), "structure size: %x\n", size); + ok(size==0x2c0 || broken(size==0x168), "structure size: %x\n", size); else ok(size==0x164 || broken(size==0xb8), "structure size: %x\n", size); Modified: trunk/rostests/winetests/msvcrt/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/misc.c?r…
============================================================================== --- trunk/rostests/winetests/msvcrt/misc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/misc.c [iso-8859-1] Wed Mar 9 08:36:59 2016 @@ -18,10 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/test.h" +#include <wine/test.h> #include <errno.h> #include <stdio.h> -#include "msvcrt.h" +#include <msvcrt.h> +#include <process.h> static inline float __port_infinity(void) { @@ -262,7 +263,7 @@ out = 0xdeadbeef; ret = p_get_doserrno(&out); ok(ret == 0, "Expected _get_doserrno to return 0, got %d\n", ret); - ok(out == ERROR_INVALID_CMM, "Expected output variable to be ERROR_INVAID_CMM, got %d\n", out); + ok(out == ERROR_INVALID_CMM, "Expected output variable to be ERROR_INVALID_CMM, got %d\n", out); } static void test__get_errno(void) @@ -539,6 +540,66 @@ ok(errno == 0xdeadbeef, "errno = %d\n", errno); } +static void __cdecl test_thread_func(void *end_thread_type) +{ + if (end_thread_type == (void*)1) + _endthread(); + else if (end_thread_type == (void*)2) + ExitThread(0); + else if (end_thread_type == (void*)3) + _endthreadex(0); +} + +static unsigned __stdcall test_thread_func_ex(void *arg) +{ + _endthread(); + return 0; +} + +static void test_thread_handle_close(void) +{ + HANDLE hThread; + DWORD ret; + + /* _beginthread: handle is not closed on ExitThread and _endthreadex */ + hThread = (HANDLE)_beginthread(test_thread_func, 0, (void*)0); + ok(hThread != INVALID_HANDLE_VALUE, "_beginthread failed (%d)\n", errno); + WaitForSingleObject(hThread, INFINITE); + ret = CloseHandle(hThread); + ok(!ret, "ret = %d\n", ret); + + hThread = (HANDLE)_beginthread(test_thread_func, 0, (void*)1); + ok(hThread != INVALID_HANDLE_VALUE, "_beginthread failed (%d)\n", errno); + WaitForSingleObject(hThread, INFINITE); + ret = CloseHandle(hThread); + ok(!ret, "ret = %d\n", ret); + + hThread = (HANDLE)_beginthread(test_thread_func, 0, (void*)2); + ok(hThread != INVALID_HANDLE_VALUE, "_beginthread failed (%d)\n", errno); + Sleep(150); + ret = WaitForSingleObject(hThread, INFINITE); + ok(ret == WAIT_OBJECT_0, "ret = %d\n", ret); + ret = CloseHandle(hThread); + ok(ret, "ret = %d\n", ret); + + hThread = (HANDLE)_beginthread(test_thread_func, 0, (void*)3); + ok(hThread != INVALID_HANDLE_VALUE, "_beginthread failed (%d)\n", errno); + Sleep(150); + ret = WaitForSingleObject(hThread, INFINITE); + ok(ret == WAIT_OBJECT_0, "ret = %d\n", ret); + ret = CloseHandle(hThread); + ok(ret, "ret = %d\n", ret); + + /* _beginthreadex: handle is not closed on _endthread */ + hThread = (HANDLE)_beginthreadex(NULL,0, test_thread_func_ex, NULL, 0, NULL); + ok(hThread != NULL, "_beginthreadex failed (%d)\n", errno); + Sleep(150); + ret = WaitForSingleObject(hThread, INFINITE); + ok(ret == WAIT_OBJECT_0, "ret = %d\n", ret); + ret = CloseHandle(hThread); + ok(ret, "ret = %d\n", ret); +} + START_TEST(misc) { int arg_c; @@ -567,4 +628,5 @@ test__invalid_parameter(); test_qsort_s(); test_math_functions(); -} + test_thread_handle_close(); +} Modified: trunk/rostests/winetests/msvcrt/scanf.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/scanf.c?…
============================================================================== --- trunk/rostests/winetests/msvcrt/scanf.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/scanf.c [iso-8859-1] Wed Mar 9 08:36:59 2016 @@ -165,7 +165,7 @@ ret = sscanf(buffer, "%lld", &result64); ok(ret == 1, "Wrong number of arguments read: %d\n", ret); ret = sprintf(buffer1, "%lld", result64); - ok(ret==14 || broken(ret==10), "sprintf retuned %d\n", ret); + ok(ret==14 || broken(ret==10), "sprintf returned %d\n", ret); if(ret == 14) ok(!strcmp(buffer, buffer1), "got %s, expected %s\n", buffer1, buffer); @@ -244,6 +244,13 @@ ret = sscanf(buffer, "%d:%d%n", &hour, &min, &number_so_far); ok(ret == 2, "Wrong number of arguments read: %d\n", ret); ok(number_so_far == 4, "%%n yielded wrong result: %d\n", number_so_far); + + buffer[0] = 0; + buffer1[0] = 0; + ret = sscanf("test=value\xda", "%[^=] = %[^;]", buffer, buffer1); + ok(ret == 2, "got %d\n", ret); + ok(!strcmp(buffer, "test"), "buf %s\n", buffer); + ok(!strcmp(buffer1, "value\xda"), "buf %s\n", buffer1); } static void test_sscanf_s(void)
8 years, 9 months
1
0
0
0
[akhaldi] 70975: [IMM32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Mar 9 08:32:48 2016 New Revision: 70975 URL:
http://svn.reactos.org/svn/reactos?rev=70975&view=rev
Log: [IMM32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/imm32/imm32.c Modified: trunk/rostests/winetests/imm32/imm32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/imm32/imm32.c?r…
============================================================================== --- trunk/rostests/winetests/imm32/imm32.c [iso-8859-1] (original) +++ trunk/rostests/winetests/imm32/imm32.c [iso-8859-1] Wed Mar 9 08:32:48 2016 @@ -416,6 +416,7 @@ HWND hwnd; HANDLE event; HIMC himc; + HIMC u_himc; } igc_threadinfo; @@ -424,16 +425,19 @@ HIMC h1,h2; HWND hwnd2; COMPOSITIONFORM cf; + CANDIDATEFORM cdf; POINT pt; + MSG msg; + igc_threadinfo *info= (igc_threadinfo*)lpParam; info->hwnd = CreateWindowExA(WS_EX_CLIENTEDGE, wndcls, "Wine imm32.dll test", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 240, 120, NULL, NULL, GetModuleHandleW(NULL), NULL); h1 = ImmGetContext(hwnd); - todo_wine ok(info->himc == h1, "hwnd context changed in new thread\n"); + ok(info->himc == h1, "hwnd context changed in new thread\n"); h2 = ImmGetContext(info->hwnd); - todo_wine ok(h2 != h1, "new hwnd in new thread should have different context\n"); + ok(h2 != h1, "new hwnd in new thread should have different context\n"); info->himc = h2; ImmReleaseContext(hwnd,h1); @@ -450,9 +454,21 @@ /* priming for later tests */ ImmSetCompositionWindow(h1, &cf); ImmSetStatusWindowPos(h1, &pt); + info->u_himc = ImmCreateContext(); + ImmSetOpenStatus(info->u_himc, TRUE); + cdf.dwIndex = 0; + cdf.dwStyle = CFS_CANDIDATEPOS; + cdf.ptCurrentPos.x = 0; + cdf.ptCurrentPos.y = 0; + ImmSetCandidateWindow(info->u_himc, &cdf); SetEvent(info->event); - Sleep(INFINITE); + + while(GetMessageW(&msg, 0, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } return 1; } @@ -477,18 +493,26 @@ otherHimc = ImmGetContext(threadinfo.hwnd); - todo_wine ok(himc != otherHimc, "Windows from other threads should have different himc\n"); - todo_wine ok(otherHimc == threadinfo.himc, "Context from other thread should not change in main thread\n"); - - if (0) /* FIXME: Causes wine to hang */ - { + ok(himc != otherHimc, "Windows from other threads should have different himc\n"); + ok(otherHimc == threadinfo.himc, "Context from other thread should not change in main thread\n"); + h1 = ImmAssociateContext(hwnd,otherHimc); ok(h1 == NULL, "Should fail to be able to Associate a default context from a different thread\n"); h1 = ImmGetContext(hwnd); ok(h1 == himc, "Context for window should remain unchanged\n"); ImmReleaseContext(hwnd,h1); - } - + + h1 = ImmAssociateContext(hwnd, threadinfo.u_himc); + ok (h1 == NULL, "Should fail to associate a context from a different thread\n"); + h1 = ImmGetContext(hwnd); + ok(h1 == himc, "Context for window should remain unchanged\n"); + ImmReleaseContext(hwnd,h1); + + h1 = ImmAssociateContext(threadinfo.hwnd, threadinfo.u_himc); + ok (h1 == NULL, "Should fail to associate a context from a different thread into a window from that thread.\n"); + h1 = ImmGetContext(threadinfo.hwnd); + ok(h1 == threadinfo.himc, "Context for window should remain unchanged\n"); + ImmReleaseContext(threadinfo.hwnd,h1); /* OpenStatus */ rc = ImmSetOpenStatus(himc, TRUE); @@ -501,11 +525,15 @@ ok(rc == 0, "ImmGetOpenStatus failed\n"); rc = ImmSetOpenStatus(otherHimc, TRUE); - todo_wine ok(rc == 0, "ImmSetOpenStatus should fail\n"); + ok(rc == 0, "ImmSetOpenStatus should fail\n"); + rc = ImmSetOpenStatus(threadinfo.u_himc, TRUE); + ok(rc == 0, "ImmSetOpenStatus should fail\n"); rc = ImmGetOpenStatus(otherHimc); - todo_wine ok(rc == 0, "ImmGetOpenStatus failed\n"); + ok(rc == 0, "ImmGetOpenStatus failed\n"); + rc = ImmGetOpenStatus(threadinfo.u_himc); + ok (rc == 1 || broken(rc == 0), "ImmGetOpenStatus should return 1\n"); rc = ImmSetOpenStatus(otherHimc, FALSE); - todo_wine ok(rc == 0, "ImmSetOpenStatus should fail\n"); + ok(rc == 0, "ImmSetOpenStatus should fail\n"); rc = ImmGetOpenStatus(otherHimc); ok(rc == 0, "ImmGetOpenStatus failed\n"); @@ -517,8 +545,12 @@ rc = ImmGetCompositionFontA(otherHimc, &lf); ok(rc != 0 || broken(rc == 0), "ImmGetCompositionFont failed\n"); + rc = ImmGetCompositionFontA(threadinfo.u_himc, &lf); + ok(rc != 0 || broken(rc == 0), "ImmGetCompositionFont user himc failed\n"); rc = ImmSetCompositionFontA(otherHimc, &lf); - todo_wine ok(rc == 0, "ImmSetCompositionFont should fail\n"); + ok(rc == 0, "ImmSetCompositionFont should fail\n"); + rc = ImmSetCompositionFontA(threadinfo.u_himc, &lf); + ok(rc == 0, "ImmSetCompositionFont should fail\n"); /* CompositionWindow */ rc = ImmSetCompositionWindow(himc, &cf); @@ -527,8 +559,12 @@ ok(rc != 0, "ImmGetCompositionWindow failed\n"); rc = ImmSetCompositionWindow(otherHimc, &cf); - todo_wine ok(rc == 0, "ImmSetCompositionWindow should fail\n"); + ok(rc == 0, "ImmSetCompositionWindow should fail\n"); + rc = ImmSetCompositionWindow(threadinfo.u_himc, &cf); + ok(rc == 0, "ImmSetCompositionWindow should fail\n"); rc = ImmGetCompositionWindow(otherHimc, &cf); + ok(rc != 0 || broken(rc == 0), "ImmGetCompositionWindow failed\n"); + rc = ImmGetCompositionWindow(threadinfo.u_himc, &cf); ok(rc != 0 || broken(rc == 0), "ImmGetCompositionWindow failed\n"); /* ConversionStatus */ @@ -539,8 +575,12 @@ rc = ImmGetConversionStatus(otherHimc, &status, &sentence); ok(rc != 0 || broken(rc == 0), "ImmGetConversionStatus failed\n"); + rc = ImmGetConversionStatus(threadinfo.u_himc, &status, &sentence); + ok(rc != 0 || broken(rc == 0), "ImmGetConversionStatus failed\n"); rc = ImmSetConversionStatus(otherHimc, status, sentence); - todo_wine ok(rc == 0, "ImmSetConversionStatus should fail\n"); + ok(rc == 0, "ImmSetConversionStatus should fail\n"); + rc = ImmSetConversionStatus(threadinfo.u_himc, status, sentence); + ok(rc == 0, "ImmSetConversionStatus should fail\n"); /* StatusWindowPos */ rc = ImmSetStatusWindowPos(himc, &pt); @@ -549,9 +589,25 @@ ok(rc != 0, "ImmGetStatusWindowPos failed\n"); rc = ImmSetStatusWindowPos(otherHimc, &pt); - todo_wine ok(rc == 0, "ImmSetStatusWindowPos should fail\n"); + ok(rc == 0, "ImmSetStatusWindowPos should fail\n"); + rc = ImmSetStatusWindowPos(threadinfo.u_himc, &pt); + ok(rc == 0, "ImmSetStatusWindowPos should fail\n"); rc = ImmGetStatusWindowPos(otherHimc, &pt); ok(rc != 0 || broken(rc == 0), "ImmGetStatusWindowPos failed\n"); + rc = ImmGetStatusWindowPos(threadinfo.u_himc, &pt); + ok(rc != 0 || broken(rc == 0), "ImmGetStatusWindowPos failed\n"); + + h1 = ImmAssociateContext(threadinfo.hwnd, NULL); + ok (h1 == otherHimc, "ImmAssociateContext cross thread with NULL should work\n"); + h1 = ImmGetContext(threadinfo.hwnd); + ok (h1 == NULL, "CrossThread window context should be NULL\n"); + h1 = ImmAssociateContext(threadinfo.hwnd, h1); + ok (h1 == NULL, "Resetting cross thread context should fail\n"); + h1 = ImmGetContext(threadinfo.hwnd); + ok (h1 == NULL, "CrossThread window context should still be NULL\n"); + + rc = ImmDestroyContext(threadinfo.u_himc); + ok (rc == 0, "ImmDestroyContext Cross Thread should fail\n"); /* Candidate Window */ rc = ImmGetCandidateWindow(himc, 0, &cdf); @@ -566,9 +622,13 @@ ok (rc == 1, "ImmGetCandidateWindow should succeed\n"); rc = ImmGetCandidateWindow(otherHimc, 0, &cdf); - todo_wine ok (rc == 0, "ImmGetCandidateWindow should fail\n"); + ok (rc == 0, "ImmGetCandidateWindow should fail\n"); rc = ImmSetCandidateWindow(otherHimc, &cdf); - todo_wine ok (rc == 0, "ImmSetCandidateWindow should fail\n"); + ok (rc == 0, "ImmSetCandidateWindow should fail\n"); + rc = ImmGetCandidateWindow(threadinfo.u_himc, 0, &cdf); + ok (rc == 1 || broken( rc == 0), "ImmGetCandidateWindow should succeed\n"); + rc = ImmSetCandidateWindow(threadinfo.u_himc, &cdf); + ok (rc == 0, "ImmSetCandidateWindow should fail\n"); ImmReleaseContext(threadinfo.hwnd,otherHimc); ImmReleaseContext(hwnd,himc); @@ -577,7 +637,7 @@ TerminateThread(hThread, 1); himc = ImmGetContext(GetDesktopWindow()); - todo_wine ok(himc == NULL, "Should not be able to get himc from other process window\n"); + ok(himc == NULL, "Should not be able to get himc from other process window\n"); } static void test_ImmIsUIMessage(void) @@ -607,6 +667,14 @@ { 0, FALSE } /* mark the end */ }; + UINT WM_MSIME_SERVICE = RegisterWindowMessageA("MSIMEService"); + UINT WM_MSIME_RECONVERTOPTIONS = RegisterWindowMessageA("MSIMEReconvertOptions"); + UINT WM_MSIME_MOUSE = RegisterWindowMessageA("MSIMEMouseOperation"); + UINT WM_MSIME_RECONVERTREQUEST = RegisterWindowMessageA("MSIMEReconvertRequest"); + UINT WM_MSIME_RECONVERT = RegisterWindowMessageA("MSIMEReconvert"); + UINT WM_MSIME_QUERYPOSITION = RegisterWindowMessageA("MSIMEQueryPosition"); + UINT WM_MSIME_DOCUMENTFEED = RegisterWindowMessageA("MSIMEDocumentFeed"); + const struct test *test; BOOL ret; @@ -626,6 +694,21 @@ else ok(!msg_spy_find_msg(test->msg), "Windows does not send 0x%x\n", test->msg); } + + ret = pImmIsUIMessageA(NULL, WM_MSIME_SERVICE, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_SERVICE\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERTOPTIONS, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTOPTIONS\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_MOUSE, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_MOUSE\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERTREQUEST, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTREQUEST\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERT, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERT\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_QUERYPOSITION, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_QUERYPOSITION\n"); + ret = pImmIsUIMessageA(NULL, WM_MSIME_DOCUMENTFEED, 0, 0); + ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_DOCUMENTFEED\n"); } static void test_ImmGetContext(void) @@ -699,10 +782,29 @@ UnloadKeyboardLayout(hkl); } +static LRESULT (WINAPI *old_imm_wnd_proc)(HWND, UINT, WPARAM, LPARAM); +static LRESULT WINAPI imm_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + ok(msg != WM_DESTROY, "got WM_DESTROY message\n"); + return old_imm_wnd_proc(hwnd, msg, wparam, lparam); +} + +static HWND thread_ime_wnd; +static DWORD WINAPI test_ImmGetDefaultIMEWnd_thread(void *arg) +{ + CreateWindowA("static", "static", WS_POPUP, 0, 0, 1, 1, NULL, NULL, NULL, NULL); + + thread_ime_wnd = ImmGetDefaultIMEWnd(0); + ok(thread_ime_wnd != 0, "ImmGetDefaultIMEWnd returned NULL\n"); + old_imm_wnd_proc = (void*)SetWindowLongPtrW(thread_ime_wnd, GWLP_WNDPROC, (LONG_PTR)imm_wnd_proc); + return 0; +} + static void test_ImmDefaultHwnd(void) { HIMC imc1, imc2, imc3; HWND def1, def3; + HANDLE thread; HWND hwnd; hwnd = CreateWindowExA(WS_EX_CLIENTEDGE, "EDIT", "Wine imm32.dll test", @@ -729,6 +831,11 @@ ok(def3 == def1, "Default IME window should not change\n"); ok(imc1 == imc3, "IME context should not change\n"); ImmSetOpenStatus(imc2, FALSE); + + thread = CreateThread(NULL, 0, test_ImmGetDefaultIMEWnd_thread, NULL, 0, NULL); + WaitForSingleObject(thread, INFINITE); + ok(thread_ime_wnd != def1, "thread_ime_wnd == def1\n"); + ok(!IsWindow(thread_ime_wnd), "thread_ime_wnd was not destroyed\n"); ImmReleaseContext(hwnd, imc1); ImmReleaseContext(hwnd, imc3);
8 years, 9 months
1
0
0
0
[hbelusca] 70974: [NTVDM]: Fix space padding calculation in the text-mode hex dumper.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Mar 9 00:07:24 2016 New Revision: 70974 URL:
http://svn.reactos.org/svn/reactos?rev=70974&view=rev
Log: [NTVDM]: Fix space padding calculation in the text-mode hex dumper. Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] Wed Mar 9 00:07:24 2016 @@ -345,8 +345,8 @@ } /* ... align with spaces if needed... */ - RtlFillMemory(Line, 0x0F + 4 - i, ' '); - Line += 0x0F + 4 - i; + RtlFillMemory(Line, (0x0F + 2 - i) * 3 + 2, ' '); + Line += (0x0F + 2 - i) * 3 + 2; /* ... then in character form. */ i = 0;
8 years, 9 months
1
0
0
0
[akhaldi] 70973: [KERNEL32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 8 15:49:46 2016 New Revision: 70973 URL:
http://svn.reactos.org/svn/reactos?rev=70973&view=rev
Log: [KERNEL32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/kernel32/actctx.c trunk/rostests/winetests/kernel32/change.c trunk/rostests/winetests/kernel32/codepage.c trunk/rostests/winetests/kernel32/console.c trunk/rostests/winetests/kernel32/debugger.c trunk/rostests/winetests/kernel32/drive.c trunk/rostests/winetests/kernel32/file.c trunk/rostests/winetests/kernel32/loader.c trunk/rostests/winetests/kernel32/locale.c trunk/rostests/winetests/kernel32/path.c trunk/rostests/winetests/kernel32/pipe.c trunk/rostests/winetests/kernel32/process.c trunk/rostests/winetests/kernel32/sync.c trunk/rostests/winetests/kernel32/time.c trunk/rostests/winetests/kernel32/virtual.c trunk/rostests/winetests/kernel32/volume.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/kernel32/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/actctx…
Modified: trunk/rostests/winetests/kernel32/change.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/change…
Modified: trunk/rostests/winetests/kernel32/codepage.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/codepa…
Modified: trunk/rostests/winetests/kernel32/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/consol…
Modified: trunk/rostests/winetests/kernel32/debugger.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/debugg…
Modified: trunk/rostests/winetests/kernel32/drive.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/drive.…
Modified: trunk/rostests/winetests/kernel32/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/file.c…
Modified: trunk/rostests/winetests/kernel32/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/loader…
Modified: trunk/rostests/winetests/kernel32/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/locale…
Modified: trunk/rostests/winetests/kernel32/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/path.c…
Modified: trunk/rostests/winetests/kernel32/pipe.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/pipe.c…
Modified: trunk/rostests/winetests/kernel32/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/proces…
Modified: trunk/rostests/winetests/kernel32/sync.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/sync.c…
Modified: trunk/rostests/winetests/kernel32/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/time.c…
Modified: trunk/rostests/winetests/kernel32/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/virtua…
Modified: trunk/rostests/winetests/kernel32/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/volume…
8 years, 9 months
1
0
0
0
[akhaldi] 70972: [XDK][PSDK][DDK] Improve winnt.h and make it share more definitions with wdm.h.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 8 15:35:17 2016 New Revision: 70972 URL:
http://svn.reactos.org/svn/reactos?rev=70972&view=rev
Log: [XDK][PSDK][DDK] Improve winnt.h and make it share more definitions with wdm.h. Modified: trunk/reactos/include/xdk/ketypes.h trunk/reactos/include/xdk/winnt.template.h trunk/reactos/include/xdk/winnt_old.h Modified: trunk/reactos/include/xdk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/xdk/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ketypes.h [iso-8859-1] Tue Mar 8 15:35:17 2016 @@ -29,6 +29,54 @@ #define SEMAPHORE_QUERY_STATE (0x0001) #define SEMAPHORE_MODIFY_STATE (0x0002) #define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3) + +$endif(_WDMDDK_) +$if(_WDMDDK_ || _WINNT_) + +typedef struct _PROCESSOR_GROUP_INFO { + UCHAR MaximumProcessorCount; + UCHAR ActiveProcessorCount; + UCHAR Reserved[38]; + KAFFINITY ActiveProcessorMask; +} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO; + +typedef enum _PROCESSOR_CACHE_TYPE { + CacheUnified, + CacheInstruction, + CacheData, + CacheTrace +} PROCESSOR_CACHE_TYPE; + +typedef struct _CACHE_DESCRIPTOR { + UCHAR Level; + UCHAR Associativity; + USHORT LineSize; + ULONG Size; + PROCESSOR_CACHE_TYPE Type; +} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; + +typedef struct _NUMA_NODE_RELATIONSHIP { + ULONG NodeNumber; + UCHAR Reserved[20]; + GROUP_AFFINITY GroupMask; +} NUMA_NODE_RELATIONSHIP, *PNUMA_NODE_RELATIONSHIP; + +typedef struct _CACHE_RELATIONSHIP { + UCHAR Level; + UCHAR Associativity; + USHORT LineSize; + ULONG CacheSize; + PROCESSOR_CACHE_TYPE Type; + UCHAR Reserved[20]; + GROUP_AFFINITY GroupMask; +} CACHE_RELATIONSHIP, *PCACHE_RELATIONSHIP; + +typedef struct _GROUP_RELATIONSHIP { + USHORT MaximumGroupCount; + USHORT ActiveGroupCount; + UCHAR Reserved[20]; + PROCESSOR_GROUP_INFO GroupInfo[ANYSIZE_ARRAY]; +} GROUP_RELATIONSHIP, *PGROUP_RELATIONSHIP; typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP { RelationProcessorCore, @@ -39,20 +87,12 @@ RelationAll = 0xffff } LOGICAL_PROCESSOR_RELATIONSHIP; -typedef enum _PROCESSOR_CACHE_TYPE { - CacheUnified, - CacheInstruction, - CacheData, - CacheTrace -} PROCESSOR_CACHE_TYPE; - -typedef struct _CACHE_DESCRIPTOR { - UCHAR Level; - UCHAR Associativity; - USHORT LineSize; - ULONG Size; - PROCESSOR_CACHE_TYPE Type; -} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; +typedef struct _PROCESSOR_RELATIONSHIP { + UCHAR Flags; + UCHAR Reserved[21]; + USHORT GroupCount; + _Field_size_(GroupCount) GROUP_AFFINITY GroupMask[ANYSIZE_ARRAY]; +} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP; typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { ULONG_PTR ProcessorMask; @@ -69,43 +109,6 @@ } DUMMYUNIONNAME; } SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; -typedef struct _PROCESSOR_RELATIONSHIP { - UCHAR Flags; - UCHAR Reserved[21]; - USHORT GroupCount; - _Field_size_(GroupCount) GROUP_AFFINITY GroupMask[ANYSIZE_ARRAY]; -} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP; - -typedef struct _NUMA_NODE_RELATIONSHIP { - ULONG NodeNumber; - UCHAR Reserved[20]; - GROUP_AFFINITY GroupMask; -} NUMA_NODE_RELATIONSHIP, *PNUMA_NODE_RELATIONSHIP; - -typedef struct _CACHE_RELATIONSHIP { - UCHAR Level; - UCHAR Associativity; - USHORT LineSize; - ULONG CacheSize; - PROCESSOR_CACHE_TYPE Type; - UCHAR Reserved[20]; - GROUP_AFFINITY GroupMask; -} CACHE_RELATIONSHIP, *PCACHE_RELATIONSHIP; - -typedef struct _PROCESSOR_GROUP_INFO { - UCHAR MaximumProcessorCount; - UCHAR ActiveProcessorCount; - UCHAR Reserved[38]; - KAFFINITY ActiveProcessorMask; -} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO; - -typedef struct _GROUP_RELATIONSHIP { - USHORT MaximumGroupCount; - USHORT ActiveGroupCount; - UCHAR Reserved[20]; - PROCESSOR_GROUP_INFO GroupInfo[ANYSIZE_ARRAY]; -} GROUP_RELATIONSHIP, *PGROUP_RELATIONSHIP; - typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX { LOGICAL_PROCESSOR_RELATIONSHIP Relationship; ULONG Size; @@ -116,6 +119,9 @@ GROUP_RELATIONSHIP Group; } DUMMYUNIONNAME; } SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX; + +$endif(_WDMDDK_ || _WINNT_) +$if(_WDMDDK_) /* Processor features */ #define PF_FLOATING_POINT_PRECISION_ERRATA 0 Modified: trunk/reactos/include/xdk/winnt.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/winnt.template…
============================================================================== --- trunk/reactos/include/xdk/winnt.template.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/winnt.template.h [iso-8859-1] Tue Mar 8 15:35:17 2016 @@ -71,6 +71,7 @@ $define(UCHAR=BYTE) $include(ntbasedef.h) $include(interlocked.h) +$include(ketypes.h) $include(winnt_old.h) #ifdef __cplusplus Modified: trunk/reactos/include/xdk/winnt_old.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/winnt_old.h?re…
============================================================================== --- trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] Tue Mar 8 15:35:17 2016 @@ -1100,6 +1100,9 @@ #define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 #define IO_REPARSE_TAG_SYMLINK 0xA000000CL + +#define RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO 0x01000000 + #ifndef RC_INVOKED #ifdef _GUID_DEFINED @@ -3926,46 +3929,7 @@ HeapEnableTerminationOnCorruption } HEAP_INFORMATION_CLASS; -typedef enum _PROCESSOR_CACHE_TYPE { - CacheUnified, - CacheInstruction, - CacheData, - CacheTrace -} PROCESSOR_CACHE_TYPE; - -typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP { - RelationProcessorCore, - RelationNumaNode, - RelationCache, - RelationProcessorPackage, - RelationGroup, - RelationAll = 0xffff -} LOGICAL_PROCESSOR_RELATIONSHIP; - #define CACHE_FULLY_ASSOCIATIVE 0xFF - -typedef struct _CACHE_DESCRIPTOR { - BYTE Level; - BYTE Associativity; - WORD LineSize; - DWORD Size; - PROCESSOR_CACHE_TYPE Type; -} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; - -typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { - ULONG_PTR ProcessorMask; - LOGICAL_PROCESSOR_RELATIONSHIP Relationship; - _ANONYMOUS_UNION union { - struct { - BYTE Flags; - } ProcessorCore; - struct { - DWORD NodeNumber; - } NumaNode; - CACHE_DESCRIPTOR Cache; - ULONGLONG Reserved[2]; - } DUMMYUNIONNAME; -} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; _Check_return_ NTSYSAPI
8 years, 9 months
1
0
0
0
[akhaldi] 70971: [GDI32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 8 15:01:05 2016 New Revision: 70971 URL:
http://svn.reactos.org/svn/reactos?rev=70971&view=rev
Log: [GDI32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/gdi32/dc.c trunk/rostests/winetests/gdi32/dib.c trunk/rostests/winetests/gdi32/font.c trunk/rostests/winetests/gdi32/icm.c trunk/rostests/winetests/gdi32/metafile.c trunk/rostests/winetests/gdi32/path.c Modified: trunk/rostests/winetests/gdi32/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/dc.c?rev=…
============================================================================== --- trunk/rostests/winetests/gdi32/dc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/dc.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -424,9 +424,7 @@ else ok( ret || broken(!ret) /* NT4 */, "GetDeviceGammaRamp failed on %s (type %d), error %u\n", descr, GetObjectType( hdc ), GetLastError() ); type = GetClipBox( hdc, &rect ); - if (GetObjectType( hdc ) == OBJ_ENHMETADC) - todo_wine ok( type == SIMPLEREGION, "GetClipBox returned %d on memdc for %s\n", type, descr ); - else + todo_wine_if (GetObjectType( hdc ) == OBJ_ENHMETADC) ok( type == SIMPLEREGION, "GetClipBox returned %d on memdc for %s\n", type, descr ); type = GetBoundsRect( hdc, &rect, 0 ); @@ -443,12 +441,7 @@ SetMapMode( hdc, MM_TEXT ); Rectangle( hdc, 2, 2, 4, 4 ); type = GetBoundsRect( hdc, &rect, DCB_RESET ); - if (GetObjectType( hdc ) == OBJ_ENHMETADC || (GetObjectType( hdc ) == OBJ_DC && GetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASPRINTER)) - todo_wine - ok( rect.left == 2 && rect.top == 2 && rect.right == 4 && rect.bottom == 4 && type == DCB_SET, - "GetBoundsRect returned %d,%d,%d,%d type %x for %s\n", - rect.left, rect.top, rect.right, rect.bottom, type, descr ); - else + todo_wine_if (GetObjectType( hdc ) == OBJ_ENHMETADC || (GetObjectType( hdc ) == OBJ_DC && GetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASPRINTER)) ok( rect.left == 2 && rect.top == 2 && rect.right == 4 && rect.bottom == 4 && type == DCB_SET, "GetBoundsRect returned %d,%d,%d,%d type %x for %s\n", rect.left, rect.top, rect.right, rect.bottom, type, descr ); @@ -462,20 +455,12 @@ ok( type == SIMPLEREGION, "GetClipBox returned %d on %s\n", type, descr ); if (GetDeviceCaps( ref_dc, TECHNOLOGY ) == DT_RASDISPLAY) { - if (GetSystemMetrics( SM_CXSCREEN ) != GetSystemMetrics( SM_CXVIRTUALSCREEN )) - todo_wine ok( GetDeviceCaps( ref_dc, DESKTOPHORZRES ) == GetSystemMetrics( SM_CXSCREEN ), - "Got DESKTOPHORZRES %d on %s, expected %d\n", - GetDeviceCaps( ref_dc, DESKTOPHORZRES ), descr, GetSystemMetrics( SM_CXSCREEN ) ); - else + todo_wine_if (GetSystemMetrics( SM_CXSCREEN ) != GetSystemMetrics( SM_CXVIRTUALSCREEN )) ok( GetDeviceCaps( ref_dc, DESKTOPHORZRES ) == GetSystemMetrics( SM_CXSCREEN ), "Got DESKTOPHORZRES %d on %s, expected %d\n", GetDeviceCaps( ref_dc, DESKTOPHORZRES ), descr, GetSystemMetrics( SM_CXSCREEN ) ); - if (GetSystemMetrics( SM_CYSCREEN ) != GetSystemMetrics( SM_CYVIRTUALSCREEN )) - todo_wine ok( GetDeviceCaps( ref_dc, DESKTOPVERTRES ) == GetSystemMetrics( SM_CYSCREEN ), - "Got DESKTOPVERTRES %d on %s, expected %d\n", - GetDeviceCaps( ref_dc, DESKTOPVERTRES ), descr, GetSystemMetrics( SM_CYSCREEN ) ); - else + todo_wine_if (GetSystemMetrics( SM_CYSCREEN ) != GetSystemMetrics( SM_CYVIRTUALSCREEN )) ok( GetDeviceCaps( ref_dc, DESKTOPVERTRES ) == GetSystemMetrics( SM_CYSCREEN ), "Got DESKTOPVERTRES %d on %s, expected %d\n", GetDeviceCaps( ref_dc, DESKTOPVERTRES ), descr, GetSystemMetrics( SM_CYSCREEN ) ); @@ -490,11 +475,8 @@ GetDeviceCaps( ref_dc, DESKTOPVERTRES ) ); } - if (GetDeviceCaps( ref_dc, TECHNOLOGY ) == DT_RASDISPLAY && GetObjectType( hdc ) != OBJ_ENHMETADC && + todo_wine_if (GetDeviceCaps( ref_dc, TECHNOLOGY ) == DT_RASDISPLAY && GetObjectType( hdc ) != OBJ_ENHMETADC && (GetSystemMetrics( SM_XVIRTUALSCREEN ) || GetSystemMetrics( SM_YVIRTUALSCREEN ))) - todo_wine ok( EqualRect( &rect, &ref_rect ), "GetClipBox returned %d,%d,%d,%d on %s\n", - rect.left, rect.top, rect.right, rect.bottom, descr ); - else ok( EqualRect( &rect, &ref_rect ), "GetClipBox returned %d,%d,%d,%d on %s\n", rect.left, rect.top, rect.right, rect.bottom, descr ); } @@ -630,11 +612,13 @@ static void test_DC_bitmap(void) { + PIXELFORMATDESCRIPTOR descr; HDC hdc, hdcmem; DWORD bits[64]; HBITMAP hbmp, oldhbmp; COLORREF col; int i, bitspixel; + int ret, ret2; /* fill bitmap data with b&w pattern */ for( i = 0; i < 64; i++) bits[i] = i & 1 ? 0 : 0xffffff; @@ -645,7 +629,31 @@ /* create a memory dc */ hdcmem = CreateCompatibleDC( hdc); ok( hdcmem != NULL, "CreateCompatibleDC rets %p\n", hdcmem); - /* tests */ + + /* test DescribePixelFormat with descr == NULL */ + ret2 = DescribePixelFormat(hdcmem, 0, sizeof(descr), NULL); + ok(ret2 > 0, "expected ret2 > 0, got %d\n", ret2); + ret = DescribePixelFormat(hdcmem, 1, sizeof(descr), NULL); + ok(ret == ret2, "expected ret == %d, got %d\n", ret2, ret); + ret = DescribePixelFormat(hdcmem, 0x10000, sizeof(descr), NULL); + ok(ret == ret2, "expected ret == %d, got %d\n", ret2, ret); + + /* test DescribePixelFormat with descr != NULL */ + memset(&descr, 0, sizeof(descr)); + ret = DescribePixelFormat(hdcmem, 0, sizeof(descr), &descr); + ok(ret == 0, "expected ret == 0, got %d\n", ret); + ok(descr.nSize == 0, "expected descr.nSize == 0, got %d\n", descr.nSize); + + memset(&descr, 0, sizeof(descr)); + ret = DescribePixelFormat(hdcmem, 1, sizeof(descr), &descr); + ok(ret == ret2, "expected ret == %d, got %d\n", ret2, ret); + ok(descr.nSize == sizeof(descr), "expected desc.nSize == sizeof(descr), got %d\n", descr.nSize); + + memset(&descr, 0, sizeof(descr)); + ret = DescribePixelFormat(hdcmem, 0x10000, sizeof(descr), &descr); + ok(ret == 0, "expected ret == 0, got %d\n", ret); + ok(descr.nSize == 0, "expected descr.nSize == 0, got %d\n", descr.nSize); + /* test monochrome bitmap: should always work */ hbmp = CreateBitmap(32, 32, 1, 1, bits); ok( hbmp != NULL, "CreateBitmap returns %p\n", hbmp); Modified: trunk/rostests/winetests/gdi32/dib.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/dib.c?rev…
============================================================================== --- trunk/rostests/winetests/gdi32/dib.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/dib.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -1322,10 +1322,7 @@ for(i = 1; i <= num_broken; i++) ok_cond = ok_cond || broken( !strcmp(hash, current_sha1[i]) ); - if(todo) - todo_wine ok( ok_cond, "%s: %s: expected hash %s got %s\n", - dst_format, info, *current_sha1, hash ); - else + todo_wine_if(todo) ok( ok_cond, "%s: %s: expected hash %s got %s\n", dst_format, info, *current_sha1, hash ); Modified: trunk/rostests/winetests/gdi32/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/font.c?re…
============================================================================== --- trunk/rostests/winetests/gdi32/font.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/font.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -926,7 +926,7 @@ trace("ACP %d -> charset %d\n", GetACP(), expected_cs); hdc = CreateCompatibleDC(0); - assert(hdc); + ok(hdc != NULL, "failed to create hdc\n"); trace("logpixelsX %d, logpixelsY %d\n", GetDeviceCaps(hdc, LOGPIXELSX), GetDeviceCaps(hdc, LOGPIXELSY)); @@ -974,9 +974,7 @@ { if (font_res == fd[i].dpi && lf.lfCharSet == expected_cs) { - if (ret) /* FIXME: Remove once Wine is fixed */ - todo_wine ok(!ret, "%s height %d charset %d dpi %d should be enumerated\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi); - else + todo_wine_if (ret) /* FIXME: Remove once Wine is fixed */ ok(!ret, "%s height %d charset %d dpi %d should be enumerated\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi); } } @@ -1136,26 +1134,26 @@ ret = pGetCharABCWidthsI(hdc, 0, 1, glyphs, abc); ok(ret, "%s: GetCharABCWidthsI should have succeeded\n", description); ok ((INT)abc->abcB > 0, "%s: abcB should be positive\n", description); - if (todo) todo_wine ok(abc->abcA * base_abci->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); - else ok(abc->abcA * base_abci->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); - if (todo) todo_wine ok(abc->abcC * base_abci->abcC >= 0, "%s: abcC's sign should be unchanged\n", description); - else ok(abc->abcC * base_abci->abcC >= 0, "%s: abcC's sign should be unchanged\n", description); + todo_wine_if (todo) + ok(abc->abcA * base_abci->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); + todo_wine_if (todo) + ok(abc->abcC * base_abci->abcC >= 0, "%s: abcC's sign should be unchanged\n", description); ret = pGetCharABCWidthsW(hdc, 'i', 'i', abc); ok(ret, "%s: GetCharABCWidthsW should have succeeded\n", description); ok ((INT)abc->abcB > 0, "%s: abcB should be positive\n", description); - if (todo) todo_wine ok(abc->abcA * base_abcw->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); - else ok(abc->abcA * base_abcw->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); - if (todo) todo_wine ok(abc->abcC * base_abcw->abcC >= 0, "%s: abcC's sign should be unchanged\n", description); - else ok(abc->abcC * base_abcw->abcC >= 0, "%s: abcC's should be unchanged\n", description); + todo_wine_if (todo) + ok(abc->abcA * base_abcw->abcA >= 0, "%s: abcA's sign should be unchanged\n", description); + todo_wine_if (todo) + ok(abc->abcC * base_abcw->abcC >= 0, "%s: abcC's sign should be unchanged\n", description); ret = pGetCharABCWidthsFloatW(hdc, 'i', 'i', abcf); ok(ret, "%s: GetCharABCWidthsFloatW should have succeeded\n", description); ok (abcf->abcfB > 0.0, "%s: abcfB should be positive\n", description); - if (todo) todo_wine ok(abcf->abcfA * base_abcf->abcfA >= 0.0, "%s: abcfA's sign should be unchanged\n", description); - else ok(abcf->abcfA * base_abcf->abcfA >= 0.0, "%s: abcfA's should be unchanged\n", description); - if (todo) todo_wine ok(abcf->abcfC * base_abcf->abcfC >= 0.0, "%s: abcfC's sign should be unchanged\n", description); - else ok(abcf->abcfC * base_abcf->abcfC >= 0.0, "%s: abcfC's sign should be unchanged\n", description); + todo_wine_if (todo) + ok(abcf->abcfA * base_abcf->abcfA >= 0.0, "%s: abcfA's sign should be unchanged\n", description); + todo_wine_if (todo) + ok(abcf->abcfC * base_abcf->abcfC >= 0.0, "%s: abcfC's sign should be unchanged\n", description); } static void test_GetCharABCWidths(void) @@ -1410,6 +1408,7 @@ static void test_text_extents(void) { static const WCHAR wt[] = {'O','n','e','\n','t','w','o',' ','3',0}; + static const WCHAR emptyW[] = {0}; LPINT extents; INT i, len, fit1, fit2, extents2[3]; LOGFONTA lf; @@ -1428,8 +1427,19 @@ hdc = GetDC(0); hfont = SelectObject(hdc, hfont); GetTextMetricsA(hdc, &tm); - GetTextExtentPointA(hdc, "o", 1, &sz); + ret = GetTextExtentPointA(hdc, "o", 1, &sz); + ok(ret, "got %d\n", ret); ok(sz.cy == tm.tmHeight, "cy %d tmHeight %d\n", sz.cy, tm.tmHeight); + + memset(&sz, 0xcc, sizeof(sz)); + ret = GetTextExtentPointA(hdc, "o", 0, &sz); + ok(ret, "got %d\n", ret); + ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy); + + memset(&sz, 0xcc, sizeof(sz)); + ret = GetTextExtentPointA(hdc, "", 0, &sz); + ok(ret, "got %d\n", ret); + ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy); SetLastError(0xdeadbeef); GetTextExtentExPointW(hdc, wt, 1, 1, &fit1, &fit2, &sz1); @@ -1441,6 +1451,16 @@ ReleaseDC(0, hdc); return; } + + memset(&sz, 0xcc, sizeof(sz)); + ret = GetTextExtentPointW(hdc, wt, 0, &sz); + ok(ret, "got %d\n", ret); + ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy); + + memset(&sz, 0xcc, sizeof(sz)); + ret = GetTextExtentPointW(hdc, emptyW, 0, &sz); + ok(ret, "got %d\n", ret); + ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy); len = lstrlenW(wt); extents = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof extents[0]); @@ -1724,7 +1744,7 @@ strcpy(lf.lfFaceName, kd[i].face_name); lf.lfHeight = kd[i].height; hfont = CreateFontIndirectA(&lf); - assert(hfont != 0); + ok(hfont != NULL, "failed to create a font, name %s\n", kd[i].face_name); hfont_old = SelectObject(hdc, hfont); @@ -1850,7 +1870,7 @@ strcpy(lf.lfFaceName, fd[i].face_name); hfont = CreateFontIndirectA(&lf); - assert(hfont); + ok(hfont != NULL, "failed to create a font, name %s\n", fd[i].face_name); old_hfont = SelectObject(hdc, hfont); ret = GetTextMetricsA(hdc, &tm); @@ -2076,12 +2096,40 @@ {"", 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; HDC hdc = CreateCompatibleDC(0); - assert(hdc); + ok(hdc != NULL, "failed to create hdc\n"); test_height( hdc, tahoma ); test_height_selection_vdmx( hdc ); DeleteDC(hdc); +} + +static UINT get_font_fsselection(LOGFONTA *lf) +{ + OUTLINETEXTMETRICA *otm; + HFONT hfont, hfont_old; + DWORD ret, otm_size; + UINT fsSelection; + HDC hdc; + + hdc = GetDC(0); + hfont = CreateFontIndirectA(lf); + ok(hfont != NULL, "failed to create a font\n"); + + hfont_old = SelectObject(hdc, hfont); + + otm_size = GetOutlineTextMetricsA(hdc, 0, NULL); + otm = HeapAlloc(GetProcessHeap(), 0, otm_size); + otm->otmSize = sizeof(*otm); + ret = GetOutlineTextMetricsA(hdc, otm->otmSize, otm); + ok(ret == otm->otmSize, "expected %u, got %u, error %d\n", otm->otmSize, ret, GetLastError()); + fsSelection = otm->otmfsSelection; + HeapFree(GetProcessHeap(), 0, otm); + SelectObject(hdc, hfont_old); + DeleteObject(hfont); + ReleaseDC(0, hdc); + + return fsSelection; } static void test_GetOutlineTextMetrics(void) @@ -2092,6 +2140,38 @@ HDC hdc; DWORD ret, otm_size; LPSTR unset_ptr; + UINT fsSelection; + + /* check fsSelection field with bold simulation */ + memset(&lf, 0, sizeof(lf)); + strcpy(lf.lfFaceName, "Wingdings"); + lf.lfCharSet = SYMBOL_CHARSET; + + /* regular face */ + fsSelection = get_font_fsselection(&lf); + ok((fsSelection & (1 << 5)) == 0, "got 0x%x\n", fsSelection); + + /* face with bold simulation */ + lf.lfWeight = FW_BOLD; + fsSelection = get_font_fsselection(&lf); + ok((fsSelection & (1 << 5)) != 0, "got 0x%x\n", fsSelection); + + /* check fsSelection field with oblique simulation */ + memset(&lf, 0, sizeof(lf)); + strcpy(lf.lfFaceName, "Tahoma"); + lf.lfHeight = -13; + lf.lfWeight = FW_NORMAL; + lf.lfPitchAndFamily = DEFAULT_PITCH; + lf.lfQuality = PROOF_QUALITY; + + /* regular face */ + fsSelection = get_font_fsselection(&lf); + ok((fsSelection & 1) == 0, "got 0x%x\n", fsSelection); + + lf.lfItalic = 1; + /* face with oblique simulation */ + fsSelection = get_font_fsselection(&lf); + ok((fsSelection & 1) == 1, "got 0x%x\n", fsSelection); if (!is_font_installed("Arial")) { @@ -2108,7 +2188,7 @@ lf.lfPitchAndFamily = DEFAULT_PITCH; lf.lfQuality = PROOF_QUALITY; hfont = CreateFontIndirectA(&lf); - assert(hfont != 0); + ok(hfont != NULL, "failed to create a font\n"); hfont_old = SelectObject(hdc, hfont); otm_size = GetOutlineTextMetricsA(hdc, 0, NULL); @@ -3782,11 +3862,7 @@ expect_default_A = expect_default_W; /* Wine currently uses SYMBOL_CHARSET to identify whether the ANSI metrics need special handling */ - if(cmap_type != cmap_ms_symbol && tmA.tmCharSet == SYMBOL_CHARSET && expect_first_A != 0x1e) - todo_wine ok(tmA.tmFirstChar == expect_first_A || - tmA.tmFirstChar == expect_first_A + 1 /* win9x */, - "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); - else + todo_wine_if(cmap_type != cmap_ms_symbol && tmA.tmCharSet == SYMBOL_CHARSET && expect_first_A != 0x1e) ok(tmA.tmFirstChar == expect_first_A || tmA.tmFirstChar == expect_first_A + 1 /* win9x */, "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); @@ -3810,18 +3886,12 @@ if (ret) { /* Wine uses the os2 first char */ - if(cmap_first != os2_first_char && cmap_type != cmap_ms_symbol) - todo_wine ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", - font_name, tmW.tmFirstChar, expect_first_W); - else + todo_wine_if(cmap_first != os2_first_char && cmap_type != cmap_ms_symbol) ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", font_name, tmW.tmFirstChar, expect_first_W); /* Wine uses the os2 last char */ - if(expect_last_W != os2_last_char && cmap_type != cmap_ms_symbol) - todo_wine ok(tmW.tmLastChar == expect_last_W, "W: tmLastChar for %s got %02x expected %02x\n", - font_name, tmW.tmLastChar, expect_last_W); - else + todo_wine_if(expect_last_W != os2_last_char && cmap_type != cmap_ms_symbol) ok(tmW.tmLastChar == expect_last_W, "W: tmLastChar for %s got %02x expected %02x\n", font_name, tmW.tmLastChar, expect_last_W); ok(tmW.tmBreakChar == expect_break_W, "W: tmBreakChar for %s got %02x expected %02x\n", @@ -6054,14 +6124,11 @@ } /* FIXME: Remove once Wine is fixed */ - if (td[i][j].dpi != 96 && + todo_wine_if (td[i][j].dpi != 96 && /* MS Sans Serif for 120 dpi and higher should include 12 pixel bitmap set */ ((!strcmp(td[i][j].face_name, "MS Sans Serif") && td[i][j].height == 12) || /* System for 120 dpi and higher should include 20 pixel bitmap set */ (!strcmp(td[i][j].face_name, "System") && td[i][j].height > 16))) - todo_wine - ok(height == td[i][j].height_pixels, "%d(%d): expected height %d, got %d\n", i, j, td[i][j].height_pixels, height); - else ok(height == td[i][j].height_pixels, "%d(%d): expected height %d, got %d\n", i, j, td[i][j].height_pixels, height); ok(td[i][j].weight == lf.lfWeight, "%d(%d): expected lfWeight %d, got %d\n", i, j, td[i][j].weight, lf.lfWeight); @@ -6281,13 +6348,18 @@ static void test_fake_bold_font(void) { + static const MAT2 x2_mat = { {0,2}, {0,0}, {0,0}, {0,2} }; HDC hdc; - HFONT hfont, hfont_old; LOGFONTA lf; BOOL ret; - TEXTMETRICA tm[2]; - ABC abc[2]; - INT w[2]; + struct glyph_data { + TEXTMETRICA tm; + ABC abc; + INT w; + GLYPHMETRICS gm; + } data[2]; + int i; + DWORD r; if (!pGetCharWidth32A || !pGetCharABCWidthsA) { win_skip("GetCharWidth32A/GetCharABCWidthA is not available on this platform\n"); @@ -6297,45 +6369,51 @@ /* Test outline font */ memset(&lf, 0, sizeof(lf)); strcpy(lf.lfFaceName, "Wingdings"); - lf.lfWeight = FW_NORMAL; lf.lfCharSet = SYMBOL_CHARSET; - hfont = CreateFontIndirectA(&lf); hdc = GetDC(NULL); - hfont_old = SelectObject(hdc, hfont); - - /* base metrics */ - ret = GetTextMetricsA(hdc, &tm[0]); - ok(ret, "got %d\n", ret); - ret = pGetCharABCWidthsA(hdc, 0x76, 0x76, &abc[0]); - ok(ret, "got %d\n", ret); - - lf.lfWeight = FW_BOLD; - hfont = CreateFontIndirectA(&lf); - DeleteObject(SelectObject(hdc, hfont)); - - /* bold metrics */ - ret = GetTextMetricsA(hdc, &tm[1]); - ok(ret, "got %d\n", ret); - ret = pGetCharABCWidthsA(hdc, 0x76, 0x76, &abc[1]); - ok(ret, "got %d\n", ret); - - DeleteObject(SelectObject(hdc, hfont_old)); + + for (i = 0; i <= 1; i++) + { + HFONT hfont, hfont_old; + + lf.lfWeight = i ? FW_BOLD : FW_NORMAL; + hfont = CreateFontIndirectA(&lf); + hfont_old = SelectObject(hdc, hfont); + + ret = GetTextMetricsA(hdc, &data[i].tm); + ok(ret, "got %d\n", ret); + ret = pGetCharABCWidthsA(hdc, 0x76, 0x76, &data[i].abc); + ok(ret, "got %d\n", ret); + data[i].w = data[i].abc.abcA + data[i].abc.abcB + data[i].abc.abcC; + r = GetGlyphOutlineA(hdc, 0x76, GGO_METRICS, &data[i].gm, 0, NULL, &x2_mat); + ok(r != GDI_ERROR, "got %d\n", ret); + + SelectObject(hdc, hfont_old); + DeleteObject(hfont); + } ReleaseDC(NULL, hdc); /* compare results (outline) */ - ok(tm[0].tmHeight == tm[1].tmHeight, "expected %d, got %d\n", tm[0].tmHeight, tm[1].tmHeight); - ok(tm[0].tmAscent == tm[1].tmAscent, "expected %d, got %d\n", tm[0].tmAscent, tm[1].tmAscent); - ok(tm[0].tmDescent == tm[1].tmDescent, "expected %d, got %d\n", tm[0].tmDescent, tm[1].tmDescent); - ok((tm[0].tmAveCharWidth + 1) == tm[1].tmAveCharWidth, - "expected %d, got %d\n", tm[0].tmAveCharWidth + 1, tm[1].tmAveCharWidth); - ok((tm[0].tmMaxCharWidth + 1) == tm[1].tmMaxCharWidth, - "expected %d, got %d\n", tm[0].tmMaxCharWidth + 1, tm[1].tmMaxCharWidth); - ok(tm[0].tmOverhang == tm[1].tmOverhang, "expected %d, got %d\n", tm[0].tmOverhang, tm[1].tmOverhang); - w[0] = abc[0].abcA + abc[0].abcB + abc[0].abcC; - w[1] = abc[1].abcA + abc[1].abcB + abc[1].abcC; - ok((w[0] + 1) == w[1], "expected %d, got %d\n", w[0] + 1, w[1]); - + ok(data[0].tm.tmHeight == data[1].tm.tmHeight, + "expected %d, got %d\n", data[0].tm.tmHeight, data[1].tm.tmHeight); + ok(data[0].tm.tmAscent == data[1].tm.tmAscent, + "expected %d, got %d\n", data[0].tm.tmAscent, data[1].tm.tmAscent); + ok(data[0].tm.tmDescent == data[1].tm.tmDescent, + "expected %d, got %d\n", data[0].tm.tmDescent, data[1].tm.tmDescent); + ok(data[0].tm.tmAveCharWidth + 1 == data[1].tm.tmAveCharWidth, + "expected %d, got %d\n", data[0].tm.tmAveCharWidth + 1, data[1].tm.tmAveCharWidth); + ok(data[0].tm.tmMaxCharWidth + 1 == data[1].tm.tmMaxCharWidth, + "expected %d, got %d\n", data[0].tm.tmMaxCharWidth + 1, data[1].tm.tmMaxCharWidth); + ok(data[0].tm.tmOverhang == data[1].tm.tmOverhang, + "expected %d, got %d\n", data[0].tm.tmOverhang, data[1].tm.tmOverhang); + ok(data[0].w + 1 == data[1].w, + "expected %d, got %d\n", data[0].w + 1, data[1].w); + + ok(data[0].gm.gmCellIncX + 1 == data[1].gm.gmCellIncX, + "expected %d, got %d\n", data[0].gm.gmCellIncX + 1, data[1].gm.gmCellIncX); + ok(data[0].gm.gmCellIncY == data[1].gm.gmCellIncY, + "expected %d, got %d\n", data[0].gm.gmCellIncY, data[1].gm.gmCellIncY); } static void test_bitmap_font_glyph_index(void) Modified: trunk/rostests/winetests/gdi32/icm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/icm.c?rev…
============================================================================== --- trunk/rostests/winetests/gdi32/icm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/icm.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -50,6 +50,12 @@ size = MAX_PATH; ret = GetICMProfileA( dc, &size, NULL ); ok( !ret, "GetICMProfileA succeeded\n" ); + ok( size > 0, "got %u\n", size ); + + size = 0; + ret = GetICMProfileA( dc, &size, NULL ); + ok( !ret, "GetICMProfileA succeeded\n" ); + ok( size > 0, "got %u\n", size ); size = MAX_PATH; ret = GetICMProfileA( NULL, &size, filename ); @@ -107,6 +113,11 @@ size = MAX_PATH; ret = GetICMProfileW( NULL, &size, filename ); ok( !ret, "GetICMProfileW succeeded\n" ); + + size = 0; + ret = GetICMProfileW( dc, &size, NULL ); + ok( !ret, "GetICMProfileW succeeded\n" ); + ok( size > 0, "got %u\n", size ); size = 0; SetLastError(0xdeadbeef); Modified: trunk/rostests/winetests/gdi32/metafile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/metafile.…
============================================================================== --- trunk/rostests/winetests/gdi32/metafile.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/metafile.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -1101,6 +1101,44 @@ 0x14, 0x00, 0x00, 0x00 }; +static const unsigned char EMF_TEXTOUT_OUTLINE_ON_PATH_BITS[] = +{ + 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, + 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, + 0x0c, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x90, 0x06, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, + 0x51, 0x02, 0x00, 0x00, 0x72, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x0b, 0x09, 0x00, + 0xf0, 0xa6, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x80, + 0x3b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x54, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x01, 0x00, 0x00, 0x00, 0xc3, 0x30, 0x0d, 0x42, + 0xcf, 0xf3, 0x0c, 0x42, 0x0b, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x65, 0x00, + 0x73, 0x00, 0x74, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x80, + 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00 +}; + static const unsigned char MF_LINETO_BITS[] = { 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, @@ -2224,6 +2262,8 @@ HDC hdcDisplay, hdcMetafile; HENHMETAFILE hMetafile; BOOL ret; + LOGFONTA lf; + HFONT hFont; static const INT dx[4] = { 3, 5, 8, 12 }; /* Win9x doesn't play EMFs on invisible windows */ @@ -2234,6 +2274,19 @@ hdcDisplay = GetDC(hwnd); ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); + /* with default font */ + ret = BeginPath(hdcDisplay); + ok(ret, "BeginPath error %d\n", GetLastError()); + + ret = ExtTextOutA(hdcDisplay, 11, 22, 0, NULL, "Test", 4, dx); + ok(ret, "ExtTextOut error %d\n", GetLastError()); + + ret = EndPath(hdcDisplay); + ok(ret, "EndPath error %d\n", GetLastError()); + + ret = GetPath(hdcDisplay, NULL, NULL, 0); + ok(!ret, "expected 0, got %d\n", ret); + hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); @@ -2245,6 +2298,9 @@ ret = EndPath(hdcMetafile); ok(ret, "EndPath error %d\n", GetLastError()); + + ret = GetPath(hdcMetafile, NULL, NULL, 0); + ok(!ret, "expected 0, got %d\n", ret); hMetafile = CloseEnhMetaFile(hdcMetafile); ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); @@ -2261,6 +2317,66 @@ ret = DeleteEnhMetaFile(hMetafile); ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); + + /* with outline font */ + memset(&lf, 0, sizeof(lf)); + lf.lfCharSet = ANSI_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfWeight = FW_DONTCARE; + lf.lfHeight = 7; + lf.lfQuality = DEFAULT_QUALITY; + lstrcpyA(lf.lfFaceName, "Tahoma"); + hFont = CreateFontIndirectA(&lf); + ok(hFont != 0, "CreateFontIndirectA error %d\n", GetLastError()); + hFont = SelectObject(hdcDisplay, hFont); + + ret = BeginPath(hdcDisplay); + ok(ret, "BeginPath error %d\n", GetLastError()); + + ret = ExtTextOutA(hdcDisplay, 11, 22, 0, NULL, "Test", 4, dx); + ok(ret, "ExtTextOut error %d\n", GetLastError()); + + ret = EndPath(hdcDisplay); + ok(ret, "EndPath error %d\n", GetLastError()); + + ret = GetPath(hdcDisplay, NULL, NULL, 0); + ok(ret != 0, "expected != 0\n"); + + SelectObject(hdcDisplay, hFont); + + hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); + ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); + + hFont = SelectObject(hdcMetafile, hFont); + + ret = BeginPath(hdcMetafile); + ok(ret, "BeginPath error %d\n", GetLastError()); + + ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); + ok(ret, "ExtTextOut error %d\n", GetLastError()); + + ret = EndPath(hdcMetafile); + ok(ret, "EndPath error %d\n", GetLastError()); + + ret = GetPath(hdcMetafile, NULL, NULL, 0); + ok(!ret, "expected 0, got %d\n", ret); + + hFont = SelectObject(hdcMetafile, hFont); + DeleteObject(hFont); + + hMetafile = CloseEnhMetaFile(hdcMetafile); + ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); + + if (compare_emf_bits(hMetafile, EMF_TEXTOUT_OUTLINE_ON_PATH_BITS, sizeof(EMF_TEXTOUT_OUTLINE_ON_PATH_BITS), + "emf_TextOut_on_path", FALSE) != 0) + { + dump_emf_bits(hMetafile, "emf_TextOut_outline_on_path"); + dump_emf_records(hMetafile, "emf_TextOut_outline_on_path"); + } + + ret = DeleteEnhMetaFile(hMetafile); + ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); + ret = ReleaseDC(hwnd, hdcDisplay); ok(ret, "ReleaseDC error %d\n", GetLastError()); DestroyWindow(hwnd); @@ -3361,6 +3477,41 @@ DeleteEnhMetaFile(hemf); } +static const unsigned char EMF_PATH_BITS[] = +{ + 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff, + 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, + 0xf8, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x07, 0x00, 0x00, 0xd3, 0x03, 0x00, 0x00, + 0xfc, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00, + 0xd3, 0xf3, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 +}; + static void test_emf_GetPath(void) { HDC hdcMetafile; @@ -3383,13 +3534,20 @@ ok( ret, "LineTo error %d.\n", GetLastError()); ret = LineTo(hdcMetafile, 50, 50); ok( ret, "LineTo error %d.\n", GetLastError()); + Rectangle(hdcMetafile, 10, 10, 20, 20); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 5, "GetPath returned %d.\n", size); + ok( size == 9, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError()); + + if (compare_emf_bits(hemf, EMF_PATH_BITS, sizeof(EMF_PATH_BITS), "test_emf_GetPath", FALSE) != 0) + { + dump_emf_bits(hemf, "test_emf_GetPath"); + dump_emf_records(hemf, "test_emf_GetPath"); + } DeleteEnhMetaFile(hemf); } Modified: trunk/rostests/winetests/gdi32/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/path.c?re…
============================================================================== --- trunk/rostests/winetests/gdi32/path.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/path.c [iso-8859-1] Tue Mar 8 15:01:05 2016 @@ -390,9 +390,7 @@ size = GetPath(hdc, pnt, types, size); assert(size > 0); - if (todo_size) todo_wine - ok(size == expected_size, "Path size %d does not match expected size %d\n", size, expected_size); - else + todo_wine_if (todo_size) ok(size == expected_size, "Path size %d does not match expected size %d\n", size, expected_size); if (winetest_debug > 2) @@ -407,11 +405,7 @@ (pnt[idx].x >= expected[eidx].x-2 && pnt[idx].x <= expected[eidx].x+2) && (pnt[idx].y >= expected[eidx].y-2 && pnt[idx].y <= expected[eidx].y+2); - if (expected[eidx].todo || numskip) todo_wine - ok(match, "Expected #%d: %s (%d,%d) but got %s (%d,%d)\n", eidx, - type_string[expected[eidx].type], expected[eidx].x, expected[eidx].y, - type_string[types[idx]], pnt[idx].x, pnt[idx].y); - else + todo_wine_if (expected[eidx].todo || numskip) ok(match, "Expected #%d: %s (%d,%d) but got %s (%d,%d)\n", eidx, type_string[expected[eidx].type], expected[eidx].x, expected[eidx].y, type_string[types[idx]], pnt[idx].x, pnt[idx].y);
8 years, 9 months
1
0
0
0
[akhaldi] 70970: [PSDK] Update shobjidl.idl. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 8 14:55:33 2016 New Revision: 70970 URL:
http://svn.reactos.org/svn/reactos?rev=70970&view=rev
Log: [PSDK] Update shobjidl.idl. CORE-10912 Modified: trunk/reactos/include/psdk/shobjidl.idl Modified: trunk/reactos/include/psdk/shobjidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shobjidl.idl?…
============================================================================== --- trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] Tue Mar 8 14:55:33 2016 @@ -4066,6 +4066,35 @@ [out, iid_is(riid)] void **presources); } + +typedef [v1_enum] enum ACTIVATEOPTIONS +{ + AO_NONE = 0x00000000, + AO_DESIGNMODE = 0x00000001, + AO_NOERRORUI = 0x00000002, + AO_NOSPLASHSCREEN = 0x00000004 +} ACTIVATEOPTIONS; + +[ + uuid(2e941141-7f97-4756-ba1d-9decde894a3d), + object, + pointer_default(unique) +] +interface IApplicationActivationManager : IUnknown +{ + HRESULT ActivateApplication([in] LPCWSTR appusermodelid, + [in, unique] LPCWSTR arguments, + [in] ACTIVATEOPTIONS options, + [out] DWORD *processid); + HRESULT ActivateForFile([in] LPCWSTR appusermodelid, + [in] IShellItemArray *itemarray, + [in, unique] LPCWSTR verb, + [out] DWORD *processid); + HRESULT ActivateForProtocol([in] LPCWSTR appusermodelid, + [in] IShellItemArray *itemarray, + [out] DWORD *processid); +} + /***************************************************************************** * ShellObjects typelibrary */ @@ -4160,6 +4189,14 @@ ] coclass ShellItem { interface IShellItem2; + } + + [ + uuid(45ba127d-10a8-46ea-8ab7-56ea9078943c) + ] + coclass ApplicationActivationManager + { + interface IApplicationActivationManager; } }
8 years, 9 months
1
0
0
0
[akhaldi] 70969: [BCRYPT] Implement mbedTLS backend. Brought to you by Peter Hater. CORE-10934
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 8 14:49:52 2016 New Revision: 70969 URL:
http://svn.reactos.org/svn/reactos?rev=70969&view=rev
Log: [BCRYPT] Implement mbedTLS backend. Brought to you by Peter Hater. CORE-10934 Modified: trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec trunk/reactos/dll/win32/bcrypt/CMakeLists.txt trunk/reactos/dll/win32/bcrypt/bcrypt_main.c trunk/reactos/include/reactos/wine/config.h Modified: trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mbedtls/mbedt…
============================================================================== --- trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/mbedtls/mbedtls.spec [iso-8859-1] Tue Mar 8 14:49:52 2016 @@ -29,4 +29,19 @@ @ cdecl mbedtls_cipher_info_from_type(long) @ cdecl mbedtls_md_info_from_type(long) @ cdecl mbedtls_pk_get_bitlen(ptr) -@ cdecl mbedtls_ctr_drbg_seed(ptr ptr ptr str long) +@ cdecl mbedtls_ctr_drbg_seed(ptr ptr ptr str long) +@ cdecl mbedtls_sha1_init(ptr) +@ cdecl mbedtls_sha1_starts(ptr) +@ cdecl mbedtls_sha1_update(ptr ptr long) +@ cdecl mbedtls_sha1_finish(ptr ptr) +@ cdecl mbedtls_sha1_free(ptr) +@ cdecl mbedtls_sha256_init(ptr) +@ cdecl mbedtls_sha256_starts(ptr long) +@ cdecl mbedtls_sha256_update(ptr ptr long) +@ cdecl mbedtls_sha256_finish(ptr ptr) +@ cdecl mbedtls_sha256_free(ptr) +@ cdecl mbedtls_sha512_init(ptr) +@ cdecl mbedtls_sha512_starts(ptr long) +@ cdecl mbedtls_sha512_update(ptr ptr long) +@ cdecl mbedtls_sha512_finish(ptr ptr) +@ cdecl mbedtls_sha512_free(ptr) Modified: trunk/reactos/dll/win32/bcrypt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/bcrypt/CMakeList…
============================================================================== --- trunk/reactos/dll/win32/bcrypt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/bcrypt/CMakeLists.txt [iso-8859-1] Tue Mar 8 14:49:52 2016 @@ -1,6 +1,8 @@ add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +include_directories( + ${REACTOS_SOURCE_DIR}/include/reactos/wine + ${REACTOS_SOURCE_DIR}/include/reactos/libs/mbedtls) spec2def(bcrypt.dll bcrypt.spec ADD_IMPORTLIB) list(APPEND SOURCE @@ -12,5 +14,5 @@ add_library(bcrypt SHARED ${SOURCE}) set_module_type(bcrypt win32dll) target_link_libraries(bcrypt wine) -add_importlibs(bcrypt advapi32 msvcrt kernel32 ntdll) +add_importlibs(bcrypt mbedtls advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET bcrypt DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/bcrypt/bcrypt_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/bcrypt/bcrypt_ma…
============================================================================== --- trunk/reactos/dll/win32/bcrypt/bcrypt_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/bcrypt/bcrypt_main.c [iso-8859-1] Tue Mar 8 14:49:52 2016 @@ -18,6 +18,7 @@ */ #include <wine/config.h> +#include <wine/port.h> #include <ntstatus.h> #define WIN32_NO_STATUS @@ -28,6 +29,13 @@ #include <wine/debug.h> #include <wine/unicode.h> +#include <wine/library.h> + +#ifdef SONAME_LIBMBEDTLS +#include <mbedtls/sha1.h> +#include <mbedtls/sha256.h> +#include <mbedtls/sha512.h> +#endif WINE_DEFAULT_DEBUG_CHANNEL(bcrypt); @@ -106,7 +114,91 @@ wine_dlclose( libgnutls_handle, NULL, 0 ); libgnutls_handle = NULL; } -#endif /* HAVE_GNUTLS_HASH && !HAVE_COMMONCRYPTO_COMMONDIGEST_H */ +#elif defined(SONAME_LIBMBEDTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) && !defined(__REACTOS__) +WINE_DECLARE_DEBUG_CHANNEL(winediag); + +void *libmbedtls_handle; + +#define MAKE_FUNCPTR(f) static typeof(f) * p##f +MAKE_FUNCPTR(mbedtls_sha1_init); +MAKE_FUNCPTR(mbedtls_sha1_starts); +MAKE_FUNCPTR(mbedtls_sha1_update); +MAKE_FUNCPTR(mbedtls_sha1_finish); +MAKE_FUNCPTR(mbedtls_sha1_free); +MAKE_FUNCPTR(mbedtls_sha256_init); +MAKE_FUNCPTR(mbedtls_sha256_starts); +MAKE_FUNCPTR(mbedtls_sha256_update); +MAKE_FUNCPTR(mbedtls_sha256_finish); +MAKE_FUNCPTR(mbedtls_sha256_free); +MAKE_FUNCPTR(mbedtls_sha512_init); +MAKE_FUNCPTR(mbedtls_sha512_starts); +MAKE_FUNCPTR(mbedtls_sha512_update); +MAKE_FUNCPTR(mbedtls_sha512_finish); +MAKE_FUNCPTR(mbedtls_sha512_free); +#undef MAKE_FUNCPTR + +#define mbedtls_sha1_init pmbedtls_sha1_init +#define mbedtls_sha1_starts pmbedtls_sha1_starts +#define mbedtls_sha1_update pmbedtls_sha1_update +#define mbedtls_sha1_finish pmbedtls_sha1_finish +#define mbedtls_sha1_free pmbedtls_sha1_free +#define mbedtls_sha256_init pmbedtls_sha256_init +#define mbedtls_sha256_starts pmbedtls_sha256_starts +#define mbedtls_sha256_update pmbedtls_sha256_update +#define mbedtls_sha256_finish pmbedtls_sha256_finish +#define mbedtls_sha256_free pmbedtls_sha256_free +#define mbedtls_sha512_init pmbedtls_sha512_init +#define mbedtls_sha512_starts pmbedtls_sha512_starts +#define mbedtls_sha512_update pmbedtls_sha512_update +#define mbedtls_sha512_finish pmbedtls_sha512_finish +#define mbedtls_sha512_free pmbedtls_sha512_free + +static BOOL mbedtls_initialize(void) +{ + if (!(libmbedtls_handle = wine_dlopen( SONAME_LIBMBEDTLS, RTLD_NOW, NULL, 0 ))) + { + ERR_(winediag)( "failed to load libmbedtls, no support for crypto hashes\n" ); + return FALSE; + } + +#define LOAD_FUNCPTR(f) \ + if (!(p##f = wine_dlsym( libmbedtls_handle, #f, NULL, 0 ))) \ + { \ + ERR( "failed to load %s\n", #f ); \ + goto fail; \ + } + + LOAD_FUNCPTR(mbedtls_sha1_init) + LOAD_FUNCPTR(mbedtls_sha1_starts) + LOAD_FUNCPTR(mbedtls_sha1_update) + LOAD_FUNCPTR(mbedtls_sha1_finish) + LOAD_FUNCPTR(mbedtls_sha1_free); + LOAD_FUNCPTR(mbedtls_sha256_init) + LOAD_FUNCPTR(mbedtls_sha256_starts) + LOAD_FUNCPTR(mbedtls_sha256_update) + LOAD_FUNCPTR(mbedtls_sha256_finish) + LOAD_FUNCPTR(mbedtls_sha256_free); + LOAD_FUNCPTR(mbedtls_sha512_init) + LOAD_FUNCPTR(mbedtls_sha512_starts) + LOAD_FUNCPTR(mbedtls_sha512_update) + LOAD_FUNCPTR(mbedtls_sha512_finish) + LOAD_FUNCPTR(mbedtls_sha512_free); +#undef LOAD_FUNCPTR + + return TRUE; + +fail: + wine_dlclose( libmbedtls_handle, NULL, 0 ); + libmbedtls_handle = NULL; + return FALSE; +} + +static void mbedtls_uninitialize(void) +{ + wine_dlclose( libmbedtls_handle, NULL, 0 ); + libmbedtls_handle = NULL; +} +#endif /* SONAME_LIBMBEDTLS && !HAVE_COMMONCRYPTO_COMMONDIGEST_H && !__REACTOS__ */ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount, BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList, ULONG dwFlags) @@ -390,6 +482,108 @@ pgnutls_hash_deinit( hash->handle, output ); return STATUS_SUCCESS; } +#elif defined(SONAME_LIBMBEDTLS) +struct hash +{ + struct object hdr; + enum alg_id alg_id; + union + { + mbedtls_sha1_context sha1_ctx; + mbedtls_sha256_context sha256_ctx; + mbedtls_sha512_context sha512_ctx; + } u; +}; + +static NTSTATUS hash_init( struct hash *hash ) +{ +#ifndef __REACTOS__ + if (!libmbedtls_handle) return STATUS_INTERNAL_ERROR; +#endif + switch (hash->alg_id) + { + case ALG_ID_SHA1: + mbedtls_sha1_init(&hash->u.sha1_ctx); + mbedtls_sha1_starts(&hash->u.sha1_ctx); + break; + + case ALG_ID_SHA256: + mbedtls_sha256_init(&hash->u.sha256_ctx); + mbedtls_sha256_starts(&hash->u.sha256_ctx, FALSE); + break; + + case ALG_ID_SHA384: + case ALG_ID_SHA512: + mbedtls_sha512_init(&hash->u.sha512_ctx); + mbedtls_sha512_starts(&hash->u.sha512_ctx, hash->alg_id==ALG_ID_SHA384); + break; + + default: + ERR( "unhandled id %u\n", hash->alg_id ); + return STATUS_NOT_IMPLEMENTED; + } + + return STATUS_SUCCESS; +} + +static NTSTATUS hash_update( struct hash *hash, UCHAR *input, ULONG size ) +{ +#ifndef __REACTOS__ + if (!libmbedtls_handle) return STATUS_INTERNAL_ERROR; +#endif + switch (hash->alg_id) + { + case ALG_ID_SHA1: + mbedtls_sha1_update(&hash->u.sha1_ctx, input, size); + break; + + case ALG_ID_SHA256: + mbedtls_sha256_update(&hash->u.sha256_ctx, input, size); + break; + + case ALG_ID_SHA384: + case ALG_ID_SHA512: + mbedtls_sha512_update(&hash->u.sha512_ctx, input, size); + break; + + default: + ERR( "unhandled id %u\n", hash->alg_id ); + return STATUS_NOT_IMPLEMENTED; + } + + return STATUS_SUCCESS; +} + +static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size ) +{ +#ifndef __REACTOS__ + if (!libmbedtls_handle) return STATUS_INTERNAL_ERROR; +#endif + switch (hash->alg_id) + { + case ALG_ID_SHA1: + mbedtls_sha1_finish(&hash->u.sha1_ctx, output); + mbedtls_sha1_free(&hash->u.sha1_ctx); + break; + + case ALG_ID_SHA256: + mbedtls_sha256_finish(&hash->u.sha256_ctx, output); + mbedtls_sha256_free(&hash->u.sha256_ctx); + break; + + case ALG_ID_SHA384: + case ALG_ID_SHA512: + mbedtls_sha512_finish(&hash->u.sha512_ctx, output); + mbedtls_sha512_free(&hash->u.sha512_ctx); + break; + + default: + ERR( "unhandled id %u\n", hash->alg_id ); + return STATUS_NOT_IMPLEMENTED; + } + + return STATUS_SUCCESS; +} #else struct hash { @@ -621,6 +815,8 @@ DisableThreadLibraryCalls( hinst ); #if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) gnutls_initialize(); +#elif defined(SONAME_LIBMBEDTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) && !defined(__REACTOS__) + mbedtls_initialize(); #endif break; @@ -628,6 +824,8 @@ if (reserved) break; #if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) gnutls_uninitialize(); +#elif defined(SONAME_LIBMBEDTLS) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) && !defined(__REACTOS__) + mbedtls_uninitialize(); #endif break; } Modified: trunk/reactos/include/reactos/wine/config.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/confi…
============================================================================== --- trunk/reactos/include/reactos/wine/config.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/config.h [iso-8859-1] Tue Mar 8 14:49:52 2016 @@ -1242,7 +1242,7 @@ #define SONAME_LIBJPEG "libjpeg" /* Define to the soname of the libmbedtls library. */ -#define SONAME_LIBMBEDTLS L"mbedtls" +#define SONAME_LIBMBEDTLS "mbedtls" /* Define to the soname of the libncurses library. */ /* #undef SONAME_LIBNCURSES */
8 years, 9 months
1
0
0
0
[akhaldi] 70968: [PSDK] Update xmldomdid.h. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Mar 7 16:32:35 2016 New Revision: 70968 URL:
http://svn.reactos.org/svn/reactos?rev=70968&view=rev
Log: [PSDK] Update xmldomdid.h. CORE-10912 Modified: trunk/reactos/include/psdk/xmldomdid.h Modified: trunk/reactos/include/psdk/xmldomdid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/xmldomdid.h?r…
============================================================================== --- trunk/reactos/include/psdk/xmldomdid.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/xmldomdid.h [iso-8859-1] Mon Mar 7 16:32:35 2016 @@ -19,173 +19,174 @@ #ifndef __XMLDOMDID_H__ #define __XMLDOMDID_H__ -#define DISPID_DOM_BASE 1 -#define DISPID_DOM_COLLECTION_BASE 1000000 -#define DISPID_DOM_COLLECTION_MAX 2999999 - -#define DISPID_DOM_NODE 1 -#define DISPID_DOM_NODE_NODENAME 2 -#define DISPID_DOM_NODE_NODEVALUE 3 -#define DISPID_DOM_NODE_NODETYPE 4 -#define DISPID_DOM_NODE_NODETYPEENUM 5 -#define DISPID_DOM_NODE_PARENTNODE 6 -#define DISPID_DOM_NODE_CHILDNODES 7 -#define DISPID_DOM_NODE_FIRSTCHILD 8 -#define DISPID_DOM_NODE_LASTCHILD 9 -#define DISPID_DOM_NODE_PREVIOUSSIBLING 10 -#define DISPID_DOM_NODE_NEXTSIBLING 11 -#define DISPID_DOM_NODE_ATTRIBUTES 12 -#define DISPID_DOM_NODE_INSERTBEFORE 13 -#define DISPID_DOM_NODE_REPLACECHILD 14 -#define DISPID_DOM_NODE_REMOVECHILD 15 -#define DISPID_DOM_NODE_APPENDCHILD 16 -#define DISPID_DOM_NODE_HASCHILDNODES 17 -#define DISPID_DOM_NODE_OWNERDOC 18 -#define DISPID_DOM_NODE_CLONENODE 19 - -#define DISPID_XMLDOM_NODE 20 -#define DISPID_XMLDOM_NODE_STRINGTYPE 21 -#define DISPID_XMLDOM_NODE_SPECIFIED 22 -#define DISPID_XMLDOM_NODE_DEFINITION 23 -#define DISPID_XMLDOM_NODE_TEXT 24 -#define DISPID_XMLDOM_NODE_NODETYPEDVALUE 25 -#define DISPID_XMLDOM_NODE_DATATYPE 26 -#define DISPID_XMLDOM_NODE_XML 27 -#define DISPID_XMLDOM_NODE_TRANSFORMNODE 28 -#define DISPID_XMLDOM_NODE_SELECTNODES 29 -#define DISPID_XMLDOM_NODE_SELECTSINGLENODE 30 -#define DISPID_XMLDOM_NODE_PARSED 31 -#define DISPID_XMLDOM_NODE_NAMESPACE 32 -#define DISPID_XMLDOM_NODE_PREFIX 33 -#define DISPID_XMLDOM_NODE_BASENAME 34 -#define DISPID_XMLDOM_NODE_TRANSFORMNODETOOBJECT 35 -#define DISPID_XMLDOM_NODE__TOP 36 - -#define DISPID_DOM_DOCUMENT 37 -#define DISPID_DOM_DOCUMENT_DOCTYPE 38 -#define DISPID_DOM_DOCUMENT_IMPLEMENTATION 39 -#define DISPID_DOM_DOCUMENT_DOCUMENTELEMENT 40 -#define DISPID_DOM_DOCUMENT_CREATEELEMENT 41 -#define DISPID_DOM_DOCUMENT_CREATEDOCUMENTFRAGMENT 42 -#define DISPID_DOM_DOCUMENT_CREATETEXTNODE 43 -#define DISPID_DOM_DOCUMENT_CREATECOMMENT 44 -#define DISPID_DOM_DOCUMENT_CREATECDATASECTION 45 -#define DISPID_DOM_DOCUMENT_CREATEPROCESSINGINSTRUCTION 46 -#define DISPID_DOM_DOCUMENT_CREATEATTRIBUTE 47 -#define DISPID_DOM_DOCUMENT_CREATEENTITY 48 -#define DISPID_DOM_DOCUMENT_CREATEENTITYREFERENCE 49 -#define DISPID_DOM_DOCUMENT_GETELEMENTSBYTAGNAME 50 -#define DISPID_DOM_DOCUMENT_TOP 51 - -#define DISPID_XMLDOM_DOCUMENT 52 -#define DISPID_XMLDOM_DOCUMENT_DOCUMENTNODE 53 -#define DISPID_XMLDOM_DOCUMENT_CREATENODE 54 -#define DISPID_XMLDOM_DOCUMENT_CREATENODEEX 55 -#define DISPID_XMLDOM_DOCUMENT_NODEFROMID 56 -#define DISPID_XMLDOM_DOCUMENT_DOCUMENTNAMESPACES 57 -#define DISPID_XMLDOM_DOCUMENT_LOAD 58 -#define DISPID_XMLDOM_DOCUMENT_PARSEERROR 59 -#define DISPID_XMLDOM_DOCUMENT_URL 60 -#define DISPID_XMLDOM_DOCUMENT_ASYNC 61 -#define DISPID_XMLDOM_DOCUMENT_ABORT 62 -#define DISPID_XMLDOM_DOCUMENT_LOADXML 63 -#define DISPID_XMLDOM_DOCUMENT_SAVE 64 -#define DISPID_XMLDOM_DOCUMENT_VALIDATE 65 -#define DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE 66 -#define DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE 67 -#define DISPID_XMLDOM_DOCUMENT_ONREADYSTATECHANGE 68 -#define DISPID_XMLDOM_DOCUMENT_ONDATAAVAILABLE 69 -#define DISPID_XMLDOM_DOCUMENT_ONTRANSFORMNODE 70 -#define DISPID_XMLDOM_DOCUMENT__TOP 71 - -#define DISPID_DOM_NODELIST 72 -#define DISPID_DOM_NODELIST_ITEM 73 -#define DISPID_DOM_NODELIST_LENGTH 74 - -#define DISPID_XMLDOM_NODELIST 75 -#define DISPID_XMLDOM_NODELIST_NEXTNODE 76 -#define DISPID_XMLDOM_NODELIST_RESET 77 -#define DISPID_XMLDOM_NODELIST_NEWENUM 78 -#define DISPID_XMLDOM_NODELIST__TOP 79 - -#define DISPID_DOM_NAMEDNODEMAP 80 -#define DISPID_DOM_NAMEDNODEMAP_GETNAMEDITEM 81 -#define DISPID_DOM_NAMEDNODEMAP_SETNAMEDITEM 82 -#define DISPID_DOM_NAMEDNODEMAP_REMOVENAMEDITEM 83 - -#define DISPID_XMLDOM_NAMEDNODEMAP 84 -#define DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM 85 -#define DISPID_XMLDOM_NAMEDNODEMAP_REMOVEQUALIFIEDITEM 86 -#define DISPID_XMLDOM_NAMEDNODEMAP_NEXTNODE 87 -#define DISPID_XMLDOM_NAMEDNODEMAP_RESET 88 -#define DISPID_XMLDOM_NAMEDNODEMAP_NEWENUM 89 -#define DISPID_XMLDOM_NAMEDNODEMAP__TOP 90 - -#define DISPID_DOM_W3CWRAPPERS 91 - -#define DISPID_DOM_DOCUMENTFRAGMENT 92 -#define DISPID_DOM_DOCUMENTFRAGMENT__TOP 93 - -#define DISPID_DOM_ELEMENT 94 -#define DISPID_DOM_ELEMENT_GETTAGNAME 95 -#define DISPID_DOM_ELEMENT_GETATTRIBUTES 96 -#define DISPID_DOM_ELEMENT_GETATTRIBUTE 97 -#define DISPID_DOM_ELEMENT_SETATTRIBUTE 98 -#define DISPID_DOM_ELEMENT_REMOVEATTRIBUTE 99 -#define DISPID_DOM_ELEMENT_GETATTRIBUTENODE 100 -#define DISPID_DOM_ELEMENT_SETATTRIBUTENODE 101 -#define DISPID_DOM_ELEMENT_REMOVEATTRIBUTENODE 102 -#define DISPID_DOM_ELEMENT_GETELEMENTSBYTAGNAME 103 -#define DISPID_DOM_ELEMENT_NORMALIZE 104 -#define DISPID_DOM_ELEMENT__TOP 105 - -#define DISPID_DOM_DATA 106 -#define DISPID_DOM_DATA_DATA 107 -#define DISPID_DOM_DATA_LENGTH 108 -#define DISPID_DOM_DATA_SUBSTRING 109 -#define DISPID_DOM_DATA_APPEND 110 -#define DISPID_DOM_DATA_INSERT 111 -#define DISPID_DOM_DATA_DELETE 112 -#define DISPID_DOM_DATA_REPLACE 113 -#define DISPID_DOM_DATA__TOP 114 - -#define DISPID_DOM_ATTRIBUTE 115 -#define DISPID_DOM_ATTRIBUTE_GETNAME 116 -#define DISPID_DOM_ATTRIBUTE_SPECIFIED 117 -#define DISPID_DOM_ATTRIBUTE_VALUE 118 -#define DISPID_DOM_ATTRIBUTE__TOP 119 - -#define DISPID_DOM_TEXT 120 -#define DISPID_DOM_TEXT_SPLITTEXT 121 -#define DISPID_DOM_TEXT_JOINTEXT 122 -#define DISPID_DOM_TEXT__TOP 123 - -#define DISPID_DOM_PI 124 -#define DISPID_DOM_PI_TARGET 125 -#define DISPID_DOM_PI_DATA 126 -#define DISPID_DOM_PI__TOP 127 - -#define DISPID_DOM_DOCUMENTTYPE 128 -#define DISPID_DOM_DOCUMENTTYPE_NAME 129 -#define DISPID_DOM_DOCUMENTTYPE_ENTITIES 130 -#define DISPID_DOM_DOCUMENTTYPE_NOTATIONS 131 -#define DISPID_DOM_DOCUMENTTYPE__TOP 132 - -#define DISPID_DOM_NOTATION 133 -#define DISPID_DOM_NOTATION_PUBLICID 134 -#define DISPID_DOM_NOTATION_SYSTEMID 135 -#define DISPID_DOM_NOTATION__TOP 136 - -#define DISPID_DOM_ENTITY 137 -#define DISPID_DOM_ENTITY_PUBLICID 138 -#define DISPID_DOM_ENTITY_SYSTEMID 139 -#define DISPID_DOM_ENTITY_NOTATIONNAME 140 -#define DISPID_DOM_ENTITY__TOP 141 - -#define DISPID_DOM_IMPLEMENTATION 142 -#define DISPID_DOM_IMPLEMENTATION_HASFEATURE 143 -#define DISPID_DOM_IMPLEMENTATION__TOP 144 - +#define DISPID_DOM_BASE 0x00000001 +#define DISPID_DOM_COLLECTION_BASE 0x000f4240 +#define DISPID_DOM_COLLECTION_MAX 0x002dc6bf + +#define DISPID_DOM_NODE 0x00000001 +#define DISPID_DOM_NODE_NODENAME 0x00000002 +#define DISPID_DOM_NODE_NODEVALUE 0x00000003 +#define DISPID_DOM_NODE_NODETYPE 0x00000004 +#define DISPID_DOM_NODE_NODETYPEENUM 0x00000005 +#define DISPID_DOM_NODE_PARENTNODE 0x00000006 +#define DISPID_DOM_NODE_CHILDNODES 0x00000007 +#define DISPID_DOM_NODE_FIRSTCHILD 0x00000008 +#define DISPID_DOM_NODE_LASTCHILD 0x00000009 +#define DISPID_DOM_NODE_PREVIOUSSIBLING 0x0000000a +#define DISPID_DOM_NODE_NEXTSIBLING 0x0000000b +#define DISPID_DOM_NODE_ATTRIBUTES 0x0000000c +#define DISPID_DOM_NODE_INSERTBEFORE 0x0000000d +#define DISPID_DOM_NODE_REPLACECHILD 0x0000000e +#define DISPID_DOM_NODE_REMOVECHILD 0x0000000f +#define DISPID_DOM_NODE_APPENDCHILD 0x00000010 +#define DISPID_DOM_NODE_HASCHILDNODES 0x00000011 +#define DISPID_DOM_NODE_OWNERDOC 0x00000012 +#define DISPID_DOM_NODE_CLONENODE 0x00000013 + +#define DISPID_XMLDOM_NODE 0x00000014 +#define DISPID_XMLDOM_NODE_STRINGTYPE 0x00000015 +#define DISPID_XMLDOM_NODE_SPECIFIED 0x00000016 +#define DISPID_XMLDOM_NODE_DEFINITION 0x00000017 +#define DISPID_XMLDOM_NODE_TEXT 0x00000018 +#define DISPID_XMLDOM_NODE_NODETYPEDVALUE 0x00000019 +#define DISPID_XMLDOM_NODE_DATATYPE 0x0000001a +#define DISPID_XMLDOM_NODE_XML 0x0000001b +#define DISPID_XMLDOM_NODE_TRANSFORMNODE 0x0000001c +#define DISPID_XMLDOM_NODE_SELECTNODES 0x0000001d +#define DISPID_XMLDOM_NODE_SELECTSINGLENODE 0x0000001e +#define DISPID_XMLDOM_NODE_PARSED 0x0000001f +#define DISPID_XMLDOM_NODE_NAMESPACE 0x00000020 +#define DISPID_XMLDOM_NODE_PREFIX 0x00000021 +#define DISPID_XMLDOM_NODE_BASENAME 0x00000022 +#define DISPID_XMLDOM_NODE_TRANSFORMNODETOOBJECT 0x00000023 +#define DISPID_XMLDOM_NODE__TOP 0x00000024 + +#define DISPID_DOM_DOCUMENT 0x00000025 +#define DISPID_DOM_DOCUMENT_DOCTYPE 0x00000026 +#define DISPID_DOM_DOCUMENT_IMPLEMENTATION 0x00000027 +#define DISPID_DOM_DOCUMENT_DOCUMENTELEMENT 0x00000028 +#define DISPID_DOM_DOCUMENT_CREATEELEMENT 0x00000029 +#define DISPID_DOM_DOCUMENT_CREATEDOCUMENTFRAGMENT 0x0000002a +#define DISPID_DOM_DOCUMENT_CREATETEXTNODE 0x0000002b +#define DISPID_DOM_DOCUMENT_CREATECOMMENT 0x0000002c +#define DISPID_DOM_DOCUMENT_CREATECDATASECTION 0x0000002d +#define DISPID_DOM_DOCUMENT_CREATEPROCESSINGINSTRUCTION 0x0000002e +#define DISPID_DOM_DOCUMENT_CREATEATTRIBUTE 0x0000002f +#define DISPID_DOM_DOCUMENT_CREATEENTITY 0x00000030 +#define DISPID_DOM_DOCUMENT_CREATEENTITYREFERENCE 0x00000031 +#define DISPID_DOM_DOCUMENT_GETELEMENTSBYTAGNAME 0x00000032 +#define DISPID_DOM_DOCUMENT_TOP 0x00000033 + +#define DISPID_XMLDOM_DOCUMENT 0x00000034 +#define DISPID_XMLDOM_DOCUMENT_DOCUMENTNODE 0x00000035 +#define DISPID_XMLDOM_DOCUMENT_CREATENODE 0x00000036 +#define DISPID_XMLDOM_DOCUMENT_CREATENODEEX 0x00000037 +#define DISPID_XMLDOM_DOCUMENT_NODEFROMID 0x00000038 +#define DISPID_XMLDOM_DOCUMENT_DOCUMENTNAMESPACES 0x00000039 +#define DISPID_XMLDOM_DOCUMENT_LOAD 0x0000003a +#define DISPID_XMLDOM_DOCUMENT_PARSEERROR 0x0000003b +#define DISPID_XMLDOM_DOCUMENT_URL 0x0000003c +#define DISPID_XMLDOM_DOCUMENT_ASYNC 0x0000003d +#define DISPID_XMLDOM_DOCUMENT_ABORT 0x0000003e +#define DISPID_XMLDOM_DOCUMENT_LOADXML 0x0000003f +#define DISPID_XMLDOM_DOCUMENT_SAVE 0x00000040 +#define DISPID_XMLDOM_DOCUMENT_VALIDATE 0x00000041 +#define DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE 0x00000042 +#define DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE 0x00000043 +#define DISPID_XMLDOM_DOCUMENT_ONREADYSTATECHANGE 0x00000044 +#define DISPID_XMLDOM_DOCUMENT_ONDATAAVAILABLE 0x00000045 +#define DISPID_XMLDOM_DOCUMENT_ONTRANSFORMNODE 0x00000046 +#define DISPID_XMLDOM_DOCUMENT__TOP 0x00000047 + +#define DISPID_DOM_NODELIST 0x00000048 +#define DISPID_DOM_NODELIST_ITEM 0x00000049 +#define DISPID_DOM_NODELIST_LENGTH 0x0000004a +#define DISPID_XMLDOM_NODELIST 0x0000004b +#define DISPID_XMLDOM_NODELIST_NEXTNODE 0x0000004c +#define DISPID_XMLDOM_NODELIST_RESET 0x0000004d +#define DISPID_XMLDOM_NODELIST_NEWENUM 0x0000004e +#define DISPID_XMLDOM_NODELIST__TOP 0x0000004f + +#define DISPID_DOM_NAMEDNODEMAP 0x00000050 +#define DISPID_DOM_NAMEDNODEMAP_GETNAMEDITEM 0x00000053 +#define DISPID_DOM_NAMEDNODEMAP_SETNAMEDITEM 0x00000054 +#define DISPID_DOM_NAMEDNODEMAP_REMOVENAMEDITEM 0x00000055 +#define DISPID_XMLDOM_NAMEDNODEMAP 0x00000056 +#define DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM 0x00000057 +#define DISPID_XMLDOM_NAMEDNODEMAP_REMOVEQUALIFIEDITEM 0x00000058 +#define DISPID_XMLDOM_NAMEDNODEMAP_NEXTNODE 0x00000059 +#define DISPID_XMLDOM_NAMEDNODEMAP_RESET 0x0000005a +#define DISPID_XMLDOM_NAMEDNODEMAP_NEWENUM 0x0000005b +#define DISPID_XMLDOM_NAMEDNODEMAP__TOP 0x0000005c + +#define DISPID_DOM_W3CWRAPPERS 0x0000005d + +#define DISPID_DOM_DOCUMENTFRAGMENT 0x0000005e +#define DISPID_DOM_DOCUMENTFRAGMENT__TOP 0x0000005f + +#define DISPID_DOM_ELEMENT 0x00000060 +#define DISPID_DOM_ELEMENT_GETTAGNAME 0x00000061 +#define DISPID_DOM_ELEMENT_GETATTRIBUTES 0x00000062 +#define DISPID_DOM_ELEMENT_GETATTRIBUTE 0x00000063 +#define DISPID_DOM_ELEMENT_SETATTRIBUTE 0x00000064 +#define DISPID_DOM_ELEMENT_REMOVEATTRIBUTE 0x00000065 +#define DISPID_DOM_ELEMENT_GETATTRIBUTENODE 0x00000066 +#define DISPID_DOM_ELEMENT_SETATTRIBUTENODE 0x00000067 +#define DISPID_DOM_ELEMENT_REMOVEATTRIBUTENODE 0x00000068 +#define DISPID_DOM_ELEMENT_GETELEMENTSBYTAGNAME 0x00000069 +#define DISPID_DOM_ELEMENT_NORMALIZE 0x0000006a +#define DISPID_DOM_ELEMENT__TOP 0x0000006b + +#define DISPID_DOM_DATA 0x0000006c +#define DISPID_DOM_DATA_DATA 0x0000006d +#define DISPID_DOM_DATA_LENGTH 0x0000006e +#define DISPID_DOM_DATA_SUBSTRING 0x0000006f +#define DISPID_DOM_DATA_APPEND 0x00000070 +#define DISPID_DOM_DATA_INSERT 0x00000071 +#define DISPID_DOM_DATA_DELETE 0x00000072 +#define DISPID_DOM_DATA_REPLACE 0x00000073 +#define DISPID_DOM_DATA__TOP 0x00000074 + +#define DISPID_DOM_ATTRIBUTE 0x00000075 +#define DISPID_DOM_ATTRIBUTE_GETNAME 0x00000076 +#define DISPID_DOM_ATTRIBUTE_SPECIFIED 0x00000077 +#define DISPID_DOM_ATTRIBUTE_VALUE 0x00000078 +#define DISPID_DOM_ATTRIBUTE__TOP 0x00000079 + +#define DISPID_DOM_TEXT 0x0000007a +#define DISPID_DOM_TEXT_SPLITTEXT 0x0000007b +#define DISPID_DOM_TEXT_JOINTEXT 0x0000007c +#define DISPID_DOM_TEXT__TOP 0x0000007d + +#define DISPID_DOM_PI 0x0000007e +#define DISPID_DOM_PI_TARGET 0x0000007f +#define DISPID_DOM_PI_DATA 0x00000080 +#define DISPID_DOM_PI__TOP 0x00000081 + +#define DISPID_DOM_DOCUMENTTYPE 0x00000082 +#define DISPID_DOM_DOCUMENTTYPE_NAME 0x00000083 +#define DISPID_DOM_DOCUMENTTYPE_ENTITIES 0x00000084 +#define DISPID_DOM_DOCUMENTTYPE_NOTATIONS 0x00000085 +#define DISPID_DOM_DOCUMENTTYPE__TOP 0x00000086 + +#define DISPID_DOM_NOTATION 0x00000087 +#define DISPID_DOM_NOTATION_PUBLICID 0x00000088 +#define DISPID_DOM_NOTATION_SYSTEMID 0x00000089 +#define DISPID_DOM_NOTATION__TOP 0x0000008a + +#define DISPID_DOM_ENTITY 0x0000008b +#define DISPID_DOM_ENTITY_PUBLICID 0x0000008c +#define DISPID_DOM_ENTITY_SYSTEMID 0x0000008d +#define DISPID_DOM_ENTITY_NOTATIONNAME 0x0000008e +#define DISPID_DOM_ENTITY__TOP 0x0000008f + +#define DISPID_DOM_W3CWRAPPERS_TOP 0x0000008f + +#define DISPID_DOM_IMPLEMENTATION 0x00000090 +#define DISPID_DOM_IMPLEMENTATION_HASFEATURE 0x00000091 +#define DISPID_DOM_IMPLEMENTATION__TOP 0x00000092 + +#define DISPID_DOM__TOP 0x000000af #define DISPID_DOM_ERROR 0x000000b0 #define DISPID_DOM_ERROR_ERRORCODE 0x000000b1 @@ -197,9 +198,21 @@ #define DISPID_DOM_ERROR_FILEPOS 0x000000b7 #define DISPID_DOM_ERROR__TOP 0x000000b8 -#define DISPID_XMLDOMEVENT 197 +#define DISPID_XTLRUNTIME 0x000000b9 +#define DISPID_XTLRUNTIME_UNIQUEID 0x000000ba +#define DISPID_XTLRUNTIME_DEPTH 0x000000bb +#define DISPID_XTLRUNTIME_CHILDNUMBER 0x000000bc +#define DISPID_XTLRUNTIME_ANCESTORCHILDNUMBER 0x000000bd +#define DISPID_XTLRUNTIME_ABSOLUTECHILDNUMBER 0x000000be +#define DISPID_XTLRUNTIME_FORMATINDEX 0x000000bf +#define DISPID_XTLRUNTIME_FORMATNUMBER 0x000000c0 +#define DISPID_XTLRUNTIME_FORMATDATE 0x000000c1 +#define DISPID_XTLRUNTIME_FORMATTIME 0x000000c2 +#define DISPID_XTLRUNTIME__TOP 0x000000c3 + +#define DISPID_XMLDOMEVENT 0x000000c4 #define DISPID_XMLDOMEVENT_ONREADYSTATECHANGE DISPID_READYSTATECHANGE -#define DISPID_XMLDOMEVENT_ONDATAAVAILABLE 198 -#define DISPID_XMLDOMEVENT__TOP 199 +#define DISPID_XMLDOMEVENT_ONDATAAVAILABLE 0x000000c5 +#define DISPID_XMLDOMEVENT__TOP 0x000000c6 #endif /* __XMLDOMDID_H__ */
8 years, 9 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
27
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Results per page:
10
25
50
100
200