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
November 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
15 participants
317 discussions
Start a n
N
ew thread
[akhaldi] 73290: [SHLWAPI] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 23:06:15 2016 New Revision: 73290 URL:
http://svn.reactos.org/svn/reactos?rev=73290&view=rev
Log: [SHLWAPI] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/shlwapi/string.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/shlwapi/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/string.c…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] Thu Nov 17 23:06:15 2016 @@ -1488,7 +1488,7 @@ default: FIXME("unknown type!\n"); - return FALSE; + return E_NOTIMPL; } return S_OK; } @@ -1538,7 +1538,7 @@ default: FIXME("unknown type!\n"); - return FALSE; + return E_NOTIMPL; } return S_OK; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 23:06:15 2016 @@ -174,7 +174,7 @@ reactos/dll/win32/shdocvw # Synced to WineStaging-1.9.11 reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shfolder # Synced to WineStaging-1.9.11 -reactos/dll/win32/shlwapi # Synced to WineStaging-1.9.16 +reactos/dll/win32/shlwapi # Synced to WineStaging-1.9.23 reactos/dll/win32/slbcsp # Synced to WineStaging-1.9.11 reactos/dll/win32/snmpapi # Synced to WineStaging-1.9.11 reactos/dll/win32/softpub # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73289: [RICHED20_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 23:05:13 2016 New Revision: 73289 URL:
http://svn.reactos.org/svn/reactos?rev=73289&view=rev
Log: [RICHED20_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/riched20/editor.c trunk/rostests/winetests/riched20/richole.c Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
============================================================================== --- trunk/rostests/winetests/riched20/editor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/editor.c [iso-8859-1] Thu Nov 17 23:05:13 2016 @@ -747,6 +747,7 @@ { HWND hwndRichEdit = new_richedit(NULL); CHARFORMAT2A cf2; + CHARFORMAT2W cfW; int rc = 0; int tested_effects[] = { CFE_BOLD, @@ -763,10 +764,27 @@ CHARRANGE cr; LOCALESIGNATURE sig; BOOL rtl; + DWORD expect_effects; rtl = (GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_FONTSIGNATURE, (LPSTR) &sig, sizeof(LOCALESIGNATURE)) && (sig.lsUsb[3] & 0x08000000) != 0); + + /* check charformat defaults */ + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok(cf2.dwMask == CFM_ALL2, "got %08x\n", cf2.dwMask); + expect_effects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR; + if (cf2.wWeight > 550) expect_effects |= CFE_BOLD; + ok(cf2.dwEffects == expect_effects, "got %08x\n", cf2.dwEffects); + ok(cf2.yOffset == 0, "got %d\n", cf2.yOffset); + ok(cf2.sSpacing == 0, "got %d\n", cf2.sSpacing); + ok(cf2.lcid == GetSystemDefaultLCID(), "got %x\n", cf2.lcid); + ok(cf2.sStyle == 0, "got %d\n", cf2.sStyle); + ok(cf2.wKerning == 0, "got %d\n", cf2.wKerning); + ok(cf2.bAnimation == 0, "got %d\n", cf2.bAnimation); + ok(cf2.bRevAuthor == 0, "got %d\n", cf2.bRevAuthor); /* Invalid flags, CHARFORMAT2 structure blanked out */ memset(&cf2, 0, sizeof(cf2)); @@ -1057,6 +1075,14 @@ /* Set two effects on an empty selection */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); + /* first clear bold, italic */ + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD | CFM_ITALIC; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + SendMessageA(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ memset(&cf2, 0, sizeof(CHARFORMAT2A)); @@ -1084,6 +1110,14 @@ /* Setting the (empty) selection to exactly the same place as before should NOT clear the insertion style! */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); + /* first clear bold, italic */ + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD | CFM_ITALIC; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + SendMessageA(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ memset(&cf2, 0, sizeof(CHARFORMAT2A)); @@ -1108,10 +1142,17 @@ ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); - /* Ditto with EM_EXSETSEL */ + /* Moving the selection will clear the insertion style */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - cr.cpMin = 2; cr.cpMax = 2; - SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ + /* first clear bold, italic */ + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD | CFM_ITALIC; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + + SendMessageA(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -1119,6 +1160,42 @@ cf2.dwEffects = CFE_BOLD; SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + /* Move selection and then put it back, insert style should be forgotten here. */ + SendMessageA(hwndRichEdit, EM_SETSEL, 3, 3); + SendMessageA(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ + + /* Selection is now nonempty */ + SendMessageA(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"newi"); + + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_SETSEL, 2, 6); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + + ok(((cf2.dwMask & CFM_BOLD) == CFM_BOLD), + "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); + ok((cf2.dwEffects & CFE_BOLD) == 0, + "%d, cf2.dwEffects == 0x%08x not expecting effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + + /* Ditto with EM_EXSETSEL */ + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); + /* first clear bold, italic */ + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD | CFM_ITALIC; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + + cr.cpMin = 2; cr.cpMax = 2; + SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ + + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD; + cf2.dwEffects = CFE_BOLD; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + /* Empty selection in same place, insert style should NOT be forgotten here. */ cr.cpMin = 2; cr.cpMax = 2; SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ @@ -1136,6 +1213,127 @@ "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + + /* show that wWeight is at the correct offset in CHARFORMAT2A */ + memset(&cf2, 0, sizeof(cf2)); + cf2.cbSize = sizeof(cf2); + cf2.dwMask = CFM_WEIGHT; + cf2.wWeight = 100; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(cf2)); + cf2.cbSize = sizeof(cf2); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok(cf2.wWeight == 100, "got %d\n", cf2.wWeight); + + memset(&cf2, 0, sizeof(cf2)); + cf2.cbSize = sizeof(cf2); + cf2.dwMask = CFM_SPACING; + cf2.sSpacing = 10; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(cf2)); + cf2.cbSize = sizeof(cf2); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok(cf2.sSpacing == 10, "got %d\n", cf2.sSpacing); + + /* show that wWeight is at the correct offset in CHARFORMAT2W */ + memset(&cfW, 0, sizeof(cfW)); + cfW.cbSize = sizeof(cfW); + cfW.dwMask = CFM_WEIGHT; + cfW.wWeight = 100; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfW); + memset(&cfW, 0, sizeof(cfW)); + cfW.cbSize = sizeof(cfW); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfW); + ok(cfW.wWeight == 100, "got %d\n", cfW.wWeight); + + memset(&cfW, 0, sizeof(cfW)); + cfW.cbSize = sizeof(cfW); + cfW.dwMask = CFM_SPACING; + cfW.sSpacing = 10; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfW); + memset(&cfW, 0, sizeof(cfW)); + cfW.cbSize = sizeof(cfW); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfW); + ok(cfW.sSpacing == 10, "got %d\n", cfW.sSpacing); + + /* test CFE_UNDERLINE and bUnderlineType interaction */ + /* clear bold, italic */ + SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + cf2.dwMask = CFM_BOLD | CFM_ITALIC; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + + /* check CFE_UNDERLINE is clear and bUnderlineType is CFU_UNDERLINE */ + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINE, "got %x\n", cf2.bUnderlineType); + + /* simply touching bUnderlineType will toggle CFE_UNDERLINE */ + cf2.dwMask = CFM_UNDERLINETYPE; + cf2.bUnderlineType = CFU_UNDERLINE; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINE, "got %x\n", cf2.bUnderlineType); + + /* setting bUnderline to CFU_UNDERLINENONE clears CFE_UNDERLINE */ + cf2.dwMask = CFM_UNDERLINETYPE; + cf2.bUnderlineType = CFU_UNDERLINENONE; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINENONE, "got %x\n", cf2.bUnderlineType); + + /* another underline type also sets CFE_UNDERLINE */ + cf2.dwMask = CFM_UNDERLINETYPE; + cf2.bUnderlineType = CFU_UNDERLINEDOUBLE; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType); + + /* However explicitly clearing CFE_UNDERLINE results in it remaining cleared */ + cf2.dwMask = CFM_UNDERLINETYPE | CFM_UNDERLINE; + cf2.bUnderlineType = CFU_UNDERLINEDOUBLE; + cf2.dwEffects = 0; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType); + + /* And turing it back on again by just setting CFE_UNDERLINE */ + cf2.dwMask = CFM_UNDERLINE; + cf2.dwEffects = CFE_UNDERLINE; + SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + memset(&cf2, 0, sizeof(CHARFORMAT2A)); + cf2.cbSize = sizeof(CHARFORMAT2A); + SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), + "got %08x\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType); DestroyWindow(hwndRichEdit); } @@ -1306,6 +1504,12 @@ ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret); ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask); + + /* Test some other paraformat field defaults */ + ok( fmt.wNumbering == 0, "got %d\n", fmt.wNumbering ); + ok( fmt.wNumberingStart == 0, "got %d\n", fmt.wNumberingStart ); + ok( fmt.wNumberingStyle == 0, "got %04x\n", fmt.wNumberingStyle ); + ok( fmt.wNumberingTab == 0, "got %d\n", fmt.wNumberingTab ); DestroyWindow(hwndRichEdit); } @@ -8372,6 +8576,110 @@ DestroyWindow(hwndRichEdit); } +static void test_eop_char_fmt(void) +{ + HWND edit = new_richedit( NULL ); + const char *rtf = "{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}" + "{\\fs10{\\pard\\fs16\\fi200\\li360\\f0 First\\par" + "\\f0\\fs25 Second\\par" + "{\\f0\\fs26 Third}\\par" + "{\\f0\\fs22 Fourth}\\par}}}"; + EDITSTREAM es; + CHARFORMAT2W cf; + int i, num, expect_height; + + es.dwCookie = (DWORD_PTR)&rtf; + es.dwError = 0; + es.pfnCallback = test_EM_STREAMIN_esCallback; + num = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); + ok( num == 25, "got %d\n", num ); + + for (i = 0; i <= num; i++) + { + SendMessageW( edit, EM_SETSEL, i, i + 1 ); + cf.cbSize = sizeof(cf); + cf.dwMask = CFM_SIZE; + SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); + ok( cf.dwMask & CFM_SIZE, "%d: got %08x\n", i, cf.dwMask ); + if (i < 6) expect_height = 160; + else if (i < 13) expect_height = 250; + else if (i < 18) expect_height = 260; + else if (i == 18 || i == 25) expect_height = 250; + else expect_height = 220; + ok( cf.yHeight == expect_height, "%d: got %d\n", i, cf.yHeight ); + } + + DestroyWindow( edit ); +} + +static void test_para_numbering(void) +{ + HWND edit = new_richeditW( NULL ); + const char *numbers = "{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}" + "\\pard{\\pntext\\f0 3.\\tab}{\\*\\pn\\pnlvlbody\\pnfs32\\pnf0\\pnindent1000\\pnstart2\\pndec{\\pntxta.}}" + "\\fs20\\fi200\\li360\\f0 First\\par" + "{\\pntext\\f0 4.\\tab}\\f0 Second\\par" + "{\\pntext\\f0 6.\\tab}\\f0 Third\\par}"; + const WCHAR expect_numbers_txt[] = {'F','i','r','s','t','\r','S','e','c','o','n','d','\r','T','h','i','r','d',0}; + EDITSTREAM es; + WCHAR buf[80]; + LRESULT result; + PARAFORMAT2 fmt, fmt2; + GETTEXTEX get_text; + CHARFORMAT2W cf; + + get_text.cb = sizeof(buf); + get_text.flags = GT_RAWTEXT; + get_text.codepage = 1200; + get_text.lpDefaultChar = NULL; + get_text.lpUsedDefChar = NULL; + + es.dwCookie = (DWORD_PTR)&numbers; + es.dwError = 0; + es.pfnCallback = test_EM_STREAMIN_esCallback; + result = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); + ok( result == lstrlenW( expect_numbers_txt ), "got %ld\n", result ); + + result = SendMessageW( edit, EM_GETTEXTEX, (WPARAM)&get_text, (LPARAM)buf ); + ok( result == lstrlenW( expect_numbers_txt ), "got %ld\n", result ); + ok( !lstrcmpW( buf, expect_numbers_txt ), "got %s\n", wine_dbgstr_w(buf) ); + + SendMessageW( edit, EM_SETSEL, 1, 1 ); + memset( &fmt, 0, sizeof(fmt) ); + fmt.cbSize = sizeof(fmt); + fmt.dwMask = PFM_ALL2; + SendMessageW( edit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt ); + ok( fmt.wNumbering == PFN_ARABIC, "got %d\n", fmt.wNumbering ); + ok( fmt.wNumberingStart == 2, "got %d\n", fmt.wNumberingStart ); + ok( fmt.wNumberingStyle == PFNS_PERIOD, "got %04x\n", fmt.wNumberingStyle ); + ok( fmt.wNumberingTab == 1000, "got %d\n", fmt.wNumberingTab ); + ok( fmt.dxStartIndent == 560, "got %d\n", fmt.dxStartIndent ); + ok( fmt.dxOffset == -200, "got %d\n", fmt.dxOffset ); + + /* Second para should have identical fmt */ + SendMessageW( edit, EM_SETSEL, 10, 10 ); + memset( &fmt2, 0, sizeof(fmt2) ); + fmt2.cbSize = sizeof(fmt2); + fmt2.dwMask = PFM_ALL2; + SendMessageW( edit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt2 ); + ok( !memcmp( &fmt, &fmt2, sizeof(fmt) ), "format mismatch\n" ); + + /* Check the eop heights - this determines the label height */ + SendMessageW( edit, EM_SETSEL, 12, 13 ); + cf.cbSize = sizeof(cf); + cf.dwMask = CFM_SIZE; + SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); + ok( cf.yHeight == 200, "got %d\n", cf.yHeight ); + + SendMessageW( edit, EM_SETSEL, 18, 19 ); + cf.cbSize = sizeof(cf); + cf.dwMask = CFM_SIZE; + SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); + ok( cf.yHeight == 200, "got %d\n", cf.yHeight ); + + DestroyWindow( edit ); +} + static void test_window_classes(void) { static const struct @@ -8476,6 +8784,8 @@ test_alignment_style(); test_rtf_specials(); test_background(); + test_eop_char_fmt(); + test_para_numbering(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging. Modified: trunk/rostests/winetests/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/richol…
============================================================================== --- trunk/rostests/winetests/riched20/richole.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/richole.c [iso-8859-1] Thu Nov 17 23:05:13 2016 @@ -1741,7 +1741,6 @@ value = 0; hr = ITextFont_GetLanguageID(font, &value); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine ok(value == GetSystemDefaultLCID(), "got lcid %x, user lcid %x\n", value, GetSystemDefaultLCID());
8 years, 1 month
1
0
0
0
[akhaldi] 73288: [RICHED20] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 23:04:08 2016 New Revision: 73288 URL:
http://svn.reactos.org/svn/reactos?rev=73288&view=rev
Log: [RICHED20] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/riched20/caret.c trunk/reactos/dll/win32/riched20/editor.c trunk/reactos/dll/win32/riched20/editor.h trunk/reactos/dll/win32/riched20/editstr.h trunk/reactos/dll/win32/riched20/list.c trunk/reactos/dll/win32/riched20/paint.c trunk/reactos/dll/win32/riched20/para.c trunk/reactos/dll/win32/riched20/reader.c trunk/reactos/dll/win32/riched20/richole.c trunk/reactos/dll/win32/riched20/run.c trunk/reactos/dll/win32/riched20/string.c trunk/reactos/dll/win32/riched20/style.c trunk/reactos/dll/win32/riched20/table.c trunk/reactos/dll/win32/riched20/undo.c trunk/reactos/dll/win32/riched20/wrap.c trunk/reactos/dll/win32/riched20/writer.c trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/riched20/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/caret.c…
Modified: trunk/reactos/dll/win32/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editstr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editstr…
Modified: trunk/reactos/dll/win32/riched20/list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/list.c?…
Modified: trunk/reactos/dll/win32/riched20/paint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/paint.c…
Modified: trunk/reactos/dll/win32/riched20/para.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/para.c?…
Modified: trunk/reactos/dll/win32/riched20/reader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/reader.…
Modified: trunk/reactos/dll/win32/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/richole…
Modified: trunk/reactos/dll/win32/riched20/run.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/run.c?r…
Modified: trunk/reactos/dll/win32/riched20/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/string.…
Modified: trunk/reactos/dll/win32/riched20/style.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/style.c…
Modified: trunk/reactos/dll/win32/riched20/table.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/table.c…
Modified: trunk/reactos/dll/win32/riched20/undo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/undo.c?…
Modified: trunk/reactos/dll/win32/riched20/wrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/wrap.c?…
Modified: trunk/reactos/dll/win32/riched20/writer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/writer.…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
8 years, 1 month
1
0
0
0
[akhaldi] 73287: [QMGR] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 23:01:19 2016 New Revision: 73287 URL:
http://svn.reactos.org/svn/reactos?rev=73287&view=rev
Log: [QMGR] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/qmgr/file.c trunk/reactos/dll/win32/qmgr/job.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/qmgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/qmgr/file.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/qmgr/file.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/qmgr/file.c [iso-8859-1] Thu Nov 17 23:01:19 2016 @@ -193,7 +193,7 @@ return S_OK; } -static HRESULT error_from_http_response(DWORD code) +static HRESULT hresult_from_http_response(DWORD code) { switch (code) { @@ -231,7 +231,7 @@ if (WinHttpQueryHeaders(handle, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &code, &size, NULL)) { - if ((job->error.code = error_from_http_response(code))) + if ((job->error.code = hresult_from_http_response(code))) { EnterCriticalSection(&job->cs); @@ -273,7 +273,7 @@ case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: { WINHTTP_ASYNC_RESULT *result = (WINHTTP_ASYNC_RESULT *)buf; - job->error.code = result->dwError; + job->error.code = HRESULT_FROM_WIN32(result->dwError); transitionJobState(job, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_ERROR); break; } @@ -378,10 +378,10 @@ if (!set_request_credentials(req, job)) goto done; if (!(WinHttpSendRequest(req, job->http_options.headers, ~0u, NULL, 0, 0, (DWORD_PTR)file))) goto done; - if (wait_for_completion(job) || job->error.code) goto done; + if (wait_for_completion(job) || FAILED(job->error.code)) goto done; if (!(WinHttpReceiveResponse(req, NULL))) goto done; - if (wait_for_completion(job) || job->error.code) goto done; + if (wait_for_completion(job) || FAILED(job->error.code)) goto done; transitionJobState(job, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_TRANSFERRING); @@ -392,7 +392,7 @@ { file->read_size = 0; if (!(ret = WinHttpReadData(req, buf, sizeof(buf), NULL))) break; - if (wait_for_completion(job) || job->error.code) + if (wait_for_completion(job) || FAILED(job->error.code)) { ret = FALSE; break; Modified: trunk/reactos/dll/win32/qmgr/job.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/qmgr/job.c?rev=7…
============================================================================== --- trunk/reactos/dll/win32/qmgr/job.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/qmgr/job.c [iso-8859-1] Thu Nov 17 23:01:19 2016 @@ -364,7 +364,8 @@ && This->state != BG_JOB_STATE_TRANSFERRING) { This->state = BG_JOB_STATE_QUEUED; - This->error.context = This->error.code = 0; + This->error.context = 0; + This->error.code = S_OK; if (This->error.file) { IBackgroundCopyFile2_Release(This->error.file); @@ -1238,7 +1239,7 @@ This->callback2 = FALSE; This->error.context = 0; - This->error.code = 0; + This->error.code = S_OK; This->error.file = NULL; memset(&This->http_options, 0, sizeof(This->http_options)); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 23:01:19 2016 @@ -153,7 +153,7 @@ reactos/dll/win32/printui # Synced to WineStaging-1.9.11 reactos/dll/win32/propsys # Synced to WineStaging-1.9.16 reactos/dll/win32/pstorec # Synced to WineStaging-1.9.16 -reactos/dll/win32/qmgr # Synced to WineStaging-1.9.11 +reactos/dll/win32/qmgr # Synced to WineStaging-1.9.23 reactos/dll/win32/qmgrprxy # Synced to WineStaging-1.9.11 reactos/dll/win32/query # Synced to WineStaging-1.9.11 reactos/dll/win32/rasapi32 # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73286: [OLEAUT32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:59:30 2016 New Revision: 73286 URL:
http://svn.reactos.org/svn/reactos?rev=73286&view=rev
Log: [OLEAUT32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/oleaut32/olefont.c trunk/rostests/winetests/oleaut32/olepicture.c trunk/rostests/winetests/oleaut32/safearray.c trunk/rostests/winetests/oleaut32/typelib.c trunk/rostests/winetests/oleaut32/vartest.c Modified: trunk/rostests/winetests/oleaut32/olefont.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/olefon…
============================================================================== --- trunk/rostests/winetests/oleaut32/olefont.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/olefont.c [iso-8859-1] Thu Nov 17 22:59:30 2016 @@ -1235,6 +1235,7 @@ static void test_OleCreateFontIndirect(void) { FONTDESC fontdesc; + IUnknown *unk, *unk2; IFont *font; HRESULT hr; @@ -1266,6 +1267,20 @@ hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void**)&font); EXPECT_HR(hr, S_OK); IFont_Release(font); + + hr = OleInitialize(NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = CoGetClassObject(&CLSID_StdFont, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&unk); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void**)&unk2); + ok(hr == S_OK, "got 0x%08x\n", hr); + + IUnknown_Release(unk); + IUnknown_Release(unk2); + + OleUninitialize(); } START_TEST(olefont) Modified: trunk/rostests/winetests/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/olepic…
============================================================================== --- trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] Thu Nov 17 22:59:30 2016 @@ -173,6 +173,25 @@ 0x14, 0x00, 0x00, 0x00 }; +static HBITMAP stock_bm; + +static HDC create_render_dc( void ) +{ + HDC dc = CreateCompatibleDC( NULL ); + BITMAPINFO info = {{sizeof(info.bmiHeader), 100, 100, 1, 32, BI_RGB }}; + void *bits; + HBITMAP dib = CreateDIBSection( NULL, &info, DIB_RGB_COLORS, &bits, NULL, 0 ); + + stock_bm = SelectObject( dc, dib ); + return dc; +} + +static void delete_render_dc( HDC dc ) +{ + HBITMAP dib = SelectObject( dc, stock_bm ); + DeleteObject( dib ); + DeleteDC( dc ); +} typedef struct NoStatStreamImpl { @@ -484,7 +503,7 @@ ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); /* DISPID_PICT_RENDER */ - hdc = GetDC(0); + hdc = create_render_dc(); for (i = 0; i < sizeof(args)/sizeof(args[0]); i++) V_VT(&args[i]) = VT_I4; @@ -520,7 +539,7 @@ hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); ok(hr == DISP_E_BADPARAMCOUNT, "got 0x%08x\n", hr); - ReleaseDC(NULL, hdc); + delete_render_dc(hdc); IPictureDisp_Release(picdisp); } @@ -704,7 +723,7 @@ OLE_XSIZE_HIMETRIC pWidth; OLE_YSIZE_HIMETRIC pHeight; COLORREF result, expected; - HDC hdc = GetDC(0); + HDC hdc = create_render_dc(); /* test IPicture::Render return code on uninitialized picture */ OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic); @@ -736,7 +755,7 @@ desc.u.icon.hicon = LoadIconA(NULL, (LPCSTR)IDI_APPLICATION); if(!desc.u.icon.hicon){ win_skip("LoadIcon failed. Skipping...\n"); - ReleaseDC(NULL, hdc); + delete_render_dc(hdc); return; } @@ -769,27 +788,22 @@ hres = picture_render(pic, hdc, 1, 1, 9, 9, 0, 0, pWidth, -pHeight, NULL); ole_expect(hres, S_OK); - if(hres != S_OK) { - IPicture_Release(pic); - ReleaseDC(NULL, hdc); - return; - } + if(hres != S_OK) goto done; /* Evaluate the rendered Icon */ result = GetPixel(hdc, 0, 0); ok(result == expected, "Color at 0,0 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); result = GetPixel(hdc, 5, 5); - ok(result != expected || - broken(result == expected), /* WinNT 4.0 and older may claim they drew */ - /* the icon, even if they didn't. */ + ok(result != expected, "Color at 5,5 should have changed, but still was 0x%06X\n", expected); result = GetPixel(hdc, 10, 10); ok(result == expected, "Color at 10,10 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); +done: IPicture_Release(pic); - ReleaseDC(NULL, hdc); + delete_render_dc(hdc); } static void test_get_Attributes(void) Modified: trunk/rostests/winetests/oleaut32/safearray.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/safear…
============================================================================== --- trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] Thu Nov 17 22:59:30 2016 @@ -710,11 +710,9 @@ } if (!pSafeArrayAllocDescriptorEx) - { return; - } - - for (i=0;i<sizeof(vttypes)/sizeof(vttypes[0]);i++) { + + for (i = 0; i < sizeof(vttypes)/sizeof(vttypes[0]); i++) { a = NULL; hres = pSafeArrayAllocDescriptorEx(vttypes[i].vt,1,&a); ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres); @@ -768,7 +766,7 @@ } hres = SafeArrayDestroyDescriptor(a); ok(hres == S_OK,"SADD failed with hres %x\n",hres); - } + } } static void test_SafeArrayAllocDestroyDescriptor(void) Modified: trunk/rostests/winetests/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/typeli…
============================================================================== --- trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] Thu Nov 17 22:59:30 2016 @@ -229,15 +229,13 @@ static void test_TypeComp(void) { + ITypeComp *pTypeComp, *tcomp, *pTypeComp_tmp; + ITypeInfo *pTypeInfo, *ti, *pFontTypeInfo; ITypeLib *pTypeLib; - ITypeComp *pTypeComp; HRESULT hr; ULONG ulHash; DESCKIND desckind; BINDPTR bindptr; - ITypeInfo *pTypeInfo; - ITypeInfo *pFontTypeInfo; - ITypeComp *pTypeComp_tmp; static WCHAR wszStdFunctions[] = {'S','t','d','F','u','n','c','t','i','o','n','s',0}; static WCHAR wszSavePicture[] = {'S','a','v','e','P','i','c','t','u','r','e',0}; static WCHAR wszOLE_TRISTATE[] = {'O','L','E','_','T','R','I','S','T','A','T','E',0}; @@ -437,6 +435,17 @@ hr = ITypeInfo_GetTypeComp(pFontTypeInfo, &pTypeComp); ok_ole_success(hr, ITypeLib_GetTypeComp); + + hr = ITypeInfo_QueryInterface(pFontTypeInfo, &IID_ITypeComp, (void**)&tcomp); + ok(hr == S_OK, "got %08x\n", hr); + ok(tcomp == pTypeComp, "got %p, was %p\n", tcomp, pTypeComp); + + hr = ITypeComp_QueryInterface(tcomp, &IID_ITypeInfo, (void**)&ti); + ok(hr == S_OK, "got %08x\n", hr); + ok(ti == pFontTypeInfo, "got %p, was %p\n", ti, pFontTypeInfo); + ITypeInfo_Release(ti); + + ITypeComp_Release(tcomp); ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, 0, &pTypeInfo, &desckind, &bindptr); @@ -1686,7 +1695,7 @@ ITypeInfo *interface1, *interface2, *dual, *unknown, *dispatch, *ti; ITypeInfo *tinfos[2]; ITypeInfo2 *ti2; - ITypeComp *tcomp; + ITypeComp *tcomp, *tcomp2; MEMBERID memids[2]; FUNCDESC funcdesc, *pfuncdesc; ELEMDESC elemdesc[5], *edesc; @@ -2026,6 +2035,8 @@ funcdesc.lprgelemdescParam = NULL; funcdesc.invkind = INVOKE_FUNC; funcdesc.cParams = 0; + funcdesc.cScodes = 1; + funcdesc.lprgscode = NULL; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); @@ -3600,6 +3611,11 @@ hres = ITypeInfo_GetTypeComp(ti, &tcomp); ok(hres == S_OK, "got %08x\n", hres); + + hres = ITypeInfo_QueryInterface(ti, &IID_ITypeComp, (void**)&tcomp2); + ok(hres == S_OK, "got %08x\n", hres); + ok(tcomp == tcomp2, "got %p, was %p\n", tcomp2, tcomp); + ITypeComp_Release(tcomp2); hres = ITypeComp_Bind(tcomp, invokeW, 0, INVOKE_FUNC, &interface1, &desckind, &bindptr); ok(hres == S_OK, "got %08x\n", hres); Modified: trunk/rostests/winetests/oleaut32/vartest.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartes…
============================================================================== --- trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/vartest.c [iso-8859-1] Thu Nov 17 22:59:30 2016 @@ -727,12 +727,13 @@ /* DISPATCH */ V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl; + V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl.IUnknown_iface; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); ok(hres == S_OK, "ret %08x\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl, "dispatch %p\n", V_DISPATCH(&v)); + ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl.IUnknown_iface, + "dispatch %p\n", V_DISPATCH(&v)); /* Check that Release got called, but nothing else */ ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events);
8 years, 1 month
1
0
0
0
[akhaldi] 73285: [OLEAUT32] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:58:15 2016 New Revision: 73285 URL:
http://svn.reactos.org/svn/reactos?rev=73285&view=rev
Log: [OLEAUT32] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/oleaut32/oleaut.c trunk/reactos/dll/win32/oleaut32/olefont.c trunk/reactos/dll/win32/oleaut32/olepicture.c trunk/reactos/dll/win32/oleaut32/typelib.c trunk/reactos/dll/win32/oleaut32/usrmarshal.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/oleaut32/oleaut.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut.…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -854,7 +854,8 @@ return S_OK; /*FALLTHROUGH*/ } - if (IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) || + if (IsEqualCLSID(rclsid, &CLSID_PSTypeComp) || + IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) || IsEqualCLSID(rclsid, &CLSID_PSTypeLib) || IsEqualCLSID(rclsid, &CLSID_PSDispatch) || IsEqualCLSID(rclsid, &CLSID_PSEnumVariant)) Modified: trunk/reactos/dll/win32/oleaut32/olefont.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olefont…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/olefont.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olefont.c [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -994,8 +994,10 @@ newObject->pPropertyNotifyCP = NULL; newObject->pFontEventsCP = NULL; - CreateConnectionPoint((IUnknown*)newObject, &IID_IPropertyNotifySink, &newObject->pPropertyNotifyCP); - CreateConnectionPoint((IUnknown*)newObject, &IID_IFontEventsDisp, &newObject->pFontEventsCP); + CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IPropertyNotifySink, + &newObject->pPropertyNotifyCP); + CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IFontEventsDisp, + &newObject->pFontEventsCP); if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP) { @@ -2209,12 +2211,22 @@ return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); } -static HRESULT WINAPI -SFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - - FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); - return E_NOINTERFACE; +static HRESULT WINAPI SFCF_QueryInterface(IClassFactory *iface, REFIID riid, void **obj) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj); + + *obj = NULL; + + if (IsEqualIID(&IID_IClassFactory, riid) || IsEqualIID(&IID_IUnknown, riid)) + { + *obj = iface; + IClassFactory_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; } static ULONG WINAPI Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -291,7 +291,8 @@ newObject->IConnectionPointContainer_iface.lpVtbl = &OLEPictureImpl_IConnectionPointContainer_VTable; newObject->pCP = NULL; - CreateConnectionPoint((IUnknown*)newObject,&IID_IPropertyNotifySink,&newObject->pCP); + CreateConnectionPoint((IUnknown*)&newObject->IPicture_iface, &IID_IPropertyNotifySink, + &newObject->pCP); if (!newObject->pCP) { HeapFree(GetProcessHeap(), 0, newObject); Modified: trunk/reactos/dll/win32/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -460,6 +460,9 @@ HRESULT res; TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib); + + if (!szFile || !pptLib) + return E_INVALIDARG; *pptLib = NULL; @@ -1222,22 +1225,8 @@ BOOL needs_layout; TLBGuid *guid; - LCID lcid; - MEMBERID memidConstructor; - MEMBERID memidDestructor; - LPOLESTR lpstrSchema; - ULONG cbSizeInstance; - TYPEKIND typekind; - WORD cFuncs; - WORD cVars; - WORD cImplTypes; - WORD cbSizeVft; - WORD cbAlignment; - WORD wTypeFlags; - WORD wMajorVerNum; - WORD wMinorVerNum; + TYPEATTR typeattr; TYPEDESC *tdescAlias; - IDLDESC idldescType; ITypeLibImpl * pTypeLib; /* back pointer to typelib */ int index; /* index in this typelib; */ @@ -1564,15 +1553,15 @@ TRACE("%p ref=%u\n", pty, pty->ref); TRACE("%s %s\n", debugstr_w(TLB_get_bstr(pty->Name)), debugstr_w(TLB_get_bstr(pty->DocString))); TRACE("attr:%s\n", debugstr_guid(TLB_get_guidref(pty->guid))); - TRACE("kind:%s\n", typekind_desc[pty->typekind]); - TRACE("fct:%u var:%u impl:%u\n", pty->cFuncs, pty->cVars, pty->cImplTypes); - TRACE("wTypeFlags: 0x%04x\n", pty->wTypeFlags); + TRACE("kind:%s\n", typekind_desc[pty->typeattr.typekind]); + TRACE("fct:%u var:%u impl:%u\n", pty->typeattr.cFuncs, pty->typeattr.cVars, pty->typeattr.cImplTypes); + TRACE("wTypeFlags: 0x%04x\n", pty->typeattr.wTypeFlags); TRACE("parent tlb:%p index in TLB:%u\n",pty->pTypeLib, pty->index); - if (pty->typekind == TKIND_MODULE) TRACE("dllname:%s\n", debugstr_w(TLB_get_bstr(pty->DllName))); + if (pty->typeattr.typekind == TKIND_MODULE) TRACE("dllname:%s\n", debugstr_w(TLB_get_bstr(pty->DllName))); if (TRACE_ON(ole)) - dump_TLBFuncDesc(pty->funcdescs, pty->cFuncs); - dump_TLBVarDesc(pty->vardescs, pty->cVars); - dump_TLBImplType(pty->impltypes, pty->cImplTypes); + dump_TLBFuncDesc(pty->funcdescs, pty->typeattr.cFuncs); + dump_TLBVarDesc(pty->vardescs, pty->typeattr.cVars); + dump_TLBImplType(pty->impltypes, pty->typeattr.cImplTypes); } static void dump_VARDESC(const VARDESC *v) @@ -2630,7 +2619,7 @@ * and some structures, and fix the alignment */ static void TLB_fix_32on64_typeinfo(ITypeInfoImpl *info) { - if(info->typekind == TKIND_ALIAS){ + if(info->typeattr.typekind == TKIND_ALIAS){ switch(info->tdescAlias->vt){ case VT_BSTR: case VT_DISPATCH: @@ -2639,28 +2628,28 @@ case VT_SAFEARRAY: case VT_LPSTR: case VT_LPWSTR: - info->cbSizeInstance = sizeof(void*); - info->cbAlignment = sizeof(void*); + info->typeattr.cbSizeInstance = sizeof(void*); + info->typeattr.cbAlignment = sizeof(void*); break; case VT_CARRAY: case VT_USERDEFINED: - TLB_size_instance(info, SYS_WIN64, info->tdescAlias, &info->cbSizeInstance, &info->cbAlignment); + TLB_size_instance(info, SYS_WIN64, info->tdescAlias, &info->typeattr.cbSizeInstance, &info->typeattr.cbAlignment); break; case VT_VARIANT: - info->cbSizeInstance = sizeof(VARIANT); - info->cbAlignment = 8; + info->typeattr.cbSizeInstance = sizeof(VARIANT); + info->typeattr.cbAlignment = 8; default: - if(info->cbSizeInstance < sizeof(void*)) - info->cbAlignment = info->cbSizeInstance; + if(info->typeattr.cbSizeInstance < sizeof(void*)) + info->typeattr.cbAlignment = info->typeattr.cbSizeInstance; else - info->cbAlignment = sizeof(void*); + info->typeattr.cbAlignment = sizeof(void*); break; } - }else if(info->typekind == TKIND_INTERFACE || - info->typekind == TKIND_DISPATCH || - info->typekind == TKIND_COCLASS){ - info->cbSizeInstance = sizeof(void*); - info->cbAlignment = sizeof(void*); + }else if(info->typeattr.typekind == TKIND_INTERFACE || + info->typeattr.typekind == TKIND_DISPATCH || + info->typeattr.typekind == TKIND_COCLASS){ + info->typeattr.cbSizeInstance = sizeof(void*); + info->typeattr.cbAlignment = sizeof(void*); } } #endif @@ -2687,19 +2676,19 @@ ptiRet->index=count; ptiRet->guid = MSFT_ReadGuid(tiBase.posguid, pcx); - ptiRet->lcid=pLibInfo->set_lcid; /* FIXME: correct? */ - ptiRet->lpstrSchema=NULL; /* reserved */ - ptiRet->cbSizeInstance=tiBase.size; - ptiRet->typekind=tiBase.typekind & 0xF; - ptiRet->cFuncs=LOWORD(tiBase.cElement); - ptiRet->cVars=HIWORD(tiBase.cElement); - ptiRet->cbAlignment=(tiBase.typekind >> 11 )& 0x1F; /* there are more flags there */ - ptiRet->wTypeFlags=tiBase.flags; - ptiRet->wMajorVerNum=LOWORD(tiBase.version); - ptiRet->wMinorVerNum=HIWORD(tiBase.version); - ptiRet->cImplTypes=tiBase.cImplTypes; - ptiRet->cbSizeVft=tiBase.cbSizeVft; /* FIXME: this is only the non inherited part */ - if(ptiRet->typekind == TKIND_ALIAS){ + ptiRet->typeattr.lcid = pLibInfo->set_lcid; /* FIXME: correct? */ + ptiRet->typeattr.lpstrSchema = NULL; /* reserved */ + ptiRet->typeattr.cbSizeInstance = tiBase.size; + ptiRet->typeattr.typekind = tiBase.typekind & 0xF; + ptiRet->typeattr.cFuncs = LOWORD(tiBase.cElement); + ptiRet->typeattr.cVars = HIWORD(tiBase.cElement); + ptiRet->typeattr.cbAlignment = (tiBase.typekind >> 11 )& 0x1F; /* there are more flags there */ + ptiRet->typeattr.wTypeFlags = tiBase.flags; + ptiRet->typeattr.wMajorVerNum = LOWORD(tiBase.version); + ptiRet->typeattr.wMinorVerNum = HIWORD(tiBase.version); + ptiRet->typeattr.cImplTypes = tiBase.cImplTypes; + ptiRet->typeattr.cbSizeVft = tiBase.cbSizeVft; /* FIXME: this is only the non inherited part */ + if (ptiRet->typeattr.typekind == TKIND_ALIAS) { TYPEDESC tmp; MSFT_GetTdesc(pcx, tiBase.datatype1, &tmp); ptiRet->tdescAlias = heap_alloc(TLB_SizeTypeDesc(&tmp, TRUE)); @@ -2718,27 +2707,27 @@ ptiRet->dwHelpStringContext=tiBase.helpstringcontext; ptiRet->dwHelpContext=tiBase.helpcontext; - if (ptiRet->typekind == TKIND_MODULE) + if (ptiRet->typeattr.typekind == TKIND_MODULE) ptiRet->DllName = MSFT_ReadString(pcx, tiBase.datatype1); /* note: InfoType's Help file and HelpStringDll come from the containing * library. Further HelpString and Docstring appear to be the same thing :( */ /* functions */ - if(ptiRet->cFuncs >0 ) - MSFT_DoFuncs(pcx, ptiRet, ptiRet->cFuncs, - ptiRet->cVars, + if(ptiRet->typeattr.cFuncs >0 ) + MSFT_DoFuncs(pcx, ptiRet, ptiRet->typeattr.cFuncs, + ptiRet->typeattr.cVars, tiBase.memoffset, &ptiRet->funcdescs); /* variables */ - if(ptiRet->cVars >0 ) - MSFT_DoVars(pcx, ptiRet, ptiRet->cFuncs, - ptiRet->cVars, + if(ptiRet->typeattr.cVars >0 ) + MSFT_DoVars(pcx, ptiRet, ptiRet->typeattr.cFuncs, + ptiRet->typeattr.cVars, tiBase.memoffset, &ptiRet->vardescs); - if(ptiRet->cImplTypes >0 ) { - switch(ptiRet->typekind) + if(ptiRet->typeattr.cImplTypes >0 ) { + switch(ptiRet->typeattr.typekind) { case TKIND_COCLASS: - MSFT_DoImplTypes(pcx, ptiRet, ptiRet->cImplTypes, + MSFT_DoImplTypes(pcx, ptiRet, ptiRet->typeattr.cImplTypes, tiBase.datatype1); break; case TKIND_DISPATCH: @@ -2765,7 +2754,7 @@ TRACE_(typelib)("%s guid: %s kind:%s\n", debugstr_w(TLB_get_bstr(ptiRet->Name)), debugstr_guid(TLB_get_guidref(ptiRet->guid)), - typekind_desc[ptiRet->typekind]); + typekind_desc[ptiRet->typeattr.typekind]); if (TRACE_ON(typelib)) dump_TypeInfo(ptiRet); @@ -4097,14 +4086,14 @@ info = (SLTG_ImplInfo*)pBlk; while(1){ - pTI->cImplTypes++; + pTI->typeattr.cImplTypes++; if(info->next == 0xffff) break; info = (SLTG_ImplInfo*)(pBlk + info->next); } info = (SLTG_ImplInfo*)pBlk; - pTI->impltypes = TLBImplType_Alloc(pTI->cImplTypes); + pTI->impltypes = TLBImplType_Alloc(pTI->typeattr.cImplTypes); pImplType = pTI->impltypes; while(1) { sltg_get_typelib_ref(ref_lookup, info->ref, &pImplType->hRef); @@ -4235,7 +4224,7 @@ prevName = pVarDesc->Name; } - pTI->cVars = cVars; + pTI->typeattr.cVars = cVars; } static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, @@ -4340,7 +4329,7 @@ } } } - pTI->cFuncs = cFuncs; + pTI->typeattr.cFuncs = cFuncs; } static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI, @@ -4388,7 +4377,7 @@ heap_free(ref_lookup); if (TRACE_ON(typelib)) - dump_TLBFuncDesc(pTI->funcdescs, pTI->cFuncs); + dump_TLBFuncDesc(pTI->funcdescs, pTI->typeattr.cFuncs); } static void SLTG_ProcessRecord(char *pBlk, ITypeInfoImpl *pTI, @@ -4447,11 +4436,11 @@ /* this is necessary to cope with MSFT typelibs that set cFuncs to the number * of dispinterface functions including the IDispatch ones, so * ITypeInfo::GetFuncDesc takes the real value for cFuncs from cbSizeVft */ - pTI->cbSizeVft = pTI->cFuncs * pTI->pTypeLib->ptr_size; + pTI->typeattr.cbSizeVft = pTI->typeattr.cFuncs * pTI->pTypeLib->ptr_size; heap_free(ref_lookup); if (TRACE_ON(typelib)) - dump_TLBFuncDesc(pTI->funcdescs, pTI->cFuncs); + dump_TLBFuncDesc(pTI->funcdescs, pTI->typeattr.cFuncs); } static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI, @@ -4695,14 +4684,14 @@ (*ppTypeInfoImpl)->dwHelpContext = pOtherTypeInfoBlks[i].helpcontext; (*ppTypeInfoImpl)->DocString = decode_string(hlp_strings, pOtherTypeInfoBlks[i].extra, pOtherTypeInfoBlks[i].hlpstr_len, pTypeLibImpl); (*ppTypeInfoImpl)->guid = TLB_append_guid(&pTypeLibImpl->guid_list, &pOtherTypeInfoBlks[i].uuid, 2); - (*ppTypeInfoImpl)->typekind = pTIHeader->typekind; - (*ppTypeInfoImpl)->wMajorVerNum = pTIHeader->major_version; - (*ppTypeInfoImpl)->wMinorVerNum = pTIHeader->minor_version; - (*ppTypeInfoImpl)->wTypeFlags = + (*ppTypeInfoImpl)->typeattr.typekind = pTIHeader->typekind; + (*ppTypeInfoImpl)->typeattr.wMajorVerNum = pTIHeader->major_version; + (*ppTypeInfoImpl)->typeattr.wMinorVerNum = pTIHeader->minor_version; + (*ppTypeInfoImpl)->typeattr.wTypeFlags = (pTIHeader->typeflags1 >> 3) | (pTIHeader->typeflags2 << 5); - if((*ppTypeInfoImpl)->wTypeFlags & TYPEFLAG_FDUAL) - (*ppTypeInfoImpl)->typekind = TKIND_DISPATCH; + if((*ppTypeInfoImpl)->typeattr.wTypeFlags & TYPEFLAG_FDUAL) + (*ppTypeInfoImpl)->typeattr.typekind = TKIND_DISPATCH; if((pTIHeader->typeflags1 & 7) != 2) FIXME_(typelib)("typeflags1 = %02x\n", pTIHeader->typeflags1); @@ -4713,15 +4702,15 @@ debugstr_w(TLB_get_bstr((*ppTypeInfoImpl)->Name)), typekind_desc[pTIHeader->typekind], debugstr_guid(TLB_get_guidref((*ppTypeInfoImpl)->guid)), - (*ppTypeInfoImpl)->wTypeFlags); + (*ppTypeInfoImpl)->typeattr.wTypeFlags); pMemHeader = (SLTG_MemberHeader*)((char *)pBlk + pTIHeader->elem_table); pTITail = (SLTG_TypeInfoTail*)((char *)(pMemHeader + 1) + pMemHeader->cbExtra); - (*ppTypeInfoImpl)->cbAlignment = pTITail->cbAlignment; - (*ppTypeInfoImpl)->cbSizeInstance = pTITail->cbSizeInstance; - (*ppTypeInfoImpl)->cbSizeVft = pTITail->cbSizeVft; + (*ppTypeInfoImpl)->typeattr.cbAlignment = pTITail->cbAlignment; + (*ppTypeInfoImpl)->typeattr.cbSizeInstance = pTITail->cbSizeInstance; + (*ppTypeInfoImpl)->typeattr.cbSizeVft = pTITail->cbSizeVft; switch(pTIHeader->typekind) { case TKIND_ENUM: @@ -4971,7 +4960,7 @@ if(index >= This->TypeInfoCount) return TYPE_E_ELEMENTNOTFOUND; - *pTKind = This->typeinfos[index]->typekind; + *pTKind = This->typeinfos[index]->typeattr.typekind; return S_OK; } @@ -5163,7 +5152,7 @@ for(tic = 0; tic < This->TypeInfoCount; ++tic){ ITypeInfoImpl *pTInfo = This->typeinfos[tic]; if(!TLB_str_memcmp(szNameBuf, pTInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit; - for(fdc = 0; fdc < pTInfo->cFuncs; ++fdc) { + for(fdc = 0; fdc < pTInfo->typeattr.cFuncs; ++fdc) { TLBFuncDesc *pFInfo = &pTInfo->funcdescs[fdc]; int pc; if(!TLB_str_memcmp(szNameBuf, pFInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit; @@ -5172,7 +5161,7 @@ goto ITypeLib2_fnIsName_exit; } } - for(vrc = 0; vrc < pTInfo->cVars; ++vrc){ + for(vrc = 0; vrc < pTInfo->typeattr.cVars; ++vrc){ TLBVarDesc *pVInfo = &pTInfo->vardescs[vrc]; if(!TLB_str_memcmp(szNameBuf, pVInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit; } @@ -5222,7 +5211,7 @@ goto ITypeLib2_fnFindName_exit; } - for(fdc = 0; fdc < pTInfo->cFuncs; ++fdc) { + for(fdc = 0; fdc < pTInfo->typeattr.cFuncs; ++fdc) { TLBFuncDesc *func = &pTInfo->funcdescs[fdc]; if(!TLB_str_memcmp(name, func->Name, len)) { @@ -5231,7 +5220,7 @@ } } - var = TLB_get_vardesc_by_name(pTInfo->vardescs, pTInfo->cVars, name); + var = TLB_get_vardesc_by_name(pTInfo->vardescs, pTInfo->typeattr.cVars, name); if (var) { memid[count] = var->vardesc.memid; goto ITypeLib2_fnFindName_exit; @@ -5483,8 +5472,8 @@ /* FIXME: check wFlags here? */ /* FIXME: we should use a hash table to look this info up using lHash * instead of an O(n) search */ - if ((pTypeInfo->typekind == TKIND_ENUM) || - (pTypeInfo->typekind == TKIND_MODULE)) + if ((pTypeInfo->typeattr.typekind == TKIND_ENUM) || + (pTypeInfo->typeattr.typekind == TKIND_MODULE)) { if (pTypeInfo->Name && !strcmpW(pTypeInfo->Name->str, szName)) { @@ -5496,8 +5485,8 @@ } } - if ((pTypeInfo->typekind == TKIND_MODULE) || - (pTypeInfo->typekind == TKIND_ENUM)) + if ((pTypeInfo->typeattr.typekind == TKIND_MODULE) || + (pTypeInfo->typeattr.typekind == TKIND_ENUM)) { ITypeComp *pSubTypeComp = &pTypeInfo->ITypeComp_iface; HRESULT hr; @@ -5512,8 +5501,8 @@ typemismatch = TRUE; } - if ((pTypeInfo->typekind == TKIND_COCLASS) && - (pTypeInfo->wTypeFlags & TYPEFLAG_FAPPOBJECT)) + if ((pTypeInfo->typeattr.typekind == TKIND_COCLASS) && + (pTypeInfo->typeattr.wTypeFlags & TYPEFLAG_FAPPOBJECT)) { ITypeComp *pSubTypeComp = &pTypeInfo->ITypeComp_iface; HRESULT hr; @@ -5650,8 +5639,8 @@ pTypeInfoImpl->ICreateTypeInfo2_iface.lpVtbl = &CreateTypeInfo2Vtbl; pTypeInfoImpl->ref = 0; pTypeInfoImpl->hreftype = -1; - pTypeInfoImpl->memidConstructor = MEMBERID_NIL; - pTypeInfoImpl->memidDestructor = MEMBERID_NIL; + pTypeInfoImpl->typeattr.memidConstructor = MEMBERID_NIL; + pTypeInfoImpl->typeattr.memidDestructor = MEMBERID_NIL; pTypeInfoImpl->pcustdata_list = &pTypeInfoImpl->custdata_list; list_init(pTypeInfoImpl->pcustdata_list); } @@ -5678,9 +5667,11 @@ else if(IsEqualIID(riid, &IID_ICreateTypeInfo) || IsEqualIID(riid, &IID_ICreateTypeInfo2)) *ppvObject = &This->ICreateTypeInfo2_iface; + else if(IsEqualIID(riid, &IID_ITypeComp)) + *ppvObject = &This->ITypeComp_iface; if(*ppvObject){ - ITypeInfo2_AddRef(iface); + IUnknown_AddRef((IUnknown*)*ppvObject); TRACE("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject); return S_OK; } @@ -5709,7 +5700,7 @@ TRACE("destroying ITypeInfo(%p)\n",This); - for (i = 0; i < This->cFuncs; ++i) + for (i = 0; i < This->typeattr.cFuncs; ++i) { int j; TLBFuncDesc *pFInfo = &This->funcdescs[i]; @@ -5726,7 +5717,7 @@ } heap_free(This->funcdescs); - for(i = 0; i < This->cVars; ++i) + for(i = 0; i < This->typeattr.cVars; ++i) { TLBVarDesc *pVInfo = &This->vardescs[i]; if (pVInfo->vardesc_create) { @@ -5740,7 +5731,7 @@ heap_free(This->vardescs); if(This->impltypes){ - for (i = 0; i < This->cImplTypes; ++i){ + for (i = 0; i < This->typeattr.cImplTypes; ++i){ TLBImplType *pImpl = &This->impltypes[i]; TLB_FreeCustData(&pImpl->custdata_list); } @@ -5788,37 +5779,18 @@ TRACE("(%p)\n",This); size = sizeof(**ppTypeAttr); - if (This->typekind == TKIND_ALIAS && This->tdescAlias) + if (This->typeattr.typekind == TKIND_ALIAS && This->tdescAlias) size += TLB_SizeTypeDesc(This->tdescAlias, FALSE); *ppTypeAttr = heap_alloc(size); if (!*ppTypeAttr) return E_OUTOFMEMORY; + **ppTypeAttr = This->typeattr; (*ppTypeAttr)->guid = *TLB_get_guid_null(This->guid); - (*ppTypeAttr)->lcid = This->lcid; - (*ppTypeAttr)->memidConstructor = This->memidConstructor; - (*ppTypeAttr)->memidDestructor = This->memidDestructor; - (*ppTypeAttr)->lpstrSchema = This->lpstrSchema; - (*ppTypeAttr)->cbSizeInstance = This->cbSizeInstance; - (*ppTypeAttr)->typekind = This->typekind; - (*ppTypeAttr)->cFuncs = This->cFuncs; - (*ppTypeAttr)->cVars = This->cVars; - (*ppTypeAttr)->cImplTypes = This->cImplTypes; - (*ppTypeAttr)->cbSizeVft = This->cbSizeVft; - (*ppTypeAttr)->cbAlignment = This->cbAlignment; - (*ppTypeAttr)->wTypeFlags = This->wTypeFlags; - (*ppTypeAttr)->wMajorVerNum = This->wMajorVerNum; - (*ppTypeAttr)->wMinorVerNum = This->wMinorVerNum; - (*ppTypeAttr)->idldescType = This->idldescType; if (This->tdescAlias) - TLB_CopyTypeDesc(&(*ppTypeAttr)->tdescAlias, - This->tdescAlias, *ppTypeAttr + 1); - else{ - (*ppTypeAttr)->tdescAlias.vt = VT_EMPTY; - (*ppTypeAttr)->tdescAlias.u.lptdesc = NULL; - } + TLB_CopyTypeDesc(&(*ppTypeAttr)->tdescAlias, This->tdescAlias, *ppTypeAttr + 1); if((*ppTypeAttr)->typekind == TKIND_DISPATCH) { /* This should include all the inherited funcs */ @@ -6012,7 +5984,7 @@ { ITypeInfoImpl *This = impl_from_ITypeInfo(iface); - if (index >= This->cFuncs) + if (index >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; *ppFuncDesc = &This->funcdescs[index].funcdesc; @@ -6054,7 +6026,7 @@ } if (funcs) - *funcs = implemented_funcs + This->cFuncs; + *funcs = implemented_funcs + This->typeattr.cFuncs; else *hrefoffset = 0; @@ -6117,7 +6089,7 @@ if (This->needs_layout) ICreateTypeInfo2_LayOut(&This->ICreateTypeInfo2_iface); - if (This->typekind == TKIND_DISPATCH) + if (This->typeattr.typekind == TKIND_DISPATCH) hr = ITypeInfoImpl_GetInternalDispatchFuncDesc((ITypeInfo *)iface, index, &internal_funcdesc, NULL, &hrefoffset); @@ -6133,9 +6105,9 @@ hr = TLB_AllocAndInitFuncDesc( internal_funcdesc, ppFuncDesc, - This->typekind == TKIND_DISPATCH); - - if ((This->typekind == TKIND_DISPATCH) && hrefoffset) + This->typeattr.typekind == TKIND_DISPATCH); + + if ((This->typeattr.typekind == TKIND_DISPATCH) && hrefoffset) ITypeInfoImpl_FuncDescAddHrefOffset(*ppFuncDesc, hrefoffset); TRACE("-- 0x%08x\n", hr); @@ -6208,7 +6180,7 @@ TRACE("(%p) index %d\n", This, index); - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; if (This->needs_layout) @@ -6237,7 +6209,7 @@ *pcNames = 0; - pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->cFuncs, memid); + pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->typeattr.cFuncs, memid); if(pFDesc) { if(!cMaxNames || !pFDesc->Name) @@ -6255,7 +6227,7 @@ return S_OK; } - pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->cVars, memid); + pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->typeattr.cVars, memid); if(pVDesc) { *rgBstrNames=SysAllocString(TLB_get_bstr(pVDesc->Name)); @@ -6264,7 +6236,7 @@ else { if(This->impltypes && - (This->typekind==TKIND_INTERFACE || This->typekind==TKIND_DISPATCH)) { + (This->typeattr.typekind == TKIND_INTERFACE || This->typeattr.typekind == TKIND_DISPATCH)) { /* recursive search */ ITypeInfo *pTInfo; HRESULT result; @@ -6313,7 +6285,7 @@ retrieve the associated TKIND_INTERFACE handle for the current TKIND_DISPATCH */ - if (This->wTypeFlags & TYPEFLAG_FDUAL) + if (This->typeattr.wTypeFlags & TYPEFLAG_FDUAL) { *pRefType = -2; } @@ -6322,18 +6294,18 @@ hr = TYPE_E_ELEMENTNOTFOUND; } } - else if(index == 0 && This->typekind == TKIND_DISPATCH) + else if(index == 0 && This->typeattr.typekind == TKIND_DISPATCH) { /* All TKIND_DISPATCHs are made to look like they inherit from IDispatch */ *pRefType = This->pTypeLib->dispatch_href; } else { - if(index >= This->cImplTypes) + if(index >= This->typeattr.cImplTypes) hr = TYPE_E_ELEMENTNOTFOUND; else{ *pRefType = This->impltypes[index].hRef; - if(This->typekind == TKIND_INTERFACE) + if (This->typeattr.typekind == TKIND_INTERFACE) *pRefType |= 0x2; } } @@ -6364,12 +6336,12 @@ if(!pImplTypeFlags) return E_INVALIDARG; - if(This->typekind == TKIND_DISPATCH && index == 0){ + if(This->typeattr.typekind == TKIND_DISPATCH && index == 0){ *pImplTypeFlags = 0; return S_OK; } - if(index >= This->cImplTypes) + if(index >= This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; *pImplTypeFlags = This->impltypes[index].implflags; @@ -6396,7 +6368,7 @@ for (i = 0; i < cNames; i++) pMemId[i] = MEMBERID_NIL; - for (fdc = 0; fdc < This->cFuncs; ++fdc) { + for (fdc = 0; fdc < This->typeattr.cFuncs; ++fdc) { int j; const TLBFuncDesc *pFDesc = &This->funcdescs[fdc]; if(!lstrcmpiW(*rgszNames, TLB_get_bstr(pFDesc->Name))) { @@ -6414,7 +6386,7 @@ return ret; } } - pVDesc = TLB_get_vardesc_by_name(This->vardescs, This->cVars, *rgszNames); + pVDesc = TLB_get_vardesc_by_name(This->vardescs, This->typeattr.cVars, *rgszNames); if(pVDesc){ if(cNames) *pMemId = pVDesc->vardesc.memid; @@ -7035,7 +7007,7 @@ This,pIUnk,memid,wFlags,pDispParams,pVarResult,pExcepInfo,pArgErr ); - if( This->wTypeFlags & TYPEFLAG_FRESTRICTED ) + if( This->typeattr.wTypeFlags & TYPEFLAG_FRESTRICTED ) return DISP_E_MEMBERNOTFOUND; if (!pDispParams) @@ -7055,7 +7027,7 @@ /* we do this instead of using GetFuncDesc since it will return a fake * FUNCDESC for dispinterfaces and we want the real function description */ - for (fdc = 0; fdc < This->cFuncs; ++fdc){ + for (fdc = 0; fdc < This->typeattr.cFuncs; ++fdc){ pFuncInfo = &This->funcdescs[fdc]; if ((memid == pFuncInfo->funcdesc.memid) && (wFlags & pFuncInfo->funcdesc.invkind) && @@ -7063,7 +7035,7 @@ break; } - if (fdc < This->cFuncs) { + if (fdc < This->typeattr.cFuncs) { const FUNCDESC *func_desc = &pFuncInfo->funcdesc; if (TRACE_ON(ole)) @@ -7585,7 +7557,7 @@ *pBstrHelpFile=SysAllocString(TLB_get_bstr(This->pTypeLib->HelpFile)); return S_OK; }else {/* for a member */ - pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->cFuncs, memid); + pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->typeattr.cFuncs, memid); if(pFDesc){ if(pBstrName) *pBstrName = SysAllocString(TLB_get_bstr(pFDesc->Name)); @@ -7597,7 +7569,7 @@ *pBstrHelpFile = SysAllocString(TLB_get_bstr(This->pTypeLib->HelpFile)); return S_OK; } - pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->cVars, memid); + pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->typeattr.cVars, memid); if(pVDesc){ if(pBstrName) *pBstrName = SysAllocString(TLB_get_bstr(pVDesc->Name)); @@ -7612,7 +7584,7 @@ } if(This->impltypes && - (This->typekind==TKIND_INTERFACE || This->typekind==TKIND_DISPATCH)) { + (This->typeattr.typekind == TKIND_INTERFACE || This->typeattr.typekind == TKIND_DISPATCH)) { /* recursive search */ ITypeInfo *pTInfo; HRESULT result; @@ -7648,10 +7620,10 @@ if (pBstrName) *pBstrName = NULL; if (pwOrdinal) *pwOrdinal = 0; - if (This->typekind != TKIND_MODULE) + if (This->typeattr.typekind != TKIND_MODULE) return TYPE_E_BADMODULEKIND; - pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->cFuncs, memid); + pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->typeattr.cFuncs, memid); if(pFDesc){ dump_TypeInfo(This); if (TRACE_ON(ole)) @@ -7766,9 +7738,9 @@ if ((INT)hRefType < 0) { ITypeInfoImpl *pTypeInfoImpl; - if (!(This->wTypeFlags & TYPEFLAG_FDUAL) || - !(This->typekind == TKIND_INTERFACE || - This->typekind == TKIND_DISPATCH)) + if (!(This->typeattr.wTypeFlags & TYPEFLAG_FDUAL) || + !(This->typeattr.typekind == TKIND_INTERFACE || + This->typeattr.typekind == TKIND_DISPATCH)) return TYPE_E_ELEMENTNOTFOUND; /* when we meet a DUAL typeinfo, we must create the alternate @@ -7780,10 +7752,10 @@ pTypeInfoImpl->ref = 0; list_init(&pTypeInfoImpl->custdata_list); - if (This->typekind == TKIND_INTERFACE) - pTypeInfoImpl->typekind = TKIND_DISPATCH; + if (This->typeattr.typekind == TKIND_INTERFACE) + pTypeInfoImpl->typeattr.typekind = TKIND_DISPATCH; else - pTypeInfoImpl->typekind = TKIND_INTERFACE; + pTypeInfoImpl->typeattr.typekind = TKIND_INTERFACE; *ppTInfo = (ITypeInfo *)&pTypeInfoImpl->ITypeInfo2_iface; /* the AddRef implicitly adds a reference to the parent typelib, which @@ -7796,7 +7768,7 @@ result = S_OK; } else if ((hRefType & DISPATCH_HREF_MASK) && - (This->typekind == TKIND_DISPATCH)) + (This->typeattr.typekind == TKIND_DISPATCH)) { HREFTYPE href_dispatch = hRefType; result = ITypeInfoImpl_GetDispatchRefTypeInfo((ITypeInfo *)iface, &href_dispatch, ppTInfo); @@ -8097,7 +8069,7 @@ TYPEKIND *pTypeKind) { ITypeInfoImpl *This = impl_from_ITypeInfo2(iface); - *pTypeKind=This->typekind; + *pTypeKind = This->typeattr.typekind; TRACE("(%p) type 0x%0x\n", This,*pTypeKind); return S_OK; } @@ -8112,7 +8084,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeFlags( ITypeInfo2 *iface, ULONG *pTypeFlags) { ITypeInfoImpl *This = impl_from_ITypeInfo2(iface); - *pTypeFlags=This->wTypeFlags; + *pTypeFlags=This->typeattr.wTypeFlags; TRACE("(%p) flags 0x%x\n", This,*pTypeFlags); return S_OK; } @@ -8129,12 +8101,12 @@ UINT fdc; HRESULT result; - for (fdc = 0; fdc < This->cFuncs; ++fdc){ + for (fdc = 0; fdc < This->typeattr.cFuncs; ++fdc){ const TLBFuncDesc *pFuncInfo = &This->funcdescs[fdc]; if(memid == pFuncInfo->funcdesc.memid && (invKind & pFuncInfo->funcdesc.invkind)) break; } - if(fdc < This->cFuncs) { + if(fdc < This->typeattr.cFuncs) { *pFuncIndex = fdc; result = S_OK; } else @@ -8159,7 +8131,7 @@ TRACE("%p %d %p\n", iface, memid, pVarIndex); - pVarInfo = TLB_get_vardesc_by_memberid(This->vardescs, This->cVars, memid); + pVarInfo = TLB_get_vardesc_by_memberid(This->vardescs, This->typeattr.cVars, memid); if(!pVarInfo) return TYPE_E_ELEMENTNOTFOUND; @@ -8211,7 +8183,7 @@ TRACE("%p %u %s %p\n", This, index, debugstr_guid(guid), pVarVal); - if(index >= This->cFuncs) + if(index >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; pCData = TLB_get_custdata_by_guid(&pFDesc->custdata_list, guid); @@ -8242,7 +8214,7 @@ TRACE("%p %u %u %s %p\n", This, indexFunc, indexParam, debugstr_guid(guid), pVarVal); - if(indexFunc >= This->cFuncs) + if(indexFunc >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; if(indexParam >= pFDesc->funcdesc.cParams) @@ -8274,7 +8246,7 @@ TRACE("%p %s %p\n", This, debugstr_guid(guid), pVarVal); - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; pCData = TLB_get_custdata_by_guid(&pVDesc->custdata_list, guid); @@ -8303,7 +8275,7 @@ TRACE("%p %u %s %p\n", This, index, debugstr_guid(guid), pVarVal); - if(index >= This->cImplTypes) + if(index >= This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; pCData = TLB_get_custdata_by_guid(&pRDesc->custdata_list, guid); @@ -8352,7 +8324,7 @@ SysAllocString(TLB_get_bstr(This->pTypeLib->HelpStringDll));/* FIXME */ return S_OK; }else {/* for a member */ - pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->cFuncs, memid); + pFDesc = TLB_get_funcdesc_by_memberid(This->funcdescs, This->typeattr.cFuncs, memid); if(pFDesc){ if(pbstrHelpString) *pbstrHelpString=SysAllocString(TLB_get_bstr(pFDesc->HelpString)); @@ -8363,7 +8335,7 @@ SysAllocString(TLB_get_bstr(This->pTypeLib->HelpStringDll));/* FIXME */ return S_OK; } - pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->cVars, memid); + pVDesc = TLB_get_vardesc_by_memberid(This->vardescs, This->typeattr.cVars, memid); if(pVDesc){ if(pbstrHelpString) *pbstrHelpString=SysAllocString(TLB_get_bstr(pVDesc->HelpString)); @@ -8409,7 +8381,7 @@ TRACE("%p %u %p\n", This, index, pCustData); - if(index >= This->cFuncs) + if(index >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; return TLB_copy_all_custdata(&pFDesc->custdata_list, pCustData); @@ -8428,7 +8400,7 @@ TRACE("%p %u %u %p\n", This, indexFunc, indexParam, pCustData); - if(indexFunc >= This->cFuncs) + if(indexFunc >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; if(indexParam >= pFDesc->funcdesc.cParams) @@ -8450,7 +8422,7 @@ TRACE("%p %u %p\n", This, index, pCustData); - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; return TLB_copy_all_custdata(&pVDesc->custdata_list, pCustData); @@ -8471,7 +8443,7 @@ TRACE("%p %u %p\n", This, index, pCustData); - if(index >= This->cImplTypes) + if(index >= This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; return TLB_copy_all_custdata(&pRDesc->custdata_list, pCustData); @@ -8559,17 +8531,17 @@ pTIIface->Name = NULL; pTIIface->dwHelpContext = -1; pTIIface->guid = NULL; - pTIIface->lcid = lcid; - pTIIface->typekind = TKIND_INTERFACE; - pTIIface->wMajorVerNum = 0; - pTIIface->wMinorVerNum = 0; - pTIIface->cbAlignment = 2; - pTIIface->cbSizeInstance = -1; - pTIIface->cbSizeVft = -1; - pTIIface->cFuncs = 0; - pTIIface->cImplTypes = 0; - pTIIface->cVars = 0; - pTIIface->wTypeFlags = 0; + pTIIface->typeattr.lcid = lcid; + pTIIface->typeattr.typekind = TKIND_INTERFACE; + pTIIface->typeattr.wMajorVerNum = 0; + pTIIface->typeattr.wMinorVerNum = 0; + pTIIface->typeattr.cbAlignment = 2; + pTIIface->typeattr.cbSizeInstance = -1; + pTIIface->typeattr.cbSizeVft = -1; + pTIIface->typeattr.cFuncs = 0; + pTIIface->typeattr.cImplTypes = 0; + pTIIface->typeattr.cVars = 0; + pTIIface->typeattr.wTypeFlags = 0; pTIIface->hreftype = 0; pTIIface->funcdescs = TLBFuncDesc_Alloc(pidata->cMembers); @@ -8602,7 +8574,7 @@ pFuncDesc->HelpString = NULL; pFuncDesc->Entry = NULL; list_init(&pFuncDesc->custdata_list); - pTIIface->cFuncs++; + pTIIface->typeattr.cFuncs++; ++pFuncDesc; } @@ -8614,17 +8586,17 @@ pTIClass->Name = NULL; pTIClass->dwHelpContext = -1; pTIClass->guid = NULL; - pTIClass->lcid = lcid; - pTIClass->typekind = TKIND_COCLASS; - pTIClass->wMajorVerNum = 0; - pTIClass->wMinorVerNum = 0; - pTIClass->cbAlignment = 2; - pTIClass->cbSizeInstance = -1; - pTIClass->cbSizeVft = -1; - pTIClass->cFuncs = 0; - pTIClass->cImplTypes = 1; - pTIClass->cVars = 0; - pTIClass->wTypeFlags = 0; + pTIClass->typeattr.lcid = lcid; + pTIClass->typeattr.typekind = TKIND_COCLASS; + pTIClass->typeattr.wMajorVerNum = 0; + pTIClass->typeattr.wMinorVerNum = 0; + pTIClass->typeattr.cbAlignment = 2; + pTIClass->typeattr.cbSizeInstance = -1; + pTIClass->typeattr.cbSizeVft = -1; + pTIClass->typeattr.cFuncs = 0; + pTIClass->typeattr.cImplTypes = 1; + pTIClass->typeattr.cVars = 0; + pTIClass->typeattr.wTypeFlags = 0; pTIClass->hreftype = sizeof(MSFT_TypeInfoBase); pTIClass->impltypes = TLBImplType_Alloc(1); @@ -8686,7 +8658,7 @@ pBindPtr->lpfuncdesc = NULL; *ppTInfo = NULL; - for(fdc = 0; fdc < This->cFuncs; ++fdc){ + for(fdc = 0; fdc < This->typeattr.cFuncs; ++fdc){ pFDesc = &This->funcdescs[fdc]; if (!lstrcmpiW(TLB_get_bstr(pFDesc->Name), szName)) { if (!wFlags || (pFDesc->funcdesc.invkind & wFlags)) @@ -8697,12 +8669,12 @@ } } - if (fdc < This->cFuncs) + if (fdc < This->typeattr.cFuncs) { HRESULT hr = TLB_AllocAndInitFuncDesc( &pFDesc->funcdesc, &pBindPtr->lpfuncdesc, - This->typekind == TKIND_DISPATCH); + This->typeattr.typekind == TKIND_DISPATCH); if (FAILED(hr)) return hr; *pDescKind = DESCKIND_FUNCDESC; @@ -8710,7 +8682,7 @@ ITypeInfo_AddRef(*ppTInfo); return S_OK; } else { - pVDesc = TLB_get_vardesc_by_name(This->vardescs, This->cVars, szName); + pVDesc = TLB_get_vardesc_by_name(This->vardescs, This->typeattr.cVars, szName); if(pVDesc){ HRESULT hr = TLB_AllocAndInitVarDesc(&pVDesc->vardesc, &pBindPtr->lpvardesc); if (FAILED(hr)) @@ -8738,7 +8710,7 @@ hr = ITypeComp_Bind(pTComp, szName, lHash, wFlags, ppTInfo, pDescKind, pBindPtr); ITypeComp_Release(pTComp); if (SUCCEEDED(hr) && *pDescKind == DESCKIND_FUNCDESC && - This->typekind == TKIND_DISPATCH) + This->typeattr.typekind == TKIND_DISPATCH) { FUNCDESC *tmp = pBindPtr->lpfuncdesc; hr = TLB_AllocAndInitFuncDesc(tmp, &pBindPtr->lpfuncdesc, TRUE); @@ -8865,29 +8837,29 @@ info->pTypeLib = This; info->Name = TLB_append_str(&This->name_list, name); info->index = This->TypeInfoCount; - info->typekind = kind; - info->cbAlignment = 4; - - switch(info->typekind) { + info->typeattr.typekind = kind; + info->typeattr.cbAlignment = 4; + + switch (info->typeattr.typekind) { case TKIND_ENUM: case TKIND_INTERFACE: case TKIND_DISPATCH: case TKIND_COCLASS: - info->cbSizeInstance = This->ptr_size; + info->typeattr.cbSizeInstance = This->ptr_size; break; case TKIND_RECORD: case TKIND_UNION: - info->cbSizeInstance = 0; + info->typeattr.cbSizeInstance = 0; break; case TKIND_MODULE: - info->cbSizeInstance = 2; + info->typeattr.cbSizeInstance = 2; break; case TKIND_ALIAS: - info->cbSizeInstance = -0x75; + info->typeattr.cbSizeInstance = -0x75; break; default: - FIXME("unrecognized typekind %d\n", info->typekind); - info->cbSizeInstance = 0xdeadbeef; + FIXME("unrecognized typekind %d\n", info->typeattr.typekind); + info->typeattr.cbSizeInstance = 0xdeadbeef; break; } @@ -9460,7 +9432,7 @@ MEMBERID *memid; DWORD *name, *offsets, offs; - for(i = 0; i < info->cFuncs; ++i){ + for(i = 0; i < info->typeattr.cFuncs; ++i){ TLBFuncDesc *desc = &info->funcdescs[i]; recorded_size += 6 * sizeof(INT); /* mandatory fields */ @@ -9491,7 +9463,7 @@ extra_size += 2 * sizeof(INT); /* memberid, name offs */ } - for(i = 0; i < info->cVars; ++i){ + for(i = 0; i < info->typeattr.cVars; ++i){ TLBVarDesc *desc = &info->vardescs[i]; recorded_size += 5 * sizeof(INT); /* mandatory fields */ @@ -9517,7 +9489,7 @@ aux_seg->len += recorded_size + extra_size; - aux_seg->len += sizeof(INT) * (info->cVars + info->cFuncs); /* offsets at the end */ + aux_seg->len += sizeof(INT) * (info->typeattr.cVars + info->typeattr.cFuncs); /* offsets at the end */ if(aux_seg->data) aux_seg->data = heap_realloc(aux_seg->data, aux_seg->len); @@ -9530,7 +9502,7 @@ offs = 0; funcrecord = (MSFT_FuncRecord*)(((char *)aux_seg->data) + ret + sizeof(INT)); - for(i = 0; i < info->cFuncs; ++i){ + for(i = 0; i < info->typeattr.cFuncs; ++i){ TLBFuncDesc *desc = &info->funcdescs[i]; DWORD size = 6 * sizeof(INT), paramdefault_size = 0, *paramdefault; @@ -9660,7 +9632,7 @@ } varrecord = (MSFT_VarRecord*)funcrecord; - for(i = 0; i < info->cVars; ++i){ + for(i = 0; i < info->typeattr.cVars; ++i){ TLBVarDesc *desc = &info->vardescs[i]; DWORD size = 5 * sizeof(INT); @@ -9717,19 +9689,19 @@ } memid = (MEMBERID*)varrecord; - for(i = 0; i < info->cFuncs; ++i){ + for(i = 0; i < info->typeattr.cFuncs; ++i){ TLBFuncDesc *desc = &info->funcdescs[i]; *memid = desc->funcdesc.memid; ++memid; } - for(i = 0; i < info->cVars; ++i){ + for(i = 0; i < info->typeattr.cVars; ++i){ TLBVarDesc *desc = &info->vardescs[i]; *memid = desc->vardesc.memid; ++memid; } name = (UINT*)memid; - for(i = 0; i < info->cFuncs; ++i){ + for(i = 0; i < info->typeattr.cFuncs; ++i){ TLBFuncDesc *desc = &info->funcdescs[i]; if(desc->Name) *name = desc->Name->offset; @@ -9737,7 +9709,7 @@ *name = -1; ++name; } - for(i = 0; i < info->cVars; ++i){ + for(i = 0; i < info->typeattr.cVars; ++i){ TLBVarDesc *desc = &info->vardescs[i]; if(desc->Name) *name = desc->Name->offset; @@ -9761,7 +9733,7 @@ DWORD offs = file->ref_seg.len, i; WMSFT_RefChunk *chunk; - file->ref_seg.len += info->cImplTypes * sizeof(WMSFT_RefChunk); + file->ref_seg.len += info->typeattr.cImplTypes * sizeof(WMSFT_RefChunk); if(!file->ref_seg.data) file->ref_seg.data = heap_alloc(file->ref_seg.len); else @@ -9769,11 +9741,11 @@ chunk = (WMSFT_RefChunk*)((char*)file->ref_seg.data + offs); - for(i = 0; i < info->cImplTypes; ++i){ + for(i = 0; i < info->typeattr.cImplTypes; ++i){ chunk->href = info->impltypes[i].hRef; chunk->res04 = info->impltypes[i].implflags; chunk->res08 = -1; - if(i < info->cImplTypes - 1) + if(i < info->typeattr.cImplTypes - 1) chunk->next = offs + sizeof(WMSFT_RefChunk) * (i + 1); else chunk->next = -1; @@ -9791,18 +9763,18 @@ if(data){ MSFT_TypeInfoBase *base = (MSFT_TypeInfoBase*)data; - if(info->wTypeFlags & TYPEFLAG_FDUAL) + if(info->typeattr.wTypeFlags & TYPEFLAG_FDUAL) base->typekind = TKIND_DISPATCH; else - base->typekind = info->typekind; + base->typekind = info->typeattr.typekind; base->typekind |= index << 16; /* TODO: There are some other flags here */ - base->typekind |= (info->cbAlignment << 11) | (info->cbAlignment << 6); + base->typekind |= (info->typeattr.cbAlignment << 11) | (info->typeattr.cbAlignment << 6); base->memoffset = WMSFT_compile_typeinfo_aux(info, file); base->res2 = 0; base->res3 = 0; base->res4 = 3; base->res5 = 0; - base->cElement = (info->cVars << 16) | info->cFuncs; + base->cElement = (info->typeattr.cVars << 16) | info->typeattr.cFuncs; base->res7 = 0; base->res8 = 0; base->res9 = 0; @@ -9811,7 +9783,7 @@ base->posguid = info->guid->offset; else base->posguid = -1; - base->flags = info->wTypeFlags; + base->flags = info->typeattr.wTypeFlags; if(info->Name) { base->NameOffset = info->Name->offset; @@ -9820,7 +9792,7 @@ }else { base->NameOffset = -1; } - base->version = (info->wMinorVerNum << 16) | info->wMajorVerNum; + base->version = (info->typeattr.wMinorVerNum << 16) | info->typeattr.wMajorVerNum; if(info->DocString) base->docstringoffs = info->DocString->offset; else @@ -9828,20 +9800,20 @@ base->helpstringcontext = info->dwHelpStringContext; base->helpcontext = info->dwHelpContext; base->oCustData = WMSFT_compile_custdata(info->pcustdata_list, file); - base->cImplTypes = info->cImplTypes; - base->cbSizeVft = info->cbSizeVft; - base->size = info->cbSizeInstance; - if(info->typekind == TKIND_COCLASS){ + base->cImplTypes = info->typeattr.cImplTypes; + base->cbSizeVft = info->typeattr.cbSizeVft; + base->size = info->typeattr.cbSizeInstance; + if(info->typeattr.typekind == TKIND_COCLASS){ base->datatype1 = WMSFT_compile_typeinfo_ref(info, file); - }else if(info->typekind == TKIND_ALIAS){ + }else if(info->typeattr.typekind == TKIND_ALIAS){ base->datatype1 = WMSFT_append_typedesc(info->tdescAlias, file, NULL, NULL); - }else if(info->typekind == TKIND_MODULE){ + }else if(info->typeattr.typekind == TKIND_MODULE){ if(info->DllName) base->datatype1 = info->DllName->offset; else base->datatype1 = -1; }else{ - if(info->cImplTypes > 0) + if(info->typeattr.cImplTypes > 0) base->datatype1 = info->impltypes[0].hRef; else base->datatype1 = -1; @@ -10394,12 +10366,12 @@ return hres; } - old_flags = This->wTypeFlags; - This->wTypeFlags = typeFlags; + old_flags = This->typeattr.wTypeFlags; + This->typeattr.wTypeFlags = typeFlags; hres = ICreateTypeInfo2_LayOut(iface); if (FAILED(hres)) { - This->wTypeFlags = old_flags; + This->typeattr.wTypeFlags = old_flags; return hres; } @@ -10440,8 +10412,8 @@ TRACE("%p %d %d\n", This, majorVerNum, minorVerNum); - This->wMajorVerNum = majorVerNum; - This->wMinorVerNum = minorVerNum; + This->typeattr.wMajorVerNum = majorVerNum; + This->typeattr.wMinorVerNum = minorVerNum; return S_OK; } @@ -10568,7 +10540,7 @@ if (!funcDesc || funcDesc->oVft & 3) return E_INVALIDARG; - switch (This->typekind) { + switch (This->typeattr.typekind) { case TKIND_MODULE: if (funcDesc->funckind != FUNC_STATIC) return TYPE_E_BADMODULEKIND; @@ -10582,7 +10554,7 @@ return TYPE_E_BADMODULEKIND; } - if (index > This->cFuncs) + if (index > This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; if (funcDesc->invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF) && @@ -10603,11 +10575,13 @@ if (tmp_func_desc.funcdesc.oVft != 0) tmp_func_desc.funcdesc.oVft |= 1; - if (funcDesc->cScodes) { + if (funcDesc->cScodes && funcDesc->lprgscode) { tmp_func_desc.funcdesc.lprgscode = heap_alloc(sizeof(SCODE) * funcDesc->cScodes); memcpy(tmp_func_desc.funcdesc.lprgscode, funcDesc->lprgscode, sizeof(SCODE) * funcDesc->cScodes); - } else + } else { tmp_func_desc.funcdesc.lprgscode = NULL; + tmp_func_desc.funcdesc.cScodes = 0; + } buf_size = TLB_SizeElemDesc(&funcDesc->elemdescFunc); for (i = 0; i < funcDesc->cParams; ++i) { @@ -10648,17 +10622,17 @@ if (This->funcdescs) { This->funcdescs = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->funcdescs, - sizeof(TLBFuncDesc) * (This->cFuncs + 1)); - - if (index < This->cFuncs) { + sizeof(TLBFuncDesc) * (This->typeattr.cFuncs + 1)); + + if (index < This->typeattr.cFuncs) { memmove(This->funcdescs + index + 1, This->funcdescs + index, - (This->cFuncs - index) * sizeof(TLBFuncDesc)); + (This->typeattr.cFuncs - index) * sizeof(TLBFuncDesc)); func_desc = This->funcdescs + index; } else - func_desc = This->funcdescs + This->cFuncs; + func_desc = This->funcdescs + This->typeattr.cFuncs; /* move custdata lists to the new memory location */ - for(i = 0; i < This->cFuncs + 1; ++i){ + for(i = 0; i < This->typeattr.cFuncs + 1; ++i){ if(index != i){ TLBFuncDesc *fd = &This->funcdescs[i]; if(fd->custdata_list.prev == fd->custdata_list.next) @@ -10675,7 +10649,7 @@ memcpy(func_desc, &tmp_func_desc, sizeof(tmp_func_desc)); list_init(&func_desc->custdata_list); - ++This->cFuncs; + ++This->typeattr.cFuncs; This->needs_layout = TRUE; @@ -10691,25 +10665,25 @@ TRACE("%p %u %d\n", This, index, refType); - switch(This->typekind){ + switch(This->typeattr.typekind){ case TKIND_COCLASS: { if (index == -1) { FIXME("Unhandled index: -1\n"); return E_NOTIMPL; } - if(index != This->cImplTypes) + if(index != This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; break; } case TKIND_INTERFACE: case TKIND_DISPATCH: - if (index != 0 || This->cImplTypes) + if (index != 0 || This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; break; default: - FIXME("Unimplemented typekind: %d\n", This->typekind); + FIXME("Unimplemented typekind: %d\n", This->typeattr.typekind); return E_NOTIMPL; } @@ -10717,17 +10691,17 @@ UINT i; This->impltypes = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->impltypes, - sizeof(TLBImplType) * (This->cImplTypes + 1)); - - if (index < This->cImplTypes) { + sizeof(TLBImplType) * (This->typeattr.cImplTypes + 1)); + + if (index < This->typeattr.cImplTypes) { memmove(This->impltypes + index + 1, This->impltypes + index, - (This->cImplTypes - index) * sizeof(TLBImplType)); + (This->typeattr.cImplTypes - index) * sizeof(TLBImplType)); impl_type = This->impltypes + index; } else - impl_type = This->impltypes + This->cImplTypes; + impl_type = This->impltypes + This->typeattr.cImplTypes; /* move custdata lists to the new memory location */ - for(i = 0; i < This->cImplTypes + 1; ++i){ + for(i = 0; i < This->typeattr.cImplTypes + 1; ++i){ if(index != i){ TLBImplType *it = &This->impltypes[i]; if(it->custdata_list.prev == it->custdata_list.next) @@ -10745,10 +10719,10 @@ TLBImplType_Constructor(impl_type); impl_type->hRef = refType; - ++This->cImplTypes; + ++This->typeattr.cImplTypes; if((refType & (~0x3)) == (This->pTypeLib->dispatch_href & (~0x3))) - This->wTypeFlags |= TYPEFLAG_FDISPATCHABLE; + This->typeattr.wTypeFlags |= TYPEFLAG_FDISPATCHABLE; hres = ICreateTypeInfo2_LayOut(iface); if (FAILED(hres)) @@ -10765,10 +10739,10 @@ TRACE("%p %u %x\n", This, index, implTypeFlags); - if (This->typekind != TKIND_COCLASS) + if (This->typeattr.typekind != TKIND_COCLASS) return TYPE_E_BADMODULEKIND; - if (index >= This->cImplTypes) + if (index >= This->typeattr.cImplTypes) return TYPE_E_ELEMENTNOTFOUND; impl_type->implflags = implTypeFlags; @@ -10783,7 +10757,7 @@ TRACE("%p %d\n", This, alignment); - This->cbAlignment = alignment; + This->typeattr.cbAlignment = alignment; return S_OK; } @@ -10800,7 +10774,7 @@ This->Schema = TLB_append_str(&This->pTypeLib->string_list, schema); - This->lpstrSchema = This->Schema->str; + This->typeattr.lpstrSchema = This->Schema->str; return S_OK; } @@ -10817,17 +10791,17 @@ UINT i; This->vardescs = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->vardescs, - sizeof(TLBVarDesc) * (This->cVars + 1)); - - if (index < This->cVars) { + sizeof(TLBVarDesc) * (This->typeattr.cVars + 1)); + + if (index < This->typeattr.cVars) { memmove(This->vardescs + index + 1, This->vardescs + index, - (This->cVars - index) * sizeof(TLBVarDesc)); + (This->typeattr.cVars - index) * sizeof(TLBVarDesc)); var_desc = This->vardescs + index; } else - var_desc = This->vardescs + This->cVars; + var_desc = This->vardescs + This->typeattr.cVars; /* move custdata lists to the new memory location */ - for(i = 0; i < This->cVars + 1; ++i){ + for(i = 0; i < This->typeattr.cVars + 1; ++i){ if(index != i){ TLBVarDesc *var = &This->vardescs[i]; if(var->custdata_list.prev == var->custdata_list.next) @@ -10845,7 +10819,7 @@ TLB_AllocAndInitVarDesc(varDesc, &var_desc->vardesc_create); var_desc->vardesc = *var_desc->vardesc_create; - ++This->cVars; + ++This->typeattr.cVars; This->needs_layout = TRUE; @@ -10864,7 +10838,7 @@ if (!names) return E_INVALIDARG; - if (index >= This->cFuncs || numNames == 0) + if (index >= This->typeattr.cFuncs || numNames == 0) return TYPE_E_ELEMENTNOTFOUND; if (func_desc->funcdesc.invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF)){ @@ -10874,7 +10848,7 @@ if(numNames > func_desc->funcdesc.cParams + 1) return TYPE_E_ELEMENTNOTFOUND; - for(i = 0; i < This->cFuncs; ++i) { + for(i = 0; i < This->typeattr.cFuncs; ++i) { TLBFuncDesc *iter = &This->funcdescs[i]; if (iter->Name && !strcmpW(TLB_get_bstr(iter->Name), *names)) { if (iter->funcdesc.invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF | INVOKE_PROPERTYGET) && @@ -10905,7 +10879,7 @@ if(!name) return E_INVALIDARG; - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; This->vardescs[index].Name = TLB_append_str(&This->pTypeLib->name_list, name); @@ -10923,10 +10897,10 @@ if(!tdescAlias) return E_INVALIDARG; - if(This->typekind != TKIND_ALIAS) + if(This->typeattr.typekind != TKIND_ALIAS) return TYPE_E_BADMODULEKIND; - hr = TLB_size_instance(This, This->pTypeLib->syskind, tdescAlias, &This->cbSizeInstance, &This->cbAlignment); + hr = TLB_size_instance(This, This->pTypeLib->syskind, tdescAlias, &This->typeattr.cbSizeInstance, &This->typeattr.cbAlignment); if(FAILED(hr)) return hr; @@ -10956,7 +10930,7 @@ if(!docString) return E_INVALIDARG; - if(index >= This->cFuncs) + if(index >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; func_desc->HelpString = TLB_append_str(&This->pTypeLib->string_list, docString); @@ -10975,7 +10949,7 @@ if(!docString) return E_INVALIDARG; - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; var_desc->HelpString = TLB_append_str(&This->pTypeLib->string_list, docString); @@ -10991,7 +10965,7 @@ TRACE("%p %u %d\n", This, index, helpContext); - if(index >= This->cFuncs) + if(index >= This->typeattr.cFuncs) return TYPE_E_ELEMENTNOTFOUND; func_desc->helpcontext = helpContext; @@ -11007,7 +10981,7 @@ TRACE("%p %u %d\n", This, index, helpContext); - if(index >= This->cVars) + if(index >= This->typeattr.cVars) return TYPE_E_ELEMENTNOTFOUND; var_desc->HelpContext = helpContext; @@ -11033,8 +11007,8 @@ if (!idlDesc) return E_INVALIDARG; - This->idldescType.dwReserved = idlDesc->dwReserved; - This->idldescType.wIDLFlags = idlDesc->wIDLFlags; + This->typeattr.idldescType.dwReserved = idlDesc->dwReserved; + This->typeattr.idldescType.wIDLFlags = idlDesc->wIDLFlags; return S_OK; } @@ -11055,7 +11029,7 @@ if (FAILED(hres)) return hres; - if (This->typekind == TKIND_INTERFACE) { + if (This->typeattr.typekind == TKIND_INTERFACE) { ITypeInfo *inh; TYPEATTR *attr; HREFTYPE inh_href; @@ -11072,7 +11046,7 @@ ITypeInfo_Release(tinfo); return hres; } - This->cbSizeVft = attr->cbSizeVft; + This->typeattr.cbSizeVft = attr->cbSizeVft; ITypeInfo_ReleaseTypeAttr(inh, attr); do{ @@ -11091,34 +11065,34 @@ ITypeInfo_Release(inh); } else if (hres == TYPE_E_ELEMENTNOTFOUND) { - This->cbSizeVft = 0; + This->typeattr.cbSizeVft = 0; hres = S_OK; } else { ITypeInfo_Release(tinfo); return hres; } } else if (hres == TYPE_E_ELEMENTNOTFOUND) { - This->cbSizeVft = 0; + This->typeattr.cbSizeVft = 0; hres = S_OK; } else { ITypeInfo_Release(tinfo); return hres; } - } else if (This->typekind == TKIND_DISPATCH) - This->cbSizeVft = 7 * This->pTypeLib->ptr_size; + } else if (This->typeattr.typekind == TKIND_DISPATCH) + This->typeattr.cbSizeVft = 7 * This->pTypeLib->ptr_size; else - This->cbSizeVft = 0; + This->typeattr.cbSizeVft = 0; func_desc = This->funcdescs; i = 0; - while (i < This->cFuncs) { + while (i < This->typeattr.cFuncs) { if (!(func_desc->funcdesc.oVft & 0x1)) - func_desc->funcdesc.oVft = This->cbSizeVft; + func_desc->funcdesc.oVft = This->typeattr.cbSizeVft; if ((func_desc->funcdesc.oVft & 0xFFFC) > user_vft) user_vft = func_desc->funcdesc.oVft & 0xFFFC; - This->cbSizeVft += This->pTypeLib->ptr_size; + This->typeattr.cbSizeVft += This->pTypeLib->ptr_size; if (func_desc->funcdesc.memid == MEMBERID_NIL) { TLBFuncDesc *iter; @@ -11128,10 +11102,10 @@ func_desc->funcdesc.memid = 0x60000000 + (depth << 16) + i; iter = This->funcdescs; - while (j < This->cFuncs) { + while (j < This->typeattr.cFuncs) { if (iter != func_desc && iter->funcdesc.memid == func_desc->funcdesc.memid) { if (!reset) { - func_desc->funcdesc.memid = 0x60000000 + (depth << 16) + This->cFuncs; + func_desc->funcdesc.memid = 0x60000000 + (depth << 16) + This->typeattr.cFuncs; reset = TRUE; } else ++func_desc->funcdesc.memid; @@ -11148,10 +11122,10 @@ ++i; } - if (user_vft > This->cbSizeVft) - This->cbSizeVft = user_vft + This->pTypeLib->ptr_size; - - for(i = 0; i < This->cVars; ++i){ + if (user_vft > This->typeattr.cbSizeVft) + This->typeattr.cbSizeVft = user_vft + This->pTypeLib->ptr_size; + + for(i = 0; i < This->typeattr.cVars; ++i){ TLBVarDesc *var_desc = &This->vardescs[i]; if(var_desc->vardesc.memid == MEMBERID_NIL){ UINT j = 0; @@ -11161,10 +11135,10 @@ var_desc->vardesc.memid = 0x40000000 + (depth << 16) + i; iter = This->vardescs; - while (j < This->cVars) { + while (j < This->typeattr.cVars) { if (iter != var_desc && iter->vardesc.memid == var_desc->vardesc.memid) { if (!reset) { - var_desc->vardesc.memid = 0x40000000 + (depth << 16) + This->cVars; + var_desc->vardesc.memid = 0x40000000 + (depth << 16) + This->typeattr.cVars; reset = TRUE; } else ++var_desc->vardesc.memid; Modified: trunk/reactos/dll/win32/oleaut32/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/usrmars…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -66,6 +66,10 @@ { ALIGN_POINTER(Buffer, 3); *(DWORD*)Buffer = pstg->flags; + + if (!pstg->pInterface) + return Buffer + sizeof(DWORD); + switch(pstg->flags) { case CLS_LIBATTR: @@ -1391,52 +1395,145 @@ HRESULT CALLBACK ITypeComp_Bind_Proxy( ITypeComp* This, - LPOLESTR szName, + LPOLESTR name, ULONG lHashVal, - WORD wFlags, - ITypeInfo** ppTInfo, - DESCKIND* pDescKind, - BINDPTR* pBindPtr) -{ - FIXME("not implemented\n"); - return E_FAIL; + WORD flags, + ITypeInfo **ti, + DESCKIND *desckind, + BINDPTR *bindptr) +{ + CLEANLOCALSTORAGE stg = { 0 }; + ITypeComp *typecomp; + FUNCDESC *funcdesc; + VARDESC *vardesc; + HRESULT hr; + + TRACE("(%p, %s, %#x, %#x, %p, %p, %p)\n", This, debugstr_w(name), lHashVal, flags, ti, + desckind, bindptr); + + *desckind = DESCKIND_NONE; + memset(bindptr, 0, sizeof(*bindptr)); + + hr = ITypeComp_RemoteBind_Proxy(This, name, lHashVal, flags, ti, desckind, + &funcdesc, &vardesc, &typecomp, &stg); + + if (hr == S_OK) + { + switch (*desckind) + { + case DESCKIND_FUNCDESC: + bindptr->lpfuncdesc = funcdesc; + break; + case DESCKIND_VARDESC: + case DESCKIND_IMPLICITAPPOBJ: + bindptr->lpvardesc = vardesc; + break; + case DESCKIND_TYPECOMP: + bindptr->lptcomp = typecomp; + break; + default: + ; + } + } + + return hr; } HRESULT __RPC_STUB ITypeComp_Bind_Stub( ITypeComp* This, - LPOLESTR szName, + LPOLESTR name, ULONG lHashVal, - WORD wFlags, - ITypeInfo** ppTInfo, - DESCKIND* pDescKind, - LPFUNCDESC* ppFuncDesc, - LPVARDESC* ppVarDesc, - ITypeComp** ppTypeComp, - CLEANLOCALSTORAGE* pDummy) -{ - FIXME("not implemented\n"); - return E_FAIL; + WORD flags, + ITypeInfo **ti, + DESCKIND *desckind, + FUNCDESC **funcdesc, + VARDESC **vardesc, + ITypeComp **typecomp, + CLEANLOCALSTORAGE *stg) +{ + BINDPTR bindptr; + HRESULT hr; + + TRACE("(%p, %s, %#x, %#x, %p, %p, %p, %p, %p, %p)\n", This, debugstr_w(name), + lHashVal, flags, ti, desckind, funcdesc, vardesc, typecomp, stg); + + memset(stg, 0, sizeof(*stg)); + memset(&bindptr, 0, sizeof(bindptr)); + + *funcdesc = NULL; + *vardesc = NULL; + *typecomp = NULL; + *ti = NULL; + + hr = ITypeComp_Bind(This, name, lHashVal, flags, ti, desckind, &bindptr); + if(hr != S_OK) + return hr; + + switch (*desckind) + { + case DESCKIND_FUNCDESC: + *funcdesc = bindptr.lpfuncdesc; + stg->pInterface = (IUnknown*)*ti; + stg->pStorage = funcdesc; + stg->flags = CLS_FUNCDESC; + break; + case DESCKIND_VARDESC: + case DESCKIND_IMPLICITAPPOBJ: + *vardesc = bindptr.lpvardesc; + stg->pInterface = (IUnknown*)*ti; + stg->pStorage = vardesc; + stg->flags = CLS_VARDESC; + break; + case DESCKIND_TYPECOMP: + *typecomp = bindptr.lptcomp; + break; + default: + ; + } + + if (stg->pInterface) + IUnknown_AddRef(stg->pInterface); + + return hr; } HRESULT CALLBACK ITypeComp_BindType_Proxy( ITypeComp* This, - LPOLESTR szName, + LPOLESTR name, ULONG lHashVal, - ITypeInfo** ppTInfo, - ITypeComp** ppTComp) -{ - FIXME("not implemented\n"); - return E_FAIL; + ITypeInfo **ti, + ITypeComp **typecomp) +{ + HRESULT hr; + + TRACE("(%p, %s, %#x, %p, %p)\n", This, debugstr_w(name), lHashVal, ti, typecomp); + + hr = ITypeComp_RemoteBindType_Proxy(This, name, lHashVal, ti); + if (hr == S_OK) + ITypeInfo_GetTypeComp(*ti, typecomp); + else if (typecomp) + *typecomp = NULL; + + return hr; } HRESULT __RPC_STUB ITypeComp_BindType_Stub( ITypeComp* This, - LPOLESTR szName, + LPOLESTR name, ULONG lHashVal, - ITypeInfo** ppTInfo) -{ - FIXME("not implemented\n"); - return E_FAIL; + ITypeInfo **ti) +{ + ITypeComp *typecomp = NULL; + HRESULT hr; + + TRACE("(%p, %s, %#x, %p)\n", This, debugstr_w(name), lHashVal, ti); + + hr = ITypeComp_BindType(This, name, lHashVal, ti, &typecomp); + + if (typecomp) + ITypeComp_Release(typecomp); + + return hr; } /* ITypeInfo */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 22:58:15 2016 @@ -141,7 +141,7 @@ reactos/dll/win32/odbccp32 # Synced to WineStaging-1.9.11 reactos/dll/win32/ole32 # Synced to WineStaging-1.9.16 reactos/dll/win32/oleacc # Synced to WineStaging-1.9.11 -reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.16 +reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.23 reactos/dll/win32/olecli32 # Synced to WineStaging-1.9.11 reactos/dll/win32/oledlg # Synced to WineStaging-1.9.11 reactos/dll/win32/olepro32 # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73284: [ODBC32] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:55:42 2016 New Revision: 73284 URL:
http://svn.reactos.org/svn/reactos?rev=73284&view=rev
Log: [ODBC32] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/odbc32/proxyodbc.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/odbc32/proxyodbc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/odbc32/proxyodbc…
============================================================================== --- trunk/reactos/dll/win32/odbc32/proxyodbc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/odbc32/proxyodbc.c [iso-8859-1] Thu Nov 17 22:55:42 2016 @@ -525,7 +525,7 @@ return TRUE; } failed: - WARN("failed to open library %s: %s\n", debugstr_a(s), error); + ERR_(winediag)("failed to open library %s: %s\n", debugstr_a(s), error); nErrorType = ERROR_LIBRARY_NOT_FOUND; return FALSE; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 22:55:42 2016 @@ -137,7 +137,7 @@ reactos/dll/win32/npptools # Synced to WineStaging-1.9.11 reactos/dll/win32/ntdsapi # Synced to WineStaging-1.9.11 reactos/dll/win32/objsel # Synced to WineStaging-1.9.11 -reactos/dll/win32/odbc32 # Synced to WineStaging-1.9.11. Depends on port of Linux ODBC. +reactos/dll/win32/odbc32 # Synced to WineStaging-1.9.23. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to WineStaging-1.9.11 reactos/dll/win32/ole32 # Synced to WineStaging-1.9.16 reactos/dll/win32/oleacc # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73283: [MSVFW32] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:54:16 2016 New Revision: 73283 URL:
http://svn.reactos.org/svn/reactos?rev=73283&view=rev
Log: [MSVFW32] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/msvfw32/msvideo_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msvfw32/msvideo_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvfw32/msvideo_…
============================================================================== --- trunk/reactos/dll/win32/msvfw32/msvideo_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvfw32/msvideo_main.c [iso-8859-1] Thu Nov 17 22:54:16 2016 @@ -296,9 +296,8 @@ ICINFO *lpicinfo = param; DWORD fccHandler = mmioStringToFOURCCA(drv + 5, 0); - /* exact match of fccHandler or nth driver found */ - if ((lpicinfo->fccHandler != nr) && (lpicinfo->fccHandler != fccHandler)) - return FALSE; + if (lpicinfo->fccHandler != nr && compare_fourcc(lpicinfo->fccHandler, fccHandler)) + return FALSE; lpicinfo->fccHandler = fccHandler; lpicinfo->dwFlags = 0; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 22:54:16 2016 @@ -125,7 +125,7 @@ reactos/dll/win32/mstask # Synced to WineStaging-1.9.11 reactos/dll/win32/msvcrt20 # Out of sync reactos/dll/win32/msvcrt40 # Out of sync -reactos/dll/win32/msvfw32 # Synced to WineStaging-1.9.16 +reactos/dll/win32/msvfw32 # Synced to WineStaging-1.9.23 reactos/dll/win32/msvidc32 # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml # Synced to WineStaging-1.9.11 reactos/dll/win32/msxml2 # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73282: [MSIMTF] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:52:27 2016 New Revision: 73282 URL:
http://svn.reactos.org/svn/reactos?rev=73282&view=rev
Log: [MSIMTF] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/reactos/dll/win32/msimtf/activeimmapp.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msimtf/activeimmapp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msimtf/activeimm…
============================================================================== --- trunk/reactos/dll/win32/msimtf/activeimmapp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msimtf/activeimmapp.c [iso-8859-1] Thu Nov 17 22:52:27 2016 @@ -45,7 +45,7 @@ if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp)) { - *ppvOut = This; + *ppvOut = &This->IActiveIMMApp_iface; } else if (IsEqualIID(iid, &IID_IActiveIMMMessagePumpOwner)) { @@ -888,6 +888,6 @@ This->refCount = 1; TRACE("returning %p\n",This); - *ppOut = (IUnknown *)This; - return S_OK; -} + *ppOut = (IUnknown *)&This->IActiveIMMApp_iface; + return S_OK; +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 22:52:27 2016 @@ -114,7 +114,7 @@ reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55 reactos/dll/win32/msi # Synced to WineStaging-1.9.16 reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11 -reactos/dll/win32/msimtf # Synced to WineStaging-1.9.16 +reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23 reactos/dll/win32/msisip # Synced to WineStaging-1.9.11 reactos/dll/win32/msisys.ocx # Synced to WineStaging-1.9.11 reactos/dll/win32/msnet32 # Synced to WineStaging-1.9.11
8 years, 1 month
1
0
0
0
[akhaldi] 73281: [MSCTF_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 17 22:50:52 2016 New Revision: 73281 URL:
http://svn.reactos.org/svn/reactos?rev=73281&view=rev
Log: [MSCTF_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409 Modified: trunk/rostests/winetests/msctf/inputprocessor.c Modified: trunk/rostests/winetests/msctf/inputprocessor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/inputproc…
============================================================================== --- trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] Thu Nov 17 22:50:52 2016 @@ -191,12 +191,11 @@ static HRESULT WINAPI TextStoreACP_QueryInterface(ITextStoreACP *iface, REFIID iid, LPVOID *ppvOut) { - TextStoreACP *This = impl_from_ITextStoreACP(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITextStoreACP)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut) @@ -464,7 +463,7 @@ This->ITextStoreACP_iface.lpVtbl = &TextStoreACP_TextStoreACPVtbl; This->refCount = 1; - *ppOut = (IUnknown *)This; + *ppOut = (IUnknown*)&This->ITextStoreACP_iface; return S_OK; } @@ -489,12 +488,11 @@ static HRESULT WINAPI ThreadMgrEventSink_QueryInterface(ITfThreadMgrEventSink *iface, REFIID iid, LPVOID *ppvOut) { - ThreadMgrEventSink *This = impl_from_ITfThreadMgrEventSink(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfThreadMgrEventSink)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut) @@ -623,7 +621,7 @@ This->ITfThreadMgrEventSink_iface.lpVtbl = &ThreadMgrEventSink_ThreadMgrEventSinkVtbl; This->refCount = 1; - *ppOut = (IUnknown *)This; + *ppOut = (IUnknown*)&This->ITfThreadMgrEventSink_iface; return S_OK; } @@ -773,7 +771,7 @@ This->IClassFactory_iface.lpVtbl = &ClassFactoryVtbl; This->ref = 1; This->ctor = ctor; - *ppvOut = (LPVOID)This; + *ppvOut = &This->IClassFactory_iface; TS_refCount++; return S_OK; } @@ -785,12 +783,11 @@ static HRESULT WINAPI TextService_QueryInterface(ITfTextInputProcessor *iface, REFIID iid, LPVOID *ppvOut) { - TextService *This = impl_from_ITfTextInputProcessor(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfTextInputProcessor)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut) @@ -858,7 +855,7 @@ This->ITfTextInputProcessor_iface.lpVtbl = &TextService_TextInputProcessorVtbl; This->refCount = 1; - *ppOut = (IUnknown *)This; + *ppOut = (IUnknown*)&This->ITfTextInputProcessor_iface; return S_OK; } @@ -1148,12 +1145,11 @@ static HRESULT WINAPI KeyEventSink_QueryInterface(ITfKeyEventSink *iface, REFIID iid, LPVOID *ppvOut) { - KeyEventSink *This = impl_from_ITfKeyEventSink(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfKeyEventSink)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut) @@ -1410,12 +1406,11 @@ static HRESULT WINAPI TextEditSink_QueryInterface(ITfTextEditSink *iface, REFIID iid, LPVOID *ppvOut) { - TextEditSink *This = impl_from_ITfTextEditSink(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfTextEditSink)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut) @@ -1802,12 +1797,11 @@ static HRESULT WINAPI EditSession_QueryInterface(ITfEditSession *iface, REFIID iid, LPVOID *ppvOut) { - EditSession *This = impl_from_ITfEditSession(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfEditSession)) { - *ppvOut = This; + *ppvOut = iface; } if (*ppvOut)
8 years, 1 month
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
32
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
Results per page:
10
25
50
100
200