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
2025
July
June
May
April
March
February
January
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 2010
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 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
19 participants
896 discussions
Start a n
N
ew thread
[cwittich] 45978: [OBJSEL] sync objsel to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Mar 7 10:29:02 2010 New Revision: 45978 URL:
http://svn.reactos.org/svn/reactos?rev=45978&view=rev
Log: [OBJSEL] sync objsel to wine 1.1.40 Modified: trunk/reactos/dll/win32/objsel/factory.c trunk/reactos/dll/win32/objsel/objsel.c Modified: trunk/reactos/dll/win32/objsel/factory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/factory.c…
============================================================================== --- trunk/reactos/dll/win32/objsel/factory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/objsel/factory.c [iso-8859-1] Sun Mar 7 10:29:02 2010 @@ -50,7 +50,7 @@ return IClassFactory_CreateInstance(iface, NULL, riid, ppvObj); } - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); + FIXME("- no interface IID: %s\n", debugstr_guid(riid)); return E_NOINTERFACE; } Modified: trunk/reactos/dll/win32/objsel/objsel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/objsel/objsel.c?…
============================================================================== --- trunk/reactos/dll/win32/objsel/objsel.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/objsel/objsel.c [iso-8859-1] Sun Mar 7 10:29:02 2010 @@ -55,7 +55,7 @@ if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker)) return IClassFactory_QueryInterface((IClassFactory*)&OBJSEL_ClassFactory, iid, ppv); - FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); + FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid)); return CLASS_E_CLASSNOTAVAILABLE; } @@ -147,7 +147,7 @@ return S_OK; } - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); + FIXME("- no interface IID: %s\n", debugstr_guid(riid)); return E_NOINTERFACE; }
15 years, 3 months
1
0
0
0
[cwittich] 45977: [SHELL32_WINETEST] sync shell32_winetest to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Mar 7 08:34:02 2010 New Revision: 45977 URL:
http://svn.reactos.org/svn/reactos?rev=45977&view=rev
Log: [SHELL32_WINETEST] sync shell32_winetest to wine 1.1.40 Modified: trunk/rostests/winetests/shell32/autocomplete.c trunk/rostests/winetests/shell32/shlexec.c trunk/rostests/winetests/shell32/shlfileop.c trunk/rostests/winetests/shell32/shlfolder.c Modified: trunk/rostests/winetests/shell32/autocomplete.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/autocom…
============================================================================== --- trunk/rostests/winetests/shell32/autocomplete.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/autocomplete.c [iso-8859-1] Sun Mar 7 08:34:02 2010 @@ -126,9 +126,8 @@ return; createMainWnd(); - - if(!ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n")) - return; + ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n"); + if (!hMainWnd) return; ac = test_init(); if (!ac) 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] Sun Mar 7 08:34:02 2010 @@ -672,28 +672,28 @@ return 0; } -static int _okChildString(const char* file, int line, const char* key, const char* expected) +static void _okChildString(const char* file, int line, const char* key, const char* expected) { char* result; result=getChildString("Arguments", key); - return ok_(file, line)(lstrcmpiA(result, expected) == 0, - "%s expected '%s', got '%s'\n", key, expected, result); -} - -static int _okChildPath(const char* file, int line, const char* key, const char* expected) + ok_(file, line)(lstrcmpiA(result, expected) == 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); - return ok_(file, line)(StrCmpPath(result, expected) == 0, - "%s expected '%s', got '%s'\n", key, expected, result); -} - -static int _okChildInt(const char* file, int line, const char* key, int expected) + 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); - return ok_(file, line)(result == expected, - "%s expected %d, but got %d\n", key, expected, result); + ok_(file, line)(result == expected, + "%s expected %d, but got %d\n", key, expected, result); } #define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected)) Modified: trunk/rostests/winetests/shell32/shlfileop.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlfile…
============================================================================== --- trunk/rostests/winetests/shell32/shlfileop.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlfileop.c [iso-8859-1] Sun Mar 7 08:34:02 2010 @@ -965,6 +965,26 @@ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1 to exist\n"); + /* try to overwrite an existing write protected file */ + clean_after_shfo_tests(); + init_shfo_tests(); + tmp_flags = shfo.fFlags; + shfo.pFrom = "test1.txt\0"; + shfo.pTo = "test2.txt\0"; + /* suppress the error-dialog in win9x here */ + shfo.fFlags = FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT; + ok(SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_READONLY), + "Failure to set file attributes (error %x)\n", GetLastError()); + retval = CopyFileA(shfo.pFrom, shfo.pTo, FALSE); + ok(!retval && GetLastError() == ERROR_ACCESS_DENIED, "CopyFileA should have fail with ERROR_ACCESS_DENIED\n"); + retval = SHFileOperationA(&shfo); + /* Does not work on Win95, Win95B, NT4WS and NT4SRV */ + ok(!retval || broken(retval == DE_OPCANCELLED), "SHFileOperationA failed to copy (error %x)\n", retval); + /* Set back normal attributes to make the file deletion succeed */ + ok(SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_NORMAL), + "Failure to set file attributes (error %x)\n", GetLastError()); + shfo.fFlags = tmp_flags; + /* try to copy files to a file */ clean_after_shfo_tests(); init_shfo_tests(); 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] Sun Mar 7 08:34:02 2010 @@ -54,7 +54,7 @@ static BOOL (WINAPI *pILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST); static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**); static LPITEMIDLIST (WINAPI *pILCombine)(LPCITEMIDLIST,LPCITEMIDLIST); - +static HRESULT (WINAPI *pSHParseDisplayName)(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*); static void init_function_pointers(void) { @@ -62,17 +62,24 @@ HRESULT hr; hmod = GetModuleHandleA("shell32.dll"); - pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent"); - pSHGetFolderPathA = (void*)GetProcAddress(hmod, "SHGetFolderPathA"); - pSHGetFolderPathAndSubDirA = (void*)GetProcAddress(hmod, "SHGetFolderPathAndSubDirA"); - pSHGetPathFromIDListW = (void*)GetProcAddress(hmod, "SHGetPathFromIDListW"); - pSHGetSpecialFolderPathA = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathA"); - pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW"); - pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16); - pILFree = (void*)GetProcAddress(hmod, (LPSTR)155); - pILIsEqual = (void*)GetProcAddress(hmod, (LPSTR)21); - pSHCreateShellItem = (void*)GetProcAddress(hmod, "SHCreateShellItem"); - pILCombine = (void*)GetProcAddress(hmod, (LPSTR)25); + +#define MAKEFUNC(f) (p##f = (void*)GetProcAddress(hmod, #f)) + MAKEFUNC(SHBindToParent); + MAKEFUNC(SHCreateShellItem); + MAKEFUNC(SHGetFolderPathA); + MAKEFUNC(SHGetFolderPathAndSubDirA); + MAKEFUNC(SHGetPathFromIDListW); + MAKEFUNC(SHGetSpecialFolderPathA); + MAKEFUNC(SHGetSpecialFolderPathW); + MAKEFUNC(SHParseDisplayName); +#undef MAKEFUNC + +#define MAKEFUNC_ORD(f, ord) (p##f = (void*)GetProcAddress(hmod, (LPSTR)(ord))) + MAKEFUNC_ORD(ILFindLastID, 16); + MAKEFUNC_ORD(ILIsEqual, 21); + MAKEFUNC_ORD(ILCombine, 25); + MAKEFUNC_ORD(ILFree, 155); +#undef MAKEFUNC_ORD hmod = GetModuleHandleA("shlwapi.dll"); pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW"); @@ -96,6 +103,24 @@ hr = SHGetDesktopFolder(&IDesktopFolder); if(hr != S_OK) return; + + /* Tests crash on W2K and below (SHCreateShellItem available as of XP) */ + if (pSHCreateShellItem) + { + /* null name and pidl */ + hr = IShellFolder_ParseDisplayName(IDesktopFolder, + NULL, NULL, NULL, NULL, NULL, 0); + ok(hr == E_INVALIDARG, "returned %08x, expected E_INVALIDARG\n", hr); + + /* null name */ + newPIDL = (ITEMIDLIST*)0xdeadbeef; + hr = IShellFolder_ParseDisplayName(IDesktopFolder, + NULL, NULL, NULL, NULL, &newPIDL, 0); + ok(newPIDL == 0, "expected null, got %p\n", newPIDL); + ok(hr == E_INVALIDARG, "returned %08x, expected E_INVALIDARG\n", hr); + } + else + win_skip("Tests would crash on W2K and below\n"); MultiByteToWideChar(CP_ACP, 0, cInetTestA, -1, cTestDirW, MAX_PATH); hr = IShellFolder_ParseDisplayName(IDesktopFolder, @@ -331,11 +356,12 @@ hr = IShellFolder_BindToObject(psfMyComputer, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); -#if 0 +if (0) +{ /* this call segfaults on 98SE */ hr = IShellFolder_BindToObject(psfMyComputer, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); -#endif +} cChars = GetSystemDirectoryA(szSystemDir, MAX_PATH); ok (cChars > 0 && cChars < MAX_PATH, "GetSystemDirectoryA failed! LastError: %u\n", GetLastError()); @@ -361,13 +387,14 @@ hr = IShellFolder_BindToObject(psfSystemDir, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); - -#if 0 + +if (0) +{ /* this call segfaults on 98SE */ hr = IShellFolder_BindToObject(psfSystemDir, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, + ok (hr == E_INVALIDARG, "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); -#endif +} IShellFolder_Release(psfSystemDir); } @@ -1564,7 +1591,7 @@ IShellFolder_Release(psfPersonal); } -static void testSHGetFolderPathAndSubDirA(void) +static void test_SHGetFolderPathAndSubDirA(void) { HRESULT ret; BOOL delret; @@ -1575,6 +1602,12 @@ static char appdata[MAX_PATH]; static char testpath[MAX_PATH]; static char toolongpath[MAX_PATH+1]; + + if(!pSHGetFolderPathAndSubDirA) + { + win_skip("SHGetFolderPathAndSubDirA not present!\n"); + return; + } if(!pSHGetFolderPathA) { win_skip("SHGetFolderPathA not present!\n"); @@ -1796,6 +1829,12 @@ static WCHAR testfileW[] = {'t','e','s','t','f','i','l','e',0}; GetCurrentDirectoryA(MAX_PATH, curdirA); + + if (!pSHCreateShellItem) + { + win_skip("SHCreateShellItem isn't available\n"); + return; + } if (!lstrlenA(curdirA)) { @@ -1942,6 +1981,69 @@ IShellFolder_Release(desktopfolder); } +static void test_SHParseDisplayName(void) +{ + static const WCHAR prefixW[] = {'w','t',0}; + LPITEMIDLIST pidl1, pidl2; + IShellFolder *desktop; + WCHAR dirW[MAX_PATH]; + WCHAR nameW[10]; + HRESULT hr; + BOOL ret; + + if (!pSHParseDisplayName) + { + win_skip("SHParseDisplayName isn't available\n"); + return; + } + +if (0) +{ + /* crashes on native */ + hr = pSHParseDisplayName(NULL, NULL, NULL, 0, NULL); + nameW[0] = 0; + hr = pSHParseDisplayName(nameW, NULL, NULL, 0, NULL); +} + + pidl1 = (LPITEMIDLIST)0xdeadbeef; + hr = pSHParseDisplayName(NULL, NULL, &pidl1, 0, NULL); + ok(broken(hr == E_OUTOFMEMORY) /* < Vista */ || + hr == E_INVALIDARG, "failed %08x\n", hr); + ok(pidl1 == 0, "expected null ptr, got %p\n", pidl1); + + /* dummy name */ + nameW[0] = 0; + hr = pSHParseDisplayName(nameW, NULL, &pidl1, 0, NULL); + ok(hr == S_OK, "failed %08x\n", hr); + hr = SHGetDesktopFolder(&desktop); + ok(hr == S_OK, "failed %08x\n", hr); + hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, nameW, NULL, &pidl2, NULL); + ok(hr == S_OK, "failed %08x\n", hr); + ret = pILIsEqual(pidl1, pidl2); + ok(ret == TRUE, "expected equal idls\n"); + pILFree(pidl1); + pILFree(pidl2); + + /* with path */ + GetTempPathW(sizeof(dirW)/sizeof(WCHAR), dirW); + GetTempFileNameW(dirW, prefixW, 0, dirW); + CreateFileW(dirW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + + hr = pSHParseDisplayName(dirW, NULL, &pidl1, 0, NULL); + ok(hr == S_OK, "failed %08x\n", hr); + hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, dirW, NULL, &pidl2, NULL); + ok(hr == S_OK, "failed %08x\n", hr); + + ret = pILIsEqual(pidl1, pidl2); + ok(ret == TRUE, "expected equal idls\n"); + pILFree(pidl1); + pILFree(pidl2); + + DeleteFileW(dirW); + + IShellFolder_Release(desktop); +} + START_TEST(shlfolder) { init_function_pointers(); @@ -1950,6 +2052,7 @@ OleInitialize(NULL); test_ParseDisplayName(); + test_SHParseDisplayName(); test_BindToObject(); test_EnumObjects_and_CompareIDs(); test_GetDisplayName(); @@ -1958,15 +2061,9 @@ test_CallForAttributes(); test_FolderShortcut(); test_ITEMIDLIST_format(); - if(pSHGetFolderPathAndSubDirA) - testSHGetFolderPathAndSubDirA(); - else - win_skip("SHGetFolderPathAndSubDirA not present\n"); + test_SHGetFolderPathAndSubDirA(); test_LocalizedNames(); - if(pSHCreateShellItem) - test_SHCreateShellItem(); - else - win_skip("SHCreateShellItem not present\n"); + test_SHCreateShellItem(); OleUninitialize(); }
15 years, 3 months
1
0
0
0
[cwittich] 45976: [USER32_WINETEST] sync user32_winetest to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Mar 7 08:32:14 2010 New Revision: 45976 URL:
http://svn.reactos.org/svn/reactos?rev=45976&view=rev
Log: [USER32_WINETEST] sync user32_winetest to wine 1.1.40 Modified: trunk/rostests/winetests/user32/dialog.c trunk/rostests/winetests/user32/edit.c trunk/rostests/winetests/user32/msg.c trunk/rostests/winetests/user32/scroll.c trunk/rostests/winetests/user32/win.c Modified: trunk/rostests/winetests/user32/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/dialog.c…
============================================================================== --- trunk/rostests/winetests/user32/dialog.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/dialog.c [iso-8859-1] Sun Mar 7 08:32:14 2010 @@ -852,8 +852,8 @@ ok ((g_hwndInitialFocusT1 == g_hwndButton2), "Error in initial focus when WM_INITDIALOG returned TRUE: " "Expected the second button (%p), got %s (%p).\n", - g_hwndButton2, GetHwndString(g_hwndInitialFocusT2), - g_hwndInitialFocusT2); + g_hwndButton2, GetHwndString(g_hwndInitialFocusT1), + g_hwndInitialFocusT1); ok ((g_hwndInitialFocusT2 == g_hwndButton2), "Error after first SetFocus() when WM_INITDIALOG returned TRUE: " @@ -926,6 +926,21 @@ return FALSE; } +static INT_PTR CALLBACK TestInitDialogHandleProc (HWND hDlg, UINT uiMsg, + WPARAM wParam, LPARAM lParam) +{ + if (uiMsg == WM_INITDIALOG) + { + HWND expected = GetNextDlgTabItem(hDlg, NULL, FALSE); + ok(expected == (HWND)wParam, + "Expected wParam to be the handle to the first tabstop control (%p), got %p\n", + expected, (HWND)wParam); + + EndDialog(hDlg, LOWORD(SendMessage(hDlg, DM_GETDEFID, 0, 0))); + return TRUE; + } + return FALSE; +} static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) @@ -977,6 +992,9 @@ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); + + ret = DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestInitDialogHandleProc, 0); + ok(ret == IDOK, "Expected IDOK\n"); ret = DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestDefButtonDlgProc, 0); ok(ret == IDOK, "Expected IDOK\n"); @@ -1139,6 +1157,55 @@ DestroyWindow(hDlg); } +static INT_PTR CALLBACK timer_message_dlg_proc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + static int count; + BOOL visible; + + switch (msg) + { + case WM_INITDIALOG: + visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; + ok(!visible, "Dialog should not be visible.\n"); + SetTimer(wnd, 1, 100, NULL); + Sleep(200); + return FALSE; + + case WM_COMMAND: + if (LOWORD(wparam) != IDCANCEL) return FALSE; + EndDialog(wnd, LOWORD(wparam)); + return TRUE; + + case WM_TIMER: + if (wparam != 1) return FALSE; + visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; + if (!count++) + { + ok(!visible, "Dialog should not be visible.\n"); + PostMessage(wnd, WM_USER, 0, 0); + } + else + { + ok(visible, "Dialog should be visible.\n"); + PostMessage(wnd, WM_COMMAND, IDCANCEL, 0); + } + return TRUE; + + case WM_USER: + visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; + ok(visible, "Dialog should be visible.\n"); + return TRUE; + + default: + return FALSE; + } +} + +static void test_timer_message(void) +{ + DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, timer_message_dlg_proc); +} + START_TEST(dialog) { g_hinst = GetModuleHandleA (0); @@ -1154,4 +1221,5 @@ test_DisabledDialogTest(); test_MessageBoxFontTest(); test_SaveRestoreFocus(); -} + test_timer_message(); +} Modified: trunk/rostests/winetests/user32/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/edit.c?r…
============================================================================== --- trunk/rostests/winetests/user32/edit.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/edit.c [iso-8859-1] Sun Mar 7 08:32:14 2010 @@ -1314,6 +1314,57 @@ ok( (r == 65535) || (r == 4294967295UL), "got limit %u (expected 65535 or 4294967295)\n", r); DestroyWindow(hwEdit); +} + +/* Test EM_SCROLL */ +static void test_edit_control_scroll(void) +{ + static const char *single_line_str = "a"; + static const char *multiline_str = "Test\r\nText"; + HWND hwEdit; + LONG ret; + + /* Check the return value when EM_SCROLL doesn't scroll + * anything. Should not return true unless any lines were actually + * scrolled. */ + hwEdit = CreateWindow( + "EDIT", + single_line_str, + WS_VSCROLL | ES_MULTILINE, + 1, 1, 100, 100, + NULL, NULL, hinst, NULL); + + assert(hwEdit); + + ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); + ok(!ret, "Returned %x, expected 0.\n", ret); + + ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEUP, 0); + ok(!ret, "Returned %x, expected 0.\n", ret); + + ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEUP, 0); + ok(!ret, "Returned %x, expected 0.\n", ret); + + ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEDOWN, 0); + ok(!ret, "Returned %x, expected 0.\n", ret); + + DestroyWindow (hwEdit); + + /* SB_PAGEDOWN while at the beginning of a buffer with few lines + should not cause EM_SCROLL to return a negative value of + scrolled lines that would put us "before" the beginning. */ + hwEdit = CreateWindow( + "EDIT", + multiline_str, + WS_VSCROLL | ES_MULTILINE, + 0, 0, 100, 100, + NULL, NULL, hinst, NULL); + assert(hwEdit); + + ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); + ok(!ret, "Returned %x, expected 0.\n", ret); + + DestroyWindow (hwEdit); } static void test_margins(void) @@ -2319,6 +2370,7 @@ test_edit_control_5(); test_edit_control_6(); test_edit_control_limittext(); + test_edit_control_scroll(); test_margins(); test_margins_font_change(); test_text_position(); Modified: trunk/rostests/winetests/user32/msg.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/msg.c?re…
============================================================================== --- trunk/rostests/winetests/user32/msg.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/msg.c [iso-8859-1] Sun Mar 7 08:32:14 2010 @@ -12080,6 +12080,13 @@ { 0, 0, FALSE }, { 0, WAIT_TIMEOUT, FALSE }, { 0, 0, FALSE }, + { 0, 0, FALSE }, +/* 15 */ { 0, 0, FALSE }, + { WAIT_TIMEOUT, 0, FALSE }, + { WAIT_TIMEOUT, 0, FALSE }, + { WAIT_TIMEOUT, 0, FALSE }, + { WAIT_TIMEOUT, 0, FALSE }, +/* 20 */ { WAIT_TIMEOUT, 0, FALSE }, }; static DWORD CALLBACK do_wait_idle_child_thread( void *arg ) @@ -12205,6 +12212,41 @@ WaitForSingleObject( thread, 10000 ); CloseHandle( thread ); break; + case 14: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, HWND_TOPMOST, 0, 0, PM_NOREMOVE ); + break; + case 15: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, HWND_BROADCAST, 0, 0, PM_NOREMOVE ); + break; + case 16: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, HWND_BOTTOM, 0, 0, PM_NOREMOVE ); + break; + case 17: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, (HWND)0xdeadbeef, 0, 0, PM_NOREMOVE ); + break; + case 18: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, HWND_NOTOPMOST, 0, 0, PM_NOREMOVE ); + break; + case 19: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, HWND_MESSAGE, 0, 0, PM_NOREMOVE ); + break; + case 20: + SetEvent( start_event ); + Sleep( 200 ); + PeekMessage( &msg, GetDesktopWindow(), 0, 0, PM_NOREMOVE ); + break; } WaitForSingleObject( end_event, 2000 ); CloseHandle( start_event ); Modified: trunk/rostests/winetests/user32/scroll.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/scroll.c…
============================================================================== --- trunk/rostests/winetests/user32/scroll.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/scroll.c [iso-8859-1] Sun Mar 7 08:32:14 2010 @@ -411,8 +411,8 @@ WS_OVERLAPPEDWINDOW|WS_VSCROLL|WS_HSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, GetModuleHandleA(NULL), 0 ); - if ( !ok( hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n" ) ) - return; + ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n"); + if (!hMainWnd) return; assert( hScroll ); Modified: trunk/rostests/winetests/user32/win.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/win.c?re…
============================================================================== --- trunk/rostests/winetests/user32/win.c [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/win.c [iso-8859-1] Sun Mar 7 08:32:14 2010 @@ -3424,6 +3424,14 @@ check_window_style(WS_CHILD, WS_EX_DLGMODALFRAME|WS_EX_STATICEDGE, WS_CHILD, WS_EX_STATICEDGE|WS_EX_WINDOWEDGE|WS_EX_DLGMODALFRAME); check_window_style(WS_CAPTION, WS_EX_STATICEDGE, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_STATICEDGE|WS_EX_WINDOWEDGE); check_window_style(0, WS_EX_APPWINDOW, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_APPWINDOW|WS_EX_WINDOWEDGE); + + if (pGetLayeredWindowAttributes) + { + check_window_style(0, WS_EX_LAYERED, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_LAYERED|WS_EX_WINDOWEDGE); + check_window_style(0, WS_EX_LAYERED|WS_EX_TRANSPARENT, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_WINDOWEDGE); + check_window_style(0, WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW, WS_CLIPSIBLINGS|WS_CAPTION, + WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW|WS_EX_WINDOWEDGE); + } } static void test_scrollwindow( HWND hwnd)
15 years, 3 months
1
0
0
0
[cwittich] 45975: [GDI32_WINETEST] sync gdi32_winetest to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Mar 7 08:29:40 2010 New Revision: 45975 URL:
http://svn.reactos.org/svn/reactos?rev=45975&view=rev
Log: [GDI32_WINETEST] sync gdi32_winetest to wine 1.1.40 Modified: trunk/rostests/winetests/gdi32/bitmap.c trunk/rostests/winetests/gdi32/dc.c Modified: trunk/rostests/winetests/gdi32/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/bitmap.c?…
============================================================================== --- trunk/rostests/winetests/gdi32/bitmap.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/bitmap.c [iso-8859-1] Sun Mar 7 08:29:40 2010 @@ -301,7 +301,7 @@ ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == bmih->biHeight, "wrong bm.bmHeight %d\n", bm.bmHeight); + ok(bm.bmHeight == abs(bmih->biHeight), "wrong bm.bmHeight %d\n", bm.bmHeight); dib_width_bytes = DIB_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); bm_width_bytes = BITMAP_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); if (bm.bmWidthBytes != dib_width_bytes) /* Win2k bug */ @@ -332,7 +332,7 @@ ret = GetObject(hbm, sizeof(*bma) * 2, bma); ok(ret == sizeof(*bma) || broken(ret == sizeof(*bma) * 2 /* Win9x */), "wrong size %d\n", ret); ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == bmih->biHeight, "wrong bm.bmHeight %d\n", bm.bmHeight); + ok(bm.bmHeight == abs(bmih->biHeight), "wrong bm.bmHeight %d\n", bm.bmHeight); ok(bm.bmBits == bits, "wrong bm.bmBits %p != %p\n", bm.bmBits, bits); ret = GetObject(hbm, sizeof(bm) / 2, &bm); @@ -363,20 +363,22 @@ ds.dsBmih.biSizeImage = 0; ok(ds.dsBmih.biSize == bmih->biSize, "%u != %u\n", ds.dsBmih.biSize, bmih->biSize); - ok(ds.dsBmih.biWidth == bmih->biWidth, "%u != %u\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBmih.biHeight == bmih->biHeight, "%u != %u\n", ds.dsBmih.biHeight, bmih->biHeight); + ok(ds.dsBmih.biWidth == bmih->biWidth, "%d != %d\n", ds.dsBmih.biWidth, bmih->biWidth); + ok(ds.dsBmih.biHeight == abs(bmih->biHeight) || + broken(ds.dsBmih.biHeight == bmih->biHeight), /* Win9x/WinMe */ + "%d != %d\n", ds.dsBmih.biHeight, abs(bmih->biHeight)); ok(ds.dsBmih.biPlanes == bmih->biPlanes, "%u != %u\n", ds.dsBmih.biPlanes, bmih->biPlanes); ok(ds.dsBmih.biBitCount == bmih->biBitCount, "%u != %u\n", ds.dsBmih.biBitCount, bmih->biBitCount); ok(ds.dsBmih.biCompression == bmih->biCompression, "%u != %u\n", ds.dsBmih.biCompression, bmih->biCompression); ok(ds.dsBmih.biSizeImage == bmih->biSizeImage, "%u != %u\n", ds.dsBmih.biSizeImage, bmih->biSizeImage); - ok(ds.dsBmih.biXPelsPerMeter == bmih->biXPelsPerMeter, "%u != %u\n", ds.dsBmih.biXPelsPerMeter, bmih->biXPelsPerMeter); - ok(ds.dsBmih.biYPelsPerMeter == bmih->biYPelsPerMeter, "%u != %u\n", ds.dsBmih.biYPelsPerMeter, bmih->biYPelsPerMeter); + ok(ds.dsBmih.biXPelsPerMeter == bmih->biXPelsPerMeter, "%d != %d\n", ds.dsBmih.biXPelsPerMeter, bmih->biXPelsPerMeter); + ok(ds.dsBmih.biYPelsPerMeter == bmih->biYPelsPerMeter, "%d != %d\n", ds.dsBmih.biYPelsPerMeter, bmih->biYPelsPerMeter); memset(&ds, 0xAA, sizeof(ds)); ret = GetObject(hbm, sizeof(ds) - 4, &ds); ok(ret == sizeof(ds.dsBm) || broken(ret == (sizeof(ds) - 4) /* Win9x */), "wrong size %d\n", ret); - ok(ds.dsBm.bmWidth == bmih->biWidth, "%u != %u\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBm.bmHeight == bmih->biHeight, "%u != %u\n", ds.dsBmih.biHeight, bmih->biHeight); + ok(ds.dsBm.bmWidth == bmih->biWidth, "%d != %d\n", ds.dsBmih.biWidth, bmih->biWidth); + ok(ds.dsBm.bmHeight == abs(bmih->biHeight), "%d != %d\n", ds.dsBmih.biHeight, abs(bmih->biHeight)); ok(ds.dsBm.bmBits == bits, "%p != %p\n", ds.dsBm.bmBits, bits); ret = GetObject(hbm, 0, &ds); @@ -525,6 +527,14 @@ test_dib_info(hdib, bits, &pbmi->bmiHeader); DeleteObject(hdib); + /* Test a top-down DIB. */ + pbmi->bmiHeader.biHeight = -100; + hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); + ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); + test_dib_info(hdib, bits, &pbmi->bmiHeader); + DeleteObject(hdib); + + pbmi->bmiHeader.biHeight = 100; pbmi->bmiHeader.biBitCount = 8; pbmi->bmiHeader.biCompression = BI_RLE8; SetLastError(0xdeadbeef); 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] Sun Mar 7 08:29:40 2010 @@ -69,7 +69,7 @@ assert(hrgn != 0); hdc = GetDC(hwnd); - ok(hdc != NULL, "CreateDC rets %p\n", hdc); + ok(hdc != NULL, "GetDC failed\n"); ret = GetClipBox(hdc, &rc_clip); ok(ret == SIMPLEREGION, "GetClipBox returned %d instead of SIMPLEREGION\n", ret); @@ -328,6 +328,152 @@ ReleaseDC( 0, hdc ); } +static void test_DeleteDC(void) +{ + HWND hwnd; + HDC hdc, hdc_test; + WNDCLASSEX cls; + int ret; + + /* window DC */ + hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, + 0, 0, 0, NULL); + ok(hwnd != 0, "CreateWindowExA failed\n"); + + hdc = GetDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + hdc = GetWindowDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + DestroyWindow(hwnd); + + /* desktop window DC */ + hwnd = GetDesktopWindow(); + ok(hwnd != 0, "GetDesktopWindow failed\n"); + + hdc = GetDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + hdc = GetWindowDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + /* CS_CLASSDC */ + memset(&cls, 0, sizeof(cls)); + cls.cbSize = sizeof(cls); + cls.style = CS_CLASSDC; + cls.hInstance = GetModuleHandle(0); + cls.lpszClassName = "Wine class DC"; + cls.lpfnWndProc = DefWindowProcA; + ret = RegisterClassExA(&cls); + ok(ret, "RegisterClassExA failed\n"); + + hwnd = CreateWindowExA(0, "Wine class DC", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, + 0, 0, 0, NULL); + ok(hwnd != 0, "CreateWindowExA failed\n"); + + hdc = GetDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = ReleaseDC(hwnd, hdc); + ok(ret, "ReleaseDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + + hdc_test = hdc; + + hdc = GetWindowDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + DestroyWindow(hwnd); + + ret = GetObjectType(hdc_test); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + + ret = UnregisterClassA("Wine class DC", GetModuleHandle(NULL)); + ok(ret, "UnregisterClassA failed\n"); + + ret = GetObjectType(hdc_test); +todo_wine + ok(!ret, "GetObjectType should fail for a deleted DC\n"); + + /* CS_OWNDC */ + memset(&cls, 0, sizeof(cls)); + cls.cbSize = sizeof(cls); + cls.style = CS_OWNDC; + cls.hInstance = GetModuleHandle(0); + cls.lpszClassName = "Wine own DC"; + cls.lpfnWndProc = DefWindowProcA; + ret = RegisterClassExA(&cls); + ok(ret, "RegisterClassExA failed\n"); + + hwnd = CreateWindowExA(0, "Wine own DC", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, + 0, 0, 0, NULL); + ok(hwnd != 0, "CreateWindowExA failed\n"); + + hdc = GetDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = ReleaseDC(hwnd, hdc); + ok(ret, "ReleaseDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + + hdc = GetWindowDC(hwnd); + ok(hdc != 0, "GetDC failed\n"); + ret = GetObjectType(hdc); + ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = DeleteDC(hdc); + ok(ret, "DeleteDC failed\n"); + ret = GetObjectType(hdc); + ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + + DestroyWindow(hwnd); + + ret = UnregisterClassA("Wine own DC", GetModuleHandle(NULL)); + ok(ret, "UnregisterClassA failed\n"); +} + START_TEST(dc) { test_savedc(); @@ -335,4 +481,5 @@ test_GdiConvertToDevmodeW(); test_CreateCompatibleDC(); test_DC_bitmap(); -} + test_DeleteDC(); +}
15 years, 3 months
1
0
0
0
[cwittich] 45974: [ADVAPI32_WINETEST] sync advapi32_winetest to wine 1.1.40
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Mar 7 08:27:57 2010 New Revision: 45974 URL:
http://svn.reactos.org/svn/reactos?rev=45974&view=rev
Log: [ADVAPI32_WINETEST] sync advapi32_winetest to wine 1.1.40 Modified: trunk/rostests/winetests/advapi32/crypt.c trunk/rostests/winetests/advapi32/eventlog.c trunk/rostests/winetests/advapi32/registry.c trunk/rostests/winetests/advapi32/security.c trunk/rostests/winetests/advapi32/service.c Modified: trunk/rostests/winetests/advapi32/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/crypt.…
============================================================================== --- trunk/rostests/winetests/advapi32/crypt.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/crypt.c [iso-8859-1] Sun Mar 7 08:27:57 2010 @@ -64,6 +64,7 @@ static BOOL (WINAPI *pCryptSetKeyParam)(HCRYPTKEY, DWORD, BYTE*, DWORD); static BOOL (WINAPI *pCryptSetProvParam)(HCRYPTPROV, DWORD, BYTE*, DWORD); static BOOL (WINAPI *pCryptVerifySignatureW)(HCRYPTHASH, BYTE*, DWORD, HCRYPTKEY, LPCWSTR, DWORD); +static BOOL (WINAPI *pSystemFunction036)(PVOID, ULONG); static void init_function_pointers(void) { @@ -99,6 +100,7 @@ pCryptSetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptSetKeyParam"); pCryptSetProvParam = (void*)GetProcAddress(hadvapi32, "CryptSetProvParam"); pCryptVerifySignatureW = (void*)GetProcAddress(hadvapi32, "CryptVerifySignatureW"); + pSystemFunction036 = (void*)GetProcAddress(hadvapi32, "SystemFunction036"); } static void init_environment(void) @@ -1073,6 +1075,35 @@ } } +static void test_SystemFunction036(void) +{ + BOOL ret; + int test; + + if (!pSystemFunction036) + { + win_skip("SystemFunction036 is not available\n"); + return; + } + + ret = pSystemFunction036(NULL, 0); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); + + /* Test crashes on Windows. */ + if (0) + { + SetLastError(0xdeadbeef); + ret = pSystemFunction036(NULL, 5); + trace("ret = %d, GetLastError() = %d\n", ret, GetLastError()); + } + + ret = pSystemFunction036(&test, 0); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); + + ret = pSystemFunction036(&test, sizeof(int)); + ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); +} + START_TEST(crypt) { init_function_pointers(); @@ -1091,4 +1122,5 @@ test_enum_provider_types(); test_get_default_provider(); test_set_provider_ex(); -} + test_SystemFunction036(); +} Modified: trunk/rostests/winetests/advapi32/eventlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/eventl…
============================================================================== --- trunk/rostests/winetests/advapi32/eventlog.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/eventlog.c [iso-8859-1] Sun Mar 7 08:27:57 2010 @@ -767,33 +767,38 @@ { win_skip("Win7 fails when using incorrect event types\n"); ret = ReportEvent(handle, 0, 0, 0, NULL, 0, 0, NULL, NULL); + ok(ret, "Expected success : %d\n", GetLastError()); } else { void *buf; - DWORD read, needed; + DWORD read, needed = 0; EVENTLOGRECORD *record; + + ok(ret, "Expected success : %d\n", GetLastError()); /* Needed to catch earlier Vista (with no ServicePack for example) */ buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - - buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); - ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, needed, &read, &needed); - - record = (EVENTLOGRECORD *)buf; - - /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return - * the written eventtype (0x20 in this case). - */ - if (record->EventType == EVENTLOG_SUCCESS) - on_vista = TRUE; - + if (!(ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, + 0, buf, sizeof(EVENTLOGRECORD), &read, &needed)) && + GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); + ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, + 0, buf, needed, &read, &needed); + } + if (ret) + { + record = (EVENTLOGRECORD *)buf; + + /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return + * the written eventtype (0x20 in this case). + */ + if (record->EventType == EVENTLOG_SUCCESS) + on_vista = TRUE; + } HeapFree(GetProcessHeap(), 0, buf); } - ok(ret, "Expected success : %d\n", GetLastError()); /* This will clear the eventlog. The record numbering for new * events however differs on Vista SP1+. Before Vista the first Modified: trunk/rostests/winetests/advapi32/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/regist…
============================================================================== --- trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] Sun Mar 7 08:27:57 2010 @@ -24,6 +24,7 @@ #include "wine/test.h" #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "winreg.h" #include "winsvc.h" #include "winerror.h" @@ -34,10 +35,13 @@ static const char * sTestpath1 = "%LONGSYSTEMVAR%\\subdir1"; static const char * sTestpath2 = "%FOO%\\subdir1"; -static HMODULE hadvapi32; static DWORD (WINAPI *pRegGetValueA)(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD); static DWORD (WINAPI *pRegDeleteTreeA)(HKEY,LPCSTR); - +static DWORD (WINAPI *pRegDeleteKeyExA)(HKEY,LPCSTR,REGSAM,DWORD); +static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); +static NTSTATUS (WINAPI * pNtDeleteKey)(HANDLE); +static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(UNICODE_STRING*); +static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); /* Debugging functions from wine/libs/wine/debug.c */ @@ -112,16 +116,23 @@ } #define ADVAPI32_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hadvapi32, #func); - + p ## func = (void*)GetProcAddress(hadvapi32, #func) static void InitFunctionPtrs(void) { - hadvapi32 = GetModuleHandleA("advapi32.dll"); + HMODULE hntdll = GetModuleHandleA("ntdll.dll"); + HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); + HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); /* This function was introduced with Windows 2003 SP1 */ - ADVAPI32_GET_PROC(RegGetValueA) - ADVAPI32_GET_PROC(RegDeleteTreeA) + ADVAPI32_GET_PROC(RegGetValueA); + ADVAPI32_GET_PROC(RegDeleteTreeA); + ADVAPI32_GET_PROC(RegDeleteKeyExA); + + pIsWow64Process = (void *)GetProcAddress( hkernel32, "IsWow64Process" ); + pRtlFormatCurrentUserKeyPath = (void *)GetProcAddress( hntdll, "RtlFormatCurrentUserKeyPath" ); + pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); + pNtDeleteKey = (void *)GetProcAddress( hntdll, "NtDeleteKey" ); } /* delete key and all its subkeys */ @@ -916,9 +927,11 @@ /* beginning backslash character */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "\\Software\\Wine\\Test", &hkResult); - ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ - ret == ERROR_FILE_NOT_FOUND /* Win9x,ME */ - , "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); + ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ + ret == ERROR_FILE_NOT_FOUND || /* Win9x,ME */ + broken(ret == ERROR_SUCCESS), /* wow64 */ + "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); + if (!ret) RegCloseKey(hkResult); hkResult = NULL; ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "\\clsid", 0, KEY_QUERY_VALUE, &hkResult); @@ -1503,6 +1516,400 @@ ok(!RegDeleteKey(HKEY_CURRENT_USER, keyname), "Failed to delete key\n"); } +static void test_symlinks(void) +{ + static const WCHAR targetW[] = {'\\','S','o','f','t','w','a','r','e','\\','W','i','n','e', + '\\','T','e','s','t','\\','t','a','r','g','e','t',0}; + BYTE buffer[1024]; + UNICODE_STRING target_str; + WCHAR *target; + HKEY key, link; + NTSTATUS status; + DWORD target_len, type, len, dw, err; + + if (!pRtlFormatCurrentUserKeyPath || !pNtDeleteKey) + { + win_skip( "Can't perform symlink tests\n" ); + return; + } + + pRtlFormatCurrentUserKeyPath( &target_str ); + + target_len = target_str.Length + sizeof(targetW); + target = HeapAlloc( GetProcessHeap(), 0, target_len ); + memcpy( target, target_str.Buffer, target_str.Length ); + memcpy( target + target_str.Length/sizeof(WCHAR), targetW, sizeof(targetW) ); + + err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, + KEY_ALL_ACCESS, NULL, &link, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed: %u\n", err ); + + /* REG_SZ is not allowed */ + err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_SZ, (BYTE *)"foobar", sizeof("foobar") ); + ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); + err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_LINK, + (BYTE *)target, target_len - sizeof(WCHAR) ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + /* other values are not allowed */ + err = RegSetValueExA( link, "link", 0, REG_LINK, (BYTE *)target, target_len - sizeof(WCHAR) ); + ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); + + /* try opening the target through the link */ + + err = RegOpenKeyA( hkey_main, "link", &key ); + ok( err == ERROR_FILE_NOT_FOUND, "RegOpenKey wrong error %u\n", err ); + + err = RegCreateKeyExA( hkey_main, "target", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + + dw = 0xbeef; + err = RegSetValueExA( key, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + RegCloseKey( key ); + + err = RegOpenKeyA( hkey_main, "link", &key ); + ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); + + len = sizeof(buffer); + err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); + ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); + ok( len == sizeof(DWORD), "wrong len %u\n", len ); + + len = sizeof(buffer); + err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); + ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); + + /* REG_LINK can be created in non-link keys */ + err = RegSetValueExA( key, "SymbolicLinkValue", 0, REG_LINK, + (BYTE *)target, target_len - sizeof(WCHAR) ); + ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); + len = sizeof(buffer); + err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + err = RegDeleteValueA( key, "SymbolicLinkValue" ); + ok( err == ERROR_SUCCESS, "RegDeleteValue failed error %u\n", err ); + + RegCloseKey( key ); + + err = RegCreateKeyExA( hkey_main, "link", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + + len = sizeof(buffer); + err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); + ok( len == sizeof(DWORD), "wrong len %u\n", len ); + + err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); + ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); + RegCloseKey( key ); + + /* now open the symlink itself */ + + err = RegOpenKeyExA( hkey_main, "link", REG_OPTION_OPEN_LINK, KEY_ALL_ACCESS, &key ); + ok( err == ERROR_SUCCESS, "RegOpenKeyEx failed error %u\n", err ); + len = sizeof(buffer); + err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + RegCloseKey( key ); + + err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_OPEN_LINK, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); + len = sizeof(buffer); + err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); + ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); + RegCloseKey( key ); + + err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); + + err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK | REG_OPTION_OPEN_LINK, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); + + err = RegDeleteKey( hkey_main, "target" ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed error %u\n", err ); + + err = RegDeleteKey( hkey_main, "link" ); + ok( err == ERROR_FILE_NOT_FOUND, "RegDeleteKey wrong error %u\n", err ); + + status = pNtDeleteKey( link ); + ok( !status, "NtDeleteKey failed: 0x%08x\n", status ); + RegCloseKey( link ); + + HeapFree( GetProcessHeap(), 0, target ); + pRtlFreeUnicodeString( &target_str ); +} + +static const DWORD ptr_size = 8 * sizeof(void*); + +static DWORD get_key_value( HKEY root, const char *name, DWORD flags ) +{ + HKEY key; + DWORD err, type, dw, len = sizeof(dw); + + err = RegCreateKeyExA( root, name, 0, NULL, 0, flags | KEY_ALL_ACCESS, NULL, &key, NULL ); + if (err == ERROR_FILE_NOT_FOUND) return 0; + ok( err == ERROR_SUCCESS, "%08x: RegCreateKeyEx failed: %u\n", flags, err ); + + err = RegQueryValueExA( key, "value", NULL, &type, (BYTE *)&dw, &len ); + if (err == ERROR_FILE_NOT_FOUND) + dw = 0; + else + ok( err == ERROR_SUCCESS, "%08x: RegQueryValueEx failed: %u\n", flags, err ); + RegCloseKey( key ); + return dw; +} + +static void _check_key_value( int line, HANDLE root, const char *name, DWORD flags, DWORD expect ) +{ + DWORD dw = get_key_value( root, name, flags ); + ok_(__FILE__,line)( dw == expect, "%08x: wrong value %u/%u\n", flags, dw, expect ); +} +#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect ) + +static void test_redirection(void) +{ + DWORD err, type, dw, len; + HKEY key, root32, root64, key32, key64; + BOOL is_vista = FALSE; + + if (ptr_size != 64) + { + BOOL is_wow64; + if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64) + { + skip( "Not on Wow64, no redirection\n" ); + return; + } + } + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &root64, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &root32, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key64, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key32, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + + dw = 64; + err = RegSetValueExA( key64, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); + ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); + + dw = 32; + err = RegSetValueExA( key32, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); + ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); + + dw = 0; + len = sizeof(dw); + err = RegQueryValueExA( key32, "value", NULL, &type, (BYTE *)&dw, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); + ok( dw == 32, "wrong value %u\n", dw ); + + dw = 0; + len = sizeof(dw); + err = RegQueryValueExA( key64, "value", NULL, &type, (BYTE *)&dw, &len ); + ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); + ok( dw == 64, "wrong value %u\n", dw ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + + if (ptr_size == 32) + { + /* the Vista mechanism allows opening Wow6432Node from a 32-bit key too */ + /* the new (and simpler) Win7 mechanism doesn't */ + if (get_key_value( key, "Wow6432Node\\Wine\\Winetest", 0 ) == 32) + { + trace( "using Vista-style Wow6432Node handling\n" ); + is_vista = TRUE; + } + check_key_value( key, "Wine\\Winetest", 0, 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); + } + else + { + if (get_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ) == 64) + { + trace( "using Vista-style Wow6432Node handling\n" ); + is_vista = TRUE; + } + check_key_value( key, "Wine\\Winetest", 0, 64 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); + } + RegCloseKey( key ); + + if (ptr_size == 32) + { + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + dw = get_key_value( key, "Wine\\Winetest", 0 ); + ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); + dw = get_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ); + ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %u\n", dw ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Wine\\Winetest", 0, 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); + check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); + RegCloseKey( key ); + } + + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, ptr_size ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", 0, 32 ); + if (ptr_size == 64) + { + /* KEY_WOW64 flags have no effect on 64-bit */ + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + } + else + { + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + } + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Wine\\Winetest", 0, 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + if (ptr_size == 32) + { + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + dw = get_key_value( key, "Wine\\Winetest", 0 ); + ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Wine\\Winetest", 0, 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + } + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Winetest", 0, 32 ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + if (ptr_size == 32) + { + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + dw = get_key_value( key, "Winetest", 0 ); + ok( dw == 32 || (is_vista && dw == 64), "wrong value %u\n", dw ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Winetest", 0, 32 ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + } + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Winetest", 0, ptr_size ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); + check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + + if (ptr_size == 32) + { + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + dw = get_key_value( key, "Winetest", 0 ); + ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 ); + dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); + todo_wine ok( dw == 32, "wrong value %u\n", dw ); + RegCloseKey( key ); + + err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, + KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); + ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); + check_key_value( key, "Winetest", 0, 32 ); + check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); + check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + RegCloseKey( key ); + } + + if (pRegDeleteKeyExA) + { + err = pRegDeleteKeyExA( key32, "", KEY_WOW64_32KEY, 0 ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + err = pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); + pRegDeleteKeyExA( root64, "", KEY_WOW64_64KEY, 0 ); + } + else + { + err = RegDeleteKeyA( key32, "" ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + err = RegDeleteKeyA( key64, "" ); + ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); + RegDeleteKeyA( key64, "" ); + RegDeleteKeyA( root64, "" ); + } + RegCloseKey( key32 ); + RegCloseKey( key64 ); + RegCloseKey( root32 ); + RegCloseKey( root64 ); +} + START_TEST(registry) { /* Load pointers for functions that are not available in all Windows versions */ @@ -1520,6 +1927,8 @@ test_reg_delete_key(); test_reg_query_value(); test_string_termination(); + test_symlinks(); + test_redirection(); /* SaveKey/LoadKey require the SE_BACKUP_NAME privilege to be set */ if (set_privileges(SE_BACKUP_NAME, TRUE) && Modified: trunk/rostests/winetests/advapi32/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/securi…
============================================================================== --- trunk/rostests/winetests/advapi32/security.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/security.c [iso-8859-1] Sun Mar 7 08:27:57 2010 @@ -1490,7 +1490,7 @@ } } - LocalFree(domainsid); + FreeSid(domainsid); } static void test_LookupAccountSid(void) @@ -1673,7 +1673,7 @@ This assumes this process is running under the account of the current user.*/ ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &hToken); ret = GetTokenInformation(hToken, TokenUser, NULL, 0, &cbti); - ptiUser = (PTOKEN_USER) HeapAlloc(GetProcessHeap(), 0, cbti); + ptiUser = HeapAlloc(GetProcessHeap(), 0, cbti); if (GetTokenInformation(hToken, TokenUser, ptiUser, cbti, &cbti)) { acc_sizeA = dom_sizeA = MAX_PATH; @@ -1812,7 +1812,7 @@ static void check_wellknown_name(const char* name, WELL_KNOWN_SID_TYPE result) { SID_IDENTIFIER_AUTHORITY ident = { SECURITY_NT_AUTHORITY }; - PSID domainsid; + PSID domainsid = NULL; char wk_sid[SECURITY_MAX_SID_SIZE]; DWORD cb; @@ -1862,6 +1862,7 @@ ok(sid_use == SidTypeWellKnownGroup , "Expected Use (5), got %d\n", sid_use); cleanup: + FreeSid(domainsid); HeapFree(GetProcessHeap(),0,psid); HeapFree(GetProcessHeap(),0,domain); } @@ -2615,8 +2616,8 @@ ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl); - LocalFree(UsersSid); - LocalFree(EveryoneSid); + FreeSid(UsersSid); + FreeSid(EveryoneSid); HeapFree(GetProcessHeap(), 0, OldAcl); } Modified: trunk/rostests/winetests/advapi32/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/servic…
============================================================================== --- trunk/rostests/winetests/advapi32/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/service.c [iso-8859-1] Sun Mar 7 08:27:57 2010 @@ -1315,10 +1315,10 @@ */ if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) { - if (status.dwCurrentState == SERVICE_RUNNING) + if (status.dwCurrentState == SERVICE_STOPPED) + servicecountinactive--; + else servicecountactive--; - else - servicecountinactive--; } } HeapFree(GetProcessHeap(), 0, services); @@ -1661,7 +1661,7 @@ if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) { - if (status.dwCurrentState == SERVICE_RUNNING) + if (status.dwCurrentState != SERVICE_STOPPED) { /* We expect a process id for every running service */ ok(status.dwProcessId > 0, "Expected a process id for this running service (%s)\n",
15 years, 3 months
1
0
0
0
[tkreuzer] 45973: - comment out an ASSERT in IoSkipCurrentIrpStackLocation, because our kernel is broken - Add a header to wdm.h - add _NTLSA_IFS defines - add NTAPI to SeLockSubjectContext - add back CONST in ProbeForRead
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Mar 7 04:53:47 2010 New Revision: 45973 URL:
http://svn.reactos.org/svn/reactos?rev=45973&view=rev
Log: - comment out an ASSERT in IoSkipCurrentIrpStackLocation, because our kernel is broken - Add a header to wdm.h - add _NTLSA_IFS defines - add NTAPI to SeLockSubjectContext - add back CONST in ProbeForRead Modified: branches/header-work/include/ddk/ntifs.h branches/header-work/include/ddk/wdm.h Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Sun Mar 7 04:53:47 2010 @@ -38,9 +38,19 @@ extern "C" { #endif +#if !defined(_NTHALDLL_) && !defined(_BLDR_) +#define NTHALAPI DECLSPEC_IMPORT +#else +#define NTHALAPI +#endif + +#if !defined(_NTOSKRNL_) /* For ReactOS */ #define NTKERNELAPI DECLSPEC_IMPORT -#define NTHALAPI DECLSPEC_IMPORT - +#else +#define NTKERNELAPI +#endif + +/* Dependencies */ #include <ntddk.h> #include <excpt.h> #include <ntdef.h> Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Sun Mar 7 04:53:47 2010 @@ -1,7 +1,37 @@ +/* + * wdm.h + * + * Windows NT WDM Driver Developer Kit + * + * This file is part of the ReactOS DDK package. + * + * Contributors: + * Amine Khaldi + * Timo Kreuzer (timo.kreuzer(a)reactos.org) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ #pragma once #ifndef _WDMDDK_ #define _WDMDDK_ + +/* Included via ntddk.h? */ +#ifndef _NTDDK_ +#define _NTDDK_ +#define _WDM_INCLUDED_ +#define _DDK_DRIVER_ +#define NO_INTERLOCKED_INTRINSICS +#endif /* _NTDDK_ */ /* Dependencies */ #define NT_INCLUDED @@ -15,7 +45,6 @@ #include "intrin.h" - #ifdef __cplusplus extern "C" { #endif @@ -26,7 +55,11 @@ #define NTHALAPI #endif +#if !defined(_NTOSKRNL_) /* For ReactOS */ #define NTKERNELAPI DECLSPEC_IMPORT +#else +#define NTKERNELAPI +#endif #if defined(_WIN64) #define POINTER_ALIGNMENT DECLSPEC_ALIGN(8) @@ -1911,7 +1944,7 @@ VOID NTAPI ProbeForRead( - IN PVOID Address, + IN CONST VOID *Address, /* CONST is added */ IN SIZE_T Length, IN ULONG Alignment); @@ -2683,6 +2716,97 @@ UNICODE_STRING ObjectTypeName; } ACCESS_STATE, *PACCESS_STATE; + +#ifndef _NTLSA_IFS_ + +#ifndef _NTLSA_AUDIT_ +#define _NTLSA_AUDIT_ + +#define SE_MAX_AUDIT_PARAMETERS 32 +#define SE_MAX_GENERIC_AUDIT_PARAMETERS 28 + +#define SE_ADT_OBJECT_ONLY 0x1 + +#define SE_ADT_PARAMETERS_SELF_RELATIVE 0x00000001 +#define SE_ADT_PARAMETERS_SEND_TO_LSA 0x00000002 +#define SE_ADT_PARAMETER_EXTENSIBLE_AUDIT 0x00000004 +#define SE_ADT_PARAMETER_GENERIC_AUDIT 0x00000008 +#define SE_ADT_PARAMETER_WRITE_SYNCHRONOUS 0x00000010 + +#define LSAP_SE_ADT_PARAMETER_ARRAY_TRUE_SIZE(Parameters) \ + ( sizeof(SE_ADT_PARAMETER_ARRAY) - sizeof(SE_ADT_PARAMETER_ARRAY_ENTRY) * \ + (SE_MAX_AUDIT_PARAMETERS - Parameters->ParameterCount) ) + +typedef enum _SE_ADT_PARAMETER_TYPE { + SeAdtParmTypeNone = 0, + SeAdtParmTypeString, + SeAdtParmTypeFileSpec, + SeAdtParmTypeUlong, + SeAdtParmTypeSid, + SeAdtParmTypeLogonId, + SeAdtParmTypeNoLogonId, + SeAdtParmTypeAccessMask, + SeAdtParmTypePrivs, + SeAdtParmTypeObjectTypes, + SeAdtParmTypeHexUlong, + SeAdtParmTypePtr, + SeAdtParmTypeTime, + SeAdtParmTypeGuid, + SeAdtParmTypeLuid, + SeAdtParmTypeHexInt64, + SeAdtParmTypeStringList, + SeAdtParmTypeSidList, + SeAdtParmTypeDuration, + SeAdtParmTypeUserAccountControl, + SeAdtParmTypeNoUac, + SeAdtParmTypeMessage, + SeAdtParmTypeDateTime, + SeAdtParmTypeSockAddr, + SeAdtParmTypeSD, + SeAdtParmTypeLogonHours, + SeAdtParmTypeLogonIdNoSid, + SeAdtParmTypeUlongNoConv, + SeAdtParmTypeSockAddrNoPort, + SeAdtParmTypeAccessReason +} SE_ADT_PARAMETER_TYPE, *PSE_ADT_PARAMETER_TYPE; + +typedef struct _SE_ADT_OBJECT_TYPE { + GUID ObjectType; + USHORT Flags; + USHORT Level; + ACCESS_MASK AccessMask; +} SE_ADT_OBJECT_TYPE, *PSE_ADT_OBJECT_TYPE; + +typedef struct _SE_ADT_PARAMETER_ARRAY_ENTRY { + SE_ADT_PARAMETER_TYPE Type; + ULONG Length; + ULONG_PTR Data[2]; + PVOID Address; +} SE_ADT_PARAMETER_ARRAY_ENTRY, *PSE_ADT_PARAMETER_ARRAY_ENTRY; + +typedef struct _SE_ADT_ACCESS_REASON { + ACCESS_MASK AccessMask; + ULONG AccessReasons[32]; + ULONG ObjectTypeIndex; + ULONG AccessGranted; + PSECURITY_DESCRIPTOR SecurityDescriptor; +} SE_ADT_ACCESS_REASON, *PSE_ADT_ACCESS_REASON; + +typedef struct _SE_ADT_PARAMETER_ARRAY { + ULONG CategoryId; + ULONG AuditId; + ULONG ParameterCount; + ULONG Length; + USHORT FlatSubCategoryId; + USHORT Type; + ULONG Flags; + SE_ADT_PARAMETER_ARRAY_ENTRY Parameters[ SE_MAX_AUDIT_PARAMETERS ]; +} SE_ADT_PARAMETER_ARRAY, *PSE_ADT_PARAMETER_ARRAY; + +#endif /* !_NTLSA_AUDIT_ */ +#endif /* !_NTLSA_IFS_ */ + + /****************************************************************************** * Security Manager Functions * ******************************************************************************/ @@ -2763,15 +2887,17 @@ NTKERNELAPI VOID +NTAPI SeCaptureSubjectContext( OUT PSECURITY_SUBJECT_CONTEXT SubjectContext); NTKERNELAPI VOID +NTAPI SeLockSubjectContext( IN PSECURITY_SUBJECT_CONTEXT SubjectContext); -#endif +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ #if (NTDDI_VERSION >= NTDDI_WS03SP1) @@ -2791,7 +2917,7 @@ IN PSID UserSid OPTIONAL, IN PSE_ADT_PARAMETER_ARRAY AuditParameters); -#endif +#endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */ #if (NTDDI_VERSION >= NTDDI_VISTA) @@ -2810,9 +2936,9 @@ IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PGENERIC_MAPPING GenericMapping, OUT PACCESS_MASK GrantedAccess); -#endif - -#endif +#endif /* SE_NTFS_WORLD_CACHE */ + +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ /****************************************************************************** * Power Management Support Types * @@ -2964,7 +3090,7 @@ PoUnregisterSystemState( IN OUT PVOID StateHandle); -#endif +#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */ #if (NTDDI_VERSION >= NTDDI_VISTA) @@ -2996,8 +3122,7 @@ PoUnregisterPowerSettingCallback( IN OUT PVOID Handle); -#endif - +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ #if (NTDDI_VERSION >= NTDDI_VISTASP1) @@ -3007,7 +3132,7 @@ PoSetDeviceBusyEx( IN OUT PULONG IdlePointer); -#endif +#endif /* (NTDDI_VERSION >= NTDDI_VISTASP1) */ #if (NTDDI_VERSION >= NTDDI_WIN7) NTKERNELAPI @@ -3057,7 +3182,8 @@ IN PDEVICE_OBJECT DeviceObject, IN PCOUNTED_REASON_CONTEXT Context); -#endif +#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ + /****************************************************************************** * Configuration Manager Types * @@ -3078,7 +3204,6 @@ #define CmResourceTypeDevicePrivate 129 #define CmResourceTypePcCardConfig 130 #define CmResourceTypeMfCardConfig 131 - /* KEY_VALUE_Xxx.Type */ #define REG_NONE 0 @@ -3292,9 +3417,7 @@ } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; #include <poppack.h> -#include <pshpack1.h> /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Type */ - #define CmResourceTypeNull 0 #define CmResourceTypePort 1 #define CmResourceTypeInterrupt 2 @@ -3310,7 +3433,6 @@ #define CmResourceTypeMfCardConfig 131 /* CM_PARTIAL_RESOURCE_DESCRIPTOR.ShareDisposition */ - typedef enum _CM_SHARE_DISPOSITION { CmResourceShareUndetermined, CmResourceShareDeviceExclusive, @@ -3319,7 +3441,6 @@ } CM_SHARE_DISPOSITION; /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypePort */ - #define CM_RESOURCE_PORT_MEMORY 0x0000 #define CM_RESOURCE_PORT_IO 0x0001 #define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004 @@ -3331,14 +3452,12 @@ #define CM_RESOURCE_PORT_BAR 0x0100 /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeInterrupt */ - #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000 #define CM_RESOURCE_INTERRUPT_LATCHED 0x0001 #define CM_RESOURCE_INTERRUPT_MESSAGE 0x0002 #define CM_RESOURCE_INTERRUPT_POLICY_INCLUDED 0x0004 /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeMemory */ - #define CM_RESOURCE_MEMORY_READ_WRITE 0x0000 #define CM_RESOURCE_MEMORY_READ_ONLY 0x0001 #define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002 @@ -3352,7 +3471,6 @@ #define CM_RESOURCE_MEMORY_COMPAT_FOR_INACCESSIBLE_RANGE 0x0100 /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeDma */ - #define CM_RESOURCE_DMA_8 0x0000 #define CM_RESOURCE_DMA_16 0x0001 #define CM_RESOURCE_DMA_32 0x0002 @@ -3362,6 +3480,7 @@ #define CM_RESOURCE_DMA_TYPE_B 0x0020 #define CM_RESOURCE_DMA_TYPE_F 0x0040 +#include <pshpack1.h> typedef struct _CM_PARTIAL_RESOURCE_LIST { USHORT Version; USHORT Revision; @@ -3388,36 +3507,32 @@ USHORT NumberDrives; } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; -typedef struct _CM_PNP_BIOS_DEVICE_NODE -{ - USHORT Size; - UCHAR Node; - ULONG ProductId; - UCHAR DeviceType[3]; - USHORT DeviceAttributes; +typedef struct _CM_PNP_BIOS_DEVICE_NODE { + USHORT Size; + UCHAR Node; + ULONG ProductId; + UCHAR DeviceType[3]; + USHORT DeviceAttributes; } CM_PNP_BIOS_DEVICE_NODE,*PCM_PNP_BIOS_DEVICE_NODE; -typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK -{ - UCHAR Signature[4]; - UCHAR Revision; - UCHAR Length; - USHORT ControlField; - UCHAR Checksum; - ULONG EventFlagAddress; - USHORT RealModeEntryOffset; - USHORT RealModeEntrySegment; - USHORT ProtectedModeEntryOffset; - ULONG ProtectedModeCodeBaseAddress; - ULONG OemDeviceId; - USHORT RealModeDataBaseAddress; - ULONG ProtectedModeDataBaseAddress; +typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK { + UCHAR Signature[4]; + UCHAR Revision; + UCHAR Length; + USHORT ControlField; + UCHAR Checksum; + ULONG EventFlagAddress; + USHORT RealModeEntryOffset; + USHORT RealModeEntrySegment; + USHORT ProtectedModeEntryOffset; + ULONG ProtectedModeCodeBaseAddress; + ULONG OemDeviceId; + USHORT RealModeDataBaseAddress; + ULONG ProtectedModeDataBaseAddress; } CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK; - #include <poppack.h> -typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA -{ +typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA { ULONG BytesPerSector; ULONG NumberOfCylinders; ULONG SectorsPerTrack; @@ -5091,7 +5206,6 @@ #define NT_ASSERTMSGW(exp) ((VOID)0) #endif /* DBG */ - /****************************************************************************** @@ -5503,7 +5617,7 @@ /* While MS WDK uses inheritance in C++, we cannot do this with gcc, as inheritance, even from a struct renders the type non-POD. So we use this hack */ -#define PCI_COMMON_HEADER_MEMBERS \ +#define PCI_COMMON_HEADER_LAYOUT \ USHORT VendorID; \ USHORT DeviceID; \ USHORT Command; \ @@ -5530,7 +5644,7 @@ UCHAR InterruptPin; \ UCHAR MinimumGrant; \ UCHAR MaximumLatency; \ - } type0; \ + } type0; \ struct _PCI_HEADER_TYPE_1 { \ ULONG BaseAddresses[PCI_TYPE1_ADDRESSES]; \ UCHAR PrimaryBus; \ @@ -5554,7 +5668,7 @@ UCHAR InterruptLine; \ UCHAR InterruptPin; \ USHORT BridgeControl; \ - } type1; \ + } type1; \ struct _PCI_HEADER_TYPE_2 { \ ULONG SocketRegistersBaseAddress; \ UCHAR CapabilitiesPtr; \ @@ -5575,17 +5689,17 @@ } u; typedef struct _PCI_COMMON_HEADER { - PCI_COMMON_HEADER_MEMBERS + PCI_COMMON_HEADER_LAYOUT } PCI_COMMON_HEADER, *PPCI_COMMON_HEADER; #ifdef __cplusplus typedef struct _PCI_COMMON_CONFIG { - PCI_COMMON_HEADER_MEMBERS + PCI_COMMON_HEADER_LAYOUT UCHAR DeviceSpecific[192]; } PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; #else typedef struct _PCI_COMMON_CONFIG { - PCI_COMMON_HEADER DUMMYSTRUCTNAME; + PCI_COMMON_HEADER DUMMYSTRUCTNAME; UCHAR DeviceSpecific[192]; } PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; #endif @@ -8815,7 +8929,7 @@ IoSkipCurrentIrpStackLocation ( IN OUT PIRP Irp) { - ASSERT(Irp->CurrentLocation <= Irp->StackCount); + //ASSERT(Irp->CurrentLocation <= Irp->StackCount); FIXME: ReactOS is broken! Irp->CurrentLocation++; Irp->Tail.Overlay.CurrentStackLocation++; }
15 years, 3 months
1
0
0
0
[tkreuzer] 45972: revert the change to ProbeForRead
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Mar 7 04:44:18 2010 New Revision: 45972 URL:
http://svn.reactos.org/svn/reactos?rev=45972&view=rev
Log: revert the change to ProbeForRead Modified: branches/header-work/ntoskrnl/ex/exintrin.c Modified: branches/header-work/ntoskrnl/ex/exintrin.c URL:
http://svn.reactos.org/svn/reactos/branches/header-work/ntoskrnl/ex/exintri…
============================================================================== --- branches/header-work/ntoskrnl/ex/exintrin.c [iso-8859-1] (original) +++ branches/header-work/ntoskrnl/ex/exintrin.c [iso-8859-1] Sun Mar 7 04:44:18 2010 @@ -99,7 +99,7 @@ */ VOID NTAPI -ProbeForRead(IN VOID *Address, +ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment) {
15 years, 3 months
1
0
0
0
[tkreuzer] 45971: [NTOS] - use NTDDI_VERSION 0x05020400 (2k3, SP4) - fix ProbeForRead parameters - remove a hack
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Mar 7 03:55:13 2010 New Revision: 45971 URL:
http://svn.reactos.org/svn/reactos?rev=45971&view=rev
Log: [NTOS] - use NTDDI_VERSION 0x05020400 (2k3, SP4) - fix ProbeForRead parameters - remove a hack Modified: branches/header-work/ntoskrnl/ex/exintrin.c branches/header-work/ntoskrnl/include/ntoskrnl.h branches/header-work/ntoskrnl/ntoskrnl-generic.rbuild Modified: branches/header-work/ntoskrnl/ex/exintrin.c URL:
http://svn.reactos.org/svn/reactos/branches/header-work/ntoskrnl/ex/exintri…
============================================================================== --- branches/header-work/ntoskrnl/ex/exintrin.c [iso-8859-1] (original) +++ branches/header-work/ntoskrnl/ex/exintrin.c [iso-8859-1] Sun Mar 7 03:55:13 2010 @@ -99,7 +99,7 @@ */ VOID NTAPI -ProbeForRead(IN CONST VOID *Address, +ProbeForRead(IN VOID *Address, IN SIZE_T Length, IN ULONG Alignment) { Modified: branches/header-work/ntoskrnl/include/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/ntoskrnl/include/nt…
============================================================================== --- branches/header-work/ntoskrnl/include/ntoskrnl.h [iso-8859-1] (original) +++ branches/header-work/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Sun Mar 7 03:55:13 2010 @@ -22,8 +22,6 @@ #define SINGLE_GROUP_LEGACY_API #include <excpt.h> #include <ntdef.h> -#undef DECLSPEC_IMPORT -#define DECLSPEC_IMPORT #include <ntifs.h> #include <wdmguid.h> #include <arc/arc.h> Modified: branches/header-work/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/header-work/ntoskrnl/ntoskrnl-g…
============================================================================== --- branches/header-work/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original) +++ branches/header-work/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Sun Mar 7 03:55:13 2010 @@ -7,6 +7,7 @@ <define name="_NTOSKRNL_" /> <define name="_NTSYSTEM_" /> <define name="_IN_KERNEL_" /> + <define name="NTDDI_VERSION">0x05020400</define> <if property="_WINKD_" value="1"> <define name="_WINKD_" /> </if>
15 years, 3 months
1
0
0
0
[spetreolle] 45969: Stubplement WTSQueryUserToken. Patch by Olaf Siejka.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sun Mar 7 00:14:36 2010 New Revision: 45969 URL:
http://svn.reactos.org/svn/reactos?rev=45969&view=rev
Log: Stubplement WTSQueryUserToken. Patch by Olaf Siejka. Modified: trunk/reactos/dll/win32/wtsapi32/wtsapi32.c trunk/reactos/dll/win32/wtsapi32/wtsapi32.spec Modified: trunk/reactos/dll/win32/wtsapi32/wtsapi32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wtsapi32/wtsapi3…
============================================================================== --- trunk/reactos/dll/win32/wtsapi32/wtsapi32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wtsapi32/wtsapi32.c [iso-8859-1] Sun Mar 7 00:14:36 2010 @@ -488,6 +488,36 @@ } /************************************************************ + * WTSQueryUserToken (WTSAPI32.@) + * + * Obtains the primary access token of the logged-on user specified by the session ID. + * + * PARAMS + * SessionId [in] -- RDP session identifier + * phToken [out] -- pointer to the token handle for the logged-on user + * + * + * RETURNS + * - On success - pointer to the primary token of the user + * - On failure - zero + * + * + * NOTES + * - token handle should be closed after use with CloseHandle + * - on Failure, extended error information is available via GetLastError + * + */ +BOOL WINAPI WTSQueryUserToken( + ULONG SessionId, + PHANDLE phToken) +{ + *phToken = (HANDLE)0; + SetLastError(ERROR_NO_TOKEN); + FIXME("Stub %d\n", SessionId); + return FALSE; +} + +/************************************************************ * WTSWaitSystemEvent (WTSAPI32.@) */ BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags) Modified: trunk/reactos/dll/win32/wtsapi32/wtsapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wtsapi32/wtsapi3…
============================================================================== --- trunk/reactos/dll/win32/wtsapi32/wtsapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wtsapi32/wtsapi32.spec [iso-8859-1] Sun Mar 7 00:14:36 2010 @@ -14,6 +14,7 @@ @ stdcall WTSQuerySessionInformationW(long long long ptr ptr) @ stub WTSQueryUserConfigA @ stub WTSQueryUserConfigW +@ stdcall WTSQueryUserToken(long ptr) @ stdcall WTSRegisterSessionNotification(long long) @ stub WTSSendMessageA @ stub WTSSendMessageW
15 years, 3 months
1
0
0
0
[tkreuzer] 45968: Add some Win7 version defines
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Mar 6 23:50:52 2010 New Revision: 45968 URL:
http://svn.reactos.org/svn/reactos?rev=45968&view=rev
Log: Add some Win7 version defines Modified: branches/header-work/include/psdk/sdkddkver.h Modified: branches/header-work/include/psdk/sdkddkver.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/sdkddk…
============================================================================== --- branches/header-work/include/psdk/sdkddkver.h [iso-8859-1] (original) +++ branches/header-work/include/psdk/sdkddkver.h [iso-8859-1] Sat Mar 6 23:50:52 2010 @@ -24,6 +24,7 @@ #define _WIN32_WINNT_VISTA 0x0600 #define _WIN32_WINNT_WS08 0x0600 #define _WIN32_WINNT_LONGHORN 0x0600 +#define _WIN32_WINNT_WIN7 0x0601 /* _WIN32_IE */ #define _WIN32_IE_IE20 0x0200 @@ -38,6 +39,7 @@ #define _WIN32_IE_IE60SP1 0x0601 #define _WIN32_IE_IE60SP2 0x0603 #define _WIN32_IE_IE70 0x0700 +#define _WIN32_IE_IE80 0x0800 /* Mappings Between IE Version and Windows Version */ #define _WIN32_IE_NT4 _WIN32_IE_IE20 @@ -62,6 +64,7 @@ #define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2 #define _WIN32_IE_WIN6 _WIN32_IE_IE70 #define _WIN32_IE_LONGHORN _WIN32_IE_IE70 +#define _WIN32_IE_WIN7 _WIN32_IE_IE80 /* NTDDI_VERSION */ #define NTDDI_WIN2K 0x05000000 @@ -94,6 +97,7 @@ #define NTDDI_WS08SP2 NTDDI_WIN6SP2 #define NTDDI_WS08SP3 NTDDI_WIN6SP3 #define NTDDI_WS08SP4 NTDDI_WIN6SP4 +#define NTDDI_WIN7 0x06010000 /* Version Fields in NTDDI_VERSION */ #define OSVERSION_MASK 0xFFFF0000
15 years, 3 months
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
90
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200