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
February 2010
----- 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
365 discussions
Start a n
N
ew thread
[cwittich] 45471: [MSXML3_WINETEST] sync msxml3_winetest to wine 1.1.38
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Feb 6 22:35:37 2010 New Revision: 45471 URL:
http://svn.reactos.org/svn/reactos?rev=45471&view=rev
Log: [MSXML3_WINETEST] sync msxml3_winetest to wine 1.1.38 Modified: trunk/rostests/winetests/msxml3/domdoc.c trunk/rostests/winetests/msxml3/saxreader.c trunk/rostests/winetests/msxml3/xmldoc.c trunk/rostests/winetests/msxml3/xmlelem.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] Sat Feb 6 22:35:37 2010 @@ -509,8 +509,8 @@ return buf; } -#define expect_node(node, expstr) { char str[4096]; node_to_string(node, str); ok(strcmp(str, expstr)==0, "Invalid node: %s, exptected %s\n", str, expstr); } -#define expect_list_and_release(list, expstr) { char *str = list_to_string(list); ok(strcmp(str, expstr)==0, "Invalid node list: %s, exptected %s\n", str, expstr); if (list) IXMLDOMNodeList_Release(list); } +#define expect_node(node, expstr) { char str[4096]; node_to_string(node, str); ok(strcmp(str, expstr)==0, "Invalid node: %s, expected %s\n", str, expstr); } +#define expect_list_and_release(list, expstr) { char *str = list_to_string(list); ok(strcmp(str, expstr)==0, "Invalid node list: %s, expected %s\n", str, expstr); if (list) IXMLDOMNodeList_Release(list); } static void test_domdoc( void ) { @@ -868,6 +868,77 @@ ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); SysFreeString(str); + /* delete data */ + /* invalid arguments */ + r = IXMLDOMText_deleteData(nodetext, -1, 1); + ok(r == E_INVALIDARG, "ret %08x\n", r ); + + r = IXMLDOMText_deleteData(nodetext, 0, 0); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_deleteData(nodetext, 0, -1); + ok(r == E_INVALIDARG, "ret %08x\n", r ); + + r = IXMLDOMText_get_length(nodetext, &nLength); + ok(r == S_OK, "ret %08x\n", r ); + ok(nLength == 43, "expected 43 got %d\n", nLength); + + r = IXMLDOMText_deleteData(nodetext, nLength, 1); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_deleteData(nodetext, nLength+1, 1); + ok(r == E_INVALIDARG, "ret %08x\n", r ); + + /* delete from start */ + r = IXMLDOMText_deleteData(nodetext, 0, 5); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_get_length(nodetext, &nLength); + ok(r == S_OK, "ret %08x\n", r ); + ok(nLength == 38, "expected 38 got %d\n", nLength); + + r = IXMLDOMText_get_text(nodetext, &str); + ok(r == S_OK, "ret %08x\n", r ); + /* whitespace preserving needs to be handled here */ + todo_wine ok( !lstrcmpW( str, _bstr_("This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from end */ + r = IXMLDOMText_deleteData(nodetext, 35, 3); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_get_length(nodetext, &nLength); + ok(r == S_OK, "ret %08x\n", r ); + ok(nLength == 35, "expected 35 got %d\n", nLength); + + r = IXMLDOMText_get_text(nodetext, &str); + ok(r == S_OK, "ret %08x\n", r ); + todo_wine ok( !lstrcmpW( str, _bstr_("This &is a Middle; test <>\\Append") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from inside */ + r = IXMLDOMText_deleteData(nodetext, 1, 33); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_get_length(nodetext, &nLength); + ok(r == S_OK, "ret %08x\n", r ); + ok(nLength == 2, "expected 2 got %d\n", nLength); + + r = IXMLDOMText_get_text(nodetext, &str); + ok(r == S_OK, "ret %08x\n", r ); + todo_wine ok( !lstrcmpW( str, _bstr_("") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete whole data ... */ + r = IXMLDOMText_get_length(nodetext, &nLength); + ok(r == S_OK, "ret %08x\n", r ); + + r = IXMLDOMText_deleteData(nodetext, 0, nLength); + ok(r == S_OK, "ret %08x\n", r ); + /* ... and try again with empty string */ + r = IXMLDOMText_deleteData(nodetext, 0, nLength); + ok(r == S_OK, "ret %08x\n", r ); + /* test put_data */ V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(szstr1); @@ -1071,6 +1142,7 @@ r = IXMLDOMNode_get_ownerDocument( element, &owner ); ok( r == S_OK, "get_ownerDocument return code\n"); ok( owner != doc, "get_ownerDocument return\n"); + IXMLDOMDocument_Release(owner); type = NODE_INVALID; r = IXMLDOMNode_get_nodeType( element, &type); @@ -2926,6 +2998,76 @@ ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); SysFreeString(str); + /* delete data */ + /* invalid arguments */ + hr = IXMLDOMComment_deleteData(pComment, -1, 1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + hr = IXMLDOMComment_deleteData(pComment, 0, 0); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_deleteData(pComment, 0, -1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + hr = IXMLDOMComment_get_length(pComment, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 43, "expected 43 got %d\n", len); + + hr = IXMLDOMComment_deleteData(pComment, len, 1); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_deleteData(pComment, len+1, 1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + /* delete from start */ + hr = IXMLDOMComment_deleteData(pComment, 0, 5); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_get_length(pComment, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 38, "expected 38 got %d\n", len); + + hr = IXMLDOMComment_get_text(pComment, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from end */ + hr = IXMLDOMComment_deleteData(pComment, 35, 3); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_get_length(pComment, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 35, "expected 35 got %d\n", len); + + hr = IXMLDOMComment_get_text(pComment, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append ") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from inside */ + hr = IXMLDOMComment_deleteData(pComment, 1, 33); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_get_length(pComment, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 2, "expected 2 got %d\n", len); + + hr = IXMLDOMComment_get_text(pComment, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" ") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete whole data ... */ + hr = IXMLDOMComment_get_length(pComment, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMComment_deleteData(pComment, 0, len); + ok(hr == S_OK, "ret %08x\n", hr ); + /* ... and try again with empty string */ + hr = IXMLDOMComment_deleteData(pComment, 0, len); + ok(hr == S_OK, "ret %08x\n", hr ); + IXMLDOMComment_Release(pComment); } @@ -3268,6 +3410,77 @@ ok(hr == S_OK, "ret %08x\n", hr ); ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); SysFreeString(str); + + /* delete data */ + /* invalid arguments */ + hr = IXMLDOMCDATASection_deleteData(pCDataSec, -1, 1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, 0); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, -1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 43, "expected 43 got %d\n", len); + + hr = IXMLDOMCDATASection_deleteData(pCDataSec, len, 1); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_deleteData(pCDataSec, len+1, 1); + ok(hr == E_INVALIDARG, "ret %08x\n", hr ); + + /* delete from start */ + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, 5); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 38, "expected 38 got %d\n", len); + + hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from end */ + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 35, 3); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 35, "expected 35 got %d\n", len); + + hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append ") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete from inside */ + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 1, 33); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + ok(len == 2, "expected 2 got %d\n", len); + + hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( str, _bstr_(" ") ), "incorrect get_text string\n"); + SysFreeString(str); + + /* delete whole data ... */ + hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, len); + ok(hr == S_OK, "ret %08x\n", hr ); + + /* ... and try again with empty string */ + hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, len); + ok(hr == S_OK, "ret %08x\n", hr ); IXMLDOMCDATASection_Release(pCDataSec); } Modified: trunk/rostests/winetests/msxml3/saxreader.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/saxreade…
============================================================================== --- trunk/rostests/winetests/msxml3/saxreader.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msxml3/saxreader.c [iso-8859-1] Sat Feb 6 22:35:37 2010 @@ -520,6 +520,8 @@ ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); test_expect_call(CH_ENDTEST); + VariantClear(&var); + SADim[0].lLbound= 0; SADim[0].cElements= sizeof(szTestXML)-1; pSA = SafeArrayCreate(VT_UI1, 1, SADim); @@ -559,6 +561,8 @@ hr = ISAXXMLReader_parse(reader, var); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); test_expect_call(CH_ENDTEST); + + VariantClear(&var); file = CreateFileA(testXmlA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError()); @@ -591,6 +595,7 @@ IXMLDOMDocument_Release(domDocument); ISAXXMLReader_Release(reader); + SysFreeString(bstrData); } START_TEST(saxreader) Modified: trunk/rostests/winetests/msxml3/xmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmldoc.c…
============================================================================== --- trunk/rostests/winetests/msxml3/xmldoc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msxml3/xmldoc.c [iso-8859-1] Sat Feb 6 22:35:37 2010 @@ -39,6 +39,7 @@ static const char data[] = "<?xml version=\"1.0\" ?>\n" + "<!DOCTYPE BankAccount>\n" "<BankAccount>\n" " <Number>1234</Number>\n" " <Name>Captain Ahab</Name>\n" @@ -46,6 +47,33 @@ WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); CloseHandle(hf); +} + +static void create_stream_on_file(IStream **stream, LPCSTR path) +{ + HANDLE hfile; + HGLOBAL hglobal; + LPVOID ptr; + HRESULT hr; + DWORD file_size, read; + + hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); + file_size = GetFileSize(hfile, NULL); + + hglobal = GlobalAlloc(GHND, file_size); + ptr = GlobalLock(hglobal); + + ReadFile(hfile, ptr, file_size, &read, NULL); + ok(file_size == read, "Expected to read the whole file, read %d\n", read); + + hr = CreateStreamOnHGlobal(hglobal, TRUE, stream); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(*stream != NULL, "Expected non-NULL stream\n"); + + CloseHandle(hfile); + GlobalUnlock(hglobal); } static void test_xmldoc(void) @@ -56,10 +84,6 @@ IXMLElementCollection *collection = NULL, *inner = NULL; IPersistStreamInit *psi = NULL; IStream *stream = NULL; - HGLOBAL hglobal; - HANDLE hfile; - LPVOID ptr; - DWORD file_size, read; CHAR path[MAX_PATH]; LONG type, num_child; VARIANT vIndex, vName; @@ -70,35 +94,15 @@ static const WCHAR szNumVal[] = {'1','2','3','4',0}; static const WCHAR szName[] = {'N','A','M','E',0}; static const WCHAR szNameVal[] = {'C','a','p','t','a','i','n',' ','A','h','a','b',0}; + static const WCHAR szVersion[] = {'1','.','0',0}; hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return; - } + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); create_xml_file("bank.xml"); GetFullPathNameA("bank.xml", MAX_PATH, path, NULL); - - hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); - file_size = GetFileSize(hfile, NULL); - - hglobal = GlobalAlloc(GHND, file_size); - ptr = GlobalLock(hglobal); - - ReadFile(hfile, ptr, file_size, &read, NULL); - ok(file_size == read, "Expected to read the whole file, read %d\n", read); - - hr = CreateStreamOnHGlobal(hglobal, TRUE, &stream); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(stream != NULL, "Expected non-NULL stream\n"); - - CloseHandle(hfile); - GlobalUnlock(hglobal); + create_stream_on_file(&stream, path); hr = IXMLDocument_QueryInterface(doc, &IID_IPersistStreamInit, (LPVOID *)&psi); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); @@ -115,9 +119,34 @@ ok(stream != NULL, "Expected non-NULL stream\n"); + /* version field */ + hr = IXMLDocument_get_version(doc, NULL); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + hr = IXMLDocument_get_version(doc, &name); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(!lstrcmpW(name, szVersion), "Expected 1.0, got %s\n", wine_dbgstr_w(name)); + SysFreeString(name); + + /* doctype */ + hr = IXMLDocument_get_doctype(doc, NULL); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + hr = IXMLDocument_get_doctype(doc, &name); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(!lstrcmpW(name, szBankAccount), "Expected BANKACCOUNT, got %s\n", wine_dbgstr_w(name)); + SysFreeString(name); + hr = IXMLDocument_get_root(doc, &element); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(element != NULL, "Expected non-NULL element\n"); + + /* ::root() returns new instance each time */ + hr = IXMLDocument_get_root(doc, &child); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(child != NULL, "Expected non-NULL element\n"); + ok(child != element, "Expected new element instance\n"); + IXMLElement_Release(child); hr = IXMLElement_get_type(element, &type); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); @@ -251,11 +280,7 @@ hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return; - } + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); /* invalid vType type */ V_VT(&vType) = VT_NULL; @@ -334,6 +359,142 @@ IXMLDocument_Release(doc); } +static void test_persiststreaminit(void) +{ + IXMLDocument *doc = NULL; + IXMLElement *element = NULL; + IPersistStreamInit *psi = NULL; + IStream *stream = NULL; + STATSTG stat; + HRESULT hr; + ULARGE_INTEGER size; + CHAR path[MAX_PATH]; + CLSID id; + BSTR str; + static const WCHAR testW[] = {'t','e','s','t',0}; + + hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, + &IID_IXMLDocument, (LPVOID*)&doc); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXMLDocument_QueryInterface(doc, &IID_IPersistStreamInit, (LPVOID *)&psi); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(psi != NULL, "Expected non-NULL psi\n"); + + /* null arguments */ + hr = IPersistStreamInit_GetSizeMax(psi, NULL); + ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); + + hr = IPersistStreamInit_Load(psi, NULL); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + hr = IPersistStreamInit_Save(psi, NULL, FALSE); + todo_wine ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + hr = IPersistStreamInit_GetClassID(psi, NULL); + ok(hr == E_POINTER, "Expected E_POINTER, got %08x\n", hr); + + hr = IPersistStreamInit_IsDirty(psi); + todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + + create_xml_file("bank.xml"); + GetFullPathNameA("bank.xml", MAX_PATH, path, NULL); + create_stream_on_file(&stream, path); + + /* GetSizeMax not implemented */ + size.QuadPart = 0; + hr = IPersistStreamInit_GetSizeMax(psi, &size); + ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); + ok(size.QuadPart == 0, "Expected 0\n"); + + hr = IPersistStreamInit_Load(psi, stream); + IStream_Release(stream); + ok(hr == S_OK || hr == XML_E_INVALIDATROOTLEVEL, "Expected S_OK, got %08x\n", hr); + if(hr == XML_E_INVALIDATROOTLEVEL) + goto cleanup; + + hr = IPersistStreamInit_IsDirty(psi); + todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + + /* try to save document */ + stream = NULL; + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + hr = IPersistStreamInit_Save(psi, stream, FALSE); + todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + stat.cbSize.QuadPart = 0; + hr = IStream_Stat(stream, &stat, 0); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n"); + IStream_Release(stream); + + str = SysAllocString(testW); + hr = IXMLDocument_get_root(doc, &element); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + hr = IXMLElement_put_text(element, str); + IXMLElement_Release(element); + SysFreeString(str); + + hr = IPersistStreamInit_IsDirty(psi); + todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + + create_stream_on_file(&stream, path); + hr = IPersistStreamInit_Load(psi, stream); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + IStream_Release(stream); + + hr = IPersistStreamInit_IsDirty(psi); + todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + + /* reset internal stream */ + hr = IPersistStreamInit_InitNew(psi); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IPersistStreamInit_IsDirty(psi); + todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + + stream = NULL; + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IPersistStreamInit_Save(psi, stream, FALSE); + todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + stat.cbSize.QuadPart = 0; + hr = IStream_Stat(stream, &stat, 0); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n"); + IStream_Release(stream); + + memset(&id, 0, sizeof(id)); + hr = IPersistStreamInit_GetClassID(psi, &id); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(IsEqualCLSID(&id, &CLSID_XMLDocument), "Expected CLSID_XMLDocument\n"); + +cleanup: + IPersistStreamInit_Release(psi); + IXMLDocument_Release(doc); + DeleteFileA("bank.xml"); +} + +static BOOL test_try_xmldoc(void) +{ + IXMLDocument *doc = NULL; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, + &IID_IXMLDocument, (LPVOID*)&doc); + if (FAILED(hr)) + { + skip("Failed to create XMLDocument instance\n"); + return FALSE; + } + + IXMLDocument_Release(doc); + return TRUE; +} + START_TEST(xmldoc) { HRESULT hr; @@ -341,8 +502,15 @@ hr = CoInitialize(NULL); ok(hr == S_OK, "failed to init com\n"); + if (!test_try_xmldoc()) + { + CoUninitialize(); + return; + } + test_xmldoc(); test_createElement(); + test_persiststreaminit(); CoUninitialize(); } Modified: trunk/rostests/winetests/msxml3/xmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msxml3/xmlelem.…
============================================================================== --- trunk/rostests/winetests/msxml3/xmlelem.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msxml3/xmlelem.c [iso-8859-1] Sat Feb 6 22:35:37 2010 @@ -53,11 +53,7 @@ hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return; - } + ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); V_VT(&vType) = VT_I4; V_I4(&vType) = XMLELEMTYPE_ELEMENT; @@ -265,11 +261,7 @@ hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return; - } + ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); create_xml_file(szBankXML); GetFullPathNameA(szBankXML, MAX_PATH, pathA, NULL); @@ -438,6 +430,144 @@ DeleteFileA("bank.xml"); } +static void test_xmlelem_children(void) +{ + IXMLDocument *doc = NULL; + IXMLElement *element = NULL, *child = NULL, *child2 = NULL; + IXMLElementCollection *collection = NULL; + VARIANT vType, vName, vIndex; + LONG length; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, + &IID_IXMLDocument, (LPVOID*)&doc); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + V_VT(&vType) = VT_I4; + V_I4(&vType) = XMLELEMTYPE_ELEMENT; + V_VT(&vName) = VT_NULL; + hr = IXMLDocument_createElement(doc, vType, vName, &element); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(element != NULL, "Expected non-NULL element\n"); + + V_VT(&vType) = VT_I4; + V_I4(&vType) = XMLELEMTYPE_TEXT; + V_VT(&vName) = VT_NULL; + hr = IXMLDocument_createElement(doc, vType, vName, &child); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(child != NULL, "Expected non-NULL child\n"); + + V_VT(&vType) = VT_I4; + V_I4(&vType) = XMLELEMTYPE_TEXT; + V_VT(&vName) = VT_NULL; + hr = IXMLDocument_createElement(doc, vType, vName, &child2); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(child2 != NULL, "Expected non-NULL child\n"); + + hr = IXMLElement_addChild(element, child, 0, -1); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXMLElement_get_children(element, &collection); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(collection != NULL, "Expected non-NULL collection\n"); + + length = 0; + hr = IXMLElementCollection_get_length(collection, &length); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(length == 1, "Expected 1, got %08x\n", length); + + /* remove/add child and check what happens with collection */ + hr = IXMLElement_removeChild(element, child); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + length = -1; + hr = IXMLElementCollection_get_length(collection, &length); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(length == 0, "Expected 0, got %08x\n", length); + IXMLElementCollection_Release(collection); + + hr = IXMLElement_AddRef(child); + ok(hr == 2, "Expected 2, got %08x\n", hr); + IXMLElement_Release(child); + hr = IXMLElement_addChild(element, child, 0, -1); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + hr = IXMLElement_AddRef(child); + ok(hr == 2, "Expected 2, got %08x\n", hr); + IXMLElement_Release(child); + hr = IXMLElement_addChild(element, child2, 0, -1); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXMLElement_get_children(element, &collection); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(collection != NULL, "Expected non-NULL collection\n"); + + hr = IXMLElement_AddRef(child); + ok(hr == 2, "Expected 2, got %08x\n", hr); + IXMLElement_Release(child); + + length = 0; + hr = IXMLElementCollection_get_length(collection, &length); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(length == 2, "Expected 2, got %08x\n", length); + + IXMLElement_Release(child2); + + length = 0; + hr = IXMLElementCollection_get_length(collection, &length); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(length == 2, "Expected 2, got %08x\n", length); + + V_VT(&vIndex) = VT_I4; + V_I4(&vIndex) = 1; + hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child2); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(child2 != NULL, "Expected not NULL child\n"); + IXMLElementCollection_Release(collection); + IXMLElement_Release(child2); + + /* add element->child->child2 structure, then remove child2 from node */ + V_VT(&vType) = VT_I4; + V_I4(&vType) = XMLELEMTYPE_TEXT; + V_VT(&vName) = VT_NULL; + hr = IXMLDocument_createElement(doc, vType, vName, &child2); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(child2 != NULL, "Expected non-NULL child\n"); + + hr = IXMLElement_addChild(child, child2, 0, -1); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXMLElement_removeChild(element, child2); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + hr = IXMLElement_removeChild(child, child2); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IXMLElement_removeChild(child, NULL); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + + IXMLElement_Release(element); + IXMLElement_Release(child); + IXMLElement_Release(child2); + IXMLDocument_Release(doc); +} + +static BOOL test_try_xmldoc(void) +{ + IXMLDocument *doc = NULL; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, + &IID_IXMLDocument, (LPVOID*)&doc); + if (FAILED(hr)) + { + skip("Failed to create XMLDocument instance\n"); + return FALSE; + } + + IXMLDocument_Release(doc); + return TRUE; +} + START_TEST(xmlelem) { HRESULT hr; @@ -445,8 +575,15 @@ hr = CoInitialize(NULL); ok(hr == S_OK, "failed to init com\n"); + if (!test_try_xmldoc()) + { + CoUninitialize(); + return; + } + test_xmlelem(); test_xmlelem_collection(); + test_xmlelem_children(); CoUninitialize(); }
14 years, 10 months
1
0
0
0
[cwittich] 45470: [MSXML3] sync msxml3 to wine 1.1.38
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Feb 6 22:34:28 2010 New Revision: 45470 URL:
http://svn.reactos.org/svn/reactos?rev=45470&view=rev
Log: [MSXML3] sync msxml3 to wine 1.1.38 Modified: trunk/reactos/dll/win32/msxml3/attribute.c trunk/reactos/dll/win32/msxml3/bsc.c trunk/reactos/dll/win32/msxml3/cdata.c trunk/reactos/dll/win32/msxml3/comment.c trunk/reactos/dll/win32/msxml3/docfrag.c trunk/reactos/dll/win32/msxml3/domdoc.c trunk/reactos/dll/win32/msxml3/domimpl.c trunk/reactos/dll/win32/msxml3/element.c trunk/reactos/dll/win32/msxml3/entityref.c trunk/reactos/dll/win32/msxml3/factory.c trunk/reactos/dll/win32/msxml3/httprequest.c trunk/reactos/dll/win32/msxml3/msxml_private.h trunk/reactos/dll/win32/msxml3/node.c trunk/reactos/dll/win32/msxml3/nodelist.c trunk/reactos/dll/win32/msxml3/nodemap.c trunk/reactos/dll/win32/msxml3/parseerror.c trunk/reactos/dll/win32/msxml3/pi.c trunk/reactos/dll/win32/msxml3/queryresult.c trunk/reactos/dll/win32/msxml3/regsvr.c trunk/reactos/dll/win32/msxml3/saxreader.c trunk/reactos/dll/win32/msxml3/schema.c trunk/reactos/dll/win32/msxml3/text.c trunk/reactos/dll/win32/msxml3/xmldoc.c trunk/reactos/dll/win32/msxml3/xmlelem.c trunk/reactos/include/psdk/msxml2.idl Modified: trunk/reactos/dll/win32/msxml3/attribute.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/attribute…
============================================================================== --- trunk/reactos/dll/win32/msxml3/attribute.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/attribute.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -94,7 +94,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -546,7 +546,7 @@ { domattr *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/bsc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/bsc.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msxml3/bsc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/bsc.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -93,11 +93,9 @@ TRACE("(%p) ref=%d\n", This, ref); if(!ref) { - if(This->binding) - IBinding_Release(This->binding); - if(This->memstream) - IStream_Release(This->memstream); - HeapFree(GetProcessHeap(), 0, This); + if (This->binding) IBinding_Release(This->binding); + if (This->memstream) IStream_Release(This->memstream); + heap_free(This); } return ref; @@ -270,7 +268,7 @@ if(FAILED(hr)) return hr; - bsc = HeapAlloc(GetProcessHeap(), 0, sizeof(bsc_t)); + bsc = heap_alloc(sizeof(bsc_t)); bsc->lpVtbl = &bsc_vtbl; bsc->ref = 1; Modified: trunk/reactos/dll/win32/msxml3/cdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/cdata.c?r…
============================================================================== --- trunk/reactos/dll/win32/msxml3/cdata.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/cdata.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -101,7 +101,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -606,7 +606,7 @@ } else hr = E_FAIL; - HeapFree(GetProcessHeap(), 0, pContent); + heap_free(pContent); return hr; } @@ -667,7 +667,7 @@ xmlNodeSetContent(This->node.node, str); hr = S_OK; } - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); SysFreeString(sNewString); } @@ -684,8 +684,47 @@ IXMLDOMCDATASection *iface, LONG offset, LONG count) { - FIXME("\n"); - return E_NOTIMPL; + HRESULT hr; + LONG len = -1; + BSTR str; + + TRACE("%p %d %d\n", iface, offset, count); + + hr = IXMLDOMCDATASection_get_length(iface, &len); + if(hr != S_OK) return hr; + + if((offset < 0) || (offset > len) || (count < 0)) + return E_INVALIDARG; + + if(len == 0) return S_OK; + + /* cutting start or end */ + if((offset == 0) || ((count + offset) >= len)) + { + if(offset == 0) + IXMLDOMCDATASection_substringData(iface, count, len - count, &str); + else + IXMLDOMCDATASection_substringData(iface, 0, offset, &str); + hr = IXMLDOMCDATASection_put_data(iface, str); + } + else + /* cutting from the inside */ + { + BSTR str_end; + + IXMLDOMCDATASection_substringData(iface, 0, offset, &str); + IXMLDOMCDATASection_substringData(iface, offset + count, len - count, &str_end); + + hr = IXMLDOMCDATASection_put_data(iface, str); + if(hr == S_OK) + hr = IXMLDOMCDATASection_appendData(iface, str_end); + + SysFreeString(str_end); + } + + SysFreeString(str); + + return hr; } static HRESULT WINAPI domcdata_replaceData( @@ -765,7 +804,7 @@ { domcdata *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/comment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/comment.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/comment.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/comment.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -95,7 +95,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -541,7 +541,7 @@ LONG nLength = 0; HRESULT hr = S_FALSE; - TRACE("%p\n", iface); + TRACE("%p %d %d %p\n", iface, offset, count, p); if(!p) return E_INVALIDARG; @@ -551,7 +551,7 @@ return E_INVALIDARG; if(count == 0) - return hr; + return S_FALSE; pContent = xmlNodeGetContent(This->node.node); if(pContent) @@ -630,7 +630,7 @@ LONG nLength = 0, nLengthP = 0; xmlChar *str = NULL; - TRACE("%p\n", This); + TRACE("%p %d %p\n", iface, offset, p); /* If have a NULL or empty string, don't do anything. */ if(SysStringLen(p) == 0) @@ -692,8 +692,47 @@ IXMLDOMComment *iface, LONG offset, LONG count) { - FIXME("\n"); - return E_NOTIMPL; + HRESULT hr; + LONG len = -1; + BSTR str; + + TRACE("%p %d %d\n", iface, offset, count); + + hr = IXMLDOMComment_get_length(iface, &len); + if(hr != S_OK) return hr; + + if((offset < 0) || (offset > len) || (count < 0)) + return E_INVALIDARG; + + if(len == 0) return S_OK; + + /* cutting start or end */ + if((offset == 0) || ((count + offset) >= len)) + { + if(offset == 0) + IXMLDOMComment_substringData(iface, count, len - count, &str); + else + IXMLDOMComment_substringData(iface, 0, offset, &str); + hr = IXMLDOMComment_put_data(iface, str); + } + else + /* cutting from the inside */ + { + BSTR str_end; + + IXMLDOMComment_substringData(iface, 0, offset, &str); + IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end); + + hr = IXMLDOMComment_put_data(iface, str); + if(hr == S_OK) + hr = IXMLDOMComment_appendData(iface, str_end); + + SysFreeString(str_end); + } + + SysFreeString(str); + + return hr; } static HRESULT WINAPI domcomment_replaceData( @@ -763,7 +802,7 @@ { domcomment *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/docfrag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/docfrag.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/docfrag.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/docfrag.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -94,7 +94,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -519,7 +519,7 @@ { domfrag *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/domdoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
============================================================================== --- trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -119,7 +119,7 @@ static xmldoc_priv * create_priv(void) { xmldoc_priv *priv; - priv = HeapAlloc( GetProcessHeap(), 0, sizeof (*priv) ); + priv = heap_alloc( sizeof (*priv) ); if(priv) { @@ -164,9 +164,9 @@ LIST_FOR_EACH_ENTRY_SAFE( orphan, orphan2, &priv->orphans, orphan_entry, entry ) { xmlFreeNode( orphan->node ); - HeapFree( GetProcessHeap(), 0, orphan ); + heap_free( orphan ); } - HeapFree(GetProcessHeap(), 0, doc->_private); + heap_free(doc->_private); xmlFreeDoc(doc); } @@ -179,7 +179,7 @@ xmldoc_priv *priv = priv_from_xmlDocPtr(doc); orphan_entry *entry; - entry = HeapAlloc( GetProcessHeap(), 0, sizeof (*entry) ); + entry = heap_alloc( sizeof (*entry) ); if(!entry) return E_OUTOFMEMORY; @@ -198,7 +198,7 @@ if( entry->node == node ) { list_remove( &entry->entry ); - HeapFree( GetProcessHeap(), 0, entry ); + heap_free( entry ); return S_OK; } } @@ -1041,7 +1041,7 @@ TRACE("created xmlptr %p\n", xmlnode); elem_unk = create_element(xmlnode); - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); hr = IUnknown_QueryInterface(elem_unk, &IID_IXMLDOMElement, (void **)element); IUnknown_Release(elem_unk); @@ -1094,7 +1094,7 @@ xml_content = xmlChar_from_wchar(data); xmlnode = xmlNewText(xml_content); - HeapFree(GetProcessHeap(), 0, xml_content); + heap_free(xml_content); if(!xmlnode) return E_FAIL; @@ -1126,7 +1126,7 @@ xml_content = xmlChar_from_wchar(data); xmlnode = xmlNewComment(xml_content); - HeapFree(GetProcessHeap(), 0, xml_content); + heap_free(xml_content); if(!xmlnode) return E_FAIL; @@ -1158,7 +1158,7 @@ xml_content = xmlChar_from_wchar(data); xmlnode = xmlNewCDataBlock(get_doc( This ), xml_content, strlen( (char*)xml_content) ); - HeapFree(GetProcessHeap(), 0, xml_content); + heap_free(xml_content); if(!xmlnode) return E_FAIL; @@ -1199,8 +1199,8 @@ TRACE("created xmlptr %p\n", xmlnode); *pi = (IXMLDOMProcessingInstruction*)create_pi(xmlnode); - HeapFree(GetProcessHeap(), 0, xml_content); - HeapFree(GetProcessHeap(), 0, xml_target); + heap_free(xml_content); + heap_free(xml_target); return S_OK; #else @@ -1228,7 +1228,7 @@ xml_name = xmlChar_from_wchar(name); xmlnode = (xmlNode *)xmlNewProp(NULL, xml_name, NULL); - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); if(!xmlnode) return E_FAIL; @@ -1260,7 +1260,7 @@ xml_name = xmlChar_from_wchar(name); xmlnode = xmlNewReference(get_doc( This ), xml_name ); - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); if(!xmlnode) return E_FAIL; @@ -1279,17 +1279,28 @@ BSTR tagName, IXMLDOMNodeList** resultList ) { + static const WCHAR xpathformat[] = + { '/','/','*','[','l','o','c','a','l','-','n','a','m','e','(',')','=','\'','%','s','\'',']',0 }; domdoc *This = impl_from_IXMLDOMDocument2( iface ); LPWSTR szPattern; HRESULT hr; TRACE("(%p)->(%s, %p)\n", This, debugstr_w(tagName), resultList); - szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(2+lstrlenW(tagName)+1)); - szPattern[0] = szPattern[1] = '/'; - lstrcpyW(szPattern + 2, tagName); + if (tagName[0] == '*' && tagName[1] == 0) + { + szPattern = heap_alloc(sizeof(WCHAR)*4); + szPattern[0] = szPattern[1] = '/'; + szPattern[2] = '*'; + szPattern[3] = 0; + } + else + { + szPattern = heap_alloc(sizeof(WCHAR)*(20+lstrlenW(tagName)+1)); + wsprintfW(szPattern, xpathformat, tagName); + } hr = queryresult_create((xmlNodePtr)get_doc(This), szPattern, resultList); - HeapFree(GetProcessHeap(), 0, szPattern); + heap_free(szPattern); return hr; } @@ -1359,7 +1370,7 @@ break; } - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); if(xmlnode && *node) { @@ -1588,7 +1599,7 @@ LPSTR str; len = WideCharToMultiByte( CP_UTF8, 0, bstr, blen, NULL, 0, NULL, NULL ); - str = HeapAlloc( GetProcessHeap(), 0, len ); + str = heap_alloc( len ); if ( !str ) return FALSE; WideCharToMultiByte( CP_UTF8, 0, bstr, blen, str, len, NULL, NULL ); @@ -1619,7 +1630,7 @@ if ( bstrXML && bstr_to_utf8( bstrXML, &str, &len ) ) { xmldoc = doparse( str, len ); - HeapFree( GetProcessHeap(), 0, str ); + heap_free( str ); if ( !xmldoc ) This->error = E_FAIL; else @@ -2193,7 +2204,7 @@ { domdoc *doc; - doc = HeapAlloc( GetProcessHeap(), 0, sizeof (*doc) ); + doc = heap_alloc( sizeof (*doc) ); if( !doc ) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/msxml3/domimpl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domimpl.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/domimpl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/domimpl.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -89,7 +89,7 @@ ref = InterlockedDecrement( &This->ref ); if ( ref == 0 ) { - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -216,7 +216,7 @@ { domimpl *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/element.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -502,7 +502,7 @@ len = MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->name, -1, NULL, 0 ); if (element->ns) len += MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->ns->prefix, -1, NULL, 0 ); - str = HeapAlloc( GetProcessHeap(), 0, len * sizeof (WCHAR) ); + str = heap_alloc( len * sizeof (WCHAR) ); if ( !str ) return E_OUTOFMEMORY; if (element->ns) @@ -512,7 +512,7 @@ } MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->name, -1, str + offset, len - offset ); *p = SysAllocString( str ); - HeapFree( GetProcessHeap(), 0, str ); + heap_free( str ); return S_OK; } @@ -545,7 +545,7 @@ else xml_value = xmlGetNsProp(element, xml_name, NULL); - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); if(xml_value) { V_VT(value) = VT_BSTR; @@ -587,8 +587,8 @@ if(!xmlSetNsProp(element, NULL, xml_name, xml_value)) hr = E_FAIL; - HeapFree(GetProcessHeap(), 0, xml_value); - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_value); + heap_free(xml_name); VariantClear(&var); return hr; @@ -598,8 +598,19 @@ IXMLDOMElement *iface, BSTR p) { - FIXME("\n"); - return E_NOTIMPL; + domelem *This = impl_from_IXMLDOMElement( iface ); + IXMLDOMNamedNodeMap *attr; + HRESULT hr; + + TRACE("(%p)->(%s)", This, debugstr_w(p)); + + hr = IXMLDOMElement_get_attributes(iface, &attr); + if (hr != S_OK) return hr; + + hr = IXMLDOMNamedNodeMap_removeNamedItem(attr, p, NULL); + IXMLDOMNamedNodeMap_Release(attr); + + return hr; } static HRESULT WINAPI domelem_getAttributeNode( @@ -628,7 +639,7 @@ if(!xmlValidateNameValue(xml_name)) { - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); return E_FAIL; } @@ -639,7 +650,7 @@ IUnknown_Release(unk); } - HeapFree(GetProcessHeap(), 0, xml_name); + heap_free(xml_name); return hr; } @@ -666,6 +677,8 @@ IXMLDOMElement *iface, BSTR bstrName, IXMLDOMNodeList** resultList) { + static const WCHAR xpathformat[] = + { '.','/','/','*','[','l','o','c','a','l','-','n','a','m','e','(',')','=','\'','%','s','\'',']',0 }; domelem *This = impl_from_IXMLDOMElement( iface ); LPWSTR szPattern; xmlNodePtr element; @@ -673,10 +686,19 @@ TRACE("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), resultList); - szPattern = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(3+lstrlenW(bstrName)+1)); - szPattern[0] = '.'; - szPattern[1] = szPattern[2] = '/'; - lstrcpyW(szPattern+3, bstrName); + if (bstrName[0] == '*' && bstrName[1] == 0) + { + szPattern = heap_alloc(sizeof(WCHAR)*5); + szPattern[0] = '.'; + szPattern[1] = szPattern[2] = '/'; + szPattern[3] = '*'; + szPattern[4] = 0; + } + else + { + szPattern = heap_alloc(sizeof(WCHAR)*(21+lstrlenW(bstrName)+1)); + wsprintfW(szPattern, xpathformat, bstrName); + } TRACE("%s\n", debugstr_w(szPattern)); element = get_element(This); @@ -684,7 +706,7 @@ hr = E_FAIL; else hr = queryresult_create(element, szPattern, resultList); - HeapFree(GetProcessHeap(), 0, szPattern); + heap_free(szPattern); return hr; } @@ -768,7 +790,7 @@ { domelem *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/entityref.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/entityref…
============================================================================== --- trunk/reactos/dll/win32/msxml3/entityref.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/entityref.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -94,7 +94,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -518,7 +518,7 @@ { entityref *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/factory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/factory.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/factory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/factory.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -147,7 +147,8 @@ if( IsEqualCLSID( rclsid, &CLSID_DOMDocument ) || /* Version indep. v 2.x */ IsEqualCLSID( rclsid, &CLSID_DOMDocument2 ) || /* Version indep. v 3.0 */ - IsEqualCLSID( rclsid, &CLSID_DOMDocument30 ) ) /* Version dep. v 3.0 */ + IsEqualCLSID( rclsid, &CLSID_DOMDocument30 )|| /* Version dep. v 3.0 */ + IsEqualCLSID( rclsid, &CLSID_DOMDocument40 )) /* Version dep. v 4.0 */ { cf = (IClassFactory*) &domdoccf.lpVtbl; } Modified: trunk/reactos/dll/win32/msxml3/httprequest.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/httpreque…
============================================================================== --- trunk/reactos/dll/win32/msxml3/httprequest.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/httprequest.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -83,7 +83,7 @@ ref = InterlockedDecrement( &This->ref ); if ( ref == 0 ) { - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -317,7 +317,7 @@ TRACE("(%p,%p)\n", pUnkOuter, ppObj); - req = HeapAlloc( GetProcessHeap(), 0, sizeof (*req) ); + req = heap_alloc( sizeof (*req) ); if( !req ) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/msxml3/msxml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml_pri…
============================================================================== --- trunk/reactos/dll/win32/msxml3/msxml_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/msxml_private.h [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -135,7 +135,7 @@ extern HRESULT xmldoc_add_orphan( xmlDocPtr doc, xmlNodePtr node ); extern HRESULT xmldoc_remove_orphan( xmlDocPtr doc, xmlNodePtr node ); -extern HRESULT XMLElement_create( IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj ); +extern HRESULT XMLElement_create( IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj, BOOL own ); extern xmlDocPtr parse_xml(char *ptr, int len); Modified: trunk/reactos/dll/win32/msxml3/node.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
============================================================================== --- trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -130,7 +130,7 @@ ref = InterlockedDecrement( &This->ref ); if(!ref) { destroy_xmlnode(This); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -354,7 +354,7 @@ { str = xmlChar_from_wchar(V_BSTR(&string_value)); xmlNodeSetContent(This->node, str); - HeapFree(GetProcessHeap(),0,str); + heap_free(str); hr = S_OK; break; } @@ -920,7 +920,7 @@ /* Escape the string. */ str2 = xmlEncodeEntitiesReentrant(This->node->doc, str); - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); xmlNodeSetContent(This->node, str2); xmlFree(str2); @@ -1284,7 +1284,7 @@ else ERR("Failed to Create Namepsace\n"); } - HeapFree( GetProcessHeap(), 0, str ); + heap_free( str ); } return hr; Modified: trunk/reactos/dll/win32/msxml3/nodelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/nodelist.…
============================================================================== --- trunk/reactos/dll/win32/msxml3/nodelist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/nodelist.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -104,7 +104,7 @@ if ( ref == 0 ) { xmldoc_release( This->parent->doc ); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -314,7 +314,7 @@ { xmlnodelist *nodelist; - nodelist = HeapAlloc( GetProcessHeap(), 0, sizeof *nodelist ); + nodelist = heap_alloc( sizeof *nodelist ); if ( !nodelist ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/nodemap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/nodemap.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/nodemap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/nodemap.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -102,7 +102,7 @@ if ( ref == 0 ) { IXMLDOMNode_Release( This->node ); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -191,7 +191,7 @@ xmlChar *xmlstr; len = WideCharToMultiByte( CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL ); - xmlstr = HeapAlloc( GetProcessHeap(), 0, len ); + xmlstr = heap_alloc( len ); if ( xmlstr ) WideCharToMultiByte( CP_UTF8, 0, str, -1, (LPSTR) xmlstr, len, NULL, NULL ); return xmlstr; @@ -218,7 +218,7 @@ element_name = xmlChar_from_wchar( name ); attr = xmlHasNsProp( node, element_name, NULL ); - HeapFree( GetProcessHeap(), 0, element_name ); + heap_free( element_name ); if ( !attr ) { @@ -303,7 +303,7 @@ element_name = xmlChar_from_wchar( name ); attr = xmlHasNsProp( node, element_name, NULL ); - HeapFree( GetProcessHeap(), 0, element_name ); + heap_free( element_name ); if ( !attr ) { @@ -531,7 +531,7 @@ { xmlnodemap *nodemap; - nodemap = HeapAlloc( GetProcessHeap(), 0, sizeof *nodemap ); + nodemap = heap_alloc( sizeof *nodemap ); if ( !nodemap ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/parseerror.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/parseerro…
============================================================================== --- trunk/reactos/dll/win32/msxml3/parseerror.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/parseerror.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -97,7 +97,7 @@ SysFreeString(This->url); SysFreeString(This->reason); SysFreeString(This->srcText); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -283,7 +283,7 @@ { parse_error_t *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof(*This) ); + This = heap_alloc( sizeof(*This) ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/pi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/pi.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/msxml3/pi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/pi.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -94,7 +94,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -604,7 +604,7 @@ { dom_pi *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/queryresult.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/queryresu…
============================================================================== --- trunk/reactos/dll/win32/msxml3/queryresult.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/queryresult.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -413,7 +413,7 @@ IXMLDOMNodeList_Release( (IXMLDOMNodeList*) &This->lpVtbl ); if (ctxt != NULL) xmlXPathFreeContext(ctxt); - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); return hr; } Modified: trunk/reactos/dll/win32/msxml3/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/regsvr.c?…
============================================================================== --- trunk/reactos/dll/win32/msxml3/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/regsvr.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -47,7 +47,7 @@ #include "wine/debug.h" #include "wine/unicode.h" -WINE_DEFAULT_DEBUG_CHANNEL(ole); +WINE_DEFAULT_DEBUG_CHANNEL(msxml); /* * Near the bottom of this file are the exported DllRegisterServer and @@ -702,7 +702,7 @@ }; /*********************************************************************** - * DllRegisterServer (OLEAUT32.@) + * DllRegisterServer (MSXML3.@) */ HRESULT WINAPI DllRegisterServer(void) { @@ -729,7 +729,7 @@ } /*********************************************************************** - * DllUnregisterServer (OLEAUT32.@) + * DllUnregisterServer (MSXML3.@) */ HRESULT WINAPI DllUnregisterServer(void) { Modified: trunk/reactos/dll/win32/msxml3/saxreader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/saxreader…
============================================================================== --- trunk/reactos/dll/win32/msxml3/saxreader.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/saxreader.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -126,6 +126,11 @@ return (saxattributes *)((char*)iface - FIELD_OFFSET(saxattributes, lpSAXAttributesVtbl)); } +static inline BOOL has_content_handler(const saxlocator *locator) +{ + return (locator->vbInterface && locator->saxreader->vbcontentHandler) || + (!locator->vbInterface && locator->saxreader->contentHandler); +} static HRESULT namespacePush(saxlocator *locator, int ns) { @@ -161,13 +166,13 @@ dLen = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); if(len != -1) dLen++; - str = HeapAlloc(GetProcessHeap(), 0, dLen * sizeof (WCHAR)); + str = heap_alloc(dLen * sizeof (WCHAR)); if (!str) return NULL; MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, dLen); if(len != -1) str[dLen-1] = '\0'; bstr = SysAllocString(str); - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); return bstr; } @@ -185,7 +190,7 @@ dLen = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)prefix, -1, NULL, 0) + MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)name, -1, NULL, 0); - str = HeapAlloc(GetProcessHeap(), 0, dLen * sizeof(WCHAR)); + str = heap_alloc(dLen * sizeof(WCHAR)); if(!str) return NULL; @@ -194,7 +199,7 @@ MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)name, -1, &str[dLast], dLen-dLast); bstr = SysAllocString(str); - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); return bstr; } @@ -624,12 +629,12 @@ SysFreeString(This->szQName[index]); } - HeapFree(GetProcessHeap(), 0, This->szLocalname); - HeapFree(GetProcessHeap(), 0, This->szURI); - HeapFree(GetProcessHeap(), 0, This->szValue); - HeapFree(GetProcessHeap(), 0, This->szQName); - - HeapFree(GetProcessHeap(), 0, This); + heap_free(This->szLocalname); + heap_free(This->szURI); + heap_free(This->szValue); + heap_free(This->szQName); + + heap_free(This); } return ref; @@ -914,7 +919,7 @@ int index; static const xmlChar xmlns[] = "xmlns"; - attributes = HeapAlloc(GetProcessHeap(), 0, sizeof(*attributes)); + attributes = heap_alloc(sizeof(*attributes)); if(!attributes) return E_OUTOFMEMORY; @@ -924,23 +929,19 @@ attributes->nb_attributes = nb_namespaces+nb_attributes; - attributes->szLocalname = - HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*attributes->nb_attributes); - attributes->szURI = - HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*attributes->nb_attributes); - attributes->szValue = - HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*attributes->nb_attributes); - attributes->szQName = - HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*attributes->nb_attributes); + attributes->szLocalname = heap_alloc(sizeof(BSTR)*attributes->nb_attributes); + attributes->szURI = heap_alloc(sizeof(BSTR)*attributes->nb_attributes); + attributes->szValue = heap_alloc(sizeof(BSTR)*attributes->nb_attributes); + attributes->szQName = heap_alloc(sizeof(BSTR)*attributes->nb_attributes); if(!attributes->szLocalname || !attributes->szURI || !attributes->szValue || !attributes->szQName) { - HeapFree(GetProcessHeap(), 0, attributes->szLocalname); - HeapFree(GetProcessHeap(), 0, attributes->szURI); - HeapFree(GetProcessHeap(), 0, attributes->szValue); - HeapFree(GetProcessHeap(), 0, attributes->szQName); - HeapFree(GetProcessHeap(), 0, attributes); + heap_free(attributes->szLocalname); + heap_free(attributes->szURI); + heap_free(attributes->szValue); + heap_free(attributes->szQName); + heap_free(attributes); return E_FAIL; } @@ -978,8 +979,7 @@ saxlocator *This = ctx; HRESULT hr; - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { if(This->vbInterface) hr = IVBSAXContentHandler_startDocument(This->saxreader->vbcontentHandler); @@ -1003,8 +1003,7 @@ if(This->ret != S_OK) return; - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { if(This->vbInterface) hr = IVBSAXContentHandler_endDocument(This->saxreader->vbcontentHandler); @@ -1039,8 +1038,7 @@ update_position(This, (xmlChar*)This->pParserCtxt->input->cur+1); hr = namespacePush(This, nb_namespaces); - if(hr==S_OK && ((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler))) + if(hr==S_OK && has_content_handler(This)) { for(index=0; index<nb_namespaces; index++) { @@ -1119,8 +1117,7 @@ nsNr = namespacePop(This); - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { NamespaceUri = bstr_from_xmlChar(URI); LocalName = bstr_from_xmlChar(localname); @@ -1186,9 +1183,7 @@ xmlChar *end; BOOL lastEvent = FALSE; - if((This->vbInterface && !This->saxreader->vbcontentHandler) - || (!This->vbInterface && !This->saxreader->contentHandler)) - return; + if(!(has_content_handler(This))) return; cur = (xmlChar*)ch; if(*(ch-1)=='\r') cur--; @@ -1320,7 +1315,7 @@ va_end(args); len = MultiByteToWideChar(CP_UNIXCP, 0, message, -1, NULL, 0); - wszError = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len); + wszError = heap_alloc(sizeof(WCHAR)*len); if(wszError) MultiByteToWideChar(CP_UNIXCP, 0, message, -1, wszError, len); @@ -1334,7 +1329,7 @@ ISAXErrorHandler_fatalError(This->saxreader->errorHandler, (ISAXLocator*)&This->lpSAXLocatorVtbl, wszError, E_FAIL); - HeapFree(GetProcessHeap(), 0, wszError); + heap_free(wszError); xmlStopParser(This->pParserCtxt); This->ret = E_FAIL; @@ -1384,8 +1379,7 @@ if(change) *end = '\n'; - if((This->vbInterface && This->saxreader->vbcontentHandler) || - (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { Chars = bstr_from_xmlCharN(cur, end-cur+1); if(This->vbInterface) @@ -1645,10 +1639,10 @@ { SysFreeString(This->publicId); SysFreeString(This->systemId); - HeapFree(GetProcessHeap(), 0, This->nsStack); + heap_free(This->nsStack); ISAXXMLReader_Release((ISAXXMLReader*)&This->saxreader->lpSAXXMLReaderVtbl); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -1734,7 +1728,7 @@ { saxlocator *locator; - locator = HeapAlloc( GetProcessHeap(), 0, sizeof (*locator) ); + locator = heap_alloc( sizeof (*locator) ); if( !locator ) return E_OUTOFMEMORY; @@ -1755,11 +1749,11 @@ locator->ret = S_OK; locator->nsStackSize = 8; locator->nsStackLast = 0; - locator->nsStack = HeapAlloc(GetProcessHeap(), 0, locator->nsStackSize); + locator->nsStack = heap_alloc(locator->nsStackSize); if(!locator->nsStack) { ISAXXMLReader_Release((ISAXXMLReader*)&reader->lpSAXXMLReaderVtbl); - HeapFree(GetProcessHeap(), 0, locator); + heap_free(locator); return E_OUTOFMEMORY; } @@ -1787,6 +1781,7 @@ return E_FAIL; } + xmlFree(locator->pParserCtxt->sax); locator->pParserCtxt->sax = &locator->saxreader->sax; locator->pParserCtxt->userData = locator; @@ -1852,7 +1847,6 @@ } This->isParsing = FALSE; - locator->pParserCtxt->sax = NULL; xmlFreeParserCtxt(locator->pParserCtxt); locator->pParserCtxt = NULL; ISAXLocator_Release((ISAXLocator*)&locator->lpSAXLocatorVtbl); @@ -2045,6 +2039,7 @@ hr = internal_parseBuffer(This, (const char*)bstrData, SysStringByteLen(bstrData), vbInterface); IXMLDOMDocument_Release(xmlDoc); + SysFreeString(bstrData); break; } if(IUnknown_QueryInterface(V_UNKNOWN(&varInput), @@ -2315,7 +2310,7 @@ if(This->vbdeclHandler) IVBSAXDeclHandler_Release(This->vbdeclHandler); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -2810,7 +2805,7 @@ TRACE("(%p,%p)\n", pUnkOuter, ppObj); - reader = HeapAlloc( GetProcessHeap(), 0, sizeof (*reader) ); + reader = heap_alloc( sizeof (*reader) ); if( !reader ) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/msxml3/schema.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/schema.c?…
============================================================================== --- trunk/reactos/dll/win32/msxml3/schema.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/schema.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -86,7 +86,7 @@ if ( ref == 0 ) { - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -233,7 +233,7 @@ HRESULT SchemaCache_create(IUnknown *pUnkOuter, LPVOID *ppObj) { - schema_t *schema = HeapAlloc( GetProcessHeap(), 0, sizeof (*schema) ); + schema_t *schema = heap_alloc( sizeof (*schema) ); if( !schema ) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/msxml3/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/text.c?re…
============================================================================== --- trunk/reactos/dll/win32/msxml3/text.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/text.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -103,7 +103,7 @@ if ( ref == 0 ) { destroy_xmlnode(&This->node); - HeapFree( GetProcessHeap(), 0, This ); + heap_free( This ); } return ref; @@ -605,7 +605,7 @@ hr = S_OK; else hr = E_FAIL; - HeapFree( GetProcessHeap(), 0, pContent ); + heap_free( pContent ); } else hr = E_FAIL; @@ -669,7 +669,7 @@ xmlNodeSetContent(This->node.node, str); hr = S_OK; } - HeapFree(GetProcessHeap(), 0, str); + heap_free(str); SysFreeString(sNewString); } @@ -686,8 +686,47 @@ IXMLDOMText *iface, LONG offset, LONG count) { - FIXME("\n"); - return E_NOTIMPL; + HRESULT hr; + LONG len = -1; + BSTR str; + + TRACE("%p %d %d\n", iface, offset, count); + + hr = IXMLDOMText_get_length(iface, &len); + if(hr != S_OK) return hr; + + if((offset < 0) || (offset > len) || (count < 0)) + return E_INVALIDARG; + + if(len == 0) return S_OK; + + /* cutting start or end */ + if((offset == 0) || ((count + offset) >= len)) + { + if(offset == 0) + IXMLDOMText_substringData(iface, count, len - count, &str); + else + IXMLDOMText_substringData(iface, 0, offset, &str); + hr = IXMLDOMText_put_data(iface, str); + } + else + /* cutting from the inside */ + { + BSTR str_end; + + IXMLDOMText_substringData(iface, 0, offset, &str); + IXMLDOMText_substringData(iface, offset + count, len - count, &str_end); + + hr = IXMLDOMText_put_data(iface, str); + if(hr == S_OK) + hr = IXMLDOMText_appendData(iface, str_end); + + SysFreeString(str_end); + } + + SysFreeString(str); + + return hr; } static HRESULT WINAPI domtext_replaceData( @@ -767,7 +806,7 @@ { domtext *This; - This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); + This = heap_alloc( sizeof *This ); if ( !This ) return NULL; Modified: trunk/reactos/dll/win32/msxml3/xmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmldoc.c?…
============================================================================== --- trunk/reactos/dll/win32/msxml3/xmldoc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/xmldoc.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -54,7 +54,6 @@ HRESULT error; /* IXMLDocument */ - IXMLElement *root; xmlDocPtr xmldoc; /* IPersistStream */ @@ -118,7 +117,7 @@ { xmlFreeDoc(This->xmldoc); if (This->stream) IStream_Release(This->stream); - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); } return ref; @@ -198,17 +197,19 @@ static HRESULT WINAPI xmldoc_get_root(IXMLDocument *iface, IXMLElement **p) { xmldoc *This = impl_from_IXMLDocument(iface); + xmlNodePtr root; TRACE("(%p, %p)\n", iface, p); if (!p) return E_INVALIDARG; - *p = This->root; - if (!*p) + *p = NULL; + + if (!(root = xmlDocGetRootElement(This->xmldoc))) return E_FAIL; - return S_OK; + return XMLElement_create((IUnknown *)This, root, (LPVOID *)p, FALSE); } static HRESULT WINAPI xmldoc_get_fileSize(IXMLDocument *iface, BSTR *p) @@ -439,14 +440,32 @@ static HRESULT WINAPI xmldoc_get_version(IXMLDocument *iface, BSTR *p) { - FIXME("(%p, %p): stub\n", iface, p); - return E_NOTIMPL; + xmldoc *This = impl_from_IXMLDocument(iface); + + TRACE("(%p, %p)\n", This, p); + + if (!p) return E_INVALIDARG; + *p = bstr_from_xmlChar(This->xmldoc->version); + + return S_OK; } static HRESULT WINAPI xmldoc_get_doctype(IXMLDocument *iface, BSTR *p) { - FIXME("(%p, %p): stub\n", iface, p); - return E_NOTIMPL; + xmldoc *This = impl_from_IXMLDocument(iface); + xmlDtd *dtd; + + TRACE("(%p, %p)\n", This, p); + + if (!p) return E_INVALIDARG; + + dtd = xmlGetIntSubset(This->xmldoc); + if (!dtd) return S_FALSE; + + *p = bstr_from_xmlChar(dtd->name); + CharUpperBuffW(*p, SysStringLen(*p)); + + return S_OK; } static HRESULT WINAPI xmldoc_get_dtdURl(IXMLDocument *iface, BSTR *p) @@ -501,7 +520,7 @@ node->type = type_msxml_to_libxml(V_I4(&vType)); /* FIXME: create xmlNodePtr based on vType and var1 */ - return XMLElement_create((IUnknown *)iface, node, (LPVOID *)ppElem); + return XMLElement_create((IUnknown *)iface, node, (LPVOID *)ppElem, TRUE); } static const struct IXMLDocumentVtbl xmldoc_vtbl = @@ -556,8 +575,13 @@ static HRESULT WINAPI xmldoc_IPersistStreamInit_GetClassID( IPersistStreamInit *iface, CLSID *classid) { - FIXME("(%p,%p): stub!\n", iface, classid); - return E_NOTIMPL; + xmldoc *this = impl_from_IPersistStreamInit(iface); + TRACE("(%p,%p)\n", this, classid); + + if (!classid) return E_POINTER; + + *classid = CLSID_XMLDocument; + return S_OK; } static HRESULT WINAPI xmldoc_IPersistStreamInit_IsDirty( @@ -581,7 +605,6 @@ IPersistStreamInit *iface, LPSTREAM pStm) { xmldoc *This = impl_from_IPersistStreamInit(iface); - xmlNodePtr xmlnode; HRESULT hr; HGLOBAL hglobal; DWORD read, written, len; @@ -593,6 +616,8 @@ if (!pStm) return E_INVALIDARG; + /* release previously allocated stream */ + if (This->stream) IStream_Release(This->stream); hr = CreateStreamOnHGlobal(NULL, TRUE, &This->stream); if (FAILED(hr)) return hr; @@ -616,7 +641,10 @@ len = GlobalSize(hglobal); ptr = GlobalLock(hglobal); if (len != 0) + { + xmlFreeDoc(This->xmldoc); This->xmldoc = parse_xml(ptr, len); + } GlobalUnlock(hglobal); if (!This->xmldoc) @@ -625,8 +653,7 @@ return E_FAIL; } - xmlnode = xmlDocGetRootElement(This->xmldoc); - return XMLElement_create((IUnknown *)This, xmlnode, (LPVOID *)&This->root); + return S_OK; } static HRESULT WINAPI xmldoc_IPersistStreamInit_Save( @@ -639,15 +666,17 @@ static HRESULT WINAPI xmldoc_IPersistStreamInit_GetSizeMax( IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize) { - FIXME("(%p, %p): stub!\n", iface, pcbSize); + xmldoc *This = impl_from_IPersistStreamInit(iface); + TRACE("(%p, %p)\n", This, pcbSize); return E_NOTIMPL; } static HRESULT WINAPI xmldoc_IPersistStreamInit_InitNew( IPersistStreamInit *iface) { - FIXME("(%p): stub!\n", iface); - return E_NOTIMPL; + xmldoc *This = impl_from_IPersistStreamInit(iface); + TRACE("(%p)\n", This); + return S_OK; } static const IPersistStreamInitVtbl xmldoc_IPersistStreamInit_VTable = @@ -669,7 +698,7 @@ TRACE("(%p,%p)\n", pUnkOuter, ppObj); - doc = HeapAlloc(GetProcessHeap(), 0, sizeof (*doc)); + doc = heap_alloc(sizeof (*doc)); if(!doc) return E_OUTOFMEMORY; @@ -677,7 +706,6 @@ doc->lpvtblIPersistStreamInit = &xmldoc_IPersistStreamInit_VTable; doc->ref = 1; doc->error = S_OK; - doc->root = NULL; doc->xmldoc = NULL; doc->stream = NULL; Modified: trunk/reactos/dll/win32/msxml3/xmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlelem.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/xmlelem.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/xmlelem.c [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -48,6 +48,7 @@ const IXMLElementVtbl *lpVtbl; LONG ref; xmlNodePtr node; + BOOL own; } xmlelem; static inline xmlelem *impl_from_IXMLElement(IXMLElement *iface) @@ -94,7 +95,8 @@ ref = InterlockedDecrement(&This->ref); if (ref == 0) { - HeapFree(GetProcessHeap(), 0, This); + if (This->own) xmlFreeNode(This->node); + heap_free(This); } return ref; @@ -171,31 +173,17 @@ return hr; } -static inline BSTR str_dup_upper(BSTR str) -{ - INT len = (lstrlenW(str) + 1) * sizeof(WCHAR); - BSTR p = SysAllocStringLen(NULL, len); - if (p) - { - memcpy(p, str, len); - CharUpperW(p); - } - return p; -} - static HRESULT WINAPI xmlelem_get_tagName(IXMLElement *iface, BSTR *p) { xmlelem *This = impl_from_IXMLElement(iface); - BSTR temp; TRACE("(%p, %p)\n", iface, p); if (!p) return E_INVALIDARG; - temp = bstr_from_xmlChar(This->node->name); - *p = str_dup_upper(temp); - SysFreeString(temp); + *p = bstr_from_xmlChar(This->node->name); + CharUpperBuffW(*p, SysStringLen(*p)); TRACE("returning %s\n", debugstr_w(*p)); @@ -226,7 +214,7 @@ if (!This->node->parent) return S_FALSE; - return XMLElement_create((IUnknown *)iface, This->node->parent, (LPVOID *)parent); + return XMLElement_create((IUnknown *)iface, This->node->parent, (LPVOID *)parent, FALSE); } static HRESULT WINAPI xmlelem_setAttribute(IXMLElement *iface, BSTR strPropertyName, @@ -245,8 +233,8 @@ value = xmlChar_from_wchar(V_BSTR(&PropertyValue)); attr = xmlSetProp(This->node, name, value); - HeapFree(GetProcessHeap(), 0, name); - HeapFree(GetProcessHeap(), 0, value); + heap_free(name); + heap_free(value); return (attr) ? S_OK : S_FALSE; } @@ -287,7 +275,7 @@ V_BSTR(PropertyValue) = bstr_from_xmlChar(val); } - HeapFree(GetProcessHeap(), 0, name); + heap_free(name); xmlFree(val); TRACE("returning %s\n", debugstr_w(V_BSTR(PropertyValue))); return (val) ? S_OK : S_FALSE; @@ -317,7 +305,7 @@ hr = S_OK; done: - HeapFree(GetProcessHeap(), 0, name); + heap_free(name); return hr; } @@ -330,7 +318,7 @@ if (!p) return E_INVALIDARG; - return XMLElementCollection_create((IUnknown *)iface, This->node->children, (LPVOID *)p); + return XMLElementCollection_create((IUnknown *)iface, This->node, (LPVOID *)p); } static LONG type_libxml_to_msxml(xmlElementType type) @@ -402,7 +390,7 @@ content = xmlChar_from_wchar(p); xmlNodeSetContent(This->node, content); - HeapFree( GetProcessHeap(), 0, content); + heap_free(content); return S_OK; } @@ -421,13 +409,31 @@ else child = xmlAddNextSibling(This->node, childElem->node->last); + /* parent is responsible for child data */ + if (child) childElem->own = FALSE; + return (child) ? S_OK : S_FALSE; } static HRESULT WINAPI xmlelem_removeChild(IXMLElement *iface, IXMLElement *pChildElem) { - FIXME("(%p, %p): stub\n", iface, pChildElem); - return E_NOTIMPL; + xmlelem *This = impl_from_IXMLElement(iface); + xmlelem *childElem = impl_from_IXMLElement(pChildElem); + + TRACE("(%p, %p)\n", This, childElem); + + if (!pChildElem) + return E_INVALIDARG; + + /* only supported for This is childElem parent case */ + if (This->node != childElem->node->parent) + return E_INVALIDARG; + + xmlUnlinkNode(childElem->node); + /* standalone element now */ + childElem->own = TRUE; + + return S_OK; } static const struct IXMLElementVtbl xmlelem_vtbl = @@ -453,7 +459,7 @@ xmlelem_removeChild }; -HRESULT XMLElement_create(IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj) +HRESULT XMLElement_create(IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj, BOOL own) { xmlelem *elem; @@ -464,13 +470,14 @@ *ppObj = NULL; - elem = HeapAlloc(GetProcessHeap(), 0, sizeof (*elem)); + elem = heap_alloc(sizeof (*elem)); if(!elem) return E_OUTOFMEMORY; elem->lpVtbl = &xmlelem_vtbl; elem->ref = 1; elem->node = node; + elem->own = own; *ppObj = &elem->lpVtbl; @@ -493,6 +500,19 @@ xmlNodePtr current; } xmlelem_collection; +static inline LONG xmlelem_collection_updatelength(xmlelem_collection *collection) +{ + xmlNodePtr ptr = collection->node->children; + + collection->length = 0; + while (ptr) + { + collection->length++; + ptr = ptr->next; + } + return collection->length; +} + static inline xmlelem_collection *impl_from_IXMLElementCollection(IXMLElementCollection *iface) { return (xmlelem_collection *)((char*)iface - FIELD_OFFSET(xmlelem_collection, lpVtbl)); @@ -546,7 +566,7 @@ ref = InterlockedDecrement(&This->ref); if (ref == 0) { - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); } return ref; @@ -597,7 +617,7 @@ if (!p) return E_INVALIDARG; - *p = This->length; + *p = xmlelem_collection_updatelength(This); return S_OK; } @@ -619,7 +639,7 @@ VARIANT var2, IDispatch **ppDisp) { xmlelem_collection *This = impl_from_IXMLElementCollection(iface); - xmlNodePtr ptr = This->node; + xmlNodePtr ptr = This->node->children; int index, i; TRACE("(%p, %p)\n", iface, ppDisp); @@ -632,13 +652,15 @@ index = V_I4(&var1); if (index < 0) return E_INVALIDARG; + + xmlelem_collection_updatelength(This); if (index >= This->length) return E_FAIL; for (i = 0; i < index; i++) ptr = ptr->next; - return XMLElement_create((IUnknown *)iface, ptr, (LPVOID *)ppDisp); + return XMLElement_create((IUnknown *)iface, ptr, (LPVOID *)ppDisp, FALSE); } static const struct IXMLElementCollectionVtbl xmlelem_collection_vtbl = @@ -698,7 +720,7 @@ This->current = This->current->next; V_VT(rgVar) = VT_DISPATCH; - return XMLElement_create((IUnknown *)iface, ptr, (LPVOID *)&V_DISPATCH(rgVar)); + return XMLElement_create((IUnknown *)iface, ptr, (LPVOID *)&V_DISPATCH(rgVar), FALSE); } static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Skip( @@ -712,7 +734,7 @@ IEnumVARIANT *iface) { xmlelem_collection *This = impl_from_IEnumVARIANT(iface); - This->current = This->node; + This->current = This->node->children; return S_OK; } @@ -737,16 +759,15 @@ static HRESULT XMLElementCollection_create(IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj) { xmlelem_collection *collection; - xmlNodePtr ptr; TRACE("(%p,%p)\n", pUnkOuter, ppObj); *ppObj = NULL; - if (!node) + if (!node->children) return S_FALSE; - collection = HeapAlloc(GetProcessHeap(), 0, sizeof (*collection)); + collection = heap_alloc(sizeof (*collection)); if(!collection) return E_OUTOFMEMORY; @@ -755,14 +776,8 @@ collection->ref = 1; collection->length = 0; collection->node = node; - collection->current = node; - - ptr = node; - while (ptr) - { - collection->length++; - ptr = ptr->next; - } + collection->current = node->children; + xmlelem_collection_updatelength(collection); *ppObj = &collection->lpVtbl; Modified: trunk/reactos/include/psdk/msxml2.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msxml2.idl?re…
============================================================================== --- trunk/reactos/include/psdk/msxml2.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/msxml2.idl [iso-8859-1] Sat Feb 6 22:34:28 2010 @@ -1070,6 +1070,14 @@ [default, source] dispinterface XMLDOMDocumentEvents; } +[ + uuid(88d969c0-f192-11d4-a65f-0040963251e5) +] +coclass DOMDocument40 +{ + [default] interface IXMLDOMDocument2; + [default, source] dispinterface XMLDOMDocumentEvents; +} [ uuid(F6D90F12-9C73-11D3-B32E-00C04F990BB4)
14 years, 10 months
1
0
0
0
[cwittich] 45469: [MSI_WINETEST] sync msi_winetest to wine 1.1.38
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Feb 6 22:29:15 2010 New Revision: 45469 URL:
http://svn.reactos.org/svn/reactos?rev=45469&view=rev
Log: [MSI_WINETEST] sync msi_winetest to wine 1.1.38 Modified: trunk/rostests/winetests/msi/db.c trunk/rostests/winetests/msi/install.c trunk/rostests/winetests/msi/package.c trunk/rostests/winetests/msi/record.c Modified: trunk/rostests/winetests/msi/db.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/db.c?rev=45…
============================================================================== --- trunk/rostests/winetests/msi/db.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/db.c [iso-8859-1] Sat Feb 6 22:29:15 2010 @@ -1454,8 +1454,30 @@ MsiViewClose( view ); MsiCloseHandle( view ); + /* insert another one */ + create_file( "test1.txt" ); + + rec = MsiCreateRecord( 2 ); + MsiRecordSetString( rec, 1, "data1" ); + + r = MsiRecordSetStream( rec, 2, "test1.txt" ); + ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); + + DeleteFile("test1.txt"); + r = MsiDatabaseOpenView( hdb, - "SELECT `Name`, `Data` FROM `_Streams`", &view ); + "INSERT INTO `_Streams` ( `Name`, `Data` ) VALUES ( ?, ? )", &view ); + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + + r = MsiViewExecute( view, rec ); + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); + + MsiCloseHandle( rec ); + MsiViewClose( view ); + MsiCloseHandle( view ); + + r = MsiDatabaseOpenView( hdb, + "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data'", &view ); ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); r = MsiViewExecute( view, 0 ); @@ -1476,10 +1498,76 @@ ok( !lstrcmp(buf, "test.txt\n"), "Expected 'test.txt\\n', got %s\n", buf); MsiCloseHandle( rec ); + MsiViewClose( view ); + MsiCloseHandle( view ); + + r = MsiDatabaseOpenView( hdb, + "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data1'", &view ); + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + + r = MsiViewExecute( view, 0 ); + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); r = MsiViewFetch( view, &rec ); - ok( r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - + ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + size = MAX_PATH; + r = MsiRecordGetString( rec, 1, file, &size ); + ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); + ok( !lstrcmp(file, "data1"), "Expected 'data1', got %s\n", file); + + size = MAX_PATH; + memset(buf, 0, MAX_PATH); + r = MsiRecordReadStream( rec, 2, buf, &size ); + ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); + ok( !lstrcmp(buf, "test1.txt\n"), "Expected 'test1.txt\\n', got %s\n", buf); + + MsiCloseHandle( rec ); + MsiViewClose( view ); + MsiCloseHandle( view ); + + /* perform an update */ + create_file( "test2.txt" ); + rec = MsiCreateRecord( 1 ); + + r = MsiRecordSetStream( rec, 1, "test2.txt" ); + ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); + + DeleteFile("test2.txt"); + + r = MsiDatabaseOpenView( hdb, + "UPDATE `_Streams` SET `Data` = ? WHERE `Name` = 'data1'", &view ); + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + + r = MsiViewExecute( view, rec ); + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); + + MsiCloseHandle( rec ); + MsiViewClose( view ); + MsiCloseHandle( view ); + + r = MsiDatabaseOpenView( hdb, + "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data1'", &view ); + ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); + + r = MsiViewExecute( view, 0 ); + ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); + + r = MsiViewFetch( view, &rec ); + ok( r == ERROR_SUCCESS, "Failed to fetch record: %d\n", r); + + size = MAX_PATH; + r = MsiRecordGetString( rec, 1, file, &size ); + ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); + ok( !lstrcmp(file, "data1"), "Expected 'data1', got %s\n", file); + + size = MAX_PATH; + memset(buf, 0, MAX_PATH); + r = MsiRecordReadStream( rec, 2, buf, &size ); + ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); + todo_wine ok( !lstrcmp(buf, "test2.txt\n"), "Expected 'test2.txt\\n', got %s\n", buf); + + MsiCloseHandle( rec ); MsiViewClose( view ); MsiCloseHandle( view ); MsiCloseHandle( hdb ); @@ -3644,6 +3732,63 @@ r = MsiDatabaseOpenView(hdb, query, &hview); ok( r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r ); + + /* try updating a row in a join table */ + query = "SELECT `Component`.`ComponentId`, `FeatureComponents`.`Feature_` " + "FROM `Component`, `FeatureComponents` " + "WHERE `Component`.`Component` = `FeatureComponents`.`Component_` " + "ORDER BY `Feature_`"; + r = MsiDatabaseOpenView(hdb, query, &hview); + ok( r == ERROR_SUCCESS, "failed to open view: %d\n", r ); + + r = MsiViewExecute(hview, 0); + ok( r == ERROR_SUCCESS, "failed to execute view: %d\n", r ); + + r = MsiViewFetch(hview, &hrec); + ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r ); + + r = MsiRecordSetString( hrec, 1, "epicranius" ); + ok( r == ERROR_SUCCESS, "failed to set string: %d\n", r ); + + r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); + ok( r == ERROR_SUCCESS, "failed to update row: %d\n", r ); + + /* try another valid operation for joins */ + r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec); + todo_wine ok( r == ERROR_SUCCESS, "failed to refresh row: %d\n", r ); + + /* try an invalid operation for joins */ + r = MsiViewModify(hview, MSIMODIFY_DELETE, hrec); + ok( r == ERROR_FUNCTION_FAILED, "unexpected result: %d\n", r ); + + r = MsiRecordSetString( hrec, 2, "epicranius" ); + ok( r == ERROR_SUCCESS, "failed to set string: %d\n", r ); + + /* primary key cannot be updated */ + r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); + todo_wine ok( r == ERROR_FUNCTION_FAILED, "failed to update row: %d\n", r ); + + MsiCloseHandle(hrec); + MsiViewClose(hview); + MsiCloseHandle(hview); + + r = MsiDatabaseOpenView(hdb, query, &hview); + ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); + + r = MsiViewExecute(hview, 0); + ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); + + r = MsiViewFetch(hview, &hrec); + ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); + + size = MAX_PATH; + r = MsiRecordGetString( hrec, 1, buf, &size ); + ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r ); + ok( !lstrcmp( buf, "epicranius" ), "expected 'epicranius', got %s\n", buf ); + + MsiCloseHandle(hrec); + MsiViewClose(hview); + MsiCloseHandle(hview); MsiCloseHandle(hdb); DeleteFile(msifile); Modified: trunk/rostests/winetests/msi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
============================================================================== --- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Sat Feb 6 22:29:15 2010 @@ -226,7 +226,36 @@ "Var7\t!-MSITESTVAR7\t\tOne\n" "Var8\t!-*MSITESTVAR8\t\tOne\n" "Var9\t=-MSITESTVAR9\t\tOne\n" - "Var10\t=MSITESTVAR10\t\tOne\n"; + "Var10\t=MSITESTVAR10\t\tOne\n" + "Var11\t+-MSITESTVAR11\t[~];1\tOne\n" + "Var12\t+-MSITESTVAR11\t[~];2\tOne\n" + "Var13\t+-MSITESTVAR12\t[~];1\tOne\n" + "Var14\t=MSITESTVAR13\t[~];1\tOne\n" + "Var15\t=MSITESTVAR13\t[~];2\tOne\n" + "Var16\t=MSITESTVAR14\t;1;\tOne\n" + "Var17\t=MSITESTVAR15\t;;1;;\tOne\n" + "Var18\t=MSITESTVAR16\t 1 \tOne\n" + "Var19\t+-MSITESTVAR17\t1\tOne\n" + "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n" + "Var21\t+-MSITESTVAR18\t1\tOne\n" + "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n" + "Var23\t+-MSITESTVAR19\t1\tOne\n" + "Var24\t+-MSITESTVAR19\t[~]2\tOne\n" + "Var25\t+-MSITESTVAR20\t1\tOne\n" + "Var26\t+-MSITESTVAR20\t2[~]\tOne\n"; + +/* Expected results, starting from MSITESTVAR11 onwards */ +static const CHAR *environment_dat_results[] = {"1;2", /*MSITESTVAR11*/ + "1", /*MSITESTVAR12*/ + "1;2", /*MSITESTVAR13*/ + ";1;", /*MSITESTVAR14*/ + ";;1;;", /*MSITESTVAR15*/ + " 1 ", /*MSITESTVAR16*/ + ";;2;;1", /*MSITESTVAR17*/ + "1;;2;;", /*MSITESTVAR18*/ + "1", /*MSITESTVAR19*/ + "1", /*MSITESTVAR20*/ + NULL}; static const CHAR condition_dat[] = "Feature_\tLevel\tCondition\n" "s38\ti2\tS255\n" @@ -320,6 +349,30 @@ "ServiceControl\tServiceControl\n" "ServiceControl\tTestService\t8\t\t0\tservice_comp"; +static const CHAR sss_service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n" + "s72\tl255\ti2\tL255\tI2\ts72\n" + "ServiceControl\tServiceControl\n" + "ServiceControl\tSpooler\t1\t\t0\tservice_comp"; + +static const CHAR sss_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostFinalize\t\t1000\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "ResolveSource\t\t950\n" + "MoveFiles\t\t1700\n" + "InstallFiles\t\t4000\n" + "DuplicateFiles\t\t4500\n" + "WriteEnvironmentStrings\t\t4550\n" + "CreateShortcuts\t\t4600\n" + "StartServices\t\t5000\n" + "DeleteServices\t\t5500\n" + "InstallFinalize\t\t6600\n" + "InstallInitialize\t\t1500\n" + "InstallValidate\t\t1400\n" + "LaunchConditions\t\t100\n"; + /* tables for test_continuouscabs */ static const CHAR cc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" "s72\tS38\ts72\ti2\tS255\tS72\n" @@ -785,7 +838,8 @@ "s72\ts72\ts72\tS255\tS72\n" "DuplicateFile\tFileKey\n" "maximus\tmaximus\tmaximus\taugustus\t\n" - "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"; + "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n" + "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n"; static const CHAR wrv_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" "s72\tS38\ts72\ti2\tS255\tS72\n" @@ -1034,6 +1088,87 @@ "CustomAction\tAction\n" "TestAllUsersProp\t19\t\tTest failed\t\n"; +static const CHAR cf_create_folders_dat[] = "Directory_\tComponent_\n" + "s72\ts72\n" + "CreateFolder\tDirectory_\tComponent_\n" + "MSITESTDIR\tOne\n"; + +static const CHAR cf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostFinalize\t\t1000\n" + "ValidateProductID\t\t700\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "RemoveFiles\t\t3500\n" + "CreateFolders\t\t3700\n" + "InstallExecute\t\t3800\n" + "TestCreateFolders\t\t3900\n" + "InstallFiles\t\t4000\n" + "RegisterUser\t\t6000\n" + "RegisterProduct\t\t6100\n" + "PublishFeatures\t\t6300\n" + "PublishProduct\t\t6400\n" + "InstallFinalize\t\t6600\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "UnpublishFeatures\t\t1800\n" + "InstallValidate\t\t1400\n" + "LaunchConditions\t\t100\n"; + +static const CHAR cf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" + "s72\ti2\tS64\tS0\tS255\n" + "CustomAction\tAction\n" + "TestCreateFolders\t19\t\tHalts installation\t\n"; + +static const CHAR rf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostFinalize\t\t1000\n" + "ValidateProductID\t\t700\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "RemoveFiles\t\t3500\n" + "CreateFolders\t\t3600\n" + "RemoveFolders\t\t3700\n" + "InstallExecute\t\t3800\n" + "TestCreateFolders\t\t3900\n" + "InstallFiles\t\t4000\n" + "RegisterUser\t\t6000\n" + "RegisterProduct\t\t6100\n" + "PublishFeatures\t\t6300\n" + "PublishProduct\t\t6400\n" + "InstallFinalize\t\t6600\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "UnpublishFeatures\t\t1800\n" + "InstallValidate\t\t1400\n" + "LaunchConditions\t\t100\n"; + + +static const CHAR sr_selfreg_dat[] = "File_\tCost\n" + "s72\tI2\n" + "SelfReg\tFile_\n" + "one.txt\t1\n"; + +static const CHAR sr_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostFinalize\t\t1000\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "ResolveSource\t\t950\n" + "MoveFiles\t\t1700\n" + "SelfUnregModules\t\t3900\n" + "InstallFiles\t\t4000\n" + "DuplicateFiles\t\t4500\n" + "WriteEnvironmentStrings\t\t4550\n" + "CreateShortcuts\t\t4600\n" + "InstallFinalize\t\t6600\n" + "InstallInitialize\t\t1500\n" + "InstallValidate\t\t1400\n" + "LaunchConditions\t\t100\n"; + typedef struct _msi_table { const CHAR *filename; @@ -1735,6 +1870,73 @@ ADD_TABLE(pp_install_exec_seq), ADD_TABLE(rofc_media), ADD_TABLE(property), +}; + +static const msi_table cf_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(cf_create_folders), + ADD_TABLE(cf_install_exec_seq), + ADD_TABLE(cf_custom_action), + ADD_TABLE(media), + ADD_TABLE(property) +}; + +static const msi_table rf_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(cf_create_folders), + ADD_TABLE(rf_install_exec_seq), + ADD_TABLE(cf_custom_action), + ADD_TABLE(media), + ADD_TABLE(property) +}; + +static const msi_table sss_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(sss_install_exec_seq), + ADD_TABLE(sss_service_control), + ADD_TABLE(media), + ADD_TABLE(property) +}; + +static const msi_table sds_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(sss_install_exec_seq), + ADD_TABLE(service_control), + ADD_TABLE(media), + ADD_TABLE(property) +}; + +static const msi_table sr_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(sr_selfreg), + ADD_TABLE(sr_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(property) }; /* cabinet definitions */ @@ -6732,6 +6934,7 @@ LONG res; DWORD type, size; char buffer[16]; + UINT i; if (on_win9x) { @@ -6800,8 +7003,27 @@ res = RegDeleteValueA(env, "MSITESTVAR10"); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + i = 11; + while (environment_dat_results[(i-11)]) { + char name[20]; + sprintf(name, "MSITESTVAR%d", i); + + type = REG_NONE; + size = sizeof(buffer); + buffer[0] = 0; + res = RegQueryValueExA(env, name, NULL, &type, (LPBYTE)buffer, &size); + ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res); + ok(type == REG_SZ, "%d: Expected REG_SZ, got %u\n", i, type); + ok(!lstrcmp(buffer, environment_dat_results[(i-11)]), "%d: Expected %s, got %s\n", + i, environment_dat_results[(i-11)], buffer); + + res = RegDeleteValueA(env, name); + ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res); + i++; + } + + RegCloseKey(env); - delete_pf("msitest\\cabout\\new\\five.txt", TRUE); delete_pf("msitest\\cabout\\new", FALSE); delete_pf("msitest\\cabout\\four.txt", TRUE); @@ -6836,9 +7058,9 @@ ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); ok(!delete_pf("msitest\\first", FALSE), "File installed\n"); ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); - todo_wine ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - todo_wine ok(delete_pf("msitest", FALSE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); r = MsiInstallProductA(msifile, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -6988,7 +7210,31 @@ /* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */ r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + if (r == ERROR_SUCCESS) + { + /* Win9x/WinMe */ + win_skip("Win9x and WinMe act differently with respect to ALLUSERS\n"); + + ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + delete_test_files(); + } + else + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); } static char session_manager[] = "System\\CurrentControlSet\\Control\\Session Manager"; @@ -7235,6 +7481,223 @@ error = pMsiSetExternalUIRecord(NULL, 0, NULL, NULL); ok(!error, "MsiSetExternalUIRecord failed %u\n", error); +} + +static void test_feature_override(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, tables, sizeof(tables) / sizeof(msi_table)); + + r = MsiInstallProductA(msifile, "ADDLOCAL=One"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "File installed\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "File installed\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "File installed\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + + delete_test_files(); +} + +static void test_create_folder(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, cf_tables, sizeof(cf_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + todo_wine ok(!delete_pf("msitest", FALSE), "Directory created\n"); + + delete_test_files(); +} + +static void test_remove_folder(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, rf_tables, sizeof(rf_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + ok(!delete_pf("msitest", FALSE), "Directory created\n"); + + delete_test_files(); +} + +static void test_start_services(void) +{ + UINT r; + SC_HANDLE scm, service; + BOOL ret; + DWORD error = ERROR_SUCCESS; + + if (on_win9x) + { + win_skip("Services are not implemented on Win9x and WinMe\n"); + return; + } + scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + ok(scm != NULL, "Failed to open the SC Manager\n"); + if (!scm) return; + + service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); + if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) + { + win_skip("The 'Spooler' service does not exist\n"); + CloseServiceHandle(scm); + return; + } + ok(service != NULL, "Failed to open Spooler, error %d\n", GetLastError()); + if (!service) { + CloseServiceHandle(scm); + return; + } + + ret = StartService(service, 0, NULL); + if (!ret && (error = GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING) + { + skip("Terminal service not available, skipping test\n"); + CloseServiceHandle(service); + CloseServiceHandle(scm); + return; + } + + CloseServiceHandle(service); + CloseServiceHandle(scm); + + create_test_files(); + create_database(msifile, sss_tables, sizeof(sss_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); + + delete_test_files(); + + if (error == ERROR_SUCCESS) + { + SERVICE_STATUS status; + + scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); + + ret = ControlService(service, SERVICE_CONTROL_STOP, &status); + ok(ret, "ControlService failed %u\n", GetLastError()); + + CloseServiceHandle(service); + CloseServiceHandle(scm); + } +} + +static void test_delete_services(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, sds_tables, sizeof(sds_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); + + delete_test_files(); +} + +static void test_self_registration(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, sr_tables, sizeof(sr_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); + + delete_test_files(); } START_TEST(install) @@ -7327,6 +7790,12 @@ test_file_in_use_cab(); test_MsiSetExternalUI(); test_allusers_prop(); + test_feature_override(); + test_create_folder(); + test_remove_folder(); + test_start_services(); + test_delete_services(); + test_self_registration(); DeleteFileA(log_file); Modified: trunk/rostests/winetests/msi/package.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/package.c?r…
============================================================================== --- trunk/rostests/winetests/msi/package.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/package.c [iso-8859-1] Sat Feb 6 22:29:15 2010 @@ -1046,6 +1046,14 @@ r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz ); ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); ok( !lstrcmpi(buffer, "C:\\one\\two\\"), "Expected C:\\one\\two\\, got %s\n", buffer); + + r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two\\three" ); + ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r ); + + sz = sizeof buffer - 1; + r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz ); + ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); + ok( !lstrcmpi(buffer, "C:\\one\\two\\three\\"), "Expected C:\\one\\two\\three\\, got %s\n", buffer); MsiCloseHandle( hpkg ); } Modified: trunk/rostests/winetests/msi/record.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/record.c?re…
============================================================================== --- trunk/rostests/winetests/msi/record.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/record.c [iso-8859-1] Sat Feb 6 22:29:15 2010 @@ -334,7 +334,6 @@ ok(r == ERROR_SUCCESS, "failed to add stream to record\n"); r = MsiRecordReadStream(h, 1, buf, NULL); ok(r == ERROR_INVALID_PARAMETER, "should return error\n"); - /*
http://test.winehq.org/data/200503181000/98_jmelgarejo98casa/msi:record.txt
*/ DeleteFile(filename); /* Windows 98 doesn't like this at all, so don't check return. */ r = MsiRecordReadStream(h, 1, NULL, NULL); ok(r == ERROR_INVALID_PARAMETER, "should return error\n");
14 years, 10 months
1
0
0
0
[cwittich] 45468: [MSI] sync msi to wine 1.1.38
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Feb 6 22:28:28 2010 New Revision: 45468 URL:
http://svn.reactos.org/svn/reactos?rev=45468&view=rev
Log: [MSI] sync msi to wine 1.1.38 Added: trunk/reactos/dll/win32/msi/msi_Uk.rc (with props) Modified: trunk/reactos/dll/win32/msi/action.c trunk/reactos/dll/win32/msi/appsearch.c trunk/reactos/dll/win32/msi/automation.c trunk/reactos/dll/win32/msi/cond.tab.c trunk/reactos/dll/win32/msi/cond.tab.h trunk/reactos/dll/win32/msi/cond.y trunk/reactos/dll/win32/msi/custom.c trunk/reactos/dll/win32/msi/database.c trunk/reactos/dll/win32/msi/dialog.c trunk/reactos/dll/win32/msi/events.c trunk/reactos/dll/win32/msi/files.c trunk/reactos/dll/win32/msi/helpers.c trunk/reactos/dll/win32/msi/join.c trunk/reactos/dll/win32/msi/msi.rc trunk/reactos/dll/win32/msi/msipriv.h trunk/reactos/dll/win32/msi/msiquery.c trunk/reactos/dll/win32/msi/package.c trunk/reactos/dll/win32/msi/storages.c trunk/reactos/dll/win32/msi/streams.c trunk/reactos/include/psdk/msi.h Modified: trunk/reactos/dll/win32/msi/action.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/action.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/action.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/action.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -959,10 +959,6 @@ return ERROR_SUCCESS; } -/* - * Also we cannot enable/disable components either, so for now I am just going - * to do all the directories for all the components. - */ static UINT ACTION_CreateFolders(MSIPACKAGE *package) { static const WCHAR ExecSeqQuery[] = @@ -981,7 +977,60 @@ rc = MSI_IterateRecords(view, NULL, ITERATE_CreateFolders, package); msiobj_release(&view->hdr); - msi_create_component_directories( package ); + return rc; +} + +static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param ) +{ + MSIPACKAGE *package = param; + LPCWSTR dir; + LPWSTR full_path; + MSIRECORD *uirow; + MSIFOLDER *folder; + + dir = MSI_RecordGetString( row, 1 ); + if (!dir) + { + ERR("Unable to get folder id\n"); + return ERROR_SUCCESS; + } + + full_path = resolve_folder( package, dir, FALSE, FALSE, TRUE, &folder ); + if (!full_path) + { + ERR("Unable to resolve folder id %s\n", debugstr_w(dir)); + return ERROR_SUCCESS; + } + + TRACE("folder is %s\n", debugstr_w(full_path)); + + uirow = MSI_CreateRecord( 1 ); + MSI_RecordSetStringW( uirow, 1, full_path ); + ui_actiondata( package, szRemoveFolders, uirow ); + msiobj_release( &uirow->hdr ); + + RemoveDirectoryW( full_path ); + folder->State = 0; + + msi_free( full_path ); + return ERROR_SUCCESS; +} + +static UINT ACTION_RemoveFolders( MSIPACKAGE *package ) +{ + static const WCHAR query[] = + {'S','E','L','E','C','T',' ', '`','D','i','r','e','c','t','o','r','y','_','`', + ' ','F','R','O','M',' ', '`','C','r','e','a','t','e','F','o','l','d','e','r','`',0}; + + MSIQUERY *view; + UINT rc; + + rc = MSI_DatabaseOpenViewW( package->db, query, &view ); + if (rc != ERROR_SUCCESS) + return ERROR_SUCCESS; + + rc = MSI_IterateRecords( view, NULL, ITERATE_RemoveFolders, package ); + msiobj_release( &view->hdr ); return rc; } @@ -1562,8 +1611,10 @@ while (ptr) { - if ((ptr2 && strncmpW(ptr,feature->Feature, ptr2-ptr)==0) - || (!ptr2 && strcmpW(ptr,feature->Feature)==0)) + int len = ptr2 - ptr; + + if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len)) + || (!ptr2 && !strcmpW(ptr, feature->Feature))) { msi_feature_set_state(package, feature, state); break; @@ -1583,55 +1634,57 @@ return TRUE; } -UINT MSI_SetFeatureStates(MSIPACKAGE *package) -{ - int level; - static const WCHAR szlevel[] = - {'I','N','S','T','A','L','L','L','E','V','E','L',0}; +static BOOL process_overrides( MSIPACKAGE *package, int level ) +{ static const WCHAR szAddLocal[] = {'A','D','D','L','O','C','A','L',0}; static const WCHAR szAddSource[] = {'A','D','D','S','O','U','R','C','E',0}; static const WCHAR szAdvertise[] = {'A','D','V','E','R','T','I','S','E',0}; - BOOL override = FALSE; + BOOL ret = FALSE; + + /* all these activation/deactivation things happen in order and things + * later on the list override things earlier on the list. + * + * 0 INSTALLLEVEL processing + * 1 ADDLOCAL + * 2 REMOVE + * 3 ADDSOURCE + * 4 ADDDEFAULT + * 5 REINSTALL + * 6 ADVERTISE + * 7 COMPADDLOCAL + * 8 COMPADDSOURCE + * 9 FILEADDLOCAL + * 10 FILEADDSOURCE + * 11 FILEADDDEFAULT + */ + ret |= process_state_property( package, level, szAddLocal, INSTALLSTATE_LOCAL ); + ret |= process_state_property( package, level, szRemove, INSTALLSTATE_ABSENT ); + ret |= process_state_property( package, level, szAddSource, INSTALLSTATE_SOURCE ); + ret |= process_state_property( package, level, szReinstall, INSTALLSTATE_UNKNOWN ); + ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED ); + + if (ret) + MSI_SetPropertyW( package, szPreselected, szOne ); + + return ret; +} + +UINT MSI_SetFeatureStates(MSIPACKAGE *package) +{ + int level; + static const WCHAR szlevel[] = + {'I','N','S','T','A','L','L','L','E','V','E','L',0}; MSICOMPONENT* component; MSIFEATURE *feature; - - /* I do not know if this is where it should happen.. but */ - TRACE("Checking Install Level\n"); level = msi_get_property_int(package, szlevel, 1); - /* ok here is the _real_ rub - * all these activation/deactivation things happen in order and things - * later on the list override things earlier on the list. - * 0) INSTALLLEVEL processing - * 1) ADDLOCAL - * 2) REMOVE - * 3) ADDSOURCE - * 4) ADDDEFAULT - * 5) REINSTALL - * 6) ADVERTISE - * 7) COMPADDLOCAL - * 8) COMPADDSOURCE - * 9) FILEADDLOCAL - * 10) FILEADDSOURCE - * 11) FILEADDDEFAULT - * - * I am still ignoring a lot of these. But that is ok for now, ADDLOCAL and - * REMOVE are the big ones, since we don't handle administrative installs - * yet anyway. - */ - override |= process_state_property(package, level, szAddLocal, INSTALLSTATE_LOCAL); - override |= process_state_property(package, level, szRemove, INSTALLSTATE_ABSENT); - override |= process_state_property(package, level, szAddSource, INSTALLSTATE_SOURCE); - override |= process_state_property(package, level, szReinstall, INSTALLSTATE_UNKNOWN); - override |= process_state_property(package, level, szAdvertise, INSTALLSTATE_ADVERTISED); - - if (!override) + if (!msi_get_property_int( package, szPreselected, 0 )) { LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { @@ -1661,8 +1714,6 @@ msi_feature_set_state(package, fl->feature, INSTALLSTATE_UNKNOWN); } } - else - MSI_SetPropertyW(package, szPreselected, szOne); /* * now we want to enable or disable components base on feature @@ -1961,7 +2012,7 @@ static const WCHAR szOutOfDiskSpace[] = {'O','u','t','O','f','D','i','s','k','S','p','a','c','e',0}; MSICOMPONENT *comp; - UINT rc; + UINT rc = ERROR_SUCCESS; MSIQUERY * view; LPWSTR level; @@ -1982,26 +2033,28 @@ TRACE("File calculations\n"); msi_check_file_install_states( package ); - TRACE("Evaluating Condition Table\n"); - - rc = MSI_DatabaseOpenViewW(package->db, ConditionQuery, &view); - if (rc == ERROR_SUCCESS) - { - rc = MSI_IterateRecords(view, NULL, ITERATE_CostFinalizeConditions, - package); - msiobj_release(&view->hdr); - } - - TRACE("Enabling or Disabling Components\n"); - LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) - { - if (MSI_EvaluateConditionW(package, comp->Condition) == MSICONDITION_FALSE) - { - TRACE("Disabling component %s\n", debugstr_w(comp->Component)); - comp->Enabled = FALSE; - } - else - comp->Enabled = TRUE; + if (!process_overrides( package, msi_get_property_int( package, szlevel, 1 ) )) + { + TRACE("Evaluating Condition Table\n"); + + rc = MSI_DatabaseOpenViewW( package->db, ConditionQuery, &view ); + if (rc == ERROR_SUCCESS) + { + rc = MSI_IterateRecords( view, NULL, ITERATE_CostFinalizeConditions, package ); + msiobj_release( &view->hdr ); + } + + TRACE("Enabling or Disabling Components\n"); + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) + { + if (MSI_EvaluateConditionW( package, comp->Condition ) == MSICONDITION_FALSE) + { + TRACE("Disabling component %s\n", debugstr_w(comp->Component)); + comp->Enabled = FALSE; + } + else + comp->Enabled = TRUE; + } } MSI_SetPropertyW(package,szCosting,szOne); @@ -3652,6 +3705,89 @@ return ERROR_SUCCESS; } +static UINT ITERATE_SelfUnregModules( MSIRECORD *row, LPVOID param ) +{ + static const WCHAR regsvr32[] = + {'r','e','g','s','v','r','3','2','.','e','x','e',' ','/','u',' ','\"',0}; + static const WCHAR close[] = {'\"',0}; + MSIPACKAGE *package = param; + LPCWSTR filename; + LPWSTR cmdline; + MSIFILE *file; + DWORD len; + STARTUPINFOW si; + PROCESS_INFORMATION pi; + BOOL ret; + MSIRECORD *uirow; + LPWSTR uipath, p; + + memset( &si, 0, sizeof(STARTUPINFOW) ); + + filename = MSI_RecordGetString( row, 1 ); + file = get_loaded_file( package, filename ); + + if (!file) + { + ERR("Unable to find file id %s\n", debugstr_w(filename)); + return ERROR_SUCCESS; + } + + len = strlenW( regsvr32 ) + strlenW( file->TargetPath ) + 2; + + cmdline = msi_alloc( len * sizeof(WCHAR) ); + strcpyW( cmdline, regsvr32 ); + strcatW( cmdline, file->TargetPath ); + strcatW( cmdline, close ); + + TRACE("Unregistering %s\n", debugstr_w(cmdline)); + + ret = CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, c_colon, &si, &pi ); + if (ret) + { + CloseHandle( pi.hThread ); + msi_dialog_check_messages( pi.hProcess ); + CloseHandle( pi.hProcess ); + } + + msi_free( cmdline ); + + uirow = MSI_CreateRecord( 2 ); + uipath = strdupW( file->TargetPath ); + if ((p = strrchrW( uipath, '\\' ))) + { + *p = 0; + MSI_RecordSetStringW( uirow, 1, ++p ); + } + MSI_RecordSetStringW( uirow, 2, uipath ); + ui_actiondata( package, szSelfUnregModules, uirow ); + msiobj_release( &uirow->hdr ); + msi_free( uipath ); + /* FIXME call ui_progress? */ + + return ERROR_SUCCESS; +} + +static UINT ACTION_SelfUnregModules( MSIPACKAGE *package ) +{ + UINT rc; + MSIQUERY *view; + static const WCHAR query[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', + '`','S','e','l','f','R','e','g','`',0}; + + rc = MSI_DatabaseOpenViewW( package->db, query, &view ); + if (rc != ERROR_SUCCESS) + { + TRACE("no SelfReg table\n"); + return ERROR_SUCCESS; + } + + MSI_IterateRecords( view, NULL, ITERATE_SelfUnregModules, package ); + msiobj_release( &view->hdr ); + + return ERROR_SUCCESS; +} + static UINT ACTION_PublishFeatures(MSIPACKAGE *package) { MSIFEATURE *feature; @@ -4462,8 +4598,8 @@ MSIPACKAGE *package = param; MSICOMPONENT *comp; SC_HANDLE scm, service = NULL; - LPCWSTR name, *vector = NULL; - LPWSTR args; + LPCWSTR *vector = NULL; + LPWSTR name, args; DWORD event, numargs; UINT r = ERROR_FUNCTION_FAILED; @@ -4471,9 +4607,9 @@ if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) return ERROR_SUCCESS; - name = MSI_RecordGetString(rec, 2); + deformat_string(package, MSI_RecordGetString(rec, 2), &name); + deformat_string(package, MSI_RecordGetString(rec, 4), &args); event = MSI_RecordGetInteger(rec, 3); - args = strdupW(MSI_RecordGetString(rec, 4)); if (!(event & msidbServiceControlEventStart)) return ERROR_SUCCESS; @@ -4488,15 +4624,16 @@ service = OpenServiceW(scm, name, SERVICE_START); if (!service) { - ERR("Failed to open service %s\n", debugstr_w(name)); + ERR("Failed to open service %s (%u)\n", debugstr_w(name), GetLastError()); goto done; } vector = msi_service_args_to_vector(args, &numargs); - if (!StartServiceW(service, numargs, vector)) - { - ERR("Failed to start service %s\n", debugstr_w(name)); + if (!StartServiceW(service, numargs, vector) && + GetLastError() != ERROR_SERVICE_ALREADY_RUNNING) + { + ERR("Failed to start service %s (%u)\n", debugstr_w(name), GetLastError()); goto done; } @@ -4506,6 +4643,7 @@ CloseServiceHandle(service); CloseServiceHandle(scm); + msi_free(name); msi_free(args); msi_free(vector); return r; @@ -4570,27 +4708,12 @@ return FALSE; } -static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param) -{ - MSIPACKAGE *package = param; - MSICOMPONENT *comp; +static UINT stop_service( LPCWSTR name ) +{ + SC_HANDLE scm = NULL, service = NULL; SERVICE_STATUS status; SERVICE_STATUS_PROCESS ssp; - SC_HANDLE scm = NULL, service = NULL; - LPWSTR name, args; - DWORD event, needed; - - event = MSI_RecordGetInteger(rec, 3); - if (!(event & msidbServiceControlEventStop)) - return ERROR_SUCCESS; - - comp = get_loaded_component(package, MSI_RecordGetString(rec, 6)); - if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) - return ERROR_SUCCESS; - - deformat_string(package, MSI_RecordGetString(rec, 2), &name); - deformat_string(package, MSI_RecordGetString(rec, 4), &args); - args = strdupW(MSI_RecordGetString(rec, 4)); + DWORD needed; scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (!scm) @@ -4605,16 +4728,14 @@ SERVICE_ENUMERATE_DEPENDENTS); if (!service) { - WARN("Failed to open service (%s): %d\n", - debugstr_w(name), GetLastError()); + WARN("Failed to open service (%s): %d\n", debugstr_w(name), GetLastError()); goto done; } if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (LPBYTE)&ssp, sizeof(SERVICE_STATUS_PROCESS), &needed)) { - WARN("Failed to query service status (%s): %d\n", - debugstr_w(name), GetLastError()); + WARN("Failed to query service status (%s): %d\n", debugstr_w(name), GetLastError()); goto done; } @@ -4629,8 +4750,28 @@ done: CloseServiceHandle(service); CloseServiceHandle(scm); - msi_free(name); - msi_free(args); + + return ERROR_SUCCESS; +} + +static UINT ITERATE_StopService( MSIRECORD *rec, LPVOID param ) +{ + MSIPACKAGE *package = param; + MSICOMPONENT *comp; + LPWSTR name; + DWORD event; + + event = MSI_RecordGetInteger( rec, 3 ); + if (!(event & msidbServiceControlEventStop)) + return ERROR_SUCCESS; + + comp = get_loaded_component( package, MSI_RecordGetString( rec, 6 ) ); + if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) + return ERROR_SUCCESS; + + deformat_string( package, MSI_RecordGetString( rec, 2 ), &name ); + stop_service( name ); + msi_free( name ); return ERROR_SUCCESS; } @@ -4650,6 +4791,69 @@ rc = MSI_IterateRecords(view, NULL, ITERATE_StopService, package); msiobj_release(&view->hdr); + + return rc; +} + +static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param ) +{ + MSIPACKAGE *package = param; + MSICOMPONENT *comp; + LPWSTR name = NULL; + DWORD event; + SC_HANDLE scm = NULL, service = NULL; + + event = MSI_RecordGetInteger( rec, 3 ); + if (!(event & msidbServiceControlEventDelete)) + return ERROR_SUCCESS; + + comp = get_loaded_component( package, MSI_RecordGetString(rec, 6) ); + if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) + return ERROR_SUCCESS; + + deformat_string( package, MSI_RecordGetString(rec, 2), &name ); + stop_service( name ); + + scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS ); + if (!scm) + { + WARN("Failed to open the SCM: %d\n", GetLastError()); + goto done; + } + + service = OpenServiceW( scm, name, DELETE ); + if (!service) + { + WARN("Failed to open service (%s): %u\n", debugstr_w(name), GetLastError()); + goto done; + } + + if (!DeleteService( service )) + WARN("Failed to delete service (%s): %u\n", debugstr_w(name), GetLastError()); + +done: + CloseServiceHandle( service ); + CloseServiceHandle( scm ); + msi_free( name ); + + return ERROR_SUCCESS; +} + +static UINT ACTION_DeleteServices( MSIPACKAGE *package ) +{ + UINT rc; + MSIQUERY *view; + + static const WCHAR query[] = { + 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', + 'S','e','r','v','i','c','e','C','o','n','t','r','o','l',0 }; + + rc = MSI_DatabaseOpenViewW( package->db, query, &view ); + if (rc != ERROR_SUCCESS) + return ERROR_SUCCESS; + + rc = MSI_IterateRecords( view, NULL, ITERATE_DeleteService, package ); + msiobj_release( &view->hdr ); return rc; } @@ -4922,16 +5126,30 @@ LPCWSTR ptr = *value; if (!strncmpW(ptr, prefix, prefix_len)) { - *flags |= ENV_MOD_APPEND; - *value += lstrlenW(prefix); + if (ptr[prefix_len] == szSemiColon[0]) + { + *flags |= ENV_MOD_APPEND; + *value += lstrlenW(prefix); + } + else + { + *value = NULL; + } } else if (lstrlenW(*value) >= prefix_len) { ptr += lstrlenW(ptr) - prefix_len; if (!lstrcmpW(ptr, prefix)) { - *flags |= ENV_MOD_PREFIX; - /* the "[~]" will be removed by deformat_string */; + if ((ptr-1) > *value && *(ptr-1) == szSemiColon[0]) + { + *flags |= ENV_MOD_PREFIX; + /* the "[~]" will be removed by deformat_string */; + } + else + { + *value = NULL; + } } } } @@ -4977,7 +5195,7 @@ TRACE("name %s value %s\n", debugstr_w(name), debugstr_w(value)); res = env_set_flags(&name, &value, &flags); - if (res != ERROR_SUCCESS) + if (res != ERROR_SUCCESS || !value) goto done; if (value && !deformat_string(package, value, &deformatted)) @@ -5023,6 +5241,9 @@ goto done; } + /* If we are appending but the string was empty, strip ; */ + if ((flags & ENV_MOD_APPEND) && (value[0] == szSemiColon[0])) value++; + size = (lstrlenW(value) + 1) * sizeof(WCHAR); newval = strdupW(value); if (!newval) @@ -5033,7 +5254,8 @@ } else { - if (flags & ENV_ACT_SETABSENT) + /* Contrary to MSDN, +-variable to [~];path works */ + if (flags & ENV_ACT_SETABSENT && !(flags & ENV_MOD_MASK)) { res = ERROR_SUCCESS; goto done; @@ -5063,7 +5285,7 @@ int multiplier = 0; if (flags & ENV_MOD_APPEND) multiplier++; if (flags & ENV_MOD_PREFIX) multiplier++; - mod_size = (lstrlenW(value) + 1) * multiplier; + mod_size = lstrlenW(value) * multiplier; size += mod_size * sizeof(WCHAR); } @@ -5078,26 +5300,18 @@ if (flags & ENV_MOD_PREFIX) { lstrcpyW(newval, value); - lstrcatW(newval, szSemiColon); - ptr = newval + lstrlenW(value) + 1; + ptr = newval + lstrlenW(value); } lstrcpyW(ptr, data); if (flags & ENV_MOD_APPEND) { - lstrcatW(newval, szSemiColon); lstrcatW(newval, value); } } - - if (newval) - { - TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval)); - res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size); - } - else - res = ERROR_SUCCESS; + TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval)); + res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size); done: if (env) RegCloseKey(env); @@ -5911,6 +6125,13 @@ return r; } +static UINT ACTION_ScheduleReboot( MSIPACKAGE *package ) +{ + TRACE("\n"); + package->need_reboot = 1; + return ERROR_SUCCESS; +} + static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, LPCWSTR table ) { @@ -5973,18 +6194,6 @@ return msi_unimplemented_action_stub( package, "MigrateFeatureStates", table ); } -static UINT ACTION_SelfUnregModules( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { 'S','e','l','f','R','e','g',0 }; - return msi_unimplemented_action_stub( package, "SelfUnregModules", table ); -} - -static UINT ACTION_DeleteServices( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { - 'S','e','r','v','i','c','e','C','o','n','t','r','o','l',0 }; - return msi_unimplemented_action_stub( package, "DeleteServices", table ); -} static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) { static const WCHAR table[] = { @@ -6048,12 +6257,6 @@ return msi_unimplemented_action_stub( package, "RemoveExistingProducts", table ); } -static UINT ACTION_RemoveFolders( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { 'C','r','e','a','t','e','F','o','l','d','e','r',0 }; - return msi_unimplemented_action_stub( package, "RemoveFolders", table ); -} - static UINT ACTION_RemoveODBC( MSIPACKAGE *package ) { static const WCHAR table[] = { 'O','D','B','C','D','r','i','v','e','r',0 }; @@ -6070,6 +6273,12 @@ { static const WCHAR table[] = { 'S','h','o','r','t','c','u','t',0 }; return msi_unimplemented_action_stub( package, "RemoveShortcuts", table ); +} + +static UINT ACTION_SetODBCFolders( MSIPACKAGE *package ) +{ + static const WCHAR table[] = { 'D','i','r','e','c','t','o','r','y',0 }; + return msi_unimplemented_action_stub( package, "SetODBCFolders", table ); } static UINT ACTION_UnpublishComponents( MSIPACKAGE *package ) @@ -6173,10 +6382,10 @@ { szRemoveShortcuts, ACTION_RemoveShortcuts }, { szResolveSource, ACTION_ResolveSource }, { szRMCCPSearch, ACTION_RMCCPSearch }, - { szScheduleReboot, NULL }, + { szScheduleReboot, ACTION_ScheduleReboot }, { szSelfRegModules, ACTION_SelfRegModules }, { szSelfUnregModules, ACTION_SelfUnregModules }, - { szSetODBCFolders, NULL }, + { szSetODBCFolders, ACTION_SetODBCFolders }, { szStartServices, ACTION_StartServices }, { szStopServices, ACTION_StopServices }, { szUnpublishComponents, ACTION_UnpublishComponents }, Modified: trunk/reactos/dll/win32/msi/appsearch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/appsearch.c?…
============================================================================== --- trunk/reactos/dll/win32/msi/appsearch.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/appsearch.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -463,7 +463,7 @@ ACTION_ConvertRegValue(regType, value, sz, appValue); break; default: - FIXME("AppSearch unimplemented for type %d (key path %s, value %s)\n", + FIXME("unimplemented for type %d (key path %s, value %s)\n", type, debugstr_w(keyPath), debugstr_w(valueName)); } end: Modified: trunk/reactos/dll/win32/msi/automation.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/automation.c…
============================================================================== --- trunk/reactos/dll/win32/msi/automation.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/automation.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -1138,6 +1138,21 @@ return S_OK; } +static HRESULT DatabaseImpl_LastErrorRecord(WORD wFlags, + DISPPARAMS* pDispParams, + VARIANT* pVarResult, + EXCEPINFO* pExcepInfo, + UINT* puArgErr) +{ + if (!(wFlags & DISPATCH_METHOD)) + return DISP_E_MEMBERNOTFOUND; + + FIXME("\n"); + + VariantInit(pVarResult); + return S_OK; +} + static HRESULT WINAPI DatabaseImpl_Invoke( AutomationObject* This, DISPID dispIdMember, @@ -1207,6 +1222,11 @@ } else return DISP_E_MEMBERNOTFOUND; break; + + case DISPID_INSTALLER_LASTERRORRECORD: + return DatabaseImpl_LastErrorRecord(wFlags, pDispParams, + pVarResult, pExcepInfo, + puArgErr); default: return DISP_E_MEMBERNOTFOUND; Modified: trunk/reactos/dll/win32/msi/cond.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/cond.tab.c?r…
============================================================================== --- trunk/reactos/dll/win32/msi/cond.tab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/cond.tab.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -119,6 +119,7 @@ #include "msiserver.h" #include "wine/debug.h" #include "wine/unicode.h" +#include "wine/list.h" #define YYLEX_PARAM info #define YYPARSE_PARAM info @@ -133,6 +134,7 @@ LPCWSTR str; INT n; MSICONDITION result; + struct list mem; } COND_input; struct cond_str { @@ -140,9 +142,13 @@ INT len; }; -static LPWSTR COND_GetString( const struct cond_str *str ); -static LPWSTR COND_GetLiteral( const struct cond_str *str ); +static LPWSTR COND_GetString( COND_input *info, const struct cond_str *str ); +static LPWSTR COND_GetLiteral( COND_input *info, const struct cond_str *str ); static int cond_lex( void *COND_lval, COND_input *info); + +static void *cond_alloc( COND_input *cond, unsigned int sz ); +static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz ); +static void cond_free( void *ptr ); static INT compare_int( INT a, INT operator, INT b ); static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert ); @@ -152,8 +158,8 @@ INT r; r = compare_string( a, op, b, convert ); - msi_free( a ); - msi_free( b ); + cond_free( a ); + cond_free( b ); return r; } @@ -184,7 +190,7 @@ /* Line 189 of yacc.c */ -#line 188 "cond.tab.c" +#line 194 "cond.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -259,7 +265,7 @@ { /* Line 214 of yacc.c */ -#line 110 "cond.y" +#line 116 "cond.y" struct cond_str str; LPWSTR string; @@ -268,7 +274,7 @@ /* Line 214 of yacc.c */ -#line 272 "cond.tab.c" +#line 278 "cond.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -280,7 +286,7 @@ /* Line 264 of yacc.c */ -#line 284 "cond.tab.c" +#line 290 "cond.tab.c" #ifdef short # undef short @@ -584,12 +590,12 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 134, 134, 140, 147, 151, 155, 159, 163, 170, - 174, 181, 185, 189, 194, 198, 207, 216, 220, 224, - 228, 232, 237, 242, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 271, 275, 282, 291, 295, 304, 313, 326, - 338, 345, 359, 368 + 0, 140, 140, 146, 153, 157, 161, 165, 169, 176, + 180, 187, 191, 195, 200, 204, 213, 222, 226, 230, + 234, 238, 243, 248, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 277, 281, 288, 298, 302, 311, 320, 333, + 345, 358, 375, 385 }; #endif @@ -1540,7 +1546,7 @@ case 2: /* Line 1455 of yacc.c */ -#line 135 "cond.y" +#line 141 "cond.y" { COND_input* cond = (COND_input*) info; cond->result = (yyvsp[(1) - (1)].value); @@ -1550,7 +1556,7 @@ case 3: /* Line 1455 of yacc.c */ -#line 140 "cond.y" +#line 146 "cond.y" { COND_input* cond = (COND_input*) info; cond->result = MSICONDITION_NONE; @@ -1560,7 +1566,7 @@ case 4: /* Line 1455 of yacc.c */ -#line 148 "cond.y" +#line 154 "cond.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} @@ -1569,7 +1575,7 @@ case 5: /* Line 1455 of yacc.c */ -#line 152 "cond.y" +#line 158 "cond.y" { (yyval.value) = (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value); ;} @@ -1578,7 +1584,7 @@ case 6: /* Line 1455 of yacc.c */ -#line 156 "cond.y" +#line 162 "cond.y" { (yyval.value) = !(yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value); ;} @@ -1587,7 +1593,7 @@ case 7: /* Line 1455 of yacc.c */ -#line 160 "cond.y" +#line 166 "cond.y" { (yyval.value) = ( (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value) ) && !( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) ); ;} @@ -1596,7 +1602,7 @@ case 8: /* Line 1455 of yacc.c */ -#line 164 "cond.y" +#line 170 "cond.y" { (yyval.value) = ( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) ) || ( !(yyvsp[(1) - (3)].value) && !(yyvsp[(3) - (3)].value) ); ;} @@ -1605,7 +1611,7 @@ case 9: /* Line 1455 of yacc.c */ -#line 171 "cond.y" +#line 177 "cond.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} @@ -1614,7 +1620,7 @@ case 10: /* Line 1455 of yacc.c */ -#line 175 "cond.y" +#line 181 "cond.y" { (yyval.value) = (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value); ;} @@ -1623,7 +1629,7 @@ case 11: /* Line 1455 of yacc.c */ -#line 182 "cond.y" +#line 188 "cond.y" { (yyval.value) = (yyvsp[(2) - (2)].value) ? 0 : 1; ;} @@ -1632,7 +1638,7 @@ case 12: /* Line 1455 of yacc.c */ -#line 186 "cond.y" +#line 192 "cond.y" { (yyval.value) = (yyvsp[(1) - (1)].value) ? 1 : 0; ;} @@ -1641,17 +1647,17 @@ case 13: /* Line 1455 of yacc.c */ -#line 190 "cond.y" +#line 196 "cond.y" { (yyval.value) = ((yyvsp[(1) - (1)].string) && (yyvsp[(1) - (1)].string)[0]) ? 1 : 0; - msi_free((yyvsp[(1) - (1)].string)); + cond_free( (yyvsp[(1) - (1)].string) ); ;} break; case 14: /* Line 1455 of yacc.c */ -#line 195 "cond.y" +#line 201 "cond.y" { (yyval.value) = compare_int( (yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].value) ); ;} @@ -1660,35 +1666,35 @@ case 15: /* Line 1455 of yacc.c */ -#line 199 "cond.y" +#line 205 "cond.y" { int num; if (num_from_prop( (yyvsp[(1) - (3)].string), &num )) (yyval.value) = compare_int( num, (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].value) ); else (yyval.value) = ((yyvsp[(2) - (3)].value) == COND_NE || (yyvsp[(2) - (3)].value) == COND_INE ); - msi_free((yyvsp[(1) - (3)].string)); + cond_free( (yyvsp[(1) - (3)].string) ); ;} break; case 16: /* Line 1455 of yacc.c */ -#line 208 "cond.y" +#line 214 "cond.y" { int num; if (num_from_prop( (yyvsp[(3) - (3)].string), &num )) (yyval.value) = compare_int( (yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value), num ); else (yyval.value) = ((yyvsp[(2) - (3)].value) == COND_NE || (yyvsp[(2) - (3)].value) == COND_INE ); - msi_free((yyvsp[(3) - (3)].string)); + cond_free( (yyvsp[(3) - (3)].string) ); ;} break; case 17: /* Line 1455 of yacc.c */ -#line 217 "cond.y" +#line 223 "cond.y" { (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); ;} @@ -1697,7 +1703,7 @@ case 18: /* Line 1455 of yacc.c */ -#line 221 "cond.y" +#line 227 "cond.y" { (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); ;} @@ -1706,7 +1712,7 @@ case 19: /* Line 1455 of yacc.c */ -#line 225 "cond.y" +#line 231 "cond.y" { (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); ;} @@ -1715,7 +1721,7 @@ case 20: /* Line 1455 of yacc.c */ -#line 229 "cond.y" +#line 235 "cond.y" { (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), FALSE ); ;} @@ -1724,27 +1730,27 @@ case 21: /* Line 1455 of yacc.c */ -#line 233 "cond.y" +#line 239 "cond.y" { (yyval.value) = 0; - msi_free((yyvsp[(1) - (3)].string)); + cond_free( (yyvsp[(1) - (3)].string) ); ;} break; case 22: /* Line 1455 of yacc.c */ -#line 238 "cond.y" +#line 244 "cond.y" { (yyval.value) = 0; - msi_free((yyvsp[(3) - (3)].string)); + cond_free( (yyvsp[(3) - (3)].string) ); ;} break; case 23: /* Line 1455 of yacc.c */ -#line 243 "cond.y" +#line 249 "cond.y" { (yyval.value) = (yyvsp[(2) - (3)].value); ;} @@ -1753,133 +1759,133 @@ case 24: /* Line 1455 of yacc.c */ -#line 250 "cond.y" +#line 256 "cond.y" { (yyval.value) = COND_EQ; ;} break; case 25: /* Line 1455 of yacc.c */ -#line 251 "cond.y" +#line 257 "cond.y" { (yyval.value) = COND_NE; ;} break; case 26: /* Line 1455 of yacc.c */ -#line 252 "cond.y" +#line 258 "cond.y" { (yyval.value) = COND_LT; ;} break; case 27: /* Line 1455 of yacc.c */ -#line 253 "cond.y" +#line 259 "cond.y" { (yyval.value) = COND_GT; ;} break; case 28: /* Line 1455 of yacc.c */ -#line 254 "cond.y" +#line 260 "cond.y" { (yyval.value) = COND_LE; ;} break; case 29: /* Line 1455 of yacc.c */ -#line 255 "cond.y" +#line 261 "cond.y" { (yyval.value) = COND_GE; ;} break; case 30: /* Line 1455 of yacc.c */ -#line 256 "cond.y" +#line 262 "cond.y" { (yyval.value) = COND_SS; ;} break; case 31: /* Line 1455 of yacc.c */ -#line 257 "cond.y" +#line 263 "cond.y" { (yyval.value) = COND_IEQ; ;} break; case 32: /* Line 1455 of yacc.c */ -#line 258 "cond.y" +#line 264 "cond.y" { (yyval.value) = COND_INE; ;} break; case 33: /* Line 1455 of yacc.c */ -#line 259 "cond.y" +#line 265 "cond.y" { (yyval.value) = COND_ILT; ;} break; case 34: /* Line 1455 of yacc.c */ -#line 260 "cond.y" +#line 266 "cond.y" { (yyval.value) = COND_IGT; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 261 "cond.y" +#line 267 "cond.y" { (yyval.value) = COND_ILE; ;} break; case 36: /* Line 1455 of yacc.c */ -#line 262 "cond.y" +#line 268 "cond.y" { (yyval.value) = COND_IGE; ;} break; case 37: /* Line 1455 of yacc.c */ -#line 263 "cond.y" +#line 269 "cond.y" { (yyval.value) = COND_ISS; ;} break; case 38: /* Line 1455 of yacc.c */ -#line 264 "cond.y" +#line 270 "cond.y" { (yyval.value) = COND_LHS; ;} break; case 39: /* Line 1455 of yacc.c */ -#line 265 "cond.y" +#line 271 "cond.y" { (yyval.value) = COND_RHS; ;} break; case 40: /* Line 1455 of yacc.c */ -#line 266 "cond.y" +#line 272 "cond.y" { (yyval.value) = COND_ILHS; ;} break; case 41: /* Line 1455 of yacc.c */ -#line 267 "cond.y" +#line 273 "cond.y" { (yyval.value) = COND_IRHS; ;} break; case 42: /* Line 1455 of yacc.c */ -#line 272 "cond.y" +#line 278 "cond.y" { (yyval.string) = (yyvsp[(1) - (1)].string); ;} @@ -1888,7 +1894,7 @@ case 43: /* Line 1455 of yacc.c */ -#line 276 "cond.y" +#line 282 "cond.y" { (yyval.string) = (yyvsp[(1) - (1)].string); ;} @@ -1897,9 +1903,10 @@ case 44: /* Line 1455 of yacc.c */ -#line 283 "cond.y" - { - (yyval.string) = COND_GetLiteral(&(yyvsp[(1) - (1)].str)); +#line 289 "cond.y" + { + COND_input* cond = (COND_input*) info; + (yyval.string) = COND_GetLiteral( cond, &(yyvsp[(1) - (1)].str) ); if( !(yyval.string) ) YYABORT; ;} @@ -1908,7 +1915,7 @@ case 45: /* Line 1455 of yacc.c */ -#line 292 "cond.y" +#line 299 "cond.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} @@ -1917,35 +1924,35 @@ case 46: /* Line 1455 of yacc.c */ -#line 296 "cond.y" +#line 303 "cond.y" { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; MSI_GetComponentStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); (yyval.value) = action; - msi_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[(2) - (2)].string) ); ;} break; case 47: /* Line 1455 of yacc.c */ -#line 305 "cond.y" +#line 312 "cond.y" { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; MSI_GetComponentStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); (yyval.value) = install; - msi_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[(2) - (2)].string) ); ;} break; case 48: /* Line 1455 of yacc.c */ -#line 314 "cond.y" +#line 321 "cond.y" { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; @@ -1956,58 +1963,68 @@ else (yyval.value) = action; - msi_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[(2) - (2)].string) ); ;} break; case 49: /* Line 1455 of yacc.c */ -#line 327 "cond.y" +#line 334 "cond.y" { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; MSI_GetFeatureStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); (yyval.value) = install; - msi_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[(2) - (2)].string) ); ;} break; case 50: /* Line 1455 of yacc.c */ -#line 339 "cond.y" +#line 346 "cond.y" { COND_input* cond = (COND_input*) info; + UINT len; (yyval.string) = msi_dup_property( cond->package, (yyvsp[(1) - (1)].string) ); - msi_free( (yyvsp[(1) - (1)].string) ); + if ((yyval.string)) + { + len = (lstrlenW((yyval.string)) + 1) * sizeof (WCHAR); + (yyval.string) = cond_track_mem( cond, (yyval.string), len ); + } + cond_free( (yyvsp[(1) - (1)].string) ); ;} break; case 51: /* Line 1455 of yacc.c */ -#line 346 "cond.y" - { +#line 359 "cond.y" + { + COND_input* cond = (COND_input*) info; UINT len = GetEnvironmentVariableW( (yyvsp[(2) - (2)].string), NULL, 0 ); (yyval.string) = NULL; if (len++) { - (yyval.string) = msi_alloc( len*sizeof (WCHAR) ); + (yyval.string) = cond_alloc( cond, len*sizeof (WCHAR) ); + if( !(yyval.string) ) + YYABORT; GetEnvironmentVariableW( (yyvsp[(2) - (2)].string), (yyval.string), len ); } - msi_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[(2) - (2)].string) ); ;} break; case 52: /* Line 1455 of yacc.c */ -#line 360 "cond.y" - { - (yyval.string) = COND_GetString(&(yyvsp[(1) - (1)].str)); +#line 376 "cond.y" + { + COND_input* cond = (COND_input*) info; + (yyval.string) = COND_GetString( cond, &(yyvsp[(1) - (1)].str) ); if( !(yyval.string) ) YYABORT; ;} @@ -2016,20 +2033,21 @@ case 53: /* Line 1455 of yacc.c */ -#line 369 "cond.y" - { - LPWSTR szNum = COND_GetString(&(yyvsp[(1) - (1)].str)); +#line 386 "cond.y" + { + COND_input* cond = (COND_input*) info; + LPWSTR szNum = COND_GetString( cond, &(yyvsp[(1) - (1)].str) ); if( !szNum ) YYABORT; (yyval.value) = atoiW( szNum ); - msi_free( szNum ); - ;} - break; - - - -/* Line 1455 of yacc.c */ -#line 2033 "cond.tab.c" + cond_free( szNum ); + ;} + break; + + + +/* Line 1455 of yacc.c */ +#line 2051 "cond.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2241,7 +2259,7 @@ /* Line 1675 of yacc.c */ -#line 378 "cond.y" +#line 396 "cond.y" @@ -2558,11 +2576,11 @@ return rc; } -static LPWSTR COND_GetString( const struct cond_str *str ) +static LPWSTR COND_GetString( COND_input *cond, const struct cond_str *str ) { LPWSTR ret; - ret = msi_alloc( (str->len+1) * sizeof (WCHAR) ); + ret = cond_alloc( cond, (str->len+1) * sizeof (WCHAR) ); if( ret ) { memcpy( ret, str->data, str->len * sizeof(WCHAR)); @@ -2572,11 +2590,11 @@ return ret; } -static LPWSTR COND_GetLiteral( const struct cond_str *str ) +static LPWSTR COND_GetLiteral( COND_input *cond, const struct cond_str *str ) { LPWSTR ret; - ret = msi_alloc( (str->len-1) * sizeof (WCHAR) ); + ret = cond_alloc( cond, (str->len-1) * sizeof (WCHAR) ); if( ret ) { memcpy( ret, str->data+1, (str->len-2) * sizeof(WCHAR) ); @@ -2586,6 +2604,48 @@ return ret; } +static void *cond_alloc( COND_input *cond, unsigned int sz ) +{ + struct list *mem; + + mem = msi_alloc( sizeof (struct list) + sz ); + if( !mem ) + return NULL; + + list_add_head( &(cond->mem), mem ); + return mem + 1; +} + +static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz ) +{ + void *new_ptr; + + if( !ptr ) + return ptr; + + new_ptr = cond_alloc( cond, sz ); + if( !new_ptr ) + { + msi_free( ptr ); + return NULL; + } + + memcpy( new_ptr, ptr, sz ); + msi_free( ptr ); + return new_ptr; +} + +static void cond_free( void *ptr ) +{ + struct list *mem = (struct list *)ptr - 1; + + if( ptr ) + { + list_remove( mem ); + msi_free( mem ); + } +} + static int cond_error(const char *str) { TRACE("%s\n", str ); @@ -2596,6 +2656,7 @@ { COND_input cond; MSICONDITION r; + struct list *mem, *safety; TRACE("%s\n", debugstr_w( szCondition ) ); @@ -2606,11 +2667,22 @@ cond.str = szCondition; cond.n = 0; cond.result = MSICONDITION_ERROR; - + + list_init( &cond.mem ); + if ( !cond_parse( &cond ) ) r = cond.result; else r = MSICONDITION_ERROR; + + LIST_FOR_EACH_SAFE( mem, safety, &cond.mem ) + { + /* The tracked memory lives directly after the list struct */ + void *ptr = mem + 1; + if ( r != MSICONDITION_ERROR ) + WARN( "condition parser failed to free up some memory: %p\n", ptr ); + cond_free( ptr ); + } TRACE("%i <- %s\n", r, debugstr_w(szCondition)); return r; Modified: trunk/reactos/dll/win32/msi/cond.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/cond.tab.h?r…
============================================================================== --- trunk/reactos/dll/win32/msi/cond.tab.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/cond.tab.h [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -87,7 +87,7 @@ { /* Line 1676 of yacc.c */ -#line 110 "cond.y" +#line 116 "cond.y" struct cond_str str; LPWSTR string; Modified: trunk/reactos/dll/win32/msi/cond.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/cond.y?rev=4…
============================================================================== --- trunk/reactos/dll/win32/msi/cond.y [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/cond.y [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -40,6 +40,7 @@ #include "msiserver.h" #include "wine/debug.h" #include "wine/unicode.h" +#include "wine/list.h" #define YYLEX_PARAM info #define YYPARSE_PARAM info @@ -54,6 +55,7 @@ LPCWSTR str; INT n; MSICONDITION result; + struct list mem; } COND_input; struct cond_str { @@ -61,9 +63,13 @@ INT len; }; -static LPWSTR COND_GetString( const struct cond_str *str ); -static LPWSTR COND_GetLiteral( const struct cond_str *str ); +static LPWSTR COND_GetString( COND_input *info, const struct cond_str *str ); +static LPWSTR COND_GetLiteral( COND_input *info, const struct cond_str *str ); static int cond_lex( void *COND_lval, COND_input *info); + +static void *cond_alloc( COND_input *cond, unsigned int sz ); +static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz ); +static void cond_free( void *ptr ); static INT compare_int( INT a, INT operator, INT b ); static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert ); @@ -73,8 +79,8 @@ INT r; r = compare_string( a, op, b, convert ); - msi_free( a ); - msi_free( b ); + cond_free( a ); + cond_free( b ); return r; } @@ -189,7 +195,7 @@ | value_s { $$ = ($1 && $1[0]) ? 1 : 0; - msi_free($1); + cond_free( $1 ); } | value_i operator value_i { @@ -202,7 +208,7 @@ $$ = compare_int( num, $2, $3 ); else $$ = ($2 == COND_NE || $2 == COND_INE ); - msi_free($1); + cond_free( $1 ); } | value_i operator symbol_s { @@ -211,7 +217,7 @@ $$ = compare_int( $1, $2, num ); else $$ = ($2 == COND_NE || $2 == COND_INE ); - msi_free($3); + cond_free( $3 ); } | symbol_s operator symbol_s { @@ -232,12 +238,12 @@ | literal operator value_i { $$ = 0; - msi_free($1); + cond_free( $1 ); } | value_i operator literal { $$ = 0; - msi_free($3); + cond_free( $3 ); } | COND_LPAR expression COND_RPAR { @@ -281,7 +287,8 @@ literal: COND_LITER { - $$ = COND_GetLiteral(&$1); + COND_input* cond = (COND_input*) info; + $$ = COND_GetLiteral( cond, &$1 ); if( !$$ ) YYABORT; } @@ -299,7 +306,7 @@ MSI_GetComponentStateW(cond->package, $2, &install, &action ); $$ = action; - msi_free( $2 ); + cond_free( $2 ); } | COND_QUESTION identifier { @@ -308,7 +315,7 @@ MSI_GetComponentStateW(cond->package, $2, &install, &action ); $$ = install; - msi_free( $2 ); + cond_free( $2 ); } | COND_AMPER identifier { @@ -321,7 +328,7 @@ else $$ = action; - msi_free( $2 ); + cond_free( $2 ); } | COND_EXCLAM identifier { @@ -330,7 +337,7 @@ MSI_GetFeatureStateW(cond->package, $2, &install, &action ); $$ = install; - msi_free( $2 ); + cond_free( $2 ); } ; @@ -338,27 +345,37 @@ identifier { COND_input* cond = (COND_input*) info; + UINT len; $$ = msi_dup_property( cond->package, $1 ); - msi_free( $1 ); + if ($$) + { + len = (lstrlenW($$) + 1) * sizeof (WCHAR); + $$ = cond_track_mem( cond, $$, len ); + } + cond_free( $1 ); } | COND_PERCENT identifier { + COND_input* cond = (COND_input*) info; UINT len = GetEnvironmentVariableW( $2, NULL, 0 ); $$ = NULL; if (len++) { - $$ = msi_alloc( len*sizeof (WCHAR) ); + $$ = cond_alloc( cond, len*sizeof (WCHAR) ); + if( !$$ ) + YYABORT; GetEnvironmentVariableW( $2, $$, len ); } - msi_free( $2 ); + cond_free( $2 ); } ; identifier: COND_IDENT { - $$ = COND_GetString(&$1); + COND_input* cond = (COND_input*) info; + $$ = COND_GetString( cond, &$1 ); if( !$$ ) YYABORT; } @@ -367,11 +384,12 @@ integer: COND_NUMBER { - LPWSTR szNum = COND_GetString(&$1); + COND_input* cond = (COND_input*) info; + LPWSTR szNum = COND_GetString( cond, &$1 ); if( !szNum ) YYABORT; $$ = atoiW( szNum ); - msi_free( szNum ); + cond_free( szNum ); } ; @@ -691,11 +709,11 @@ return rc; } -static LPWSTR COND_GetString( const struct cond_str *str ) +static LPWSTR COND_GetString( COND_input *cond, const struct cond_str *str ) { LPWSTR ret; - ret = msi_alloc( (str->len+1) * sizeof (WCHAR) ); + ret = cond_alloc( cond, (str->len+1) * sizeof (WCHAR) ); if( ret ) { memcpy( ret, str->data, str->len * sizeof(WCHAR)); @@ -705,11 +723,11 @@ return ret; } -static LPWSTR COND_GetLiteral( const struct cond_str *str ) +static LPWSTR COND_GetLiteral( COND_input *cond, const struct cond_str *str ) { LPWSTR ret; - ret = msi_alloc( (str->len-1) * sizeof (WCHAR) ); + ret = cond_alloc( cond, (str->len-1) * sizeof (WCHAR) ); if( ret ) { memcpy( ret, str->data+1, (str->len-2) * sizeof(WCHAR) ); @@ -719,6 +737,48 @@ return ret; } +static void *cond_alloc( COND_input *cond, unsigned int sz ) +{ + struct list *mem; + + mem = msi_alloc( sizeof (struct list) + sz ); + if( !mem ) + return NULL; + + list_add_head( &(cond->mem), mem ); + return mem + 1; +} + +static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz ) +{ + void *new_ptr; + + if( !ptr ) + return ptr; + + new_ptr = cond_alloc( cond, sz ); + if( !new_ptr ) + { + msi_free( ptr ); + return NULL; + } + + memcpy( new_ptr, ptr, sz ); + msi_free( ptr ); + return new_ptr; +} + +static void cond_free( void *ptr ) +{ + struct list *mem = (struct list *)ptr - 1; + + if( ptr ) + { + list_remove( mem ); + msi_free( mem ); + } +} + static int cond_error(const char *str) { TRACE("%s\n", str ); @@ -729,6 +789,7 @@ { COND_input cond; MSICONDITION r; + struct list *mem, *safety; TRACE("%s\n", debugstr_w( szCondition ) ); @@ -739,12 +800,23 @@ cond.str = szCondition; cond.n = 0; cond.result = MSICONDITION_ERROR; - + + list_init( &cond.mem ); + if ( !cond_parse( &cond ) ) r = cond.result; else r = MSICONDITION_ERROR; + LIST_FOR_EACH_SAFE( mem, safety, &cond.mem ) + { + /* The tracked memory lives directly after the list struct */ + void *ptr = mem + 1; + if ( r != MSICONDITION_ERROR ) + WARN( "condition parser failed to free up some memory: %p\n", ptr ); + cond_free( ptr ); + } + TRACE("%i <- %s\n", r, debugstr_w(szCondition)); return r; } Modified: trunk/reactos/dll/win32/msi/custom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/custom.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/custom.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/custom.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -647,6 +647,28 @@ return ERROR_SUCCESS; } +#ifdef __i386__ +extern UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle ); +__ASM_GLOBAL_FUNC( CUSTOMPROC_wrapper, + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl 12(%ebp)\n\t" + "movl 8(%ebp),%eax\n\t" + "call *%eax\n\t" + "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret" ) +#else +static inline UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle ) +{ + return proc(handle); +} +#endif + static DWORD ACTION_CallDllFunction( const GUID *guid ) { MsiCustomActionEntryPoint fn; @@ -685,7 +707,7 @@ __TRY { - r = fn( hPackage ); + r = CUSTOMPROC_wrapper( fn, hPackage ); } __EXCEPT_PAGE_FAULT { Modified: trunk/reactos/dll/win32/msi/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/database.c?r…
============================================================================== --- trunk/reactos/dll/win32/msi/database.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/database.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -51,6 +51,8 @@ * Any binary data in a table is a reference to a stream. */ +#define IS_INTMSIDBOPEN(x) (((ULONG_PTR)(x) >> 16) == 0) + typedef struct tagMSITRANSFORM { struct list entry; IStorage *stg; @@ -306,7 +308,7 @@ save_path = szDBPath; szMode = szPersist; - if( HIWORD( szPersist ) ) + if( !IS_INTMSIDBOPEN(szPersist) ) { if (!CopyFileW( szDBPath, szPersist, FALSE )) return ERROR_OPEN_FAILED; @@ -459,7 +461,7 @@ goto end; } - if( HIWORD(szPersist) ) + if( !IS_INTMSIDBOPEN(szPersist) ) { szwPersist = strdupAtoW( szPersist ); if( !szwPersist ) @@ -471,7 +473,7 @@ r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB ); end: - if( HIWORD(szPersist) ) + if( !IS_INTMSIDBOPEN(szPersist) ) msi_free( szwPersist ); msi_free( szwDBPath ); Modified: trunk/reactos/dll/win32/msi/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/dialog.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -166,6 +166,8 @@ #define WM_MSI_DIALOG_CREATE (WM_USER+0x100) #define WM_MSI_DIALOG_DESTROY (WM_USER+0x101) +#define USER_INSTALLSTATE_ALL 0x1000 + static DWORD uiThreadId; static HWND hMsiHiddenWindow; @@ -1876,7 +1878,7 @@ /* FIXME: load strings from resources */ AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_LOCAL, "Install feature locally"); - AppendMenuA( hMenu, MF_GRAYED, 0x1000, "Install entire feature"); + AppendMenuA( hMenu, MF_ENABLED, USER_INSTALLSTATE_ALL, "Install entire feature"); AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ADVERTISED, "Install on demand"); AppendMenuA( hMenu, MF_ENABLED, INSTALLSTATE_ABSENT, "Don't install"); r = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, @@ -1897,6 +1899,37 @@ SendMessageW( hwnd, TVM_GETITEMW, 0, (LPARAM) &tvi ); return (MSIFEATURE*) tvi.lParam; +} + +static void +msi_seltree_update_feature_installstate( HWND hwnd, HTREEITEM hItem, + MSIPACKAGE *package, MSIFEATURE *feature, INSTALLSTATE state ) +{ + msi_feature_set_state( package, feature, state ); + msi_seltree_sync_item_state( hwnd, feature, hItem ); + ACTION_UpdateComponentStates( package, feature->Feature ); +} + +static void +msi_seltree_update_siblings_and_children_installstate( HWND hwnd, HTREEITEM curr, + MSIPACKAGE *package, INSTALLSTATE state) +{ + /* update all siblings */ + do + { + MSIFEATURE *feature; + HTREEITEM child; + + feature = msi_seltree_feature_from_item( hwnd, curr ); + msi_seltree_update_feature_installstate( hwnd, curr, package, feature, state ); + + /* update this sibling's children */ + child = (HTREEITEM)SendMessageW( hwnd, TVM_GETNEXTITEM, (WPARAM)TVGN_CHILD, (LPARAM)curr ); + if (child) + msi_seltree_update_siblings_and_children_installstate( hwnd, child, + package, state ); + } + while ((curr = (HTREEITEM)SendMessageW( hwnd, TVM_GETNEXTITEM, (WPARAM)TVGN_NEXT, (LPARAM)curr ))); } static LRESULT @@ -1931,18 +1964,22 @@ switch (r) { - case INSTALLSTATE_LOCAL: + case USER_INSTALLSTATE_ALL: + r = INSTALLSTATE_LOCAL; + /* fall-through */ case INSTALLSTATE_ADVERTISED: case INSTALLSTATE_ABSENT: - msi_feature_set_state(package, feature, r); + { + HTREEITEM child; + child = (HTREEITEM)SendMessageW( hwnd, TVM_GETNEXTITEM, (WPARAM)TVGN_CHILD, (LPARAM)hItem ); + if (child) + msi_seltree_update_siblings_and_children_installstate( hwnd, child, package, r ); + } + /* fall-through */ + case INSTALLSTATE_LOCAL: + msi_seltree_update_feature_installstate( hwnd, hItem, package, feature, r ); break; - default: - FIXME("select feature and all children\n"); - } - - /* update */ - msi_seltree_sync_item_state( hwnd, feature, hItem ); - ACTION_UpdateComponentStates( package, feature->Feature ); + } return 0; } Modified: trunk/reactos/dll/win32/msi/events.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/events.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/events.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/events.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -383,6 +383,28 @@ return MSI_SetPropertyW( package, szReinstallMode, argument ); } +static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument, + msi_dialog *dialog) +{ + static const WCHAR szProductID[] = {'P','r','o','d','u','c','t','I','D',0}; + static const WCHAR szPIDTemplate[] = {'P','I','D','T','e','m','p','l','a','t','e',0}; + static const WCHAR szPIDKEY[] = {'P','I','D','K','E','Y',0}; + LPWSTR key, template; + UINT ret = ERROR_SUCCESS; + + template = msi_dup_property( package, szPIDTemplate ); + key = msi_dup_property( package, szPIDKEY ); + + if (key && template) + { + FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) ); + ret = MSI_SetPropertyW( package, szProductID, key ); + } + msi_free( template ); + msi_free( key ); + return ret; +} + static const struct _events Events[] = { { "EndDialog",ControlEvent_EndDialog }, { "NewDialog",ControlEvent_NewDialog }, @@ -398,6 +420,7 @@ { "DirectoryListUp",ControlEvent_DirectoryListUp }, { "SelectionBrowse",ControlEvent_SpawnDialog }, { "ReinstallMode",ControlEvent_ReinstallMode }, + { "ValidateProductID",ControlEvent_ValidateProductID }, { NULL,NULL }, }; Modified: trunk/reactos/dll/win32/msi/files.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/files.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/msi/files.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/files.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -365,7 +365,8 @@ debugstr_w(component)); /* the action taken was the same as the current install state */ - comp->Action = comp->Installed; + if (comp) + comp->Action = comp->Installed; return ERROR_SUCCESS; } Modified: trunk/reactos/dll/win32/msi/helpers.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/helpers.c?re…
============================================================================== --- trunk/reactos/dll/win32/msi/helpers.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/helpers.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -438,238 +438,6 @@ msi_free(package->script->Actions[script]); package->script->Actions[script] = NULL; package->script->ActionCount[script] = 0; -} - -static void remove_tracked_tempfiles(MSIPACKAGE* package) -{ - struct list *item, *cursor; - - LIST_FOR_EACH_SAFE( item, cursor, &package->tempfiles ) - { - MSITEMPFILE *temp = LIST_ENTRY( item, MSITEMPFILE, entry ); - - list_remove( &temp->entry ); - TRACE("deleting temp file %s\n", debugstr_w( temp->Path )); - if (!DeleteFileW( temp->Path )) - ERR("failed to delete %s\n", debugstr_w( temp->Path )); - msi_free( temp->Path ); - msi_free( temp ); - } -} - -static void free_feature( MSIFEATURE *feature ) -{ - struct list *item, *cursor; - - LIST_FOR_EACH_SAFE( item, cursor, &feature->Children ) - { - FeatureList *fl = LIST_ENTRY( item, FeatureList, entry ); - list_remove( &fl->entry ); - msi_free( fl ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &feature->Components ) - { - ComponentList *cl = LIST_ENTRY( item, ComponentList, entry ); - list_remove( &cl->entry ); - msi_free( cl ); - } - msi_free( feature->Feature ); - msi_free( feature->Feature_Parent ); - msi_free( feature->Directory ); - msi_free( feature->Description ); - msi_free( feature->Title ); - msi_free( feature ); -} - -static void free_extension( MSIEXTENSION *ext ) -{ - struct list *item, *cursor; - - LIST_FOR_EACH_SAFE( item, cursor, &ext->verbs ) - { - MSIVERB *verb = LIST_ENTRY( item, MSIVERB, entry ); - - list_remove( &verb->entry ); - msi_free( verb->Verb ); - msi_free( verb->Command ); - msi_free( verb->Argument ); - msi_free( verb ); - } - - msi_free( ext->Extension ); - msi_free( ext->ProgIDText ); - msi_free( ext ); -} - -/* Called when the package is being closed */ -void ACTION_free_package_structures( MSIPACKAGE* package) -{ - INT i; - struct list *item, *cursor; - - TRACE("Freeing package action data\n"); - - remove_tracked_tempfiles(package); - - LIST_FOR_EACH_SAFE( item, cursor, &package->features ) - { - MSIFEATURE *feature = LIST_ENTRY( item, MSIFEATURE, entry ); - list_remove( &feature->entry ); - free_feature( feature ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->folders ) - { - MSIFOLDER *folder = LIST_ENTRY( item, MSIFOLDER, entry ); - - list_remove( &folder->entry ); - msi_free( folder->Parent ); - msi_free( folder->Directory ); - msi_free( folder->TargetDefault ); - msi_free( folder->SourceLongPath ); - msi_free( folder->SourceShortPath ); - msi_free( folder->ResolvedTarget ); - msi_free( folder->ResolvedSource ); - msi_free( folder->Property ); - msi_free( folder ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->components ) - { - MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry ); - - list_remove( &comp->entry ); - msi_free( comp->Component ); - msi_free( comp->ComponentId ); - msi_free( comp->Directory ); - msi_free( comp->Condition ); - msi_free( comp->KeyPath ); - msi_free( comp->FullKeypath ); - msi_free( comp ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->files ) - { - MSIFILE *file = LIST_ENTRY( item, MSIFILE, entry ); - - list_remove( &file->entry ); - msi_free( file->File ); - msi_free( file->FileName ); - msi_free( file->ShortName ); - msi_free( file->LongName ); - msi_free( file->Version ); - msi_free( file->Language ); - msi_free( file->TargetPath ); - msi_free( file ); - } - - /* clean up extension, progid, class and verb structures */ - LIST_FOR_EACH_SAFE( item, cursor, &package->classes ) - { - MSICLASS *cls = LIST_ENTRY( item, MSICLASS, entry ); - - list_remove( &cls->entry ); - msi_free( cls->clsid ); - msi_free( cls->Context ); - msi_free( cls->Description ); - msi_free( cls->FileTypeMask ); - msi_free( cls->IconPath ); - msi_free( cls->DefInprocHandler ); - msi_free( cls->DefInprocHandler32 ); - msi_free( cls->Argument ); - msi_free( cls->ProgIDText ); - msi_free( cls ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->extensions ) - { - MSIEXTENSION *ext = LIST_ENTRY( item, MSIEXTENSION, entry ); - - list_remove( &ext->entry ); - free_extension( ext ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->progids ) - { - MSIPROGID *progid = LIST_ENTRY( item, MSIPROGID, entry ); - - list_remove( &progid->entry ); - msi_free( progid->ProgID ); - msi_free( progid->Description ); - msi_free( progid->IconPath ); - msi_free( progid ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->mimes ) - { - MSIMIME *mt = LIST_ENTRY( item, MSIMIME, entry ); - - list_remove( &mt->entry ); - msi_free( mt->clsid ); - msi_free( mt->ContentType ); - msi_free( mt ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->appids ) - { - MSIAPPID *appid = LIST_ENTRY( item, MSIAPPID, entry ); - - list_remove( &appid->entry ); - msi_free( appid->AppID ); - msi_free( appid->RemoteServerName ); - msi_free( appid->LocalServer ); - msi_free( appid->ServiceParameters ); - msi_free( appid->DllSurrogate ); - msi_free( appid ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->sourcelist_info ) - { - MSISOURCELISTINFO *info = LIST_ENTRY( item, MSISOURCELISTINFO, entry ); - - list_remove( &info->entry ); - msi_free( info->value ); - msi_free( info ); - } - - LIST_FOR_EACH_SAFE( item, cursor, &package->sourcelist_media ) - { - MSIMEDIADISK *info = LIST_ENTRY( item, MSIMEDIADISK, entry ); - - list_remove( &info->entry ); - msi_free( info->volume_label ); - msi_free( info->disk_prompt ); - msi_free( info ); - } - - if (package->script) - { - for (i = 0; i < TOTAL_SCRIPTS; i++) - msi_free_action_script(package, i); - - for (i = 0; i < package->script->UniqueActionsCount; i++) - msi_free(package->script->UniqueActions[i]); - - msi_free(package->script->UniqueActions); - msi_free(package->script); - } - - if (package->patch) - { - msi_free(package->patch->patchcode); - msi_free(package->patch->transforms); - msi_free(package->patch); - } - - msi_free(package->BaseURL); - msi_free(package->PackagePath); - msi_free(package->ProductCode); - msi_free(package->ActionFormat); - msi_free(package->LastAction); - - /* cleanup control event subscriptions */ - ControlEvent_CleanupSubscriptions(package); } /* Modified: trunk/reactos/dll/win32/msi/join.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/join.c?rev=4…
============================================================================== --- trunk/reactos/dll/win32/msi/join.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/join.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -117,8 +117,11 @@ static UINT JOIN_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec ) { - FIXME("(%p, %d, %p): stub!\n", view, row, rec); - return ERROR_FUNCTION_FAILED; + MSIJOINVIEW *jv = (MSIJOINVIEW*)view; + + TRACE("%p %d %p\n", jv, row, rec); + + return msi_view_get_row( jv->db, view, row, rec ); } static UINT JOIN_execute( struct tagMSIVIEW *view, MSIRECORD *record ) @@ -219,11 +222,117 @@ return ERROR_FUNCTION_FAILED; } -static UINT JOIN_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode, - MSIRECORD *rec, UINT row ) -{ - TRACE("%p %d %p\n", view, eModifyMode, rec); +static UINT join_find_row( MSIJOINVIEW *jv, MSIRECORD *rec, UINT *row ) +{ + LPCWSTR str; + UINT i, id, data; + + str = MSI_RecordGetString( rec, 1 ); + msi_string2idW( jv->db->strings, str, &id ); + + for (i = 0; i < jv->rows; i++) + { + JOIN_fetch_int( &jv->view, i, 1, &data ); + + if (data == id) + { + *row = i; + return ERROR_SUCCESS; + } + } + return ERROR_FUNCTION_FAILED; +} + +static UINT JOIN_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask ) +{ + MSIJOINVIEW *jv = (MSIJOINVIEW*)view; + JOINTABLE *table; + UINT i, reduced_mask = 0, r = ERROR_SUCCESS, offset = 0, col_count; + MSIRECORD *reduced; + + TRACE("%p %d %p %u %08x\n", jv, row, rec, rec->count, mask ); + + if (mask >= 1 << jv->columns) + return ERROR_INVALID_PARAMETER; + + LIST_FOR_EACH_ENTRY(table, &jv->tables, JOINTABLE, entry) + { + r = table->view->ops->get_dimensions( table->view, NULL, &col_count ); + if (r != ERROR_SUCCESS) + return r; + + reduced = MSI_CreateRecord( col_count ); + if (!reduced) + return ERROR_FUNCTION_FAILED; + + for (i = 0; i < col_count; i++) + { + r = MSI_RecordCopyField( rec, i + offset + 1, reduced, i + 1 ); + if (r != ERROR_SUCCESS) + break; + } + + offset += col_count; + reduced_mask = mask >> (jv->columns - offset) & ((1 << col_count) - 1); + + if (r == ERROR_SUCCESS) + r = table->view->ops->set_row( table->view, row, reduced, reduced_mask ); + + msiobj_release( &reduced->hdr ); + } + + return r; +} + +static UINT join_modify_update( struct tagMSIVIEW *view, MSIRECORD *rec ) +{ + MSIJOINVIEW *jv = (MSIJOINVIEW *)view; + UINT r, row; + + r = join_find_row( jv, rec, &row ); + if (r != ERROR_SUCCESS) + return r; + + return JOIN_set_row( view, row, rec, (1 << jv->columns) - 1 ); +} + +static UINT JOIN_modify( struct tagMSIVIEW *view, MSIMODIFY mode, MSIRECORD *rec, UINT row ) +{ + UINT r; + + TRACE("%p %d %p %u\n", view, mode, rec, row); + + switch (mode) + { + case MSIMODIFY_UPDATE: + return join_modify_update( view, rec ); + + case MSIMODIFY_ASSIGN: + case MSIMODIFY_DELETE: + case MSIMODIFY_INSERT: + case MSIMODIFY_INSERT_TEMPORARY: + case MSIMODIFY_MERGE: + case MSIMODIFY_REPLACE: + case MSIMODIFY_SEEK: + case MSIMODIFY_VALIDATE: + case MSIMODIFY_VALIDATE_DELETE: + case MSIMODIFY_VALIDATE_FIELD: + case MSIMODIFY_VALIDATE_NEW: + r = ERROR_FUNCTION_FAILED; + break; + + case MSIMODIFY_REFRESH: + r = ERROR_CALL_NOT_IMPLEMENTED; + break; + + default: + WARN("%p %d %p %u - unknown mode\n", view, mode, rec, row ); + r = ERROR_INVALID_PARAMETER; + break; + } + + return r; } static UINT JOIN_delete( struct tagMSIVIEW *view ) @@ -259,7 +368,7 @@ if (col == 0 || col > jv->columns) return ERROR_INVALID_PARAMETER; - for (i = (UINT)*handle; i < jv->rows; i++) + for (i = PtrToUlong(*handle); i < jv->rows; i++) { if (view->ops->fetch_int( view, i, col, &row_value ) != ERROR_SUCCESS) continue; Modified: trunk/reactos/dll/win32/msi/msi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.rc?rev=4…
============================================================================== --- trunk/reactos/dll/win32/msi/msi.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.rc [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -48,6 +48,7 @@ #include "msi_Si.rc" #include "msi_Sv.rc" #include "msi_Tr.rc" +#include "msi_Uk.rc" #include "msi_Zh.rc" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL Added: trunk/reactos/dll/win32/msi/msi_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi_Uk.rc?re…
============================================================================== --- trunk/reactos/dll/win32/msi/msi_Uk.rc (added) +++ trunk/reactos/dll/win32/msi/msi_Uk.rc [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -1,0 +1,41 @@ +/* + * Ukrainian resources for MSI + * + * Copyright 2005 Mike McCormack + * Copyright 2007 Artem Reznikov + * Copyright 2010 Igor Paliychuk + * + * 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 + */ + +#include "windef.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + 4 "Ðе вдалоÑÑ Ð²ÑдкÑиÑи вказаний Ð¿Ð°ÐºÐµÑ ÑнÑÑалÑÑÑÑ. ÐеÑевÑÑÑе ÑлÑÑ Ð´Ð¾ ÑÐ°Ð¹Ð»Ñ Ñа ÑпÑобÑйÑе знов." + 5 "ÑлÑÑ %s не знайдено" + 9 "вÑÑавÑе диÑк %s" + 10 "невÑÑÐ½Ñ Ð¿Ð°ÑамеÑÑи" + 11 "вкажÑÑÑ Ð¿Ð°Ð¿ÐºÑ, Ñо мÑÑÑиÑÑ %s" + 12 "джеÑело вÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¾Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑÑ Ð½Ðµ вказане" + 13 "меÑежевий диÑк Ð´Ð»Ñ Ð´Ð°Ð½Ð¾Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾ÑÑÑ Ð½Ðµ вказаний" + 14 "можливÑÑÑÑ Ð·:" + 15 "вибеÑÑÑÑ Ð¿Ð°Ð¿ÐºÑ, Ñо мÑÑÑиÑÑ %s" +} Propchange: trunk/reactos/dll/win32/msi/msi_Uk.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/msi/msipriv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msipriv.h?re…
============================================================================== --- trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -689,7 +689,6 @@ /* action internals */ extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR ); -extern void ACTION_free_package_structures( MSIPACKAGE* ); extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR); extern UINT ACTION_ForceReboot(MSIPACKAGE *package); extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode ); Modified: trunk/reactos/dll/win32/msi/msiquery.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msiquery.c?r…
============================================================================== --- trunk/reactos/dll/win32/msi/msiquery.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msiquery.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -831,7 +831,7 @@ return ERROR_INVALID_HANDLE; IWineMsiRemoteDatabase_Release( remote_database ); - WARN("MsiDatabaseCommit not allowed during a custom action!\n"); + WARN("not allowed during a custom action!\n"); return ERROR_SUCCESS; } Modified: trunk/reactos/dll/win32/msi/package.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/package.c?re…
============================================================================== --- trunk/reactos/dll/win32/msi/package.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/package.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -49,6 +49,237 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi); +static void remove_tracked_tempfiles( MSIPACKAGE *package ) +{ + struct list *item, *cursor; + + LIST_FOR_EACH_SAFE( item, cursor, &package->tempfiles ) + { + MSITEMPFILE *temp = LIST_ENTRY( item, MSITEMPFILE, entry ); + + list_remove( &temp->entry ); + TRACE("deleting temp file %s\n", debugstr_w( temp->Path )); + if (!DeleteFileW( temp->Path )) + ERR("failed to delete %s\n", debugstr_w( temp->Path )); + msi_free( temp->Path ); + msi_free( temp ); + } +} + +static void free_feature( MSIFEATURE *feature ) +{ + struct list *item, *cursor; + + LIST_FOR_EACH_SAFE( item, cursor, &feature->Children ) + { + FeatureList *fl = LIST_ENTRY( item, FeatureList, entry ); + list_remove( &fl->entry ); + msi_free( fl ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &feature->Components ) + { + ComponentList *cl = LIST_ENTRY( item, ComponentList, entry ); + list_remove( &cl->entry ); + msi_free( cl ); + } + msi_free( feature->Feature ); + msi_free( feature->Feature_Parent ); + msi_free( feature->Directory ); + msi_free( feature->Description ); + msi_free( feature->Title ); + msi_free( feature ); +} + +static void free_extension( MSIEXTENSION *ext ) +{ + struct list *item, *cursor; + + LIST_FOR_EACH_SAFE( item, cursor, &ext->verbs ) + { + MSIVERB *verb = LIST_ENTRY( item, MSIVERB, entry ); + + list_remove( &verb->entry ); + msi_free( verb->Verb ); + msi_free( verb->Command ); + msi_free( verb->Argument ); + msi_free( verb ); + } + + msi_free( ext->Extension ); + msi_free( ext->ProgIDText ); + msi_free( ext ); +} + +static void free_package_structures( MSIPACKAGE *package ) +{ + INT i; + struct list *item, *cursor; + + TRACE("Freeing package action data\n"); + + remove_tracked_tempfiles(package); + + LIST_FOR_EACH_SAFE( item, cursor, &package->features ) + { + MSIFEATURE *feature = LIST_ENTRY( item, MSIFEATURE, entry ); + list_remove( &feature->entry ); + free_feature( feature ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->folders ) + { + MSIFOLDER *folder = LIST_ENTRY( item, MSIFOLDER, entry ); + + list_remove( &folder->entry ); + msi_free( folder->Parent ); + msi_free( folder->Directory ); + msi_free( folder->TargetDefault ); + msi_free( folder->SourceLongPath ); + msi_free( folder->SourceShortPath ); + msi_free( folder->ResolvedTarget ); + msi_free( folder->ResolvedSource ); + msi_free( folder->Property ); + msi_free( folder ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->components ) + { + MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry ); + + list_remove( &comp->entry ); + msi_free( comp->Component ); + msi_free( comp->ComponentId ); + msi_free( comp->Directory ); + msi_free( comp->Condition ); + msi_free( comp->KeyPath ); + msi_free( comp->FullKeypath ); + msi_free( comp ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->files ) + { + MSIFILE *file = LIST_ENTRY( item, MSIFILE, entry ); + + list_remove( &file->entry ); + msi_free( file->File ); + msi_free( file->FileName ); + msi_free( file->ShortName ); + msi_free( file->LongName ); + msi_free( file->Version ); + msi_free( file->Language ); + msi_free( file->TargetPath ); + msi_free( file ); + } + + /* clean up extension, progid, class and verb structures */ + LIST_FOR_EACH_SAFE( item, cursor, &package->classes ) + { + MSICLASS *cls = LIST_ENTRY( item, MSICLASS, entry ); + + list_remove( &cls->entry ); + msi_free( cls->clsid ); + msi_free( cls->Context ); + msi_free( cls->Description ); + msi_free( cls->FileTypeMask ); + msi_free( cls->IconPath ); + msi_free( cls->DefInprocHandler ); + msi_free( cls->DefInprocHandler32 ); + msi_free( cls->Argument ); + msi_free( cls->ProgIDText ); + msi_free( cls ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->extensions ) + { + MSIEXTENSION *ext = LIST_ENTRY( item, MSIEXTENSION, entry ); + + list_remove( &ext->entry ); + free_extension( ext ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->progids ) + { + MSIPROGID *progid = LIST_ENTRY( item, MSIPROGID, entry ); + + list_remove( &progid->entry ); + msi_free( progid->ProgID ); + msi_free( progid->Description ); + msi_free( progid->IconPath ); + msi_free( progid ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->mimes ) + { + MSIMIME *mt = LIST_ENTRY( item, MSIMIME, entry ); + + list_remove( &mt->entry ); + msi_free( mt->clsid ); + msi_free( mt->ContentType ); + msi_free( mt ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->appids ) + { + MSIAPPID *appid = LIST_ENTRY( item, MSIAPPID, entry ); + + list_remove( &appid->entry ); + msi_free( appid->AppID ); + msi_free( appid->RemoteServerName ); + msi_free( appid->LocalServer ); + msi_free( appid->ServiceParameters ); + msi_free( appid->DllSurrogate ); + msi_free( appid ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->sourcelist_info ) + { + MSISOURCELISTINFO *info = LIST_ENTRY( item, MSISOURCELISTINFO, entry ); + + list_remove( &info->entry ); + msi_free( info->value ); + msi_free( info ); + } + + LIST_FOR_EACH_SAFE( item, cursor, &package->sourcelist_media ) + { + MSIMEDIADISK *info = LIST_ENTRY( item, MSIMEDIADISK, entry ); + + list_remove( &info->entry ); + msi_free( info->volume_label ); + msi_free( info->disk_prompt ); + msi_free( info ); + } + + if (package->script) + { + for (i = 0; i < TOTAL_SCRIPTS; i++) + msi_free_action_script( package, i ); + + for (i = 0; i < package->script->UniqueActionsCount; i++) + msi_free( package->script->UniqueActions[i] ); + + msi_free( package->script->UniqueActions ); + msi_free( package->script ); + } + + if (package->patch) + { + msi_free( package->patch->patchcode ); + msi_free( package->patch->transforms ); + msi_free( package->patch ); + } + + msi_free( package->BaseURL ); + msi_free( package->PackagePath ); + msi_free( package->ProductCode ); + msi_free( package->ActionFormat ); + msi_free( package->LastAction ); + + /* cleanup control event subscriptions */ + ControlEvent_CleanupSubscriptions( package ); +} + static void MSI_FreePackage( MSIOBJECTHDR *arg) { MSIPACKAGE *package= (MSIPACKAGE*) arg; @@ -57,7 +288,7 @@ msi_dialog_destroy( package->dialog ); msiobj_release( &package->db->hdr ); - ACTION_free_package_structures(package); + free_package_structures(package); } static UINT create_temp_property_table(MSIPACKAGE *package) Modified: trunk/reactos/dll/win32/msi/storages.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/storages.c?r…
============================================================================== --- trunk/reactos/dll/win32/msi/storages.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/storages.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -452,7 +452,7 @@ UINT val, UINT *row, MSIITERHANDLE *handle) { MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view; - UINT index = (UINT)*handle; + UINT index = PtrToUlong(*handle); TRACE("(%d, %d): %d\n", *row, col, val); @@ -470,7 +470,7 @@ index++; } - *handle = (MSIITERHANDLE)++index; + *handle = UlongToPtr(++index); if (index >= sv->num_rows) return ERROR_NO_MORE_ITEMS; Modified: trunk/reactos/dll/win32/msi/streams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/streams.c?re…
============================================================================== --- trunk/reactos/dll/win32/msi/streams.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/streams.c [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -41,7 +41,6 @@ typedef struct tabSTREAM { UINT str_index; - LPWSTR name; IStream *stream; } STREAM; @@ -72,7 +71,6 @@ { STREAM *stream; WCHAR decoded[MAX_STREAM_NAME_LEN]; - LPWSTR ptr = name; stream = msi_alloc(sizeof(STREAM)); if (!stream) @@ -81,18 +79,11 @@ if (encoded) { decode_streamname(name, decoded); - ptr = decoded; TRACE("stream -> %s %s\n", debugstr_w(name), debugstr_w(decoded)); - } - - stream->name = strdupW(ptr); - if (!stream->name) - { - msi_free(stream); - return NULL; - } - - stream->str_index = msi_addstringW(sv->db->strings, 0, stream->name, -1, 1, StringNonPersistent); + name = decoded; + } + + stream->str_index = msi_addstringW(sv->db->strings, 0, name, -1, 1, StringNonPersistent); stream->stream = stm; return stream; } @@ -133,9 +124,9 @@ { MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view; - FIXME("%p %d %p\n", sv, row, rec); - - return ERROR_CALL_NOT_IMPLEMENTED; + TRACE("%p %d %p\n", sv, row, rec); + + return msi_view_get_row( sv->db, view, row, rec ); } static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask) @@ -144,13 +135,13 @@ STREAM *stream; IStream *stm; STATSTG stat; - LPWSTR name = NULL; + LPWSTR encname = NULL, name = NULL; USHORT *data = NULL; HRESULT hr; ULONG count; UINT r = ERROR_FUNCTION_FAILED; - TRACE("(%p, %p)\n", view, rec); + TRACE("(%p, %d, %p, %08x)\n", view, row, rec, mask); if (row > sv->num_rows) return ERROR_FUNCTION_FAILED; @@ -167,7 +158,10 @@ } if (stat.cbSize.QuadPart >> 32) - goto done; + { + WARN("stream too large\n"); + goto done; + } data = msi_alloc(stat.cbSize.QuadPart); if (!data) @@ -182,7 +176,13 @@ name = strdupW(MSI_RecordGetString(rec, 1)); if (!name) - goto done; + { + WARN("failed to retrieve stream name\n"); + goto done; + } + + encname = encode_streamname(FALSE, name); + IStorage_DestroyElement(sv->db->storage, encname); r = write_stream_data(sv->db->storage, name, data, count, FALSE); if (r != ERROR_SUCCESS) @@ -195,14 +195,20 @@ if (!stream) goto done; - IStorage_OpenStream(sv->db->storage, name, 0, - STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream->stream); + hr = IStorage_OpenStream(sv->db->storage, encname, 0, + STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream->stream); + if (FAILED(hr)) + { + WARN("failed to open stream: %08x\n", hr); + goto done; + } sv->streams[row] = stream; done: msi_free(name); msi_free(data); + msi_free(encname); IStream_Release(stm); @@ -212,6 +218,9 @@ static UINT STREAMS_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary) { MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view; + UINT i; + + TRACE("(%p, %p, %d, %d)\n", view, rec, row, temporary); if (!streams_set_table_size(sv, ++sv->num_rows)) return ERROR_FUNCTION_FAILED; @@ -219,7 +228,11 @@ if (row == -1) row = sv->num_rows - 1; - /* FIXME have to readjust rows */ + /* shift the rows to make room for the new row */ + for (i = sv->num_rows - 1; i > row; i--) + { + sv->streams[i] = sv->streams[i - 1]; + } return STREAMS_set_row(view, row, rec, 0); } @@ -274,7 +287,7 @@ { case 1: name_ptr = Name; - if (type) *type = MSITYPE_STRING | MAX_STREAM_NAME_LEN; + if (type) *type = MSITYPE_STRING | MSITYPE_VALID | MAX_STREAM_NAME_LEN; break; case 2: @@ -404,8 +417,6 @@ { if (sv->streams[i]->stream) IStream_Release(sv->streams[i]->stream); - - msi_free(sv->streams[i]->name); msi_free(sv->streams[i]); } } @@ -420,9 +431,9 @@ UINT val, UINT *row, MSIITERHANDLE *handle) { MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view; - UINT index = (UINT)*handle; - - TRACE("(%d, %d): %d\n", *row, col, val); + UINT index = PtrToUlong(*handle); + + TRACE("(%p, %d, %d, %p, %p)\n", view, col, val, row, handle); if (col == 0 || col > NUM_STREAMS_COLS) return ERROR_INVALID_PARAMETER; @@ -438,8 +449,9 @@ index++; } - *handle = (MSIITERHANDLE)++index; - if (index >= sv->num_rows) + *handle = UlongToPtr(++index); + + if (index > sv->num_rows) return ERROR_NO_MORE_ITEMS; return ERROR_SUCCESS; @@ -510,9 +522,16 @@ break; } - IStorage_OpenStream(sv->db->storage, stat.pwcsName, 0, - STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream->stream); + hr = IStorage_OpenStream(sv->db->storage, stat.pwcsName, 0, + STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream->stream); CoTaskMemFree(stat.pwcsName); + + if (FAILED(hr)) + { + WARN("failed to open stream: %08x\n", hr); + count = -1; + break; + } if (!streams_set_table_size(sv, ++count)) { Modified: trunk/reactos/include/psdk/msi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/msi.h?rev=454…
============================================================================== --- trunk/reactos/include/psdk/msi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/msi.h [iso-8859-1] Sat Feb 6 22:28:28 2010 @@ -597,6 +597,10 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPWSTR, LPDWORD); #define MsiSourceListEnumSources WINELIB_NAME_AW(MsiSourceListEnumSources) +UINT WINAPI MsiSourceListClearSourceA(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR); +UINT WINAPI MsiSourceListClearSourceW(LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, DWORD, LPCWSTR); +#define MsiSourceListClearSource WINELIB_NAME_AW(MsiSourceListClearSource) + UINT WINAPI MsiSourceListClearAllA(LPCSTR, LPCSTR, DWORD); UINT WINAPI MsiSourceListClearAllW(LPCWSTR, LPCWSTR, DWORD); #define MsiSourceListClearAll WINELIB_NAME_AW(MsiSourceListClearAll)
14 years, 10 months
1
0
0
0
[tkreuzer] 45467: Merge trunk head (r45466)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Feb 6 21:36:45 2010 New Revision: 45467 URL:
http://svn.reactos.org/svn/reactos?rev=45467&view=rev
Log: Merge trunk head (r45466) Added: branches/ros-amd64-bringup/reactos/base/applications/dxdiag/lang/ua-UA.rc - copied unchanged from r45466, trunk/reactos/base/applications/dxdiag/lang/ua-UA.rc branches/ros-amd64-bringup/reactos/base/applications/games/spider/lang/uk-UA.rc - copied unchanged from r45466, trunk/reactos/base/applications/games/spider/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/sndrec32/lang/uk-UA.rc - copied unchanged from r45466, trunk/reactos/base/applications/sndrec32/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/system/runonce/lang/uk-UA.rc - copied unchanged from r45466, trunk/reactos/base/system/runonce/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/boot/armllb/ - copied from r45466, trunk/reactos/boot/armllb/ branches/ros-amd64-bringup/reactos/dll/win32/shimgvw/lang/uk-UA.rc - copied unchanged from r45466, trunk/reactos/dll/win32/shimgvw/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/drivers/video/miniport/vmx_svga/ - copied from r45466, trunk/reactos/drivers/video/miniport/vmx_svga/ branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/osenv.h - copied unchanged from r45466, trunk/reactos/lib/drivers/oskittcp/include/osenv.h branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/osenv.c - copied unchanged from r45466, trunk/reactos/lib/drivers/oskittcp/oskittcp/osenv.c branches/ros-amd64-bringup/reactos/tools/log2lines/ - copied from r45466, trunk/reactos/tools/log2lines/ branches/ros-amd64-bringup/reactos/tools/nandflash/ - copied from r45466, trunk/reactos/tools/nandflash/ branches/ros-amd64-bringup/reactos/tools/pipetools/pipetools.mak - copied unchanged from r45466, trunk/reactos/tools/pipetools/pipetools.mak Removed: branches/ros-amd64-bringup/reactos/base/system/expand/lang/ branches/ros-amd64-bringup/reactos/base/system/expand/resource.h branches/ros-amd64-bringup/reactos/base/system/expand/rsrc.rc branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/ferouart.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/omapuart.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/versuart.c branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.c branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.mak Modified: branches/ros-amd64-bringup/reactos/ (props changed) branches/ros-amd64-bringup/reactos/Doxyfile branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild branches/ros-amd64-bringup/reactos/base/applications/charmap/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/downloader/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/dxdiag/rsrc.rc branches/ros-amd64-bringup/reactos/base/applications/fontview/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/games/solitaire/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/games/spider/lang/ru-RU.rc branches/ros-amd64-bringup/reactos/base/applications/games/spider/rsrc.rc branches/ros-amd64-bringup/reactos/base/applications/games/winemine/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/magnify/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/mscutils/servman/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/notepad/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/paint/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/rapps/lang/en-US.rc branches/ros-amd64-bringup/reactos/base/applications/rapps/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/regedit/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/sndrec32/rsrc.rc branches/ros-amd64-bringup/reactos/base/applications/sndvol32/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/taskmgr/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/applications/winver/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/write/ (props changed) branches/ros-amd64-bringup/reactos/base/services/telnetd/ (props changed) branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c branches/ros-amd64-bringup/reactos/base/setup/reactos/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/setup/usetup/lang/uk-UA.h branches/ros-amd64-bringup/reactos/base/shell/explorer-new/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/base/system/expand/expand.c branches/ros-amd64-bringup/reactos/base/system/expand/expand.rbuild branches/ros-amd64-bringup/reactos/base/system/expand/expand.rc branches/ros-amd64-bringup/reactos/base/system/lsass/lsass.c branches/ros-amd64-bringup/reactos/base/system/runonce/rsrc.rc branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c branches/ros-amd64-bringup/reactos/boot/boot.rbuild branches/ros-amd64-bringup/reactos/boot/bootdata/hivedef_i386.inf branches/ros-amd64-bringup/reactos/boot/freeldr/fdebug/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arcemul/mm.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/ (props changed) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/boot.s branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/loader.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/macharm.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/loader.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/mb.S branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/cmdline.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/disk/ramdisk.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr.rbuild branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch.h branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/ (props changed) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/ramdisk.h branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/tui.c branches/ros-amd64-bringup/reactos/config-arm.template.rbuild branches/ros-amd64-bringup/reactos/dll/cpl/desk/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/dll/cpl/input/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/general.c branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/de-DE.rc branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/en-US.rc branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/ru-RU.rc branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/resource.h branches/ros-amd64-bringup/reactos/dll/directx/d3d8/d3d8.spec (props changed) branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/ (props changed) branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/classfactory.c (props changed) branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/dsound.spec (props changed) branches/ros-amd64-bringup/reactos/dll/directx/dsound_new/regsvr.c (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.c (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.rc (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.spec (props changed) branches/ros-amd64-bringup/reactos/dll/shellext/devcpux/devcpux.spec (props changed) branches/ros-amd64-bringup/reactos/dll/shellext/slayer/slayer.spec (props changed) branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/eventlog.c branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c branches/ros-amd64-bringup/reactos/dll/win32/gdi32/gdi32.spec branches/ros-amd64-bringup/reactos/dll/win32/gdi32/misc/misc.c branches/ros-amd64-bringup/reactos/dll/win32/gdi32/misc/stubs.c branches/ros-amd64-bringup/reactos/dll/win32/msgina/lang/uk-UA.rc branches/ros-amd64-bringup/reactos/dll/win32/netid/lang/de-DE.rc branches/ros-amd64-bringup/reactos/dll/win32/shimgvw/rsrc.rc branches/ros-amd64-bringup/reactos/dll/win32/user32/include/ntwrapper.h branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.pspec branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/icon.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/paint.c branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/legacy.c branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/mmixer.c branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/wdmaud.c branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/wdmaud.h branches/ros-amd64-bringup/reactos/dll/win32/wshtcpip/wshtcpip.c branches/ros-amd64-bringup/reactos/drivers/base/bootvid/i386/bootvid.c branches/ros-amd64-bringup/reactos/drivers/multimedia/audio/sb16_nt4.old/ (props changed) branches/ros-amd64-bringup/reactos/drivers/multimedia/audio/sndblst.old/ (props changed) branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/bind.c branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/connect.c branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/listen.c branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/main.c branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/tdiconn.c branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/write.c branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/ (props changed) branches/ros-amd64-bringup/reactos/drivers/video/font/ftfd/ (props changed) branches/ros-amd64-bringup/reactos/drivers/video/miniport/directory.rbuild branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp branches/ros-amd64-bringup/reactos/hal/halarm/generic/hal.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/bios.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/dma.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/pic.c branches/ros-amd64-bringup/reactos/hal/halx86/generic/timer.c branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild branches/ros-amd64-bringup/reactos/hal/halx86/include/halp.h branches/ros-amd64-bringup/reactos/hal/halx86/mp/mpsirql.c branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h (props changed) branches/ros-amd64-bringup/reactos/include/ddk/winddk.h branches/ros-amd64-bringup/reactos/include/ndk/amd64/asmmacro.S (props changed) branches/ros-amd64-bringup/reactos/include/ndk/arm/ketypes.h branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h branches/ros-amd64-bringup/reactos/include/ndk/i386/ketypes.h branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h branches/ros-amd64-bringup/reactos/lib/drivers/ip/transport/tcp/event.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/malloc.h branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/mbuf.h branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/proc.h branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp.rbuild branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/interface.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/sleep.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/tcp_output.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/uipc_mbuf.c branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/header.c branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/i386/aulldvrm_asm.s branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ (props changed) branches/ros-amd64-bringup/reactos/media/doc/README.WINE branches/ros-amd64-bringup/reactos/ntoskrnl/config/cminit.c branches/ros-amd64-bringup/reactos/ntoskrnl/config/ntapi.c branches/ros-amd64-bringup/reactos/ntoskrnl/ex/init.c branches/ros-amd64-bringup/reactos/ntoskrnl/ex/work.c branches/ros-amd64-bringup/reactos/ntoskrnl/inbv/inbv.c branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/asmmacro.S branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/trap_x.h branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/stubs_asm.s branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/trap.s branches/ros-amd64-bringup/reactos/ntoskrnl/ke/clock.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/except.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/cpu.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/ctxswitch.S branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/exp.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/irqobj.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/trap.s branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/traphdlr.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/usercall_asm.S branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/v86vdm.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/time.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/arm/init.c branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec branches/ros-amd64-bringup/reactos/ntoskrnl/ps/process.c branches/ros-amd64-bringup/reactos/ntoskrnl/ps/psmgr.c branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmexec.c branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmmain.c branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/win32csr/guiconsole.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/eng/engwindow.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/dc.h branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/dce.h branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h (contents, props changed) branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/region.h branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/window.h branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/main/dllmain.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/cursoricon.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/monitor.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/ntstubs.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/painting.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/vis.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/windc.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/window.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/winpos.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/cliprgn.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dcattr.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dclife.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dcstate.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/gdiobj.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/region.c branches/ros-amd64-bringup/reactos/tools/hpp/ (props changed) branches/ros-amd64-bringup/reactos/tools/pipetools/piperead.cpp branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak branches/ros-amd64-bringup/reactos/tools/rbuild/backend/msvc/msvc.cpp branches/ros-amd64-bringup/reactos/tools/rbuild_helper/ (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/rsym.mak (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/rsym_common.c (props changed) branches/ros-amd64-bringup/reactos/tools/tools.mak branches/ros-amd64-bringup/reactos/tools/tools.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-amd64-bringup/reactos/Doxyfile URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/Doxyf…
Modified: branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
Modified: branches/ros-amd64-bringup/reactos/base/applications/charmap/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/dxdiag/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/solitaire/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/spider/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/spider/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/winemine/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/mscutils/servman/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/notepad/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/paint/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/rapps/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/rapps/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/regedit/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/sndrec32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/sndvol32/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/taskmgr/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/setup/reactos/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/setup/usetup/lang/uk-UA.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/shell/explorer-new/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/expand/expand.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/expand/expand.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/expand/expand.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Removed: branches/ros-amd64-bringup/reactos/base/system/expand/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Removed: branches/ros-amd64-bringup/reactos/base/system/expand/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/lsass/lsass.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/runonce/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/boot/boot.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/bootdata/hivedef_i386.inf URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/fdebug/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arcemul/mm.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/boot.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/ferouart.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/loader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/omapuart.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/arm/versuart.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/loader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/i386/mb.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/cmdline.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/disk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/ramdisk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/tui.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/config-arm.template.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/confi…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/desk/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/input/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/general.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/sysdm/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/eventlog.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/gdi32.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msgina/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/netid/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shimgvw/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/include/ntwrapper.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.pspec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/icon.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/paint.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/legacy.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/mmixer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/wdmaud.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/wdmaud.drv/wdmaud.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/wshtcpip/wshtcpip.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/drivers/base/bootvid/i386/bootvid.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/tdiconn.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/video/miniport/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/hal/halarm/generic/hal.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/dma.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/pic.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/timer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/mp/mpsirql.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/arm/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/malloc.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/mbuf.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/proc.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/interface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/sleep.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/tcp_output.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/oskittcp/oskittcp/uipc_mbuf.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/header.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/math/i386/aulldvrm_asm.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
Modified: branches/ros-amd64-bringup/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/media…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/config/cminit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/config/ntapi.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ex/work.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/inbv/inbv.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/asmmacro.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/trap_x.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/stubs_asm.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/trap.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/clock.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/except.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/ctxswitch.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/usercall_asm.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/v86vdm.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/time.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/arm/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/process.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmexec.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/win32csr/guiconsole.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/eng/engwindow.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/dce.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/region.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/window.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/monitor.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/vis.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/cliprgn.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dcattr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/dcstate.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/tools/pipetools/piperead.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/msvc/msvc.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Removed: branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Removed: branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Modified: branches/ros-amd64-bringup/reactos/tools/tools.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Modified: branches/ros-amd64-bringup/reactos/tools/tools.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
14 years, 10 months
1
0
0
0
[tkreuzer] 45466: [HAL] Add the x86 emulator to x86BiosCall. It can call into int 10 and executes a few instructions.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Feb 6 20:16:23 2010 New Revision: 45466 URL:
http://svn.reactos.org/svn/reactos?rev=45466&view=rev
Log: [HAL] Add the x86 emulator to x86BiosCall. It can call into int 10 and executes a few instructions. Removed: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild Modified: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86bios.c [iso-8859-1] Sat Feb 6 20:16:23 2010 @@ -254,7 +254,7 @@ VmState.Flags.ReturnOnIret = 1; /* Call the x86 emulator */ -// x86Emulator(&VmState); + x86Emulator(&VmState); /* Copy registers back to caller */ *Registers = VmState.BiosRegisters; Removed: branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h (removed) @@ -1,221 +1,0 @@ - -typedef union -{ - USHORT Short; - ULONG Long; - struct - { - ULONG Cf:1; - ULONG Pf:1; - ULONG Af:1; - ULONG Zf:1; - ULONG Sf:1; - ULONG Tf:1; - ULONG If:1; - ULONG Df:1; - ULONG Of:1; - ULONG Iopl:3; - ULONG Nt:1; - ULONG Rf:1; - ULONG Vm:1; - ULONG Ac:1; - ULONG Vif:1; - ULONG Vip:1; - ULONG Id:1; - }; -} EFLAGS; - -typedef union -{ - ULONG Dword; - USHORT Word; - UCHAR Byte; - struct - { - UCHAR Low; - UCHAR High; - }; -} REGU; - -typedef union -{ - struct - { - UCHAR mod:2; - UCHAR reg:3; - UCHAR rm:3; - }; - UCHAR Byte; -} MODRM; - -typedef struct -{ - union - { - ULONG Eax; - USHORT Ax; - struct - { - UCHAR Al; - UCHAR Ah; - }; - }; - union - { - ULONG Ecx; - USHORT Cx; - struct - { - UCHAR Cl; - UCHAR Ch; - }; - }; - union - { - ULONG Edx; - USHORT Dx; - struct - { - UCHAR Dl; - UCHAR Dh; - }; - }; - union - { - ULONG Ebx; - USHORT Bx; - struct - { - UCHAR Bl; - UCHAR Bh; - }; - }; - union - { - ULONG Ebp; - USHORT Bp; - }; - union - { - ULONG Esi; - USHORT Si; - }; - union - { - ULONG Edi; - USHORT Di; - }; - union - { - struct - { - ULONG ReservedDsMBZ:4; - ULONG SegDs:16; - }; - ULONG ShiftedDs; - }; - union - { - struct - { - ULONG ReservedEsMBZ:4; - ULONG SegEs:16; - }; - ULONG ShiftedEs; - }; - - /* Extended */ - union - { - struct - { - ULONG ReservedCsMBZ:4; - ULONG SegCs:16; - }; - ULONG ShiftedCs; - }; - union - { - struct - { - ULONG ReservedSsMBZ:4; - ULONG SegSs:16; - }; - ULONG ShiftedSs; - }; - - union - { - struct - { - ULONG ReservedMsMBZ:4; - ULONG SegMs:16; - }; - ULONG ShiftedMs; - }; - - union - { - ULONG Eip; - USHORT Ip; - }; - - union - { - ULONG Esp; - USHORT Sp; - }; - - EFLAGS Eflags; - -} X86_REGISTERS, *PX86_REGISTERS; - -enum -{ - X86_VMFLAGS_RETURN_ON_IRET = 1, -}; - -typedef struct -{ - union - { - X86_BIOS_REGISTERS BiosRegisters; - X86_REGISTERS Registers; - REGU IndexedRegisters[8]; - }; - - struct - { - ULONG ReturnOnIret:1; - } Flags; - - PVOID MemBuffer; - -#if 1 - PCHAR Mnemonic; - PCHAR DstReg; - PCHAR SrcReg; - ULONG SrcEncodung; - ULONG DstEncoding; - ULONG Length; -#endif -} X86_VM_STATE, *PX86_VM_STATE; - -enum -{ - PREFIX_SIZE_OVERRIDE = 0x010001, - PREFIX_ADDRESS_OVERRIDE = 0x020002, - PREFIX_SEGMENT_CS = 0x040004, - PREFIX_SEGMENT_DS = 0x040008, - PREFIX_SEGMENT_ES = 0x040010, - PREFIX_SEGMNET_FS = 0x040020, - PREFIX_SEGMENT_GS = 0x040040, - PREFIX_SEGMENT_SS = 0x040080, - PREFIX_LOCK = 0x080100, - PREFIX_REP = 0x100200, -} PREFIX_STATE; - - -VOID -NTAPI -x86Emulator(PX86_VM_STATE VmState); Modified: branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/hal_generic.rbuild [iso-8859-1] Sat Feb 6 20:16:23 2010 @@ -5,7 +5,6 @@ <include>include</include> <include base="ntoskrnl">include</include> <define name="_NTHAL_" /> - <define name="_X86BIOS_" /> <directory name="generic"> <directory name="bus"> <file>bushndlr.c</file> @@ -43,7 +42,6 @@ <file>misc.c</file> <file>systimer.S</file> <file>usage.c</file> - <file>x86bios.c</file> </directory> </if> </directory> Modified: branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halx86/halamd64.rbuild [iso-8859-1] Sat Feb 6 20:16:23 2010 @@ -5,11 +5,14 @@ <bootstrap installbase="$(CDOUTPUT)" nameoncd="hal.dll" /> <include base="hal">include</include> <include base="ntoskrnl">include</include> + <include base="x86emu">.</include> <define name="_DISABLE_TIDENTS" /> <define name="_NTHAL_" /> + <define name="_X86BIOS_" /> <library>hal_generic</library> <library>hal_generic_up</library> <library>ntoskrnl</library> + <library>x86emu</library> <directory name="up"> <file>halinit_up.c</file> @@ -21,4 +24,10 @@ <file>mps.S</file> </directory> </directory> + <directory name="generic"> + <directory name="amd64"> + <file>x86bios.c</file> + </directory> + </directory> + </module>
14 years, 10 months
1
0
0
0
[tkreuzer] 45465: Add x86emu to build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Feb 6 20:14:12 2010 New Revision: 45465 URL:
http://svn.reactos.org/svn/reactos?rev=45465&view=rev
Log: Add x86emu to build Modified: branches/ros-amd64-bringup/reactos/lib/lib.rbuild Modified: branches/ros-amd64-bringup/reactos/lib/lib.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/l…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/lib.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/lib.rbuild [iso-8859-1] Sat Feb 6 20:14:12 2010 @@ -67,4 +67,7 @@ <directory name="win32ksys"> <xi:include href="win32ksys/win32ksys.rbuild" /> </directory> + <directory name="x86emu"> + <xi:include href="x86emu/x86emu.rbuild" /> + </directory> </group>
14 years, 10 months
1
0
0
0
[tkreuzer] 45464: [X86EMU] Beginning of a real mode x86 emulator for BIOS calls.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Feb 6 20:13:54 2010 New Revision: 45464 URL:
http://svn.reactos.org/svn/reactos?rev=45464&view=rev
Log: [X86EMU] Beginning of a real mode x86 emulator for BIOS calls. Added: branches/ros-amd64-bringup/reactos/lib/x86emu/ (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/op_cmp.h (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/op_jump.h (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/op_mov.h (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/op_stack.h (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/vmstate.h (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.c (with props) branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.h - copied, changed from r45254, branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.rbuild (with props) Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sat Feb 6 20:13:54 2010 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: branches/ros-amd64-bringup/reactos/lib/x86emu/op_cmp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/op_cmp.h (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/op_cmp.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,12 @@ + +VOID +FORCEINLINE +Opcode_3D_CMP(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + USHORT Value; + + Value = *(USHORT*)(IntructionPointer + 1); + VmState_CMP16(VmState, VmState->Registers.Eax, Value); + VmState_AdvanceIp(VmState, 3); + DPRINT("CMP AX, 0x%x\n", Value); +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/op_cmp.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/lib/x86emu/op_jump.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/op_jump.h (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/op_jump.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,39 @@ + +VOID +FORCEINLINE +Opcode_E9_JMP16(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + SHORT Offset; + + Offset = *(PSHORT)(IntructionPointer + 1); + DPRINT("JMP %04x\n", VmState->Registers.Ip + Offset + 3); + VmState_AdvanceIp(VmState, Offset + 3); +} + +VOID +FORCEINLINE +Opcode_75_JNZ8(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("JNZ %04x\n", VmState->Registers.Ip + IntructionPointer[1] + 2); + + if (!VmState->Registers.Eflags.Zf) + { + VmState_AdvanceIp(VmState, IntructionPointer[1] + 2); + } + else + VmState_AdvanceIp(VmState, 2); +} + +VOID +FORCEINLINE +Opcode_74_JZ8(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("JZ %04x\n", VmState->Registers.Ip + IntructionPointer[1] + 2); + + if (VmState->Registers.Eflags.Zf) + { + VmState_AdvanceIp(VmState, IntructionPointer[1] + 2); + } + else + VmState_AdvanceIp(VmState, 2); +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/op_jump.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/lib/x86emu/op_mov.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/op_mov.h (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/op_mov.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,45 @@ + +VOID +FORCEINLINE +Opcode_BB_MOV(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + USHORT Value; + + Value = *(USHORT*)(IntructionPointer + 1); + VmState->Registers.Bx = Value; + VmState_AdvanceIp(VmState, 3); + DPRINT("MOV BX, 0x%x\n", Value); +} + +VOID +FORCEINLINE +Opcode_8E_MOV(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + MODRM ModRm; + UCHAR Value; + + ModRm.Byte = IntructionPointer[1]; + + if (ModRm.mod == 3) + { + DPRINT("MOV ??, ??\n", IntructionPointer[2]); + Value = VmState_GetVal8(VmState, ModRm); + // ... + VmState_AdvanceIp(VmState, 2); + return; + } + DPRINT1("UNKNOWN\n"); +} + +VOID +FORCEINLINE +Opcode_89_MOV(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + MODRM ModRm; + USHORT Value; + + ModRm.Byte = IntructionPointer[1]; + Value = VmState_GetRegVal16(VmState, ModRm); + + VmState_AdvanceIp(VmState, 2); +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/op_mov.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/lib/x86emu/op_stack.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/op_stack.h (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/op_stack.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,110 @@ + + +VOID +FORCEINLINE +Opcode_9C_PUSHF(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("PUSHF\n"); + VmState_Push(VmState, VmState->Registers.Eflags.Short); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_9D_POPF(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("POPF\n"); + VmState->Registers.Eflags.Short = VmState_Pop(VmState); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_1E_PUSH_DS(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("PUSH DS\n"); + VmState_Push(VmState, VmState->Registers.SegDs); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_1F_POP_DS(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("POP DS\n"); + VmState->Registers.SegDs = VmState_Pop(VmState); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_06_PUSH_ES(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("PUSH ES\n"); + VmState_Push(VmState, VmState->Registers.SegEs); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_07_POP_ES(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("POP ES\n"); + VmState->Registers.SegEs = VmState_Pop(VmState); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_60_PUSHA(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + USHORT OrigSp; + DPRINT("PUSHA\n"); + + OrigSp = VmState->Registers.Sp; + VmState_Push(VmState, VmState->Registers.Ax); + VmState_Push(VmState, VmState->Registers.Cx); + VmState_Push(VmState, VmState->Registers.Dx); + VmState_Push(VmState, VmState->Registers.Bx); + VmState_Push(VmState, OrigSp); + VmState_Push(VmState, VmState->Registers.Bp); + VmState_Push(VmState, VmState->Registers.Si); + VmState_Push(VmState, VmState->Registers.Di); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_61_POPA(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + USHORT OrigSp; + DPRINT("POPA\n"); + + VmState->Registers.Di = VmState_Pop(VmState); + VmState->Registers.Si = VmState_Pop(VmState); + VmState->Registers.Bp = VmState_Pop(VmState); + OrigSp = VmState_Pop(VmState); + VmState->Registers.Bx = VmState_Pop(VmState); + VmState->Registers.Dx = VmState_Pop(VmState); + VmState->Registers.Cx = VmState_Pop(VmState); + VmState->Registers.Ax = VmState_Pop(VmState); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_55_PUSH_BP(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("PUSH BP\n"); + VmState_Push(VmState, VmState->Registers.Bp); + VmState_AdvanceIp(VmState, 1); +} + +VOID +FORCEINLINE +Opcode_xx_POP_BP(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + DPRINT("POP BP\n"); + VmState->Registers.Bp = VmState_Pop(VmState); + VmState_AdvanceIp(VmState, 1); +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/op_stack.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/lib/x86emu/vmstate.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/vmstate.h (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/vmstate.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,108 @@ + +UCHAR +FORCEINLINE +VmState_GetRegVal8(PX86_VM_STATE VmState, MODRM ModRm) +{ + PUCHAR Pointer; + + Pointer = (PUCHAR)&VmState->Registers + RegisterTable[0][ModRm.reg]; + return *Pointer; +} + +UCHAR +FORCEINLINE +VmState_GetRegVal16(PX86_VM_STATE VmState, MODRM ModRm) +{ + return VmState->IndexedRegisters[ModRm.reg].Word; +} + + +VOID +FORCEINLINE +VmState_EnablePrefix(PX86_VM_STATE VmState, ULONG Prefix) +{ + //DPRINT("_EnablePrefix\n"); +} + +VOID +FORCEINLINE +VmState_ClearPrefixes(PX86_VM_STATE VmState) +{ + //DPRINT1("_ClearPrefixes\n"); +} + +FORCEINLINE +VOID +VmState_AdvanceIp(PX86_VM_STATE VmState, SHORT Advance) +{ + VmState->Registers.Ip += Advance; +} + +FORCEINLINE +VOID +VmState_SetIp(PX86_VM_STATE VmState, USHORT Value) +{ + VmState->Registers.Ip = Value; +} + +FORCEINLINE +PCHAR +VmState_GetIp(PX86_VM_STATE VmState) +{ + return (PCHAR)VmState->MemBuffer + + VmState->Registers.ShiftedCs + + VmState->Registers.Eip; +} + +FORCEINLINE +VOID +VmState_Push(PX86_VM_STATE VmState, USHORT Value) +{ + PUSHORT StackPointer; + //DPRINT1("Pushing %x %x %x\n", Value, VmState->Registers.ShiftedSs, VmState->Registers.Sp); + StackPointer = (PVOID)((PCHAR)VmState->MemBuffer + + VmState->Registers.ShiftedSs + + VmState->Registers.Sp); // FIXME: overflow + *StackPointer = Value; + VmState->Registers.Sp--; +} + +FORCEINLINE +USHORT +VmState_Pop(PX86_VM_STATE VmState) +{ + PUSHORT StackPointer; + //DPRINT1("Popping %x\n", Value); + StackPointer = (PVOID)((PCHAR)VmState->MemBuffer + + VmState->Registers.ShiftedSs + + VmState->Registers.Sp); + VmState->Registers.Sp--; + return *StackPointer; +} + +UCHAR +FORCEINLINE +VmState_GetVal8(PX86_VM_STATE VmState, MODRM ModRm) +{ + return 0; +} + +FORCEINLINE +VOID +VmState_CMP8(PX86_VM_STATE VmState, UCHAR Value1, UCHAR Value2) +{ + VmState->Registers.Eflags.Zf = ((Value1 - Value2) == 0); + VmState->Registers.Eflags.Cf = ((Value1 - Value2) > Value1); + VmState->Registers.Eflags.Sf = ((CHAR)(Value1 - Value2) < 0); + VmState->Registers.Eflags.Of = ((CHAR)(Value1 - Value2) > (CHAR)Value1); +} + +FORCEINLINE +VOID +VmState_CMP16(PX86_VM_STATE VmState, USHORT Value1, USHORT Value2) +{ + VmState->Registers.Eflags.Zf = ((Value1 - Value2) == 0); + VmState->Registers.Eflags.Cf = ((Value1 - Value2) > Value1); + VmState->Registers.Eflags.Sf = ((SHORT)(Value1 - Value2) < 0); + VmState->Registers.Eflags.Of = ((SHORT)(Value1 - Value2) > (SHORT)Value1); +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/vmstate.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.c (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.c [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,299 @@ +/* + * PROJECT: x86 CPU emulator + * LICENSE: GPL, See COPYING in the top level directory + * FILE: lib/x86emu/x86emu.c + * PURPOSE: + * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <x86emu.h> +//#define NDEBUG +#include <debug.h> + +#undef DPRINT +#define DPRINT DbgPrint + +/* GLOBALS *******************************************************************/ + +static const ULONG RegisterTable[3][8] = +{ + { + FIELD_OFFSET(X86_REGISTERS, Al), + FIELD_OFFSET(X86_REGISTERS, Cl), + FIELD_OFFSET(X86_REGISTERS, Dl), + FIELD_OFFSET(X86_REGISTERS, Bl), + FIELD_OFFSET(X86_REGISTERS, Ah), + FIELD_OFFSET(X86_REGISTERS, Ch), + FIELD_OFFSET(X86_REGISTERS, Dh), + FIELD_OFFSET(X86_REGISTERS, Bh), + }, + { + FIELD_OFFSET(X86_REGISTERS, Ax), + FIELD_OFFSET(X86_REGISTERS, Cx), + FIELD_OFFSET(X86_REGISTERS, Dx), + FIELD_OFFSET(X86_REGISTERS, Bx), + FIELD_OFFSET(X86_REGISTERS, Sp), + FIELD_OFFSET(X86_REGISTERS, Bp), + FIELD_OFFSET(X86_REGISTERS, Si), + FIELD_OFFSET(X86_REGISTERS, Di), + }, + { + FIELD_OFFSET(X86_REGISTERS, Eax), + FIELD_OFFSET(X86_REGISTERS, Ecx), + FIELD_OFFSET(X86_REGISTERS, Edx), + FIELD_OFFSET(X86_REGISTERS, Ebx), + FIELD_OFFSET(X86_REGISTERS, Esp), + FIELD_OFFSET(X86_REGISTERS, Ebp), + FIELD_OFFSET(X86_REGISTERS, Esi), + FIELD_OFFSET(X86_REGISTERS, Edi), + } +}; + +/* INLINE FUNCTONS ***********************************************************/ + +#include "vmstate.h" +#include "op_cmp.h" +#include "op_stack.h" +#include "op_jump.h" +#include "op_mov.h" + +VOID +FORCEINLINE +Opcode_E8_CALL16(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + SHORT Offset; + + Offset = *(PSHORT)(IntructionPointer + 1) + 3; + DPRINT("CALL %x\n", VmState->Registers.Ip + Offset); + VmState_Push(VmState, VmState->Registers.Ip + 3); + VmState_AdvanceIp(VmState, Offset); +} + +VOID +FORCEINLINE +Opcode_80(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + MODRM ModRm; + UCHAR Value; + + ModRm.Byte = IntructionPointer[1]; + + if (ModRm.reg == 7) + { + /* We have an 8 bit CMP */ + DPRINT("CMP ??. 0x%x\n", IntructionPointer[2]); + Value = VmState_GetVal8(VmState, ModRm); + VmState_CMP8(VmState, Value, IntructionPointer[2]); + VmState_AdvanceIp(VmState, 3); + return; + } + DPRINT1("UNKNOWN\n"); +} + +VOID +FORCEINLINE +Opcode_F3_REP(PX86_VM_STATE VmState, PCHAR IntructionPointer) +{ + UCHAR ByteVal; + + ByteVal = IntructionPointer[1]; + switch (ByteVal) + { + case 0x6C: /* REP INSB */ + case 0x6D: /* REP INSW/D */ + case 0xAC: /* REP LODSB */ + case 0xAD: /* REP LODSWDQ */ + case 0xA4: /* REP MOVSB */ + case 0xA5: /* REP MOVSW/D/Q */ + case 0x6E: /* REP OUTSB */ + case 0x6F: /* REP OUTSW/D */ + case 0xAA: /* REP STOSB */ + case 0xAB: /* REP STOSW/D/Q */ + break; + } + +} + + + + + +VOID +NTAPI +x86Emulator(PX86_VM_STATE VmState) +{ + PCHAR InstructionPointer; + UCHAR ByteVal; + +// x86EmuInitializeState(); + + for (;;) + { + InstructionPointer = VmState_GetIp(VmState); + ByteVal = *InstructionPointer; + + DPRINT("%04x:%04x %02x ", VmState->Registers.SegCs, VmState->Registers.Eip, ByteVal); + + switch (ByteVal) + { + case 0x06: /* PUSH ES */ + Opcode_06_PUSH_ES(VmState, InstructionPointer); + break; + + case 0x07: /* POP ES */ + Opcode_07_POP_ES(VmState, InstructionPointer); + break; + +// case 0x14: /* ADC AL, imm8 */ +// VmState_AdvanceIp(VmState, 2); +// break; + + case 0x15: /* ADC AX, imm16 */ + //_OpcodeADC16(&VmState->Registers.Al, WORD(&InstructionPointer[1])); + VmState_AdvanceIp(VmState, 3); + break; + + case 0x1E: /* PUSH DS */ + Opcode_1E_PUSH_DS(VmState, InstructionPointer); + break; + + case 0x1F: /* POP DS */ + Opcode_1F_POP_DS(VmState, InstructionPointer); + break; + + case 0x26: /* Force ES segment */ + case 0x2e: /* Force CS segment */ + VmState_EnablePrefix(VmState, PREFIX_SEGMENT_CS); + VmState_AdvanceIp(VmState, 1); + continue; + + case 0x36: /* Force SS segment */ + VmState->Registers.ShiftedMs = VmState->Registers.ShiftedSs; + VmState_AdvanceIp(VmState, 1); + continue; + + case 0x37: /* AAA */ + + case 0x3D: /* CMP (E)AX, imm16/32 */ + Opcode_3D_CMP(VmState, InstructionPointer); + break; + + case 0x3E: /* Force DS segment */ + VmState->Registers.ShiftedMs = VmState->Registers.ShiftedDs; + VmState_AdvanceIp(VmState, 1); + continue; + + case 0x3F: /* AAS */ + VmState_AdvanceIp(VmState, 1); + break; + + /* 0x40 ... 0x4F are REX prefixes */ + + case 0x55: /* PUSH BP */ + Opcode_55_PUSH_BP(VmState, InstructionPointer); + break; + + case 0x60: /* PUSHA */ + Opcode_60_PUSHA(VmState, InstructionPointer); + break; + + case 0x61: /* POPA */ + Opcode_61_POPA(VmState, InstructionPointer); + break; + + case 0x64: /* Force FS segment */ + case 0x65: /* Force GS segment */ + + case 0x66: /* Operand size override */ + VmState_EnablePrefix(VmState, PREFIX_SIZE_OVERRIDE); + VmState_AdvanceIp(VmState, 1); + continue; + + case 0x67: /* Address size prefix */ + VmState_EnablePrefix(VmState, PREFIX_ADDRESS_OVERRIDE); + VmState_AdvanceIp(VmState, 1); + continue; + + case 0x74: /* JZ */ + Opcode_74_JZ8(VmState, InstructionPointer); + break; + + case 0x75: /* JNZ */ + Opcode_75_JNZ8(VmState, InstructionPointer); + break; + + case 0x80: /* ... */ + Opcode_80(VmState, InstructionPointer); + break; + + case 0x89: /* MOV regmem16, reg16 */ + Opcode_89_MOV(VmState, InstructionPointer); + break; + + case 0x8E: /* MOV seg, reg16 */ + Opcode_8E_MOV(VmState, InstructionPointer); + break; + + case 0x9C: /* PUSHF */ + Opcode_9C_PUSHF(VmState, InstructionPointer); + break; + + case 0x9D: /* POPF */ + Opcode_9D_POPF(VmState, InstructionPointer); + break; + + case 0xBB: /* MOV BX, imm16 */ + Opcode_BB_MOV(VmState, InstructionPointer); + break; + + case 0xCF: /* IRET */ + DPRINT("IRET\n"); + return; + + case 0xD4: /* AAM */ + /* Check for D4 0A */ + + case 0xD5: /* AAD */ + /* Check for D5 0A */ + + case 0xE8: + Opcode_E8_CALL16(VmState, InstructionPointer); + break; + + case 0xE9: /* JMP off16 */ + Opcode_E9_JMP16(VmState, InstructionPointer); + break; + + case 0xF0: /* LOCK (ignored) */ + DPRINT("LOCK "); + VmState_AdvanceIp(VmState, 1); + continue; + + case 0xF2: /* REPNZ/REPNE */ + DPRINT("REPNE "); + VmState_EnablePrefix(VmState, PREFIX_REP); + VmState_AdvanceIp(VmState, 1); + continue; + + case 0xF3: /* REP */ + Opcode_F3_REP(VmState, InstructionPointer); + break; + + + default: + DPRINT("Unknown opcode 0x%x\n", ByteVal); + VmState_AdvanceIp(VmState, 1); + //x86EmuRaiseException(EXCEPTION_INVALID_OPCODE, ByteVal); + //return; + } + + /* Clear prefixes and continue with next intruction */ + VmState_ClearPrefixes(VmState); + +//ResetMs: + VmState->Registers.ShiftedMs = VmState->Registers.ShiftedDs; + + } +} Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.c ------------------------------------------------------------------------------ svn:eol-style = native Copied: branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.h (from r45254, branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h) URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halx86/generic/amd64/x86emu.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.h [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,3 +1,10 @@ + + +#ifndef _X86EMU_H_ +#define _X86EMU_H_ + +#include <ntifs.h> +#include <ntndk.h> typedef union { @@ -219,3 +226,5 @@ VOID NTAPI x86Emulator(PX86_VM_STATE VmState); + +#endif Added: branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/x…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.rbuild (added) +++ branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.rbuild [iso-8859-1] Sat Feb 6 20:13:54 2010 @@ -1,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../tools/rbuild/project.dtd"> +<module name="x86emu" type="staticlibrary"> + <define name="_X86BIOS_" /> + <include base="x86emu">.</include> + <file>x86emu.c</file> +</module> Propchange: branches/ros-amd64-bringup/reactos/lib/x86emu/x86emu.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 10 months
1
0
0
0
[tkreuzer] 45463: [RTL] Prevent RtlLargeInteger functions to be "occupied" by inline functions.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Feb 6 20:12:02 2010 New Revision: 45463 URL:
http://svn.reactos.org/svn/reactos?rev=45463&view=rev
Log: [RTL] Prevent RtlLargeInteger functions to be "occupied" by inline functions. Modified: branches/ros-amd64-bringup/reactos/lib/rtl/largeint.c Modified: branches/ros-amd64-bringup/reactos/lib/rtl/largeint.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/r…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/rtl/largeint.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/rtl/largeint.c [iso-8859-1] Sat Feb 6 20:12:02 2010 @@ -7,6 +7,12 @@ /* INCLUDES *****************************************************************/ +/* Prevent that inline function with the same names are created */ +#define RtlConvertLongToLargeInteger RtlConvertLongToLargeInteger_inline +#define RtlEnlargedIntegerMultiply RtlEnlargedIntegerMultiply_inline +#define RtlEnlargedUnsignedDivide RtlEnlargedUnsignedDivide_inline +#define RtlEnlargedUnsignedMultiply RtlEnlargedUnsignedMultiply_inline + #include <rtl.h> #define NDEBUG @@ -17,6 +23,7 @@ /* * @implemented */ +#undef RtlConvertLongToLargeInteger LARGE_INTEGER NTAPI RtlConvertLongToLargeInteger ( @@ -49,6 +56,7 @@ /* * @implemented */ +#undef RtlEnlargedIntegerMultiply LARGE_INTEGER NTAPI RtlEnlargedIntegerMultiply ( @@ -66,6 +74,7 @@ /* * @implemented */ +#undef RtlEnlargedUnsignedDivide ULONG NTAPI RtlEnlargedUnsignedDivide ( @@ -83,6 +92,7 @@ /* * @implemented */ +#undef RtlEnlargedUnsignedMultiply LARGE_INTEGER NTAPI RtlEnlargedUnsignedMultiply (
14 years, 10 months
1
0
0
0
[sir_richard] 45462: [NTOS]: Combine all exit trap stubs into a single function with flags (same thing we did for the entry stub). Now there are only 15 lines of ASM instead of 60.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Sat Feb 6 15:58:23 2010 New Revision: 45462 URL:
http://svn.reactos.org/svn/reactos?rev=45462&view=rev
Log: [NTOS]: Combine all exit trap stubs into a single function with flags (same thing we did for the entry stub). Now there are only 15 lines of ASM instead of 60. Modified: trunk/reactos/ntoskrnl/include/internal/trap_x.h Modified: trunk/reactos/ntoskrnl/include/internal/trap_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] Sat Feb 6 15:58:23 2010 @@ -186,216 +186,6 @@ } // -// Assembly exit stubs -// -VOID -FORCEINLINE -/* Do not mark this as DECLSPEC_NORETURN because possibly executing code follows it! */ -KiSystemCallReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Restore nonvolatiles, EAX, and do a "jump" back to the kernel caller */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "movl %c[a](%%esp), %%eax\n" - "movl %c[e](%%esp), %%edx\n" - "addl $%c[v],%%esp\n" /* A WHOLE *KERNEL* frame since we're not IRET'ing */ - "jmp *%%edx\n" - ".globl _KiSystemCallExit2\n_KiSystemCallExit2:\n" - : - : "r"(TrapFrame), - [b] "i"(KTRAP_FRAME_EBX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [a] "i"(KTRAP_FRAME_EAX), - [e] "i"(KTRAP_FRAME_EIP), - [v] "i"(KTRAP_FRAME_ESP) - : "%esp" - ); -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiSystemCallTrapReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Regular interrupt exit, but we only restore EAX as a volatile */ - __asm__ __volatile__ - ( - ".globl _KiSystemCallExit\n_KiSystemCallExit:\n" - "movl %0, %%esp\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "movl %c[a](%%esp), %%eax\n" - "addl $%c[e],%%esp\n" - "iret\n" - : - : "r"(TrapFrame), - [b] "i"(KTRAP_FRAME_EBX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [a] "i"(KTRAP_FRAME_EAX), - [e] "i"(KTRAP_FRAME_EIP) - : "%esp" - ); - UNREACHABLE; -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiSystemCallSysExitReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Restore nonvolatiles, EAX, and do a SYSEXIT back to the user caller */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "movl %c[a](%%esp), %%eax\n" - "movl %c[e](%%esp), %%edx\n" /* SYSEXIT says EIP in EDX */ - "movl %c[x](%%esp), %%ecx\n" /* SYSEXIT says ESP in ECX */ - "addl $%c[v],%%esp\n" /* A WHOLE *USER* frame since we're not IRET'ing */ - "sti\nsysexit\n" - : - : "r"(TrapFrame), - [b] "i"(KTRAP_FRAME_EBX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [a] "i"(KTRAP_FRAME_EAX), - [e] "i"(KTRAP_FRAME_EIP), - [x] "i"(KTRAP_FRAME_ESP), - [v] "i"(KTRAP_FRAME_V86_ES) - : "%esp" - ); - UNREACHABLE; -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiTrapReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Regular interrupt exit */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "movl %c[a](%%esp), %%eax\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[c](%%esp), %%ecx\n" - "movl %c[d](%%esp), %%edx\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "addl $%c[e],%%esp\n" - "iret\n" - : - : "r"(TrapFrame), - [a] "i"(KTRAP_FRAME_EAX), - [b] "i"(KTRAP_FRAME_EBX), - [c] "i"(KTRAP_FRAME_ECX), - [d] "i"(KTRAP_FRAME_EDX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [e] "i"(KTRAP_FRAME_EIP) - : "%esp" - ); - UNREACHABLE; -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiDirectTrapReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Regular interrupt exit but we're not restoring any registers */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "addl $%c[e],%%esp\n" - "iret\n" - : - : "r"(TrapFrame), - [e] "i"(KTRAP_FRAME_EIP) - : "%esp" - ); - UNREACHABLE; -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiCallReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Pops a trap frame out of the stack but returns with RET instead of IRET */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "addl $%c[e],%%esp\n" - "ret\n" - : - : "r"(TrapFrame), - [b] "i"(KTRAP_FRAME_EBX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [e] "i"(KTRAP_FRAME_EIP) - : "%esp" - ); - UNREACHABLE; -} - -VOID -FORCEINLINE -DECLSPEC_NORETURN -KiEditedTrapReturn(IN PKTRAP_FRAME TrapFrame) -{ - /* Regular interrupt exit */ - __asm__ __volatile__ - ( - "movl %0, %%esp\n" - "movl %c[a](%%esp), %%eax\n" - "movl %c[b](%%esp), %%ebx\n" - "movl %c[c](%%esp), %%ecx\n" - "movl %c[d](%%esp), %%edx\n" - "movl %c[s](%%esp), %%esi\n" - "movl %c[i](%%esp), %%edi\n" - "movl %c[p](%%esp), %%ebp\n" - "addl $%c[e],%%esp\n" - "movl (%%esp), %%esp\n" - "iret\n" - : - : "r"(TrapFrame), - [a] "i"(KTRAP_FRAME_EAX), - [b] "i"(KTRAP_FRAME_EBX), - [c] "i"(KTRAP_FRAME_ECX), - [d] "i"(KTRAP_FRAME_EDX), - [s] "i"(KTRAP_FRAME_ESI), - [i] "i"(KTRAP_FRAME_EDI), - [p] "i"(KTRAP_FRAME_EBP), - [e] "i"(KTRAP_FRAME_ERROR_CODE) /* We *WANT* the error code since ESP is there! */ - : "%esp" - ); - UNREACHABLE; -} - -// // "BOP" code used by VDM and V8086 Mode // VOID @@ -514,6 +304,162 @@ TrapFrame->SegDs = Ds; TrapFrame->SegEs = Es; } + +// +// Generates an Exit Epilog Stub for the given name +// +#define KI_FUNCTION_CALL 0x1 +#define KI_EDITED_FRAME 0x2 +#define KI_DIRECT_EXIT 0x4 +#define KI_FAST_SYSTEM_CALL_EXIT 0x8 +#define KI_SYSTEM_CALL_EXIT 0x10 +#define KI_SYSTEM_CALL_JUMP 0x20 +#define KiTrapExitStub(x, y) VOID FORCEINLINE DECLSPEC_NORETURN x(IN PKTRAP_FRAME TrapFrame) { KiTrapExit(TrapFrame, y); UNREACHABLE; } +#define KiTrapExitStub2(x, y) VOID FORCEINLINE x(IN PKTRAP_FRAME TrapFrame) { KiTrapExit(TrapFrame, y); } + +// +// How volatiles will be restored +// +#define KI_EAX_NO_VOLATILES 0x0 +#define KI_EAX_ONLY 0x1 +#define KI_ALL_VOLATILES 0x2 + +// +// Exit mechanism to use +// +#define KI_EXIT_IRET 0x0 +#define KI_EXIT_SYSEXIT 0x1 +#define KI_EXIT_JMP 0x2 +#define KI_EXIT_RET 0x3 + +// +// Master Trap Epilog +// +VOID +FORCEINLINE +KiTrapExit(IN PKTRAP_FRAME TrapFrame, + IN ULONG Flags) +{ + ULONG FrameSize = FIELD_OFFSET(KTRAP_FRAME, Eip); + ULONG ExitMechanism = KI_EXIT_IRET, Volatiles = KI_ALL_VOLATILES, NonVolatiles = TRUE; + ULONG EcxField = FIELD_OFFSET(KTRAP_FRAME, Ecx), EdxField = FIELD_OFFSET(KTRAP_FRAME, Edx); + + /* System call exit needs a special label */ + if (Flags & KI_SYSTEM_CALL_EXIT) __asm__ __volatile__ + ( + ".globl _KiSystemCallExit\n_KiSystemCallExit:\n" + ); + + /* Start by making the trap frame equal to the stack */ + __asm__ __volatile__ + ( + "movl %0, %%esp\n" + : + : "r"(TrapFrame) + : "%esp" + ); + + /* Check what kind of trap frame this trap requires */ + if (Flags & KI_FUNCTION_CALL) + { + /* These calls have an EIP on the stack they need */ + ExitMechanism = KI_EXIT_RET; + Volatiles = FALSE; + } + else if (Flags & KI_EDITED_FRAME) + { + /* Edited frames store a new ESP in the error code field */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, ErrCode); + } + else if (Flags & KI_DIRECT_EXIT) + { + /* Exits directly without restoring anything, interrupt frame on stack */ + NonVolatiles = Volatiles = FALSE; + } + else if (Flags & KI_FAST_SYSTEM_CALL_EXIT) + { + /* We have a fake interrupt stack with a ring transition */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, V86Es); + ExitMechanism = KI_EXIT_SYSEXIT; + + /* SYSEXIT wants EIP in EDX and ESP in ECX */ + EcxField = FIELD_OFFSET(KTRAP_FRAME, HardwareEsp); + EdxField = FIELD_OFFSET(KTRAP_FRAME, Eip); + } + else if (Flags & KI_SYSTEM_CALL_EXIT) + { + /* Only restore EAX */ + NonVolatiles = KI_EAX_ONLY; + } + else if (Flags & KI_SYSTEM_CALL_JUMP) + { + /* We have a fake interrupt stack with no ring transition */ + FrameSize = FIELD_OFFSET(KTRAP_FRAME, HardwareEsp); + NonVolatiles = KI_EAX_ONLY; + ExitMechanism = KI_EXIT_JMP; + } + + /* Restore the non volatiles */ + if (NonVolatiles) __asm__ __volatile__ + ( + "movl %c[b](%%esp), %%ebx\n" + "movl %c[s](%%esp), %%esi\n" + "movl %c[i](%%esp), %%edi\n" + "movl %c[p](%%esp), %%ebp\n" + : + : [b] "i"(FIELD_OFFSET(KTRAP_FRAME, Ebx)), + [s] "i"(FIELD_OFFSET(KTRAP_FRAME, Esi)), + [i] "i"(FIELD_OFFSET(KTRAP_FRAME, Edi)), + [p] "i"(FIELD_OFFSET(KTRAP_FRAME, Ebp)) + : "%esp" + ); + + /* Restore EAX if volatiles must be restored */ + if (Volatiles) __asm__ __volatile__ + ( + "movl %c[a](%%esp), %%eax\n":: [a] "i"(FIELD_OFFSET(KTRAP_FRAME, Eax)) : "%esp" + ); + + /* Restore the other volatiles if needed */ + if (Volatiles == KI_ALL_VOLATILES) __asm__ __volatile__ + ( + "movl %c[c](%%esp), %%ecx\n" + "movl %c[d](%%esp), %%edx\n" + : + : [c] "i"(EcxField), + [d] "i"(EdxField) + : "%esp" + ); + + /* Ring 0 system calls jump back to EDX */ + if (Flags & KI_SYSTEM_CALL_JUMP) __asm__ __volatile__ + ( + "movl %c[d](%%esp), %%edx\n":: [d] "i"(FIELD_OFFSET(KTRAP_FRAME, Eip)) : "%esp" + ); + + /* Now destroy the trap frame on the stack */ + __asm__ __volatile__ ("addl $%c[e],%%esp\n":: [e] "i"(FrameSize) : "%esp"); + + /* Edited traps need to change to a new ESP */ + if (Flags & KI_EDITED_FRAME) __asm__ __volatile__ ("movl (%%esp), %%esp\n":::"%esp"); + + /* Check the exit mechanism and apply it */ + if (ExitMechanism == KI_EXIT_RET) __asm__ __volatile__("ret\n"::: "%esp"); + else if (ExitMechanism == KI_EXIT_IRET) __asm__ __volatile__("iret\n"::: "%esp"); + else if (ExitMechanism == KI_EXIT_JMP) __asm__ __volatile__("jmp *%%edx\n.globl _KiSystemCallExit2\n_KiSystemCallExit2:\n"::: "%esp"); + else if (ExitMechanism == KI_EXIT_SYSEXIT) __asm__ __volatile__("sti\nsysexit\n"::: "%esp"); +} + +// +// All the specific trap epilog stubs +// +KiTrapExitStub (KiTrapReturn, 0); +KiTrapExitStub (KiDirectTrapReturn, KI_DIRECT_EXIT); +KiTrapExitStub (KiCallReturn, KI_FUNCTION_CALL); +KiTrapExitStub (KiEditedTrapReturn, KI_EDITED_FRAME); +KiTrapExitStub2(KiSystemCallReturn, KI_SYSTEM_CALL_JUMP); +KiTrapExitStub (KiSystemCallSysExitReturn, KI_FAST_SYSTEM_CALL_EXIT); +KiTrapExitStub (KiSystemCallTrapReturn, KI_SYSTEM_CALL_EXIT); // // Generic Exit Routine
14 years, 10 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
37
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
Results per page:
10
25
50
100
200