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
December 2009
----- 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
22 participants
501 discussions
Start a n
N
ew thread
[gschneider] 44702: Add diff file for r44691 (dll/win32/lpk needs LpkPresent), thanks Jim
by gschneider@svn.reactos.org
Author: gschneider Date: Tue Dec 22 12:11:16 2009 New Revision: 44702 URL:
http://svn.reactos.org/svn/reactos?rev=44702&view=rev
Log: Add diff file for r44691 (dll/win32/lpk needs LpkPresent), thanks Jim Added: trunk/reactos/dll/win32/usp10/usp10_ros.diff Added: trunk/reactos/dll/win32/usp10/usp10_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10_ros.…
============================================================================== --- trunk/reactos/dll/win32/usp10/usp10_ros.diff (added) +++ trunk/reactos/dll/win32/usp10/usp10_ros.diff [iso-8859-1] Tue Dec 22 12:11:16 2009 @@ -1,0 +1,24 @@ +Index: usp10.c +=================================================================== +--- usp10.c (revision 44689) ++++ usp10.c (working copy) +@@ -1841,3 +1841,9 @@ + for (i = 0; i < num_glyphs; i++) justify[i] = advance[i]; + return S_OK; + } ++ ++BOOL gbLpkPresent = FALSE; ++VOID WINAPI LpkPresent() ++{ ++ gbLpkPresent = TRUE; /* Turn it on this way! Wine is out of control! */ ++} +Index: usp10.spec +=================================================================== +--- usp10.spec (revision 44689) ++++ usp10.spec (working copy) +@@ -1,4 +1,4 @@ +-@ stub LpkPresent ++@ stdcall LpkPresent() + @ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr) + @ stdcall ScriptApplyLogicalWidth(ptr long long ptr ptr ptr ptr ptr ptr) + @ stdcall ScriptBreak(ptr long ptr ptr)
15 years
1
0
0
0
[cwittich] 44701: add progman_dde to testlist
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 12:05:33 2009 New Revision: 44701 URL:
http://svn.reactos.org/svn/reactos?rev=44701&view=rev
Log: add progman_dde to testlist Modified: trunk/rostests/winetests/shell32/testlist.c Modified: trunk/rostests/winetests/shell32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/testlis…
============================================================================== --- trunk/rostests/winetests/shell32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/testlist.c [iso-8859-1] Tue Dec 22 12:05:33 2009 @@ -9,6 +9,7 @@ extern void func_appbar(void); extern void func_autocomplete(void); extern void func_generated(void); +extern void func_progman_dde(void); extern void func_shelllink(void); extern void func_shellpath(void); extern void func_shfldr_netplaces(void); @@ -24,6 +25,7 @@ { "appbar", func_appbar }, { "autocomplete", func_autocomplete }, { "generated", func_generated }, + { "progman_dde", func_progman_dde }, { "shelllink", func_shelllink }, { "shellpath", func_shellpath }, { "shfldr_netplaces", func_shfldr_netplaces },
15 years
1
0
0
0
[cwittich] 44700: sync msxml3_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 11:11:44 2009 New Revision: 44700 URL:
http://svn.reactos.org/svn/reactos?rev=44700&view=rev
Log: sync msxml3_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/msxml3/domdoc.c Modified: trunk/rostests/winetests/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/domdoc.c…
============================================================================== --- trunk/rostests/winetests/msxml3/domdoc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msxml3/domdoc.c [iso-8859-1] Tue Dec 22 11:11:44 2009 @@ -3085,6 +3085,8 @@ IXMLDOMNode *pNextChild = (IXMLDOMNode *)0x1; VARIANT var; + VariantInit(&var); + hr = IXMLDOMCDATASection_QueryInterface(pCDataSec, &IID_IXMLDOMElement, (LPVOID*)&pElement); ok(hr == E_NOINTERFACE, "ret %08x\n", hr); @@ -3155,7 +3157,8 @@ /* test get nodeValue */ hr = IXMLDOMCDATASection_get_nodeValue(pCDataSec, &var); ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); + ok(V_VT(&var) == VT_BSTR, "got vt %04x\n", V_VT(&var)); + ok( !lstrcmpW( V_BSTR(&var), _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); VariantClear(&var); /* test get data */
15 years
1
0
0
0
[cwittich] 44699: sync setupapi_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 11:08:01 2009 New Revision: 44699 URL:
http://svn.reactos.org/svn/reactos?rev=44699&view=rev
Log: sync setupapi_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/setupapi/install.c trunk/rostests/winetests/setupapi/misc.c trunk/rostests/winetests/setupapi/parser.c trunk/rostests/winetests/setupapi/query.c trunk/rostests/winetests/setupapi/stringtable.c Modified: trunk/rostests/winetests/setupapi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/instal…
============================================================================== --- trunk/rostests/winetests/setupapi/install.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/install.c [iso-8859-1] Tue Dec 22 11:08:01 2009 @@ -35,6 +35,7 @@ #include "wine/test.h" static const char inffile[] = "test.inf"; +static const WCHAR inffileW[] = {'t','e','s','t','.','i','n','f',0}; static char CURR_DIR[MAX_PATH]; /* Notes on InstallHinfSectionA/W: @@ -52,6 +53,7 @@ static void (WINAPI *pInstallHinfSectionA)(HWND, HINSTANCE, LPCSTR, INT); static void (WINAPI *pInstallHinfSectionW)(HWND, HINSTANCE, LPCWSTR, INT); +static BOOL (WINAPI *pSetupGetInfFileListW)(PCWSTR, DWORD, PWSTR, DWORD, PDWORD); /* * Helpers @@ -466,6 +468,177 @@ DeleteFile(inffile); } +static void test_inffilelist(void) +{ + static const char inffile2[] = "test2.inf"; + static const WCHAR inffile2W[] = {'t','e','s','t','2','.','i','n','f',0}; + static const char invalid_inf[] = "invalid.inf"; + static const WCHAR invalid_infW[] = {'i','n','v','a','l','i','d','.','i','n','f',0}; + static const char *inf = + "[Version]\n" + "Signature=\"$Chicago$\""; + static const char *inf2 = + "[Version]\n" + "Signature=\"$CHICAGO$\""; + static const char *infNT = + "[Version]\n" + "Signature=\"$WINDOWS NT$\""; + + WCHAR *p, *ptr; + char dirA[MAX_PATH]; + WCHAR dir[MAX_PATH] = { 0 }; + WCHAR buffer[MAX_PATH] = { 0 }; + DWORD expected, outsize; + BOOL ret; + + if(!pSetupGetInfFileListW) + { + win_skip("SetupGetInfFileListW not present\n"); + return; + } + + /* NULL means %windir%\\inf + * get the value as reference + */ + expected = 0; + SetLastError(0xdeadbeef); + ret = pSetupGetInfFileListW(NULL, INF_STYLE_WIN4, NULL, 0, &expected); + if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("SetupGetInfFileListW not implemented\n"); + return; + } + ok(ret, "expected SetupGetInfFileListW to succeed! Error: %d\n", GetLastError()); + ok(expected > 0, "expected required buffersize to be at least 1\n"); + + /* check if an empty string doesn't behaves like NULL */ + outsize = 0; + SetLastError(0xdeadbeef); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); + ok(!ret, "expected SetupGetInfFileListW to fail!\n"); + + /* create a private directory, the temp directory may contain some + * inf files left over from old installations + */ + if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dirA)) + { + win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); + return; + } + if (!CreateDirectoryA(dirA, NULL )) + { + win_skip("CreateDirectoryA(%s) failed with error %d\n", dirA, GetLastError()); + return; + } + if (!SetCurrentDirectoryA(dirA)) + { + win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError()); + RemoveDirectoryA(dirA); + return; + } + + MultiByteToWideChar(CP_ACP, 0, dirA, -1, dir, MAX_PATH); + /* check a not existing directory + */ + ptr = dir + lstrlenW(dir); + MultiByteToWideChar(CP_ACP, 0, "\\not_existent", -1, ptr, MAX_PATH - lstrlenW(dir)); + outsize = 0xffffffff; + SetLastError(0xdeadbeef); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(outsize == 1, "expected required buffersize to be 1, got %d\n", outsize); + ok(ERROR_PATH_NOT_FOUND == GetLastError(), + "expected error ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + + create_inf_file(inffile, inf); + create_inf_file(inffile2, inf); + create_inf_file(invalid_inf, "This content does not match the inf file format"); + + /* pass a filename instead of a directory + */ + *ptr = '\\'; + MultiByteToWideChar(CP_ACP, 0, invalid_inf, -1, ptr+1, MAX_PATH - lstrlenW(dir)); + outsize = 0xffffffff; + SetLastError(0xdeadbeef); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); + ok(!ret, "expected SetupGetInfFileListW to fail!\n"); + ok(ERROR_DIRECTORY == GetLastError(), + "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); + + /* make the filename look like directory + */ + dir[1 + lstrlenW(dir)] = 0; + dir[lstrlenW(dir)] = '\\'; + SetLastError(0xdeadbeef); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); + ok(!ret, "expected SetupGetInfFileListW to fail!\n"); + ok(ERROR_DIRECTORY == GetLastError(), + "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); + + /* now check the buffer content of a vaild call + */ + *ptr = 0; + expected = 3 + strlen(inffile) + strlen(inffile2); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + expected, outsize); + for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) + ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), + "unexpected filename %s\n",wine_dbgstr_w(p)); + + /* upper case value + */ + create_inf_file(inffile2, inf2); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + expected, outsize); + for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) + ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), + "unexpected filename %s\n",wine_dbgstr_w(p)); + + /* signature Windows NT is also inf style win4 + */ + create_inf_file(inffile2, infNT); + expected = 3 + strlen(inffile) + strlen(inffile2); + ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + expected, outsize); + for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) + ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), + "unexpected filename %s\n",wine_dbgstr_w(p)); + + /* old style + */ + expected = 2 + strlen(invalid_inf); + ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT, buffer, MAX_PATH, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + expected, outsize); + for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) + ok(!lstrcmpW(p,invalid_infW), "unexpected filename %s\n",wine_dbgstr_w(p)); + + /* mixed style + */ + expected = 4 + strlen(inffile) + strlen(inffile2) + strlen(invalid_inf); + ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer, + MAX_PATH, &outsize); + ok(ret, "expected SetupGetInfFileListW to succeed!\n"); + ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + expected, outsize); + for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) + ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW) || !lstrcmpW(p,invalid_infW), + "unexpected filename %s\n",wine_dbgstr_w(p)); + + DeleteFile(inffile); + DeleteFile(inffile2); + DeleteFile(invalid_inf); + SetCurrentDirectoryA(CURR_DIR); + RemoveDirectoryA(dirA); +} + START_TEST(install) { HMODULE hsetupapi = GetModuleHandle("setupapi.dll"); @@ -483,6 +656,8 @@ pInstallHinfSectionA = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionA"); pInstallHinfSectionW = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionW"); + pSetupGetInfFileListW = (void *)GetProcAddress(hsetupapi, "SetupGetInfFileListW"); + if (pInstallHinfSectionA) { /* Check if pInstallHinfSectionA sets last error or is a stub (as on WinXP) */ @@ -519,5 +694,7 @@ test_profile_items(); } + test_inffilelist(); + SetCurrentDirectory(prev_path); } Modified: trunk/rostests/winetests/setupapi/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/misc.c…
============================================================================== --- trunk/rostests/winetests/setupapi/misc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/misc.c [iso-8859-1] Tue Dec 22 11:08:01 2009 @@ -46,6 +46,7 @@ static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT); static BOOL (WINAPI *pSetupCopyOEMInfA)(PCSTR, PCSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR *); static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A); +static BOOL (WINAPI *pSetupUninstallOEMInfA)(PCSTR, DWORD, PVOID); static void create_inf_file(LPCSTR filename) { @@ -196,21 +197,23 @@ /* try a relative SourceInfFileName */ SetLastError(0xdeadbeef); res = pSetupCopyOEMInfA(tmpfile, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - if (GetLastError() == ERROR_WRONG_INF_TYPE) + ok(res == FALSE || + broken(res == TRUE), /* Win98 */ + "Expected FALSE, got %d\n", res); + if (GetLastError() == ERROR_WRONG_INF_TYPE || GetLastError() == ERROR_UNSUPPORTED_TYPE /* Win7 */) { /* FIXME: * Vista needs a [Manufacturer] entry in the inf file. Doing this will give some * popups during the installation though as it also needs a catalog file (signed?). */ - win_skip("Needs a different inf file on Vista/W2K8\n"); + win_skip("Needs a different inf file on Vista+\n"); DeleteFile(tmpfile); return; } ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_FILE_EXISTS, /* Win98 */ - "Expected ERROR_FILE_NOT_FOUND or ERROR_FILE_EXISTS, got %d\n", GetLastError()); + broken(GetLastError() == ERROR_SUCCESS), /* Win98 */ + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); ok(file_exists(tmpfile), "Expected tmpfile to exist\n"); /* try SP_COPY_REPLACEONLY, dest does not exist */ @@ -306,6 +309,24 @@ ok(res == TRUE, "Expected TRUE, got %d\n", res); ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(!file_exists(path), "Expected source inf to not exist\n"); + + if (pSetupUninstallOEMInfA) + { + char *destfile = strrchr(dest, '\\') + 1; + + SetLastError(0xdeadbeef); + ok(pSetupUninstallOEMInfA(destfile, 0, NULL), "Failed to uninstall '%s' : %d\n", destfile, GetLastError()); + } + else + { + /* Win9x/WinMe */ + SetLastError(0xdeadbeef); + ok(DeleteFileA(dest), "Failed to delete file '%s' : %d\n", dest, GetLastError()); + + /* On WinMe we also need to remove the .pnf file */ + *(strrchr(dest, '.') + 1) = 'p'; + DeleteFileA(dest); + } } static void create_source_file(LPSTR filename, const BYTE *data, DWORD size) @@ -581,6 +602,32 @@ DeleteFileA(source); } +static void test_SetupUninstallOEMInf(void) +{ + BOOL ret; + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA(NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA("", 0, NULL); + todo_wine + { + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + } + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA("nonexistent.inf", 0, NULL); + todo_wine + { + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + } +} + START_TEST(misc) { HMODULE hsetupapi = GetModuleHandle("setupapi.dll"); @@ -588,6 +635,7 @@ pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA"); pSetupCopyOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupCopyOEMInfA"); pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA"); + pSetupUninstallOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupUninstallOEMInfA"); GetCurrentDirectoryA(MAX_PATH, CURR_DIR); @@ -604,4 +652,9 @@ win_skip("SetupGetFileCompressionInfoExA is not available\n"); test_SetupDecompressOrCopyFile(); -} + + if (pSetupUninstallOEMInfA) + test_SetupUninstallOEMInf(); + else + win_skip("SetupUninstallOEMInfA is not available\n"); +} Modified: trunk/rostests/winetests/setupapi/parser.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/parser…
============================================================================== --- trunk/rostests/winetests/setupapi/parser.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/parser.c [iso-8859-1] Tue Dec 22 11:08:01 2009 @@ -32,14 +32,18 @@ /* function pointers */ static HMODULE hSetupAPI; -static LPCWSTR (WINAPI *pSetupGetField)(PINFCONTEXT,DWORD); +static LPCSTR (WINAPI *pSetupGetFieldA)(PINFCONTEXT,DWORD); +static LPCWSTR (WINAPI *pSetupGetFieldW)(PINFCONTEXT,DWORD); static BOOL (WINAPI *pSetupEnumInfSectionsA)( HINF hinf, UINT index, PSTR buffer, DWORD size, UINT *need ); static void init_function_pointers(void) { hSetupAPI = GetModuleHandleA("setupapi.dll"); - pSetupGetField = (void *)GetProcAddress(hSetupAPI, "pSetupGetField"); + /* Nice, pSetupGetField is either A or W depending on the Windows version! The actual test + * takes care of this difference */ + pSetupGetFieldA = (void *)GetProcAddress(hSetupAPI, "pSetupGetField"); + pSetupGetFieldW = (void *)GetProcAddress(hSetupAPI, "pSetupGetField"); pSetupEnumInfSectionsA = (void *)GetProcAddress(hSetupAPI, "SetupEnumInfSectionsA" ); } @@ -497,7 +501,14 @@ "[Strings]\n" "RTMQFE_NAME = \"RTMQFE\"\n"; -static const WCHAR getfield_res[][20] = +static const CHAR getfield_resA[][20] = +{ + "RTMQFE", + "%RTMGFE_NAME%", + "SP1RTM", +}; + +static const WCHAR getfield_resW[][20] = { {'R','T','M','Q','F','E',0}, {'%','R','T','M','G','F','E','_','N','A','M','E','%',0}, @@ -509,10 +520,20 @@ UINT err; BOOL ret; HINF hinf; - LPCWSTR field; + LPCSTR fieldA; + LPCWSTR fieldW; INFCONTEXT context; int i; int len; + BOOL unicode = TRUE; + + SetLastError(0xdeadbeef); + lstrcmpW(NULL, NULL); + if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("Using A-functions instead of W\n"); + unicode = FALSE; + } hinf = test_file_contents( contents, &err ); ok( hinf != NULL, "Expected valid INF file\n" ); @@ -524,23 +545,47 @@ for ( i = 0; i < 3; i++ ) { - field = pSetupGetField( &context, i ); - ok( field != NULL, "Failed to get field %i\n", i ); - ok( !lstrcmpW( getfield_res[i], field ), "Wrong string returned\n" ); - } - - field = pSetupGetField( &context, 3 ); - ok( field != NULL, "Failed to get field 3\n" ); - len = lstrlenW( field ); - ok( len == 511 /* NT4, W2K, XP and W2K3 */ || - len == 4096 /* Vista */ || - len == 256 /* Win9x and WinME */, - "Unexpected length, got %d\n", len ); - - field = pSetupGetField( &context, 4 ); - ok( field == NULL, "Expected NULL, got %p\n", field ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + if (unicode) + { + fieldW = pSetupGetFieldW( &context, i ); + ok( fieldW != NULL, "Failed to get field %i\n", i ); + ok( !lstrcmpW( getfield_resW[i], fieldW ), "Wrong string returned\n" ); + } + else + { + fieldA = pSetupGetFieldA( &context, i ); + ok( fieldA != NULL, "Failed to get field %i\n", i ); + ok( !lstrcmpA( getfield_resA[i], fieldA ), "Wrong string returned\n" ); + } + } + + if (unicode) + { + fieldW = pSetupGetFieldW( &context, 3 ); + ok( fieldW != NULL, "Failed to get field 3\n" ); + len = lstrlenW( fieldW ); + ok( len == 511 || /* NT4, W2K, XP and W2K3 */ + len == 4096, /* Vista */ + "Unexpected length, got %d\n", len ); + + fieldW = pSetupGetFieldW( &context, 4 ); + ok( fieldW == NULL, "Expected NULL, got %p\n", fieldW ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + } + else + { + fieldA = pSetupGetFieldA( &context, 3 ); + ok( fieldA != NULL, "Failed to get field 3\n" ); + len = lstrlenA( fieldA ); + ok( len == 511, /* Win9x, WinME */ + "Unexpected length, got %d\n", len ); + + fieldA = pSetupGetFieldA( &context, 4 ); + ok( fieldA == NULL, "Expected NULL, got %p\n", fieldA ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + } SetupCloseInfFile( hinf ); } @@ -557,14 +602,14 @@ } keys[] = { /* key fields index expected int errorcode */ - { "Key=", "48", 1, 48, ERROR_SUCCESS }, - { "Key=", "48", 0, -1, ERROR_INVALID_DATA }, - { "123=", "48", 0, 123, ERROR_SUCCESS }, - { "Key=", "0x4", 1, 4, ERROR_SUCCESS }, - { "Key=", "Field1", 1, -1, ERROR_INVALID_DATA }, - { "Key=", "Field1,34", 2, 34, ERROR_SUCCESS }, - { "Key=", "Field1,,Field3", 2, 0, ERROR_SUCCESS }, - { "Key=", "Field1,", 2, 0, ERROR_SUCCESS } + { "Key", "48", 1, 48, ERROR_SUCCESS }, + { "Key", "48", 0, -1, ERROR_INVALID_DATA }, + { "123", "48", 0, 123, ERROR_SUCCESS }, + { "Key", "0x4", 1, 4, ERROR_SUCCESS }, + { "Key", "Field1", 1, -1, ERROR_INVALID_DATA }, + { "Key", "Field1,34", 2, 34, ERROR_SUCCESS }, + { "Key", "Field1,,Field3", 2, 0, ERROR_SUCCESS }, + { "Key", "Field1,", 2, 0, ERROR_SUCCESS } }; unsigned int i; @@ -579,11 +624,12 @@ strcpy( buffer, STD_HEADER "[TestSection]\n" ); strcat( buffer, keys[i].key ); + strcat( buffer, "=" ); strcat( buffer, keys[i].fields ); hinf = test_file_contents( buffer, &err); ok( hinf != NULL, "Expected valid INF file\n" ); - SetupFindFirstLineA( hinf, "TestSection", "Key", &context ); + SetupFindFirstLineA( hinf, "TestSection", keys[i].key, &context ); SetLastError( 0xdeadbeef ); intfield = -1; retb = SetupGetIntField( &context, keys[i].index, &intfield ); Modified: trunk/rostests/winetests/setupapi/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/query.…
============================================================================== --- trunk/rostests/winetests/setupapi/query.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/query.c [iso-8859-1] Tue Dec 22 11:08:01 2009 @@ -167,14 +167,15 @@ broken(GetLastError() == ERROR_FILE_NOT_FOUND) || /* win98 */ broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */ broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */ - broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k */ + broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */ "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); /* try an invalid inf filename */ - /* do not use NULL as absolute inf filename on win9x (crash) */ + /* do not use NULL as absolute inf filename on win9x/winMe (crash) */ if ((GetLastError() != ERROR_BAD_PATHNAME) && /* win95 */ - (GetLastError() != ERROR_FILE_NOT_FOUND)) /* win98 */ + (GetLastError() != ERROR_FILE_NOT_FOUND) && /* win98 */ + (GetLastError() != ERROR_GENERAL_SYNTAX)) /* winMe */ { size = 0xdeadbeef; SetLastError(0xbeefcafe); Modified: trunk/rostests/winetests/setupapi/stringtable.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/string…
============================================================================== --- trunk/rostests/winetests/setupapi/stringtable.c [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/stringtable.c [iso-8859-1] Tue Dec 22 11:08:01 2009 @@ -301,6 +301,7 @@ ok(!memcmp(buffer, &data, 4), "unexpected data\n"); pStringTableDestroy(table); + pStringTableDestroy(table2); } static void test_StringTableStringFromId(void)
15 years
1
0
0
0
[cwittich] 44698: sync rsaenh_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 11:04:58 2009 New Revision: 44698 URL:
http://svn.reactos.org/svn/reactos?rev=44698&view=rev
Log: sync rsaenh_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/rsaenh/rsaenh.c Modified: trunk/rostests/winetests/rsaenh/rsaenh.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rsaenh/rsaenh.c…
============================================================================== --- trunk/rostests/winetests/rsaenh/rsaenh.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rsaenh/rsaenh.c [iso-8859-1] Tue Dec 22 11:04:58 2009 @@ -2093,6 +2093,7 @@ ok(dataLen == sizeof(test_string), "unexpected size %d\n", dataLen); ok(!memcmp(data, test_string, sizeof(test_string)), "unexpected value\n"); } + CryptDestroyKey(keyExchangeKey); CryptReleaseContext(prov, 0); CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL, @@ -2334,6 +2335,7 @@ ok(result, "CryptAcquireContext failed: %08x\n", GetLastError()); result = CryptGenKey(prov, CALG_RSA_SIGN, 0, &key); ok(result, "CryptGenKey with CALG_RSA_SIGN failed with error %08x\n", GetLastError()); + CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result, "expected CryptGetUserKey to fail\n"); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); @@ -2350,11 +2352,12 @@ ok(result, "CryptAcquireContext failed: %08x\n", GetLastError()); result = CryptGenKey(prov, CALG_RSA_KEYX, 0, &key); ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08x\n", GetLastError()); + CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(result, "CryptGetUserKey with AT_KEYEXCHANGE failed: %08x\n", GetLastError()); + CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result, "expected CryptGetUserKey to fail\n"); - CryptDestroyKey(key); CryptReleaseContext(prov, 0); CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
15 years
1
0
0
0
[cwittich] 44697: partial ntdll_winetest sync to wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 10:57:33 2009 New Revision: 44697 URL:
http://svn.reactos.org/svn/reactos?rev=44697&view=rev
Log: partial ntdll_winetest sync to wine 1.1.35 Modified: trunk/rostests/winetests/ntdll/om.c trunk/rostests/winetests/ntdll/rtlbitmap.c trunk/rostests/winetests/ntdll/rtlstr.c Modified: trunk/rostests/winetests/ntdll/om.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/om.c?rev=…
============================================================================== --- trunk/rostests/winetests/ntdll/om.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/om.c [iso-8859-1] Tue Dec 22 10:57:33 2009 @@ -63,8 +63,8 @@ ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status); status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); + ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH, + "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status); pRtlInitUnicodeString(&str, buffer2); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); @@ -82,8 +82,8 @@ pRtlInitUnicodeString(&str, buffer4); InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); + ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH, + "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status); status = pNtCreateEvent(&h, GENERIC_ALL, &attr, FALSE, FALSE); ok(status == STATUS_OBJECT_NAME_COLLISION, Modified: trunk/rostests/winetests/ntdll/rtlbitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/rtlbitmap…
============================================================================== --- trunk/rostests/winetests/ntdll/rtlbitmap.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/rtlbitmap.c [iso-8859-1] Tue Dec 22 10:57:33 2009 @@ -413,7 +413,7 @@ static void test_RtlFindMostSignificantBit(void) { int i; - CCHAR cPos; + signed char cPos; ULONGLONG ulLong; if (!pRtlFindMostSignificantBit) @@ -442,7 +442,7 @@ static void test_RtlFindLeastSignificantBit(void) { int i; - CCHAR cPos; + signed char cPos; ULONGLONG ulLong; if (!pRtlFindLeastSignificantBit) Modified: trunk/rostests/winetests/ntdll/rtlstr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/rtlstr.c?…
============================================================================== --- trunk/rostests/winetests/ntdll/rtlstr.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/rtlstr.c [iso-8859-1] Tue Dec 22 10:57:33 2009 @@ -46,6 +46,7 @@ static BOOLEAN (WINAPI *pRtlEqualUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); static NTSTATUS (WINAPI *pRtlFindCharInUnicodeString)(int, const UNICODE_STRING *, const UNICODE_STRING *, USHORT *); static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING); +static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); static VOID (WINAPI *pRtlInitAnsiString)(PSTRING, LPCSTR); static VOID (WINAPI *pRtlInitString)(PSTRING, LPCSTR); static VOID (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR); @@ -65,7 +66,6 @@ static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *); /*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/ -/*static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);*/ /*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/ /*static VOID (WINAPI *pRtlEraseUnicodeString)(UNICODE_STRING *);*/ /*static LONG (WINAPI *pRtlCompareString)(const STRING *,const STRING *,BOOLEAN);*/ @@ -114,6 +114,7 @@ pRtlEqualUnicodeString = (void *)GetProcAddress(hntdll, "RtlEqualUnicodeString"); pRtlFindCharInUnicodeString = (void *)GetProcAddress(hntdll, "RtlFindCharInUnicodeString"); pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); + pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); pRtlInitAnsiString = (void *)GetProcAddress(hntdll, "RtlInitAnsiString"); pRtlInitString = (void *)GetProcAddress(hntdll, "RtlInitString"); pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); @@ -467,6 +468,7 @@ ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0, "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n", test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf); + if(result == STATUS_SUCCESS) pRtlFreeUnicodeString(&dest_str); } else { ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL, "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n", @@ -794,6 +796,8 @@ ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0, "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n", test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf); + if(result == STATUS_SUCCESS && ustr2astr[test_num].doalloc) + pRtlFreeAnsiString(&ansi_str); } } @@ -1850,6 +1854,7 @@ ret = pRtlStringFromGUID(&IID_Endianess, &str); ok(ret == 0, "expected ret=0, got 0x%0x\n", ret); ok(str.Buffer && !lstrcmpiW(str.Buffer, szGuid), "Endianess broken\n"); + pRtlFreeUnicodeString(&str); } START_TEST(rtlstr)
15 years
1
0
0
0
[cwittich] 44696: add some missing structures and enumerations
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 10:54:13 2009 New Revision: 44696 URL:
http://svn.reactos.org/svn/reactos?rev=44696&view=rev
Log: add some missing structures and enumerations Modified: trunk/reactos/include/psdk/winternl.h Modified: trunk/reactos/include/psdk/winternl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winternl.h?re…
============================================================================== --- trunk/reactos/include/psdk/winternl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winternl.h [iso-8859-1] Tue Dec 22 10:54:13 2009 @@ -380,6 +380,20 @@ FileNetworkOpenInformation, FileAttributeTagInformation, FileTrackingInformation, + FileIdBothDirectoryInformation, + FileIdFullDirectoryInformation, + FileValidDataLengthInformation, + FileShortNameInformation = 40, + /* 41, 42, 43 undocumented */ + FileSfioReserveInformation = 44, + FileSfioVolumeInformation = 45, + FileHardLinkInformation = 46, + /* 47 undocumented */ + FileNormalizedNameInformation = 48, + /* 49 undocumented */ + FileIdGlobalTxDirectoryInformation = 50, + /* 51, 52, 53 undocumented */ + FileStandardLinkInformation = 54, FileMaximumInformation } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; @@ -412,6 +426,22 @@ WCHAR FileName[ANYSIZE_ARRAY]; } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION, FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION; + +typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + ULONG EaSize; + LARGE_INTEGER FileId; + WCHAR FileName[ANYSIZE_ARRAY]; +} FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION; typedef struct _FILE_BOTH_DIRECTORY_INFORMATION { ULONG NextEntryOffset; @@ -430,6 +460,24 @@ WCHAR FileName[ANYSIZE_ARRAY]; } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION, FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION; + +typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION { + ULONG NextEntryOffset; + ULONG FileIndex; + LARGE_INTEGER CreationTime; + LARGE_INTEGER LastAccessTime; + LARGE_INTEGER LastWriteTime; + LARGE_INTEGER ChangeTime; + LARGE_INTEGER EndOfFile; + LARGE_INTEGER AllocationSize; + ULONG FileAttributes; + ULONG FileNameLength; + ULONG EaSize; + CHAR ShortNameLength; + WCHAR ShortName[12]; + LARGE_INTEGER FileId; + WCHAR FileName[ANYSIZE_ARRAY]; +} FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION; typedef struct _FILE_BASIC_INFORMATION { LARGE_INTEGER CreationTime;
15 years
1
0
0
0
[cwittich] 44695: sync kernel32_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 10:43:11 2009 New Revision: 44695 URL:
http://svn.reactos.org/svn/reactos?rev=44695&view=rev
Log: sync kernel32_winetest with wine 1.1.35 Modified: trunk/rostests/winetests/kernel32/actctx.c trunk/rostests/winetests/kernel32/environ.c trunk/rostests/winetests/kernel32/file.c trunk/rostests/winetests/kernel32/locale.c trunk/rostests/winetests/kernel32/path.c trunk/rostests/winetests/kernel32/volume.c Modified: trunk/rostests/winetests/kernel32/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/actctx…
============================================================================== --- trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -869,7 +869,7 @@ SIZE_T size; BOOL b; - b = pQueryActCtxW(0, handle, NULL, + b = pQueryActCtxW(QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL, ActivationContextBasicInformation, &basic, sizeof(basic), &size); @@ -878,7 +878,8 @@ ok (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags); ok (basic.hActCtx == handle, "unexpected handle\n"); - b = pQueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, handle, NULL, + b = pQueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX | + QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL, ActivationContextBasicInformation, &basic, sizeof(basic), &size); if (handle) @@ -960,15 +961,15 @@ pReleaseActCtx(handle); } - if(!create_manifest_file("test3.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) { + if(!create_manifest_file("test2-2.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) { skip("Could not create manifest file\n"); return; } trace("manifest2 depmanifest2\n"); - handle = test_create("test3.manifest", manifest2); - DeleteFileA("test3.manifest"); + handle = test_create("test2-2.manifest", manifest2); + DeleteFileA("test2-2.manifest"); DeleteFileA("testdep.manifest"); if(handle != INVALID_HANDLE_VALUE) { test_basic_info(handle); Modified: trunk/rostests/winetests/kernel32/environ.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/enviro…
============================================================================== --- trunk/rostests/winetests/kernel32/environ.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/environ.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -395,7 +395,11 @@ ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); /* size is not set in win2k */ - size = MAX_COMP_NAME; + if (size == 0) + { + win_skip("Win2k doesn't set the size\n"); + size = MAX_COMP_NAME; + } name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsDomain, name, &size); @@ -410,7 +414,8 @@ ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); /* size is not set in win2k */ - size = MAX_COMP_NAME; + if (size == 0) + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, name, &size); @@ -425,7 +430,8 @@ ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); /* size is not set in win2k */ - size = MAX_COMP_NAME; + if (size == 0) + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsHostname, name, &size); @@ -440,7 +446,8 @@ ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); /* size is not set in win2k */ - size = MAX_COMP_NAME; + if (size == 0) + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameNetBIOS, name, &size); Modified: trunk/rostests/winetests/kernel32/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/file.c…
============================================================================== --- trunk/rostests/winetests/kernel32/file.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/file.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -649,12 +649,10 @@ ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); ret = CopyFileA(source, dest, FALSE); - todo_wine { - ok(!ret, "CopyFileA: expected failure\n"); - ok(GetLastError() == ERROR_USER_MAPPED_FILE || - broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x and WinMe */ - "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); - } + ok(!ret, "CopyFileA: expected failure\n"); + ok(GetLastError() == ERROR_USER_MAPPED_FILE || + broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x */ + "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); CloseHandle(hmapfile); CloseHandle(hfile); @@ -1616,7 +1614,80 @@ DeleteFileA( filename ); } -static inline int is_sharing_compatible( DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2, BOOL is_win9x ) +static BOOL create_fake_dll( LPCSTR filename ) +{ + IMAGE_DOS_HEADER *dos; + IMAGE_NT_HEADERS *nt; + IMAGE_SECTION_HEADER *sec; + BYTE *buffer; + DWORD lfanew = sizeof(*dos); + DWORD size = lfanew + sizeof(*nt) + sizeof(*sec); + DWORD written; + BOOL ret; + + HANDLE file = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + if (file == INVALID_HANDLE_VALUE) return FALSE; + + buffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size ); + + dos = (IMAGE_DOS_HEADER *)buffer; + dos->e_magic = IMAGE_DOS_SIGNATURE; + dos->e_cblp = sizeof(*dos); + dos->e_cp = 1; + dos->e_cparhdr = lfanew / 16; + dos->e_minalloc = 0; + dos->e_maxalloc = 0xffff; + dos->e_ss = 0x0000; + dos->e_sp = 0x00b8; + dos->e_lfarlc = lfanew; + dos->e_lfanew = lfanew; + + nt = (IMAGE_NT_HEADERS *)(buffer + lfanew); + nt->Signature = IMAGE_NT_SIGNATURE; +#if defined __i386__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386; +#elif defined __x86_64__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_AMD64; +#elif defined __powerpc__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC; +#else +# error You must specify the machine type +#endif + nt->FileHeader.NumberOfSections = 1; + nt->FileHeader.SizeOfOptionalHeader = IMAGE_SIZEOF_NT_OPTIONAL_HEADER; + nt->FileHeader.Characteristics = IMAGE_FILE_DLL | IMAGE_FILE_EXECUTABLE_IMAGE; + nt->OptionalHeader.Magic = IMAGE_NT_OPTIONAL_HDR_MAGIC; + nt->OptionalHeader.MajorLinkerVersion = 1; + nt->OptionalHeader.MinorLinkerVersion = 0; + nt->OptionalHeader.ImageBase = 0x10000000; + nt->OptionalHeader.SectionAlignment = 0x1000; + nt->OptionalHeader.FileAlignment = 0x1000; + nt->OptionalHeader.MajorOperatingSystemVersion = 1; + nt->OptionalHeader.MinorOperatingSystemVersion = 0; + nt->OptionalHeader.MajorImageVersion = 1; + nt->OptionalHeader.MinorImageVersion = 0; + nt->OptionalHeader.MajorSubsystemVersion = 4; + nt->OptionalHeader.MinorSubsystemVersion = 0; + nt->OptionalHeader.SizeOfImage = 0x2000; + nt->OptionalHeader.SizeOfHeaders = size; + nt->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI; + nt->OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; + + sec = (IMAGE_SECTION_HEADER *)(nt + 1); + memcpy( sec->Name, ".rodata", sizeof(".rodata") ); + sec->Misc.VirtualSize = 0x1000; + sec->VirtualAddress = 0x1000; + sec->SizeOfRawData = 0; + sec->PointerToRawData = 0; + sec->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE; + + ret = WriteFile( file, buffer, size, &written, NULL ) && written == size; + HeapFree( GetProcessHeap(), 0, buffer ); + CloseHandle( file ); + return ret; +} + +static int is_sharing_compatible( DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2, BOOL is_win9x ) { if (!is_win9x) { @@ -1638,6 +1709,14 @@ if ((access2 & GENERIC_READ) && !(sharing1 & FILE_SHARE_READ)) return 0; if ((access2 & GENERIC_WRITE) && !(sharing1 & FILE_SHARE_WRITE)) return 0; if ((access2 & DELETE) && !(sharing1 & FILE_SHARE_DELETE)) return 0; + return 1; +} + +static int is_sharing_map_compatible( DWORD map_access, DWORD access2, DWORD sharing2 ) +{ + if ((map_access == PAGE_READWRITE || map_access == PAGE_EXECUTE_READWRITE) && + !(sharing2 & FILE_SHARE_WRITE)) return 0; + if ((map_access & SEC_IMAGE) && (access2 & GENERIC_WRITE)) return 0; return 1; } @@ -1651,20 +1730,20 @@ FILE_SHARE_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_DELETE, FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE }; + static const DWORD mapping_modes[] = + { PAGE_READONLY, PAGE_WRITECOPY, PAGE_READWRITE, SEC_IMAGE | PAGE_WRITECOPY }; int a1, s1, a2, s2; int ret; HANDLE h, h2; BOOL is_win9x = FALSE; /* make sure the file exists */ - h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - if (h == INVALID_HANDLE_VALUE) + if (!create_fake_dll( filename )) { ok(0, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError()); return; } is_win9x = GetFileAttributesW(filenameW) == INVALID_FILE_ATTRIBUTES; - CloseHandle( h ); for (a1 = 0; a1 < sizeof(access_modes)/sizeof(access_modes[0]); a1++) { @@ -1693,12 +1772,10 @@ SetLastError(0xdeadbeef); h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2], NULL, OPEN_EXISTING, 0, 0 ); - + ret = GetLastError(); if (is_sharing_compatible( access_modes[a1], sharing_modes[s1], access_modes[a2], sharing_modes[s2], is_win9x )) { - ret = GetLastError(); - ok( h2 != INVALID_HANDLE_VALUE, "open failed for modes %x/%x/%x/%x\n", access_modes[a1], sharing_modes[s1], @@ -1706,13 +1783,9 @@ ok( ret == 0xdeadbeef /* Win9x */ || ret == 0, /* XP */ "wrong error code %d\n", ret ); - - CloseHandle( h2 ); } else { - ret = GetLastError(); - ok( h2 == INVALID_HANDLE_VALUE, "open succeeded for modes %x/%x/%x/%x\n", access_modes[a1], sharing_modes[s1], @@ -1720,10 +1793,105 @@ ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d\n", ret ); } + if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); } } CloseHandle( h ); } + } + + for (a1 = 0; a1 < sizeof(mapping_modes)/sizeof(mapping_modes[0]); a1++) + { + HANDLE m; + + create_fake_dll( filename ); + SetLastError(0xdeadbeef); + h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); + if (h == INVALID_HANDLE_VALUE) + { + ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); + return; + } + m = CreateFileMappingA( h, NULL, mapping_modes[a1], 0, 0, NULL ); + ok( m != 0, "failed to create mapping %x err %u\n", mapping_modes[a1], GetLastError() ); + CloseHandle( h ); + if (!m) continue; + + for (a2 = 0; a2 < sizeof(access_modes)/sizeof(access_modes[0]); a2++) + { + for (s2 = 0; s2 < sizeof(sharing_modes)/sizeof(sharing_modes[0]); s2++) + { + /* Win9x doesn't support FILE_SHARE_DELETE */ + if (is_win9x && (sharing_modes[s2] & FILE_SHARE_DELETE)) + continue; + + SetLastError(0xdeadbeef); + h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2], + NULL, OPEN_EXISTING, 0, 0 ); + + ret = GetLastError(); + if (h2 == INVALID_HANDLE_VALUE) + { + if (is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2])) + ok( is_win9x, /* there's no sharing at all with a mapping on win9x */ + "open failed for modes map %x/%x/%x\n", + mapping_modes[a1], access_modes[a2], sharing_modes[s2] ); + ok( ret == ERROR_SHARING_VIOLATION, + "wrong error code %d\n", ret ); + } + else + { + if (!is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2])) + ok( broken(1), /* no checking on nt4 */ + "open succeeded for modes map %x/%x/%x\n", + mapping_modes[a1], access_modes[a2], sharing_modes[s2] ); + ok( ret == 0xdeadbeef /* Win9x */ || + ret == 0, /* XP */ + "wrong error code %d\n", ret ); + CloseHandle( h2 ); + } + } + } + + /* try CREATE_ALWAYS over an existing mapping */ + SetLastError(0xdeadbeef); + h2 = CreateFileA( filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, 0, 0 ); + ret = GetLastError(); + if ((mapping_modes[a1] & SEC_IMAGE) || is_win9x) + { + ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); + ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); + } + else + { + ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); + ok( ret == ERROR_USER_MAPPED_FILE, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); + } + if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); + + /* try DELETE_ON_CLOSE over an existing mapping */ + SetLastError(0xdeadbeef); + h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, 0 ); + ret = GetLastError(); + if (is_win9x) + { + ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); + ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); + } + else if (mapping_modes[a1] & SEC_IMAGE) + { + ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); + ok( ret == ERROR_ACCESS_DENIED, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); + } + else + { + ok( h2 != INVALID_HANDLE_VALUE, "open failed for map %x err %u\n", mapping_modes[a1], ret ); + } + if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); + + CloseHandle( m ); } SetLastError(0xdeadbeef); Modified: trunk/rostests/winetests/kernel32/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/locale…
============================================================================== --- trunk/rostests/winetests/kernel32/locale.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/locale.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -28,6 +28,7 @@ #include <assert.h> #include <stdlib.h> #include <stdarg.h> +#include <stdio.h> #include "wine/test.h" #include "windef.h" @@ -466,7 +467,10 @@ int ret; SYSTEMTIME curtime; LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + LCID lcid_ru = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT); char buffer[BUFFER_SIZE], input[BUFFER_SIZE], Expected[BUFFER_SIZE]; + char Broken[BUFFER_SIZE]; + char short_day[10], month[10], genitive_month[10]; memset(&curtime, 2, sizeof(SYSTEMTIME)); /* Invalid time */ STRINGSA("ddd',' MMM dd yy",""); @@ -542,7 +546,85 @@ &curtime, input, buffer, COUNTOF(buffer)); ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + + ret = GetDateFormat(lcid_ru, 0, &curtime, "ddMMMM", buffer, COUNTOF(buffer)); + if (!ret) + { + win_skip("LANG_RUSSIAN locale data unavailable\n"); + return; + } + + /* month part should be in genitive form */ + strcpy(genitive_month, buffer + 2); + ret = GetDateFormat(lcid_ru, 0, &curtime, "MMMM", buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + strcpy(month, buffer); + ok(strcmp(genitive_month, month) != 0, "Expected different month forms\n"); + + ret = GetDateFormat(lcid_ru, 0, &curtime, "ddd", buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + strcpy(short_day, buffer); + + STRINGSA("dd MMMMddd dd", ""); + sprintf(Expected, "04 %s%s 04", genitive_month, short_day); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); EXPECT_EQA; + + STRINGSA("MMMMddd dd", ""); + sprintf(Expected, "%s%s 04", month, short_day); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + EXPECT_EQA; + + STRINGSA("MMMMddd", ""); + sprintf(Expected, "%s%s", month, short_day); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + EXPECT_EQA; + + STRINGSA("MMMMdd", ""); + sprintf(Expected, "%s04", genitive_month); + sprintf(Broken, "%s04", month); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || + broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, + "Expected '%s', got '%s'\n", Expected, buffer); + + STRINGSA("MMMMdd ddd", ""); + sprintf(Expected, "%s04 %s", genitive_month, short_day); + sprintf(Broken, "%s04 %s", month, short_day); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || + broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, + "Expected '%s', got '%s'\n", Expected, buffer); + + STRINGSA("dd dddMMMM", ""); + sprintf(Expected, "04 %s%s", short_day, month); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + EXPECT_EQA; + + STRINGSA("dd dddMMMM ddd MMMMdd", ""); + sprintf(Expected, "04 %s%s %s %s04", short_day, month, short_day, genitive_month); + sprintf(Broken, "04 %s%s %s %s04", short_day, month, short_day, month); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || + broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, + "Expected '%s', got '%s'\n", Expected, buffer); + + /* with literal part */ + STRINGSA("ddd',' MMMM dd", ""); + sprintf(Expected, "%s, %s 04", short_day, genitive_month); + sprintf(Broken, "%s, %s 04", short_day, month); + ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); + ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || + broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, + "Expected '%s', got '%s'\n", Expected, buffer); } static void test_GetDateFormatW(void) Modified: trunk/rostests/winetests/kernel32/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/path.c…
============================================================================== --- trunk/rostests/winetests/kernel32/path.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/path.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -952,14 +952,133 @@ SetEnvironmentVariableA("TMP", save_TMP); } +static void test_GetLongPathNameA(void) +{ + DWORD length, explength, hostsize; + char tempfile[MAX_PATH]; + char longpath[MAX_PATH]; + char unc_prefix[MAX_PATH]; + char unc_short[MAX_PATH], unc_long[MAX_PATH]; + char temppath[MAX_PATH], temppath2[MAX_PATH]; + HANDLE file; + + if (!pGetLongPathNameA) + return; + + GetTempPathA(MAX_PATH, tempfile); + lstrcatA(tempfile, "longfilename.longext"); + + file = CreateFileA(tempfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + CloseHandle(file); + + /* Test a normal path with a small buffer size */ + memset(temppath, 0, MAX_PATH); + length = pGetLongPathNameA(tempfile, temppath, 4); + /* We have a failure so length should be the minumum plus the terminating '0' */ + ok(length >= lstrlen(tempfile) + 1, "Wrong length\n"); + ok(temppath[0] == 0, "Buffer should not have been touched\n"); + + /* Some UNC syntax tests */ + + memset(temppath, 0, MAX_PATH); + memset(temppath2, 0, MAX_PATH); + lstrcpyA(temppath2, "\\\\?\\"); + lstrcatA(temppath2, tempfile); + explength = length + 4; + + SetLastError(0xdeadbeef); + length = pGetLongPathNameA(temppath2, NULL, 0); + if (length == 0 && GetLastError() == ERROR_BAD_NET_NAME) + { + win_skip("UNC syntax tests don't work on Win98/WinMe\n"); + DeleteFileA(tempfile); + return; + } + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + + length = pGetLongPathNameA(temppath2, NULL, MAX_PATH); + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + + length = pGetLongPathNameA(temppath2, temppath, 4); + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(temppath[0] == 0, "Buffer should not have been touched\n"); + + /* Now an UNC path with the computername */ + lstrcpyA(unc_prefix, "\\\\"); + hostsize = sizeof(unc_prefix) - 2; + GetComputerName(unc_prefix + 2, &hostsize); + lstrcatA(unc_prefix, "\\"); + + /* Create a short syntax for the whole unc path */ + memset(unc_short, 0, MAX_PATH); + GetShortPathNameA(tempfile, temppath, MAX_PATH); + lstrcpyA(unc_short, unc_prefix); + unc_short[lstrlenA(unc_short)] = temppath[0]; + lstrcatA(unc_short, "$\\"); + lstrcatA(unc_short, strchr(temppath, '\\') + 1); + + /* Create a long syntax for reference */ + memset(longpath, 0, MAX_PATH); + pGetLongPathNameA(tempfile, temppath, MAX_PATH); + lstrcpyA(longpath, unc_prefix); + longpath[lstrlenA(longpath)] = temppath[0]; + lstrcatA(longpath, "$\\"); + lstrcatA(longpath, strchr(temppath, '\\') + 1); + + /* NULL test */ + SetLastError(0xdeadbeef); + length = pGetLongPathNameA(unc_short, NULL, 0); + if (length == 0 && GetLastError() == ERROR_BAD_NETPATH) + { + /* Seen on Window XP Home */ + win_skip("UNC with computername is not supported\n"); + DeleteFileA(tempfile); + return; + } + explength = lstrlenA(longpath) + 1; + todo_wine + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + + length = pGetLongPathNameA(unc_short, NULL, MAX_PATH); + todo_wine + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + + memset(unc_long, 0, MAX_PATH); + length = pGetLongPathNameA(unc_short, unc_long, lstrlenA(unc_short)); + /* length will include terminating '0' on failure */ + todo_wine + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(unc_long[0] == 0, "Buffer should not have been touched\n"); + + memset(unc_long, 0, MAX_PATH); + length = pGetLongPathNameA(unc_short, unc_long, length); + /* length doesn't include terminating '0' on success */ + explength--; + todo_wine + { + ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(!lstrcmpiA(unc_long, longpath), "Expected (%s), got (%s)\n", longpath, unc_long); + } + + DeleteFileA(tempfile); +} + static void test_GetLongPathNameW(void) { - DWORD length; + DWORD length, expanded; + BOOL ret; + HANDLE file; WCHAR empty[MAX_PATH]; - - /* Not present in all windows versions */ - if(pGetLongPathNameW) - { + WCHAR tempdir[MAX_PATH], name[200]; + WCHAR dirpath[4 + MAX_PATH + 200]; /* To ease removal */ + WCHAR shortpath[4 + MAX_PATH + 200 + 1 + 200]; + static const WCHAR prefix[] = { '\\','\\','?','\\', 0}; + static const WCHAR backslash[] = { '\\', 0}; + static const WCHAR letterX[] = { 'X', 0}; + + if (!pGetLongPathNameW) + return; + SetLastError(0xdeadbeef); length = pGetLongPathNameW(NULL,NULL,0); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) @@ -975,7 +1094,73 @@ length = pGetLongPathNameW(empty,NULL,0); ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); ok(GetLastError()==ERROR_PATH_NOT_FOUND,"GetLastError returned %d but expected ERROR_PATH_NOT_FOUND\n",GetLastError()); - } + + /* Create a long path name. The path needs to exist for these tests to + * succeed so we need the "\\?\" prefix when creating directories and + * files. + */ + name[0] = 0; + while (lstrlenW(name) < (sizeof(name)/sizeof(WCHAR) - 1)) + lstrcatW(name, letterX); + + GetTempPathW(MAX_PATH, tempdir); + + lstrcpyW(shortpath, prefix); + lstrcatW(shortpath, tempdir); + lstrcatW(shortpath, name); + lstrcpyW(dirpath, shortpath); + ret = CreateDirectoryW(shortpath, NULL); + ok(ret, "Could not create the temporary directory : %d\n", GetLastError()); + lstrcatW(shortpath, backslash); + lstrcatW(shortpath, name); + + /* Path does not exist yet and we know it overruns MAX_PATH */ + + /* No prefix */ + SetLastError(0xdeadbeef); + length = pGetLongPathNameW(shortpath + 4, NULL, 0); + ok(length == 0, "Expected 0, got %d\n", length); + todo_wine + ok(GetLastError() == ERROR_PATH_NOT_FOUND, + "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + /* With prefix */ + SetLastError(0xdeadbeef); + length = pGetLongPathNameW(shortpath, NULL, 0); + todo_wine + { + ok(length == 0, "Expected 0, got %d\n", length); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + } + + file = CreateFileW(shortpath, GENERIC_READ|GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + ok(file != INVALID_HANDLE_VALUE, + "Could not create the temporary file : %d.\n", GetLastError()); + CloseHandle(file); + + /* Path exists */ + + /* No prefix */ + SetLastError(0xdeadbeef); + length = pGetLongPathNameW(shortpath + 4, NULL, 0); + todo_wine + { + ok(length == 0, "Expected 0, got %d\n", length); + ok(GetLastError() == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + } + /* With prefix */ + expanded = 4 + (pGetLongPathNameW(tempdir, NULL, 0) - 1) + lstrlenW(name) + 1 + lstrlenW(name) + 1; + SetLastError(0xdeadbeef); + length = pGetLongPathNameW(shortpath, NULL, 0); + ok(length == expanded, "Expected %d, got %d\n", expanded, length); + + /* NULL buffer with length crashes on Windows */ + if (0) + length = pGetLongPathNameW(shortpath, NULL, 20); + + ok(DeleteFileW(shortpath), "Could not delete temporary file\n"); + ok(RemoveDirectoryW(dirpath), "Could not delete temporary directory\n"); } static void test_GetShortPathNameW(void) @@ -1273,11 +1458,18 @@ (void*)GetProcAddress( GetModuleHandleA("kernel32.dll"), "NeedCurrentDirectoryForExePathW" ); + /* Report only once */ + if (!pGetLongPathNameA) + win_skip("GetLongPathNameA is not available\n"); + if (!pGetLongPathNameW) + win_skip("GetLongPathNameW is not available\n"); + test_InitPathA(curdir, &curDrive, &otherDrive); test_CurrentDirectoryA(origdir,curdir); test_PathNameA(curdir, curDrive, otherDrive); test_CleanupPathA(origdir,curdir); test_GetTempPath(); + test_GetLongPathNameA(); test_GetLongPathNameW(); test_GetShortPathNameW(); test_GetSystemDirectory(); Modified: trunk/rostests/winetests/kernel32/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/volume…
============================================================================== --- trunk/rostests/winetests/kernel32/volume.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/volume.c [iso-8859-1] Tue Dec 22 10:43:11 2009 @@ -155,8 +155,11 @@ GetLastError()); /* Try on a arbitrary directory */ + /* On FAT filesystems it seems that GetLastError() is set to + ERROR_INVALID_FUNCTION. */ ret = pGetVolumeNameForVolumeMountPointA(temp_path, volume, len); - ok(ret == FALSE && GetLastError() == ERROR_NOT_A_REPARSE_POINT, + ok(ret == FALSE && (GetLastError() == ERROR_NOT_A_REPARSE_POINT || + GetLastError() == ERROR_INVALID_FUNCTION), "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", temp_path, GetLastError());
15 years
1
0
0
0
[cwittich] 44694: sync shell32_winetest with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 10:35:12 2009 New Revision: 44694 URL:
http://svn.reactos.org/svn/reactos?rev=44694&view=rev
Log: sync shell32_winetest with wine 1.1.35 Added: trunk/rostests/winetests/shell32/progman_dde.c (with props) Modified: trunk/rostests/winetests/shell32/shell32.rbuild trunk/rostests/winetests/shell32/shelllink.c trunk/rostests/winetests/shell32/shlexec.c trunk/rostests/winetests/shell32/shlfileop.c trunk/rostests/winetests/shell32/shlfolder.c Added: 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 (added) +++ trunk/rostests/winetests/shell32/progman_dde.c [iso-8859-1] Tue Dec 22 10:35:12 2009 @@ -1,0 +1,722 @@ +/* + * Unit test of the Program Manager DDE Interfaces + * + * Copyright 2009 Mikey Alexander + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* DDE Program Manager Tests + * - Covers basic CreateGroup, ShowGroup, DeleteGroup, AddItem, and DeleteItem + * functionality + * - Todo: Handle CommonGroupFlag + * Better AddItem Tests (Lots of parameters to test) + * Tests for Invalid Characters in Names / Invalid Parameters + */ + +#include <stdio.h> +#include <wine/test.h> +#include <winbase.h> +#include "dde.h" +#include "ddeml.h" +#include "winuser.h" +#include "shlobj.h" + +/* Timeout on DdeClientTransaction Call */ +#define MS_TIMEOUT_VAL 1000 +/* # of times to poll for window creation */ +#define PDDE_POLL_NUM 150 +/* time to sleep between polls */ +#define PDDE_POLL_TIME 300 + +/* Call Info */ +#define DDE_TEST_MISC 0x00010000 +#define DDE_TEST_CREATEGROUP 0x00020000 +#define DDE_TEST_DELETEGROUP 0x00030000 +#define DDE_TEST_SHOWGROUP 0x00040000 +#define DDE_TEST_ADDITEM 0x00050000 +#define DDE_TEST_DELETEITEM 0x00060000 +#define DDE_TEST_COMPOUND 0x00070000 +#define DDE_TEST_CALLMASK 0x00ff0000 + +#define DDE_TEST_NUMMASK 0x0000ffff + +static HRESULT (WINAPI *pSHGetLocalizedName)(LPCWSTR, LPWSTR, UINT, int *); +static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL); +static BOOL (WINAPI *pReadCabinetState)(CABINETSTATE *, int); + +static void init_function_pointers(void) +{ + HMODULE hmod; + + hmod = GetModuleHandleA("shell32.dll"); + pSHGetLocalizedName = (void*)GetProcAddress(hmod, "SHGetLocalizedName"); + pSHGetSpecialFolderPathA = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathA"); + pReadCabinetState = (void*)GetProcAddress(hmod, "ReadCabinetState"); + if (!pReadCabinetState) + pReadCabinetState = (void*)GetProcAddress(hmod, (LPSTR)651); +} + +static BOOL use_common(void) +{ + HMODULE hmod; + static BOOL (WINAPI *pIsNTAdmin)(DWORD, LPDWORD); + + /* IsNTAdmin() is available on all platforms. */ + hmod = LoadLibraryA("advpack.dll"); + pIsNTAdmin = (void*)GetProcAddress(hmod, "IsNTAdmin"); + + if (!pIsNTAdmin(0, NULL)) + { + /* We are definitely not an administrator */ + FreeLibrary(hmod); + return FALSE; + } + FreeLibrary(hmod); + + /* If we end up here we are on NT4+ as Win9x and WinMe don't have the + * notion of administrators (as we need it). + */ + + /* As of Vista we should always use the users directory. Tests with the + * real Administrator account on Windows 7 proved this. + * + * FIXME: We need a better way of identifying Vista+ as currently this check + * also covers Wine and we don't know yet which behavior we want to follow. + */ + if (pSHGetLocalizedName) + return FALSE; + + return TRUE; +} + +static char ProgramsDir[MAX_PATH]; + +static char Group1Title[MAX_PATH] = "Group1"; +static char Group2Title[MAX_PATH] = "Group2"; +static char Group3Title[MAX_PATH] = "Group3"; +static char StartupTitle[MAX_PATH] = "Startup"; + +static void init_strings(void) +{ + char startup[MAX_PATH]; + char commonprograms[MAX_PATH]; + char programs[MAX_PATH]; + + CABINETSTATE cs; + + if (pSHGetSpecialFolderPathA) + { + pSHGetSpecialFolderPathA(NULL, programs, CSIDL_PROGRAMS, FALSE); + pSHGetSpecialFolderPathA(NULL, commonprograms, CSIDL_COMMON_PROGRAMS, FALSE); + pSHGetSpecialFolderPathA(NULL, startup, CSIDL_STARTUP, FALSE); + } + else + { + HKEY key; + DWORD size; + LONG res; + + /* Older Win9x and NT4 */ + + RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key); + size = sizeof(programs); + RegQueryValueExA(key, "Programs", NULL, NULL, (LPBYTE)&programs, &size); + size = sizeof(startup); + RegQueryValueExA(key, "Startup", NULL, NULL, (LPBYTE)&startup, &size); + RegCloseKey(key); + + RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key); + size = sizeof(commonprograms); + res = RegQueryValueExA(key, "Common Programs", NULL, NULL, (LPBYTE)&commonprograms, &size); + RegCloseKey(key); + } + + /* ProgramsDir on Vista+ is always the users one (CSIDL_PROGRAMS). Before Vista + * it depends on whether the user is an administrator (CSIDL_COMMON_PROGRAMS) or + * not (CSIDL_PROGRAMS). + */ + if (use_common()) + lstrcpyA(ProgramsDir, commonprograms); + else + lstrcpyA(ProgramsDir, programs); + + memset(&cs, 0, sizeof(cs)); + pReadCabinetState(&cs, sizeof(cs)); + if (cs.fFullPathTitle == -1) + { + lstrcpyA(Group1Title, ProgramsDir); + lstrcatA(Group1Title, "\\Group1"); + lstrcpyA(Group2Title, ProgramsDir); + lstrcatA(Group2Title, "\\Group2"); + lstrcpyA(Group3Title, ProgramsDir); + lstrcatA(Group3Title, "\\Group3"); + + lstrcpyA(StartupTitle, startup); + } + else + { + /* Vista has the nice habit of displaying the full path in English + * and the short one localized. CSIDL_STARTUP on Vista gives us the + * English version so we have to 'translate' this one. + * + * MSDN claims it should be used for files not folders but this one + * suits our purposes just fine. + */ + if (pSHGetLocalizedName) + { + WCHAR startupW[MAX_PATH]; + WCHAR module[MAX_PATH]; + WCHAR module_expanded[MAX_PATH]; + WCHAR localized[MAX_PATH]; + int id; + + MultiByteToWideChar(CP_ACP, 0, startup, -1, startupW, sizeof(startupW)/sizeof(WCHAR)); + pSHGetLocalizedName(startupW, module, MAX_PATH, &id); + ExpandEnvironmentStringsW(module, module_expanded, MAX_PATH); + LoadStringW(GetModuleHandleW(module_expanded), id, localized, MAX_PATH); + + WideCharToMultiByte(CP_ACP, 0, localized, -1, StartupTitle, sizeof(StartupTitle), NULL, NULL); + } + else + { + lstrcpyA(StartupTitle, (strrchr(startup, '\\') + 1)); + } + } +} + +static HDDEDATA CALLBACK DdeCallback(UINT type, UINT format, HCONV hConv, HSZ hsz1, HSZ hsz2, + HDDEDATA hDDEData, ULONG_PTR data1, ULONG_PTR data2) +{ + trace("Callback: type=%i, format=%i\n", type, format); + return NULL; +} + +/* + * Encoded String for Error Messages so that inner failures can determine + * what test is failing. Format is: [Code:TestNum] + */ +static const char * GetStringFromTestParams(int testParams) +{ + int testNum; + static char testParamString[64]; + const char *callId; + + testNum = testParams & DDE_TEST_NUMMASK; + switch (testParams & DDE_TEST_CALLMASK) + { + default: + case DDE_TEST_MISC: + callId = "MISC"; + break; + case DDE_TEST_CREATEGROUP: + callId = "C_G"; + break; + case DDE_TEST_DELETEGROUP: + callId = "D_G"; + break; + case DDE_TEST_SHOWGROUP: + callId = "S_G"; + break; + case DDE_TEST_ADDITEM: + callId = "A_I"; + break; + case DDE_TEST_DELETEITEM: + callId = "D_I"; + break; + case DDE_TEST_COMPOUND: + callId = "CPD"; + break; + } + + sprintf(testParamString, " [%s:%i]", callId, testNum); + return testParamString; +} + +/* Transfer DMLERR's into text readable strings for Error Messages */ +#define DMLERR_TO_STR(x) case x: return#x; +static const char * GetStringFromError(UINT err) +{ + switch (err) + { + DMLERR_TO_STR(DMLERR_NO_ERROR); + DMLERR_TO_STR(DMLERR_ADVACKTIMEOUT); + DMLERR_TO_STR(DMLERR_BUSY); + DMLERR_TO_STR(DMLERR_DATAACKTIMEOUT); + DMLERR_TO_STR(DMLERR_DLL_NOT_INITIALIZED); + DMLERR_TO_STR(DMLERR_DLL_USAGE); + DMLERR_TO_STR(DMLERR_EXECACKTIMEOUT); + DMLERR_TO_STR(DMLERR_INVALIDPARAMETER); + DMLERR_TO_STR(DMLERR_LOW_MEMORY); + DMLERR_TO_STR(DMLERR_MEMORY_ERROR); + DMLERR_TO_STR(DMLERR_NOTPROCESSED); + DMLERR_TO_STR(DMLERR_NO_CONV_ESTABLISHED); + DMLERR_TO_STR(DMLERR_POKEACKTIMEOUT); + DMLERR_TO_STR(DMLERR_POSTMSG_FAILED); + DMLERR_TO_STR(DMLERR_REENTRANCY); + DMLERR_TO_STR(DMLERR_SERVER_DIED); + DMLERR_TO_STR(DMLERR_SYS_ERROR); + DMLERR_TO_STR(DMLERR_UNADVACKTIMEOUT); + DMLERR_TO_STR(DMLERR_UNFOUND_QUEUE_ID); + default: + return "Unknown DML Error"; + } +} + +/* Helper Function to Transfer DdeGetLastError into a String */ +static const char * GetDdeLastErrorStr(DWORD instance) +{ + UINT err = DdeGetLastError(instance); + + return GetStringFromError(err); +} + +/* Execute a Dde Command and return the error & result */ +/* Note: Progman DDE always returns a pointer to 0x00000001 on a successful result */ +static void DdeExecuteCommand(DWORD instance, HCONV hConv, const char *strCmd, HDDEDATA *hData, UINT *err, int testParams) +{ + HDDEDATA command; + + command = DdeCreateDataHandle(instance, (LPBYTE) strCmd, strlen(strCmd)+1, 0, 0L, 0, 0); + ok (command != NULL, "DdeCreateDataHandle Error %s.%s\n", + GetDdeLastErrorStr(instance), GetStringFromTestParams(testParams)); + *hData = DdeClientTransaction((void *) command, + -1, + hConv, + 0, + 0, + XTYP_EXECUTE, + MS_TIMEOUT_VAL, + NULL); + + /* hData is technically a pointer, but for Program Manager, + * it is NULL (error) or 1 (success) + * TODO: Check other versions of Windows to verify 1 is returned. + * While it is unlikely that anyone is actually testing that the result is 1 + * if all versions of windows return 1, Wine should also. + */ + if (*hData == NULL) + { + *err = DdeGetLastError(instance); + } + else + { + *err = DMLERR_NO_ERROR; + todo_wine + { + ok(*hData == (HDDEDATA) 1, "Expected HDDEDATA Handle == 1, actually %p.%s\n", + *hData, GetStringFromTestParams(testParams)); + } + } + DdeFreeDataHandle(command); +} + +/* + * Check if Window is onscreen with the appropriate name. + * + * Windows are not created synchronously. So we do not know + * when and if the window will be created/shown on screen. + * This function implements a polling mechanism to determine + * creation. + * A more complicated method would be to use SetWindowsHookEx. + * Since polling worked fine in my testing, no reason to implement + * the other. Comments about other methods of determining when + * window creation happened were not encouraging (not including + * SetWindowsHookEx). + */ +static void CheckWindowCreated(const char *winName, int closeWindow, int testParams) +{ + HWND window = NULL; + int i; + + /* Poll for Window Creation */ + for (i = 0; window == NULL && i < PDDE_POLL_NUM; i++) + { + Sleep(PDDE_POLL_TIME); + window = FindWindowA(NULL, 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)); + + /* Close Window as desired. */ + if (window != NULL && closeWindow) + { + SendMessageA(window, WM_SYSCOMMAND, SC_CLOSE, 0); + } +} + +/* Check for Existence (or non-existence) of a file or group + * When testing for existence of a group, groupName is not needed + */ +static void CheckFileExistsInProgramGroups(const char *nameToCheck, int shouldExist, int isGroup, + const char *groupName, int testParams) +{ + char path[MAX_PATH]; + DWORD attributes; + int len; + + lstrcpyA(path, ProgramsDir); + + len = strlen(path) + strlen(nameToCheck)+1; + if (groupName != NULL) + { + len += strlen(groupName)+1; + } + ok (len <= MAX_PATH, "Path Too Long.%s\n", GetStringFromTestParams(testParams)); + if (len <= MAX_PATH) + { + if (groupName != NULL) + { + strcat(path, "\\"); + strcat(path, groupName); + } + strcat(path, "\\"); + strcat(path, nameToCheck); + attributes = GetFileAttributes(path); + if (!shouldExist) + { + ok (attributes == INVALID_FILE_ATTRIBUTES , "File exists and shouldn't %s.%s\n", + path, GetStringFromTestParams(testParams)); + } else { + if (attributes == INVALID_FILE_ATTRIBUTES) + { + ok (FALSE, "Created File %s doesn't exist.%s\n", path, GetStringFromTestParams(testParams)); + } else if (isGroup) { + ok (attributes & FILE_ATTRIBUTE_DIRECTORY, "%s is not a folder (attr=%x).%s\n", + path, attributes, GetStringFromTestParams(testParams)); + } else { + ok (attributes & FILE_ATTRIBUTE_ARCHIVE, "Created File %s has wrong attributes (%x).%s\n", + path, attributes, GetStringFromTestParams(testParams)); + } + } + } +} + +/* Create Group Test. + * command and expected_result. + * if expected_result is DMLERR_NO_ERROR, test + * 1. group was created + * 2. window is open + */ +static void CreateGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *groupName, const char *windowTitle, int testParams) +{ + HDDEDATA hData; + UINT error; + + /* Execute Command & Check Result */ + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); + todo_wine + { + ok (expected_result == error, "CreateGroup %s: Expected Error %s, received %s.%s\n", + groupName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + + /* No Error */ + if (error == DMLERR_NO_ERROR) + { + + /* Check if Group Now Exists */ + CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams); + /* Check if Window is Open (polling) */ + CheckWindowCreated(windowTitle, TRUE, testParams); + } +} + +/* Show Group Test. + * DDE command, expected_result, and the group name to check for existence + * if expected_result is DMLERR_NO_ERROR, test + * 1. window is open + */ +static void ShowGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *groupName, const char *windowTitle, int closeAfterShowing, int testParams) +{ + HDDEDATA hData; + UINT error; + + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); +/* todo_wine... Is expected to fail, wine stubbed functions DO fail */ +/* TODO REMOVE THIS CODE!!! */ + if (expected_result == DMLERR_NOTPROCESSED) + { + ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n", + groupName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } else { + todo_wine + { + ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n", + groupName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + } + + if (error == DMLERR_NO_ERROR) + { + /* Check if Window is Open (polling) */ + CheckWindowCreated(windowTitle, closeAfterShowing, testParams); + } +} + +/* Delete Group Test. + * DDE command, expected_result, and the group name to check for existence + * if expected_result is DMLERR_NO_ERROR, test + * 1. group does not exist + */ +static void DeleteGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *groupName, int testParams) +{ + HDDEDATA hData; + UINT error; + + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); + todo_wine + { + ok (expected_result == error, "DeleteGroup %s: Expected Error %s, received %s.%s\n", + groupName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + + if (error == DMLERR_NO_ERROR) + { + /* Check that Group does not exist */ + CheckFileExistsInProgramGroups(groupName, FALSE, TRUE, NULL, testParams); + } +} + +/* Add Item Test + * DDE command, expected result, and group and file name where it should exist. + * checks to make sure error code matches expected error code + * checks to make sure item exists if successful + */ +static void AddItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *fileName, const char *groupName, int testParams) +{ + HDDEDATA hData; + UINT error; + + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); + todo_wine + { + ok (expected_result == error, "AddItem %s: Expected Error %s, received %s.%s\n", + fileName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + + if (error == DMLERR_NO_ERROR) + { + /* Check that File exists */ + CheckFileExistsInProgramGroups(fileName, TRUE, FALSE, groupName, testParams); + } +} + +/* Delete Item Test. + * DDE command, expected result, and group and file name where it should exist. + * checks to make sure error code matches expected error code + * checks to make sure item does not exist if successful + */ +static void DeleteItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *fileName, const char *groupName, int testParams) +{ + HDDEDATA hData; + UINT error; + + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); + todo_wine + { + ok (expected_result == error, "DeleteItem %s: Expected Error %s, received %s.%s\n", + fileName, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + + if (error == DMLERR_NO_ERROR) + { + /* Check that File does not exist */ + CheckFileExistsInProgramGroups(fileName, FALSE, FALSE, groupName, testParams); + } +} + +/* Compound Command Test. + * not really generic, assumes command of the form: + * [CreateGroup ...][AddItem ...][AddItem ...] + * All samples I've seen using Compound were of this form (CreateGroup, + * AddItems) so this covers minimum expected functionality. + */ +static void CompoundCommandTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, + const char *groupName, const char *windowTitle, const char *fileName1, + const char *fileName2, int testParams) +{ + HDDEDATA hData; + UINT error; + + DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); + todo_wine + { + ok (expected_result == error, "Compound String %s: Expected Error %s, received %s.%s\n", + command, GetStringFromError(expected_result), GetStringFromError(error), + GetStringFromTestParams(testParams)); + } + + if (error == DMLERR_NO_ERROR) + { + /* Check that File exists */ + CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams); + CheckWindowCreated(windowTitle, FALSE, testParams); + CheckFileExistsInProgramGroups(fileName1, TRUE, FALSE, groupName, testParams); + CheckFileExistsInProgramGroups(fileName2, TRUE, FALSE, groupName, testParams); + } +} + +static void CreateAddItemText(char *itemtext, const char *cmdline, const char *name) +{ + lstrcpyA(itemtext, "[AddItem("); + lstrcatA(itemtext, cmdline); + lstrcatA(itemtext, ","); + lstrcatA(itemtext, name); + lstrcatA(itemtext, ")]"); +} + +/* 1st set of tests */ +static int DdeTestProgman(DWORD instance, HCONV hConv) +{ + HDDEDATA hData; + UINT error; + int testnum; + char temppath[MAX_PATH]; + char f1g1[MAX_PATH], f2g1[MAX_PATH], f3g1[MAX_PATH], f1g3[MAX_PATH], f2g3[MAX_PATH]; + char itemtext[MAX_PATH + 20]; + char comptext[2 * (MAX_PATH + 20) + 21]; + + testnum = 1; + /* Invalid Command */ + DdeExecuteCommand(instance, hConv, "[InvalidCommand()]", &hData, &error, DDE_TEST_MISC|testnum++); + ok (error == DMLERR_NOTPROCESSED, "InvalidCommand(), expected error %s, received %s.\n", + GetStringFromError(DMLERR_NOTPROCESSED), GetStringFromError(error)); + + /* On Vista+ the files have to exist when adding a link */ + GetTempPathA(MAX_PATH, temppath); + GetTempFileNameA(temppath, "dde", 0, f1g1); + GetTempFileNameA(temppath, "dde", 0, f2g1); + GetTempFileNameA(temppath, "dde", 0, f3g1); + GetTempFileNameA(temppath, "dde", 0, f1g3); + GetTempFileNameA(temppath, "dde", 0, f2g3); + + /* CreateGroup Tests (including AddItem, DeleteItem) */ + CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++); + CreateAddItemText(itemtext, f1g1, "f1g1Name"); + AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f1g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); + CreateAddItemText(itemtext, f2g1, "f2g1Name"); + AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); + DeleteItemTest(instance, hConv, "[DeleteItem(f2g1Name)]", DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++); + CreateAddItemText(itemtext, f3g1, "f3g1Name"); + AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); + CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++); + /* Create Group that already exists - same instance */ + CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++); + + /* ShowGroup Tests */ + ShowGroupTest(instance, hConv, "[ShowGroup(Group1)]", DMLERR_NOTPROCESSED, "Group1", Group1Title, TRUE, DDE_TEST_SHOWGROUP|testnum++); + DeleteItemTest(instance, hConv, "[DeleteItem(f3g1Name)]", DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++); + ShowGroupTest(instance, hConv, "[ShowGroup(Startup,0)]", DMLERR_NO_ERROR, "Startup", StartupTitle, TRUE, DDE_TEST_SHOWGROUP|testnum++); + ShowGroupTest(instance, hConv, "[ShowGroup(Group1,0)]", DMLERR_NO_ERROR, "Group1", Group1Title, FALSE, DDE_TEST_SHOWGROUP|testnum++); + + /* DeleteGroup Test - Note that Window is Open for this test */ + DeleteGroupTest(instance, hConv, "[DeleteGroup(Group1)]", DMLERR_NO_ERROR, "Group1", DDE_TEST_DELETEGROUP|testnum++); + + /* Compound Execute String Command */ + lstrcpyA(comptext, "[CreateGroup(Group3)]"); + CreateAddItemText(itemtext, f1g3, "f1g3Name"); + lstrcatA(comptext, itemtext); + CreateAddItemText(itemtext, f2g3, "f2g3Name"); + lstrcatA(comptext, itemtext); + CompoundCommandTest(instance, hConv, comptext, DMLERR_NO_ERROR, "Group3", Group3Title, "f1g3Name.lnk", "f2g3Name.lnk", DDE_TEST_COMPOUND|testnum++); + + DeleteGroupTest(instance, hConv, "[DeleteGroup(Group3)]", DMLERR_NO_ERROR, "Group3", DDE_TEST_DELETEGROUP|testnum++); + + /* Full Parameters of Add Item */ + /* AddItem(CmdLine[,Name[,IconPath[,IconIndex[,xPos,yPos[,DefDir[,HotKey[,fMinimize[fSeparateSpace]]]]]]]) */ + + DeleteFileA(f1g1); + DeleteFileA(f2g1); + DeleteFileA(f3g1); + DeleteFileA(f1g3); + DeleteFileA(f2g3); + + return testnum; +} + +/* 2nd set of tests - 2nd connection */ +static void DdeTestProgman2(DWORD instance, HCONV hConv, int testnum) +{ + /* Create Group that already exists on a separate connection */ + CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++); + DeleteGroupTest(instance, hConv, "[DeleteGroup(Group2)]", DMLERR_NO_ERROR, "Group2", DDE_TEST_DELETEGROUP|testnum++); +} + +START_TEST(progman_dde) +{ + DWORD instance = 0; + UINT err; + HSZ hszProgman; + HCONV hConv; + int testnum; + + init_function_pointers(); + init_strings(); + + /* Initialize DDE Instance */ + err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0); + ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err)); + + /* Create Connection */ + hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI); + ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance)); + hConv = DdeConnect(instance, hszProgman, hszProgman, NULL); + ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n"); + /* Seeing failures on early versions of Windows Connecting to progman, exit if connection fails */ + if (hConv == NULL) + { + ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); + return; + } + + /* Run Tests */ + testnum = DdeTestProgman(instance, hConv); + + /* Cleanup & Exit */ + ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance)); + ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); + + /* 2nd Instance (Followup Tests) */ + /* Initialize DDE Instance */ + instance = 0; + err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0); + ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err)); + + /* Create Connection */ + hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI); + ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance)); + hConv = DdeConnect(instance, hszProgman, hszProgman, NULL); + ok (hConv != NULL, "DdeConnect Error %s\n", GetDdeLastErrorStr(instance)); + ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n"); + + /* Run Tests */ + DdeTestProgman2(instance, hConv, testnum); + + /* Cleanup & Exit */ + ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance)); + ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); +} Propchange: trunk/rostests/winetests/shell32/progman_dde.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/shell32/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shell32…
============================================================================== --- trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] Tue Dec 22 10:35:12 2009 @@ -18,6 +18,7 @@ <file>appbar.c</file> <file>autocomplete.c</file> <file>generated.c</file> + <file>progman_dde.c</file> <file>shelllink.c</file> <file>shellpath.c</file> <file>shlexec.c</file> Modified: trunk/rostests/winetests/shell32/shelllink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shellli…
============================================================================== --- trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] Tue Dec 22 10:35:12 2009 @@ -275,6 +275,20 @@ ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r); ok(lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer); + strcpy(buffer,"garbage"); + r = IShellLinkA_SetArguments(sl, NULL); + ok(SUCCEEDED(r), "SetArguments failed (0x%08x)\n", r); + r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); + ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r); + ok(!buffer[0] || lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer); + + strcpy(buffer,"garbage"); + r = IShellLinkA_SetArguments(sl, ""); + ok(SUCCEEDED(r), "SetArguments failed (0x%08x)\n", r); + r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); + ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r); + ok(!buffer[0], "GetArguments returned '%s'\n", buffer); + /* Test Getting / Setting showcmd */ i=0xdeadbeef; r = IShellLinkA_GetShowCmd(sl, &i); 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] Tue Dec 22 10:35:12 2009 @@ -1095,7 +1095,7 @@ * like '.mpeg', etc. * Also it means we cannot do any other test. */ - trace("FindExecutable() is broken -> skipping 4+ character extension tests\n"); + win_skip("FindExecutable() is broken -> not running 4+ character extension tests\n"); return; } 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] Tue Dec 22 10:35:12 2009 @@ -965,9 +965,10 @@ set_curr_dir_path(from, "test1.txt\0test2.txt\0"); set_curr_dir_path(to, "test3.txt\0"); retval = SHFileOperation(&shfo); - if (retval == DE_FLDDESTISFILE) - { - /* Vista and W2K8 (broken or new behavior ?) */ + if (retval == DE_FLDDESTISFILE || /* Vista and W2K8 */ + retval == DE_INVALIDFILES) /* Win7 */ + { + /* Most likely new behavior */ ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); } else 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] Tue Dec 22 10:35:12 2009 @@ -472,7 +472,8 @@ /* WinXP and up store the filenames as both ANSI and UNICODE in the pidls */ if (pidlLast->mkid.cb >= 76) { ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName) || - (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)), /* Vista */ + (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)) || /* Vista */ + (pidlLast->mkid.cb >= 98 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[68], wszFileName)), /* Win7 */ "Filename should be stored as wchar-string at this position!\n"); } @@ -585,6 +586,7 @@ ok (!lstrcmpiW(wszTestFile, wszTestFile2), "GetDisplayNameOf returns incorrect path!\n"); } + ILFree(pidlTestFile); IShellFolder_Release(psfDesktop); IShellFolder_Release(psfPersonal); } @@ -646,8 +648,12 @@ * key. So the test will return at this point, if run on wine. */ lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey); - ok (lResult == ERROR_SUCCESS, "RegOpenKeyEx failed! result: %08x\n", lResult); + ok (lResult == ERROR_SUCCESS || + lResult == ERROR_ACCESS_DENIED, + "RegOpenKeyEx failed! result: %08x\n", lResult); if (lResult != ERROR_SUCCESS) { + if (lResult == ERROR_ACCESS_DENIED) + skip("Not enough rights to open the registry key\n"); IMalloc_Free(ppM, pidlMyDocuments); IShellFolder_Release(psfDesktop); return; @@ -1524,18 +1530,38 @@ pFileStructA->uFileTime == pFileStructW->uTime, "Last write time should match creation time!\n"); - ok (pFileStructA->uFileDate == pFileStructW->uDate2 && - pFileStructA->uFileTime == pFileStructW->uTime2, - "Last write time should match last access time!\n"); + /* On FAT filesystems the last access time is midnight + local time, so the values of uDate2 and uTime2 will + depend on the local timezone. If the times are exactly + equal then the dates should be identical for both FAT + and NTFS as no timezone is more than 1 day away from UTC. + */ + if (pFileStructA->uFileTime == pFileStructW->uTime2) + { + ok (pFileStructA->uFileDate == pFileStructW->uDate2, + "Last write date and time should match last access date and time!\n"); + } + else + { + /* Filesystem may be FAT. Check date within 1 day + and seconds are zero. */ + trace ("Filesystem may be FAT. Performing less strict atime test.\n"); + ok ((pFileStructW->uTime2 & 0x1F) == 0, + "Last access time on FAT filesystems should have zero seconds.\n"); + /* TODO: Perform check for date being within one day.*/ + } ok (!lstrcmpW(wszFile[i], pFileStructW->wszName) || - !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)), /* Vista */ + !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)) || /* Vista */ + !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 26)), /* Win7 */ "The filename should be stored in unicode at this position!\n"); } } pILFree(pidlFile); } + + IShellFolder_Release(psfPersonal); } static void testSHGetFolderPathAndSubDirA(void)
15 years
1
0
0
0
[cwittich] 44693: sync msi with wine 1.1.35
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 22 10:28:03 2009 New Revision: 44693 URL:
http://svn.reactos.org/svn/reactos?rev=44693&view=rev
Log: sync msi with wine 1.1.35 Modified: trunk/reactos/dll/win32/msi/action.c trunk/reactos/dll/win32/msi/alter.c trunk/reactos/dll/win32/msi/appsearch.c trunk/reactos/dll/win32/msi/automation.c trunk/reactos/dll/win32/msi/database.c trunk/reactos/dll/win32/msi/drop.c trunk/reactos/dll/win32/msi/files.c trunk/reactos/dll/win32/msi/join.c trunk/reactos/dll/win32/msi/media.c trunk/reactos/dll/win32/msi/msi.c trunk/reactos/dll/win32/msi/msipriv.h trunk/reactos/dll/win32/msi/msiserver.idl trunk/reactos/dll/win32/msi/msiserver_dispids.h trunk/reactos/dll/win32/msi/package.c trunk/reactos/dll/win32/msi/record.c trunk/reactos/dll/win32/msi/sql.tab.c trunk/reactos/dll/win32/msi/sql.tab.h trunk/reactos/dll/win32/msi/sql.y trunk/reactos/dll/win32/msi/storages.c trunk/reactos/dll/win32/msi/streams.c trunk/reactos/dll/win32/msi/string.c trunk/reactos/dll/win32/msi/table.c trunk/reactos/dll/win32/msi/where.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/msi/action.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/action.c?rev…
Modified: trunk/reactos/dll/win32/msi/alter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/alter.c?rev=…
Modified: trunk/reactos/dll/win32/msi/appsearch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/appsearch.c?…
Modified: trunk/reactos/dll/win32/msi/automation.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/automation.c…
Modified: trunk/reactos/dll/win32/msi/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/database.c?r…
Modified: trunk/reactos/dll/win32/msi/drop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/drop.c?rev=4…
Modified: trunk/reactos/dll/win32/msi/files.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/files.c?rev=…
Modified: trunk/reactos/dll/win32/msi/join.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/join.c?rev=4…
Modified: trunk/reactos/dll/win32/msi/media.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/media.c?rev=…
Modified: trunk/reactos/dll/win32/msi/msi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.c?rev=44…
Modified: trunk/reactos/dll/win32/msi/msipriv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msipriv.h?re…
Modified: trunk/reactos/dll/win32/msi/msiserver.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver.id…
Modified: trunk/reactos/dll/win32/msi/msiserver_dispids.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiserver_di…
Modified: trunk/reactos/dll/win32/msi/package.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/package.c?re…
Modified: trunk/reactos/dll/win32/msi/record.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/record.c?rev…
Modified: trunk/reactos/dll/win32/msi/sql.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/sql.tab.c?re…
Modified: trunk/reactos/dll/win32/msi/sql.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/sql.tab.h?re…
Modified: trunk/reactos/dll/win32/msi/sql.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/sql.y?rev=44…
Modified: trunk/reactos/dll/win32/msi/storages.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/storages.c?r…
Modified: trunk/reactos/dll/win32/msi/streams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/streams.c?re…
Modified: trunk/reactos/dll/win32/msi/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/string.c?rev…
Modified: trunk/reactos/dll/win32/msi/table.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/table.c?rev=…
Modified: trunk/reactos/dll/win32/msi/where.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/where.c?rev=…
15 years
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
51
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
Results per page:
10
25
50
100
200