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
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
September 2005
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
582 discussions
Start a n
N
ew thread
[gvg] 17681: Sync to Wine-20050830:
by gvg@svn.reactos.com
Sync to Wine-20050830: Phil Krylov <phil(a)newstar.rinet.ru> - Added support for backward search to RichEdit EM_FINDTEXT[AW], EM_FINDTEXTEX[AW] message handler. - Fixed EM_SETEVENTMASK RichEdit message handler to return old event mask. - Added handling of deff RTF control word. - Added common keyboard shortcuts for Select All, Undo, Redo, Cut, Copy and Paste to RichEdit. - Automatically set default font after parsing a font table in RichEdit RTF reader. - Fixed EM_EXLINEFROMCHAR to work for last row of a paragraph. - Fixed UTF-8 RTF parsing. - Fixed a bug in EM_STREAMOUT RichEdit message handler which truncated some streamed text. - Generate ending \par in RTF output of RichEdit when streaming out a whole document. - Fixed a RichEdit RTF reader bug which resulted in loss of text. Eliminated unneeded recursion in ME_InsertTextFromCursor(). - Implemented EM_CHARFROMPOS RichEdit message. - Added EM_SETRECT, EM_SETRECTNP, and WM_SETREDRAW message handling. Added support for GT_SELECTION flag in EM_GETTEXTEX handler. Mike McCormack <mike(a)codeweavers.com> - gcc 4.0 warning fixes for Interlocked* functions. Modified: trunk/reactos/lib/riched20/caret.c Modified: trunk/reactos/lib/riched20/context.c Modified: trunk/reactos/lib/riched20/editor.c Modified: trunk/reactos/lib/riched20/editor.h Modified: trunk/reactos/lib/riched20/editstr.h Modified: trunk/reactos/lib/riched20/paint.c Modified: trunk/reactos/lib/riched20/reader.c Modified: trunk/reactos/lib/riched20/richole.c Modified: trunk/reactos/lib/riched20/row.c Modified: trunk/reactos/lib/riched20/rtf.h Modified: trunk/reactos/lib/riched20/writer.c Modified: trunk/reactos/w32api/include/richedit.h _____ Modified: trunk/reactos/lib/riched20/caret.c --- trunk/reactos/lib/riched20/caret.c 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/caret.c 2005-09-05 22:07:52 UTC (rev 17681) @@ -325,6 +325,28 @@ ME_SendSelChange(editor); } + +static void +ME_InternalInsertTextFromCursor(ME_TextEditor *editor, int nCursor, + const WCHAR *str, int len, ME_Style *style, + int flags) +{ + ME_DisplayItem *pNewRun = NULL; + ME_Cursor *p = &editor->pCursors[nCursor]; + + editor->bCaretAtEnd = FALSE; + + assert(p->pRun->type == diRun); + + ME_AddRefStyle(style); + + pNewRun = ME_MakeRun(style, ME_MakeStringN(str, len), flags); /* addrefs style */ + ME_InsertRun(editor, ME_CharOfsFromRunOfs(editor, p->pRun, p->nOffset), pNewRun); + ME_DestroyDisplayItem(pNewRun); + ME_ReleaseStyle(style); +} + + void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style) { @@ -332,10 +354,7 @@ ME_Cursor *p = NULL; assert(style); - editor->bCaretAtEnd = FALSE; - ME_AddRefStyle(style); - /* FIXME really HERE ? */ if (ME_IsSelection(editor)) ME_DeleteSelection(editor); @@ -343,76 +362,62 @@ assert(nCursor>=0 && nCursor<editor->nCursors); if (len == -1) len = lstrlenW(str); - pos = str; - /* FIXME this sucks - no respect for unicode (what else can be a line separator in unicode?) */ - while(pos-str < len && *pos != '\r' && *pos != '\n' && *pos != '\t') - pos++; - if (pos-str < len && *pos == '\t') { /* handle tabs */ - ME_DisplayItem *pNewRun = NULL; - WCHAR tab = '\t'; + while (len) + { + pos = str; + /* FIXME this sucks - no respect for unicode (what else can be a line separator in unicode?) */ + while(pos-str < len && *pos != '\r' && *pos != '\n' && *pos != '\t') + pos++; + if (pos-str < len && *pos == '\t') { /* handle tabs */ + WCHAR tab = '\t'; - if (pos!=str) - ME_InsertTextFromCursor(editor, nCursor, str, pos-str, style); + if (pos!=str) + ME_InternalInsertTextFromCursor(editor, nCursor, str, pos-str, style, 0); - p = &editor->pCursors[nCursor]; - assert(style); - assert(p->pRun->type == diRun); - pNewRun = ME_MakeRun(style, ME_MakeStringN(&tab, 1), MERF_TAB); /* addrefs style */ - ME_InsertRun(editor, ME_CharOfsFromRunOfs(editor, p->pRun, p->nOffset), pNewRun); - ME_DestroyDisplayItem(pNewRun); - ME_ReleaseStyle(style); - - pos++; - if(pos-str < len) { - ME_InsertTextFromCursor(editor, nCursor, pos, len-(pos-str), style); + ME_InternalInsertTextFromCursor(editor, nCursor, &tab, 1, style, MERF_TAB); + + pos++; + if(pos-str <= len) { + len -= pos - str; + str = pos; + continue; + } } - return; - } - if (pos-str < len) { /* handle EOLs */ - ME_DisplayItem *tp, *end_run; - ME_Paragraph *para; - ME_Style *tmp_style; - if (pos!=str) - ME_InsertTextFromCursor(editor, nCursor, str, pos-str, style); - p = &editor->pCursors[nCursor]; - tp = ME_FindItemBack(p->pRun, diParagraph); - para = &tp->member.para; - assert(tp); - if (p->nOffset) { - ME_SplitRunSimple(editor, p->pRun, p->nOffset); + if (pos-str < len) { /* handle EOLs */ + ME_DisplayItem *tp, *end_run; + ME_Paragraph *para; + ME_Style *tmp_style; + if (pos!=str) + ME_InternalInsertTextFromCursor(editor, nCursor, str, pos-str, style, 0); p = &editor->pCursors[nCursor]; + tp = ME_FindItemBack(p->pRun, diParagraph); + para = &tp->member.para; + assert(tp); + if (p->nOffset) { + ME_SplitRunSimple(editor, p->pRun, p->nOffset); + p = &editor->pCursors[nCursor]; + } + tmp_style = ME_GetInsertStyle(editor, nCursor); + /* ME_SplitParagraph increases style refcount */ + tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style); + p->pRun = ME_FindItemFwd(tp, diRun); + end_run = ME_FindItemBack(tp, diRun); + ME_ReleaseStyle(end_run->member.run.style); + end_run->member.run.style = tmp_style; + p->nOffset = 0; + if(pos-str < len && *pos =='\r') + pos++; + if(pos-str < len && *pos =='\n') + pos++; + if(pos-str <= len) { + len -= pos - str; + str = pos; + continue; + } } - tmp_style = ME_GetInsertStyle(editor, nCursor); - /* ME_SplitParagraph increases style refcount */ - tp = ME_SplitParagraph(editor, p->pRun, p->pRun->member.run.style); - p->pRun = ME_FindItemFwd(tp, diRun); - end_run = ME_FindItemBack(tp, diRun); - ME_ReleaseStyle(end_run->member.run.style); - end_run->member.run.style = tmp_style; - p->nOffset = 0; - if(pos-str < len && *pos =='\r') - pos++; - if(pos-str < len && *pos =='\n') - pos++; - if(pos-str < len) { - ME_InsertTextFromCursor(editor, nCursor, pos, len-(pos-str), style); - } - ME_ReleaseStyle(style); - return; + ME_InternalInsertTextFromCursor(editor, nCursor, str, len, style, 0); + len = 0; } - p = &editor->pCursors[nCursor]; - if (style) { - ME_DisplayItem *pNewRun = NULL; - - assert(p->pRun->type == diRun); - pNewRun = ME_MakeRun(style, ME_MakeStringN(str, len), 0); /* addrefs style */ - ME_InsertRun(editor, ME_CharOfsFromRunOfs(editor, p->pRun, p->nOffset), pNewRun); - ME_DestroyDisplayItem(pNewRun); - ME_ReleaseStyle(style); - return; - } else { - assert(0); - } } static BOOL ME_ArrowLeft(ME_TextEditor *editor, ME_Cursor *p) @@ -584,6 +589,22 @@ return 0; } + +int +ME_CharFromPos(ME_TextEditor *editor, int x, int y) +{ + ME_Cursor cursor; + RECT rc; + + GetClientRect(editor->hWnd, &rc); + if (x < 0 || y < 0 || x >= rc.right || y >= rc.bottom) + return -1; + ME_FindPixelPos(editor, x, y, &cursor, NULL); + return (ME_GetParagraph(cursor.pRun)->member.para.nCharOfs + + cursor.pRun->member.run.nCharOfs + cursor.nOffset); +} + + void ME_LButtonDown(ME_TextEditor *editor, int x, int y) { ME_Cursor tmp_cursor; _____ Modified: trunk/reactos/lib/riched20/context.c --- trunk/reactos/lib/riched20/context.c 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/context.c 2005-09-05 22:07:52 UTC (rev 17681) @@ -28,7 +28,7 @@ c->pt.x = 0; c->pt.y = 0; c->hbrMargin = CreateSolidBrush(RGB(224,224,224)); - GetClientRect(editor->hWnd, &c->rcView); + c->rcView = editor->rcFormat; } void ME_DestroyContext(ME_Context *c) _____ Modified: trunk/reactos/lib/riched20/editor.c --- trunk/reactos/lib/riched20/editor.c 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/editor.c 2005-09-05 22:07:52 UTC (rev 17681) @@ -26,7 +26,7 @@ + EM_CANPASTE + EM_CANREDO 2.0 + EM_CANUNDO - - EM_CHARFROMPOS + + EM_CHARFROMPOS - EM_DISPLAYBAND + EM_EMPTYUNDOBUFFER + EM_EXGETSEL @@ -58,7 +58,7 @@ + EM_GETPARAFORMAT - EM_GETPASSWORDCHAR 2.0 - EM_GETPUNCTUATION 1.0asian - - EM_GETRECT + + EM_GETRECT - EM_GETREDONAME 2.0 + EM_GETSEL + EM_GETSELTEXT (ANSI&Unicode) @@ -106,8 +106,8 @@ - EM_SETPASSWORDCHAR 2.0 - EM_SETPUNCTUATION 1.0asian + EM_SETREADONLY no beep on modification attempt - - EM_SETRECT - - EM_SETRECTNP (EM_SETRECT without repainting) - not supported in RICHEDIT + + EM_SETRECT + + EM_SETRECTNP (EM_SETRECT without repainting) + EM_SETSEL - EM_SETSCROLLPOS 3.0 - EM_SETTABSTOPS 3.0 @@ -393,6 +393,7 @@ style2 = ME_ApplyStyle(info->style, &fmt); ME_ReleaseStyle(info->style); info->style = style2; + info->styleChanged = TRUE; } } @@ -476,18 +477,22 @@ info->stack[info->stackTop].unicodeLength = info->unicodeLength; } info->stackTop++; + info->styleChanged = FALSE; break; case rtfEndGroup: { ME_Style *s; RTFFlushOutputBuffer(info); info->stackTop--; - /* FIXME too slow ? how come ? */ - s = ME_ApplyStyle(info->style, &info->stack[info->stackTop].fmt); - ME_ReleaseStyle(info->style); - info->style = s; - info->codePage = info->stack[info->stackTop].codePage; - info->unicodeLength = info->stack[info->stackTop].unicodeLength; + if (info->styleChanged) + { + /* FIXME too slow ? how come ? */ + s = ME_ApplyStyle(info->style, &info->stack[info->stackTop].fmt); + ME_ReleaseStyle(info->style); + info->style = s; + info->codePage = info->stack[info->stackTop].codePage; + info->unicodeLength = info->stack[info->stackTop].unicodeLength; + } break; } } @@ -613,8 +618,11 @@ ME_CommitUndo(editor); ME_ReleaseStyle(style); editor->nEventMask = nEventMask; - InvalidateRect(editor->hWnd, NULL, TRUE); - ME_UpdateRepaint(editor); + if (editor->bRedraw) + { + InvalidateRect(editor->hWnd, NULL, TRUE); + ME_UpdateRepaint(editor); + } if (!(format & SFF_SELECTION)) { ME_ClearTempStyle(editor); } @@ -658,62 +666,130 @@ static int ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CHARRANGE *chrgText) { - int nStart = chrg->cpMin; + int nStart, nEnd; int nLen = lstrlenW(text); - ME_DisplayItem *item = ME_FindItemAtOffset(editor, diRun, nStart, &nStart); + int nMin, nMax; + ME_DisplayItem *item; ME_DisplayItem *para; + + TRACE("flags==0x%08lx, chrg->cpMin==%ld, chrg->cpMax==%ld text==%s\n", + flags, chrg->cpMin, chrg->cpMax, debugstr_w(text)); - if (!item) - return -1; + if (!(flags & FR_MATCHCASE)) + FIXME("Case-insensitive search not implemented\n"); + if (flags & ~(FR_DOWN | FR_MATCHCASE)) + FIXME("Flags 0x%08lx not implemented\n", flags & ~(FR_DOWN | FR_MATCHCASE)); + if (chrg->cpMax == -1) + { + nMin = chrg->cpMin; + nMax = ME_GetTextLength(editor); + } + else + { + nMin = min(chrg->cpMin, chrg->cpMax); + nMax = max(chrg->cpMin, chrg->cpMax); + } + if (!nLen) { if (chrgText) - chrgText->cpMin = chrgText->cpMax = chrg->cpMin; - return chrg->cpMin; + chrgText->cpMin = chrgText->cpMax = ((flags & FR_DOWN) ? nMin : nMax); + return chrgText->cpMin; } - if (!(flags & FR_DOWN)) - FIXME("Backward search not implemented\n"); - if (!(flags & FR_MATCHCASE)) - FIXME("Case-insensitive search not implemented\n"); - if (flags & ~(FR_DOWN | FR_MATCHCASE)) - FIXME("Flags 0x%08lx not implemented\n", flags & ~(FR_DOWN | FR_MATCHCASE)); - - para = ME_GetParagraph(item); - while (item && para->member.para.nCharOfs + item->member.run.nCharOfs + nStart + nLen < chrg->cpMax) + if (flags & FR_DOWN) /* Forward search */ { - ME_DisplayItem *pCurItem = item; - int nCurStart = nStart; - int nMatched = 0; + nStart = nMin; + item = ME_FindItemAtOffset(editor, diRun, nStart, &nStart); + if (!item) + return -1; + + para = ME_GetParagraph(item); + while (item + && para->member.para.nCharOfs + item->member.run.nCharOfs + nStart + nLen < nMax) + { + ME_DisplayItem *pCurItem = item; + int nCurStart = nStart; + int nMatched = 0; - while (pCurItem->member.run.strText->szData[nCurStart + nMatched] == text[nMatched]) - { - nMatched++; - if (nMatched == nLen) + while (pCurItem && pCurItem->member.run.strText->szData[nCurStart + nMatched] == text[nMatched]) { - nStart += para->member.para.nCharOfs + item->member.run.nCharOfs; - if (chrgText) + nMatched++; + if (nMatched == nLen) { - chrgText->cpMin = nStart; - chrgText->cpMax = nStart + nLen; + nStart += para->member.para.nCharOfs + item->member.run.nCharOfs; + if (chrgText) + { + chrgText->cpMin = nStart; + chrgText->cpMax = nStart + nLen; + } + TRACE("found at %d-%d\n", nStart, nStart + nLen); + return nStart; } - return nStart; + if (nCurStart + nMatched == ME_StrLen(pCurItem->member.run.strText)) + { + pCurItem = ME_FindItemFwd(pCurItem, diRun); + para = ME_GetParagraph(pCurItem); + nCurStart = -nMatched; + } } - if (nCurStart + nMatched == ME_StrLen(pCurItem->member.run.strText)) + nStart++; + if (nStart == ME_StrLen(item->member.run.strText)) { - pCurItem = ME_FindItemFwd(pCurItem, diRun); - nCurStart = -nMatched; + item = ME_FindItemFwd(item, diRun); + para = ME_GetParagraph(item); + nStart = 0; } } - nStart++; - if (nStart == ME_StrLen(item->member.run.strText)) + } + else /* Backward search */ + { + nEnd = nMax; + item = ME_FindItemAtOffset(editor, diRun, nEnd, &nEnd); + if (!item) + return -1; + + para = ME_GetParagraph(item); + + while (item + && para->member.para.nCharOfs + item->member.run.nCharOfs + nEnd - nLen >= nMin) { - item = ME_FindItemFwd(item, diRun); - para = ME_GetParagraph(item); - nStart = 0; + ME_DisplayItem *pCurItem = item; + int nCurEnd = nEnd; + int nMatched = 0; + + while (pCurItem && pCurItem->member.run.strText->szData[nCurEnd - nMatched - 1] == text[nLen - nMatched - 1]) + { + nMatched++; + if (nMatched == nLen) + { + nStart = para->member.para.nCharOfs + item->member.run.nCharOfs + nCurEnd - nMatched; + if (chrgText) + { + chrgText->cpMin = nStart; + chrgText->cpMax = nStart + nLen; + } + TRACE("found at %d-%d\n", nStart, nStart + nLen); + return nStart; + } + if (nCurEnd - nMatched == 0) + { + pCurItem = ME_FindItemBack(pCurItem, diRun); + para = ME_GetParagraph(pCurItem); + nCurEnd = ME_StrLen(pCurItem->member.run.strText) + nMatched; + } + } + nEnd--; + if (nEnd < 0) + { + item = ME_FindItemBack(item, diRun); + para = ME_GetParagraph(item); + nEnd = ME_StrLen(item->member.run.strText); + } } } + TRACE("not found\n"); return -1; } @@ -748,6 +824,8 @@ ed->nLastSelStart = ed->nLastSelEnd = 0; ed->nScrollPosY = 0; ed->nZoomNumerator = ed->nZoomDenominator = 0; + ed->bRedraw = TRUE; + GetClientRect(hWnd, &ed->rcFormat); for (i=0; i<HFONT_CACHE_SIZE; i++) { ed->pFontCache[i].nRefs = 0; @@ -1016,17 +1094,15 @@ * RichEditANSIWndProc (RICHED20.10) */ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - HDC hDC; - PAINTSTRUCT ps; SCROLLINFO si; ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongW(hWnd, 0); - TRACE("msg %d (%s) %08x %08lx\n", msg, get_msg_name(msg), wParam, lParam); + TRACE("hWnd %p msg %d (%s) %08x %08lx\n", + hWnd, msg, get_msg_name(msg), wParam, lParam); switch(msg) { UNSUPPORTED_MSG(EM_AUTOURLDETECT) - UNSUPPORTED_MSG(EM_CHARFROMPOS) UNSUPPORTED_MSG(EM_DISPLAYBAND) UNSUPPORTED_MSG(EM_EXLIMITTEXT) UNSUPPORTED_MSG(EM_FINDWORDBREAK) @@ -1044,7 +1120,6 @@ /* UNSUPPORTED_MSG(EM_GETOLEINTERFACE) separate stub */ UNSUPPORTED_MSG(EM_GETOPTIONS) UNSUPPORTED_MSG(EM_GETPASSWORDCHAR) - UNSUPPORTED_MSG(EM_GETRECT) UNSUPPORTED_MSG(EM_GETREDONAME) UNSUPPORTED_MSG(EM_GETSCROLLPOS) UNSUPPORTED_MSG(EM_GETTEXTMODE) @@ -1068,8 +1143,6 @@ UNSUPPORTED_MSG(EM_SETOPTIONS) UNSUPPORTED_MSG(EM_SETPALETTE) UNSUPPORTED_MSG(EM_SETPASSWORDCHAR) - UNSUPPORTED_MSG(EM_SETRECT) - UNSUPPORTED_MSG(EM_SETRECTNP) UNSUPPORTED_MSG(EM_SETSCROLLPOS) UNSUPPORTED_MSG(EM_SETTABSTOPS) UNSUPPORTED_MSG(EM_SETTARGETDEVICE) @@ -1131,6 +1204,7 @@ return editor->pUndoStack != NULL; case EM_CANREDO: return editor->pRedoStack != NULL; + case WM_UNDO: /* FIXME: actually not the same */ case EM_UNDO: ME_Undo(editor); return 0; @@ -1191,9 +1265,12 @@ if (wParam) editor->rgbBackColor = -1; else - editor->rgbBackColor = lParam; - InvalidateRect(hWnd, NULL, TRUE); - UpdateWindow(hWnd); + editor->rgbBackColor = lParam; + if (editor->bRedraw) + { + InvalidateRect(hWnd, NULL, TRUE); + UpdateWindow(hWnd); + } return lColor; } case EM_GETMODIFY: @@ -1219,8 +1296,12 @@ return 0; } case EM_SETEVENTMASK: + { + DWORD nOldMask = editor->nEventMask; + editor->nEventMask = lParam; - return 0; + return nOldMask; + } case EM_GETEVENTMASK: return editor->nEventMask; case EM_SETCHARFORMAT: @@ -1278,10 +1359,13 @@ if (nPos<0) nPos = 0; if (nPos != editor->nScrollPosY) { - ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + if (editor->bRedraw) + { + ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + SetScrollPos(hWnd, SB_VERT, nPos, TRUE); + UpdateWindow(hWnd); + } editor->nScrollPosY = nPos; - SetScrollPos(hWnd, SB_VERT, nPos, TRUE); - UpdateWindow(hWnd); } return TRUE; /* Should return false if a single line richedit control */ } @@ -1430,20 +1514,35 @@ case EM_GETTEXTEX: { GETTEXTEX *ex = (GETTEXTEX*)wParam; + int nStart, nCount; - if (ex->flags != 0) - FIXME("Unhandled EM_GETTEXTEX flags 0x%lx\n",ex->flags); + if (ex->flags & ~(GT_SELECTION | GT_USECRLF)) + FIXME("GETTEXTEX flags 0x%08lx not supported\n", ex->flags & ~(GT_SELECTION | GT_USECRLF)); - if (IsWindowUnicode(hWnd)) - return ME_GetTextW(editor, (LPWSTR)lParam, 0, ex->cb, FALSE); + if (ex->flags & GT_SELECTION) + { + ME_GetSelection(editor, &nStart, &nCount); + nCount -= nStart; + nCount = min(nCount, ex->cb - 1); + } else { - LPWSTR buffer = HeapAlloc(GetProcessHeap(),0,ex->cb*sizeof(WCHAR)); + nStart = 0; + nCount = ex->cb - 1; + } + if (ex->codepage == 1200 || IsWindowUnicode(hWnd)) + { + nCount = min(nCount, ex->cb / sizeof(WCHAR) - 1); + return ME_GetTextW(editor, (LPWSTR)lParam, nStart, nCount, ex->flags & GT_USECRLF); + } + else + { + LPWSTR buffer = HeapAlloc(GetProcessHeap(), 0, (nCount + 1) * sizeof(WCHAR)); DWORD buflen = ex->cb; LRESULT rc; DWORD flags = 0; - buflen = ME_GetTextW(editor, buffer, 0, buflen, FALSE); + buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF); rc = WideCharToMultiByte(ex->codepage, flags, buffer, buflen, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefaultChar); HeapFree(GetProcessHeap(),0,buffer); @@ -1464,12 +1563,12 @@ { TEXTRANGEW *rng = (TEXTRANGEW *)lParam; if (IsWindowUnicode(hWnd)) - return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, rng->chrg.cpMax-rng->chrg.cpMin, FALSE); + return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, rng->chrg.cpMax-rng->chrg.cpMin, editor->bEmulateVersion10); else { int nLen = rng->chrg.cpMax-rng->chrg.cpMin; WCHAR *p = ALLOC_N_OBJ(WCHAR, nLen+1); - int nChars = ME_GetTextW(editor, p, rng->chrg.cpMin, nLen, FALSE); + int nChars = ME_GetTextW(editor, p, rng->chrg.cpMin, nLen, editor->bEmulateVersion10); /* FIXME this is a potential security hole (buffer overrun) if you know more about wchar->mbyte conversion please explain */ @@ -1477,7 +1576,6 @@ FREE_OBJ(p); return nChars; } - return ME_GetTextW(editor, rng->lpstrText, rng->chrg.cpMin, rng->chrg.cpMax-rng->chrg.cpMin, FALSE); } case EM_GETLINECOUNT: { @@ -1587,6 +1685,8 @@ return TRUE; case EM_SETZOOM: return ME_SetZoom(editor, wParam, lParam); + case EM_CHARFROMPOS: + return ME_CharFromPos(editor, ((POINTL *)lParam)->x, ((POINTL *)lParam)->y); case WM_CREATE: ME_CommitUndo(editor); ME_WrapMarkedParagraphs(editor); @@ -1610,9 +1710,15 @@ ReleaseCapture(); break; case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - ME_PaintContent(editor, hDC, FALSE, &ps.rcPaint); - EndPaint(hWnd, &ps); + if (editor->bRedraw) + { + HDC hDC; + PAINTSTRUCT ps; + + hDC = BeginPaint(hWnd, &ps); + ME_PaintContent(editor, hDC, FALSE, &ps.rcPaint); + EndPaint(hWnd, &ps); + } break; case WM_SETFOCUS: ME_ShowCaret(editor); @@ -1624,14 +1730,17 @@ return 0; case WM_ERASEBKGND: { - HDC hDC = (HDC)wParam; - RECT rc; - COLORREF rgbBG = ME_GetBackColor(editor); - if (GetUpdateRect(hWnd,&rc,TRUE)) + if (editor->bRedraw) { - HBRUSH hbr = CreateSolidBrush(rgbBG); - FillRect(hDC, &rc, hbr); - DeleteObject(hbr); + HDC hDC = (HDC)wParam; + RECT rc; + COLORREF rgbBG = ME_GetBackColor(editor); + if (GetUpdateRect(hWnd,&rc,TRUE)) + { + HBRUSH hbr = CreateSolidBrush(rgbBG); + FillRect(hDC, &rc, hbr); + DeleteObject(hbr); + } } return 1; } @@ -1665,12 +1774,38 @@ goto do_default; case WM_CHAR: { - WCHAR wstr; + WCHAR wstr = LOWORD(wParam); + + switch (wstr) + { + case 3: /* Ctrl-C */ + SendMessageW(editor->hWnd, WM_COPY, 0, 0); + return 0; + } + if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_READONLY) { MessageBeep(MB_ICONERROR); return 0; /* FIXME really 0 ? */ } - wstr = LOWORD(wParam); + + switch (wstr) + { + case 1: /* Ctrl-A */ + ME_SetSelection(editor, 0, -1); + return 0; + case 22: /* Ctrl-V */ + SendMessageW(editor->hWnd, WM_PASTE, 0, 0); + return 0; + case 24: /* Ctrl-X */ + SendMessageW(editor->hWnd, WM_CUT, 0, 0); + return 0; + case 25: /* Ctrl-Y */ + SendMessageW(editor->hWnd, EM_REDO, 0, 0); + return 0; + case 26: /* Ctrl-Z */ + SendMessageW(editor->hWnd, EM_UNDO, 0, 0); + return 0; + } if (((unsigned)wstr)>=' ' || wstr=='\r' || wstr=='\t') { /* FIXME maybe it would make sense to call EM_REPLACESEL instead ? */ ME_Style *style = ME_GetInsertStyle(editor, 0); @@ -1714,10 +1849,13 @@ break; } if (nPos != editor->nScrollPosY) { - ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + if (editor->bRedraw) + { + ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + SetScrollPos(hWnd, SB_VERT, nPos, TRUE); + UpdateWindow(hWnd); + } editor->nScrollPosY = nPos; - SetScrollPos(hWnd, SB_VERT, nPos, TRUE); - UpdateWindow(hWnd); } break; } @@ -1734,15 +1872,54 @@ if (nPos<0) nPos = 0; if (nPos != editor->nScrollPosY) { - ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + if (editor->bRedraw) + { + ScrollWindow(hWnd, 0, editor->nScrollPosY-nPos, NULL, NULL); + SetScrollPos(hWnd, SB_VERT, nPos, TRUE); + UpdateWindow(hWnd); + } editor->nScrollPosY = nPos; - SetScrollPos(hWnd, SB_VERT, nPos, TRUE); - UpdateWindow(hWnd); } break; } + case EM_GETRECT: + { + *((RECT *)lParam) = editor->rcFormat; + return 0; + } + case EM_SETRECT: + case EM_SETRECTNP: + { + if (lParam) + { + RECT *rc = (RECT *)lParam; + + if (wParam) + { + editor->rcFormat.left += rc->left; + editor->rcFormat.top += rc->top; + editor->rcFormat.right += rc->right; + editor->rcFormat.bottom += rc->bottom; + } + else + { + editor->rcFormat = *rc; + } + } + else + { + GetClientRect(hWnd, &editor->rcFormat); + } + if (msg != EM_SETRECTNP) + ME_RewrapRepaint(editor); + return 0; + } + case WM_SETREDRAW: + editor->bRedraw = wParam; + return 0; case WM_SIZE: { + GetClientRect(hWnd, &editor->rcFormat); ME_RewrapRepaint(editor); return DefWindowProcW(hWnd, msg, wParam, lParam); } @@ -1836,11 +2013,12 @@ if (item->member.run.nFlags & MERF_ENDPARA) { - if (bCRLF) { - *buffer++ = '\r'; + *buffer++ = '\r'; + if (bCRLF) + { + *buffer = '\n'; nWritten++; - } - *buffer = '\n'; + } assert(nLen == 1); } else _____ Modified: trunk/reactos/lib/riched20/editor.h --- trunk/reactos/lib/riched20/editor.h 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/editor.h 2005-09-05 22:07:52 UTC (rev 17681) @@ -141,6 +141,7 @@ void ME_ShowCaret(ME_TextEditor *ed); void ME_MoveCaret(ME_TextEditor *ed); int ME_FindPixelPos(ME_TextEditor *editor, int x, int y, ME_Cursor *result, BOOL *is_eol); +int ME_CharFromPos(ME_TextEditor *editor, int x, int y); void ME_LButtonDown(ME_TextEditor *editor, int x, int y); void ME_MouseMove(ME_TextEditor *editor, int x, int y); void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, int nChars); _____ Modified: trunk/reactos/lib/riched20/editstr.h --- trunk/reactos/lib/riched20/editstr.h 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/editstr.h 2005-09-05 22:07:52 UTC (rev 17681) @@ -270,6 +270,8 @@ BOOL bScrollX, bScrollY; int nScrollPosY; int nZoomNumerator, nZoomDenominator; + RECT rcFormat; + BOOL bRedraw; } ME_TextEditor; typedef struct tagME_Context _____ Modified: trunk/reactos/lib/riched20/paint.c --- trunk/reactos/lib/riched20/paint.c 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/paint.c 2005-09-05 22:07:52 UTC (rev 17681) @@ -154,12 +154,15 @@ if (ME_WrapMarkedParagraphs(editor)) { ME_UpdateScrollBar(editor); } - hDC = GetDC(editor->hWnd); - ME_HideCaret(editor); - ME_PaintContent(editor, hDC, TRUE, NULL); - ReleaseDC(editor->hWnd, hDC); - ME_ShowCaret(editor); - ME_EnsureVisible(editor, pCursor->pRun); + if (editor->bRedraw) + { + hDC = GetDC(editor->hWnd); + ME_HideCaret(editor); + ME_PaintContent(editor, hDC, TRUE, NULL); + ReleaseDC(editor->hWnd, hDC); + ME_ShowCaret(editor); + ME_EnsureVisible(editor, pCursor->pRun); + } } void ME_UpdateRepaint(ME_TextEditor *editor) @@ -415,10 +418,13 @@ GetScrollInfo(hWnd, SB_VERT, &si); si.nPos = editor->nScrollPosY -= cy; SetScrollInfo(hWnd, SB_VERT, &si, TRUE); - if (abs(cy) > editor->sizeWindow.cy) - InvalidateRect(editor->hWnd, NULL, TRUE); - else - ScrollWindowEx(hWnd, cx, cy, NULL, NULL, NULL, NULL, SW_ERASE|SW_INVALIDATE); + if (editor->bRedraw) + { + if (abs(cy) > editor->sizeWindow.cy) + InvalidateRect(editor->hWnd, NULL, TRUE); + else + ScrollWindowEx(hWnd, cx, cy, NULL, NULL, NULL, NULL, SW_ERASE|SW_INVALIDATE); + } } void ME_UpdateScrollBar(ME_TextEditor *editor) @@ -495,14 +501,20 @@ if (yrel < 0) { editor->nScrollPosY = y; SetScrollPos(hWnd, SB_VERT, y, TRUE); - ScrollWindow(hWnd, 0, -yrel, NULL, NULL); - UpdateWindow(hWnd); + if (editor->bRedraw) + { + ScrollWindow(hWnd, 0, -yrel, NULL, NULL); + UpdateWindow(hWnd); + } } else if (yrel + yheight > editor->sizeWindow.cy) { int newy = y+yheight-editor->sizeWindow.cy; editor->nScrollPosY = newy; SetScrollPos(hWnd, SB_VERT, newy, TRUE); - ScrollWindow(hWnd, 0, -(newy-yold), NULL, NULL); - UpdateWindow(hWnd); + if (editor->bRedraw) + { + ScrollWindow(hWnd, 0, -(newy-yold), NULL, NULL); + UpdateWindow(hWnd); + } } } _____ Modified: trunk/reactos/lib/riched20/reader.c --- trunk/reactos/lib/riched20/reader.c 2005-09-05 22:03:31 UTC (rev 17680) +++ trunk/reactos/lib/riched20/reader.c 2005-09-05 22:07:52 UTC (rev 17681) @@ -257,6 +257,7 @@ info->ansiCodePage = 1252; /* Latin-1; actually unused */ info->unicodeLength = 1; /* \uc1 is the default */ info->codePage = info->ansiCodePage; + info->defFont = 0; info->rtfClass = -1; info->pushedClass = -1; @@ -1005,6 +1006,14 @@ if (!RTFCheckCM (info, rtfGroup, rtfEndGroup)) RTFPanic (info, "%s: missing \"}\"", fn); } + + /* Apply the real properties of the default font */ + if (fp->rtfFNum == info->defFont) + { + if (info->ansiCodePage != CP_UTF8) + info->codePage = fp->rtfFCodePage; + TRACE("default font codepage %d\n", info->codePage); + } } if (fp->rtfFNum == -1) RTFPanic (info,"%s: missing font number", fn); @@ -1012,6 +1021,14 @@ * Could check other pieces of structure here, too, I suppose. */ RTFRouteToken (info); /* feed "}" back to router */ + + /* Set default font */ + info->rtfClass = rtfControl; + info->rtfMajor = rtfCharAttr; + info->rtfMinor = rtfFontNum; + info->rtfParam = info->defFont; + lstrcpyA(info->rtfTextBuf, "f"); + RTFUngetToken(info); } @@ -2467,6 +2484,7 @@ static void TextClass (RTF_Info *info); static void ControlClass (RTF_Info *info); +static void DefFont(RTF_Info *info); static void Destination (RTF_Info *info); static void SpecialChar (RTF_Info *info); static void RTFPutUnicodeChar (RTF_Info *info, int c); @@ -2516,6 +2534,9 @@ case rtfCharSet: CharSet(info); break; + case rtfDefFont: + DefFont(info); + break; case rtfDestination: Destination (info); break; @@ -2542,6 +2563,7 @@ { if (info->ansiCodePage != CP_UTF8) info->codePage = font->rtfFCodePage; + TRACE("font %d codepage %d\n", info->rtfParam, info->codePage); } else RTFMsg(info, "unknown font %d\n", info->rtfParam); @@ -2556,6 +2578,9 @@ static void CharSet(RTF_Info *info) { + if (info->ansiCodePage == CP_UTF8) + return; + switch (info->rtfMinor) { case rtfAnsiCharSet: @@ -2589,15 +2614,25 @@ static void +DefFont(RTF_Info *info) +{ + TRACE("%d\n", info->rtfParam); + info->defFont = info->rtfParam; +} + + +static void DocAttr(RTF_Info *info) { + TRACE("minor %d, param %d\n", info->rtfMinor, info->rtfParam); + switch (info->rtfMinor) { case rtfAnsiCodePage: [truncated at 1000 lines; 120 more skipped]
19 years, 2 months
1
0
0
0
[gvg] 17680: Correct eol-style and remove unused file
by gvg@svn.reactos.com
Correct eol-style and remove unused file Deleted: trunk/reactos/lib/olepro32/Makefile.in Modified: trunk/reactos/lib/olepro32/olepro32.spec _____ Deleted: trunk/reactos/lib/olepro32/Makefile.in --- trunk/reactos/lib/olepro32/Makefile.in 2005-09-05 22:00:07 UTC (rev 17679) +++ trunk/reactos/lib/olepro32/Makefile.in 2005-09-05 22:03:31 UTC (rev 17680) @@ -1,13 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = olepro32.dll -IMPORTLIB = libolepro32.$(IMPLIBEXT) -IMPORTS = oleaut32 - -C_SRCS = olepro32stubs.c - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Modified: trunk/reactos/lib/olepro32/olepro32.spec --- trunk/reactos/lib/olepro32/olepro32.spec 2005-09-05 22:00:07 UTC (rev 17679) +++ trunk/reactos/lib/olepro32/olepro32.spec 2005-09-05 22:03:31 UTC (rev 17680) @@ -1,11 +1,11 @@ -248 stdcall OleIconToCursor(long long) oleaut32.OleIconToCursor -249 stdcall OleCreatePropertyFrameIndirect(ptr) oleaut32.OleCreatePropertyFrameIndirect -250 stdcall OleCreatePropertyFrame(ptr long long ptr long ptr long ptr ptr long ptr) oleaut32.OleCreatePropertyFrame -251 stdcall OleLoadPicture(ptr long long ptr ptr) oleaut32.OleLoadPicture -252 stdcall OleCreatePictureIndirect(ptr ptr long ptr) oleaut32.OleCreatePictureIndirect -253 stdcall OleCreateFontIndirect(ptr ptr ptr) oleaut32.OleCreateFontIndirect -254 stdcall OleTranslateColor(long long long) oleaut32.OleTranslateColor -@ stdcall -private DllCanUnloadNow() -@ stdcall -private DllGetClassObject( ptr ptr ptr ) -@ stdcall -private DllRegisterServer() -@ stdcall -private DllUnregisterServer() +248 stdcall OleIconToCursor(long long) oleaut32.OleIconToCursor +249 stdcall OleCreatePropertyFrameIndirect(ptr) oleaut32.OleCreatePropertyFrameIndirect +250 stdcall OleCreatePropertyFrame(ptr long long ptr long ptr long ptr ptr long ptr) oleaut32.OleCreatePropertyFrame +251 stdcall OleLoadPicture(ptr long long ptr ptr) oleaut32.OleLoadPicture +252 stdcall OleCreatePictureIndirect(ptr ptr long ptr) oleaut32.OleCreatePictureIndirect +253 stdcall OleCreateFontIndirect(ptr ptr ptr) oleaut32.OleCreateFontIndirect +254 stdcall OleTranslateColor(long long long) oleaut32.OleTranslateColor +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject( ptr ptr ptr ) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() Property changes on: trunk/reactos/lib/olepro32/olepro32.spec ___________________________________________________________________ Name: svn:eol-style + native
19 years, 2 months
1
0
0
0
[gvg] 17679: Sync to Wine-20050830:
by gvg@svn.reactos.com
Sync to Wine-20050830: Francois Gouget <fgouget(a)free.fr> - Change some Dll* functions so they are exported by name like on Windows. Update the documentation accordingly. Robert Shearman <rob(a)codeweavers.com> - Remove redundant QueryInterface in marshal_interface - the object is always queried later on for the correct interface of the object. - Make sure to Release the marshaled pointer in the typelib marshaler once it is no longer required. - Shunt some trace statements over to the typelib channel that aren't really much use except in debugging typelib parsing. - Make sure to release a reference to being returned as VariantCopyInd takes one for us. - Revert to previous behaviour of detecting names with non-alphanumeric characters as ones with offsets, but add in a special case for an empty name. - A name in an SLTG typelib only beginning with 0xff is the indicator of an offset, instead of any non alpha-numeric character. - Any dispatch interface should have the fixed vtable size, not just dual ones. - Warn when ITypeInfo_GetDocumentation fails. - Make typelib marshaler use IRpcChannelBuffer::GetBuffer if possible. Alexandre Julliard <julliard(a)winehq.org> - Replace the ICOM_THIS_From macros by inline functions. - Moved a number of definitions that are not needed in other files into vartype.c - Removed some unnecessary macros, and make some functions static. - Get rid of the almost empty tmarshal.h file. Vincent Beron <vberon(a)mecano.gme.usherb.ca> - Uniformize DllMain TRACEing across dlls. Mike McCormack <mike(a)codeweavers.com> - Fix gcc 4.0 warnings. - gcc 4.0 warning fixes. Michael Stefaniuc <mstefani(a)redhat.de> - Implement IPicture::get_hPal for PICTYPE_BITMAP. - VarAdd, VarMul: I4 overflows to R8 and not I8 even if the result would fit in I8. Fix tests. - Document a brokeness in the handling of I8 numbers in VarNumFromParseNum. Fix tests. Walt Ogburn <reuben(a)ugcs.caltech.edu> - When applying logical / himetric ratio to olefont sizes, must divide by the standard ratio 72 / 2540. Modified: trunk/reactos/lib/oleaut32/ole2disp.spec Modified: trunk/reactos/lib/oleaut32/oleaut.c Modified: trunk/reactos/lib/oleaut32/oleaut32.spec Modified: trunk/reactos/lib/oleaut32/olefont.c Modified: trunk/reactos/lib/oleaut32/olepicture.c Modified: trunk/reactos/lib/oleaut32/regsvr.c Modified: trunk/reactos/lib/oleaut32/safearray.c Modified: trunk/reactos/lib/oleaut32/tmarshal.c Modified: trunk/reactos/lib/oleaut32/typelib.c Modified: trunk/reactos/lib/oleaut32/typelib.h Modified: trunk/reactos/lib/oleaut32/typelib.spec Modified: trunk/reactos/lib/oleaut32/typelib2.c Modified: trunk/reactos/lib/oleaut32/varformat.c Modified: trunk/reactos/lib/oleaut32/variant.c Modified: trunk/reactos/lib/oleaut32/variant.h Modified: trunk/reactos/lib/oleaut32/vartype.c _____ Modified: trunk/reactos/lib/oleaut32/ole2disp.spec --- trunk/reactos/lib/oleaut32/ole2disp.spec 2005-09-05 21:56:14 UTC (rev 17678) +++ trunk/reactos/lib/oleaut32/ole2disp.spec 2005-09-05 22:00:07 UTC (rev 17679) @@ -1,135 +1,135 @@ -1 stub DLLGETCLASSOBJECT -2 pascal SysAllocString(str) SysAllocString16 -3 pascal SysReallocString(ptr str) SysReAllocString16 -4 pascal SysAllocStringLen(str word) SysAllocStringLen16 -5 pascal SysReAllocStringLen(ptr str word) SysReAllocStringLen16 -6 pascal SysFreeString(segstr) SysFreeString16 -7 pascal SysStringLen(segstr) SysStringLen16 -8 stub VARIANTINIT -9 stub VARIANTCLEAR -10 stub VARIANTCOPY -11 stub VARIANTCOPYIND -12 stub VARIANTCHANGETYPE -13 stub VARIANTTIMETODOSDATETIME -14 stub DOSDATETIMETOVARIANTTIME -15 stub SAFEARRAYCREATE -16 stub SAFEARRAYDESTROY -17 stub SAFEARRAYGETDIM -18 stub SAFEARRAYGETELEMSIZE -19 stub SAFEARRAYGETUBOUND -20 stub SAFEARRAYGETLBOUND -21 stub SAFEARRAYLOCK -22 stub SAFEARRAYUNLOCK -23 stub SAFEARRAYACCESSDATA -24 stub SAFEARRAYUNACCESSDATA -25 stub SAFEARRAYGETELEMENT -26 stub SAFEARRAYPUTELEMENT -27 stub SAFEARRAYCOPY -28 stub DISPGETPARAM -29 stub DISPGETIDSOFNAMES -30 stub DISPINVOKE -31 pascal CreateDispTypeInfo(ptr long ptr) CreateDispTypeInfo16 -32 pascal CreateStdDispatch(ptr ptr ptr ptr) CreateStdDispatch16 -33 stub _IID_IDISPATCH -34 stub _IID_IENUMVARIANT -35 pascal RegisterActiveObject(ptr ptr long ptr) RegisterActiveObject16 -36 stub REVOKEACTIVEOBJECT -37 stub GETACTIVEOBJECT -38 stub SAFEARRAYALLOCDESCRIPTOR -39 stub SAFEARRAYALLOCDATA -40 stub SAFEARRAYDESTROYDESCRIPTOR -41 stub SAFEARRAYDESTROYDATA -42 stub SAFEARRAYREDIM -43 stub VARI2FROMI4 -44 stub VARI2FROMR4 -45 stub VARI2FROMR8 -46 stub VARI2FROMCY -47 stub VARI2FROMDATE -48 stub VARI2FROMSTR -49 stub VARI2FROMDISP -50 stub VARI2FROMBOOL -51 stub VARI4FROMI2 -52 stub VARI4FROMR4 -53 stub VARI4FROMR8 -54 stub VARI4FROMCY -55 stub VARI4FROMDATE -56 stub VARI4FROMSTR -57 stub VARI4FROMDISP -58 stub VARI4FROMBOOL -59 stub VARR4FROMI2 -60 stub VARR4FROMI4 -61 stub VARR4FROMR8 -62 stub VARR4FROMCY -63 stub VARR4FROMDATE -64 stub VARR4FROMSTR -65 stub VARR4FROMDISP -66 stub VARR4FROMBOOL -67 stub VARR8FROMI2 -68 stub VARR8FROMI4 -69 stub VARR8FROMR4 -70 stub VARR8FROMCY -71 stub VARR8FROMDATE -72 stub VARR8FROMSTR -73 stub VARR8FROMDISP -74 stub VARR8FROMBOOL -75 stub VARDATEFROMI2 -76 stub VARDATEFROMI4 -77 stub VARDATEFROMR4 -78 stub VARDATEFROMR8 -79 stub VARDATEFROMCY -80 stub VARDATEFROMSTR -81 stub VARDATEFROMDISP -82 stub VARDATEFROMBOOL -83 stub VARCYFROMI2 -84 stub VARCYFROMI4 -85 stub VARCYFROMR4 -86 stub VARCYFROMR8 -87 stub VARCYFROMDATE -88 stub VARCYFROMSTR -89 stub VARCYFROMDISP -90 stub VARCYFROMBOOL -91 stub VARBSTRFROMI2 -92 stub VARBSTRFROMI4 -93 stub VARBSTRFROMR4 -94 stub VARBSTRFROMR8 -95 stub VARBSTRFROMCY -96 stub VARBSTRFROMDATE -97 stub VARBSTRFROMDISP -98 stub VARBSTRFROMBOOL -99 stub VARBOOLFROMI2 -100 stub VARBOOLFROMI4 -101 stub VARBOOLFROMR4 -102 stub VARBOOLFROMR8 -103 stub VARBOOLFROMDATE -104 stub VARBOOLFROMCY -105 stub VARBOOLFROMSTR -106 stub VARBOOLFROMDISP -107 stub DOINVOKEMETHOD -108 stub VARIANTCHANGETYPEEX -109 stub SAFEARRAYPTROFINDEX -110 stub SETERRORINFO -111 stub GETERRORINFO -112 stub CREATEERRORINFO -113 stub _IID_IERRORINFO -114 stub _IID_ICREATEERRORINFO -115 stub _IID_ISUPPORTERRORINFO -116 stub VARUI1FROMI2 -117 stub VARUI1FROMI4 -118 stub VARUI1FROMR4 -119 stub VARUI1FROMR8 -120 stub VARUI1FROMCY -121 stub VARUI1FROMDATE -122 stub VARUI1FROMSTR -123 stub VARUI1FROMDISP -124 stub VARUI1FROMBOOL -125 stub VARI2FROMUI1 -126 stub VARI4FROMUI1 -127 stub VARR4FROMUI1 -128 stub VARR8FROMUI1 -129 stub VARDATEFROMUI1 -130 stub VARCYFROMUI1 -131 stub VARBSTRFROMUI1 -132 stub VARBOOLFROMUI1 -133 stub DLLCANUNLOADNOW -#134 stub WEP -#135 stub ___EXPORTEDSTUB +1 stub DLLGETCLASSOBJECT +2 pascal SysAllocString(str) SysAllocString16 +3 pascal SysReallocString(ptr str) SysReAllocString16 +4 pascal SysAllocStringLen(str word) SysAllocStringLen16 +5 pascal SysReAllocStringLen(ptr str word) SysReAllocStringLen16 +6 pascal SysFreeString(segstr) SysFreeString16 +7 pascal SysStringLen(segstr) SysStringLen16 +8 stub VARIANTINIT +9 stub VARIANTCLEAR +10 stub VARIANTCOPY +11 stub VARIANTCOPYIND +12 stub VARIANTCHANGETYPE +13 stub VARIANTTIMETODOSDATETIME +14 stub DOSDATETIMETOVARIANTTIME +15 stub SAFEARRAYCREATE +16 stub SAFEARRAYDESTROY +17 stub SAFEARRAYGETDIM +18 stub SAFEARRAYGETELEMSIZE +19 stub SAFEARRAYGETUBOUND +20 stub SAFEARRAYGETLBOUND +21 stub SAFEARRAYLOCK +22 stub SAFEARRAYUNLOCK +23 stub SAFEARRAYACCESSDATA +24 stub SAFEARRAYUNACCESSDATA +25 stub SAFEARRAYGETELEMENT +26 stub SAFEARRAYPUTELEMENT +27 stub SAFEARRAYCOPY +28 stub DISPGETPARAM +29 stub DISPGETIDSOFNAMES +30 stub DISPINVOKE +31 pascal CreateDispTypeInfo(ptr long ptr) CreateDispTypeInfo16 +32 pascal CreateStdDispatch(ptr ptr ptr ptr) CreateStdDispatch16 +33 stub _IID_IDISPATCH +34 stub _IID_IENUMVARIANT +35 pascal RegisterActiveObject(ptr ptr long ptr) RegisterActiveObject16 +36 stub REVOKEACTIVEOBJECT +37 stub GETACTIVEOBJECT +38 stub SAFEARRAYALLOCDESCRIPTOR +39 stub SAFEARRAYALLOCDATA +40 stub SAFEARRAYDESTROYDESCRIPTOR +41 stub SAFEARRAYDESTROYDATA +42 stub SAFEARRAYREDIM +43 stub VARI2FROMI4 +44 stub VARI2FROMR4 +45 stub VARI2FROMR8 +46 stub VARI2FROMCY +47 stub VARI2FROMDATE +48 stub VARI2FROMSTR +49 stub VARI2FROMDISP +50 stub VARI2FROMBOOL +51 stub VARI4FROMI2 +52 stub VARI4FROMR4 +53 stub VARI4FROMR8 +54 stub VARI4FROMCY +55 stub VARI4FROMDATE +56 stub VARI4FROMSTR +57 stub VARI4FROMDISP +58 stub VARI4FROMBOOL +59 stub VARR4FROMI2 +60 stub VARR4FROMI4 +61 stub VARR4FROMR8 +62 stub VARR4FROMCY +63 stub VARR4FROMDATE +64 stub VARR4FROMSTR +65 stub VARR4FROMDISP +66 stub VARR4FROMBOOL +67 stub VARR8FROMI2 +68 stub VARR8FROMI4 +69 stub VARR8FROMR4 +70 stub VARR8FROMCY +71 stub VARR8FROMDATE +72 stub VARR8FROMSTR +73 stub VARR8FROMDISP +74 stub VARR8FROMBOOL +75 stub VARDATEFROMI2 +76 stub VARDATEFROMI4 +77 stub VARDATEFROMR4 +78 stub VARDATEFROMR8 +79 stub VARDATEFROMCY +80 stub VARDATEFROMSTR +81 stub VARDATEFROMDISP +82 stub VARDATEFROMBOOL +83 stub VARCYFROMI2 +84 stub VARCYFROMI4 +85 stub VARCYFROMR4 +86 stub VARCYFROMR8 +87 stub VARCYFROMDATE +88 stub VARCYFROMSTR +89 stub VARCYFROMDISP +90 stub VARCYFROMBOOL +91 stub VARBSTRFROMI2 +92 stub VARBSTRFROMI4 +93 stub VARBSTRFROMR4 +94 stub VARBSTRFROMR8 +95 stub VARBSTRFROMCY +96 stub VARBSTRFROMDATE +97 stub VARBSTRFROMDISP +98 stub VARBSTRFROMBOOL +99 stub VARBOOLFROMI2 +100 stub VARBOOLFROMI4 +101 stub VARBOOLFROMR4 +102 stub VARBOOLFROMR8 +103 stub VARBOOLFROMDATE +104 stub VARBOOLFROMCY +105 stub VARBOOLFROMSTR +106 stub VARBOOLFROMDISP +107 stub DOINVOKEMETHOD +108 stub VARIANTCHANGETYPEEX +109 stub SAFEARRAYPTROFINDEX +110 stub SETERRORINFO +111 stub GETERRORINFO +112 stub CREATEERRORINFO +113 stub _IID_IERRORINFO +114 stub _IID_ICREATEERRORINFO +115 stub _IID_ISUPPORTERRORINFO +116 stub VARUI1FROMI2 +117 stub VARUI1FROMI4 +118 stub VARUI1FROMR4 +119 stub VARUI1FROMR8 +120 stub VARUI1FROMCY +121 stub VARUI1FROMDATE +122 stub VARUI1FROMSTR +123 stub VARUI1FROMDISP +124 stub VARUI1FROMBOOL +125 stub VARI2FROMUI1 +126 stub VARI4FROMUI1 +127 stub VARR4FROMUI1 +128 stub VARR8FROMUI1 +129 stub VARDATEFROMUI1 +130 stub VARCYFROMUI1 +131 stub VARBSTRFROMUI1 +132 stub VARBOOLFROMUI1 +133 stub DLLCANUNLOADNOW +#134 stub WEP +#135 stub ___EXPORTEDSTUB Property changes on: trunk/reactos/lib/oleaut32/ole2disp.spec ___________________________________________________________________ Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/oleaut32/oleaut.c --- trunk/reactos/lib/oleaut32/oleaut.c 2005-09-05 21:56:14 UTC (rev 17678) +++ trunk/reactos/lib/oleaut32/oleaut.c 2005-09-05 22:00:07 UTC (rev 17679) @@ -32,9 +32,8 @@ #include "ole2.h" #include "olectl.h" #include "oleauto.h" +#include "typelib.h" -#include "tmarshal.h" - #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -701,7 +700,7 @@ extern void _get_STDPIC_CF(LPVOID); /*********************************************************************** - * DllGetClassObject (OLEAUT32.1) + * DllGetClassObject (OLEAUT32.@) */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) { @@ -727,7 +726,7 @@ return OLEAUTPS_DllGetClassObject(&CLSID_PSDispatch, iid, ppv); } if (IsEqualGUID(rclsid,&CLSID_PSOAInterface)) { - if (S_OK==TypeLibFac_DllGetClassObject(rclsid,iid,ppv)) + if (S_OK==TMARSHAL_DllGetClassObject(rclsid,iid,ppv)) return S_OK; /*FALLTHROUGH*/ } @@ -736,7 +735,7 @@ } /*********************************************************************** - * DllCanUnloadNow (OLEAUT32.410) + * DllCanUnloadNow (OLEAUT32.@) * * Determine if this dll can be unloaded from the callers address space. * @@ -756,7 +755,7 @@ */ BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved) { - TRACE("(%p,%lu,%p)\n", hInstDll, fdwReason, lpvReserved); + TRACE("(%p,%ld,%p)\n", hInstDll, fdwReason, lpvReserved); switch (fdwReason) { case DLL_PROCESS_ATTACH: _____ Modified: trunk/reactos/lib/oleaut32/oleaut32.spec --- trunk/reactos/lib/oleaut32/oleaut32.spec 2005-09-05 21:56:14 UTC (rev 17678) +++ trunk/reactos/lib/oleaut32/oleaut32.spec 2005-09-05 22:00:07 UTC (rev 17679) @@ -1,416 +1,417 @@ -1 stdcall -private DllGetClassObject(ptr ptr ptr) -2 stdcall SysAllocString(wstr) -3 stdcall SysReAllocString(ptr wstr) -4 stdcall SysAllocStringLen(wstr long) -5 stdcall SysReAllocStringLen(ptr ptr long) -6 stdcall SysFreeString(wstr) -7 stdcall SysStringLen(wstr) -8 stdcall VariantInit(ptr) -9 stdcall VariantClear(ptr) -10 stdcall VariantCopy(ptr ptr) -11 stdcall VariantCopyInd(ptr ptr) -12 stdcall VariantChangeType(ptr ptr long long) -13 stdcall VariantTimeToDosDateTime(double ptr ptr) -14 stdcall DosDateTimeToVariantTime(long long ptr) -15 stdcall SafeArrayCreate(long long ptr) -16 stdcall SafeArrayDestroy(ptr) -17 stdcall SafeArrayGetDim(ptr) -18 stdcall SafeArrayGetElemsize(ptr) -19 stdcall SafeArrayGetUBound(ptr long long) -20 stdcall SafeArrayGetLBound(ptr long long) -21 stdcall SafeArrayLock(ptr) -22 stdcall SafeArrayUnlock(ptr) -23 stdcall SafeArrayAccessData(ptr ptr) -24 stdcall SafeArrayUnaccessData(ptr) -25 stdcall SafeArrayGetElement(ptr ptr ptr) -26 stdcall SafeArrayPutElement(ptr ptr ptr) -27 stdcall SafeArrayCopy(ptr ptr) -28 stdcall DispGetParam(ptr long long ptr ptr) -29 stdcall DispGetIDsOfNames(ptr ptr long ptr) -30 stdcall DispInvoke(ptr ptr long long ptr ptr ptr ptr) -31 stdcall CreateDispTypeInfo(ptr long ptr) -32 stdcall CreateStdDispatch(ptr ptr ptr ptr) -33 stdcall RegisterActiveObject(ptr ptr long ptr) -34 stdcall RevokeActiveObject(long ptr) -35 stdcall GetActiveObject(ptr ptr ptr) -36 stdcall SafeArrayAllocDescriptor(long ptr) -37 stdcall SafeArrayAllocData(ptr) -38 stdcall SafeArrayDestroyDescriptor(ptr) -39 stdcall SafeArrayDestroyData(ptr) -40 stdcall SafeArrayRedim(ptr ptr) -41 stdcall SafeArrayAllocDescriptorEx(long long ptr) -42 stdcall SafeArrayCreateEx(long long ptr ptr) -43 stdcall SafeArrayCreateVectorEx(long long long ptr) -44 stdcall SafeArraySetRecordInfo(ptr ptr) -45 stdcall SafeArrayGetRecordInfo(ptr ptr) -46 stdcall VarParseNumFromStr(wstr long long ptr ptr) -47 stdcall VarNumFromParseNum(ptr ptr long ptr) -48 stdcall VarI2FromUI1(long ptr) -49 stdcall VarI2FromI4(long ptr) -50 stdcall VarI2FromR4(long ptr) -51 stdcall VarI2FromR8(double ptr) -52 stdcall VarI2FromCy(long long ptr) -53 stdcall VarI2FromDate(double ptr) -54 stdcall VarI2FromStr(wstr long long ptr) -55 stdcall VarI2FromDisp(ptr long ptr) -56 stdcall VarI2FromBool(long ptr) -57 stdcall SafeArraySetIID(ptr ptr) -58 stdcall VarI4FromUI1(long ptr) -59 stdcall VarI4FromI2(long ptr) -60 stdcall VarI4FromR4(long ptr) -61 stdcall VarI4FromR8(double ptr) -62 stdcall VarI4FromCy(long long ptr) -63 stdcall VarI4FromDate(double ptr) -64 stdcall VarI4FromStr(wstr long long ptr) -65 stdcall VarI4FromDisp(ptr long ptr) -66 stdcall VarI4FromBool(long ptr) -67 stdcall SafeArrayGetIID(ptr ptr) -68 stdcall VarR4FromUI1(long ptr) -69 stdcall VarR4FromI2(long ptr) -70 stdcall VarR4FromI4(long ptr) -71 stdcall VarR4FromR8(double ptr) -72 stdcall VarR4FromCy(long long ptr) -73 stdcall VarR4FromDate(double ptr) -74 stdcall VarR4FromStr(wstr long long ptr) -75 stdcall VarR4FromDisp(ptr long ptr) -76 stdcall VarR4FromBool(long ptr) -77 stdcall SafeArrayGetVartype(ptr ptr) -78 stdcall VarR8FromUI1(long ptr) -79 stdcall VarR8FromI2(long ptr) -80 stdcall VarR8FromI4(long ptr) -81 stdcall VarR8FromR4(long ptr) -82 stdcall VarR8FromCy(long long ptr) -83 stdcall VarR8FromDate(double ptr) -84 stdcall VarR8FromStr(wstr long long ptr) -85 stdcall VarR8FromDisp(ptr long ptr) -86 stdcall VarR8FromBool(long ptr) -87 stdcall VarFormat(ptr ptr long long long ptr) -88 stdcall VarDateFromUI1(long ptr) -89 stdcall VarDateFromI2(long ptr) -90 stdcall VarDateFromI4(long ptr) -91 stdcall VarDateFromR4(long ptr) -92 stdcall VarDateFromR8(double ptr) -93 stdcall VarDateFromCy(long long ptr) -94 stdcall VarDateFromStr(wstr long long ptr) -95 stdcall VarDateFromDisp(ptr long ptr) -96 stdcall VarDateFromBool(long ptr) -97 stdcall VarFormatDateTime(ptr long long ptr) -98 stdcall VarCyFromUI1(long ptr) -99 stdcall VarCyFromI2(long ptr) -100 stdcall VarCyFromI4(long ptr) -101 stdcall VarCyFromR4(long ptr) -102 stdcall VarCyFromR8(double ptr) -103 stdcall VarCyFromDate(double ptr) -104 stdcall VarCyFromStr(wstr long long ptr) -105 stdcall VarCyFromDisp(ptr long ptr) -106 stdcall VarCyFromBool(long ptr) -107 stdcall VarFormatNumber(ptr long long long long long ptr) -108 stdcall VarBstrFromUI1(long long long ptr) -109 stdcall VarBstrFromI2(long long long ptr) -110 stdcall VarBstrFromI4(long long long ptr) -111 stdcall VarBstrFromR4(long long long ptr) -112 stdcall VarBstrFromR8(double long long ptr) -113 stdcall VarBstrFromCy(long long long long ptr) -114 stdcall VarBstrFromDate(double long long ptr) -115 stub VarBstrFromDisp -116 stdcall VarBstrFromBool(long long long ptr) -117 stdcall VarFormatPercent(ptr long long long long long ptr) -118 stdcall VarBoolFromUI1(long ptr) -119 stdcall VarBoolFromI2(long ptr) -120 stdcall VarBoolFromI4(long ptr) -121 stdcall VarBoolFromR4(long ptr) -122 stdcall VarBoolFromR8(double ptr) -123 stdcall VarBoolFromDate(double ptr) -124 stdcall VarBoolFromCy(long long ptr) -125 stdcall VarBoolFromStr(wstr long long ptr) -126 stdcall VarBoolFromDisp(ptr long ptr) -127 stdcall VarFormatCurrency(ptr long long long long long ptr) -128 stub VarWeekdayName # stdcall (long long long long ptr) -129 stdcall VarMonthName(long long long ptr) -130 stdcall VarUI1FromI2(long ptr) -131 stdcall VarUI1FromI4(long ptr) -132 stdcall VarUI1FromR4(long ptr) -133 stdcall VarUI1FromR8(double ptr) -134 stdcall VarUI1FromCy(long long ptr) -135 stdcall VarUI1FromDate(double ptr) -136 stdcall VarUI1FromStr(wstr long long ptr) -137 stdcall VarUI1FromDisp(ptr long ptr) -138 stdcall VarUI1FromBool(long ptr) -139 stdcall VarFormatFromTokens (ptr ptr ptr long ptr long) -140 stdcall VarTokenizeFormatString (ptr ptr long long long long ptr) -141 stdcall VarAdd(ptr ptr ptr) -142 stdcall VarAnd(ptr ptr ptr) -143 stdcall VarDiv(ptr ptr ptr) -144 stub OACreateTypeLib2 -146 stdcall DispCallFunc(ptr long long long long ptr ptr ptr) -147 stdcall VariantChangeTypeEx(ptr ptr long long long) -148 stdcall SafeArrayPtrOfIndex(ptr ptr ptr) -149 stdcall SysStringByteLen(ptr) -150 stdcall SysAllocStringByteLen(ptr long) -152 stdcall VarEqv(ptr ptr ptr) -153 stdcall VarIdiv(ptr ptr ptr) -154 stub VarImp # stdcall (ptr ptr ptr) -155 stdcall VarMod(ptr ptr ptr) -156 stdcall VarMul(ptr ptr ptr) -157 stdcall VarOr(ptr ptr ptr) -158 stdcall VarPow(ptr ptr ptr) -159 stdcall VarSub(ptr ptr ptr) -160 stdcall CreateTypeLib(long wstr ptr) -161 stdcall LoadTypeLib (wstr ptr) -162 stdcall LoadRegTypeLib (ptr long long long ptr) -163 stdcall RegisterTypeLib(ptr wstr wstr) -164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr) -165 stdcall LHashValOfNameSys(long long wstr) -166 stdcall LHashValOfNameSysA(long long str) -167 stdcall VarXor(ptr ptr ptr) -168 stdcall VarAbs(ptr ptr) -169 stdcall VarFix(ptr ptr) -170 stdcall OaBuildVersion() -171 stdcall ClearCustData(ptr) -172 stdcall VarInt(ptr ptr) -173 stdcall VarNeg(ptr ptr) -174 stdcall VarNot(ptr ptr) -175 stdcall VarRound(ptr long ptr) -176 stdcall VarCmp(ptr ptr long long) -177 stdcall VarDecAdd(ptr ptr ptr) -178 stdcall VarDecDiv(ptr ptr ptr) -179 stdcall VarDecMul(ptr ptr ptr) -180 stdcall CreateTypeLib2(long wstr ptr) -181 stdcall VarDecSub(ptr ptr ptr) -182 stdcall VarDecAbs(ptr ptr) -183 stdcall LoadTypeLibEx (wstr long ptr) -184 stdcall SystemTimeToVariantTime(ptr ptr) -185 stdcall VariantTimeToSystemTime(double ptr) -186 stdcall UnRegisterTypeLib (ptr long long long long) -187 stdcall VarDecFix(ptr ptr) -188 stdcall VarDecInt(ptr ptr) -189 stdcall VarDecNeg(ptr ptr) -190 stdcall VarDecFromUI1(long ptr) -191 stdcall VarDecFromI2(long ptr) -192 stdcall VarDecFromI4(long ptr) -193 stdcall VarDecFromR4(long ptr) -194 stdcall VarDecFromR8(double ptr) -195 stdcall VarDecFromDate(double ptr) -196 stdcall VarDecFromCy(long long ptr) -197 stdcall VarDecFromStr(wstr long long ptr) -198 stdcall VarDecFromDisp(ptr long ptr) -199 stdcall VarDecFromBool(long ptr) -200 stdcall GetErrorInfo(long ptr) ole32.GetErrorInfo -201 stdcall SetErrorInfo(long ptr) ole32.SetErrorInfo -202 stdcall CreateErrorInfo(ptr) ole32.CreateErrorInfo -203 stdcall VarDecRound(ptr long ptr) -204 stdcall VarDecCmp(ptr ptr) -205 stdcall VarI2FromI1(long ptr) -206 stdcall VarI2FromUI2(long ptr) -207 stdcall VarI2FromUI4(long ptr) -208 stdcall VarI2FromDec(ptr ptr) -209 stdcall VarI4FromI1(long ptr) -210 stdcall VarI4FromUI2(long ptr) -211 stdcall VarI4FromUI4(long ptr) -212 stdcall VarI4FromDec(ptr ptr) -213 stdcall VarR4FromI1(long ptr) -214 stdcall VarR4FromUI2(long ptr) -215 stdcall VarR4FromUI4(long ptr) -216 stdcall VarR4FromDec(ptr ptr) -217 stdcall VarR8FromI1(long ptr) -218 stdcall VarR8FromUI2(long ptr) -219 stdcall VarR8FromUI4(long ptr) -220 stdcall VarR8FromDec(ptr ptr) -221 stdcall VarDateFromI1(long ptr) -222 stdcall VarDateFromUI2(long ptr) -223 stdcall VarDateFromUI4(long ptr) -224 stdcall VarDateFromDec(ptr ptr) -225 stdcall VarCyFromI1(long ptr) -226 stdcall VarCyFromUI2(long ptr) -227 stdcall VarCyFromUI4(long ptr) -228 stdcall VarCyFromDec(ptr ptr) -229 stdcall VarBstrFromI1(long long long ptr) -230 stdcall VarBstrFromUI2(long long long ptr) -231 stdcall VarBstrFromUI4(long long long ptr) -232 stdcall VarBstrFromDec(ptr long long ptr) -233 stdcall VarBoolFromI1(long ptr) -234 stdcall VarBoolFromUI2(long ptr) -235 stdcall VarBoolFromUI4(long ptr) -236 stdcall VarBoolFromDec(ptr ptr) -237 stdcall VarUI1FromI1(long ptr) -238 stdcall VarUI1FromUI2(long ptr) -239 stdcall VarUI1FromUI4(long ptr) -240 stdcall VarUI1FromDec(ptr ptr) -241 stdcall VarDecFromI1(long ptr) -242 stdcall VarDecFromUI2(long ptr) -243 stdcall VarDecFromUI4(long ptr) -244 stdcall VarI1FromUI1(long ptr) -245 stdcall VarI1FromI2(long ptr) -246 stdcall VarI1FromI4(long ptr) -247 stdcall VarI1FromR4(long ptr) -248 stdcall VarI1FromR8(double ptr) -249 stdcall VarI1FromDate(double ptr) -250 stdcall VarI1FromCy(long long ptr) -251 stdcall VarI1FromStr(wstr long long ptr) -252 stdcall VarI1FromDisp(ptr long ptr) -253 stdcall VarI1FromBool(long ptr) -254 stdcall VarI1FromUI2(long ptr) -255 stdcall VarI1FromUI4(long ptr) -256 stdcall VarI1FromDec(ptr ptr) -257 stdcall VarUI2FromUI1(long ptr) -258 stdcall VarUI2FromI2(long ptr) -259 stdcall VarUI2FromI4(long ptr) -260 stdcall VarUI2FromR4(long ptr) -261 stdcall VarUI2FromR8(double ptr) -262 stdcall VarUI2FromDate(double ptr) -263 stdcall VarUI2FromCy(long long ptr) -264 stdcall VarUI2FromStr(wstr long long ptr) -265 stdcall VarUI2FromDisp(ptr long ptr) -266 stdcall VarUI2FromBool(long ptr) -267 stdcall VarUI2FromI1(long ptr) -268 stdcall VarUI2FromUI4(long ptr) -269 stdcall VarUI2FromDec(ptr ptr) -270 stdcall VarUI4FromUI1(long ptr) -271 stdcall VarUI4FromI2(long ptr) -272 stdcall VarUI4FromI4(long ptr) -273 stdcall VarUI4FromR4(long ptr) -274 stdcall VarUI4FromR8(double ptr) -275 stdcall VarUI4FromDate(double ptr) -276 stdcall VarUI4FromCy(long long ptr) -277 stdcall VarUI4FromStr(wstr long long ptr) -278 stdcall VarUI4FromDisp(ptr long ptr) -279 stdcall VarUI4FromBool(long ptr) -280 stdcall VarUI4FromI1(long ptr) -281 stdcall VarUI4FromUI2(long ptr) -282 stdcall VarUI4FromDec(ptr ptr) -283 stdcall BSTR_UserSize(ptr long ptr) -284 stdcall BSTR_UserMarshal(ptr ptr ptr) -285 stdcall BSTR_UserUnmarshal(ptr ptr ptr) -286 stdcall BSTR_UserFree(ptr ptr) -287 stdcall VARIANT_UserSize(ptr long ptr) -288 stdcall VARIANT_UserMarshal(ptr ptr ptr) -289 stdcall VARIANT_UserUnmarshal(ptr ptr ptr) -290 stdcall VARIANT_UserFree(ptr ptr) -291 stub LPSAFEARRAY_UserSize -292 stub LPSAFEARRAY_UserMarshal -293 stub LPSAFEARRAY_UserUnmarshal -294 stub LPSAFEARRAY_UserFree -295 stub LPSAFEARRAY_Size -296 stub LPSAFEARRAY_Marshal -297 stub LPSAFEARRAY_Unmarshal -298 stdcall VarDecCmpR8(ptr double) -299 stdcall VarCyAdd(long long long long ptr) -303 stdcall VarCyMul(long long long long ptr) -304 stdcall VarCyMulI4(long long long ptr) -305 stdcall VarCySub(long long long long ptr) -306 stdcall VarCyAbs(long long ptr) -307 stdcall VarCyFix(long long ptr) -308 stdcall VarCyInt(long long ptr) -309 stdcall VarCyNeg(long long ptr) -310 stdcall VarCyRound(long long long ptr) -311 stdcall VarCyCmp(long long long long) -312 stdcall VarCyCmpR8(long long double) -313 stdcall VarBstrCat(wstr wstr ptr) -314 stdcall VarBstrCmp(wstr wstr long long) -315 stdcall VarR8Pow(double double ptr) -316 stdcall VarR4CmpR8(long double) -317 stdcall VarR8Round(double long ptr) -318 stdcall VarCat(ptr ptr ptr) -319 stdcall VarDateFromUdateEx(ptr long long ptr) -320 stdcall -private DllRegisterServer() -321 stdcall -private DllUnregisterServer() -322 stdcall GetRecordInfoFromGuids(ptr long long long ptr ptr) -323 stdcall GetRecordInfoFromTypeInfo(ptr ptr) -325 stub SetVarConversionLocaleSetting -326 stub GetVarConversionLocaleSetting -327 stdcall SetOaNoCache() -329 stdcall VarCyMulI8(long long long long ptr) -330 stdcall VarDateFromUdate(ptr long ptr) -331 stdcall VarUdateFromDate(double long ptr) -332 stub GetAltMonthNames -333 stdcall VarI8FromUI1(long long) -334 stdcall VarI8FromI2(long long) -335 stdcall VarI8FromR4(long long) -336 stdcall VarI8FromR8(double long) -337 stdcall VarI8FromCy(long long ptr) -338 stdcall VarI8FromDate(double long) -339 stdcall VarI8FromStr(wstr long long ptr) -340 stdcall VarI8FromDisp(ptr long ptr) -341 stdcall VarI8FromBool(long long) -342 stdcall VarI8FromI1(long long) -343 stdcall VarI8FromUI2(long long) -344 stdcall VarI8FromUI4(long long) -345 stdcall VarI8FromDec(ptr ptr) -346 stdcall VarI2FromI8(long long ptr) -347 stdcall VarI2FromUI8(long long ptr) -348 stdcall VarI4FromI8(long long ptr) -349 stdcall VarI4FromUI8(long long ptr) -360 stdcall VarR4FromI8(long long ptr) -361 stdcall VarR4FromUI8(long long ptr) -362 stdcall VarR8FromI8(long long ptr) -363 stdcall VarR8FromUI8(long long ptr) -364 stdcall VarDateFromI8(long long ptr) -365 stdcall VarDateFromUI8(long long ptr) -366 stdcall VarCyFromI8(long long ptr) -367 stdcall VarCyFromUI8(long long ptr) -368 stdcall VarBstrFromI8(long long long long ptr) -369 stdcall VarBstrFromUI8(long long long long ptr) -370 stdcall VarBoolFromI8(long long ptr) -371 stdcall VarBoolFromUI8(long long ptr) -372 stdcall VarUI1FromI8(long long ptr) -373 stdcall VarUI1FromUI8(long long ptr) -374 stdcall VarDecFromI8(long long ptr) -375 stdcall VarDecFromUI8(long long ptr) -376 stdcall VarI1FromI8(long long ptr) -377 stdcall VarI1FromUI8(long long ptr) -378 stdcall VarUI2FromI8(long long ptr) -379 stdcall VarUI2FromUI8(long long ptr) -380 stub UserHWND_from_local -381 stub UserHWND_to_local -382 stub UserHWND_free_inst -383 stub UserHWND_free_local -384 stub UserBSTR_from_local -385 stub UserBSTR_to_local -386 stub UserBSTR_free_inst -387 stub UserBSTR_free_local -388 stub UserVARIANT_from_local -389 stub UserVARIANT_to_local -390 stub UserVARIANT_free_inst -391 stub UserVARIANT_free_local -392 stub UserEXCEPINFO_from_local -393 stub UserEXCEPINFO_to_local -394 stub UserEXCEPINFO_free_inst -395 stub UserEXCEPINFO_free_local -396 stub UserMSG_from_local -397 stub UserMSG_to_local -398 stub UserMSG_free_inst -399 stub UserMSG_free_local -401 stdcall OleLoadPictureEx(ptr long long long long long long ptr) -402 stub OleLoadPictureFileEx -410 stdcall -private DllCanUnloadNow() -411 stdcall SafeArrayCreateVector(long long long) -412 stdcall SafeArrayCopyData(ptr ptr) -413 stdcall VectorFromBstr(ptr ptr) -414 stdcall BstrFromVector(ptr ptr) -415 stdcall OleIconToCursor(long long) -416 stdcall OleCreatePropertyFrameIndirect(ptr) -417 stdcall OleCreatePropertyFrame(ptr long long ptr long ptr long ptr ptr long ptr) -418 stdcall OleLoadPicture(ptr long long ptr ptr) -419 stdcall OleCreatePictureIndirect(ptr ptr long ptr) -420 stdcall OleCreateFontIndirect(ptr ptr ptr) -421 stdcall OleTranslateColor(long long long) -422 stub OleLoadPictureFile -423 stub OleSavePictureFile -424 stdcall OleLoadPicturePath(wstr ptr long long ptr ptr) -425 stdcall VarUI4FromI8(long long ptr) -426 stdcall VarUI4FromUI8(long long ptr) -427 stdcall VarI8FromUI8(long long ptr) -428 stdcall VarUI8FromI8(long long ptr) -429 stdcall VarUI8FromUI1(long ptr) -430 stdcall VarUI8FromI2(long ptr) -431 stdcall VarUI8FromR4(long ptr) -432 stdcall VarUI8FromR8(double ptr) -433 stdcall VarUI8FromCy(long long ptr) -434 stdcall VarUI8FromDate(double ptr) -435 stdcall VarUI8FromStr(wstr long long ptr) -436 stdcall VarUI8FromDisp(ptr long ptr) -437 stdcall VarUI8FromBool(long ptr) -438 stdcall VarUI8FromI1(long ptr) -439 stdcall VarUI8FromUI2(long ptr) -440 stdcall VarUI8FromUI4(long ptr) -441 stdcall VarUI8FromDec(long ptr) +2 stdcall SysAllocString(wstr) +3 stdcall SysReAllocString(ptr wstr) +4 stdcall SysAllocStringLen(wstr long) +5 stdcall SysReAllocStringLen(ptr ptr long) +6 stdcall SysFreeString(wstr) +7 stdcall SysStringLen(wstr) +8 stdcall VariantInit(ptr) +9 stdcall VariantClear(ptr) +10 stdcall VariantCopy(ptr ptr) +11 stdcall VariantCopyInd(ptr ptr) +12 stdcall VariantChangeType(ptr ptr long long) +13 stdcall VariantTimeToDosDateTime(double ptr ptr) +14 stdcall DosDateTimeToVariantTime(long long ptr) +15 stdcall SafeArrayCreate(long long ptr) +16 stdcall SafeArrayDestroy(ptr) +17 stdcall SafeArrayGetDim(ptr) +18 stdcall SafeArrayGetElemsize(ptr) +19 stdcall SafeArrayGetUBound(ptr long long) +20 stdcall SafeArrayGetLBound(ptr long long) +21 stdcall SafeArrayLock(ptr) +22 stdcall SafeArrayUnlock(ptr) +23 stdcall SafeArrayAccessData(ptr ptr) +24 stdcall SafeArrayUnaccessData(ptr) +25 stdcall SafeArrayGetElement(ptr ptr ptr) +26 stdcall SafeArrayPutElement(ptr ptr ptr) +27 stdcall SafeArrayCopy(ptr ptr) +28 stdcall DispGetParam(ptr long long ptr ptr) +29 stdcall DispGetIDsOfNames(ptr ptr long ptr) +30 stdcall DispInvoke(ptr ptr long long ptr ptr ptr ptr) +31 stdcall CreateDispTypeInfo(ptr long ptr) +32 stdcall CreateStdDispatch(ptr ptr ptr ptr) +33 stdcall RegisterActiveObject(ptr ptr long ptr) +34 stdcall RevokeActiveObject(long ptr) +35 stdcall GetActiveObject(ptr ptr ptr) +36 stdcall SafeArrayAllocDescriptor(long ptr) +37 stdcall SafeArrayAllocData(ptr) +38 stdcall SafeArrayDestroyDescriptor(ptr) +39 stdcall SafeArrayDestroyData(ptr) +40 stdcall SafeArrayRedim(ptr ptr) +41 stdcall SafeArrayAllocDescriptorEx(long long ptr) +42 stdcall SafeArrayCreateEx(long long ptr ptr) +43 stdcall SafeArrayCreateVectorEx(long long long ptr) +44 stdcall SafeArraySetRecordInfo(ptr ptr) +45 stdcall SafeArrayGetRecordInfo(ptr ptr) +46 stdcall VarParseNumFromStr(wstr long long ptr ptr) +47 stdcall VarNumFromParseNum(ptr ptr long ptr) +48 stdcall VarI2FromUI1(long ptr) +49 stdcall VarI2FromI4(long ptr) +50 stdcall VarI2FromR4(long ptr) +51 stdcall VarI2FromR8(double ptr) +52 stdcall VarI2FromCy(long long ptr) +53 stdcall VarI2FromDate(double ptr) +54 stdcall VarI2FromStr(wstr long long ptr) +55 stdcall VarI2FromDisp(ptr long ptr) +56 stdcall VarI2FromBool(long ptr) +57 stdcall SafeArraySetIID(ptr ptr) +58 stdcall VarI4FromUI1(long ptr) +59 stdcall VarI4FromI2(long ptr) +60 stdcall VarI4FromR4(long ptr) +61 stdcall VarI4FromR8(double ptr) +62 stdcall VarI4FromCy(long long ptr) +63 stdcall VarI4FromDate(double ptr) +64 stdcall VarI4FromStr(wstr long long ptr) +65 stdcall VarI4FromDisp(ptr long ptr) +66 stdcall VarI4FromBool(long ptr) +67 stdcall SafeArrayGetIID(ptr ptr) +68 stdcall VarR4FromUI1(long ptr) +69 stdcall VarR4FromI2(long ptr) +70 stdcall VarR4FromI4(long ptr) +71 stdcall VarR4FromR8(double ptr) +72 stdcall VarR4FromCy(long long ptr) +73 stdcall VarR4FromDate(double ptr) +74 stdcall VarR4FromStr(wstr long long ptr) +75 stdcall VarR4FromDisp(ptr long ptr) +76 stdcall VarR4FromBool(long ptr) +77 stdcall SafeArrayGetVartype(ptr ptr) +78 stdcall VarR8FromUI1(long ptr) +79 stdcall VarR8FromI2(long ptr) +80 stdcall VarR8FromI4(long ptr) +81 stdcall VarR8FromR4(long ptr) +82 stdcall VarR8FromCy(long long ptr) +83 stdcall VarR8FromDate(double ptr) +84 stdcall VarR8FromStr(wstr long long ptr) +85 stdcall VarR8FromDisp(ptr long ptr) +86 stdcall VarR8FromBool(long ptr) +87 stdcall VarFormat(ptr ptr long long long ptr) +88 stdcall VarDateFromUI1(long ptr) +89 stdcall VarDateFromI2(long ptr) +90 stdcall VarDateFromI4(long ptr) +91 stdcall VarDateFromR4(long ptr) +92 stdcall VarDateFromR8(double ptr) +93 stdcall VarDateFromCy(long long ptr) +94 stdcall VarDateFromStr(wstr long long ptr) +95 stdcall VarDateFromDisp(ptr long ptr) +96 stdcall VarDateFromBool(long ptr) +97 stdcall VarFormatDateTime(ptr long long ptr) +98 stdcall VarCyFromUI1(long ptr) +99 stdcall VarCyFromI2(long ptr) +100 stdcall VarCyFromI4(long ptr) +101 stdcall VarCyFromR4(long ptr) +102 stdcall VarCyFromR8(double ptr) +103 stdcall VarCyFromDate(double ptr) +104 stdcall VarCyFromStr(wstr long long ptr) +105 stdcall VarCyFromDisp(ptr long ptr) +106 stdcall VarCyFromBool(long ptr) +107 stdcall VarFormatNumber(ptr long long long long long ptr) +108 stdcall VarBstrFromUI1(long long long ptr) +109 stdcall VarBstrFromI2(long long long ptr) +110 stdcall VarBstrFromI4(long long long ptr) +111 stdcall VarBstrFromR4(long long long ptr) +112 stdcall VarBstrFromR8(double long long ptr) +113 stdcall VarBstrFromCy(long long long long ptr) +114 stdcall VarBstrFromDate(double long long ptr) +115 stub VarBstrFromDisp +116 stdcall VarBstrFromBool(long long long ptr) +117 stdcall VarFormatPercent(ptr long long long long long ptr) +118 stdcall VarBoolFromUI1(long ptr) +119 stdcall VarBoolFromI2(long ptr) +120 stdcall VarBoolFromI4(long ptr) +121 stdcall VarBoolFromR4(long ptr) +122 stdcall VarBoolFromR8(double ptr) +123 stdcall VarBoolFromDate(double ptr) +124 stdcall VarBoolFromCy(long long ptr) +125 stdcall VarBoolFromStr(wstr long long ptr) +126 stdcall VarBoolFromDisp(ptr long ptr) +127 stdcall VarFormatCurrency(ptr long long long long long ptr) +128 stub VarWeekdayName # stdcall (long long long long ptr) +129 stdcall VarMonthName(long long long ptr) +130 stdcall VarUI1FromI2(long ptr) +131 stdcall VarUI1FromI4(long ptr) +132 stdcall VarUI1FromR4(long ptr) +133 stdcall VarUI1FromR8(double ptr) +134 stdcall VarUI1FromCy(long long ptr) +135 stdcall VarUI1FromDate(double ptr) +136 stdcall VarUI1FromStr(wstr long long ptr) +137 stdcall VarUI1FromDisp(ptr long ptr) +138 stdcall VarUI1FromBool(long ptr) +139 stdcall VarFormatFromTokens (ptr ptr ptr long ptr long) +140 stdcall VarTokenizeFormatString (ptr ptr long long long long ptr) +141 stdcall VarAdd(ptr ptr ptr) +142 stdcall VarAnd(ptr ptr ptr) +143 stdcall VarDiv(ptr ptr ptr) +144 stub OACreateTypeLib2 +146 stdcall DispCallFunc(ptr long long long long ptr ptr ptr) +147 stdcall VariantChangeTypeEx(ptr ptr long long long) +148 stdcall SafeArrayPtrOfIndex(ptr ptr ptr) +149 stdcall SysStringByteLen(ptr) +150 stdcall SysAllocStringByteLen(ptr long) +152 stdcall VarEqv(ptr ptr ptr) +153 stdcall VarIdiv(ptr ptr ptr) +154 stub VarImp # stdcall (ptr ptr ptr) +155 stdcall VarMod(ptr ptr ptr) +156 stdcall VarMul(ptr ptr ptr) +157 stdcall VarOr(ptr ptr ptr) +158 stdcall VarPow(ptr ptr ptr) +159 stdcall VarSub(ptr ptr ptr) +160 stdcall CreateTypeLib(long wstr ptr) +161 stdcall LoadTypeLib (wstr ptr) +162 stdcall LoadRegTypeLib (ptr long long long ptr) +163 stdcall RegisterTypeLib(ptr wstr wstr) +164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr) +165 stdcall LHashValOfNameSys(long long wstr) +166 stdcall LHashValOfNameSysA(long long str) +167 stdcall VarXor(ptr ptr ptr) +168 stdcall VarAbs(ptr ptr) +169 stdcall VarFix(ptr ptr) +170 stdcall OaBuildVersion() +171 stdcall ClearCustData(ptr) +172 stdcall VarInt(ptr ptr) +173 stdcall VarNeg(ptr ptr) +174 stdcall VarNot(ptr ptr) +175 stdcall VarRound(ptr long ptr) +176 stdcall VarCmp(ptr ptr long long) +177 stdcall VarDecAdd(ptr ptr ptr) +178 stdcall VarDecDiv(ptr ptr ptr) +179 stdcall VarDecMul(ptr ptr ptr) +180 stdcall CreateTypeLib2(long wstr ptr) +181 stdcall VarDecSub(ptr ptr ptr) +182 stdcall VarDecAbs(ptr ptr) +183 stdcall LoadTypeLibEx (wstr long ptr) +184 stdcall SystemTimeToVariantTime(ptr ptr) +185 stdcall VariantTimeToSystemTime(double ptr) +186 stdcall UnRegisterTypeLib (ptr long long long long) +187 stdcall VarDecFix(ptr ptr) +188 stdcall VarDecInt(ptr ptr) +189 stdcall VarDecNeg(ptr ptr) +190 stdcall VarDecFromUI1(long ptr) +191 stdcall VarDecFromI2(long ptr) +192 stdcall VarDecFromI4(long ptr) +193 stdcall VarDecFromR4(long ptr) +194 stdcall VarDecFromR8(double ptr) +195 stdcall VarDecFromDate(double ptr) +196 stdcall VarDecFromCy(long long ptr) +197 stdcall VarDecFromStr(wstr long long ptr) +198 stdcall VarDecFromDisp(ptr long ptr) +199 stdcall VarDecFromBool(long ptr) +200 stdcall GetErrorInfo(long ptr) ole32.GetErrorInfo +201 stdcall SetErrorInfo(long ptr) ole32.SetErrorInfo +202 stdcall CreateErrorInfo(ptr) ole32.CreateErrorInfo +203 stdcall VarDecRound(ptr long ptr) +204 stdcall VarDecCmp(ptr ptr) +205 stdcall VarI2FromI1(long ptr) +206 stdcall VarI2FromUI2(long ptr) +207 stdcall VarI2FromUI4(long ptr) +208 stdcall VarI2FromDec(ptr ptr) +209 stdcall VarI4FromI1(long ptr) +210 stdcall VarI4FromUI2(long ptr) +211 stdcall VarI4FromUI4(long ptr) +212 stdcall VarI4FromDec(ptr ptr) +213 stdcall VarR4FromI1(long ptr) +214 stdcall VarR4FromUI2(long ptr) +215 stdcall VarR4FromUI4(long ptr) +216 stdcall VarR4FromDec(ptr ptr) +217 stdcall VarR8FromI1(long ptr) +218 stdcall VarR8FromUI2(long ptr) +219 stdcall VarR8FromUI4(long ptr) +220 stdcall VarR8FromDec(ptr ptr) +221 stdcall VarDateFromI1(long ptr) +222 stdcall VarDateFromUI2(long ptr) +223 stdcall VarDateFromUI4(long ptr) +224 stdcall VarDateFromDec(ptr ptr) +225 stdcall VarCyFromI1(long ptr) +226 stdcall VarCyFromUI2(long ptr) +227 stdcall VarCyFromUI4(long ptr) +228 stdcall VarCyFromDec(ptr ptr) +229 stdcall VarBstrFromI1(long long long ptr) +230 stdcall VarBstrFromUI2(long long long ptr) +231 stdcall VarBstrFromUI4(long long long ptr) +232 stdcall VarBstrFromDec(ptr long long ptr) +233 stdcall VarBoolFromI1(long ptr) +234 stdcall VarBoolFromUI2(long ptr) +235 stdcall VarBoolFromUI4(long ptr) +236 stdcall VarBoolFromDec(ptr ptr) +237 stdcall VarUI1FromI1(long ptr) +238 stdcall VarUI1FromUI2(long ptr) +239 stdcall VarUI1FromUI4(long ptr) +240 stdcall VarUI1FromDec(ptr ptr) +241 stdcall VarDecFromI1(long ptr) +242 stdcall VarDecFromUI2(long ptr) +243 stdcall VarDecFromUI4(long ptr) +244 stdcall VarI1FromUI1(long ptr) +245 stdcall VarI1FromI2(long ptr) +246 stdcall VarI1FromI4(long ptr) +247 stdcall VarI1FromR4(long ptr) +248 stdcall VarI1FromR8(double ptr) +249 stdcall VarI1FromDate(double ptr) +250 stdcall VarI1FromCy(long long ptr) +251 stdcall VarI1FromStr(wstr long long ptr) +252 stdcall VarI1FromDisp(ptr long ptr) [truncated at 1000 lines; 3397 more skipped]
19 years, 2 months
1
0
0
0
[gvg] 17678: Sync to Wine-20050830:
by gvg@svn.reactos.com
Sync to Wine-20050830: Francois Gouget <fgouget(a)free.fr> - Use LPSTORAGE to better match the PSDK. Document the real SEGPTR type using the standard documentation mechanisms. Fixes winapi_check warnings. Robert Shearman <rob(a)codeweavers.com> - Remove unused thread handle entry from the apartment structure. - Implement IMarshal on proxies so that we don't end up with proxies to proxies, causing potential deadlock issues and performance problems. - Add a test for this situation and remove the todo_wine from another test that now succeeds. - Add stub for CoAllowSetForegroundWindow. Vincent Beron <vberon(a)mecano.gme.usherb.ca> - Remove local declarations already in included public headers. - Correct mismatches between spec files and comments about export number. Alexandre Julliard <julliard(a)winehq.org> - Uncomment the typedef in the DECLARE_INTERFACE macro, and get rid of duplicate typedefs. - Use the proper WOW functions everywhere instead of the K32WOW variant. - Don't prefix the functions DllCanUnloadNow, DllGetClassObject and Dll(Un)RegisterServer with the dll name so that the compiler can check the prototypes. - Remove duplicate definition of FILE_BEGIN. - Replace the _ICOM_THIS_From macros by inline functions the way it's already done in shelllink.c. Mike McCormack <mike(a)codeweavers.com> - Warning fixes for gcc 4.0. - Fix some gcc 4.0 warnings. - return a precomputed result for a NULL string - pass strlen an LPSTR to eliminate a sign warning Marcus Meissner <marcus(a)jet.franken.de> - Implemented ILockBytes16 (memorystream) support for the 16bit compound storage implementation. - Added ReadClassStg, OleDoAutoConvert, GetConvertStg implementations/stubs. Marcus Meissner <meissner(a)suse.de> - Added CoCreateInstance16, CoGetClassObject16, OleLoad16 stubs. Modified: trunk/reactos/lib/ole32/antimoniker.c Modified: trunk/reactos/lib/ole32/compobj.c Modified: trunk/reactos/lib/ole32/compobj.spec Modified: trunk/reactos/lib/ole32/compobj_private.h Modified: trunk/reactos/lib/ole32/compositemoniker.c Modified: trunk/reactos/lib/ole32/datacache.c Modified: trunk/reactos/lib/ole32/defaulthandler.c Modified: trunk/reactos/lib/ole32/errorinfo.c Modified: trunk/reactos/lib/ole32/filemoniker.c Modified: trunk/reactos/lib/ole32/ftmarshal.c Modified: trunk/reactos/lib/ole32/ifs.h Modified: trunk/reactos/lib/ole32/itemmoniker.c Modified: trunk/reactos/lib/ole32/marshal.c Modified: trunk/reactos/lib/ole32/moniker.c Modified: trunk/reactos/lib/ole32/moniker.h Modified: trunk/reactos/lib/ole32/ole16.c Modified: trunk/reactos/lib/ole32/ole2.c Modified: trunk/reactos/lib/ole32/ole2.spec Modified: trunk/reactos/lib/ole32/ole2_16.c Modified: trunk/reactos/lib/ole32/ole32.spec Modified: trunk/reactos/lib/ole32/oleproxy.c Modified: trunk/reactos/lib/ole32/stg_prop.c Modified: trunk/reactos/lib/ole32/storage.c Modified: trunk/reactos/lib/ole32/storage.spec Modified: trunk/reactos/lib/ole32/storage32.c _____ Modified: trunk/reactos/lib/ole32/antimoniker.c --- trunk/reactos/lib/ole32/antimoniker.c 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/antimoniker.c 2005-09-05 21:56:14 UTC (rev 17678) @@ -53,7 +53,12 @@ } AntiMonikerImpl; +static inline IMoniker *impl_from_IROTData( IROTData *iface ) +{ + return (IMoniker *)((char*)iface - FIELD_OFFSET(AntiMonikerImpl, lpvtbl2)); +} + /*********************************************************************** ******** * AntiMoniker_QueryInterface ************************************************************************ *******/ @@ -485,7 +490,7 @@ static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); @@ -497,7 +502,7 @@ */ static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); @@ -509,7 +514,7 @@ */ static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); _____ Modified: trunk/reactos/lib/ole32/compobj.c --- trunk/reactos/lib/ole32/compobj.c 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/compobj.c 2005-09-05 21:56:14 UTC (rev 17678) @@ -224,9 +224,6 @@ apt = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*apt)); apt->tid = GetCurrentThreadId(); - DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), - GetCurrentProcess(), &apt->thread, - THREAD_ALL_ACCESS, FALSE, 0); list_init(&apt->proxies); list_init(&apt->stubmgrs); @@ -360,7 +357,6 @@ DEBUG_CLEAR_CRITSEC_NAME(&apt->cs); DeleteCriticalSection(&apt->cs); - CloseHandle(apt->thread); HeapFree(GetProcessHeap(), 0, apt); } @@ -813,27 +809,29 @@ */ HRESULT WINAPI __CLSIDFromStringA(LPCSTR idstr, CLSID *id) { - const BYTE *s = (const BYTE *) idstr; + const BYTE *s; int i; BYTE table[256]; - if (!s) - s = "{00000000-0000-0000-0000-000000000000}"; - else { /* validate the CLSID string */ + if (!idstr) { + memset( id, 0, sizeof (CLSID) ); + return S_OK; + } - if (strlen(s) != 38) - return CO_E_CLASSSTRING; + /* validate the CLSID string */ + if (strlen(idstr) != 38) + return CO_E_CLASSSTRING; - if ((s[0]!='{') || (s[9]!='-') || (s[14]!='-') || (s[19]!='-') || (s[24]!='-') || (s[37]!='}')) - return CO_E_CLASSSTRING; + s = (const BYTE *) idstr; + if ((s[0]!='{') || (s[9]!='-') || (s[14]!='-') || (s[19]!='-') || (s[24]!='-') || (s[37]!='}')) + return CO_E_CLASSSTRING; - for (i=1; i<37; i++) { - if ((i == 9)||(i == 14)||(i == 19)||(i == 24)) continue; - if (!(((s[i] >= '0') && (s[i] <= '9')) || - ((s[i] >= 'a') && (s[i] <= 'f')) || - ((s[i] >= 'A') && (s[i] <= 'F')))) - return CO_E_CLASSSTRING; - } + for (i=1; i<37; i++) { + if ((i == 9)||(i == 14)||(i == 19)||(i == 24)) continue; + if (!(((s[i] >= '0') && (s[i] <= '9')) || + ((s[i] >= 'a') && (s[i] <= 'f')) || + ((s[i] >= 'A') && (s[i] <= 'F')))) + return CO_E_CLASSSTRING; } TRACE("%s -> %p\n", s, id); @@ -1026,7 +1024,7 @@ if (ret == S_OK) { - DWORD progidlen = 0; + LONG progidlen = 0; if (RegQueryValueW(hkey, NULL, NULL, &progidlen)) ret = REGDB_E_CLASSNOTREG; @@ -1064,7 +1062,7 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid) { char *buf,buf2[80]; - DWORD buf2len; + LONG buf2len; HRESULT err; HKEY xhkey; @@ -1101,7 +1099,7 @@ { static const WCHAR clsidW[] = { '\\','C','L','S','I','D',0 }; WCHAR buf2[CHARS_IN_GUID]; - DWORD buf2len = sizeof(buf2); + LONG buf2len = sizeof(buf2); HKEY xhkey; WCHAR *buf = HeapAlloc( GetProcessHeap(),0,(strlenW(progid)+8) * sizeof(WCHAR) ); @@ -1166,7 +1164,7 @@ static const WCHAR wszPSC[] = {'\\','P','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0} ; WCHAR path[ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1 + ARRAYSIZE(wszPSC)]; WCHAR value[CHARS_IN_GUID]; - DWORD len; + LONG len; HKEY hkey; TRACE("() riid=%s, pclsid=%p\n", debugstr_guid(riid), pclsid); @@ -1562,7 +1560,6 @@ } /*********************************************************************** - * CoGetClassObject [COMPOBJ.7] * CoGetClassObject [OLE32.@] * * FIXME. If request allows of several options and there is a failure @@ -1664,7 +1661,24 @@ return hres; } + /*********************************************************************** + * CoGetClassObject [COMPOBJ.7] + * + */ +HRESULT WINAPI CoGetClassObject16( + REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, + REFIID iid, LPVOID *ppv) +{ + FIXME(", stub!\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid)); + + if (pServerInfo) { + FIXME("\tpServerInfo: name=%s\n",debugstr_w(pServerInfo->pwszName)); + FIXME("\t\tpAuthInfo=%p\n",pServerInfo->pAuthInfo); + } + return E_NOTIMPL; +} +/********************************************************************** * * CoResumeClassObjects (OLE32.@) * * Resumes all class objects registered with REGCLS_SUSPENDED. @@ -1772,8 +1786,8 @@ return MK_E_INVALIDEXTENSION; } + /*********************************************************************** - * CoCreateInstance [COMPOBJ.13] * CoCreateInstance [OLE32.@] */ HRESULT WINAPI CoCreateInstance( @@ -1841,6 +1855,23 @@ } /*********************************************************************** + * CoCreateInstance [COMPOBJ.13] + */ +HRESULT WINAPI CoCreateInstance16( + REFCLSID rclsid, + LPUNKNOWN pUnkOuter, + DWORD dwClsContext, + REFIID iid, + LPVOID *ppv) +{ + FIXME("(%s, %p, %lx, %s, %p), stub!\n", + debugstr_guid(rclsid), pUnkOuter, dwClsContext, debugstr_guid(iid), + ppv + ); + return E_NOTIMPL; +} + +/********************************************************************** * * CoCreateInstanceEx [OLE32.@] */ HRESULT WINAPI CoCreateInstanceEx( @@ -2173,7 +2204,7 @@ static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0}; HKEY hkey = NULL; WCHAR buf[CHARS_IN_GUID]; - DWORD len; + LONG len; HRESULT res = S_OK; if (ERROR_SUCCESS != COM_OpenKeyForCLSID(clsidOld, KEY_READ, &hkey)) @@ -2459,6 +2490,16 @@ return TRUE; } + +/********************************************************************** * + * CoAllowSetForegroundWindow [OLE32.@] + * + */ +HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved) +{ + FIXME("(%p, %p): stub\n", pUnk, pvReserved); + return S_OK; +} /*********************************************************************** * CoQueryProxyBlanket [OLE32.@] _____ Modified: trunk/reactos/lib/ole32/compobj.spec --- trunk/reactos/lib/ole32/compobj.spec 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/compobj.spec 2005-09-05 21:56:14 UTC (rev 17678) @@ -4,13 +4,13 @@ 4 pascal CoGetMalloc(long ptr) CoGetMalloc16 5 pascal CoRegisterClassObject(ptr ptr long long ptr) CoRegisterClassObject16 6 pascal CoRevokeClassObject(long) CoRevokeClassObject16 -7 pascal CoGetClassObject(ptr long ptr ptr ptr) CoGetClassObject +7 pascal CoGetClassObject(ptr long ptr ptr ptr) CoGetClassObject16 8 stub COMARSHALINTERFACE 9 stub COUNMARSHALINTERFACE 10 stub COLOADLIBRARY 11 stub COFREELIBRARY 12 stub COFREEALLLIBRARIES -13 pascal CoCreateInstance(ptr ptr long ptr ptr) CoCreateInstance +13 pascal CoCreateInstance(ptr ptr long ptr ptr) CoCreateInstance16 14 stub STRINGFROMIID 15 pascal CoDisconnectObject(ptr long) CoDisconnectObject 16 stub CORELEASEMARSHALDATA _____ Modified: trunk/reactos/lib/ole32/compobj_private.h --- trunk/reactos/lib/ole32/compobj_private.h 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/compobj_private.h 2005-09-05 21:56:14 UTC (rev 17678) @@ -96,8 +96,8 @@ struct list entry; /* entry in proxy_manager list (CS parent->cs) */ struct proxy_manager *parent; /* owning proxy_manager (RO) */ LPVOID iface; /* interface pointer (RO) */ + STDOBJREF stdobjref; /* marshal data that represents this object (RO) */ IID iid; /* interface ID (RO) */ - IPID ipid; /* imported interface ID (RO) */ LPRPCPROXYBUFFER proxy; /* interface proxy (RO) */ DWORD refs; /* imported (public) references (MUTEX parent->remoting_mutex) */ IRpcChannelBuffer *chan; /* channel to object (CS parent->cs) */ @@ -107,6 +107,7 @@ struct proxy_manager { const IMultiQIVtbl *lpVtbl; + const IMarshalVtbl *lpVtblMarshal; struct apartment *parent; /* owning apartment (RO) */ struct list entry; /* entry in apartment (CS parent->cs) */ OXID oxid; /* object exported ID (RO) */ @@ -127,7 +128,6 @@ LONG refs; /* refcount of the apartment (LOCK) */ DWORD model; /* threading model (RO) */ DWORD tid; /* thread id (RO) */ - HANDLE thread; /* thread handle (RO) */ OXID oxid; /* object exporter ID (RO) */ LONG ipidc; /* interface pointer ID counter, starts at 1 (LOCK) */ HWND win; /* message window (RO) */ _____ Modified: trunk/reactos/lib/ole32/compositemoniker.c --- trunk/reactos/lib/ole32/compositemoniker.c 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/compositemoniker.c 2005-09-05 21:56:14 UTC (rev 17678) @@ -80,6 +80,10 @@ } EnumMonikerImpl; +static inline IMoniker *impl_from_IROTData( IROTData *iface ) +{ + return (IMoniker *)((char*)iface - FIELD_OFFSET(CompositeMonikerImpl, lpvtbl2)); +} static HRESULT EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,ULONG tabSize,ULONG currentPos,BOOL leftToRigth,IEnumMoniker ** ppmk); @@ -1208,7 +1212,7 @@ VOID** ppvObject) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); @@ -1221,7 +1225,7 @@ static ULONG WINAPI CompositeMonikerROTDataImpl_AddRef(IROTData *iface) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); @@ -1233,7 +1237,7 @@ */ static ULONG WINAPI CompositeMonikerROTDataImpl_Release(IROTData* iface) { - ICOM_THIS_From_IROTData(IMoniker, iface); + IMoniker *This = impl_from_IROTData(iface); TRACE("(%p)\n",iface); _____ Modified: trunk/reactos/lib/ole32/datacache.c --- trunk/reactos/lib/ole32/datacache.c 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/datacache.c 2005-09-05 21:56:14 UTC (rev 17678) @@ -93,12 +93,12 @@ /* * List all interface VTables here */ - const IDataObjectVtbl* lpvtbl1; - const IUnknownVtbl* lpvtbl2; - const IPersistStorageVtbl* lpvtbl3; - const IViewObject2Vtbl* lpvtbl4; - const IOleCache2Vtbl* lpvtbl5; - const IOleCacheControlVtbl* lpvtbl6; + const IDataObjectVtbl* lpVtbl; + const IUnknownVtbl* lpvtblNDIUnknown; + const IPersistStorageVtbl* lpvtblIPersistStorage; + const IViewObject2Vtbl* lpvtblIViewObject; + const IOleCache2Vtbl* lpvtblIOleCache2; + const IOleCacheControlVtbl* lpvtblIOleCacheControl; /* * Reference count of this object @@ -136,13 +136,38 @@ * There is a version to accommodate all of the VTables implemented * by this object. */ -#define _ICOM_THIS_From_IDataObject(class,name) class* this = (class*)name -#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)) -#define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)) -#define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)) -#define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*)) -#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)) +static inline DataCache *impl_from_IDataObject( IDataObject *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpVtbl)); +} + +static inline DataCache *impl_from_NDIUnknown( IUnknown *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblNDIUnknown)); +} + +static inline DataCache *impl_from_IPersistStorage( IPersistStorage *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblIPersistStorage)); +} + +static inline DataCache *impl_from_IViewObject2( IViewObject2 *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblIViewObject)); +} + +static inline DataCache *impl_from_IOleCache2( IOleCache2 *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblIOleCache2)); +} + +static inline DataCache *impl_from_IOleCacheControl( IOleCacheControl *iface ) +{ + return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblIOleCacheControl)); +} + + /* * Prototypes for the methods of the DataCache class. */ @@ -489,7 +514,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_NDIUnknown(DataCache, iface); + DataCache *this = impl_from_NDIUnknown(iface); /* * Perform a sanity check on the parameters. @@ -511,26 +536,26 @@ } else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) { - *ppvObject = (IDataObject*)&(this->lpvtbl1); + *ppvObject = (IDataObject*)&(this->lpVtbl); } else if ( (memcmp(&IID_IPersistStorage, riid, sizeof(IID_IPersistStorage)) == 0) || (memcmp(&IID_IPersist, riid, sizeof(IID_IPersist)) == 0) ) { - *ppvObject = (IPersistStorage*)&(this->lpvtbl3); + *ppvObject = (IPersistStorage*)&(this->lpvtblIPersistStorage); } else if ( (memcmp(&IID_IViewObject, riid, sizeof(IID_IViewObject)) == 0) || (memcmp(&IID_IViewObject2, riid, sizeof(IID_IViewObject2)) == 0) ) { - *ppvObject = (IViewObject2*)&(this->lpvtbl4); + *ppvObject = (IViewObject2*)&(this->lpvtblIViewObject); } else if ( (memcmp(&IID_IOleCache, riid, sizeof(IID_IOleCache)) == 0) || (memcmp(&IID_IOleCache2, riid, sizeof(IID_IOleCache2)) == 0) ) { - *ppvObject = (IOleCache2*)&(this->lpvtbl5); + *ppvObject = (IOleCache2*)&(this->lpvtblIOleCache2); } else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) { - *ppvObject = (IOleCacheControl*)&(this->lpvtbl6); + *ppvObject = (IOleCacheControl*)&(this->lpvtblIOleCacheControl); } /* @@ -562,7 +587,7 @@ static ULONG WINAPI DataCache_NDIUnknown_AddRef( IUnknown* iface) { - _ICOM_THIS_From_NDIUnknown(DataCache, iface); + DataCache *this = impl_from_NDIUnknown(iface); return InterlockedIncrement(&this->ref); } @@ -577,7 +602,7 @@ static ULONG WINAPI DataCache_NDIUnknown_Release( IUnknown* iface) { - _ICOM_THIS_From_NDIUnknown(DataCache, iface); + DataCache *this = impl_from_NDIUnknown(iface); ULONG ref; /* @@ -608,7 +633,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IDataObject(DataCache, iface); + DataCache *this = impl_from_IDataObject(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -621,7 +646,7 @@ static ULONG WINAPI DataCache_IDataObject_AddRef( IDataObject* iface) { - _ICOM_THIS_From_IDataObject(DataCache, iface); + DataCache *this = impl_from_IDataObject(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -634,7 +659,7 @@ static ULONG WINAPI DataCache_IDataObject_Release( IDataObject* iface) { - _ICOM_THIS_From_IDataObject(DataCache, iface); + DataCache *this = impl_from_IDataObject(iface); return IUnknown_Release(this->outerUnknown); } @@ -886,7 +911,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -899,7 +924,7 @@ static ULONG WINAPI DataCache_IPersistStorage_AddRef( IPersistStorage* iface) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -912,7 +937,7 @@ static ULONG WINAPI DataCache_IPersistStorage_Release( IPersistStorage* iface) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); return IUnknown_Release(this->outerUnknown); } @@ -979,7 +1004,7 @@ IPersistStorage* iface, IStorage* pStg) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); TRACE("(%p, %p)\n", iface, pStg); @@ -1012,7 +1037,7 @@ IStorage* pStg, BOOL fSameAsLoad) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); TRACE("(%p, %p, %d)\n", iface, pStg, fSameAsLoad); @@ -1072,7 +1097,7 @@ static HRESULT WINAPI DataCache_HandsOffStorage( IPersistStorage* iface) { - _ICOM_THIS_From_IPersistStorage(DataCache, iface); + DataCache *this = impl_from_IPersistStorage(iface); TRACE("(%p)\n", iface); @@ -1100,7 +1125,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -1113,7 +1138,7 @@ static ULONG WINAPI DataCache_IViewObject2_AddRef( IViewObject2* iface) { - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -1126,7 +1151,7 @@ static ULONG WINAPI DataCache_IViewObject2_Release( IViewObject2* iface) { - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); return IUnknown_Release(this->outerUnknown); } @@ -1156,7 +1181,7 @@ HMETAFILE presMetafile = 0; HRESULT hres; - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); TRACE("(%p, %lx, %ld, %p, %p, %p, %p, %p, %p, %lx)\n", iface, @@ -1295,7 +1320,7 @@ DWORD advf, IAdviseSink* pAdvSink) { - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); TRACE("(%p, %lx, %lx, %p)\n", iface, aspects, advf, pAdvSink); @@ -1350,7 +1375,7 @@ DWORD* pAdvf, IAdviseSink** ppAdvSink) { - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); TRACE("(%p, %p, %p, %p)\n", iface, pAspects, pAdvf, ppAdvSink); @@ -1390,7 +1415,7 @@ PresentationDataHeader presData; HRESULT hres = E_FAIL; - _ICOM_THIS_From_IViewObject2(DataCache, iface); + DataCache *this = impl_from_IViewObject2(iface); TRACE("(%p, %lx, %ld, %p, %p)\n", iface, dwDrawAspect, lindex, ptd, lpsizel); @@ -1459,7 +1484,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IOleCache2(DataCache, iface); + DataCache *this = impl_from_IOleCache2(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -1472,7 +1497,7 @@ static ULONG WINAPI DataCache_IOleCache2_AddRef( IOleCache2* iface) { - _ICOM_THIS_From_IOleCache2(DataCache, iface); + DataCache *this = impl_from_IOleCache2(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -1485,7 +1510,7 @@ static ULONG WINAPI DataCache_IOleCache2_Release( IOleCache2* iface) { - _ICOM_THIS_From_IOleCache2(DataCache, iface); + DataCache *this = impl_from_IOleCache2(iface); return IUnknown_Release(this->outerUnknown); } @@ -1568,7 +1593,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IOleCacheControl(DataCache, iface); + DataCache *this = impl_from_IOleCacheControl(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -1581,7 +1606,7 @@ static ULONG WINAPI DataCache_IOleCacheControl_AddRef( IOleCacheControl* iface) { - _ICOM_THIS_From_IOleCacheControl(DataCache, iface); + DataCache *this = impl_from_IOleCacheControl(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -1594,7 +1619,7 @@ static ULONG WINAPI DataCache_IOleCacheControl_Release( IOleCacheControl* iface) { - _ICOM_THIS_From_IOleCacheControl(DataCache, iface); + DataCache *this = impl_from_IOleCacheControl(iface); return IUnknown_Release(this->outerUnknown); } @@ -1735,13 +1760,13 @@ /* * Make sure it supports the interface required by the caller. */ - hr = IUnknown_QueryInterface((IUnknown*)&(newCache->lpvtbl2), riid, ppvObj); + hr = IUnknown_QueryInterface((IUnknown*)&(newCache->lpvtblNDIUnknown), riid, ppvObj); /* * Release the reference obtained in the constructor. If * the QueryInterface was unsuccessful, it will free the class. */ - IUnknown_Release((IUnknown*)&(newCache->lpvtbl2)); + IUnknown_Release((IUnknown*)&(newCache->lpvtblNDIUnknown)); return hr; } @@ -1766,12 +1791,12 @@ /* * Initialize the virtual function table. */ - newObject->lpvtbl1 = &DataCache_IDataObject_VTable; - newObject->lpvtbl2 = &DataCache_NDIUnknown_VTable; - newObject->lpvtbl3 = &DataCache_IPersistStorage_VTable; - newObject->lpvtbl4 = &DataCache_IViewObject2_VTable; - newObject->lpvtbl5 = &DataCache_IOleCache2_VTable; - newObject->lpvtbl6 = &DataCache_IOleCacheControl_VTable; + newObject->lpVtbl = &DataCache_IDataObject_VTable; + newObject->lpvtblNDIUnknown = &DataCache_NDIUnknown_VTable; + newObject->lpvtblIPersistStorage = &DataCache_IPersistStorage_VTable; + newObject->lpvtblIViewObject = &DataCache_IViewObject2_VTable; + newObject->lpvtblIOleCache2 = &DataCache_IOleCache2_VTable; + newObject->lpvtblIOleCacheControl = &DataCache_IOleCacheControl_VTable; /* * Start with one reference count. The caller of this function @@ -1786,7 +1811,7 @@ * lifetime. */ if (pUnkOuter==NULL) - pUnkOuter = (IUnknown*)&(newObject->lpvtbl2); + pUnkOuter = (IUnknown*)&(newObject->lpvtblNDIUnknown); newObject->outerUnknown = pUnkOuter; _____ Modified: trunk/reactos/lib/ole32/defaulthandler.c --- trunk/reactos/lib/ole32/defaulthandler.c 2005-09-05 21:47:21 UTC (rev 17677) +++ trunk/reactos/lib/ole32/defaulthandler.c 2005-09-05 21:56:14 UTC (rev 17678) @@ -70,10 +70,10 @@ /* * List all interface VTables here */ - const IOleObjectVtbl* lpvtbl1; - const IUnknownVtbl* lpvtbl2; - const IDataObjectVtbl* lpvtbl3; - const IRunnableObjectVtbl* lpvtbl4; + const IOleObjectVtbl* lpVtbl; + const IUnknownVtbl* lpvtblIUnknown; + const IDataObjectVtbl* lpvtblIDataObject; + const IRunnableObjectVtbl* lpvtblIRunnableObject; /* * Reference count of this object @@ -82,7 +82,7 @@ /* * IUnknown implementation of the outer object. - */ +p */ IUnknown* outerUnknown; /* @@ -123,16 +123,32 @@ typedef struct DefaultHandler DefaultHandler; /* - * Here, I define utility macros to help with the casting of the + * Here, I define utility functions to help with the casting of the * "this" parameter. * There is a version to accommodate all of the VTables implemented * by this object. */ -#define _ICOM_THIS_From_IOleObject(class,name) class* this = (class*)name -#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)) -#define _ICOM_THIS_From_IDataObject(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)) -#define _ICOM_THIS_From_IRunnableObject(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)) +static inline DefaultHandler *impl_from_IOleObject( IOleObject *iface ) +{ + return (DefaultHandler *)((char*)iface - FIELD_OFFSET(DefaultHandler, lpVtbl)); +} +static inline DefaultHandler *impl_from_NDIUnknown( IUnknown *iface ) +{ + return (DefaultHandler *)((char*)iface - FIELD_OFFSET(DefaultHandler, lpvtblIUnknown)); +} + +static inline DefaultHandler *impl_from_IDataObject( IDataObject *iface ) +{ + return (DefaultHandler *)((char*)iface - FIELD_OFFSET(DefaultHandler, lpvtblIDataObject)); +} + +static inline DefaultHandler *impl_from_IRunnableObject( IRunnableObject *iface ) +{ + return (DefaultHandler *)((char*)iface - FIELD_OFFSET(DefaultHandler, lpvtblIRunnableObject)); +} + + /* * Prototypes for the methods of the DefaultHandler class. */ @@ -432,13 +448,13 @@ /* * Make sure it supports the interface required by the caller. */ - hr = IUnknown_QueryInterface((IUnknown*)&(newHandler->lpvtbl2), riid, ppvObj); + hr = IUnknown_QueryInterface((IUnknown*)&(newHandler->lpvtblIUnknown), riid, ppvObj); /* * Release the reference obtained in the constructor. If * the QueryInterface was unsuccessful, it will free the class. */ - IUnknown_Release((IUnknown*)&(newHandler->lpvtbl2)); + IUnknown_Release((IUnknown*)&(newHandler->lpvtblIUnknown)); return hr; } @@ -463,10 +479,10 @@ /* * Initialize the virtual function table. */ - newObject->lpvtbl1 = &DefaultHandler_IOleObject_VTable; - newObject->lpvtbl2 = &DefaultHandler_NDIUnknown_VTable; - newObject->lpvtbl3 = &DefaultHandler_IDataObject_VTable; - newObject->lpvtbl4 = &DefaultHandler_IRunnableObject_VTable; + newObject->lpVtbl = &DefaultHandler_IOleObject_VTable; + newObject->lpvtblIUnknown = &DefaultHandler_NDIUnknown_VTable; + newObject->lpvtblIDataObject = &DefaultHandler_IDataObject_VTable; + newObject->lpvtblIRunnableObject = &DefaultHandler_IRunnableObject_VTable; /* * Start with one reference count. The caller of this function @@ -481,7 +497,7 @@ * lifetime. */ if (pUnkOuter==NULL) - pUnkOuter = (IUnknown*)&(newObject->lpvtbl2); + pUnkOuter = (IUnknown*)&(newObject->lpvtblIUnknown); newObject->outerUnknown = pUnkOuter; @@ -580,7 +596,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_NDIUnknown(DefaultHandler, iface); + DefaultHandler *this = impl_from_NDIUnknown(iface); /* * Perform a sanity check on the parameters. @@ -602,15 +618,15 @@ } else if (memcmp(&IID_IOleObject, riid, sizeof(IID_IOleObject)) == 0) { - *ppvObject = (IOleObject*)&(this->lpvtbl1); + *ppvObject = (IOleObject*)&(this->lpVtbl); } else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) { - *ppvObject = (IDataObject*)&(this->lpvtbl3); + *ppvObject = (IDataObject*)&(this->lpvtblIDataObject); } else if (memcmp(&IID_IRunnableObject, riid, sizeof(IID_IRunnableObject)) == 0) { - *ppvObject = (IRunnableObject*)&(this->lpvtbl4); + *ppvObject = (IRunnableObject*)&(this->lpvtblIRunnableObject); } else { @@ -650,7 +666,7 @@ static ULONG WINAPI DefaultHandler_NDIUnknown_AddRef( IUnknown* iface) { - _ICOM_THIS_From_NDIUnknown(DefaultHandler, iface); + DefaultHandler *this = impl_from_NDIUnknown(iface); return InterlockedIncrement(&this->ref); } @@ -665,7 +681,7 @@ static ULONG WINAPI DefaultHandler_NDIUnknown_Release( IUnknown* iface) { - _ICOM_THIS_From_NDIUnknown(DefaultHandler, iface); + DefaultHandler *this = impl_from_NDIUnknown(iface); ULONG ref; /* @@ -696,7 +712,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -709,7 +725,7 @@ static ULONG WINAPI DefaultHandler_AddRef( IOleObject* iface) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); return IUnknown_AddRef(this->outerUnknown); } @@ -722,7 +738,7 @@ static ULONG WINAPI DefaultHandler_Release( IOleObject* iface) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); return IUnknown_Release(this->outerUnknown); } @@ -739,7 +755,7 @@ IOleObject* iface, IOleClientSite* pClientSite) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %p)\n", iface, pClientSite); @@ -774,7 +790,7 @@ IOleObject* iface, IOleClientSite** ppClientSite) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); /* * Sanity check. @@ -805,7 +821,7 @@ LPCOLESTR szContainerApp, LPCOLESTR szContainerObj) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %s, %s)\n", iface, @@ -888,7 +904,7 @@ DWORD dwWhichMoniker, IMoniker** ppmk) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk); @@ -967,7 +983,7 @@ IOleObject* iface, IEnumOLEVERB** ppEnumOleVerb) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %p)\n", iface, ppEnumOleVerb); @@ -1007,7 +1023,7 @@ IOleObject* iface, CLSID* pClsid) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %p)\n", iface, pClsid); @@ -1035,7 +1051,7 @@ DWORD dwFormOfType, LPOLESTR* pszUserType) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %ld, %p)\n", iface, dwFormOfType, pszUserType); @@ -1076,7 +1092,7 @@ IViewObject2* cacheView = NULL; HRESULT hres; - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %lx, %p)\n", iface, dwDrawAspect, psizel); @@ -1123,7 +1139,7 @@ DWORD* pdwConnection) { HRESULT hres = S_OK; - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %p, %p)\n", iface, pAdvSink, pdwConnection); @@ -1157,7 +1173,7 @@ IOleObject* iface, DWORD dwConnection) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %ld)\n", iface, dwConnection); @@ -1184,7 +1200,7 @@ IOleObject* iface, IEnumSTATDATA** ppenumAdvise) { - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %p)\n", iface, ppenumAdvise); @@ -1220,7 +1236,7 @@ DWORD* pdwStatus) { HRESULT hres; - _ICOM_THIS_From_IOleObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IOleObject(iface); TRACE("(%p, %lx, %p)\n", iface, dwAspect, pdwStatus); @@ -1262,7 +1278,7 @@ REFIID riid, void** ppvObject) { - _ICOM_THIS_From_IDataObject(DefaultHandler, iface); + DefaultHandler *this = impl_from_IDataObject(iface); return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); } @@ -1275,7 +1291,7 @@ static ULONG WINAPI DefaultHandler_IDataObject_AddRef( IDataObject* iface) [truncated at 1000 lines; 2685 more skipped]
19 years, 2 months
1
0
0
0
[gvg] 17677: Import from vendor drop
by gvg@svn.reactos.com
Import from vendor drop Added: trunk/reactos/lib/objsel/ Deleted: trunk/reactos/lib/objsel/Makefile.in Added: trunk/reactos/lib/objsel/objsel.xml _____ Copied: trunk/reactos/lib/objsel (from rev 17676, vendor/wine/dlls/objsel/current) Property changes on: trunk/reactos/lib/objsel ___________________________________________________________________ Name: svn:ignore + GNUmakefile _____ Deleted: trunk/reactos/lib/objsel/Makefile.in --- vendor/wine/dlls/objsel/current/Makefile.in 2005-09-05 21:44:11 UTC (rev 17676) +++ trunk/reactos/lib/objsel/Makefile.in 2005-09-05 21:47:21 UTC (rev 17677) @@ -1,18 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = objsel.dll -IMPORTS = ole32 oleaut32 user32 advapi32 kernel32 -EXTRALIBS = -lstrmiids -luuid $(LIBUNICODE) - -C_SRCS = \ - factory.c \ - objsel.c \ - regsvr.c - -RC_SRCS = objsel.rc - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Added: trunk/reactos/lib/objsel/objsel.xml --- vendor/wine/dlls/objsel/current/objsel.xml 2005-09-05 21:44:11 UTC (rev 17676) +++ trunk/reactos/lib/objsel/objsel.xml 2005-09-05 21:47:21 UTC (rev 17677) @@ -0,0 +1,22 @@ +<module name="objsel" type="win32dll" baseaddress="${BASEADDRESS_OBJSEL}" installbase="system32" installname="objsel.dll"> + <importlibrary definition="objsel.spec.def" /> + <include base="objsel">.</include> + <include base="ReactOS">include/wine</include> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="__REACTOS__" /> + <define name="__USE_W32API" /> + <library>wine</library> + <library>uuid</library> + <library>ntdll</library> + <library>kernel32</library> + <library>advapi32</library> + <library>user32</library> + <library>ole32</library> + <library>ntdll</library> + <file>factory.c</file> + <file>objsel.c</file> + <file>regsvr.c</file> + <file>objsel.rc</file> + <file>objsel.spec</file> +</module>
19 years, 2 months
1
0
0
0
[gvg] 17676: Delete existing objsel to prepare for vendor import
by gvg@svn.reactos.com
Delete existing objsel to prepare for vendor import Deleted: trunk/reactos/lib/objsel/
19 years, 2 months
1
0
0
0
[gvg] 17675: And now import to the correct directory
by gvg@svn.reactos.com
And now import to the correct directory Deleted: vendor/wine/dlls/objsel/Makefile.in Added: vendor/wine/dlls/objsel/current/ Added: vendor/wine/dlls/objsel/current/Makefile.in Added: vendor/wine/dlls/objsel/current/factory.c Added: vendor/wine/dlls/objsel/current/objsel.c Added: vendor/wine/dlls/objsel/current/objsel.rc Added: vendor/wine/dlls/objsel/current/objsel.spec Added: vendor/wine/dlls/objsel/current/objsel_private.h Added: vendor/wine/dlls/objsel/current/regsvr.c Deleted: vendor/wine/dlls/objsel/factory.c Deleted: vendor/wine/dlls/objsel/objsel.c Deleted: vendor/wine/dlls/objsel/objsel.rc Deleted: vendor/wine/dlls/objsel/objsel.spec Deleted: vendor/wine/dlls/objsel/objsel_private.h Deleted: vendor/wine/dlls/objsel/regsvr.c _____ Deleted: vendor/wine/dlls/objsel/Makefile.in --- vendor/wine/dlls/objsel/Makefile.in 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/Makefile.in 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,18 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = objsel.dll -IMPORTS = ole32 oleaut32 user32 advapi32 kernel32 -EXTRALIBS = -lstrmiids -luuid $(LIBUNICODE) - -C_SRCS = \ - factory.c \ - objsel.c \ - regsvr.c - -RC_SRCS = objsel.rc - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Copied: vendor/wine/dlls/objsel/current/Makefile.in (from rev 17673, vendor/wine/dlls/objsel/Makefile.in) _____ Copied: vendor/wine/dlls/objsel/current/factory.c (from rev 17673, vendor/wine/dlls/objsel/factory.c) _____ Copied: vendor/wine/dlls/objsel/current/objsel.c (from rev 17673, vendor/wine/dlls/objsel/objsel.c) _____ Copied: vendor/wine/dlls/objsel/current/objsel.rc (from rev 17673, vendor/wine/dlls/objsel/objsel.rc) _____ Copied: vendor/wine/dlls/objsel/current/objsel.spec (from rev 17673, vendor/wine/dlls/objsel/objsel.spec) _____ Copied: vendor/wine/dlls/objsel/current/objsel_private.h (from rev 17673, vendor/wine/dlls/objsel/objsel_private.h) _____ Copied: vendor/wine/dlls/objsel/current/regsvr.c (from rev 17673, vendor/wine/dlls/objsel/regsvr.c) _____ Deleted: vendor/wine/dlls/objsel/factory.c --- vendor/wine/dlls/objsel/factory.c 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/factory.c 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,163 +0,0 @@ -/* - * ClassFactory implementation for OBJSEL.dll - * - * Copyright (C) 2002 John K. Hohm - * Copyright (C) 2002 Robert Shearman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "objsel_private.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(objsel); - - -/********************************************************************** - * OBJSEL_IClassFactory_QueryInterface (also IUnknown) - */ -static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); - - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = (LPVOID)iface; - IClassFactory_AddRef(iface); - return S_OK; - } - else if (IsEqualGUID(riid, &IID_IDsObjectPicker)) - { - return IClassFactory_CreateInstance(iface, NULL, riid, ppvObj); - } - - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - - -/********************************************************************** - * OBJSEL_IClassFactory_AddRef (also IUnknown) - */ -static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - ClassFactoryImpl *This = (ClassFactoryImpl *)iface; - ULONG ref; - - TRACE("\n"); - - if (This == NULL) return E_POINTER; - - ref = InterlockedIncrement(&This->ref); - - if (ref == 1) - { - InterlockedIncrement(&dll_refs); - } - - return ref; -} - - -/********************************************************************** - * OBJSEL_IClassFactory_Release (also IUnknown) - */ -static ULONG WINAPI OBJSEL_IClassFactory_Release(LPCLASSFACTORY iface) -{ - ClassFactoryImpl *This = (ClassFactoryImpl *)iface; - ULONG ref; - - TRACE("\n"); - - if (This == NULL) return E_POINTER; - - ref = InterlockedDecrement(&This->ref); - - if (ref == 0) - { - InterlockedDecrement(&dll_refs); - } - - return ref; -} - - -/********************************************************************** - * OBJSEL_IClassFactory_CreateInstance - */ -static HRESULT WINAPI OBJSEL_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); - - if (ppvObj == NULL) return E_POINTER; - - /* Don't support aggregation (Windows doesn't) */ - if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION; - - if (IsEqualGUID(&IID_IDsObjectPicker, riid)) - { - return OBJSEL_IDsObjectPicker_Create(ppvObj); - } - - return CLASS_E_CLASSNOTAVAILABLE; -} - - -/********************************************************************** - * OBJSEL_IClassFactory_LockServer - */ -static HRESULT WINAPI OBJSEL_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - TRACE("\n"); - - if (fLock) - IClassFactory_AddRef(iface); - else - IClassFactory_Release(iface); - return S_OK; -} - - -/********************************************************************** - * IClassFactory_Vtbl - */ -static IClassFactoryVtbl IClassFactory_Vtbl = -{ - OBJSEL_IClassFactory_QueryInterface, - OBJSEL_IClassFactory_AddRef, - OBJSEL_IClassFactory_Release, - OBJSEL_IClassFactory_CreateInstance, - OBJSEL_IClassFactory_LockServer -}; - - -/********************************************************************** - * static ClassFactory instance - */ - -ClassFactoryImpl OBJSEL_ClassFactory = { &IClassFactory_Vtbl, 0 }; _____ Deleted: vendor/wine/dlls/objsel/objsel.c --- vendor/wine/dlls/objsel/objsel.c 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/objsel.c 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,211 +0,0 @@ -/* - * Object Picker Dialog - * - * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "objsel_private.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(objsel); - -LONG dll_refs = 0; -HINSTANCE hInstance; - -/********************************************************************** * - * DllEntryPoint - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - hInstance = hinstDLL; - DisableThreadLibraryCalls(hInstance); - break; - } - return TRUE; -} - - -/********************************************************************** * - * DllGetClassObject (OBJSEL.@) - */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) -{ - TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); - - *ppv = NULL; - - if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker)) - return IClassFactory_QueryInterface((IClassFactory*)&OBJSEL_ClassFactory, iid, ppv); - - FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_gui d(iid)); - return CLASS_E_CLASSNOTAVAILABLE; -} - - -/********************************************************************** * - * DllCanUnloadNow (OBJSEL.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - return dll_refs != 0 ? S_FALSE : S_OK; -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_Destroy (also IUnknown) - */ -static VOID WINAPI OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This) -{ - HeapFree(GetProcessHeap(), - 0, - This); -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_AddRef (also IUnknown) - */ -static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) -{ - IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; - ULONG ref; - - TRACE("\n"); - - if (This == NULL) return E_POINTER; - - ref = InterlockedIncrement(&This->ref); - - if (ref == 1) - { - InterlockedIncrement(&dll_refs); - } - - return ref; -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_Release (also IUnknown) - */ -static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface) -{ - IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; - ULONG ref; - - TRACE("\n"); - - if (This == NULL) return E_POINTER; - - ref = InterlockedDecrement(&This->ref); - - if (ref == 0) - { - InterlockedDecrement(&dll_refs); - OBJSEL_IDsObjectPicker_Destroy(This); - } - - return ref; -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_QueryInterface (also IUnknown) - */ -static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface( - IDsObjectPicker * iface, - REFIID riid, - LPVOID *ppvObj) -{ - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); - - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IDsObjectPicker)) - { - *ppvObj = (LPVOID)iface; - OBJSEL_IDsObjectPicker_AddRef(iface); - return S_OK; - } - - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_Initialize - */ -static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize( - IDsObjectPicker * iface, - PDSOP_INIT_INFO pInitInfo) -{ - FIXME("stub!\n"); - return S_OK; -} - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_InvokeDialog - */ -static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog( - IDsObjectPicker * iface, - HWND hwndParent, - IDataObject** ppdoSelections) -{ - FIXME("stub!\n"); - return S_FALSE; -} - - -/********************************************************************** - * IDsObjectPicker_Vtbl - */ -static IDsObjectPickerVtbl IDsObjectPicker_Vtbl = -{ - OBJSEL_IDsObjectPicker_QueryInterface, - OBJSEL_IDsObjectPicker_AddRef, - OBJSEL_IDsObjectPicker_Release, - OBJSEL_IDsObjectPicker_Initialize, - OBJSEL_IDsObjectPicker_InvokeDialog -}; - - -/********************************************************************** - * OBJSEL_IDsObjectPicker_Create - */ -HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj) -{ - IDsObjectPickerImpl *Instance = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof(IDsObjectPickerImpl)); - if (Instance != NULL) - { - Instance->lpVtbl = &IDsObjectPicker_Vtbl; - OBJSEL_IDsObjectPicker_AddRef((IDsObjectPicker *)Instance); - - *ppvObj = Instance; - return S_OK; - } - else - return E_OUTOFMEMORY; -} _____ Deleted: vendor/wine/dlls/objsel/objsel.rc --- vendor/wine/dlls/objsel/objsel.rc 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/objsel.rc 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,28 +0,0 @@ -/* - * Object Picker Dialog - * - * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "windef.h" -#include "winbase.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -#define WINE_FILENAME_STR "objsel.dll" - -#include "wine/wine_common_ver.rc" _____ Deleted: vendor/wine/dlls/objsel/objsel.spec --- vendor/wine/dlls/objsel/objsel.spec 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/objsel.spec 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,4 +0,0 @@ -@ stdcall -private DllCanUnloadNow() -@ stdcall -private DllGetClassObject(ptr ptr ptr) -@ stdcall -private DllRegisterServer() -@ stdcall -private DllUnregisterServer() _____ Deleted: vendor/wine/dlls/objsel/objsel_private.h --- vendor/wine/dlls/objsel/objsel_private.h 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/objsel_private.h 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,65 +0,0 @@ -/* - * Object Picker Dialog Includes - * - * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#define COBJMACROS -#define COM_NO_WINDOWS_H - -#include "ole2.h" -#include "strmif.h" -#include "olectl.h" -#include "unknwn.h" -#include "objsel.h" -#include "wine/unicode.h" -#include "uuids.h" - -/********************************************************************** - * Dll lifetime tracking declaration for objsel.dll - */ - -extern LONG dll_refs; - -/********************************************************************** - * ClassFactory declaration for objsel.dll - */ -typedef struct -{ - IClassFactoryVtbl *lpVtbl; - LONG ref; -} ClassFactoryImpl; - -typedef struct -{ - IDsObjectPickerVtbl *lpVtbl; - LONG ref; -} IDsObjectPickerImpl; - -HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj); - -extern ClassFactoryImpl OBJSEL_ClassFactory; _____ Deleted: vendor/wine/dlls/objsel/regsvr.c --- vendor/wine/dlls/objsel/regsvr.c 2005-09-05 21:39:59 UTC (rev 17674) +++ vendor/wine/dlls/objsel/regsvr.c 2005-09-05 21:42:33 UTC (rev 17675) @@ -1,567 +0,0 @@ -/* - * self-registerable dll functions for objsel.dll - * - * Copyright (C) 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" - -#include "objbase.h" -#include "unknwn.h" -#include "objsel.h" - -#include "wine/debug.h" - -#include "initguid.h" - -WINE_DEFAULT_DEBUG_CHANNEL(objsel); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/********************************************************************** * - * interface for self-registering - */ -struct regsvr_interface { - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -/** - * @todo: maybe adding typelibs support here - * [Software\\Classes\\CLSID\\{000C1090-0000-0000-C000-000000000046}\\TypeL ib] 1080380217 - * @="{000C1092-0000-0000-C000-000000000046}" - */ -struct regsvr_coclass { - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR iph32; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit, if apartment, iph32 must be set */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/********************************************************************** * - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const iph32_keyname[] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'H', 'a', 'n', 'd', 'l', 'e', 'r', - '3', '2', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/********************************************************************** * - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); - -/********************************************************************** * - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) { - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - wsprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/********************************************************************** * - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) { - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/********************************************************************** * - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) { - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->iph32) { - HKEY iph32_key; - - res = RegCreateKeyExW(clsid_key, iph32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &iph32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(iph32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->iph32, - lstrlenA(list->iph32) + 1); - RegCloseKey(iph32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/********************************************************************** * - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) { - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/********************************************************************** * - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) { - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/********************************************************************** * - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) { - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/********************************************************************** * - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) { - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/********************************************************************** * - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) { - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/********************************************************************** * - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) { - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { [truncated at 1000 lines; 98 more skipped]
19 years, 2 months
1
0
0
0
[hbirr] 17674: Revert my last commit.
by hbirr@svn.reactos.com
Revert my last commit. Modified: trunk/reactos/hal/halx86/generic/dma.c Modified: trunk/reactos/hal/halx86/include/haldma.h _____ Modified: trunk/reactos/hal/halx86/generic/dma.c --- trunk/reactos/hal/halx86/generic/dma.c 2005-09-05 21:37:28 UTC (rev 17673) +++ trunk/reactos/hal/halx86/generic/dma.c 2005-09-05 21:39:59 UTC (rev 17674) @@ -646,7 +646,12 @@ } else { - MapRegisters = BYTES_TO_PAGES(MaximumLength); + /* + * In the equation below the additional map register added by + * the "+1" accounts for the case when a transfer does not start + * at a page-aligned address. + */ + MapRegisters = BYTES_TO_PAGES(MaximumLength) + 1; if (MapRegisters > 16) MapRegisters = 16; } @@ -1461,6 +1466,7 @@ { ULONG CurrentLength; ULONG_PTR CurrentAddress; + ULONG ByteOffset; PVOID VirtualAddress; VirtualAddress = MmGetSystemAddressForMdlSafe(Mdl, HighPagePriority); @@ -1481,11 +1487,15 @@ while (Length > 0) { - CurrentLength = min(PAGE_SIZE, Length); + ByteOffset = BYTE_OFFSET(CurrentAddress); + CurrentLength = PAGE_SIZE - ByteOffset; + if (CurrentLength > Length) + CurrentLength = Length; + if (WriteToDevice) { RtlCopyMemory( - MapRegisterBase->VirtualAddress, + (PVOID)((ULONG_PTR)MapRegisterBase->VirtualAddress + ByteOffset), (PVOID)CurrentAddress, CurrentLength); } @@ -1493,7 +1503,7 @@ { RtlCopyMemory( (PVOID)CurrentAddress, - MapRegisterBase->VirtualAddress, + (PVOID)((ULONG_PTR)MapRegisterBase->VirtualAddress + ByteOffset), CurrentLength); } @@ -1574,7 +1584,7 @@ RealMapRegisterBase = (PMAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG); - if (!WriteToDevice && RealMapRegisterBase->UseMapRegisters) + if (!WriteToDevice) { if ((ULONG_PTR)MapRegisterBase & MAP_BASE_SW_SG) { @@ -1644,6 +1654,7 @@ ULONG ByteOffset; ULONG TransferOffset; ULONG TransferLength; + BOOLEAN UseMapRegisters; PMAP_REGISTER_ENTRY RealMapRegisterBase; PHYSICAL_ADDRESS PhysicalAddress; PHYSICAL_ADDRESS HighestAcceptableAddress; @@ -1743,8 +1754,9 @@ if ((ULONG_PTR)MapRegisterBase & MAP_BASE_SW_SG && TransferLength < *Length) { - RealMapRegisterBase->UseMapRegisters = TRUE; + UseMapRegisters = TRUE; PhysicalAddress = RealMapRegisterBase->PhysicalAddress; + PhysicalAddress.QuadPart += ByteOffset; TransferLength = *Length; RealMapRegisterBase->Counter = ~0; Counter = 0; @@ -1757,7 +1769,7 @@ * the transfer progress. */ - RealMapRegisterBase->UseMapRegisters = FALSE; + UseMapRegisters = FALSE; Counter = RealMapRegisterBase->Counter; RealMapRegisterBase->Counter += BYTES_TO_PAGES(ByteOffset + TransferLength); @@ -1771,8 +1783,9 @@ if (PhysicalAddress.QuadPart + TransferLength > HighestAcceptableAddress.QuadPart) { - RealMapRegisterBase->UseMapRegisters = TRUE; + UseMapRegisters = TRUE; PhysicalAddress = RealMapRegisterBase->PhysicalAddress; + PhysicalAddress.QuadPart += ByteOffset; if ((ULONG_PTR)MapRegisterBase & MAP_BASE_SW_SG) { RealMapRegisterBase->Counter = ~0; @@ -1786,7 +1799,7 @@ * register memory. */ - if (RealMapRegisterBase->UseMapRegisters && WriteToDevice) + if (UseMapRegisters && WriteToDevice) { HalpCopyBufferMap(Mdl, RealMapRegisterBase + Counter, CurrentVa, TransferLength, WriteToDevice); _____ Modified: trunk/reactos/hal/halx86/include/haldma.h --- trunk/reactos/hal/halx86/include/haldma.h 2005-09-05 21:37:28 UTC (rev 17673) +++ trunk/reactos/hal/halx86/include/haldma.h 2005-09-05 21:39:59 UTC (rev 17674) @@ -315,7 +315,6 @@ PVOID VirtualAddress; PHYSICAL_ADDRESS PhysicalAddress; ULONG Counter; - BOOLEAN UseMapRegisters; } MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY; struct _ADAPTER_OBJECT {
19 years, 2 months
1
0
0
0
[gvg] 17673: objsel vendor drop
by gvg@svn.reactos.com
objsel vendor drop Added: vendor/wine/dlls/objsel/ Added: vendor/wine/dlls/objsel/Makefile.in Added: vendor/wine/dlls/objsel/factory.c Added: vendor/wine/dlls/objsel/objsel.c Added: vendor/wine/dlls/objsel/objsel.rc Added: vendor/wine/dlls/objsel/objsel.spec Added: vendor/wine/dlls/objsel/objsel_private.h Added: vendor/wine/dlls/objsel/regsvr.c _____ Added: vendor/wine/dlls/objsel/Makefile.in --- vendor/wine/dlls/objsel/Makefile.in 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/Makefile.in 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,18 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = objsel.dll +IMPORTS = ole32 oleaut32 user32 advapi32 kernel32 +EXTRALIBS = -lstrmiids -luuid $(LIBUNICODE) + +C_SRCS = \ + factory.c \ + objsel.c \ + regsvr.c + +RC_SRCS = objsel.rc + +@MAKE_DLL_RULES@ + +### Dependencies: Property changes on: vendor/wine/dlls/objsel/Makefile.in ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/factory.c --- vendor/wine/dlls/objsel/factory.c 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/factory.c 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,163 @@ +/* + * ClassFactory implementation for OBJSEL.dll + * + * Copyright (C) 2002 John K. Hohm + * Copyright (C) 2002 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "objsel_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(objsel); + + +/********************************************************************** + * OBJSEL_IClassFactory_QueryInterface (also IUnknown) + */ +static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface( + LPCLASSFACTORY iface, + REFIID riid, + LPVOID *ppvObj) +{ + TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + + if (ppvObj == NULL) return E_POINTER; + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IClassFactory)) + { + *ppvObj = (LPVOID)iface; + IClassFactory_AddRef(iface); + return S_OK; + } + else if (IsEqualGUID(riid, &IID_IDsObjectPicker)) + { + return IClassFactory_CreateInstance(iface, NULL, riid, ppvObj); + } + + FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + + +/********************************************************************** + * OBJSEL_IClassFactory_AddRef (also IUnknown) + */ +static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface) +{ + ClassFactoryImpl *This = (ClassFactoryImpl *)iface; + ULONG ref; + + TRACE("\n"); + + if (This == NULL) return E_POINTER; + + ref = InterlockedIncrement(&This->ref); + + if (ref == 1) + { + InterlockedIncrement(&dll_refs); + } + + return ref; +} + + +/********************************************************************** + * OBJSEL_IClassFactory_Release (also IUnknown) + */ +static ULONG WINAPI OBJSEL_IClassFactory_Release(LPCLASSFACTORY iface) +{ + ClassFactoryImpl *This = (ClassFactoryImpl *)iface; + ULONG ref; + + TRACE("\n"); + + if (This == NULL) return E_POINTER; + + ref = InterlockedDecrement(&This->ref); + + if (ref == 0) + { + InterlockedDecrement(&dll_refs); + } + + return ref; +} + + +/********************************************************************** + * OBJSEL_IClassFactory_CreateInstance + */ +static HRESULT WINAPI OBJSEL_IClassFactory_CreateInstance( + LPCLASSFACTORY iface, + LPUNKNOWN pUnkOuter, + REFIID riid, + LPVOID *ppvObj) +{ + TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + + if (ppvObj == NULL) return E_POINTER; + + /* Don't support aggregation (Windows doesn't) */ + if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION; + + if (IsEqualGUID(&IID_IDsObjectPicker, riid)) + { + return OBJSEL_IDsObjectPicker_Create(ppvObj); + } + + return CLASS_E_CLASSNOTAVAILABLE; +} + + +/********************************************************************** + * OBJSEL_IClassFactory_LockServer + */ +static HRESULT WINAPI OBJSEL_IClassFactory_LockServer( + LPCLASSFACTORY iface, + BOOL fLock) +{ + TRACE("\n"); + + if (fLock) + IClassFactory_AddRef(iface); + else + IClassFactory_Release(iface); + return S_OK; +} + + +/********************************************************************** + * IClassFactory_Vtbl + */ +static IClassFactoryVtbl IClassFactory_Vtbl = +{ + OBJSEL_IClassFactory_QueryInterface, + OBJSEL_IClassFactory_AddRef, + OBJSEL_IClassFactory_Release, + OBJSEL_IClassFactory_CreateInstance, + OBJSEL_IClassFactory_LockServer +}; + + +/********************************************************************** + * static ClassFactory instance + */ + +ClassFactoryImpl OBJSEL_ClassFactory = { &IClassFactory_Vtbl, 0 }; Property changes on: vendor/wine/dlls/objsel/factory.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/objsel.c --- vendor/wine/dlls/objsel/objsel.c 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/objsel.c 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,211 @@ +/* + * Object Picker Dialog + * + * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "objsel_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(objsel); + +LONG dll_refs = 0; +HINSTANCE hInstance; + +/********************************************************************** * + * DllEntryPoint + */ +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +{ + switch(fdwReason) + { + case DLL_PROCESS_ATTACH: + hInstance = hinstDLL; + DisableThreadLibraryCalls(hInstance); + break; + } + return TRUE; +} + + +/********************************************************************** * + * DllGetClassObject (OBJSEL.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); + + *ppv = NULL; + + if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker)) + return IClassFactory_QueryInterface((IClassFactory*)&OBJSEL_ClassFactory, iid, ppv); + + FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_gui d(iid)); + return CLASS_E_CLASSNOTAVAILABLE; +} + + +/********************************************************************** * + * DllCanUnloadNow (OBJSEL.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + return dll_refs != 0 ? S_FALSE : S_OK; +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_Destroy (also IUnknown) + */ +static VOID WINAPI OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This) +{ + HeapFree(GetProcessHeap(), + 0, + This); +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_AddRef (also IUnknown) + */ +static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface) +{ + IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; + ULONG ref; + + TRACE("\n"); + + if (This == NULL) return E_POINTER; + + ref = InterlockedIncrement(&This->ref); + + if (ref == 1) + { + InterlockedIncrement(&dll_refs); + } + + return ref; +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_Release (also IUnknown) + */ +static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface) +{ + IDsObjectPickerImpl *This = (IDsObjectPickerImpl *)iface; + ULONG ref; + + TRACE("\n"); + + if (This == NULL) return E_POINTER; + + ref = InterlockedDecrement(&This->ref); + + if (ref == 0) + { + InterlockedDecrement(&dll_refs); + OBJSEL_IDsObjectPicker_Destroy(This); + } + + return ref; +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_QueryInterface (also IUnknown) + */ +static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface( + IDsObjectPicker * iface, + REFIID riid, + LPVOID *ppvObj) +{ + TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + + if (ppvObj == NULL) return E_POINTER; + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IDsObjectPicker)) + { + *ppvObj = (LPVOID)iface; + OBJSEL_IDsObjectPicker_AddRef(iface); + return S_OK; + } + + FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_Initialize + */ +static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize( + IDsObjectPicker * iface, + PDSOP_INIT_INFO pInitInfo) +{ + FIXME("stub!\n"); + return S_OK; +} + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_InvokeDialog + */ +static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog( + IDsObjectPicker * iface, + HWND hwndParent, + IDataObject** ppdoSelections) +{ + FIXME("stub!\n"); + return S_FALSE; +} + + +/********************************************************************** + * IDsObjectPicker_Vtbl + */ +static IDsObjectPickerVtbl IDsObjectPicker_Vtbl = +{ + OBJSEL_IDsObjectPicker_QueryInterface, + OBJSEL_IDsObjectPicker_AddRef, + OBJSEL_IDsObjectPicker_Release, + OBJSEL_IDsObjectPicker_Initialize, + OBJSEL_IDsObjectPicker_InvokeDialog +}; + + +/********************************************************************** + * OBJSEL_IDsObjectPicker_Create + */ +HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj) +{ + IDsObjectPickerImpl *Instance = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(IDsObjectPickerImpl)); + if (Instance != NULL) + { + Instance->lpVtbl = &IDsObjectPicker_Vtbl; + OBJSEL_IDsObjectPicker_AddRef((IDsObjectPicker *)Instance); + + *ppvObj = Instance; + return S_OK; + } + else + return E_OUTOFMEMORY; +} Property changes on: vendor/wine/dlls/objsel/objsel.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/objsel.rc --- vendor/wine/dlls/objsel/objsel.rc 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/objsel.rc 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,28 @@ +/* + * Object Picker Dialog + * + * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "windef.h" +#include "winbase.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define WINE_FILENAME_STR "objsel.dll" + +#include "wine/wine_common_ver.rc" Property changes on: vendor/wine/dlls/objsel/objsel.rc ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/objsel.spec --- vendor/wine/dlls/objsel/objsel.spec 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/objsel.spec 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() Property changes on: vendor/wine/dlls/objsel/objsel.spec ___________________________________________________________________ Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/objsel_private.h --- vendor/wine/dlls/objsel/objsel_private.h 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/objsel_private.h 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,65 @@ +/* + * Object Picker Dialog Includes + * + * Copyright 2005 Thomas Weidenmueller <w3seek(a)reactos.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <string.h> +#include <stdarg.h> +#include <stdio.h> +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#define COBJMACROS +#define COM_NO_WINDOWS_H + +#include "ole2.h" +#include "strmif.h" +#include "olectl.h" +#include "unknwn.h" +#include "objsel.h" +#include "wine/unicode.h" +#include "uuids.h" + +/********************************************************************** + * Dll lifetime tracking declaration for objsel.dll + */ + +extern LONG dll_refs; + +/********************************************************************** + * ClassFactory declaration for objsel.dll + */ +typedef struct +{ + IClassFactoryVtbl *lpVtbl; + LONG ref; +} ClassFactoryImpl; + +typedef struct +{ + IDsObjectPickerVtbl *lpVtbl; + LONG ref; +} IDsObjectPickerImpl; + +HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj); + +extern ClassFactoryImpl OBJSEL_ClassFactory; Property changes on: vendor/wine/dlls/objsel/objsel_private.h ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: vendor/wine/dlls/objsel/regsvr.c --- vendor/wine/dlls/objsel/regsvr.c 2005-09-05 21:34:19 UTC (rev 17672) +++ vendor/wine/dlls/objsel/regsvr.c 2005-09-05 21:37:28 UTC (rev 17673) @@ -0,0 +1,567 @@ +/* + * self-registerable dll functions for objsel.dll + * + * Copyright (C) 2004 Raphael Junqueira + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include <stdarg.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" + +#include "objbase.h" +#include "unknwn.h" +#include "objsel.h" + +#include "wine/debug.h" + +#include "initguid.h" + +WINE_DEFAULT_DEBUG_CHANNEL(objsel); + +/* + * Near the bottom of this file are the exported DllRegisterServer and + * DllUnregisterServer, which make all this worthwhile. + */ + +/********************************************************************** * + * interface for self-registering + */ +struct regsvr_interface { + IID const *iid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + IID const *base_iid; /* can be NULL to omit */ + int num_methods; /* can be <0 to omit */ + CLSID const *ps_clsid; /* can be NULL to omit */ + CLSID const *ps_clsid32; /* can be NULL to omit */ +}; + +static HRESULT register_interfaces(struct regsvr_interface const *list); +static HRESULT unregister_interfaces(struct regsvr_interface const *list); + +/** + * @todo: maybe adding typelibs support here + * [Software\\Classes\\CLSID\\{000C1090-0000-0000-C000-000000000046}\\TypeL ib] 1080380217 + * @="{000C1092-0000-0000-C000-000000000046}" + */ +struct regsvr_coclass { + CLSID const *clsid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + LPCSTR iph32; /* can be NULL to omit */ + LPCSTR ips; /* can be NULL to omit */ + LPCSTR ips32; /* can be NULL to omit */ + LPCSTR ips32_tmodel; /* can be NULL to omit, if apartment, iph32 must be set */ + LPCSTR progid; /* can be NULL to omit */ + LPCSTR viprogid; /* can be NULL to omit */ + LPCSTR progid_extra; /* can be NULL to omit */ +}; + +static HRESULT register_coclasses(struct regsvr_coclass const *list); +static HRESULT unregister_coclasses(struct regsvr_coclass const *list); + +/********************************************************************** * + * static string constants + */ +static WCHAR const interface_keyname[10] = { + 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; +static WCHAR const base_ifa_keyname[14] = { + 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', + 'e', 0 }; +static WCHAR const num_methods_keyname[11] = { + 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; +static WCHAR const ps_clsid_keyname[15] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', 0 }; +static WCHAR const ps_clsid32_keyname[17] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', '3', '2', 0 }; +static WCHAR const clsid_keyname[6] = { + 'C', 'L', 'S', 'I', 'D', 0 }; +static WCHAR const curver_keyname[7] = { + 'C', 'u', 'r', 'V', 'e', 'r', 0 }; +static WCHAR const iph32_keyname[] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'H', 'a', 'n', 'd', 'l', 'e', 'r', + '3', '2', 0 }; +static WCHAR const ips_keyname[13] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + 0 }; +static WCHAR const ips32_keyname[15] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + '3', '2', 0 }; +static WCHAR const progid_keyname[7] = { + 'P', 'r', 'o', 'g', 'I', 'D', 0 }; +static WCHAR const viprogid_keyname[25] = { + 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', + 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', + 0 }; +static char const tmodel_valuename[] = "ThreadingModel"; + +/********************************************************************** * + * static helper functions + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); +static LONG register_key_defvalueW(HKEY base, WCHAR const *name, + WCHAR const *value); +static LONG register_key_defvalueA(HKEY base, WCHAR const *name, + char const *value); +static LONG register_progid(WCHAR const *clsid, + char const *progid, char const *curver_progid, + char const *name, char const *extra); +static LONG recursive_delete_key(HKEY key); +static LONG recursive_delete_keyA(HKEY base, char const *name); +static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); + +/********************************************************************** * + * register_interfaces + */ +static HRESULT register_interfaces(struct regsvr_interface const *list) { + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + HKEY iid_key; + + StringFromGUID2(list->iid, buf, 39); + res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_interface_key; + + if (list->name) { + res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->base_iid) { + register_key_guid(iid_key, base_ifa_keyname, list->base_iid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (0 <= list->num_methods) { + static WCHAR const fmt[3] = { '%', 'd', 0 }; + HKEY key; + + res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + + wsprintfW(buf, fmt, list->num_methods); + res = RegSetValueExW(key, NULL, 0, REG_SZ, + (CONST BYTE*)buf, + (lstrlenW(buf) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid) { + register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid32) { + register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + error_close_iid_key: + RegCloseKey(iid_key); + } + +error_close_interface_key: + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/********************************************************************** * + * unregister_interfaces + */ +static HRESULT unregister_interfaces(struct regsvr_interface const *list) { + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, + KEY_READ | KEY_WRITE, &interface_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->iid, buf, 39); + res = recursive_delete_keyW(interface_key, buf); + } + + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/********************************************************************** * + * register_coclasses + */ +static HRESULT register_coclasses(struct regsvr_coclass const *list) { + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + HKEY clsid_key; + + StringFromGUID2(list->clsid, buf, 39); + res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->name) { + res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->iph32) { + HKEY iph32_key; + + res = RegCreateKeyExW(clsid_key, iph32_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &iph32_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegSetValueExA(iph32_key, NULL, 0, REG_SZ, + (CONST BYTE*)list->iph32, + lstrlenA(list->iph32) + 1); + RegCloseKey(iph32_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips) { + res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips32) { + HKEY ips32_key; + + res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &ips32_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, + (CONST BYTE*)list->ips32, + lstrlenA(list->ips32) + 1); + if (res == ERROR_SUCCESS && list->ips32_tmodel) + res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, + (CONST BYTE*)list->ips32_tmodel, + strlen(list->ips32_tmodel) + 1); + RegCloseKey(ips32_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->progid) { + res = register_key_defvalueA(clsid_key, progid_keyname, + list->progid); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = register_progid(buf, list->progid, NULL, + list->name, list->progid_extra); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->viprogid) { + res = register_key_defvalueA(clsid_key, viprogid_keyname, + list->viprogid); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = register_progid(buf, list->viprogid, list->progid, + list->name, list->progid_extra); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + error_close_clsid_key: + RegCloseKey(clsid_key); + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/********************************************************************** * + * unregister_coclasses + */ +static HRESULT unregister_coclasses(struct regsvr_coclass const *list) { + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, + KEY_READ | KEY_WRITE, &coclass_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->clsid, buf, 39); + res = recursive_delete_keyW(coclass_key, buf); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->progid) { + res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + } + + if (list->viprogid) { + res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + } + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/********************************************************************** * + * regsvr_key_guid + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) { + WCHAR buf[39]; + + StringFromGUID2(guid, buf, 39); + return register_key_defvalueW(base, name, buf); +} + +/********************************************************************** * + * regsvr_key_defvalueW + */ +static LONG register_key_defvalueW( + HKEY base, + WCHAR const *name, + WCHAR const *value) { + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + (lstrlenW(value) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + return res; +} + +/********************************************************************** * + * regsvr_key_defvalueA + */ +static LONG register_key_defvalueA( + HKEY base, + WCHAR const *name, + char const *value) { + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + lstrlenA(value) + 1); + RegCloseKey(key); + return res; +} + +/********************************************************************** * + * regsvr_progid + */ +static LONG register_progid( + WCHAR const *clsid, + char const *progid, + char const *curver_progid, + char const *name, + char const *extra) { + LONG res; + HKEY progid_key; + + res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, + NULL, 0, KEY_READ | KEY_WRITE, NULL, + &progid_key, NULL); + if (res != ERROR_SUCCESS) return res; + + if (name) { + res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, + (CONST BYTE*)name, strlen(name) + 1); + if (res != ERROR_SUCCESS) goto error_close_progid_key; + } + + if (clsid) { + res = register_key_defvalueW(progid_key, clsid_keyname, clsid); + if (res != ERROR_SUCCESS) goto error_close_progid_key; + } + + if (curver_progid) { + res = register_key_defvalueA(progid_key, curver_keyname, + curver_progid); + if (res != ERROR_SUCCESS) goto error_close_progid_key; + } + + if (extra) { + HKEY extra_key; [truncated at 1000 lines; 131 more skipped]
19 years, 2 months
1
0
0
0
[gvg] 17672: Sync to Wine-20050830:
by gvg@svn.reactos.com
Sync to Wine-20050830: Francois Gouget <fgouget(a)free.fr> - Change some Dll* functions so they are exported by name like on Windows. Update the documentation accordingly. Johan Dahlin <jdahlin(a)async.com.br> - Implemented MsiSetComponentState*. - Added stubs for MsiSetComponentStateA and MsiSetComponentStateW. - Added a null check for component. Alexandre Julliard <julliard(a)winehq.org> - Don't prefix the functions DllCanUnloadNow, DllGetClassObject and Dll(Un)RegisterServer with the dll name so that the compiler can check the prototypes. Vincent Beron <vberon(a)mecano.gme.usherb.ca> - Correct mismatches between spec files and comments about export number. Aric Stewart <aric(a)codeweavers.com> - Display the correct text string in the action text field for the dialog boxes. Also the string should be deformatted. - Make index INT not UINT because it can be -1. - Fixed a memory overflow and leak identified by Mike McCormack. - Add some body to ResolveSource because it is possible to need it when an install is begun but the media is not in the drive, such as in install-on-demand cases. - The file name used in the ui messages is the target name not the source name. Yuri Kozlov <kozlov.y(a)gmail.com> - Remove duplicate declaration of MSI_SetPropertyW. Mike McCormack <mike(a)codeweavers.com> - Handle loading strings over 64k from the string table. - build a standard Wine list of folders instead of using an array - use folder pointers instead of array indexes - build a standard Wine list of files instead of using an array - use file pointers instead of array indexes - build a standard Wine list of features instead of using an array - use feature pointers instead of array indexes - build a standard Wine list of components instead of using an array - use component pointers instead of array indexes - Store the component information in a standard Wine list. - Add include guard to header and make functions extern. - build a standard Wine list of extensions instead of using an array - use extension pointers instead of array indexes - build a standard Wine list of appids instead of using an array - use appid pointers instead of array indexes - build a standard Wine list of mime types instead of using an array - use mime type pointers instead of array indexes - Add the allocated mime type to the mime type list. - build a standard Wine list of classes instead of using an array - use class pointers instead of array indexes - Fix a small bug introduced when converting appids to a list. - Implement MsiModifyView (MSIMODIFY_INSERT_TEMPORARY). - Better stub for MsiViewGetError. - Don't dereference variables in a trace. - the combination of all table keys must be unique, not each key - MsiViewExecute may not be called before MsiModifyView - Make sure to save the result calculated in ACTION_UpdateInstallStates. Steven Edwards <steven_ed4153(a)yahoo.com> - Add real stub for MsiConfigureFeatureW. Modified: trunk/reactos/lib/msi/action.c Modified: trunk/reactos/lib/msi/action.h Modified: trunk/reactos/lib/msi/classes.c Modified: trunk/reactos/lib/msi/create.c Modified: trunk/reactos/lib/msi/custom.c Modified: trunk/reactos/lib/msi/delete.c Modified: trunk/reactos/lib/msi/events.c Modified: trunk/reactos/lib/msi/files.c Modified: trunk/reactos/lib/msi/format.c Modified: trunk/reactos/lib/msi/helpers.c Modified: trunk/reactos/lib/msi/insert.c Modified: trunk/reactos/lib/msi/install.c Modified: trunk/reactos/lib/msi/msi.c Modified: trunk/reactos/lib/msi/msi.spec Modified: trunk/reactos/lib/msi/msipriv.h Modified: trunk/reactos/lib/msi/msiquery.c Modified: trunk/reactos/lib/msi/package.c Modified: trunk/reactos/lib/msi/regsvr.c Modified: trunk/reactos/lib/msi/select.c Modified: trunk/reactos/lib/msi/table.c Modified: trunk/reactos/w32api/include/msi.h Modified: trunk/reactos/w32api/include/msiquery.h _____ Modified: trunk/reactos/lib/msi/action.c --- trunk/reactos/lib/msi/action.c 2005-09-05 21:19:23 UTC (rev 17671) +++ trunk/reactos/lib/msi/action.c 2005-09-05 21:34:19 UTC (rev 17672) @@ -379,6 +379,7 @@ WCHAR timet[0x100]; MSIRECORD * row = 0; LPCWSTR ActionText; + LPWSTR deformated; GetTimeFormatW(LOCALE_USER_DEFAULT, 0, NULL, format, timet, 0x100); @@ -387,8 +388,10 @@ return; ActionText = MSI_RecordGetString(row,2); + deformat_string(package, ActionText, &deformated); - sprintfW(message,template_s,timet,action,ActionText); + sprintfW(message,template_s,timet,action,deformated); + ce_actiontext(package, deformated); msiobj_release(&row->hdr); row = MSI_CreateRecord(1); @@ -396,6 +399,7 @@ MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, row); msiobj_release(&row->hdr); + HeapFree(GetProcessHeap(),0,deformated); } static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, @@ -799,7 +803,6 @@ { if (strcmpW(StandardActions[i].action, action)==0) { - ce_actiontext(package, action); if (!run) { ui_actioninfo(package, action, TRUE, 0); @@ -965,71 +968,80 @@ return rc; } -static int load_component(MSIPACKAGE* package, MSIRECORD * row) +static MSICOMPONENT* load_component( MSIRECORD * row ) { - int index = package->loaded_components; + MSICOMPONENT *comp; DWORD sz; + comp = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MSICOMPONENT) ); + if (!comp) + return comp; + /* fill in the data */ - - package->loaded_components++; - if (package->loaded_components == 1) - package->components = HeapAlloc(GetProcessHeap(),0, - sizeof(MSICOMPONENT)); - else - package->components = HeapReAlloc(GetProcessHeap(),0, - package->components, package->loaded_components * - sizeof(MSICOMPONENT)); - - memset(&package->components[index],0,sizeof(MSICOMPONENT)); - sz = IDENTIFIER_SIZE; - MSI_RecordGetStringW(row,1,package->components[index].Component,&sz); + MSI_RecordGetStringW(row,1,comp->Component,&sz); TRACE("Loading Component %s\n", - debugstr_w(package->components[index].Component)); + debugstr_w(comp->Component)); sz = 0x100; if (!MSI_RecordIsNull(row,2)) - MSI_RecordGetStringW(row,2,package->components[index].ComponentId,&sz); + MSI_RecordGetStringW(row,2,comp->ComponentId,&sz); sz = IDENTIFIER_SIZE; - MSI_RecordGetStringW(row,3,package->components[index].Directory,&sz); + MSI_RecordGetStringW(row,3,comp->Directory,&sz); - package->components[index].Attributes = MSI_RecordGetInteger(row,4); + comp->Attributes = MSI_RecordGetInteger(row,4); sz = 0x100; - MSI_RecordGetStringW(row,5,package->components[index].Condition,&sz); + MSI_RecordGetStringW(row,5,comp->Condition,&sz); sz = IDENTIFIER_SIZE; - MSI_RecordGetStringW(row,6,package->components[index].KeyPath,&sz); + MSI_RecordGetStringW(row,6,comp->KeyPath,&sz); - package->components[index].Installed = INSTALLSTATE_ABSENT; - package->components[index].Action = INSTALLSTATE_UNKNOWN; - package->components[index].ActionRequest = INSTALLSTATE_UNKNOWN; + comp->Installed = INSTALLSTATE_ABSENT; + comp->Action = INSTALLSTATE_UNKNOWN; + comp->ActionRequest = INSTALLSTATE_UNKNOWN; - package->components[index].Enabled = TRUE; + comp->Enabled = TRUE; - return index; + return comp; } typedef struct { MSIPACKAGE *package; - INT index; - INT cnt; + MSIFEATURE *feature; } _ilfs; -static UINT iterate_component_check(MSIRECORD *row, LPVOID param) +static UINT add_feature_component( MSIFEATURE *feature, MSICOMPONENT *comp ) { + ComponentList *cl; + + cl = HeapAlloc( GetProcessHeap(), 0, sizeof (*cl) ); + if ( !cl ) + return ERROR_NOT_ENOUGH_MEMORY; + cl->component = comp; + list_add_tail( &feature->Components, &cl->entry ); + + return ERROR_SUCCESS; +} + +static UINT iterate_component_check( MSIRECORD *row, LPVOID param ) +{ _ilfs* ilfs= (_ilfs*)param; - INT c_indx; + MSIPACKAGE *package = ilfs->package; + MSIFEATURE *feature = ilfs->feature; + MSICOMPONENT *comp; - c_indx = load_component(ilfs->package,row); + comp = load_component( row ); + if (!comp) + return ERROR_FUNCTION_FAILED; - ilfs->package->features[ilfs->index].Components[ilfs->cnt] = c_indx; - ilfs->package->features[ilfs->index].ComponentCount ++; - TRACE("Loaded new component to index %i\n",c_indx); + list_add_tail( &package->components, &comp->entry ); + add_feature_component( feature, comp ); + TRACE("Loaded new component %p\n", comp); + return ERROR_SUCCESS; } @@ -1038,8 +1050,7 @@ _ilfs* ilfs= (_ilfs*)param; LPCWSTR component; DWORD rc; - INT c_indx; - INT cnt = ilfs->package->features[ilfs->index].ComponentCount; + MSICOMPONENT *comp; MSIQUERY * view; static const WCHAR Query[] = {'S','E','L','E','C','T',' ','*',' ','F','R', 'O','M',' ', @@ -1051,13 +1062,11 @@ component = MSI_RecordGetString(row,1); /* check to see if the component is already loaded */ - c_indx = get_loaded_component(ilfs->package,component); - if (c_indx != -1) + comp = get_loaded_component( ilfs->package, component ); + if (comp) { - TRACE("Component %s already loaded at %i\n", debugstr_w(component), - c_indx); - ilfs->package->features[ilfs->index].Components[cnt] = c_indx; - ilfs->package->features[ilfs->index].ComponentCount ++; + TRACE("Component %s already loaded\n", debugstr_w(component) ); + add_feature_component( ilfs->feature, comp ); return ERROR_SUCCESS; } @@ -1065,7 +1074,6 @@ if (rc != ERROR_SUCCESS) return ERROR_SUCCESS; - ilfs->cnt = cnt; rc = MSI_IterateRecords(view, NULL, iterate_component_check, ilfs); msiobj_release( &view->hdr ); @@ -1075,7 +1083,7 @@ static UINT load_feature(MSIRECORD * row, LPVOID param) { MSIPACKAGE* package = (MSIPACKAGE*)param; - int index = package->loaded_features; + MSIFEATURE* feature; DWORD sz; static const WCHAR Query1[] = {'S','E','L','E','C','T',' ', @@ -1088,59 +1096,57 @@ UINT rc; _ilfs ilfs; - ilfs.package = package; - ilfs.index = index; - /* fill in the data */ - package->loaded_features ++; - if (package->loaded_features == 1) - package->features = HeapAlloc(GetProcessHeap(),0,sizeof(MSIFEATURE)); - else - package->features = HeapReAlloc(GetProcessHeap(),0,package->features, - package->loaded_features * sizeof(MSIFEATURE)); + feature = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (MSIFEATURE) ); + if (!feature) + return ERROR_NOT_ENOUGH_MEMORY; - memset(&package->features[index],0,sizeof(MSIFEATURE)); + list_init( &feature->Components ); sz = IDENTIFIER_SIZE; - MSI_RecordGetStringW(row,1,package->features[index].Feature,&sz); + MSI_RecordGetStringW(row,1,feature->Feature,&sz); - TRACE("Loading feature %s\n",debugstr_w(package->features[index].Feature)); + TRACE("Loading feature %s\n",debugstr_w(feature->Feature)); sz = IDENTIFIER_SIZE; if (!MSI_RecordIsNull(row,2)) - MSI_RecordGetStringW(row,2,package->features[index].Feature_Parent,&sz); + MSI_RecordGetStringW(row,2,feature->Feature_Parent,&sz); sz = 0x100; - if (!MSI_RecordIsNull(row,3)) - MSI_RecordGetStringW(row,3,package->features[index].Title,&sz); + if (!MSI_RecordIsNull(row,3)) + MSI_RecordGetStringW(row,3,feature->Title,&sz); - sz = 0x100; - if (!MSI_RecordIsNull(row,4)) - MSI_RecordGetStringW(row,4,package->features[index].Description,&sz); + sz = 0x100; + if (!MSI_RecordIsNull(row,4)) + MSI_RecordGetStringW(row,4,feature->Description,&sz); if (!MSI_RecordIsNull(row,5)) - package->features[index].Display = MSI_RecordGetInteger(row,5); + feature->Display = MSI_RecordGetInteger(row,5); - package->features[index].Level= MSI_RecordGetInteger(row,6); + feature->Level= MSI_RecordGetInteger(row,6); - sz = IDENTIFIER_SIZE; - if (!MSI_RecordIsNull(row,7)) - MSI_RecordGetStringW(row,7,package->features[index].Directory,&sz); + sz = IDENTIFIER_SIZE; + if (!MSI_RecordIsNull(row,7)) + MSI_RecordGetStringW(row,7,feature->Directory,&sz); - package->features[index].Attributes= MSI_RecordGetInteger(row,8); + feature->Attributes = MSI_RecordGetInteger(row,8); - package->features[index].Installed = INSTALLSTATE_ABSENT; - package->features[index].Action = INSTALLSTATE_UNKNOWN; - package->features[index].ActionRequest = INSTALLSTATE_UNKNOWN; + feature->Installed = INSTALLSTATE_ABSENT; + feature->Action = INSTALLSTATE_UNKNOWN; + feature->ActionRequest = INSTALLSTATE_UNKNOWN; + list_add_tail( &package->features, &feature->entry ); + /* load feature components */ - rc = MSI_OpenQuery(package->db, &view, Query1, - package->features[index].Feature); + rc = MSI_OpenQuery( package->db, &view, Query1, feature->Feature ); if (rc != ERROR_SUCCESS) return ERROR_SUCCESS; + ilfs.package = package; + ilfs.feature = feature; + MSI_IterateRecords(view, NULL, iterate_load_featurecomponents , &ilfs); msiobj_release(&view->hdr); @@ -1150,45 +1156,41 @@ static UINT load_file(MSIRECORD *row, LPVOID param) { MSIPACKAGE* package = (MSIPACKAGE*)param; - DWORD index = package->loaded_files; LPCWSTR component; + MSIFILE *file; /* fill in the data */ - package->loaded_files++; - if (package->loaded_files== 1) - package->files = HeapAlloc(GetProcessHeap(),0,sizeof(MSIFILE)); - else - package->files = HeapReAlloc(GetProcessHeap(),0, - package->files , package->loaded_files * sizeof(MSIFILE)); - - memset(&package->files[index],0,sizeof(MSIFILE)); + file = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (MSIFILE) ); + if (!file) + return ERROR_NOT_ENOUGH_MEMORY; - package->files[index].File = load_dynamic_stringW(row, 1); + file->File = load_dynamic_stringW( row, 1 ); - component = MSI_RecordGetString(row, 2); - package->files[index].ComponentIndex = get_loaded_component(package, - component); + component = MSI_RecordGetString( row, 2 ); + file->Component = get_loaded_component( package, component ); - if (package->files[index].ComponentIndex == -1) + if (!file->Component) ERR("Unfound Component %s\n",debugstr_w(component)); - package->files[index].FileName = load_dynamic_stringW(row,3); - reduce_to_longfilename(package->files[index].FileName); + file->FileName = load_dynamic_stringW( row, 3 ); + reduce_to_longfilename( file->FileName ); - package->files[index].ShortName = load_dynamic_stringW(row,3); - reduce_to_shortfilename(package->files[index].ShortName); + file->ShortName = load_dynamic_stringW( row, 3 ); + reduce_to_shortfilename( file->ShortName ); - package->files[index].FileSize = MSI_RecordGetInteger(row,4); - package->files[index].Version = load_dynamic_stringW(row, 5); - package->files[index].Language = load_dynamic_stringW(row, 6); - package->files[index].Attributes= MSI_RecordGetInteger(row,7); - package->files[index].Sequence= MSI_RecordGetInteger(row,8); + file->FileSize = MSI_RecordGetInteger( row, 4 ); + file->Version = load_dynamic_stringW( row, 5 ); + file->Language = load_dynamic_stringW( row, 6 ); + file->Attributes = MSI_RecordGetInteger( row, 7 ); + file->Sequence = MSI_RecordGetInteger( row, 8 ); - package->files[index].Temporary = FALSE; - package->files[index].State = 0; + file->Temporary = FALSE; + file->State = 0; - TRACE("File Loaded (%s)\n",debugstr_w(package->files[index].File)); + TRACE("File Loaded (%s)\n",debugstr_w(file->File)); + + list_add_tail( &package->files, &file->entry ); return ERROR_SUCCESS; } @@ -1292,7 +1294,7 @@ } -static INT load_folder(MSIPACKAGE *package, const WCHAR* dir) +static MSIFOLDER *load_folder( MSIPACKAGE *package, LPCWSTR dir ) { static const WCHAR Query[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', @@ -1304,38 +1306,25 @@ LPCWSTR parent; LPWSTR shortname = NULL; MSIRECORD * row = 0; - INT index = -1; - DWORD i; + MSIFOLDER *folder; TRACE("Looking for dir %s\n",debugstr_w(dir)); - for (i = 0; i < package->loaded_folders; i++) - { - if (strcmpW(package->folders[i].Directory,dir)==0) - { - TRACE(" %s retuning on index %lu\n",debugstr_w(dir),i); - return i; - } - } + folder = get_loaded_folder( package, dir ); + if (folder) + return folder; TRACE("Working to load %s\n",debugstr_w(dir)); - index = package->loaded_folders++; - if (package->loaded_folders==1) - package->folders = HeapAlloc(GetProcessHeap(),0, - sizeof(MSIFOLDER)); - else - package->folders= HeapReAlloc(GetProcessHeap(),0, - package->folders, package->loaded_folders* - sizeof(MSIFOLDER)); + folder = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (MSIFOLDER) ); + if (!folder) + return NULL; - memset(&package->folders[index],0,sizeof(MSIFOLDER)); + folder->Directory = strdupW(dir); - package->folders[index].Directory = strdupW(dir); - row = MSI_QueryGetRecord(package->db, Query, dir); if (!row) - return -1; + return NULL; ptargetdir = targetdir = load_dynamic_stringW(row,3); @@ -1371,73 +1360,78 @@ if (targetdir) { TRACE(" TargetDefault = %s\n",debugstr_w(targetdir)); - HeapFree(GetProcessHeap(),0, package->folders[index].TargetDefault); - package->folders[index].TargetDefault = strdupW(targetdir); + HeapFree(GetProcessHeap(),0, folder->TargetDefault); + folder->TargetDefault = strdupW(targetdir); } if (srcdir) - package->folders[index].SourceDefault = strdupW(srcdir); + folder->SourceDefault = strdupW(srcdir); else if (shortname) - package->folders[index].SourceDefault = strdupW(shortname); + folder->SourceDefault = strdupW(shortname); else if (targetdir) - package->folders[index].SourceDefault = strdupW(targetdir); + folder->SourceDefault = strdupW(targetdir); HeapFree(GetProcessHeap(), 0, ptargetdir); - TRACE(" SourceDefault = %s\n",debugstr_w(package->folders[index].SourceDefault)); + TRACE(" SourceDefault = %s\n", debugstr_w( folder->SourceDefault )); parent = MSI_RecordGetString(row,2); if (parent) { - i = load_folder(package,parent); - package->folders[index].ParentIndex = i; - TRACE("Parent is index %i... %s %s\n", - package->folders[index].ParentIndex, - debugstr_w(package->folders[package->folders[index].ParentIndex].Directo ry), - debugstr_w(parent)); + folder->Parent = load_folder( package, parent ); + if ( folder->Parent ) + TRACE("loaded parent %p %s\n", folder->Parent, + debugstr_w(folder->Parent->Directory)); + else + ERR("failed to load parent folder %s\n", debugstr_w(parent)); } - else - package->folders[index].ParentIndex = -2; - package->folders[index].Property = load_dynamic_property(package, dir,NULL); + folder->Property = load_dynamic_property( package, dir, NULL ); msiobj_release(&row->hdr); - TRACE(" %s retuning on index %i\n",debugstr_w(dir),index); - return index; + + list_add_tail( &package->folders, &folder->entry ); + + TRACE("%s returning %p\n",debugstr_w(dir),folder); + + return folder; } /* scan for and update current install states */ static void ACTION_UpdateInstallStates(MSIPACKAGE *package) { - int i; + MSICOMPONENT *comp; + MSIFEATURE *feature; - for (i = 0; i < package->loaded_components; i++) + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) { INSTALLSTATE res; - res = MsiGetComponentPathW(package->ProductCode, - package->components[i].ComponentId , NULL, NULL); + res = MsiGetComponentPathW( package->ProductCode, + comp->ComponentId, NULL, NULL); if (res < 0) res = INSTALLSTATE_ABSENT; - package->components[i].Installed = res; + comp->Installed = res; } - for (i = 0; i < package->loaded_features; i++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { + ComponentList *cl; INSTALLSTATE res = -10; - int j; - for (j = 0; j < package->features[i].ComponentCount; j++) + + LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) { - MSICOMPONENT* component = &package->components[package->features[i]. - Components[j]]; + comp= cl->component; + if (res == -10) - res = component->Installed; + res = comp->Installed; else { - if (res == component->Installed) + if (res == comp->Installed) continue; - if (res != component->Installed) + if (res != comp->Installed) res = INSTALLSTATE_INCOMPLETE; } } + feature->Installed = res; } } @@ -1446,19 +1440,19 @@ { static const WCHAR all[]={'A','L','L',0}; LPWSTR override = NULL; - INT i; BOOL rc = FALSE; + MSIFEATURE *feature; override = load_dynamic_property(package, property, NULL); if (override) { rc = TRUE; - for(i = 0; i < package->loaded_features; i++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { if (strcmpiW(override,all)==0) { - package->features[i].ActionRequest= state; - package->features[i].Action = state; + feature->ActionRequest= state; + feature->Action = state; } else { @@ -1468,12 +1462,11 @@ while (ptr) { if ((ptr2 && - strncmpW(ptr,package->features[i].Feature, ptr2-ptr)==0) - || (!ptr2 && - strcmpW(ptr,package->features[i].Feature)==0)) + strncmpW(ptr,feature->Feature, ptr2-ptr)==0) + || (!ptr2 && strcmpW(ptr,feature->Feature)==0)) { - package->features[i].ActionRequest= state; - package->features[i].Action = state; + feature->ActionRequest= state; + feature->Action = state; break; } if (ptr2) @@ -1496,8 +1489,6 @@ { LPWSTR level; INT install_level; - DWORD i; - INT j; static const WCHAR szlevel[] = {'I','N','S','T','A','L','L','L','E','V','E','L',0}; static const WCHAR szAddLocal[] = @@ -1505,7 +1496,10 @@ static const WCHAR szRemove[] = {'R','E','M','O','V','E',0}; BOOL override = FALSE; + MSICOMPONENT* component; + MSIFEATURE *feature; + /* I do not know if this is where it should happen.. but */ TRACE("Checking Install Level\n"); @@ -1546,30 +1540,27 @@ if (!override) { - for(i = 0; i < package->loaded_features; i++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - BOOL feature_state = ((package->features[i].Level > 0) && - (package->features[i].Level <= install_level)); + BOOL feature_state = ((feature->Level > 0) && + (feature->Level <= install_level)); - if ((feature_state) && - (package->features[i].Action == INSTALLSTATE_UNKNOWN)) + if ((feature_state) && (feature->Action == INSTALLSTATE_UNKNOWN)) { - if (package->features[i].Attributes & - msidbFeatureAttributesFavorSource) + if (feature->Attributes & msidbFeatureAttributesFavorSource) { - package->features[i].ActionRequest = INSTALLSTATE_SOURCE; - package->features[i].Action = INSTALLSTATE_SOURCE; + feature->ActionRequest = INSTALLSTATE_SOURCE; + feature->Action = INSTALLSTATE_SOURCE; } - else if (package->features[i].Attributes & - msidbFeatureAttributesFavorAdvertise) + else if (feature->Attributes & msidbFeatureAttributesFavorAdvertise) { - package->features[i].ActionRequest =INSTALLSTATE_ADVERTISED; - package->features[i].Action =INSTALLSTATE_ADVERTISED; + feature->ActionRequest = INSTALLSTATE_ADVERTISED; + feature->Action = INSTALLSTATE_ADVERTISED; } else { - package->features[i].ActionRequest = INSTALLSTATE_LOCAL; - package->features[i].Action = INSTALLSTATE_LOCAL; + feature->ActionRequest = INSTALLSTATE_LOCAL; + feature->Action = INSTALLSTATE_LOCAL; } } } @@ -1587,17 +1578,17 @@ * now we want to enable or disable components base on feature */ - for(i = 0; i < package->loaded_features; i++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - MSIFEATURE* feature = &package->features[i]; + ComponentList *cl; + TRACE("Examining Feature %s (Installed %i, Action %i, Request %i)\n", debugstr_w(feature->Feature), feature->Installed, feature->Action, feature->ActionRequest); - for( j = 0; j < feature->ComponentCount; j++) + LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) { - MSICOMPONENT* component = &package->components[ - feature->Components[j]]; + component = cl->component; if (!component->Enabled) { @@ -1644,10 +1635,8 @@ } } - for(i = 0; i < package->loaded_components; i++) + LIST_FOR_EACH_ENTRY( component, &package->components, MSICOMPONENT, entry ) { - MSICOMPONENT* component= &package->components[i]; - TRACE("Result: Component %s (Installed %i, Action %i, Request %i)\n", debugstr_w(component->Component), component->Installed, component->Action, component->ActionRequest); @@ -1678,14 +1667,14 @@ static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param) { MSIPACKAGE *package = (MSIPACKAGE*)param; - LPCWSTR Feature; - int feature_index; + LPCWSTR name; + MSIFEATURE *feature; - Feature = MSI_RecordGetString(row,1); + name = MSI_RecordGetString( row, 1 ); - feature_index = get_loaded_feature(package,Feature); - if (feature_index < 0) - ERR("FAILED to find loaded feature %s\n",debugstr_w(Feature)); + feature = get_loaded_feature( package, name ); + if (!feature) + ERR("FAILED to find loaded feature %s\n",debugstr_w(name)); else { LPCWSTR Condition; @@ -1694,9 +1683,8 @@ if (MSI_EvaluateConditionW(package,Condition) == MSICONDITION_TRUE) { int level = MSI_RecordGetInteger(row,2); - TRACE("Reseting feature %s to level %i\n", debugstr_w(Feature), - level); - package->features[feature_index].Level = level; + TRACE("Reseting feature %s to level %i\n", debugstr_w(name), level); + feature->Level = level; } } return ERROR_SUCCESS; @@ -1722,9 +1710,10 @@ static const WCHAR szlevel[] = {'I','N','S','T','A','L','L','L','E','V','E','L',0}; static const WCHAR szOne[] = { '1', 0 }; + MSICOMPONENT *comp; + MSIFILE *file; UINT rc; MSIQUERY * view; - DWORD i; LPWSTR level; DWORD sz = 3; WCHAR buffer[3]; @@ -1743,16 +1732,13 @@ msiobj_release(&view->hdr); } - TRACE("File calculations %i files\n",package->loaded_files); + TRACE("File calculations\n"); - for (i = 0; i < package->loaded_files; i++) + LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry ) { MSICOMPONENT* comp = NULL; - MSIFILE* file= NULL; - file = &package->files[i]; - if (file->ComponentIndex >= 0) - comp = &package->components[file->ComponentIndex]; + comp = file->Component; if (file->Temporary == TRUE) continue; @@ -1838,16 +1824,15 @@ } TRACE("Enabling or Disabling Components\n"); - for (i = 0; i < package->loaded_components; i++) + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) { - if (package->components[i].Condition[0]) + if (comp->Condition[0]) { if (MSI_EvaluateConditionW(package, - package->components[i].Condition) == MSICONDITION_FALSE) + comp->Condition) == MSICONDITION_FALSE) { - TRACE("Disabling component %s\n", - debugstr_w(package->components[i].Component)); - package->components[i].Enabled = FALSE; + TRACE("Disabling component %s\n", debugstr_w(comp->Component)); + comp->Enabled = FALSE; } } } @@ -1995,7 +1980,7 @@ DWORD type,size; LPWSTR deformated; LPCWSTR szRoot, component, name, key, value; - INT component_index; + MSICOMPONENT *comp; MSIRECORD * uirow; LPWSTR uikey; INT root; @@ -2010,21 +1995,21 @@ name = NULL; component = MSI_RecordGetString(row, 6); - component_index = get_loaded_component(package,component); + comp = get_loaded_component(package,component); + if (!comp) + return ERROR_SUCCESS; - if (!ACTION_VerifyComponentForAction(package, component_index, - INSTALLSTATE_LOCAL)) + if (!ACTION_VerifyComponentForAction(package, comp, INSTALLSTATE_LOCAL)) { TRACE("Skipping write due to disabled component %s\n", debugstr_w(component)); - package->components[component_index].Action = - package->components[component_index].Installed; + comp->Action = comp->Installed; return ERROR_SUCCESS; } - package->components[component_index].Action = INSTALLSTATE_LOCAL; + comp->Action = INSTALLSTATE_LOCAL; name = MSI_RecordGetString(row, 4); if( MSI_RecordIsNull(row,5) && name ) @@ -2192,6 +2177,7 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package) { + MSICOMPONENT *comp; DWORD progress = 0; DWORD total = 0; static const WCHAR q1[]= @@ -2200,7 +2186,8 @@ UINT rc; MSIQUERY * view; MSIRECORD * row = 0; - int i; + MSIFEATURE *feature; + MSIFILE *file; TRACE(" InstallValidate \n"); @@ -2231,14 +2218,18 @@ msiobj_release(&view->hdr); total = total + progress * REG_PROGRESS_VALUE; - total = total + package->loaded_components * COMPONENT_PROGRESS_VALUE; - for (i=0; i < package->loaded_files; i++) - total += package->files[i].FileSize; + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) + { + total += COMPONENT_PROGRESS_VALUE; + } + LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry ) + { + total += file->FileSize; + } ui_progress(package,0,total,0,0); - for(i = 0; i < package->loaded_features; i++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - MSIFEATURE* feature = &package->features[i]; TRACE("Feature: %s; Installed: %i; Action %i; Request %i\n", debugstr_w(feature->Feature), feature->Installed, feature->Action, feature->ActionRequest); @@ -2290,10 +2281,8 @@ return rc; } -static LPWSTR resolve_keypath( MSIPACKAGE* package, INT - component_index) +static LPWSTR resolve_keypath( MSIPACKAGE* package, MSICOMPONENT *cmp ) { - MSICOMPONENT* cmp = &package->components[component_index]; if (cmp->KeyPath[0]==0) { @@ -2349,14 +2338,10 @@ } else { - int j; - j = get_loaded_file(package,cmp->KeyPath); + MSIFILE *file = get_loaded_file( package, cmp->KeyPath ); - if (j>=0) - { - LPWSTR p = strdupW(package->files[j].TargetPath); - return p; - } + if (file) + return strdupW( file->TargetPath ); } return NULL; } @@ -2408,78 +2393,78 @@ /* * Return TRUE if the count should be written out and FALSE if not */ -static void ACTION_RefCountComponent( MSIPACKAGE* package, UINT index) +static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp ) { + MSIFEATURE *feature; INT count = 0; BOOL write = FALSE; - INT j; /* only refcount DLLs */ - if (package->components[index].KeyPath[0]==0 || - package->components[index].Attributes & - msidbComponentAttributesRegistryKeyPath || - package->components[index].Attributes & - msidbComponentAttributesODBCDataSource) + if (comp->KeyPath[0]==0 || + comp->Attributes & msidbComponentAttributesRegistryKeyPath || + comp->Attributes & msidbComponentAttributesODBCDataSource) write = FALSE; else { - count = ACTION_GetSharedDLLsCount(package->components[index]. - FullKeypath); + count = ACTION_GetSharedDLLsCount( comp->FullKeypath); write = (count > 0); - if (package->components[index].Attributes & - msidbComponentAttributesSharedDllRefCount) + if (comp->Attributes & msidbComponentAttributesSharedDllRefCount) write = TRUE; } /* increment counts */ - for (j = 0; j < package->loaded_features; j++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - int i; + ComponentList *cl; - if (!ACTION_VerifyFeatureForAction(package,j,INSTALLSTATE_LOCAL)) + if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL )) continue; - for (i = 0; i < package->features[j].ComponentCount; i++) + LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) { - if (package->features[j].Components[i] == index) + if ( cl->component == comp ) count++; } } + /* decrement counts */ - for (j = 0; j < package->loaded_features; j++) + LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - int i; - if (!ACTION_VerifyFeatureForAction(package,j,INSTALLSTATE_ABSENT)) + ComponentList *cl; + + if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ABSENT )) continue; - for (i = 0; i < package->features[j].ComponentCount; i++) + LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) { - if (package->features[j].Components[i] == index) + if ( cl->component == comp ) count--; } } /* ref count all the files in the component */ if (write) - for (j = 0; j < package->loaded_files; j++) + { + MSIFILE *file; + + LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry ) { - if (package->files[j].Temporary) + if (file->Temporary) continue; - if (package->files[j].ComponentIndex == index) - ACTION_WriteSharedDLLsCount(package->files[j].TargetPath,count); + if (file->Component == comp) + ACTION_WriteSharedDLLsCount( file->TargetPath, count ); } + } /* add a count for permenent */ - if (package->components[index].Attributes & - msidbComponentAttributesPermanent) + if (comp->Attributes & msidbComponentAttributesPermanent) count ++; - package->components[index].RefCount = count; + comp->RefCount = count; if (write) - ACTION_WriteSharedDLLsCount(package->components[index].FullKeypath, - package->components[index].RefCount); + ACTION_WriteSharedDLLsCount( comp->FullKeypath, comp->RefCount ); } /* @@ -2494,7 +2479,7 @@ WCHAR squished_pc[GUID_SIZE]; WCHAR squished_cc[GUID_SIZE]; UINT rc; - DWORD i; + MSICOMPONENT *comp; HKEY hkey=0,hkey2=0; if (!package) @@ -2508,32 +2493,33 @@ squash_guid(package->ProductCode,squished_pc); ui_progress(package,1,COMPONENT_PROGRESS_VALUE,1,0); - for (i = 0; i < package->loaded_components; i++) + + LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry ) { ui_progress(package,2,0,0,0); - if (package->components[i].ComponentId[0]!=0) + if (comp->ComponentId[0]!=0) { WCHAR *keypath = NULL; MSIRECORD * uirow; - squash_guid(package->components[i].ComponentId,squished_cc); + squash_guid(comp->ComponentId,squished_cc); - keypath = resolve_keypath(package,i); - package->components[i].FullKeypath = keypath; + keypath = resolve_keypath( package, comp ); + comp->FullKeypath = keypath; /* do the refcounting */ - ACTION_RefCountComponent( package, i); + ACTION_RefCountComponent( package, comp ); [truncated at 1000 lines; 4574 more skipped]
19 years, 2 months
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200