ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2012
----- 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
12 participants
287 discussions
Start a n
N
ew thread
[akhaldi] 57901: [RICHED20] * Sync with Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 13 13:10:17 2012 New Revision: 57901 URL:
http://svn.reactos.org/svn/reactos?rev=57901&view=rev
Log: [RICHED20] * Sync with Wine 1.5.19. Modified: trunk/reactos/dll/win32/riched20/context.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/paint.c trunk/reactos/dll/win32/riched20/para.c trunk/reactos/dll/win32/riched20/reader.c trunk/reactos/dll/win32/riched20/style.c trunk/reactos/dll/win32/riched20/table.c trunk/reactos/dll/win32/riched20/txthost.c trunk/reactos/dll/win32/riched20/wrap.c trunk/reactos/dll/win32/riched20/writer.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/riched20/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/context…
============================================================================== --- trunk/reactos/dll/win32/riched20/context.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/context.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -22,12 +22,10 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) { - c->nSequence = editor->nSequence++; c->hDC = hDC; c->editor = editor; c->pt.x = 0; c->pt.y = 0; - c->hbrMargin = CreateSolidBrush(RGB(224,224,224)); c->rcView = editor->rcFormat; if (hDC) { c->dpi.cx = GetDeviceCaps(hDC, LOGPIXELSX); @@ -44,5 +42,4 @@ void ME_DestroyContext(ME_Context *c) { if (c->hDC) ITextHost_TxReleaseDC(c->editor->texthost, c->hDC); - DeleteObject(c->hbrMargin); } Modified: trunk/reactos/dll/win32/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
============================================================================== --- trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -283,14 +283,16 @@ static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStream *stream, ME_Style *style) { - WCHAR wszText[STREAMIN_BUFFER_SIZE+1]; WCHAR *pText; LRESULT total_bytes_read = 0; + BOOL is_read = FALSE; + static const char bom_utf8[] = {0xEF, 0xBB, 0xBF}; TRACE("%08x %p\n", dwFormat, stream); do { LONG nWideChars = 0; + WCHAR wszText[STREAMIN_BUFFER_SIZE+1]; if (!stream->dwSize) { @@ -304,8 +306,22 @@ if (!(dwFormat & SF_UNICODE)) { - /* FIXME? this is doomed to fail on true MBCS like UTF-8, luckily they're unlikely to be used as CP_ACP */ - nWideChars = MultiByteToWideChar(CP_ACP, 0, stream->buffer, stream->dwSize, wszText, STREAMIN_BUFFER_SIZE); + char * buf = stream->buffer; + DWORD size = stream->dwSize; + DWORD cp = CP_ACP; + + if (!is_read) + { + is_read = TRUE; + if (stream->dwSize >= 3 && !memcmp(stream->buffer, bom_utf8, 3)) + { + cp = CP_UTF8; + buf += 3; + size -= 3; + } + } + + nWideChars = MultiByteToWideChar(cp, 0, buf, size, wszText, STREAMIN_BUFFER_SIZE); pText = wszText; } else @@ -2687,7 +2703,6 @@ ed->nLastTotalLength = ed->nTotalLength = 0; ed->nLastTotalWidth = ed->nTotalWidth = 0; ed->nUDArrowX = -1; - ed->nSequence = 0; ed->rgbBackColor = -1; ed->hbrBackground = GetSysColorBrush(COLOR_WINDOW); ed->bCaretAtEnd = FALSE; @@ -2794,8 +2809,8 @@ if (editor->rgbBackColor != -1) DeleteObject(editor->hbrBackground); if(editor->lpOleCallback) - IUnknown_Release(editor->lpOleCallback); - IUnknown_Release(editor->texthost); + IRichEditOleCallback_Release(editor->lpOleCallback); + ITextHost_Release(editor->texthost); OleUninitialize(); FREE_OBJ(editor->pBuffer); @@ -3592,6 +3607,7 @@ return FALSE; } case WM_PASTE: + case WM_MBUTTONDOWN: ME_Paste(editor); return 0; case WM_CUT: @@ -4311,10 +4327,10 @@ } case EM_SETOLECALLBACK: if(editor->lpOleCallback) - IUnknown_Release(editor->lpOleCallback); - editor->lpOleCallback = (LPRICHEDITOLECALLBACK)lParam; + IRichEditOleCallback_Release(editor->lpOleCallback); + editor->lpOleCallback = (IRichEditOleCallback*)lParam; if(editor->lpOleCallback) - IUnknown_AddRef(editor->lpOleCallback); + IRichEditOleCallback_AddRef(editor->lpOleCallback); return TRUE; case EM_GETWORDBREAKPROC: return (LRESULT)editor->pfnWordBreak; Modified: trunk/reactos/dll/win32/riched20/editor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
============================================================================== --- trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -187,7 +187,7 @@ /* wrap.c */ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) DECLSPEC_HIDDEN; -void ME_InvalidateMarkedParagraphs(ME_TextEditor *editor, ME_DisplayItem *start_para, ME_DisplayItem *end_para) DECLSPEC_HIDDEN; +void ME_InvalidateParagraphRange(ME_TextEditor *editor, ME_DisplayItem *start_para, ME_DisplayItem *last_para) DECLSPEC_HIDDEN; void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN; /* para.c */ @@ -201,8 +201,6 @@ void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) DECLSPEC_HIDDEN; BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; -/* marks from first up to (but not including) last */ -void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last) DECLSPEC_HIDDEN; void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_SetDefaultParaFormat(PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; @@ -261,6 +259,7 @@ ME_DisplayItem *ME_InsertTableRowEndFromCursor(ME_TextEditor *editor) DECLSPEC_HIDDEN; ME_DisplayItem *ME_GetTableRowEnd(ME_DisplayItem *para) DECLSPEC_HIDDEN; ME_DisplayItem *ME_GetTableRowStart(ME_DisplayItem *para) DECLSPEC_HIDDEN; +ME_DisplayItem *ME_GetOuterParagraph(ME_DisplayItem *para) DECLSPEC_HIDDEN; void ME_CheckTablesForCorruption(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, ME_Cursor *c, int *nChars) DECLSPEC_HIDDEN; ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, ME_DisplayItem *table_row) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/riched20/editstr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editstr…
============================================================================== --- trunk/reactos/dll/win32/riched20/editstr.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/editstr.h [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -67,7 +67,6 @@ HFONT hFont; /* cached font for the style */ TEXTMETRICW tm; /* cached font metrics for the style */ int nRefs; /* reference count */ - int nSequence; /* incremented when cache needs to be rebuilt, ie. every screen redraw */ } ME_Style; typedef enum { @@ -139,7 +138,6 @@ /* this paragraph was already wrapped and hasn't changed, every change resets that flag */ #define MEPF_REWRAP 0x01 -#define MEPF_REPAINT 0x02 /* v4.1 */ #define MEPF_CELL 0x04 /* The paragraph is nested in a cell */ #define MEPF_ROWSTART 0x08 /* Hidden empty paragraph at the start of the row */ @@ -186,7 +184,6 @@ int nFlags; POINT pt; int nHeight, nWidth; - int nLastPaintYPos, nLastPaintHeight; int nRows; struct tagME_DisplayItem *prev_para, *next_para; } ME_Paragraph; @@ -335,7 +332,6 @@ int nTotalWidth, nLastTotalWidth; int nAvailWidth; /* 0 = wrap to client area, else wrap width in twips */ int nUDArrowX; - int nSequence; COLORREF rgbBackColor; HBRUSH hbrBackground; BOOL bCaretAtEnd; @@ -385,16 +381,12 @@ { HDC hDC; POINT pt; - POINT ptRowOffset; RECT rcView; - HBRUSH hbrMargin; SIZE dpi; int nAvailWidth; /* those are valid inside ME_WrapTextParagraph and related */ - POINT ptFirstRun; ME_TextEditor *editor; - int nSequence; } ME_Context; typedef struct tagME_WrapContext Modified: trunk/reactos/dll/win32/riched20/paint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/paint.c…
============================================================================== --- trunk/reactos/dll/win32/riched20/paint.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/paint.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -41,7 +41,6 @@ IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top, rcUpdate->right, rcUpdate->bottom); - editor->nSequence++; ME_InitContext(&c, editor, hDC); SetBkMode(hDC, TRANSPARENT); ME_MoveCaret(editor); @@ -1275,32 +1274,29 @@ * they can point past the end of the document */ if (editor->nLastSelStart > len || editor->nLastSelEnd > len) { repaint_start = ME_FindItemFwd(editor->pBuffer->pFirst, diParagraph); - repaint_end = editor->pBuffer->pLast; - ME_MarkForPainting(editor, repaint_start, repaint_end); + repaint_end = editor->pBuffer->pLast->member.para.prev_para; } else { /* if the start part of selection is being expanded or contracted... */ if (nStart < editor->nLastSelStart) { repaint_start = sel_start; - repaint_end = editor->pLastSelStartPara->member.para.next_para; + repaint_end = editor->pLastSelStartPara; } else if (nStart > editor->nLastSelStart) { repaint_start = editor->pLastSelStartPara; - repaint_end = sel_start->member.para.next_para; - } - ME_MarkForPainting(editor, repaint_start, repaint_end); + repaint_end = sel_start; + } /* if the end part of selection is being contracted or expanded... */ if (nEnd < editor->nLastSelEnd) { if (!repaint_start) repaint_start = sel_end; - repaint_end = editor->pLastSelEndPara->member.para.next_para; - ME_MarkForPainting(editor, sel_end, repaint_end); + repaint_end = editor->pLastSelEndPara; } else if (nEnd > editor->nLastSelEnd) { if (!repaint_start) repaint_start = editor->pLastSelEndPara; - repaint_end = sel_end->member.para.next_para; - ME_MarkForPainting(editor, editor->pLastSelEndPara, repaint_end); - } - } - - ME_InvalidateMarkedParagraphs(editor, repaint_start, repaint_end); + repaint_end = sel_end; + } + } + + if (repaint_start) + ME_InvalidateParagraphRange(editor, repaint_start, repaint_end); /* remember the last invalidated position */ ME_GetSelectionOfs(editor, &editor->nLastSelStart, &editor->nLastSelEnd); ME_GetSelectionParas(editor, &editor->pLastSelStartPara, &editor->pLastSelEndPara); Modified: trunk/reactos/dll/win32/riched20/para.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/para.c?…
============================================================================== --- trunk/reactos/dll/win32/riched20/para.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/para.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -92,15 +92,6 @@ void ME_MarkAllForWrapping(ME_TextEditor *editor) { ME_MarkForWrapping(editor, editor->pBuffer->pFirst->member.para.next_para, editor->pBuffer->pLast); -} - -void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last) -{ - while(first != last && first) - { - first->member.para.nFlags |= MEPF_REPAINT; - first = first->member.para.next_para; - } } static void ME_UpdateTableFlags(ME_DisplayItem *para) Modified: trunk/reactos/dll/win32/riched20/reader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/reader.…
============================================================================== --- trunk/reactos/dll/win32/riched20/reader.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/reader.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -2397,8 +2397,11 @@ font = RTFGetFont(info, info->rtfParam); if (font) { - if (info->ansiCodePage != CP_UTF8) + if (info->ansiCodePage != CP_UTF8 && info->codePage != font->rtfFCodePage) + { + RTFFlushOutputBuffer(info); info->codePage = font->rtfFCodePage; + } TRACE("font %d codepage %d\n", info->rtfParam, info->codePage); } else Modified: trunk/reactos/dll/win32/riched20/style.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/style.c…
============================================================================== --- trunk/reactos/dll/win32/riched20/style.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/style.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -41,7 +41,7 @@ CopyMemory(to, f, FIELD_OFFSET(CHARFORMATA, szFaceName)); to->cbSize = sizeof(CHARFORMAT2W); if (f->dwMask & CFM_FACE) { - MultiByteToWideChar(0, 0, f->szFaceName, -1, to->szFaceName, sizeof(to->szFaceName)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, f->szFaceName, -1, to->szFaceName, sizeof(to->szFaceName)/sizeof(WCHAR)); } return to; } @@ -61,7 +61,7 @@ CopyMemory(to, f, FIELD_OFFSET(CHARFORMATA, szFaceName)); /* convert face name */ if (f->dwMask & CFM_FACE) - MultiByteToWideChar(0, 0, f->szFaceName, -1, to->szFaceName, sizeof(to->szFaceName)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, f->szFaceName, -1, to->szFaceName, sizeof(to->szFaceName)/sizeof(WCHAR)); /* copy the rest of the 2A structure to 2W */ CopyMemory(&to->wWeight, &f->wWeight, sizeof(CHARFORMAT2A)-FIELD_OFFSET(CHARFORMAT2A, wWeight)); to->cbSize = sizeof(CHARFORMAT2W); @@ -78,7 +78,7 @@ { CHARFORMATA *t = (CHARFORMATA *)to; CopyMemory(t, from, FIELD_OFFSET(CHARFORMATA, szFaceName)); - WideCharToMultiByte(0, 0, from->szFaceName, -1, t->szFaceName, sizeof(t->szFaceName), 0, 0); + WideCharToMultiByte(CP_ACP, 0, from->szFaceName, -1, t->szFaceName, sizeof(t->szFaceName), NULL, NULL); if (from->dwMask & CFM_UNDERLINETYPE) { switch (from->bUnderlineType) @@ -123,7 +123,7 @@ /* copy the A structure without face name */ CopyMemory(t, from, FIELD_OFFSET(CHARFORMATA, szFaceName)); /* convert face name */ - WideCharToMultiByte(0, 0, from->szFaceName, -1, t->szFaceName, sizeof(t->szFaceName), 0, 0); + WideCharToMultiByte(CP_ACP, 0, from->szFaceName, -1, t->szFaceName, sizeof(t->szFaceName), NULL, NULL); /* copy the rest of the 2A structure to 2W */ CopyMemory(&t->wWeight, &from->wWeight, sizeof(CHARFORMAT2W)-FIELD_OFFSET(CHARFORMAT2W,wWeight)); t->cbSize = sizeof(*t); /* it was overwritten by CopyMemory */ @@ -145,7 +145,6 @@ assert(style->cbSize == sizeof(CHARFORMAT2W)); s->fmt = *style; - s->nSequence = -2; s->nRefs = 1; s->hFont = NULL; memset(&s->tm, 0, sizeof(s->tm)); Modified: trunk/reactos/dll/win32/riched20/table.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/table.c…
============================================================================== --- trunk/reactos/dll/win32/riched20/table.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/table.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -169,6 +169,20 @@ para = ME_FindItemBack(cell, diParagraph); assert(para && para->member.para.nFlags & MEPF_ROWSTART); + return para; +} + +ME_DisplayItem* ME_GetOuterParagraph(ME_DisplayItem *para) +{ + if (para->member.para.nFlags & MEPF_ROWEND) + para = para->member.para.prev_para; + while (para->member.para.pCell) + { + para = ME_GetTableRowStart(para); + if (!para->member.para.pCell) + break; + para = ME_FindItemBack(para->member.para.pCell, diParagraph); + } return para; } Modified: trunk/reactos/dll/win32/riched20/txthost.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/txthost…
============================================================================== --- trunk/reactos/dll/win32/riched20/txthost.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/txthost.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -141,8 +141,7 @@ DECLSPEC_HIDDEN BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw) { ITextHostImpl *This = impl_from_ITextHost(iface); - int pos = SetScrollPos(This->hWnd, fnBar, nPos, fRedraw); - return (pos ? TRUE : FALSE); + return SetScrollPos(This->hWnd, fnBar, nPos, fRedraw) != 0; } DECLSPEC_HIDDEN void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode) Modified: trunk/reactos/dll/win32/riched20/wrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/wrap.c?…
============================================================================== --- trunk/reactos/dll/win32/riched20/wrap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/wrap.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -589,8 +589,7 @@ { if (!*repaint_start) *repaint_start = para; - *repaint_end = para->member.para.next_para; - para->member.para.nFlags |= MEPF_REPAINT; + *repaint_end = para; } BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) @@ -738,42 +737,35 @@ ME_DestroyContext(&c); if (repaint_start || editor->nTotalLength < editor->nLastTotalLength) - { - if (!repaint_start) repaint_start = editor->pBuffer->pFirst; - ME_InvalidateMarkedParagraphs(editor, repaint_start, repaint_end); - } + ME_InvalidateParagraphRange(editor, repaint_start, repaint_end); return !!repaint_start; } -void ME_InvalidateMarkedParagraphs(ME_TextEditor *editor, - ME_DisplayItem *start_para, - ME_DisplayItem *end_para) +void ME_InvalidateParagraphRange(ME_TextEditor *editor, + ME_DisplayItem *start_para, + ME_DisplayItem *last_para) { ME_Context c; RECT rc; int ofs; - ME_DisplayItem *item; ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost)); rc = c.rcView; ofs = editor->vert_si.nPos; - item = start_para; - while(item && item != end_para) { - if (item->member.para.nFlags & MEPF_REPAINT) { - rc.top = c.rcView.top + item->member.para.pt.y - ofs; - rc.bottom = max(rc.top + item->member.para.nHeight, c.rcView.bottom); - ITextHost_TxInvalidateRect(editor->texthost, &rc, TRUE); - item->member.para.nFlags &= ~MEPF_REPAINT; - } - item = item->member.para.next_para; + if (start_para) { + start_para = ME_GetOuterParagraph(start_para); + last_para = ME_GetOuterParagraph(last_para); + rc.top = c.rcView.top + start_para->member.para.pt.y - ofs; + } else { + rc.top = c.rcView.top + editor->nTotalLength - ofs; } if (editor->nTotalLength < editor->nLastTotalLength) - { - rc.top = c.rcView.top + editor->nTotalLength - ofs; rc.bottom = c.rcView.top + editor->nLastTotalLength - ofs; - ITextHost_TxInvalidateRect(editor->texthost, &rc, TRUE); - } + else + rc.bottom = c.rcView.top + last_para->member.para.pt.y + last_para->member.para.nHeight - ofs; + ITextHost_TxInvalidateRect(editor->texthost, &rc, TRUE); + ME_DestroyContext(&c); } Modified: trunk/reactos/dll/win32/riched20/writer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/writer.…
============================================================================== --- trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] Thu Dec 13 13:10:17 2012 @@ -251,11 +251,8 @@ } while (item); item = ME_GetParagraph(pFirstRun); do { - if (item->member.para.pCell && item->member.para.pCell) + if ((pCell = item->member.para.pCell)) { - pCell = item->member.para.pCell; - if (pCell) - { ME_Border* borders[4] = { &pCell->member.cell.border.top, &pCell->member.cell.border.left, &pCell->member.cell.border.bottom, @@ -275,7 +272,6 @@ } } } - } } if (item == pLastPara) break; 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 Dec 13 13:10:17 2012 @@ -148,7 +148,7 @@ reactos/dll/win32/query # Synced to Wine-1.5.19 reactos/dll/win32/rasapi32 # Synced to Wine-1.5.4 reactos/dll/win32/resutils # Synced to Wine-1.5.19 -reactos/dll/win32/riched20 # Synced to Wine-1.5.4 +reactos/dll/win32/riched20 # Synced to Wine-1.5.19 reactos/dll/win32/riched32 # Synced to Wine-1.5.19 reactos/dll/win32/rpcrt4 # Synced to Wine-1.3.26 reactos/dll/win32/rsabase # Autosync
12 years
1
0
0
0
[akhaldi] 57902: [RICHED20_WINETEST] * Sync with Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 13 13:10:24 2012 New Revision: 57902 URL:
http://svn.reactos.org/svn/reactos?rev=57902&view=rev
Log: [RICHED20_WINETEST] * Sync with Wine 1.5.19. Modified: trunk/rostests/winetests/riched20/editor.c trunk/rostests/winetests/riched20/richole.c trunk/rostests/winetests/riched20/txtsrv.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 Dec 13 13:10:24 2012 @@ -2440,10 +2440,9 @@ y_before, y_after); y_before = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - SendMessage(hwndRichEdit, EM_SCROLL, - SB_LINEDOWN, 0); /* line down beyond bot */ + r = SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down beyond bot */ y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - + ok(r == 0x00010000, "EM_SCROLL line down returned indicating movement (0x%08x)\n", r); ok(y_before == y_after, @@ -5012,6 +5011,8 @@ const char * streamText3 = "RichEdit1"; + const char * streamTextUTF8BOM = "\xef\xbb\xbfTestUTF8WithBOM"; + const char * streamText4 = "This text just needs to be long enough to cause run to be split onto " "two separate lines and make sure the null terminating character is " @@ -5112,6 +5113,20 @@ "EM_STREAMIN: Test 3 set wrong text: Result: %s\n",buffer); ok(es.dwError == -16, "EM_STREAMIN: Test 3 set error %d, expected %d\n", es.dwError, -16); + es.dwCookie = (DWORD_PTR)&streamTextUTF8BOM; + es.dwError = 0; + es.pfnCallback = test_EM_STREAMIN_esCallback; + result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); + ok(result == 18, "got %ld, expected %d\n", result, 18); + + result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); + ok(result == 15, + "EM_STREAMIN: Test UTF8WithBOM returned %ld, expected 15\n", result); + result = strcmp (buffer,"TestUTF8WithBOM"); + ok(result == 0, + "EM_STREAMIN: Test UTF8WithBOM set wrong text: Result: %s\n",buffer); + ok(es.dwError == 0, "EM_STREAMIN: Test UTF8WithBOM set error %d, expected %d\n", es.dwError, 0); + es.dwCookie = (DWORD_PTR)&cookieForStream4; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback2; @@ -5131,7 +5146,7 @@ result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); ok (result == length5, - "EM_STREAMIN: Test 4 returned %ld, expected %d\n", result, length5); + "EM_STREAMIN: Test 5 returned %ld, expected %d\n", result, length5); ok(es.dwError == 0, "EM_STREAMIN: Test 5 set error %d, expected %d\n", es.dwError, 0); DestroyWindow(hwndRichEdit); @@ -5158,7 +5173,7 @@ char buffer[1024] = {0}; const char randomtext[] = "Some text"; - es.pfnCallback = (EDITSTREAMCALLBACK) EditStreamCallback; + es.pfnCallback = EditStreamCallback; /* StreamIn, no SFF_SELECTION */ es.dwCookie = nCallbackCount; @@ -5888,7 +5903,6 @@ result = strcmp(buffer, "one two three"); ok (result == 0, "expected '%s' but got '%s'\n", "one two three", buffer); result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); ok (result == TRUE, "Failed to undo typed characters.\n"); SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); result = strcmp(buffer, ""); 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 Dec 13 13:10:24 2012 @@ -76,7 +76,7 @@ ok(res, "SendMessage\n"); ok(reOle != NULL, "EM_GETOLEINTERFACE\n"); - hres = IUnknown_QueryInterface(reOle, &IID_ITextDocument, + hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument, (void **) &txtDoc); ok(hres == S_OK, "IRichEditOle_QueryInterface\n"); ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n"); @@ -104,7 +104,7 @@ IUnknown_Release(punk); ITextDocument_Release(txtDoc); - IUnknown_Release(reOle); + IRichEditOle_Release(reOle); DestroyWindow(w); /* Methods should return CO_E_RELEASED if the backing document has Modified: trunk/rostests/winetests/riched20/txtsrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/txtsrv…
============================================================================== --- trunk/rostests/winetests/riched20/txtsrv.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/txtsrv.c [iso-8859-1] Thu Dec 13 13:10:24 2012 @@ -657,7 +657,7 @@ static void free_texthost(void) { - IUnknown_Release(txtserv); + ITextServices_Release(txtserv); CoTaskMemFree(dummyTextHost); }
12 years
1
0
0
0
[akhaldi] 57900: [WINDOWSCODECS_WINETEST] * Import from Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 13 11:15:23 2012 New Revision: 57900 URL:
http://svn.reactos.org/svn/reactos?rev=57900&view=rev
Log: [WINDOWSCODECS_WINETEST] * Import from Wine 1.5.19. Added: trunk/rostests/winetests/windowscodecs/ trunk/rostests/winetests/windowscodecs/CMakeLists.txt (with props) trunk/rostests/winetests/windowscodecs/bitmap.c (with props) trunk/rostests/winetests/windowscodecs/bmpformat.c (with props) trunk/rostests/winetests/windowscodecs/converter.c (with props) trunk/rostests/winetests/windowscodecs/gifformat.c (with props) trunk/rostests/winetests/windowscodecs/icoformat.c (with props) trunk/rostests/winetests/windowscodecs/info.c (with props) trunk/rostests/winetests/windowscodecs/metadata.c (with props) trunk/rostests/winetests/windowscodecs/palette.c (with props) trunk/rostests/winetests/windowscodecs/pngformat.c (with props) trunk/rostests/winetests/windowscodecs/stream.c (with props) trunk/rostests/winetests/windowscodecs/testlist.c (with props) trunk/rostests/winetests/windowscodecs/tiffformat.c (with props) Modified: trunk/rostests/winetests/CMakeLists.txt [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
Added: trunk/rostests/winetests/windowscodecs/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/C…
Added: trunk/rostests/winetests/windowscodecs/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/b…
Added: trunk/rostests/winetests/windowscodecs/bmpformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/b…
Added: trunk/rostests/winetests/windowscodecs/converter.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/c…
Added: trunk/rostests/winetests/windowscodecs/gifformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/g…
Added: trunk/rostests/winetests/windowscodecs/icoformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/i…
Added: trunk/rostests/winetests/windowscodecs/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/i…
Added: trunk/rostests/winetests/windowscodecs/metadata.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/m…
Added: trunk/rostests/winetests/windowscodecs/palette.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/p…
Added: trunk/rostests/winetests/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/p…
Added: trunk/rostests/winetests/windowscodecs/stream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/s…
Added: trunk/rostests/winetests/windowscodecs/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/t…
Added: trunk/rostests/winetests/windowscodecs/tiffformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/t…
12 years
1
0
0
0
[hbelusca] 57899: [FREELDR] - Use a list of possible operating system method loading to load ReactOS / ROS-Setup / Windows / Linux or booting from a disk / partition ..., instead of using a (huge) ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Dec 13 00:46:55 2012 New Revision: 57899 URL:
http://svn.reactos.org/svn/reactos?rev=57899&view=rev
Log: [FREELDR] - Use a list of possible operating system method loading to load ReactOS / ROS-Setup / Windows / Linux or booting from a disk / partition ..., instead of using a (huge) if () else if () ... instruction. - Modify the corresponding functions to take into account for this new functionality. - Allow having a live + boot cd if needed, in a elegant way. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c trunk/reactos/boot/freeldr/freeldr/bootmgr.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h trunk/reactos/boot/freeldr/freeldr/include/linux.h trunk/reactos/boot/freeldr/freeldr/include/winldr.h trunk/reactos/boot/freeldr/freeldr/linuxboot.c trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -40,8 +40,8 @@ "ReactOS", "Linux" }; - ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); - ULONG SelectedMenuItem; + ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); + ULONG SelectedMenuItem; if (!UiDisplayMenu("Please choose a boot method:", CustomBootMenuList, @@ -74,10 +74,11 @@ VOID OptionMenuCustomBootDisk(VOID) { - CHAR SectionName[100]; - CHAR BootDriveString[20]; - ULONG SectionId; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -111,16 +112,21 @@ UiMessageBox(CustomBootPrompt); - LoadAndBootDrive(SectionName); + OperatingSystem.SystemPartition = SectionName; + OperatingSystem.LoadIdentifier = NULL; + OperatingSystem.OsLoadOptions = NULL; + + LoadAndBootDrive(&OperatingSystem, 0); } VOID OptionMenuCustomBootPartition(VOID) { - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - ULONG SectionId; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -166,17 +172,22 @@ UiMessageBox(CustomBootPrompt); - LoadAndBootPartition(SectionName); + OperatingSystem.SystemPartition = SectionName; + OperatingSystem.LoadIdentifier = NULL; + OperatingSystem.OsLoadOptions = NULL; + + LoadAndBootPartition(&OperatingSystem, 0); } VOID OptionMenuCustomBootBootSectorFile(VOID) { - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR BootSectorFileString[200]; - ULONG SectionId; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + CHAR BootSectorFileString[200]; TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -234,19 +245,24 @@ UiMessageBox(CustomBootPrompt); - LoadAndBootBootSector(SectionName); + OperatingSystem.SystemPartition = SectionName; + OperatingSystem.LoadIdentifier = NULL; + OperatingSystem.OsLoadOptions = NULL; + + LoadAndBootBootSector(&OperatingSystem, 0); } VOID OptionMenuCustomBootLinux(VOID) { - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR LinuxKernelString[200]; - CHAR LinuxInitrdString[200]; - CHAR LinuxCommandLineString[200]; - ULONG SectionId; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + CHAR LinuxKernelString[200]; + CHAR LinuxInitrdString[200]; + CHAR LinuxCommandLineString[200]; TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -331,7 +347,11 @@ UiMessageBox(CustomBootPrompt); - LoadAndBootLinux(SectionName, "Custom Linux Setup"); + OperatingSystem.SystemPartition = SectionName; + OperatingSystem.LoadIdentifier = "Custom Linux Setup"; + OperatingSystem.OsLoadOptions = NULL; + + LoadAndBootLinux(&OperatingSystem, 0); } VOID OptionMenuReboot(VOID) Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -19,21 +19,24 @@ #include <freeldr.h> -VOID LoadAndBootBootSector(PCSTR OperatingSystemName) +VOID +LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) { + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR FileName[260]; PFILE FilePointer; + ULONG BytesRead; CHAR SettingName[80]; - ULONG SectionId; - CHAR FileName[260]; - ULONG BytesRead; // Find all the message box settings and run them - UiShowMessageBoxesInSection(OperatingSystemName); + UiShowMessageBoxesInSection(SectionName); // Try to open the operating system section in the .ini file - if (!IniOpenSection(OperatingSystemName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName); + if (!IniOpenSection(SectionName, &SectionId)) + { + sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); UiMessageBox(SettingName); return; } @@ -79,22 +82,25 @@ ChainLoadBiosBootSectorCode(); } -VOID LoadAndBootPartition(PCSTR OperatingSystemName) +VOID +LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) { + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; CHAR SettingName[80]; CHAR SettingValue[80]; - ULONG SectionId; PARTITION_TABLE_ENTRY PartitionTableEntry; UCHAR DriveNumber; ULONG PartitionNumber; // Find all the message box settings and run them - UiShowMessageBoxesInSection(OperatingSystemName); + UiShowMessageBoxesInSection(SectionName); // Try to open the operating system section in the .ini file - if (!IniOpenSection(OperatingSystemName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName); + if (!IniOpenSection(SectionName, &SectionId)) + { + sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); UiMessageBox(SettingName); return; } @@ -151,20 +157,23 @@ ChainLoadBiosBootSectorCode(); } -VOID LoadAndBootDrive(PCSTR OperatingSystemName) +VOID +LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) { + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; CHAR SettingName[80]; CHAR SettingValue[80]; - ULONG SectionId; UCHAR DriveNumber; // Find all the message box settings and run them - UiShowMessageBoxesInSection(OperatingSystemName); + UiShowMessageBoxesInSection(SectionName); // Try to open the operating system section in the .ini file - if (!IniOpenSection(OperatingSystemName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName); + if (!IniOpenSection(SectionName, &SectionId)) + { + sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); UiMessageBox(SettingName); return; } Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootm…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -24,7 +24,90 @@ CHAR reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; CHAR reactos_arc_strings[32][256]; -ULONG GetDefaultOperatingSystem(OperatingSystemItem* OperatingSystemList, ULONG OperatingSystemCount) +typedef +VOID +(*OS_LOADING_METHOD)(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); + +struct +{ + CHAR BootType[80]; + USHORT OperatingSystemVersion; + OS_LOADING_METHOD Load; +} OSLoadingMethods[] = +{ +#ifdef FREELDR_REACTOS_SETUP + {"ReactOSSetup", 0 , LoadReactOSSetup }, +#endif + +#ifdef _M_IX86 + {"BootSector" , 0 , LoadAndBootBootSector}, + {"Drive" , 0 , LoadAndBootDrive }, + {"Partition" , 0 , LoadAndBootPartition }, + + {"Linux" , 0 , LoadAndBootLinux }, + + {"Windows" , 0 , LoadAndBootWindows }, + {"WindowsNT40" , _WIN32_WINNT_NT4 , LoadAndBootWindows }, +#endif + {"Windows2003" , _WIN32_WINNT_WS03, LoadAndBootWindows }, + +// {"Not found" , 0 , NULL } +}; + +VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem) +{ + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR BootType[80]; + ULONG i; + + // Try to open the operating system section in the .ini file + if (IniOpenSection(SectionName, &SectionId)) + { + // Try to read the boot type + IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); + } + else + { + BootType[0] = ANSI_NULL; + } + + if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL) + { + // Try to infere the boot type value +#ifdef _M_IX86 + ULONG FileId; + if (ArcOpen((PSTR)SectionName, OpenReadOnly, &FileId) == ESUCCESS) + { + ArcClose(FileId); + strcpy(BootType, "BootSector"); + } + else +#endif + { + strcpy(BootType, "Windows"); + } + } + + // Install the drive mapper according to this section drive mappings +#if defined(_M_IX86) && !defined(_MSC_VER) + DriveMapMapDrivesInSection(SectionName); +#endif + + // Loop through the OS loading method table and find a suitable OS to boot + for (i = 0; i < sizeof(OSLoadingMethods) / sizeof(OSLoadingMethods[0]); ++i) + { + if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0) + { + OSLoadingMethods[i].Load(OperatingSystem, + OSLoadingMethods[i].OperatingSystemVersion); + return; + } + } +} + +ULONG GetDefaultOperatingSystem(OperatingSystemItem* OperatingSystemList, ULONG OperatingSystemCount) { CHAR DefaultOSText[80]; PCSTR DefaultOSName; @@ -105,17 +188,14 @@ VOID RunLoader(VOID) { - CHAR SettingValue[80]; - CHAR BootType[80]; ULONG_PTR SectionId; ULONG OperatingSystemCount; OperatingSystemItem* OperatingSystemList; - PCSTR *OperatingSystemDisplayNames; - PCSTR SectionName; - ULONG i; + PCSTR* OperatingSystemDisplayNames; ULONG DefaultOperatingSystem; LONG TimeOut; ULONG SelectedOperatingSystem; + ULONG i; // FIXME: if possible, only detect and register ARC devices... if (!MachHwDetect()) @@ -206,78 +286,8 @@ TimeOut = -1; - // Try to open the operating system section in the .ini file - SettingValue[0] = ANSI_NULL; - SectionName = OperatingSystemList[SelectedOperatingSystem].SystemPartition; - if (IniOpenSection(SectionName, &SectionId)) - { - // Try to read the boot type - IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); - } - else - BootType[0] = ANSI_NULL; - - if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL) - { - // Try to infere boot type value -#ifdef _M_IX86 - ULONG FileId; - if (ArcOpen((CHAR*)SectionName, OpenReadOnly, &FileId) == ESUCCESS) - { - ArcClose(FileId); - strcpy(BootType, "BootSector"); - } - else -#endif - { - strcpy(BootType, "Windows"); - } - } - - // Get OS setting value - IniOpenSection("Operating Systems", &SectionId); - IniReadSettingByName(SectionId, SectionName, SettingValue, sizeof(SettingValue)); - - // Install the drive mapper according to this sections drive mappings -#if defined(_M_IX86) && !defined(_MSC_VER) - DriveMapMapDrivesInSection(SectionName); -#endif - -#ifdef FREELDR_REACTOS_SETUP - // WinLdr-style boot - LoadReactOSSetup(); -#elif defined(_M_IX86) - if (_stricmp(BootType, "Windows") == 0) - { - LoadAndBootWindows(SectionName, SettingValue, 0); - } - else if (_stricmp(BootType, "WindowsNT40") == 0) - { - LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_NT4); - } - else if (_stricmp(BootType, "Windows2003") == 0) - { - LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03); - } - else if (_stricmp(BootType, "Linux") == 0) - { - LoadAndBootLinux(SectionName, OperatingSystemDisplayNames[SelectedOperatingSystem]); - } - else if (_stricmp(BootType, "BootSector") == 0) - { - LoadAndBootBootSector(SectionName); - } - else if (_stricmp(BootType, "Partition") == 0) - { - LoadAndBootPartition(SectionName); - } - else if (_stricmp(BootType, "Drive") == 0) - { - LoadAndBootDrive(SectionName); - } -#else - LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03); -#endif + // Load the chosen operating system + LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]); } reboot: Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -19,6 +19,12 @@ #pragma once -VOID LoadAndBootBootSector(PCSTR OperatingSystemName); -VOID LoadAndBootPartition(PCSTR OperatingSystemName); -VOID LoadAndBootDrive(PCSTR OperatingSystemName); +VOID +LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); +VOID +LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); +VOID +LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); Modified: trunk/reactos/boot/freeldr/freeldr/include/linux.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/linux.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/linux.h [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -18,6 +18,7 @@ */ #include <fs.h> +#include <oslist.h> #ifndef __LINUX_H #define __LINUX_H @@ -129,7 +130,9 @@ VOID BootNewLinuxKernel(VOID); // Implemented in linux.S VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S -VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description); +VOID +LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); BOOLEAN LinuxParseIniSection(PCSTR OperatingSystemName); BOOLEAN LinuxReadBootSector(PFILE LinuxKernelFile); Modified: trunk/reactos/boot/freeldr/freeldr/include/winldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -80,9 +80,8 @@ // ReactOS Loading Functions // /////////////////////////////////////////////////////////////////////////////////////// -VOID LoadAndBootWindows(PCSTR OperatingSystemName, - PSTR SettingsValue, - USHORT OperatingSystemVersion); +VOID LoadAndBootWindows(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); // conversion.c PVOID VaToPa(PVOID Va); @@ -179,7 +178,9 @@ LPCSTR BootPath, BOOLEAN Setup); -VOID LoadReactOSSetup(VOID); +VOID +LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion); VOID WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock); Modified: trunk/reactos/boot/freeldr/freeldr/linuxboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/linux…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -72,8 +72,12 @@ return TRUE; } -VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description) -{ +VOID +LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) +{ + PCSTR SectionName = OperatingSystem->SystemPartition; + PCSTR Description = OperatingSystem->LoadIdentifier; PFILE LinuxKernel = 0; PFILE LinuxInitrdFile = 0; CHAR TempString[260]; @@ -93,7 +97,7 @@ UiDrawProgressBarCenter(0, 100, LinuxBootDescription); // Parse the .ini file section - if (!LinuxParseIniSection(OperatingSystemName)) + if (!LinuxParseIniSection(SectionName)) { goto LinuxBootFailed; } @@ -235,18 +239,18 @@ LinuxCommandLineSize = 0; } -BOOLEAN LinuxParseIniSection(PCSTR OperatingSystemName) -{ - CHAR SettingName[260]; - ULONG SectionId; +BOOLEAN LinuxParseIniSection(PCSTR SectionName) +{ + ULONG_PTR SectionId; + CHAR SettingName[260]; // Find all the message box settings and run them - UiShowMessageBoxesInSection(OperatingSystemName); + UiShowMessageBoxesInSection(SectionName); // Try to open the operating system section in the .ini file - if (!IniOpenSection(OperatingSystemName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName); + if (!IniOpenSection(SectionName, &SectionId)) + { + sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); UiMessageBox(SettingName); return FALSE; } Modified: trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -133,7 +133,9 @@ } while (InfFindNextLine(&InfContext, &InfContext)); } -VOID LoadReactOSSetup(VOID) +VOID +LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) { CHAR FileName[512]; CHAR BootPath[512]; Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Thu Dec 13 00:46:55 2012 @@ -456,22 +456,28 @@ } VOID -LoadAndBootWindows(PCSTR OperatingSystemName, - PSTR SettingsValue, - USHORT OperatingSystemVersion) -{ +LoadAndBootWindows(IN OperatingSystemItem* OperatingSystem, + IN USHORT OperatingSystemVersion) +{ + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR SettingsValue[80]; BOOLEAN HasSection; - char BootPath[MAX_PATH]; + CHAR BootPath[MAX_PATH]; CHAR FileName[MAX_PATH]; CHAR BootOptions[256]; PCHAR File; BOOLEAN Status; - ULONG_PTR SectionId; PLOADER_PARAMETER_BLOCK LoaderBlock; + + // Get OS setting value + SettingsValue[0] = ANSI_NULL; + IniOpenSection("Operating Systems", &SectionId); + IniReadSettingByName(SectionId, SectionName, SettingsValue, sizeof(SettingsValue)); // Open the operating system section // specified in the .ini file - HasSection = IniOpenSection(OperatingSystemName, &SectionId); + HasSection = IniOpenSection(SectionName, &SectionId); UiDrawBackdrop(); UiDrawProgressBarCenter(1, 100, "Loading NT..."); @@ -480,7 +486,7 @@ if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath))) { - strcpy(BootPath, OperatingSystemName); + strcpy(BootPath, SectionName); } /* Special case for LiveCD */ @@ -499,7 +505,7 @@ if (!HasSection || !IniReadSettingByName(SectionId, "Options", BootOptions, sizeof(BootOptions))) { /* Get options after the title */ - const CHAR*p = SettingsValue; + PCSTR p = SettingsValue; while (*p == ' ' || *p == '"') p++; while (*p != '\0' && *p != '"')
12 years
1
0
0
0
[hbelusca] 57898: [FREELDR] Correct the type of few variables.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Dec 13 00:15:19 2012 New Revision: 57898 URL:
http://svn.reactos.org/svn/reactos?rev=57898&view=rev
Log: [FREELDR] Correct the type of few variables. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/bootmgr.c trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] Thu Dec 13 00:15:19 2012 @@ -37,7 +37,7 @@ extern ULONG reactos_disk_count; extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; -extern char reactos_arc_strings[32][256]; +extern CHAR reactos_arc_strings[32][256]; static CHAR Hex[] = "0123456789abcdef"; UCHAR PcBiosDiskCount = 0; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Thu Dec 13 00:15:19 2012 @@ -28,7 +28,7 @@ extern ULONG reactos_disk_count; extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; -extern char reactos_arc_strings[32][256]; +extern CHAR reactos_arc_strings[32][256]; static PCM_PARTIAL_RESOURCE_LIST GetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize) Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootm…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Thu Dec 13 00:15:19 2012 @@ -20,9 +20,9 @@ #include <freeldr.h> ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; // ARC Disk Information -unsigned long reactos_disk_count = 0; -char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; -char reactos_arc_strings[32][256]; +ULONG reactos_disk_count = 0; +CHAR reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; +CHAR reactos_arc_strings[32][256]; ULONG GetDefaultOperatingSystem(OperatingSystemItem* OperatingSystemList, ULONG OperatingSystemCount) { Modified: trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/setupldr.c [iso-8859-1] Thu Dec 13 00:15:19 2012 @@ -236,5 +236,5 @@ LoaderBlock, BootOptions, BootPath, - 1); + TRUE); }
12 years
1
0
0
0
[akhaldi] 57897: * Mark this as a DUMMYUNIONNAME.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 12 21:11:22 2012 New Revision: 57897 URL:
http://svn.reactos.org/svn/reactos?rev=57897&view=rev
Log: * Mark this as a DUMMYUNIONNAME. Modified: trunk/reactos/include/psdk/propidl.idl Modified: trunk/reactos/include/psdk/propidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/propidl.idl?r…
============================================================================== --- trunk/reactos/include/psdk/propidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/propidl.idl [iso-8859-1] Wed Dec 12 21:11:22 2012 @@ -201,7 +201,7 @@ [case(VT_BYREF|VT_DISPATCH)] IDispatch **ppdispVal; [case(VT_BYREF|VT_ARRAY)] LPSAFEARRAY *pparray; [case(VT_BYREF|VT_VARIANT)] PROPVARIANT *pvarVal; - }; + } DUMMYUNIONNAME; }; typedef struct tagPROPVARIANT *LPPROPVARIANT;
12 years
1
0
0
0
[akhaldi] 57896: [OLE32_WINETEST] * Sync with Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 12 21:02:09 2012 New Revision: 57896 URL:
http://svn.reactos.org/svn/reactos?rev=57896&view=rev
Log: [OLE32_WINETEST] * Sync with Wine 1.5.19. Modified: trunk/rostests/winetests/ole32/CMakeLists.txt trunk/rostests/winetests/ole32/clipboard.c trunk/rostests/winetests/ole32/compobj.c trunk/rostests/winetests/ole32/dragdrop.c trunk/rostests/winetests/ole32/errorinfo.c trunk/rostests/winetests/ole32/hglobalstream.c trunk/rostests/winetests/ole32/marshal.c trunk/rostests/winetests/ole32/moniker.c trunk/rostests/winetests/ole32/ole2.c trunk/rostests/winetests/ole32/propvariant.c trunk/rostests/winetests/ole32/storage32.c trunk/rostests/winetests/ole32/usrmarshal.c Modified: trunk/rostests/winetests/ole32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/CMakeList…
============================================================================== --- trunk/rostests/winetests/ole32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/CMakeLists.txt [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE clipboard.c Modified: trunk/rostests/winetests/ole32/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/clipboard…
============================================================================== --- trunk/rostests/winetests/ole32/clipboard.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/clipboard.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -740,7 +740,7 @@ break; } cfs_seen[count] = fmt.cfFormat; - ok(fmt_ptr->first_use_of_cf == seen_cf ? FALSE : TRUE, "got %08x expected %08x\n", + ok(fmt_ptr->first_use_of_cf != seen_cf, "got %08x expected %08x\n", fmt_ptr->first_use_of_cf, !seen_cf); ok(fmt_ptr->res[0] == 0, "got %08x\n", fmt_ptr->res[1]); ok(fmt_ptr->res[1] == 0, "got %08x\n", fmt_ptr->res[2]); Modified: trunk/rostests/winetests/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/compobj.c…
============================================================================== --- trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -43,6 +43,7 @@ static HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject); static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew); static HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token); +static LONG (WINAPI * pRegOverridePredefKey)(HKEY key, HKEY override); #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) #define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) @@ -385,6 +386,8 @@ IUnknown *pUnk; struct info info; REFCLSID rclsid = &CLSID_InternetZoneManager; + HKEY hkey; + LONG res; hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); @@ -429,6 +432,30 @@ CloseHandle(thread); CloseHandle(info.wait); CloseHandle(info.stop); + + pCoInitializeEx(NULL, COINIT_MULTITHREADED); + + hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); + if (hr == S_OK) + { + IUnknown_Release(pUnk); + + res = RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, KEY_ALL_ACCESS, &hkey); + ok(!res, "RegOpenKeyExA returned %d\n", res); + + res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); + ok(!res, "RegOverridePredefKey returned %d\n", res); + + hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); + ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08x\n", hr); + + res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, NULL); + ok(!res, "RegOverridePredefKey returned %d\n", res); + + if (hr == S_OK) IUnknown_Release(pUnk); + RegCloseKey(hkey); + } + CoUninitialize(); } static ATOM register_dummy_class(void) @@ -717,6 +744,8 @@ { HRESULT hr; CLSID clsid; + HKEY hkey; + LONG res; hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok(hr == CO_E_NOTINITIALIZED, @@ -738,6 +767,28 @@ "CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG\n", hr); + if (!pRegOverridePredefKey) + { + win_skip("RegOverridePredefKey not available\n"); + CoUninitialize(); + return; + } + hr = CoGetPSClsid(&IID_IClassFactory, &clsid); + ok_ole_success(hr, "CoGetPSClsid"); + + res = RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, KEY_ALL_ACCESS, &hkey); + ok(!res, "RegOpenKeyExA returned %d\n", res); + + res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); + ok(!res, "RegOverridePredefKey returned %d\n", res); + + hr = CoGetPSClsid(&IID_IClassFactory, &clsid); + ok_ole_success(hr, "CoGetPSClsid"); + + res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, NULL); + ok(!res, "RegOverridePredefKey returned %d\n", res); + + RegCloseKey(hkey); CoUninitialize(); } @@ -1112,7 +1163,7 @@ static inline BOOL is_module_loaded(const char *module) { - return GetModuleHandle(module) ? TRUE : FALSE; + return GetModuleHandle(module) != 0; } static void test_CoFreeUnusedLibraries(void) @@ -1514,10 +1565,12 @@ START_TEST(compobj) { HMODULE hOle32 = GetModuleHandle("ole32"); + HMODULE hAdvapi32 = GetModuleHandle("advapi32"); pCoGetObjectContext = (void*)GetProcAddress(hOle32, "CoGetObjectContext"); pCoSwitchCallContext = (void*)GetProcAddress(hOle32, "CoSwitchCallContext"); pCoGetTreatAsClass = (void*)GetProcAddress(hOle32,"CoGetTreatAsClass"); pCoGetContextToken = (void*)GetProcAddress(hOle32, "CoGetContextToken"); + pRegOverridePredefKey = (void*)GetProcAddress(hAdvapi32, "RegOverridePredefKey"); if (!(pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"))) { trace("You need DCOM95 installed to run this test\n"); Modified: trunk/rostests/winetests/ole32/dragdrop.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/dragdrop.…
============================================================================== --- trunk/rostests/winetests/ole32/dragdrop.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/dragdrop.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -43,7 +43,7 @@ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDropTarget)) { - IUnknown_AddRef(iface); + IDropTarget_AddRef(iface); *ppvObject = iface; return S_OK; } Modified: trunk/rostests/winetests/ole32/errorinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/errorinfo…
============================================================================== --- trunk/rostests/winetests/ole32/errorinfo.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/errorinfo.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -47,9 +47,14 @@ static WCHAR wszDescription[] = {'F','a','i','l','e','d',' ','S','p','r','o','c','k','e','t',0}; static WCHAR wszHelpFile[] = {'s','p','r','o','c','k','e','t','.','h','l','p',0}; static WCHAR wszSource[] = {'s','p','r','o','c','k','e','t',0}; + IUnknown *unk; hr = CreateErrorInfo(&pCreateErrorInfo); ok_ole_success(hr, "CreateErrorInfo"); + + hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IUnknown, (void**)&unk); + ok_ole_success(hr, "QI"); + IUnknown_Release(unk); hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo, NULL); ok_ole_success(hr, "ICreateErrorInfo_SetDescription"); @@ -77,6 +82,10 @@ hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IErrorInfo, (void **)&pErrorInfo); ok_ole_success(hr, "ICreateErrorInfo_QueryInterface"); + + hr = IErrorInfo_QueryInterface(pErrorInfo, &IID_IUnknown, (void**)&unk); + ok_ole_success(hr, "QI"); + IUnknown_Release(unk); ICreateErrorInfo_Release(pCreateErrorInfo); Modified: trunk/rostests/winetests/ole32/hglobalstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/hglobalst…
============================================================================== --- trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -299,7 +299,7 @@ IsEqualIID(riid, &IID_IStream)) { *ppv = iface; - IUnknown_AddRef(iface); + IStream_AddRef(iface); return S_OK; } *ppv = NULL; Modified: trunk/rostests/winetests/ole32/marshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/marshal.c…
============================================================================== --- trunk/rostests/winetests/ole32/marshal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/marshal.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -1331,6 +1331,9 @@ CoDisconnectObject((IUnknown*)&Test_ClassFactory, 0); ok_no_locks(); + + hr = CoDisconnectObject(NULL, 0); + ok( hr == E_INVALIDARG, "wrong status %x\n", hr ); } /* tests failure case of a same-thread marshal and unmarshal twice */ @@ -1439,7 +1442,7 @@ trace("call to proxy's QueryInterface from wrong apartment returned 0x%08x\n", hr); /* now be really bad and release the proxy from the wrong apartment */ - IUnknown_Release(cf); + IClassFactory_Release(cf); CoUninitialize(); @@ -1472,7 +1475,7 @@ ok_more_than_one_lock(); /* do a call that will fail, but result in IRemUnknown being used by the proxy */ - IClassFactory_QueryInterface(pProxy, &IID_IStream, (LPVOID *)&pStream); + IUnknown_QueryInterface(pProxy, &IID_IStream, (LPVOID *)&pStream); /* create a thread that we can misbehave in */ thread = CreateThread(NULL, 0, bad_thread_proc, pProxy, 0, &tid2); @@ -1497,7 +1500,7 @@ IsEqualGUID(riid, &IID_IClassFactory)) { *ppvObj = iface; - IClassFactory_AddRef(iface); + IMessageFilter_AddRef(iface); return S_OK; } @@ -2346,7 +2349,7 @@ IsEqualGUID(riid, &IID_IStdMarshalInfo)) { *ppvObj = iface; - IClassFactory_AddRef(iface); + IStdMarshalInfo_AddRef(iface); return S_OK; } @@ -2468,10 +2471,10 @@ ok_ole_success(hr, "CoUnmarshalInterface"); IStream_Release(pStream); - hr = IUnknown_QueryInterface(pProxy, &IID_IUnknown, (LPVOID*)&pUnknown1); + hr = IClassFactory_QueryInterface(pProxy, &IID_IUnknown, (LPVOID*)&pUnknown1); ok_ole_success(hr, "IUnknown_QueryInterface IID_IUnknown"); - hr = IUnknown_QueryInterface(pProxy, &IID_IRemUnknown, (LPVOID*)&pProxy2); + hr = IClassFactory_QueryInterface(pProxy, &IID_IRemUnknown, (LPVOID*)&pProxy2); ok_ole_success(hr, "IUnknown_QueryInterface IID_IStream"); hr = IUnknown_QueryInterface(pProxy2, &IID_IUnknown, (LPVOID*)&pUnknown2); @@ -2479,10 +2482,10 @@ ok(pUnknown1 == pUnknown2, "both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2); - hr = IUnknown_QueryInterface(pProxy, &IID_IMarshal, (LPVOID*)&pMarshal); + hr = IClassFactory_QueryInterface(pProxy, &IID_IMarshal, (LPVOID*)&pMarshal); ok_ole_success(hr, "IUnknown_QueryInterface IID_IMarshal"); - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (LPVOID*)&pCliSec); + hr = IClassFactory_QueryInterface(pProxy, &IID_IClientSecurity, (LPVOID*)&pCliSec); ok_ole_success(hr, "IUnknown_QueryInterface IID_IClientSecurity"); hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pProxy, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -2850,8 +2853,10 @@ static void test_manualresetevent(void) { + ISynchronizeHandle *sync_handle; ISynchronize *psync1, *psync2; IUnknown *punk; + HANDLE handle; LONG ref; HRESULT hr; @@ -2884,6 +2889,17 @@ ok(hr == S_OK, "Got 0x%08x\n", hr); ok(!!psync2, "Got NULL.\n"); ok(psync1 != psync2, "psync1 == psync2.\n"); + + hr = ISynchronize_QueryInterface(psync2, &IID_ISynchronizeHandle, (void**)&sync_handle); + ok(hr == S_OK, "QueryInterface(IID_ISynchronizeHandle) failed: %08x\n", hr); + + handle = NULL; + hr = ISynchronizeHandle_GetHandle(sync_handle, &handle); + ok(hr == S_OK, "GetHandle failed: %08x\n", hr); + ok(handle != NULL && handle != INVALID_HANDLE_VALUE, "handle = %p\n", handle); + + ISynchronizeHandle_Release(sync_handle); + hr = ISynchronize_Wait(psync2, 0, 5); ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr); @@ -2939,7 +2955,7 @@ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IChannelHook)) { *ppv = iface; - IUnknown_AddRef(iface); + IChannelHook_AddRef(iface); return S_OK; } Modified: trunk/rostests/winetests/ole32/moniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/moniker.c…
============================================================================== --- trunk/rostests/winetests/ole32/moniker.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/moniker.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -723,7 +723,7 @@ IsEqualIID(riid, &IID_IParseDisplayName)) { *ppv = iface; - IUnknown_AddRef(iface); + IParseDisplayName_AddRef(iface); return S_OK; } *ppv = NULL; Modified: trunk/rostests/winetests/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/ole2.c?re…
============================================================================== --- trunk/rostests/winetests/ole32/ole2.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/ole2.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -616,7 +616,7 @@ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { *ppv = iface; - IUnknown_AddRef(iface); + IClassFactory_AddRef(iface); return S_OK; } *ppv = NULL; @@ -725,6 +725,84 @@ static IRunnableObject OleObjectRunnable = { &OleObjectRunnableVtbl }; static const CLSID CLSID_Equation3 = {0x0002CE02, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + +static HRESULT WINAPI viewobject_QueryInterface(IViewObject *iface, REFIID riid, void **obj) +{ + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IViewObject)) + { + *obj = iface; + return S_OK; + } + + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI viewobject_AddRef(IViewObject *iface) +{ + return 2; +} + +static ULONG WINAPI viewobject_Release(IViewObject *iface) +{ + return 1; +} + +static HRESULT WINAPI viewobject_Draw(IViewObject *iface, DWORD aspect, LONG index, + void *paspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, + LPCRECTL bounds, LPCRECTL wbounds, BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), + ULONG_PTR dwContinue) +{ + ok(index == -1, "index=%d\n", index); + return S_OK; +} + +static HRESULT WINAPI viewobject_GetColorSet(IViewObject *iface, DWORD draw_aspect, LONG index, + void *aspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **colorset) +{ + ok(0, "unexpected call GetColorSet\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI viewobject_Freeze(IViewObject *iface, DWORD draw_aspect, LONG index, + void *aspect, DWORD *freeze) +{ + ok(0, "unexpected call Freeze\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI viewobject_Unfreeze(IViewObject *iface, DWORD freeze) +{ + ok(0, "unexpected call Unfreeze\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI viewobject_SetAdvise(IViewObject *iface, DWORD aspects, DWORD advf, IAdviseSink *sink) +{ + ok(0, "unexpected call SetAdvise\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI viewobject_GetAdvise(IViewObject *iface, DWORD *aspects, DWORD *advf, + IAdviseSink **sink) +{ + ok(0, "unexpected call GetAdvise\n"); + return E_NOTIMPL; +} + +static const struct IViewObjectVtbl viewobjectvtbl = { + viewobject_QueryInterface, + viewobject_AddRef, + viewobject_Release, + viewobject_Draw, + viewobject_GetColorSet, + viewobject_Freeze, + viewobject_Unfreeze, + viewobject_SetAdvise, + viewobject_GetAdvise +}; + +static IViewObject viewobject = { &viewobjectvtbl }; static void test_OleCreate(IStorage *pStorage) { @@ -997,7 +1075,7 @@ if (IsEqualIID(riid, &IID_IAdviseSink) || IsEqualIID(riid, &IID_IUnknown)) { *ppv = iface; - IUnknown_AddRef(iface); + IAdviseSink_AddRef(iface); return S_OK; } *ppv = NULL; @@ -1279,11 +1357,11 @@ hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IOleCache2, (LPVOID *)&pOleCache); ok_ole_success(hr, "CreateDataCache"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IPersistStorage)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IViewObject)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IOleCacheControl, (LPVOID *)&pOleCacheControl); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IOleCacheControl, (LPVOID *)&pOleCacheControl); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IOleCacheControl)"); hr = IViewObject_SetAdvise(pViewObject, DVASPECT_ICON, ADVF_PRIMEFIRST, &AdviseSink); @@ -1299,16 +1377,16 @@ ok_ole_success(hr, "IPersistStorage_GetClassID"); ok(IsEqualCLSID(&clsid, &IID_NULL), "clsid should be blank\n"); - hr = IOleCache_Uncache(pOleCache, 0xdeadbeef); + hr = IOleCache2_Uncache(pOleCache, 0xdeadbeef); ok(hr == OLE_E_NOCONNECTION, "IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%x\n", hr); /* Both tests crash on NT4 and below. StgCreatePropSetStg is only available on w2k and above. */ if (GetProcAddress(GetModuleHandleA("ole32.dll"), "StgCreatePropSetStg")) { - hr = IOleCache_Cache(pOleCache, NULL, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, NULL, 0, &dwConnection); ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08x\n", hr); - hr = IOleCache_Cache(pOleCache, NULL, 0, NULL); + hr = IOleCache2_Cache(pOleCache, NULL, 0, NULL); ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08x\n", hr); } else @@ -1323,7 +1401,7 @@ for (i = 0; i < 7; i++) { fmtetc.tymed = 1 << i; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); if ((fmtetc.cfFormat == CF_METAFILEPICT && fmtetc.tymed == TYMED_MFPICT) || (fmtetc.cfFormat == CF_BITMAP && fmtetc.tymed == TYMED_GDI) || (fmtetc.cfFormat == CF_DIB && fmtetc.tymed == TYMED_HGLOBAL) || @@ -1340,7 +1418,7 @@ fmtetc.cfFormat, fmtetc.tymed, hr); if (SUCCEEDED(hr)) { - hr = IOleCache_Uncache(pOleCache, dwConnection); + hr = IOleCache2_Uncache(pOleCache, dwConnection); ok_ole_success(hr, "IOleCache_Uncache"); } } @@ -1349,13 +1427,13 @@ fmtetc.cfFormat = CF_BITMAP; fmtetc.dwAspect = DVASPECT_THUMBNAIL; fmtetc.tymed = TYMED_GDI; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok_ole_success(hr, "IOleCache_Cache"); fmtetc.cfFormat = 0; fmtetc.dwAspect = DVASPECT_ICON; fmtetc.tymed = TYMED_MFPICT; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok_ole_success(hr, "IOleCache_Cache"); MultiByteToWideChar(CP_ACP, 0, szSystemDir, -1, wszPath, sizeof(wszPath)/sizeof(wszPath[0])); @@ -1368,11 +1446,11 @@ stgmedium.pUnkForRelease = NULL; fmtetc.dwAspect = DVASPECT_CONTENT; - hr = IOleCache_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); + hr = IOleCache2_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); ok(hr == OLE_E_BLANK, "IOleCache_SetData for aspect not in cache should have return OLE_E_BLANK instead of 0x%08x\n", hr); fmtetc.dwAspect = DVASPECT_ICON; - hr = IOleCache_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); + hr = IOleCache2_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); ok_ole_success(hr, "IOleCache_SetData"); ReleaseStgMedium(&stgmedium); @@ -1421,7 +1499,7 @@ IPersistStorage_Release(pPS); IViewObject_Release(pViewObject); - IOleCache_Release(pOleCache); + IOleCache2_Release(pOleCache); IOleCacheControl_Release(pOleCacheControl); CHECK_NO_EXTRA_METHODS(); @@ -1433,9 +1511,9 @@ hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IOleCache2, (LPVOID *)&pOleCache); ok_ole_success(hr, "CreateDataCache"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IPersistStorage)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IViewObject)"); hr = IViewObject_SetAdvise(pViewObject, DVASPECT_ICON, ADVF_PRIMEFIRST, &AdviseSink); @@ -1452,7 +1530,7 @@ fmtetc.lindex = -1; fmtetc.ptd = NULL; fmtetc.tymed = TYMED_MFPICT; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok(hr == CACHE_S_SAMECACHE, "IOleCache_Cache with already loaded data format type should return CACHE_S_SAMECACHE instead of 0x%x\n", hr); rcBounds.left = 0; @@ -1486,13 +1564,13 @@ DeleteDC(hdcMem); todo_wine { - hr = IOleCache_InitCache(pOleCache, &DataObject); + hr = IOleCache2_InitCache(pOleCache, &DataObject); ok(hr == CACHE_E_NOCACHE_UPDATED, "IOleCache_InitCache should have returned CACHE_E_NOCACHE_UPDATED instead of 0x%08x\n", hr); } IPersistStorage_Release(pPS); IViewObject_Release(pViewObject); - IOleCache_Release(pOleCache); + IOleCache2_Release(pOleCache); todo_wine { CHECK_NO_EXTRA_METHODS(); @@ -1503,16 +1581,16 @@ expected_method_list = methods_cachethenrun; - hr = IOleCache_QueryInterface(pOleCache, &IID_IDataObject, (LPVOID *)&pCacheDataObject); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IDataObject, (LPVOID *)&pCacheDataObject); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IDataObject)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IOleCacheControl, (LPVOID *)&pOleCacheControl); + hr = IOleCache2_QueryInterface(pOleCache, &IID_IOleCacheControl, (LPVOID *)&pOleCacheControl); ok_ole_success(hr, "IOleCache_QueryInterface(IID_IOleCacheControl)"); fmtetc.cfFormat = CF_METAFILEPICT; fmtetc.dwAspect = DVASPECT_CONTENT; fmtetc.tymed = TYMED_MFPICT; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok_ole_success(hr, "IOleCache_Cache"); hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); @@ -1522,14 +1600,14 @@ fmtetc.dwAspect = DVASPECT_CONTENT; fmtetc.tymed = TYMED_HGLOBAL; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); ok(hr == OLE_E_BLANK, "got %08x\n", hr); fmtetc.cfFormat = cf_test_2; - hr = IOleCache_Cache(pOleCache, &fmtetc, ADVF_PRIMEFIRST, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, ADVF_PRIMEFIRST, &dwConnection); ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); @@ -1539,7 +1617,7 @@ ok_ole_success(hr, "IOleCacheControl_OnRun"); fmtetc.cfFormat = cf_test_3; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); + hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); fmtetc.cfFormat = cf_test_1; @@ -1557,7 +1635,7 @@ IOleCacheControl_Release(pOleCacheControl); IDataObject_Release(pCacheDataObject); - IOleCache_Release(pOleCache); + IOleCache2_Release(pOleCache); CHECK_NO_EXTRA_METHODS(); @@ -1853,6 +1931,21 @@ ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr); } +static void test_OleDraw(void) +{ + HRESULT hr; + RECT rect; + + hr = OleDraw((IUnknown*)&viewobject, 0, (HDC)0x1, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = OleDraw(NULL, 0, (HDC)0x1, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = OleDraw(NULL, 0, (HDC)0x1, &rect); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); +} + START_TEST(ole2) { DWORD dwRegister; @@ -1889,6 +1982,7 @@ test_default_handler(); test_runnable(); test_OleLockRunning(); + test_OleDraw(); CoUninitialize(); } Modified: trunk/rostests/winetests/ole32/propvariant.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/propvaria…
============================================================================== --- trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -56,7 +56,7 @@ { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_UNKNOWN */ { PROP_V1 , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DECIMAL */ { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 15 */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO }, /* VT_I1 */ + { PROP_V1 , PROP_V1 | PROP_TODO , PROP_V1 , PROP_V1 | PROP_TODO }, /* VT_I1 */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI1 */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI2 */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI4 */ @@ -245,8 +245,267 @@ memset(&propvarSrc, 0, sizeof(propvarSrc)); } +struct _PMemoryAllocator_vtable { + void *Allocate; /* virtual void* Allocate(ULONG cbSize); */ + void *Free; /* virtual void Free(void *pv); */ +}; + +typedef struct _PMemoryAllocator { + struct _PMemoryAllocator_vtable *vt; +} PMemoryAllocator; + +#ifdef __i386__ +#define __thiscall __stdcall +#else +#define __thiscall __cdecl +#endif + +static void * __thiscall PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) +{ + return CoTaskMemAlloc(cbSize); +} + +static void __thiscall PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) +{ + CoTaskMemFree(pv); +} + +#ifdef __i386__ + +#include "pshpack1.h" +typedef struct +{ + BYTE pop_eax; /* popl %eax */ + BYTE push_ecx; /* pushl %ecx */ + BYTE push_eax; /* pushl %eax */ + BYTE jmp_func; /* jmp $func */ + DWORD func; +} THISCALL_TO_STDCALL_THUNK; +#include "poppack.h" + +static THISCALL_TO_STDCALL_THUNK *wrapperCodeMem = NULL; + +static void fill_thunk(THISCALL_TO_STDCALL_THUNK *thunk, void *fn) +{ + thunk->pop_eax = 0x58; + thunk->push_ecx = 0x51; + thunk->push_eax = 0x50; + thunk->jmp_func = 0xe9; + thunk->func = (char*)fn - (char*)(&thunk->func + 1); +} + +static void setup_vtable(struct _PMemoryAllocator_vtable *vtable) +{ + wrapperCodeMem = VirtualAlloc(NULL, 2 * sizeof(*wrapperCodeMem), + MEM_COMMIT, PAGE_EXECUTE_READWRITE); + + fill_thunk(&wrapperCodeMem[0], PMemoryAllocator_Allocate); + fill_thunk(&wrapperCodeMem[1], PMemoryAllocator_Free); + + vtable->Allocate = &wrapperCodeMem[0]; + vtable->Free = &wrapperCodeMem[1]; +} + +#else + +static void setup_vtable(struct _PMemoryAllocator_vtable *vtable) +{ + vtable->Allocate = PMemoryAllocator_Allocate; + vtable->Free = PMemoryAllocator_Free; +} + +#endif + +static const char serialized_empty[] = { + 0,0, /* VT_EMPTY */ + 0,0, /* padding */ +}; + +static const char serialized_null[] = { + 1,0, /* VT_NULL */ + 0,0, /* padding */ +}; + +static const char serialized_i4[] = { + 3,0, /* VT_I4 */ + 0,0, /* padding */ + 0xef,0xcd,0xab,0xfe +}; + +static const char serialized_bstr_wc[] = { + 8,0, /* VT_BSTR */ + 0,0, /* padding */ + 10,0,0,0, /* size */ + 't',0,'e',0, + 's',0,'t',0, + 0,0,0,0 +}; + +static const char serialized_bstr_mb[] = { + 8,0, /* VT_BSTR */ + 0,0, /* padding */ + 5,0,0,0, /* size */ + 't','e','s','t', + 0,0,0,0 +}; + +static void test_propertytovariant(void) +{ + HANDLE hole32; + BOOLEAN (__stdcall *pStgConvertPropertyToVariant)(const SERIALIZEDPROPERTYVALUE*,USHORT,PROPVARIANT*,PMemoryAllocator*); + PROPVARIANT propvar; + PMemoryAllocator allocator; + struct _PMemoryAllocator_vtable vtable; + BOOLEAN ret; + static const WCHAR test_string[] = {'t','e','s','t',0}; + + hole32 = GetModuleHandleA("ole32"); + + pStgConvertPropertyToVariant = (void*)GetProcAddress(hole32, "StgConvertPropertyToVariant"); + + if (!pStgConvertPropertyToVariant) + { + win_skip("StgConvertPropertyToVariant not available\n"); + return; + } + + setup_vtable(&vtable); + allocator.vt = &vtable; + + ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_empty, + CP_WINUNICODE, &propvar, &allocator); + + ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); + ok(propvar.vt == VT_EMPTY, "unexpected vt %x\n", propvar.vt); + + ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_null, + CP_WINUNICODE, &propvar, &allocator); + + ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); + ok(propvar.vt == VT_NULL, "unexpected vt %x\n", propvar.vt); + + ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_i4, + CP_WINUNICODE, &propvar, &allocator); + + ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); + ok(propvar.vt == VT_I4, "unexpected vt %x\n", propvar.vt); + ok(U(propvar).lVal == 0xfeabcdef, "unexpected lVal %x\n", U(propvar).lVal); + + ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_bstr_wc, + CP_WINUNICODE, &propvar, &allocator); + + ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); + ok(propvar.vt == VT_BSTR, "unexpected vt %x\n", propvar.vt); + ok(!lstrcmpW(U(propvar).bstrVal, test_string), "unexpected string value\n"); + PropVariantClear(&propvar); + + ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_bstr_mb, + CP_UTF8, &propvar, &allocator); + + ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); + ok(propvar.vt == VT_BSTR, "unexpected vt %x\n", propvar.vt); + ok(!lstrcmpW(U(propvar).bstrVal, test_string), "unexpected string value\n"); + PropVariantClear(&propvar); +} + +static void test_varianttoproperty(void) +{ + HANDLE hole32; + PROPVARIANT propvar; + SERIALIZEDPROPERTYVALUE *propvalue, *own_propvalue; + SERIALIZEDPROPERTYVALUE* (__stdcall *pStgConvertVariantToProperty)( + const PROPVARIANT*,USHORT,SERIALIZEDPROPERTYVALUE*,ULONG*,PROPID,BOOLEAN,ULONG*); + ULONG len; + static const WCHAR test_string[] = {'t','e','s','t',0}; + BSTR test_string_bstr; + + hole32 = GetModuleHandleA("ole32"); + + pStgConvertVariantToProperty = (void*)GetProcAddress(hole32, "StgConvertVariantToProperty"); + + if (!pStgConvertVariantToProperty) + { + win_skip("StgConvertVariantToProperty not available\n"); + return; + } + + own_propvalue = HeapAlloc(GetProcessHeap(), 0, sizeof(SERIALIZEDPROPERTYVALUE) + 20); + + PropVariantInit(&propvar); + + propvar.vt = VT_I4; + U(propvar).lVal = 0xfeabcdef; + + len = 0xdeadbeef; + propvalue = pStgConvertVariantToProperty(&propvar, CP_WINUNICODE, NULL, &len, + 0, FALSE, 0); + + ok(propvalue == NULL, "got nonnull propvalue\n"); + todo_wine ok(len == 8, "unexpected length %d\n", len); + + if (len == 0xdeadbeef) + { + HeapFree(GetProcessHeap(), 0, own_propvalue); + return; + } + + len = 20; + propvalue = pStgConvertVariantToProperty(&propvar, CP_WINUNICODE, own_propvalue, &len, + 0, FALSE, 0); + + ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); + ok(len == 8, "unexpected length %d\n", len); + ok(!memcmp(propvalue, serialized_i4, 8), "got wrong data\n"); + + propvar.vt = VT_EMPTY; + len = 20; + own_propvalue->dwType = 0xdeadbeef; + propvalue = pStgConvertVariantToProperty(&propvar, CP_WINUNICODE, own_propvalue, &len, + 0, FALSE, 0); + + ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); + ok(len == 4 || broken(len == 0) /* before Vista */, "unexpected length %d\n", len); + if (len) ok(!memcmp(propvalue, serialized_empty, 4), "got wrong data\n"); + else ok(propvalue->dwType == 0xdeadbeef, "unexpected type %d\n", propvalue->dwType); + + propvar.vt = VT_NULL; + len = 20; + propvalue = pStgConvertVariantToProperty(&propvar, CP_WINUNICODE, own_propvalue, &len, + 0, FALSE, 0); + + ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); + ok(len == 4, "unexpected length %d\n", len); + ok(!memcmp(propvalue, serialized_null, 4), "got wrong data\n"); + + test_string_bstr = SysAllocString(test_string); + + propvar.vt = VT_BSTR; + U(propvar).bstrVal = test_string_bstr; + len = 20; + propvalue = pStgConvertVariantToProperty(&propvar, CP_WINUNICODE, own_propvalue, &len, + 0, FALSE, 0); + + ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); + ok(len == 20, "unexpected length %d\n", len); + ok(!memcmp(propvalue, serialized_bstr_wc, 20), "got wrong data\n"); + + len = 20; + propvalue = pStgConvertVariantToProperty(&propvar, CP_UTF8, own_propvalue, &len, + 0, FALSE, 0); + + ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); + ok(len == 16, "unexpected length %d\n", len); + ok(!memcmp(propvalue, serialized_bstr_mb, 16), "got wrong data\n"); + + SysFreeString(test_string_bstr); + + HeapFree(GetProcessHeap(), 0, own_propvalue); +} + START_TEST(propvariant) { test_validtypes(); test_copy(); -} + test_propertytovariant(); + test_varianttoproperty(); +} Modified: trunk/rostests/winetests/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/storage32…
============================================================================== --- trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -315,6 +315,7 @@ LARGE_INTEGER pos; ULARGE_INTEGER p; unsigned char buffer[0x100]; + IUnknown *unk; DeleteFileA(filenameA); @@ -347,6 +348,13 @@ /* now really create a stream and delete it */ r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); ok(r==S_OK, "IStorage->CreateStream failed\n"); + + /* test for support interfaces */ + r = IStream_QueryInterface(stm, &IID_IPersist, (void**)&unk); + ok(r==E_NOINTERFACE, "got 0x%08x\n", r); + r = IStream_QueryInterface(stm, &IID_IPersistStream, (void**)&unk); + ok(r==E_NOINTERFACE, "got 0x%08x\n", r); + r = IStream_Release(stm); ok(r == 0, "wrong ref count\n"); r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); @@ -1324,7 +1332,7 @@ ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08x\n", r); if (r == S_OK) - IStorage_Release(stm); + IStream_Release(stm); IStorage_Release(stg2); } @@ -1339,13 +1347,13 @@ ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); if (r == S_OK) - IStorage_Release(stm2); + IStream_Release(stm2); r = IStorage_OpenStream(stg, stmname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm2); ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); if (r == S_OK) - IStorage_Release(stm2); + IStream_Release(stm2); /* cannot rename the stream while it's open */ r = IStorage_RenameElement(stg, stmname, othername); @@ -1359,7 +1367,7 @@ r = IStream_Write(stm, "this shouldn't work\n", 20, NULL); ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); - IStorage_Release(stm); + IStream_Release(stm); } IStorage_Release(stg); @@ -1513,7 +1521,7 @@ ok(r==S_OK, "IStream_Write should succeed %08x\n", r); IStream_Release(stm); - IStream_Release(stg); + IStorage_Release(stg); r = DeleteFileA(filenameA); ok( r == TRUE, "deleted file\n"); @@ -1643,7 +1651,7 @@ r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); if (r == S_OK) - IStream_Release(stg3); + IStorage_Release(stg3); /* But changes cannot be committed. */ r = IStorage_Commit(stg2, 0); @@ -1695,7 +1703,7 @@ IStorage_Release(stg2); } - IStream_Release(stg); + IStorage_Release(stg); r = DeleteFileA(filenameA); ok( r == TRUE, "deleted file\n"); @@ -2001,13 +2009,13 @@ hr = IStorage_CreateStorage( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); ok(hr == STG_E_FILEALREADYEXISTS, "should fail, res=%x\n", hr); if (SUCCEEDED(hr)) - IStream_Release(stg3); + IStorage_Release(stg3); /* CreateStorage on read-only storage, name does not exist */ hr = IStorage_CreateStorage( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); if (SUCCEEDED(hr)) - IStream_Release(stg3); + IStorage_Release(stg3); /* DestroyElement on read-only storage, name exists */ hr = IStorage_DestroyElement( stg2, streamW ); @@ -2993,6 +3001,35 @@ ok(stat.cbSize.u.LowPart < 2512, "expected truncated size, got %d\n", stat.cbSize.u.LowPart); ILockBytes_Release(ilb); +} + +static void test_convert(void) +{ + static const WCHAR filename[] = {'s','t','o','r','a','g','e','.','s','t','g',0}; + IStorage *stg; + HRESULT hr; + + hr = GetConvertStg(NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); + ok(hr == S_OK, "StgCreateDocfile failed\n"); + hr = GetConvertStg(stg); + ok(hr == STG_E_FILENOTFOUND, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, TRUE); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, TRUE); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = GetConvertStg(stg); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = GetConvertStg(stg); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + + IStorage_Release(stg); + + DeleteFileW(filename); } START_TEST(storage32) @@ -3038,4 +3075,5 @@ test_copyto_locking(); test_copyto_recursive(); test_hglobal_storage_creation(); -} + test_convert(); +} Modified: trunk/rostests/winetests/ole32/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/usrmarsha…
============================================================================== --- trunk/rostests/winetests/ole32/usrmarshal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/usrmarshal.c [iso-8859-1] Wed Dec 12 21:02:09 2012 @@ -551,7 +551,6 @@ ULONG __RPC_USER WdtpInterfacePointer_UserSize(ULONG *, ULONG, ULONG, IUnknown *, REFIID); unsigned char * __RPC_USER WdtpInterfacePointer_UserMarshal(ULONG *, ULONG, unsigned char *, IUnknown *, REFIID); unsigned char * __RPC_USER WdtpInterfacePointer_UserUnmarshal(ULONG *, unsigned char *, IUnknown **, REFIID); -void __RPC_USER WdtpInterfacePointer_UserFree(IUnknown *); static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx) { @@ -624,7 +623,7 @@ ok(unk2 != NULL, "IUnknown object didn't unmarshal properly\n"); HeapFree(GetProcessHeap(), 0, buffer); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_INPROC); - WdtpInterfacePointer_UserFree(unk2); + IUnknown_Release(unk2); } static void test_marshal_WdtpInterfacePointer(void)
12 years
1
0
0
0
[akhaldi] 57895: [OLE32] * Sync with Wine 1.5.19.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 12 21:01:41 2012 New Revision: 57895 URL:
http://svn.reactos.org/svn/reactos?rev=57895&view=rev
Log: [OLE32] * Sync with Wine 1.5.19. Added: trunk/reactos/dll/win32/ole32/msvc-thiscall.c (with props) trunk/reactos/dll/win32/ole32/msvc.h (with props) Modified: trunk/reactos/dll/win32/ole32/CMakeLists.txt trunk/reactos/dll/win32/ole32/antimoniker.c trunk/reactos/dll/win32/ole32/classmoniker.c trunk/reactos/dll/win32/ole32/clipboard.c trunk/reactos/dll/win32/ole32/comcat.c trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/ole32/compobj_private.h trunk/reactos/dll/win32/ole32/compositemoniker.c trunk/reactos/dll/win32/ole32/datacache.c trunk/reactos/dll/win32/ole32/dcom.idl trunk/reactos/dll/win32/ole32/defaulthandler.c trunk/reactos/dll/win32/ole32/errorinfo.c trunk/reactos/dll/win32/ole32/filelockbytes.c trunk/reactos/dll/win32/ole32/filemoniker.c trunk/reactos/dll/win32/ole32/ftmarshal.c trunk/reactos/dll/win32/ole32/ifs.c trunk/reactos/dll/win32/ole32/itemmoniker.c trunk/reactos/dll/win32/ole32/marshal.c trunk/reactos/dll/win32/ole32/memlockbytes.c trunk/reactos/dll/win32/ole32/moniker.c trunk/reactos/dll/win32/ole32/ole2.c trunk/reactos/dll/win32/ole32/ole2impl.c trunk/reactos/dll/win32/ole32/ole2stubs.c trunk/reactos/dll/win32/ole32/ole32.spec trunk/reactos/dll/win32/ole32/ole32_objidl.idl trunk/reactos/dll/win32/ole32/ole32_oleidl.idl trunk/reactos/dll/win32/ole32/ole32_unknwn.idl trunk/reactos/dll/win32/ole32/oleobj.c trunk/reactos/dll/win32/ole32/pointermoniker.c trunk/reactos/dll/win32/ole32/rpc.c trunk/reactos/dll/win32/ole32/stg_prop.c trunk/reactos/dll/win32/ole32/stg_stream.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/dll/win32/ole32/storage32.h trunk/reactos/dll/win32/ole32/stubmanager.c trunk/reactos/dll/win32/ole32/usrmarshal.c trunk/reactos/include/psdk/propidl.idl 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/ole32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/CMakeLists…
Modified: trunk/reactos/dll/win32/ole32/antimoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/antimonike…
Modified: trunk/reactos/dll/win32/ole32/classmoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/classmonik…
Modified: trunk/reactos/dll/win32/ole32/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/clipboard.…
Modified: trunk/reactos/dll/win32/ole32/comcat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/comcat.c?r…
Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
Modified: trunk/reactos/dll/win32/ole32/compobj_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj_pr…
Modified: trunk/reactos/dll/win32/ole32/compositemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compositem…
Modified: trunk/reactos/dll/win32/ole32/datacache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/datacache.…
Modified: trunk/reactos/dll/win32/ole32/dcom.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/dcom.idl?r…
Modified: trunk/reactos/dll/win32/ole32/defaulthandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/defaulthan…
Modified: trunk/reactos/dll/win32/ole32/errorinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/errorinfo.…
Modified: trunk/reactos/dll/win32/ole32/filelockbytes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/filelockby…
Modified: trunk/reactos/dll/win32/ole32/filemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/filemonike…
Modified: trunk/reactos/dll/win32/ole32/ftmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ftmarshal.…
Modified: trunk/reactos/dll/win32/ole32/ifs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ifs.c?rev=…
Modified: trunk/reactos/dll/win32/ole32/itemmoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/itemmonike…
Modified: trunk/reactos/dll/win32/ole32/marshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/marshal.c?…
Modified: trunk/reactos/dll/win32/ole32/memlockbytes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/memlockbyt…
Modified: trunk/reactos/dll/win32/ole32/moniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/moniker.c?…
Added: trunk/reactos/dll/win32/ole32/msvc-thiscall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/msvc-thisc…
Added: trunk/reactos/dll/win32/ole32/msvc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/msvc.h?rev…
Modified: trunk/reactos/dll/win32/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
Modified: trunk/reactos/dll/win32/ole32/ole2impl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2impl.c…
Modified: trunk/reactos/dll/win32/ole32/ole2stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2stubs.…
Modified: trunk/reactos/dll/win32/ole32/ole32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.spec…
Modified: trunk/reactos/dll/win32/ole32/ole32_objidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_obji…
Modified: trunk/reactos/dll/win32/ole32/ole32_oleidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_olei…
Modified: trunk/reactos/dll/win32/ole32/ole32_unknwn.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_unkn…
Modified: trunk/reactos/dll/win32/ole32/oleobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/oleobj.c?r…
Modified: trunk/reactos/dll/win32/ole32/pointermoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/pointermon…
Modified: trunk/reactos/dll/win32/ole32/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/rpc.c?rev=…
Modified: trunk/reactos/dll/win32/ole32/stg_prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_prop.c…
Modified: trunk/reactos/dll/win32/ole32/stg_stream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_stream…
Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
Modified: trunk/reactos/dll/win32/ole32/storage32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
Modified: trunk/reactos/dll/win32/ole32/stubmanager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stubmanage…
Modified: trunk/reactos/dll/win32/ole32/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/usrmarshal…
Modified: trunk/reactos/include/psdk/propidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/propidl.idl?r…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
12 years
1
0
0
0
[akhaldi] 57894: [CMAKE] * Addendum to r57893.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 12 15:39:08 2012 New Revision: 57894 URL:
http://svn.reactos.org/svn/reactos?rev=57894&view=rev
Log: [CMAKE] * Addendum to r57893. Modified: trunk/reactos/cmake/midl-support.cmake Modified: trunk/reactos/cmake/midl-support.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/midl-support.cmake?r…
============================================================================== --- trunk/reactos/cmake/midl-support.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/midl-support.cmake [iso-8859-1] Wed Dec 12 15:39:08 2012 @@ -79,20 +79,22 @@ endforeach() endfunction() -function(generate_idl_iids _idl_file) - get_includes(_includes) - get_defines(_defines) +function(generate_idl_iids) + foreach(_idl_file ${ARGN}) + get_includes(_includes) + get_defines(_defines) - if(NOT IS_ABSOLUTE ${_idl_file}) - set(_idl_file "${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}") - endif() + if(NOT IS_ABSOLUTE ${_idl_file}) + set(_idl_file "${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}") + endif() - get_filename_component(_name_we ${_idl_file} NAME_WE) - add_custom_command( - OUTPUT ${_name_we}_i.c ${_name_we}_i.h - COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}_i.h /client none /server none /iid ${_name_we}_i.c /proxy ${_name_we}_dummy_p.c ${_idl_file} - DEPENDS ${_idl_file}) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_i.c PROPERTIES GENERATED TRUE) + get_filename_component(_name_we ${_idl_file} NAME_WE) + add_custom_command( + OUTPUT ${_name_we}_i.c ${_name_we}_i.h + COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}_i.h /client none /server none /iid ${_name_we}_i.c /proxy ${_name_we}_dummy_p.c ${_idl_file} + DEPENDS ${_idl_file}) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_i.c PROPERTIES GENERATED TRUE) + endforeach() endfunction() function(add_iid_library _target)
12 years
1
0
0
0
[akhaldi] 57893: [CMAKE] * Add the ability to handle more than one idl file in generate_idl_iids.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 12 15:09:49 2012 New Revision: 57893 URL:
http://svn.reactos.org/svn/reactos?rev=57893&view=rev
Log: [CMAKE] * Add the ability to handle more than one idl file in generate_idl_iids. Modified: trunk/reactos/cmake/widl-support.cmake Modified: trunk/reactos/cmake/widl-support.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/widl-support.cmake?r…
============================================================================== --- trunk/reactos/cmake/widl-support.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/widl-support.cmake [iso-8859-1] Wed Dec 12 15:09:49 2012 @@ -82,21 +82,23 @@ endforeach() endfunction() -function(generate_idl_iids IDL_FILE) - get_filename_component(FILE ${IDL_FILE} NAME) - if(FILE STREQUAL "${IDL_FILE}") - set(IDL_FILE_FULL "${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}") - else() - set(IDL_FILE_FULL ${IDL_FILE}) - endif() - get_includes(INCLUDES) - get_defines(DEFINES) - get_filename_component(NAME ${IDL_FILE} NAME_WE) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c - COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -u -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${IDL_FILE_FULL} - DEPENDS ${IDL_FILE_FULL} native-widl) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES GENERATED TRUE) +function(generate_idl_iids) + foreach(IDL_FILE ${ARGN}) + get_filename_component(FILE ${IDL_FILE} NAME) + if(FILE STREQUAL "${IDL_FILE}") + set(IDL_FILE_FULL "${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE}") + else() + set(IDL_FILE_FULL ${IDL_FILE}) + endif() + get_includes(INCLUDES) + get_defines(DEFINES) + get_filename_component(NAME ${IDL_FILE} NAME_WE) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c + COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -u -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${IDL_FILE_FULL} + DEPENDS ${IDL_FILE_FULL} native-widl) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES GENERATED TRUE) + endforeach() endfunction() function(add_iid_library TARGET)
12 years
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
29
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
Results per page:
10
25
50
100
200