winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
796 discussions
Start a n
N
ew thread
Huw Davies : riched20: Use row helpers for Home/End key handling.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: f45408b24ac6745b9a917f82abeb42d9ec530112 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f45408b24ac6745b9a917f82…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 08:46:41 2020 +0000 riched20: Use row helpers for Home/End key handling. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 650c065dbe0..49ae1b2769a 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -1375,19 +1375,11 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) assert(pCursor->pRun->type == diRun); } -static void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowHome( ME_TextEditor *editor, ME_Cursor *cursor ) { - ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow); - if (pRow) { - ME_DisplayItem *pRun; - - pRun = ME_FindItemFwd(pRow, diRun); - if (pRun) { - pCursor->pRun = pRun; - assert(pCursor->pPara == ME_GetParagraph(pRun)); - pCursor->nOffset = 0; - } - } + ME_Row *row = row_from_cursor( cursor ); + + row_first_cursor( row, cursor ); } static void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) @@ -1395,14 +1387,11 @@ static void ME_ArrowCtrlHome(ME_TextEditor *editor, ME_Cursor *pCursor) ME_SetCursorToStart(editor, pCursor); } -static void ME_ArrowEnd(ME_TextEditor *editor, ME_Cursor *pCursor) +static void ME_ArrowEnd( ME_TextEditor *editor, ME_Cursor *cursor ) { - ME_DisplayItem *pRow; + ME_Row *row = row_from_cursor( cursor ); - pRow = ME_FindItemFwd(pCursor->pRun, diStartRowOrParagraphOrEnd); - assert(pRow); - pCursor->pRun = ME_FindItemBack(pRow, diRun); - pCursor->nOffset = (pRow->type == diStartRow) ? pCursor->pRun->member.run.len : 0; + row_end_cursor( row, cursor, FALSE ); } static void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor)
1
0
0
0
Huw Davies : riched20: Use row and para helpers for the selection function.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: aaf29c799121dc388310d06c7fc0ef0512462547 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aaf29c799121dc388310d06c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 08:46:40 2020 +0000 riched20: Use row and para helpers for the selection function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 38 ++++++++++++++------------------------ dlls/riched20/editor.h | 3 +++ dlls/riched20/row.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 5af4cd04d55..650c065dbe0 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -818,38 +818,28 @@ ME_SelectByType(ME_TextEditor *editor, ME_SelectionType selectionType) editor->pCursors[1] = editor->pCursors[0]; ME_MoveCursorWords(editor, &editor->pCursors[1], -1); break; - case stLine: case stParagraph: - { - ME_DisplayItem *pItem; - ME_DIType fwdSearchType, backSearchType; - if (selectionType == stParagraph) { - backSearchType = diParagraph; - fwdSearchType = diParagraphOrEnd; - } else { - backSearchType = diStartRow; - fwdSearchType = diStartRowOrParagraphOrEnd; - } - pItem = ME_FindItemFwd(editor->pCursors[0].pRun, fwdSearchType); - assert(pItem); - if (pItem->type == diTextEnd) - editor->pCursors[0].pRun = ME_FindItemBack(pItem, diRun); - else - editor->pCursors[0].pRun = ME_FindItemFwd(pItem, diRun); - editor->pCursors[0].pPara = ME_GetParagraph(editor->pCursors[0].pRun); - editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; - pItem = ME_FindItemBack(pItem, backSearchType); - editor->pCursors[1].pRun = ME_FindItemFwd(pItem, diRun); - editor->pCursors[1].pPara = ME_GetParagraph(editor->pCursors[1].pRun); + editor->pCursors[0].pRun = run_get_di( para_end_run( &editor->pCursors[0].pPara->member.para ) ); + editor->pCursors[0].pPara = para_get_di( editor->pCursors[0].pRun->member.run.para ); + editor->pCursors[0].nOffset = editor->pCursors[0].pRun->member.run.len; + + editor->pCursors[1].pRun = run_get_di( para_first_run( &editor->pCursors[1].pPara->member.para ) ); editor->pCursors[1].nOffset = 0; break; + case stLine: + { + ME_Row *row = row_from_cursor( editor->pCursors ); + + row_first_cursor( row, editor->pCursors + 1 ); + row_end_cursor( row, editor->pCursors, TRUE ); + break; } case stDocument: /* Select everything with cursor anchored from the start of the text */ - editor->nSelectionType = stDocument; ME_SetCursorToStart(editor, &editor->pCursors[1]); - ME_SetCursorToEnd(editor, &editor->pCursors[0], FALSE); + ME_SetCursorToEnd(editor, &editor->pCursors[0], TRUE); break; default: assert(0); } diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 7025ddceea7..e197e3e9a9b 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -111,7 +111,10 @@ int ME_ReverseFindNonWhitespaceV(const ME_String *s, int nVChar) DECLSPEC_HIDDEN int ME_ReverseFindWhitespaceV(const ME_String *s, int nVChar) DECLSPEC_HIDDEN; /* row.c */ +void row_end_cursor( ME_Row *row, ME_Cursor *cursor, BOOL include_eop ) DECLSPEC_HIDDEN; +void row_first_cursor( ME_Row *row, ME_Cursor *cursor ) DECLSPEC_HIDDEN; ME_Run *row_first_run( ME_Row *row ) DECLSPEC_HIDDEN; +ME_Row *row_from_cursor( ME_Cursor *cursor ) DECLSPEC_HIDDEN; ME_Row *row_next( ME_Row *row ) DECLSPEC_HIDDEN; ME_Run *row_next_run( ME_Row *row, ME_Run *run ) DECLSPEC_HIDDEN; ME_DisplayItem *ME_RowStart(ME_DisplayItem *item) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index ce8de935a19..ba082244cfc 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -53,6 +53,35 @@ ME_Run *row_next_run( ME_Row *row, ME_Run *run ) return &item->member.run; } +ME_Row *row_from_cursor( ME_Cursor *cursor ) +{ + ME_DisplayItem *item; + + item = ME_FindItemBack( cursor->pRun, diStartRow ); + return &item->member.row; +} + +void row_first_cursor( ME_Row *row, ME_Cursor *cursor ) +{ + ME_DisplayItem *item; + + item = ME_FindItemFwd( row_get_di( row ), diRun ); + cursor->pRun = item; + cursor->pPara = para_get_di( cursor->pRun->member.run.para ); + cursor->nOffset = 0; +} + +void row_end_cursor( ME_Row *row, ME_Cursor *cursor, BOOL include_eop ) +{ + ME_DisplayItem *item, *run; + + item = ME_FindItemFwd( row_get_di( row ), diStartRowOrParagraphOrEnd ); + run = ME_FindItemBack( item, diRun ); + cursor->pRun = run; + cursor->pPara = para_get_di( cursor->pRun->member.run.para ); + cursor->nOffset = (item->type == diStartRow || include_eop) ? cursor->pRun->member.run.len : 0; +} + /* I'm sure these functions would simplify some code in caret ops etc, * I just didn't remember them when I wrote that code */
1
0
0
0
Huw Davies : riched20: Use row ptrs in the cursor from virtual co-ords function.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 0fda889f3528cf7929c3b8540ed6315f0eb25e41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fda889f3528cf7929c3b854…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 08:46:39 2020 +0000 riched20: Use row ptrs in the cursor from virtual co-ords function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 16 +++++++--------- dlls/riched20/editor.h | 2 ++ dlls/riched20/para.c | 19 +++++++++++++++++++ dlls/riched20/row.c | 4 ++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 0c5f221a7c4..5af4cd04d55 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -952,7 +952,7 @@ static BOOL cursor_from_virtual_coords( ME_TextEditor *editor, int x, int y, ME_Cursor *result, BOOL final_eop ) { ME_Paragraph *para = editor_first_para( editor ); - ME_DisplayItem *row = NULL; + ME_Row *row = NULL, *next_row; BOOL isExact = TRUE; x -= editor->rcFormat.left; @@ -966,7 +966,7 @@ static BOOL cursor_from_virtual_coords( ME_TextEditor *editor, int x, int y, if (para->nFlags & MEPF_ROWSTART) para = pixel_pos_in_table_row( x, y, para ); y -= para->pt.y; - row = ME_FindItemFwd( para_get_di( para ), diStartRow); + row = para_first_row( para ); break; } else if (para->nFlags & MEPF_ROWSTART) @@ -977,24 +977,22 @@ static BOOL cursor_from_virtual_coords( ME_TextEditor *editor, int x, int y, /* find row */ while (row) { - ME_DisplayItem *next_row; - - if (y < row->member.row.pt.y + row->member.row.nHeight) break; - next_row = ME_FindItemFwd(row, diStartRow); + if (y < row->pt.y + row->nHeight) break; + next_row = row_next( row ); if (!next_row) break; row = next_row; } - if (!row && !final_eop) + if (!row && !final_eop && para_prev( para )) { /* The position is below the last paragraph, so the last row will be used * rather than the end of the text, so the x position will be used to * determine the offset closest to the pixel position. */ isExact = FALSE; - row = ME_FindItemBack( para_get_di( para ), diStartRow); + row = para_end_row( para_prev( para ) ); } - if (row) return row_cursor( editor, &row->member.row, x, result ) && isExact; + if (row) return row_cursor( editor, row, x, result ) && isExact; ME_SetCursorToEnd(editor, result, TRUE); return FALSE; diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index cf5e2d84fc2..7025ddceea7 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -213,7 +213,9 @@ void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_ int get_total_width(ME_TextEditor *editor) DECLSPEC_HIDDEN; ME_Cell *para_cell( ME_Paragraph *para ) DECLSPEC_HIDDEN; void para_destroy( ME_TextEditor *editor, ME_Paragraph *item ) DECLSPEC_HIDDEN; +ME_Row *para_end_row( ME_Paragraph *para ) DECLSPEC_HIDDEN; ME_Run *para_end_run( ME_Paragraph *para ) DECLSPEC_HIDDEN; +ME_Row *para_first_row( ME_Paragraph *para ) DECLSPEC_HIDDEN; ME_Run *para_first_run( ME_Paragraph *para ) DECLSPEC_HIDDEN; BOOL para_in_table( ME_Paragraph *para ) DECLSPEC_HIDDEN; ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_first_fmt ) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index db258947916..e1b848cf8f9 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -130,6 +130,25 @@ ME_Cell *para_cell( ME_Paragraph *para ) return ¶->pCell->member.cell; } +ME_Row *para_first_row( ME_Paragraph *para ) +{ + ME_DisplayItem *item; + + item = ME_FindItemFwd( para_get_di( para ), diStartRowOrParagraph ); + if (!item || item->type != diStartRow) return NULL; + return &item->member.row; +} + +ME_Row *para_end_row( ME_Paragraph *para ) +{ + ME_DisplayItem *item; + + para = para_next( para ); + item = ME_FindItemBack( para_get_di( para ), diStartRowOrParagraph ); + if (!item || item->type != diStartRow) return NULL; + return &item->member.row; +} + void ME_MakeFirstParagraph(ME_TextEditor *editor) { static const WCHAR cr_lf[] = {'\r','\n',0}; diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index a149231dcbe..ce8de935a19 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -28,8 +28,8 @@ ME_Row *row_next( ME_Row *row ) { ME_DisplayItem *item; - item = ME_FindItemFwd( row_get_di( row ), diStartRow ); - if (!item) return NULL; + item = ME_FindItemFwd( row_get_di( row ), diStartRowOrParagraphOrEnd ); + if (!item || item->type != diStartRow) return NULL; return &item->member.row; }
1
0
0
0
Huw Davies : riched20: Pass a row ptr to the cursor from row function.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: b47e5d0d232b5cc407a95351c99176fb2e3c61e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b47e5d0d232b5cc407a95351…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Oct 26 08:46:38 2020 +0000 riched20: Pass a row ptr to the cursor from row function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 66 ++++++++++++++++++++++++-------------------------- dlls/riched20/editor.h | 7 ++++++ dlls/riched20/row.c | 29 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 34 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 4da6898bef8..0c5f221a7c4 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -903,40 +903,39 @@ static ME_Paragraph *pixel_pos_in_table_row( int x, int y, ME_Paragraph *para ) return para; } - -static BOOL cursor_from_row( ME_TextEditor *editor, ME_DisplayItem *pRow, - int x, ME_Cursor *cursor ) +static BOOL row_cursor( ME_TextEditor *editor, ME_Row *row, int x, + ME_Cursor *cursor ) { - ME_DisplayItem *pNext, *pLastRun; - ME_Row *row = &pRow->member.row; - BOOL exact = TRUE; + ME_Run *run, *last; + BOOL exact = TRUE; - if (x < row->pt.x) - { - x = row->pt.x; - exact = FALSE; - } - pNext = ME_FindItemFwd(pRow, diRunOrStartRow); - assert(pNext->type == diRun); - cursor->nOffset = 0; - do { - int run_x = pNext->member.run.pt.x; - int width = pNext->member.run.nWidth; - - if (x >= run_x && x < run_x+width) + if (x < row->pt.x) { - cursor->nOffset = ME_CharFromPoint(editor, x-run_x, &pNext->member.run, TRUE, TRUE); - cursor->pRun = pNext; - cursor->pPara = ME_GetParagraph( cursor->pRun ); - return exact; + x = row->pt.x; + exact = FALSE; } - pLastRun = pNext; - pNext = ME_FindItemFwd(pNext, diRunOrStartRow); - } while(pNext && pNext->type == diRun); - cursor->pRun = pLastRun; - cursor->pPara = ME_GetParagraph( cursor->pRun ); - return FALSE; + run = row_first_run( row ); + assert( run ); + cursor->nOffset = 0; + do + { + if (x >= run->pt.x && x < run->pt.x + run->nWidth) + { + cursor->nOffset = ME_CharFromPoint( editor, x - run->pt.x, run, TRUE, TRUE ); + cursor->pRun = run_get_di( run ); + cursor->pPara = para_get_di( run->para ); + return exact; + } + last = run; + run = row_next_run( row, run ); + } while (run); + + run = last; + + cursor->pRun = run_get_di( run ); + cursor->pPara = para_get_di( run->para ); + return FALSE; } /* Finds the run and offset from the pixel position. @@ -995,8 +994,7 @@ static BOOL cursor_from_virtual_coords( ME_TextEditor *editor, int x, int y, row = ME_FindItemBack( para_get_di( para ), diStartRow); } - - if (row) return cursor_from_row( editor, row, x, result ) && isExact; + if (row) return row_cursor( editor, &row->member.row, x, result ) && isExact; ME_SetCursorToEnd(editor, result, TRUE); return FALSE; @@ -1279,7 +1277,7 @@ ME_MoveCursorLines(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs, BOOL /* row not found - ignore */ return; } - cursor_from_row( editor, pItem, x, pCursor ); + row_cursor( editor, &pItem->member.row, x, pCursor ); assert(pCursor->pRun); assert(pCursor->pRun->type == diRun); } @@ -1329,7 +1327,7 @@ static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor) pLast = p; } while(1); - cursor_from_row( editor, pLast, x, pCursor ); + row_cursor( editor, &pLast->member.row, x, pCursor ); } assert(pCursor->pRun); assert(pCursor->pRun->type == diRun); @@ -1383,7 +1381,7 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor) pLast = p; } while(1); - cursor_from_row( editor, pLast, x, pCursor ); + row_cursor( editor, &pLast->member.row, x, pCursor ); } assert(pCursor->pRun); assert(pCursor->pRun->type == diRun); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 68c54c2b328..cf5e2d84fc2 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -111,10 +111,17 @@ int ME_ReverseFindNonWhitespaceV(const ME_String *s, int nVChar) DECLSPEC_HIDDEN int ME_ReverseFindWhitespaceV(const ME_String *s, int nVChar) DECLSPEC_HIDDEN; /* row.c */ +ME_Run *row_first_run( ME_Row *row ) DECLSPEC_HIDDEN; +ME_Row *row_next( ME_Row *row ) DECLSPEC_HIDDEN; +ME_Run *row_next_run( ME_Row *row, ME_Run *run ) DECLSPEC_HIDDEN; ME_DisplayItem *ME_RowStart(ME_DisplayItem *item) DECLSPEC_HIDDEN; /* ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); */ ME_DisplayItem *ME_FindRowWithNumber(ME_TextEditor *editor, int nRow) DECLSPEC_HIDDEN; int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) DECLSPEC_HIDDEN; +static inline ME_DisplayItem *row_get_di( ME_Row *row ) +{ + return (ME_DisplayItem *)((ptrdiff_t)row - offsetof(ME_DisplayItem, member)); +} /* run.c */ void cursor_from_char_ofs( ME_TextEditor *editor, int char_ofs, ME_Cursor *cursor ) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index 1bf153f6ca9..a149231dcbe 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -24,6 +24,35 @@ #include "editor.h" +ME_Row *row_next( ME_Row *row ) +{ + ME_DisplayItem *item; + + item = ME_FindItemFwd( row_get_di( row ), diStartRow ); + if (!item) return NULL; + return &item->member.row; +} + +ME_Run *row_first_run( ME_Row *row ) +{ + ME_DisplayItem *item; + + item = ME_FindItemFwd( row_get_di( row ), diRunOrStartRow ); + assert( item->type == diRun ); + return &item->member.run; +} + +ME_Run *row_next_run( ME_Row *row, ME_Run *run ) +{ + ME_DisplayItem *item; + + assert( row == &ME_FindItemBack( run_get_di( run ), diStartRow )->member.row ); + + item = ME_FindItemFwd( run_get_di( run ), diRunOrStartRow ); + if (!item || item->type == diStartRow) return NULL; + return &item->member.run; +} + /* I'm sure these functions would simplify some code in caret ops etc, * I just didn't remember them when I wrote that code */
1
0
0
0
Michael Stefaniuc : wmiutils: Use wide-char string literals.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 20971961f7ffb38abbf3cc4f6f63e271edd4f828 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=20971961f7ffb38abbf3cc4f…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Sun Oct 25 23:40:41 2020 +0100 wmiutils: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wmiutils/statuscode.c | 8 +-- dlls/wmiutils/tests/path.c | 141 +++++++++++++++------------------------------ 2 files changed, 50 insertions(+), 99 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=20971961f7ffb38abbf3…
1
0
0
0
Michael Stefaniuc : wmic: Use wide-char string literals.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 0269297091da259b5fe6f46ec4f96f3371d1d7fd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0269297091da259b5fe6f46e…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Sun Oct 25 23:40:42 2020 +0100 wmic: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wmic/main.c | 81 ++++++++++++---------------------------------------- 1 file changed, 19 insertions(+), 62 deletions(-) diff --git a/programs/wmic/main.c b/programs/wmic/main.c index f31a69a4241..1372c0986e9 100644 --- a/programs/wmic/main.c +++ b/programs/wmic/main.c @@ -31,36 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmic); -static const WCHAR biosW[] = - {'b','i','o','s',0}; -static const WCHAR computersystemW[] = - {'c','o','m','p','u','t','e','r','s','y','s','t','e','m',0}; -static const WCHAR cpuW[] = - {'c','p','u',0}; -static const WCHAR logicaldiskW[] = - {'L','o','g','i','c','a','l','D','i','s','k',0}; -static const WCHAR nicW[] = - {'n','i','c',0}; -static const WCHAR osW[] = - {'o','s',0}; -static const WCHAR processW[] = - {'p','r','o','c','e','s','s',0}; - -static const WCHAR win32_biosW[] = - {'W','i','n','3','2','_','B','I','O','S',0}; -static const WCHAR win32_computersystemW[] = - {'W','i','n','3','2','_','C','o','m','p','u','t','e','r','S','y','s','t','e','m',0}; -static const WCHAR win32_logicaldiskW[] = - {'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k',0}; -static const WCHAR win32_networkadapterW[] = - {'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',0}; -static const WCHAR win32_operatingsystemW[] = - {'W','i','n','3','2','_','O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0}; -static const WCHAR win32_processW[] = - {'W','i','n','3','2','_','P','r','o','c','e','s','s',0}; -static const WCHAR win32_processorW[] = - {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; - static const struct { const WCHAR *alias; @@ -68,13 +38,13 @@ static const struct } alias_map[] = { - { biosW, win32_biosW }, - { computersystemW, win32_computersystemW }, - { cpuW, win32_processorW }, - { logicaldiskW, win32_logicaldiskW }, - { nicW, win32_networkadapterW }, - { osW, win32_operatingsystemW }, - { processW, win32_processW } + { L"bios", L"Win32_BIOS" }, + { L"computersystem", L"Win32_ComputerSystem" }, + { L"cpu", L"Win32_Processor" }, + { L"LogicalDisk", L"Win32_LogicalDisk" }, + { L"nic", L"Win32_NetworkAdapter" }, + { L"os", L"Win32_OperatingSystem" }, + { L"process", L"Win32_Process" } }; static const WCHAR *find_class( const WCHAR *alias ) @@ -139,21 +109,20 @@ static int WINAPIV output_string( HANDLE handle, const WCHAR *msg, ... ) static int output_error( int msg ) { - static const WCHAR fmtW[] = {'%','s',0}; WCHAR buffer[8192]; LoadStringW( GetModuleHandleW(NULL), msg, buffer, ARRAY_SIZE(buffer)); - return output_string( GetStdHandle(STD_ERROR_HANDLE), fmtW, buffer ); + return output_string( GetStdHandle(STD_ERROR_HANDLE), L"%s", buffer ); } static int output_header( const WCHAR *prop, ULONG column_width ) { - static const WCHAR bomW[] = {0xfeff}, fmtW[] = {'%','-','*','s','\r','\n',0}; + static const WCHAR bomW[] = {0xfeff}; int len; DWORD count; WCHAR buffer[8192]; - len = swprintf( buffer, ARRAY_SIZE(buffer), fmtW, column_width, prop ); + len = swprintf( buffer, ARRAY_SIZE(buffer), L"%-*s\r\n", column_width, prop ); if (!WriteConsoleW( GetStdHandle(STD_OUTPUT_HANDLE), buffer, len, &count, NULL )) /* redirected */ { @@ -167,15 +136,11 @@ static int output_header( const WCHAR *prop, ULONG column_width ) static int output_line( const WCHAR *str, ULONG column_width ) { - static const WCHAR fmtW[] = {'%','-','*','s','\r','\n',0}; - return output_string( GetStdHandle(STD_OUTPUT_HANDLE), fmtW, column_width, str ); + return output_string( GetStdHandle(STD_OUTPUT_HANDLE), L"%-*s\r\n", column_width, str ); } static int query_prop( const WCHAR *class, const WCHAR *propname ) { - static const WCHAR select_allW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0}; - static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0}; - static const WCHAR wqlW[] = {'W','Q','L',0}; HRESULT hr; IWbemLocator *locator = NULL; IWbemServices *services = NULL; @@ -199,16 +164,16 @@ static int query_prop( const WCHAR *class, const WCHAR *propname ) (void **)&locator ); if (hr != S_OK) goto done; - if (!(path = SysAllocString( cimv2W ))) goto done; + if (!(path = SysAllocString(L"ROOT\\CIMV2" ))) goto done; hr = IWbemLocator_ConnectServer( locator, path, NULL, NULL, NULL, 0, NULL, NULL, &services ); if (hr != S_OK) goto done; - len = lstrlenW( class ) + ARRAY_SIZE(select_allW); + len = lstrlenW( class ) + ARRAY_SIZE(L"SELECT * FROM "); if (!(query = SysAllocStringLen( NULL, len ))) goto done; - lstrcpyW( query, select_allW ); + lstrcpyW( query, L"SELECT * FROM " ); lstrcatW( query, class ); - if (!(wql = SysAllocString( wqlW ))) goto done; + if (!(wql = SysAllocString(L"WQL" ))) goto done; hr = IWbemServices_ExecQuery( services, wql, query, flags, NULL, &result ); if (hr != S_OK) goto done; @@ -267,12 +232,6 @@ done: int __cdecl wmain(int argc, WCHAR *argv[]) { - static const WCHAR getW[] = {'g','e','t',0}; - static const WCHAR quitW[] = {'q','u','i','t',0}; - static const WCHAR exitW[] = {'e','x','i','t',0}; - static const WCHAR pathW[] = {'p','a','t','h',0}; - static const WCHAR classW[] = {'c','l','a','s','s',0}; - static const WCHAR contextW[] = {'c','o','n','t','e','x','t',0}; const WCHAR *class, *value; int i; @@ -282,20 +241,18 @@ int __cdecl wmain(int argc, WCHAR *argv[]) if (i >= argc) goto not_supported; - if (!wcsicmp( argv[i], quitW ) || - !wcsicmp( argv[i], exitW )) + if (!wcsicmp( argv[i], L"quit" ) || !wcsicmp( argv[i], L"exit" )) { return 0; } - if (!wcsicmp( argv[i], classW) || - !wcsicmp( argv[i], contextW )) + if (!wcsicmp( argv[i], L"class") || !wcsicmp( argv[i], L"context" )) { WINE_FIXME( "command %s not supported\n", debugstr_w(argv[i]) ); goto not_supported; } - if (!wcsicmp( argv[i], pathW )) + if (!wcsicmp( argv[i], L"path" )) { if (++i >= argc) { @@ -317,7 +274,7 @@ int __cdecl wmain(int argc, WCHAR *argv[]) if (++i >= argc) goto not_supported; - if (!wcsicmp( argv[i], getW )) + if (!wcsicmp( argv[i], L"get" )) { if (++i >= argc) goto not_supported;
1
0
0
0
Vitaly Lipatov : ncrypt: Add NCryptIsKeyHandle stub.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 98c67d8679b144e8ef4d72e81d8c8c1af2414e2e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98c67d8679b144e8ef4d72e8…
Author: Vitaly Lipatov <lav(a)etersoft.ru> Date: Sat Oct 24 15:34:08 2020 +0300 ncrypt: Add NCryptIsKeyHandle stub. Signed-off-by: Vitaly Lipatov <lav(a)etersoft.ru> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ncrypt/main.c | 6 ++++++ dlls/ncrypt/ncrypt.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ncrypt/main.c b/dlls/ncrypt/main.c index c0cc05c43ca..a8dda3c54a0 100644 --- a/dlls/ncrypt/main.c +++ b/dlls/ncrypt/main.c @@ -132,6 +132,12 @@ SECURITY_STATUS WINAPI NCryptIsAlgSupported(NCRYPT_PROV_HANDLE provider, const W return NTE_NOT_SUPPORTED; } +BOOL WINAPI NCryptIsKeyHandle(NCRYPT_KEY_HANDLE hKey) +{ + FIXME("(0x%lx): stub\n", hKey); + return FALSE; +} + SECURITY_STATUS WINAPI NCryptOpenKey(NCRYPT_PROV_HANDLE provider, NCRYPT_KEY_HANDLE *key, const WCHAR *name, DWORD keyspec, DWORD flags) { diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec index 2b5a4fca420..0e92609790c 100644 --- a/dlls/ncrypt/ncrypt.spec +++ b/dlls/ncrypt/ncrypt.spec @@ -78,7 +78,7 @@ @ stub NCryptGetProtectionDescriptorInfo @ stdcall NCryptImportKey(long long wstr ptr ptr ptr long long) @ stub NCryptIsAlgSupported(long wstr long) -@ stub NCryptIsKeyHandle +@ stdcall NCryptIsKeyHandle(long) @ stub NCryptKeyDerivation @ stub NCryptNotifyChangeKey @ stdcall NCryptOpenKey(long ptr wstr long long)
1
0
0
0
Olivier F. R. Dierick : windowscodecs: Include system header png.h before Windows headers.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 195d0b5308580a0584296c909c2d76b799035423 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=195d0b5308580a0584296c90…
Author: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Date: Sat Oct 24 23:10:52 2020 +0200 windowscodecs: Include system header png.h before Windows headers. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50050
Signed-off-by: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/libpng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/libpng.c b/dlls/windowscodecs/libpng.c index 201f5c700d3..93ff6e056ec 100644 --- a/dlls/windowscodecs/libpng.c +++ b/dlls/windowscodecs/libpng.c @@ -25,6 +25,9 @@ #include "wine/port.h" #include <stdarg.h> +#ifdef SONAME_LIBPNG +#include <png.h> +#endif #define NONAMELESSUNION @@ -43,8 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); #ifdef SONAME_LIBPNG -#include <png.h> - static void *libpng_handle; #define MAKE_FUNCPTR(f) static typeof(f) * p##f MAKE_FUNCPTR(png_create_info_struct);
1
0
0
0
Rémi Bernon : mscoree: Fallback to assembly name if codebase path is invalid.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 7b0a939a1fb9f0acc7b450cd849fb4e1d93eb499 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b0a939a1fb9f0acc7b450cd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Oct 23 08:51:46 2020 +0200 mscoree: Fallback to assembly name if codebase path is invalid. Also use the InprocServer32 key values if there's no subkeys, as shown by the test results. L.A.Noire game crashes on startup after failing to load its ErrorHandler assembly, that has an invalid CodeBase path in the registry. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscoree/corruntimehost.c | 44 +++++++++++++++++++++++++++++-------------- dlls/mscoree/tests/comtest.c | 3 ++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index f50eb5a0cd7..cf8acae09e0 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -1747,6 +1747,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) HKEY key, subkey; LONG res; int offset = 0; + HANDLE file = INVALID_HANDLE_VALUE; DWORD numKeys, keyLength; WCHAR codebase[MAX_PATH + 8]; WCHAR classname[350], subkeyName[256]; @@ -1782,7 +1783,12 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) offset = lstrlenW(wszFileSlash); lstrcpyW(filename, codebase + offset); + + file = CreateFileW(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); } + + if (file != INVALID_HANDLE_VALUE) + CloseHandle(file); else { WCHAR assemblyname[MAX_PATH + 8]; @@ -1791,27 +1797,37 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) WARN("CodeBase value cannot be found, trying Assembly.\n"); /* get the last subkey of InprocServer32 */ res = RegQueryInfoKeyW(key, 0, 0, 0, &numKeys, 0, 0, 0, 0, 0, 0, 0); - if (res != ERROR_SUCCESS || numKeys == 0) - goto cleanup; - numKeys--; - keyLength = ARRAY_SIZE(subkeyName); - res = RegEnumKeyExW(key, numKeys, subkeyName, &keyLength, 0, 0, 0, 0); - if (res != ERROR_SUCCESS) - goto cleanup; - res = RegOpenKeyExW(key, subkeyName, 0, KEY_READ, &subkey); - if (res != ERROR_SUCCESS) - goto cleanup; - dwBufLen = MAX_PATH + 8; - res = RegGetValueW(subkey, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); - RegCloseKey(subkey); if (res != ERROR_SUCCESS) goto cleanup; + if (numKeys > 0) + { + numKeys--; + keyLength = ARRAY_SIZE(subkeyName); + res = RegEnumKeyExW(key, numKeys, subkeyName, &keyLength, 0, 0, 0, 0); + if (res != ERROR_SUCCESS) + goto cleanup; + res = RegOpenKeyExW(key, subkeyName, 0, KEY_READ, &subkey); + if (res != ERROR_SUCCESS) + goto cleanup; + dwBufLen = MAX_PATH + 8; + res = RegGetValueW(subkey, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); + RegCloseKey(subkey); + if (res != ERROR_SUCCESS) + goto cleanup; + } + else + { + dwBufLen = MAX_PATH + 8; + res = RegGetValueW(key, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); + if (res != ERROR_SUCCESS) + goto cleanup; + } hr = get_file_from_strongname(assemblyname, filename, MAX_PATH); if (FAILED(hr)) { /* - * The registry doesn't have a CodeBase entry and it's not in the GAC. + * The registry doesn't have a CodeBase entry or the file isn't there, and it's not in the GAC. * * Use the Assembly Key to retrieve the filename. * Assembly : REG_SZ : AssemblyName, Version=X.X.X.X, Culture=neutral, PublicKeyToken=null diff --git a/dlls/mscoree/tests/comtest.c b/dlls/mscoree/tests/comtest.c index 659eb9059a7..b62d527bb95 100644 --- a/dlls/mscoree/tests/comtest.c +++ b/dlls/mscoree/tests/comtest.c @@ -180,7 +180,8 @@ static void run_registry_test(run_type run) ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %x\n", ret); hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test); - todo_wine ok(hr == result_expected, "Expected %x, got %x\n", result_expected, hr); + todo_wine_if(result_expected != S_OK) + ok(hr == result_expected, "Expected %x, got %x\n", result_expected, hr); if (hr == S_OK) {
1
0
0
0
Rémi Bernon : mscoree/tests: Test querying interfaces with generated GUID.
by Alexandre Julliard
26 Oct '20
26 Oct '20
Module: wine Branch: master Commit: 6b450f8deb984fd4deb1e7e4501855b781d4dff6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b450f8deb984fd4deb1e7e4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Oct 23 08:51:45 2020 +0200 mscoree/tests: Test querying interfaces with generated GUID. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscoree/tests/comtest.c | 6 ++++++ dlls/mscoree/tests/comtest.cs | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/mscoree/tests/comtest.c b/dlls/mscoree/tests/comtest.c index 8c2ae955cef..659eb9059a7 100644 --- a/dlls/mscoree/tests/comtest.c +++ b/dlls/mscoree/tests/comtest.c @@ -33,6 +33,8 @@ HMODULE hmscoree; +DEFINE_GUID(IID_ITest2, 0x50adb433, 0xf6c5, 0x3b30, 0x92,0x0a, 0x55,0x57,0x11,0x86,0x75,0x09); + typedef enum _run_type { run_type_current_working_directory = 0, @@ -156,6 +158,7 @@ static void run_registry_test(run_type run) char buffer[256]; ITest *test = NULL; HRESULT hr, result_expected; + IUnknown *unk = NULL; HKEY hkey; DWORD ret; int i = 0; @@ -184,6 +187,9 @@ static void run_registry_test(run_type run) hr = ITest_Func(test, &i); ok(hr == S_OK, "Got %x\n", hr); ok(i == 42, "Expected 42, got %d\n", i); + hr = ITest_QueryInterface(test, &IID_ITest2, (void**)&unk); + todo_wine ok(hr == S_OK, "ITest_QueryInterface returned %x\n", hr); + if (hr == S_OK) IUnknown_Release(unk); ITest_Release(test); } diff --git a/dlls/mscoree/tests/comtest.cs b/dlls/mscoree/tests/comtest.cs index f6461450331..536cd807691 100644 --- a/dlls/mscoree/tests/comtest.cs +++ b/dlls/mscoree/tests/comtest.cs @@ -30,12 +30,22 @@ namespace DLL void Func(ref int i); } + [ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface ITest2 + { + void Func2(ref int i); + } + [Guid("2e106e50-e7a4-4489-8538-83643f100fdc"), ComVisible(true), ClassInterface(ClassInterfaceType.None)] - public class Test : ITest + public class Test : ITest, ITest2 { public void Func(ref int i) { i = 42; } + public void Func2(ref int i) + { + i = 43; + } } }
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200