Wine-0_9 vendor drop
Modified: vendor/wine/dlls/comctl32/current/listview.c
Modified: vendor/wine/dlls/comctl32/current/rebar.c
Modified: vendor/wine/dlls/comctl32/current/status.c
Modified: vendor/wine/dlls/comctl32/current/tab.c
Modified: vendor/wine/dlls/comctl32/current/theming.c
Modified: vendor/wine/dlls/comctl32/current/toolbar.c
Modified: vendor/wine/dlls/commdlg/current/cdlg_Cs.rc
Modified: vendor/wine/dlls/commdlg/current/filedlg.c
Modified: vendor/wine/dlls/commdlg/current/printdlg.c
Modified: vendor/wine/dlls/dsound/current/buffer.c
Modified: vendor/wine/dlls/dsound/current/capture.c
Modified: vendor/wine/dlls/dsound/current/dsound.c
Modified: vendor/wine/dlls/dsound/current/dsound_main.c
Modified: vendor/wine/dlls/dsound/current/dsound_private.h
Modified: vendor/wine/dlls/dsound/current/duplex.c
Modified: vendor/wine/dlls/dsound/current/mixer.c
Modified: vendor/wine/dlls/dsound/current/primary.c
Modified: vendor/wine/dlls/dsound/current/propset.c
Modified: vendor/wine/dlls/dsound/current/sound3d.c
Modified: vendor/wine/dlls/ole32/current/compobj.c
Modified: vendor/wine/dlls/oleaut32/current/tmarshal.c
Deleted: vendor/wine/dlls/oleaut32/current/tmarshal.h
Modified: vendor/wine/dlls/oleaut32/current/typelib.c
Modified: vendor/wine/dlls/oleaut32/current/usrmarshal.c
Modified: vendor/wine/dlls/riched20/current/editor.c
Modified: vendor/wine/dlls/riched20/current/list.c
Modified: vendor/wine/dlls/riched20/current/reader.c
Modified: vendor/wine/dlls/riched20/current/run.c
Modified: vendor/wine/dlls/riched20/current/style.c
Modified: vendor/wine/dlls/riched20/current/writer.c
Modified: vendor/wine/dlls/shdocvw/current/shdocvw_main.c
Modified: vendor/wine/dlls/shell32/current/brsfolder.c
Modified: vendor/wine/dlls/shell32/current/enumidlist.c
Modified: vendor/wine/dlls/shell32/current/shell.c
Modified: vendor/wine/dlls/shell32/current/shell32.spec
Modified: vendor/wine/dlls/shell32/current/shell32_main.h
Modified: vendor/wine/dlls/shell32/current/shelllink.c
Modified: vendor/wine/dlls/shell32/current/shellpath.c
Modified: vendor/wine/dlls/shell32/current/shfldr_desktop.c
Modified: vendor/wine/dlls/shell32/current/shlexec.c
Modified: vendor/wine/libs/wpp/current/ppl.l
Modified: vendor/wine/libs/wpp/current/preproc.c
Modified: vendor/wine/libs/wpp/current/wpp_private.h
Modified: vendor/wine/tools/winebuild/current/Makefile.in
Modified: vendor/wine/tools/winebuild/current/import.c
Modified: vendor/wine/tools/winebuild/current/utils.c
Modified: vendor/wine/tools/winebuild/current/winebuild.man.in
Modified: vendor/wine/tools/wrc/current/Makefile.in
Modified: vendor/wine/tools/wrc/current/parser.y
Modified: vendor/wine/tools/wrc/current/wrc.c
Modified: vendor/wine/tools/wrc/current/wrc.h
Deleted: vendor/wine/tools/wrc/current/wrc.man
Added: vendor/wine/tools/wrc/current/wrc.man.in

Modified: vendor/wine/dlls/comctl32/current/listview.c
--- vendor/wine/dlls/comctl32/current/listview.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/listview.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -768,10 +768,12 @@
     return result;
 }
 
-static inline LRESULT notify(LISTVIEW_INFO *infoPtr, INT code)
+static inline BOOL notify(LISTVIEW_INFO *infoPtr, INT code)
 {
     NMHDR nmh;
-    return notify_hdr(infoPtr, code, &nmh);
+    HWND hwnd = infoPtr->hwndSelf;
+    notify_hdr(infoPtr, code, &nmh);
+    return IsWindow(hwnd);
 }
 
 static inline void notify_itemactivate(LISTVIEW_INFO *infoPtr, LVHITTESTINFO *htInfo)
@@ -812,11 +814,12 @@
     return notify_hdr(infoPtr, code, (LPNMHDR)plvnm);
 }
 
-static LRESULT notify_click(LISTVIEW_INFO *infoPtr,  INT code, LVHITTESTINFO *lvht)
+static BOOL notify_click(LISTVIEW_INFO *infoPtr,  INT code, LVHITTESTINFO *lvht)
 {
     NMLISTVIEW nmlv;
     LVITEMW item;
-   
+    HWND hwnd = infoPtr->hwndSelf;
+
     TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht)); 
     ZeroMemory(&nmlv, sizeof(nmlv));
     nmlv.iItem = lvht->iItem;
@@ -826,14 +829,16 @@
     item.iItem = lvht->iItem;
     item.iSubItem = 0;
     if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmlv.lParam = item.lParam;
-    return notify_listview(infoPtr, code, &nmlv);
+    notify_listview(infoPtr, code, &nmlv);
+    return IsWindow(hwnd);
 }
 
-static void notify_deleteitem(LISTVIEW_INFO *infoPtr, INT nItem)
+static BOOL notify_deleteitem(LISTVIEW_INFO *infoPtr, INT nItem)
 {
     NMLISTVIEW nmlv;
     LVITEMW item;
-   
+    HWND hwnd = infoPtr->hwndSelf;
+
     ZeroMemory(&nmlv, sizeof (NMLISTVIEW));
     nmlv.iItem = nItem;
     item.mask = LVIF_PARAM;
@@ -841,6 +846,7 @@
     item.iSubItem = 0;
     if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmlv.lParam = item.lParam;
     notify_listview(infoPtr, LVN_DELETEITEM, &nmlv);
+    return IsWindow(hwnd);
 }
 
 static int get_ansi_notification(INT unicodeNotificationCode)
@@ -3012,12 +3018,13 @@
  * [I] nItem : item index
  *
  * RETURN:
- * None
+ * Whether the window is still valid.
  */
-static void LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
+static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
 {
     INT nFirst = min(infoPtr->nSelectionMark, nItem);
     INT nLast = max(infoPtr->nSelectionMark, nItem);
+    HWND hwndSelf = infoPtr->hwndSelf;
     NMLVODSTATECHANGE nmlv;
     LVITEMW item;
     BOOL bOldChange;
@@ -3046,7 +3053,10 @@
     nmlv.uOldState = item.state;
 
     notify_hdr(infoPtr, LVN_ODSTATECHANGED, (LPNMHDR)&nmlv);
+    if (!IsWindow(hwndSelf))
+        return FALSE;
     infoPtr->bDoChangeNotify = bOldChange;
+    return TRUE;
 }
 
 
@@ -3277,7 +3287,9 @@
         notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
 
         return 0;
-    } 
+    }
+    else
+        infoPtr->bLButtonDown = FALSE;
 
   /* see if we are supposed to be tracking mouse hovering */
   if(infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT) {
@@ -3398,9 +3410,15 @@
     /* send LVN_ITEMCHANGING notification, if the item is not being inserted */
     /* and we are _NOT_ virtual (LVS_OWERNDATA), and change notifications */
     /* are enabled */
-    if(lpItem && !isNew && infoPtr->bDoChangeNotify &&
-       notify_listview(infoPtr, LVN_ITEMCHANGING, &nmlv))
+    if(lpItem && !isNew && infoPtr->bDoChangeNotify)
+    {
+      HWND hwndSelf = infoPtr->hwndSelf;
+
+      if (notify_listview(infoPtr, LVN_ITEMCHANGING, &nmlv))
 	return FALSE;
+      if (!IsWindow(hwndSelf))
+	return FALSE;
+    }
 
     /* copy information */
     if (lpLVItem->mask & LVIF_TEXT)
@@ -3544,6 +3562,7 @@
 static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL isW)
 {
     UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
+    HWND hwndSelf = infoPtr->hwndSelf;
     LPWSTR pszText = NULL;
     BOOL bResult, bChanged = FALSE;
     
@@ -3566,6 +3585,8 @@
 	bResult = set_sub_item(infoPtr, lpLVItem, TRUE, &bChanged);
     else
 	bResult = set_main_item(infoPtr, lpLVItem, FALSE, TRUE, &bChanged);
+    if (!IsWindow(hwndSelf))
+	return FALSE;
 
     /* redraw item, if necessary */
     if (bChanged && !infoPtr->bIsDrawing)
@@ -4514,7 +4535,7 @@
     LISTVIEW_SetItemState(infoPtr, nItem, &item);
 	    
     /* send LVN_DELETEITEM notification. */
-    notify_deleteitem(infoPtr, nItem);
+    if (!notify_deleteitem(infoPtr, nItem)) return FALSE;
 
     /* we need to do this here, because we'll be deleting stuff */  
     if (uView == LVS_SMALLICON || uView == LVS_ICON)
@@ -4566,6 +4587,7 @@
  */
 static BOOL LISTVIEW_EndEditLabelT(LISTVIEW_INFO *infoPtr, LPWSTR pszText, BOOL isW)
 {
+    HWND hwndSelf = infoPtr->hwndSelf;
     NMLVDISPINFOW dispInfo;
 
     TRACE("(pszText=%s, isW=%d)\n", debugtext_t(pszText, isW), isW);
@@ -4583,6 +4605,8 @@
 
     /* Do we need to update the Item Text */
     if (!notify_dispinfoT(infoPtr, LVN_ENDLABELEDITW, &dispInfo, isW)) return FALSE;
+    if (!IsWindow(hwndSelf))
+	return FALSE;
     if (!pszText) return TRUE;
 
     if (!(infoPtr->dwStyle & LVS_OWNERDATA))
@@ -4623,6 +4647,7 @@
     WCHAR szDispText[DISP_TEXT_SIZE] = { 0 };
     NMLVDISPINFOW dispInfo;
     RECT rect;
+    HWND hwndSelf = infoPtr->hwndSelf;
 
     TRACE("(nItem=%d, isW=%d)\n", nItem, isW);
 
@@ -4660,6 +4685,8 @@
     
     if (notify_dispinfoT(infoPtr, LVN_BEGINLABELEDITW, &dispInfo, isW))
     {
+	if (!IsWindow(hwndSelf))
+	    return 0;
 	SendMessageW(infoPtr->hwndEdit, WM_CLOSE, 0, 0);
 	infoPtr->hwndEdit = 0;
 	return 0;
@@ -6189,6 +6216,7 @@
     ITEM_INFO *lpItem;
     BOOL is_sorted, has_changed;
     LVITEMW item;
+    HWND hwndSelf = infoPtr->hwndSelf;
 
     TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
 
@@ -6262,6 +6290,8 @@
     nmlv.iItem = nItem;
     nmlv.lParam = lpItem->lParam;
     notify_listview(infoPtr, LVN_INSERTITEM, &nmlv);
+    if (!IsWindow(hwndSelf))
+	return -1;
 
     /* align items (set position of each item) */
     if ((uView == LVS_SMALLICON || uView == LVS_ICON))
@@ -7965,6 +7995,7 @@
 static LRESULT LISTVIEW_KeyDown(LISTVIEW_INFO *infoPtr, INT nVirtualKey, LONG lKeyData)
 {
   UINT uView =  infoPtr->dwStyle & LVS_TYPEMASK;
+  HWND hwndSelf = infoPtr->hwndSelf;
   INT nItem = -1;
   NMLVKEYDOWN nmKeyDown;
 
@@ -7974,14 +8005,16 @@
   nmKeyDown.wVKey = nVirtualKey;
   nmKeyDown.flags = 0;
   notify_hdr(infoPtr, LVN_KEYDOWN, &nmKeyDown.hdr);
+  if (!IsWindow(hwndSelf))
+    return 0;
 
   switch (nVirtualKey)
   {
   case VK_RETURN:
     if ((infoPtr->nItemCount > 0) && (infoPtr->nFocusedItem != -1))
     {
-      notify(infoPtr, NM_RETURN);
-      notify(infoPtr, LVN_ITEMACTIVATE);
+        if (!notify(infoPtr, NM_RETURN)) return 0;
+        if (!notify(infoPtr, LVN_ITEMACTIVATE)) return 0;
     }
     break;
 
@@ -8013,7 +8046,13 @@
 
   case VK_PRIOR:
     if (uView == LVS_REPORT)
-      nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(infoPtr);
+    {
+      INT topidx = LISTVIEW_GetTopIndex(infoPtr);
+      if (infoPtr->nFocusedItem == topidx)
+        nItem = topidx - LISTVIEW_GetCountPerColumn(infoPtr) + 1;
+      else
+        nItem = topidx;
+    }
     else
       nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(infoPtr)
                                     * LISTVIEW_GetCountPerRow(infoPtr);
@@ -8022,7 +8061,14 @@
 
   case VK_NEXT:
     if (uView == LVS_REPORT)
-      nItem = infoPtr->nFocusedItem + LISTVIEW_GetCountPerColumn(infoPtr);
+    {
+      INT topidx = LISTVIEW_GetTopIndex(infoPtr);
+      INT cnt = LISTVIEW_GetCountPerColumn(infoPtr);
+      if (infoPtr->nFocusedItem == topidx + cnt - 1)
+        nItem = infoPtr->nFocusedItem + cnt - 1;
+      else
+        nItem = topidx + cnt - 1;
+    }
     else
       nItem = infoPtr->nFocusedItem + LISTVIEW_GetCountPerColumn(infoPtr)
                                     * LISTVIEW_GetCountPerRow(infoPtr);
@@ -8054,7 +8100,7 @@
     if (!infoPtr->bFocus) return 0;
    
     /* send NM_KILLFOCUS notification */
-    notify(infoPtr, NM_KILLFOCUS);
+    if (!notify(infoPtr, NM_KILLFOCUS)) return 0;
 
     /* if we have a focus rectagle, get rid of it */
     LISTVIEW_ShowFocusRect(infoPtr, FALSE);
@@ -8087,14 +8133,14 @@
     TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y);
 
     /* send NM_RELEASEDCAPTURE notification */
-    notify(infoPtr, NM_RELEASEDCAPTURE);
+    if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
 
     htInfo.pt.x = x;
     htInfo.pt.y = y;
 
     /* send NM_DBLCLK notification */
     LISTVIEW_HitTest(infoPtr, &htInfo, TRUE, FALSE);
-    notify_click(infoPtr, NM_DBLCLK, &htInfo);
+    if (!notify_click(infoPtr, NM_DBLCLK, &htInfo)) return 0;
 
     /* To send the LVN_ITEMACTIVATE, it must be on an Item */
     if(htInfo.iItem != -1) notify_itemactivate(infoPtr,&htInfo);
@@ -8124,7 +8170,7 @@
   TRACE("(key=%hu, X=%hu, Y=%hu)\n", wKey, x, y);
 
   /* send NM_RELEASEDCAPTURE notification */
-  notify(infoPtr, NM_RELEASEDCAPTURE);
+  if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
 
   if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
 
@@ -8167,7 +8213,7 @@
       {
         if (bGroupSelect)
 	{
-          LISTVIEW_AddGroupSelection(infoPtr, nItem);
+          if (!LISTVIEW_AddGroupSelection(infoPtr, nItem)) return 0;
     	  LISTVIEW_SetItemFocus(infoPtr, nItem);
           infoPtr->nSelectionMark = nItem;
 	}
@@ -8242,7 +8288,7 @@
 
     /* send NM_CLICK notification */
     LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, FALSE);
-    notify_click(infoPtr, NM_CLICK, &lvHitTestInfo);
+    if (!notify_click(infoPtr, NM_CLICK, &lvHitTestInfo)) return 0;
 
     /* set left button flag */
     infoPtr->bLButtonDown = FALSE;
@@ -8317,6 +8363,7 @@
 static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADERW *lpnmh)
 {
     UINT uView =  infoPtr->dwStyle & LVS_TYPEMASK;
+    HWND hwndSelf = infoPtr->hwndSelf;
     
     TRACE("(lpnmh=%p)\n", lpnmh);
 
@@ -8330,6 +8377,8 @@
 	case HDN_ITEMCHANGEDW:
 	case HDN_ITEMCHANGEDA:
             notify_forward_header(infoPtr, lpnmh);
+	    if (!IsWindow(hwndSelf))
+		break;
             /* Fall through */
 	case HDN_TRACKW:
 	case HDN_TRACKA:
@@ -8560,7 +8609,7 @@
     TRACE("(key=%hu,X=%hu,Y=%hu)\n", wKey, x, y);
 
     /* send NM_RELEASEDCAPTURE notification */
-    notify(infoPtr, NM_RELEASEDCAPTURE);
+    if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
 
     /* send NM_RDBLCLK notification */
     lvHitTestInfo.pt.x = x;
@@ -8591,7 +8640,7 @@
     TRACE("(key=%hu,X=%hu,Y=%hu)\n", wKey, x, y);
 
     /* send NM_RELEASEDCAPTURE notification */
-    notify(infoPtr, NM_RELEASEDCAPTURE);
+    if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
 
     /* make sure the listview control window has the focus */
     if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
@@ -8647,7 +8696,7 @@
     lvHitTestInfo.pt.x = x;
     lvHitTestInfo.pt.y = y;
     LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, FALSE);
-    notify_click(infoPtr, NM_RCLICK, &lvHitTestInfo);
+    if (!notify_click(infoPtr, NM_RCLICK, &lvHitTestInfo)) return 0;
 
     /* Change to screen coordinate for WM_CONTEXTMENU */
     pt = lvHitTestInfo.pt;
@@ -8710,7 +8759,7 @@
     if (infoPtr->bFocus) return 0;
    
     /* send NM_SETFOCUS notification */
-    notify(infoPtr, NM_SETFOCUS);
+    if (!notify(infoPtr, NM_SETFOCUS)) return 0;
 
     /* set window focus flag */
     infoPtr->bFocus = TRUE;

Modified: vendor/wine/dlls/comctl32/current/rebar.c
--- vendor/wine/dlls/comctl32/current/rebar.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/rebar.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -1277,7 +1277,7 @@
 static VOID
 REBAR_MoveChildWindows (REBAR_INFO *infoPtr, UINT start, UINT endplus)
 {
-    const static WCHAR strComboBox[] = { 'C','o','m','b','o','B','o','x',0 };
+    static const WCHAR strComboBox[] = { 'C','o','m','b','o','B','o','x',0 };
     REBAR_BAND *lpBand;
     WCHAR szClassName[40];
     UINT i;

Modified: vendor/wine/dlls/comctl32/current/status.c
--- vendor/wine/dlls/comctl32/current/status.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/status.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -96,7 +96,7 @@
 #define VERT_BORDER 2
 #define HORZ_GAP    2
 
-const static WCHAR themeClass[] = { 'S','t','a','t','u','s',0 };
+static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 };
 
 /* prototype */
 static void

Modified: vendor/wine/dlls/comctl32/current/tab.c
--- vendor/wine/dlls/comctl32/current/tab.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/tab.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -1275,7 +1275,10 @@
   infoPtr->uNumRows = curItemRowCount;
 
   /* Arrange all tabs evenly if style says so */
-   if (!(lStyle & TCS_RAGGEDRIGHT) &&  ((lStyle & TCS_MULTILINE) || (lStyle & TCS_VERTICAL)) && (infoPtr->uNumItem > 0))
+   if (!(lStyle & TCS_RAGGEDRIGHT) &&
+       ((lStyle & TCS_MULTILINE) || (lStyle & TCS_VERTICAL)) &&
+       (infoPtr->uNumItem > 0) &&
+       (infoPtr->uNumRows > 1))
    {
       INT tabPerRow,remTab,iRow;
       UINT iItm;
@@ -2022,7 +2025,7 @@
       if ((theme = GetWindowTheme (infoPtr->hwnd)) 
           && ((lStyle & (TCS_VERTICAL | TCS_BOTTOM)) == 0))
       {
-          const static int partIds[8] = {
+          static const int partIds[8] = {
               /* Normal item */
               TABP_TABITEM,
               TABP_TABITEMLEFTEDGE,

Modified: vendor/wine/dlls/comctl32/current/theming.c
--- vendor/wine/dlls/comctl32/current/theming.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/theming.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -26,6 +26,7 @@
 #include "wingdi.h"
 #include "winuser.h"
 #include "comctl32.h"
+#include "uxtheme.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(theming);
@@ -91,7 +92,7 @@
 MAKE_SUBCLASS_PROC(3)
 MAKE_SUBCLASS_PROC(4)
 
-const static WNDPROC subclassProcs[NUM_SUBCLASSES] = {
+static const WNDPROC subclassProcs[NUM_SUBCLASSES] = {
     subclass_proc0,
     subclass_proc1,
     subclass_proc2,
@@ -113,6 +114,8 @@
     static const WCHAR refDataPropName[] = 
         { 'C','C','3','2','T','h','e','m','i','n','g','D','a','t','a',0 };
 
+    if (!IsThemeActive()) return;
+
     atSubclassProp = GlobalAddAtomW (subclassPropName);
     atRefDataProp = GlobalAddAtomW (refDataPropName);
 
@@ -154,6 +157,9 @@
 void THEMING_Uninitialize (void)
 {
     int i;
+
+    if (!atSubclassProp) return;  /* not initialized */
+
     for (i = 0; i < NUM_SUBCLASSES; i++)
     {
         UnregisterClassW (subclasses[i].className, NULL);

Modified: vendor/wine/dlls/comctl32/current/toolbar.c
--- vendor/wine/dlls/comctl32/current/toolbar.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/comctl32/current/toolbar.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -1854,7 +1854,7 @@
     nRunIndex = nIndex - 1;
     while (nRunIndex >= 0) {
 	btnPtr = &infoPtr->buttons[nRunIndex];
-	if ((btnPtr->fsStyle & BTNS_CHECKGROUP) == BTNS_CHECKGROUP) {
+	if ((btnPtr->fsStyle & BTNS_GROUP) == BTNS_GROUP) {
 	    if (btnPtr->fsState & TBSTATE_CHECKED)
 		return nRunIndex;
 	}
@@ -1867,7 +1867,7 @@
     nRunIndex = nIndex + 1;
     while (nRunIndex < infoPtr->nNumButtons) {
 	btnPtr = &infoPtr->buttons[nRunIndex];
-	if ((btnPtr->fsStyle & BTNS_CHECKGROUP) == BTNS_CHECKGROUP) {
+	if ((btnPtr->fsStyle & BTNS_GROUP) == BTNS_GROUP) {
 	    if (btnPtr->fsState & TBSTATE_CHECKED)
 		return nRunIndex;
 	}

Modified: vendor/wine/dlls/commdlg/current/cdlg_Cs.rc
--- vendor/wine/dlls/commdlg/current/cdlg_Cs.rc	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/commdlg/current/cdlg_Cs.rc	2005-10-27 14:17:43 UTC (rev 18787)
@@ -115,15 +115,35 @@
 }
 
 
-CHOOSE_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
+CHOOSE_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 13, 54, 264, 147
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "PÝsmo"
 FONT 8, "MS Shell Dlg"
 {
- LTEXT "PÝsmo:", 1088, 6, 6, 40, 9
- LTEXT "", 1089, 60, 6, 150, 9
- DEFPUSHBUTTON "Ok", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
- PUSHBUTTON "Storno", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
+ LTEXT 		 "PÝ&smo:", stc1 ,6,3,40,9
+ COMBOBOX        cmb1, 6,13,94,54,  CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
+                 CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
+ LTEXT           "St&yl:",stc2 ,108,3,44,9
+ COMBOBOX        cmb2,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
+                 WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
+ LTEXT           "&Velikost:",stc3,179,3,30,9
+ COMBOBOX        cmb3,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
+                 WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT
+ DEFPUSHBUTTON   "OK",IDOK,218,6,40,14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ PUSHBUTTON      "Storno",IDCANCEL,218,23,40,14,WS_GROUP | WS_TABSTOP
+ PUSHBUTTON      "&Pou×Ýt", psh3,218,40,40,14,WS_GROUP | WS_TABSTOP
+ PUSHBUTTON      "&Nßpovýda" , pshHelp,218,57,40,14,WS_GROUP | WS_TABSTOP
+ GROUPBOX        "Efekty",grp1,6,72,84,34,WS_GROUP
+ CHECKBOX        "P°eÜ&krtnutÝ", chx1, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP
+ CHECKBOX        "&Podtr×enÝ", chx2, 10,94,50,10, BS_AUTOCHECKBOX
+ LTEXT           "&Barva:", stc4 ,6,110,30,9
+ COMBOBOX        cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
+                 CBS_AUTOHSCROLL |  WS_BORDER | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX        "Ukßzka",grp2,98,72,120,36,WS_GROUP
+ CTEXT           "P°ÝliÜ ×luØouÞk² k¨? ·pýl ´ßbelskÚ k¾dy",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE
+ LTEXT           "Skr&ipt:",stc7 ,98,114,40,9
+ COMBOBOX        cmb5,98,124,120,10,CBS_DROPDOWNLIST |CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
+                 CBS_AUTOHSCROLL |   WS_VSCROLL | WS_TABSTOP
 }
 
 

Modified: vendor/wine/dlls/commdlg/current/filedlg.c
--- vendor/wine/dlls/commdlg/current/filedlg.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/commdlg/current/filedlg.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -2500,7 +2500,7 @@
  */
 static inline BOOL FILEDLG95_unixfs_is_rooted_at_desktop(void) {
     HKEY hKey;
-    const static WCHAR wszRootedAtDesktop[] = { 'S','o','f','t','w','a','r','e','\\',
+    static const WCHAR wszRootedAtDesktop[] = { 'S','o','f','t','w','a','r','e','\\',
         'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
         'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
         'E','x','p','l','o','r','e','r','\\','D','e','s','k','t','o','p','\\',

Modified: vendor/wine/dlls/commdlg/current/printdlg.c
--- vendor/wine/dlls/commdlg/current/printdlg.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/commdlg/current/printdlg.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -1270,10 +1270,10 @@
 static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, WPARAM wParam,
 				     PRINT_PTRW* PrintStructures)
 {
-    const static WCHAR PD32_COLLATE[] = { 'P', 'D', '3', '2', '_', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
-    const static WCHAR PD32_NOCOLLATE[] = { 'P', 'D', '3', '2', '_', 'N', 'O', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
-    const static WCHAR PD32_PORTRAIT[] = { 'P', 'D', '3', '2', '_', 'P', 'O', 'R', 'T', 'R', 'A', 'I', 'T', 0 };
-    const static WCHAR PD32_LANDSCAPE[] = { 'P', 'D', '3', '2', '_', 'L', 'A', 'N', 'D', 'S', 'C', 'A', 'P', 'E', 0 };
+    static const WCHAR PD32_COLLATE[] = { 'P', 'D', '3', '2', '_', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
+    static const WCHAR PD32_NOCOLLATE[] = { 'P', 'D', '3', '2', '_', 'N', 'O', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
+    static const WCHAR PD32_PORTRAIT[] = { 'P', 'D', '3', '2', '_', 'P', 'O', 'R', 'T', 'R', 'A', 'I', 'T', 0 };
+    static const WCHAR PD32_LANDSCAPE[] = { 'P', 'D', '3', '2', '_', 'L', 'A', 'N', 'D', 'S', 'C', 'A', 'P', 'E', 0 };
     LPPRINTDLGW lppd = PrintStructures->lpPrintDlg;
     DEVNAMES *pdn;
     DEVMODEW *pdm;
@@ -2366,9 +2366,9 @@
 }
 static void
 _c_size2strW(PageSetupDataW *pda,DWORD size,LPWSTR strout) {
-    const static WCHAR UNDEF[] = { '<', 'u', 'n', 'd', 'e', 'f', '>', 0 };
-    const static WCHAR mm_fmt[] = { '%', '.', '2', 'f', 'm', 'm', 0 };
-    const static WCHAR in_fmt[] = { '%', '.', '2', 'f', 'i', 'n', 0 };
+    static const WCHAR UNDEF[] = { '<', 'u', 'n', 'd', 'e', 'f', '>', 0 };
+    static const WCHAR mm_fmt[] = { '%', '.', '2', 'f', 'm', 'm', 0 };
+    static const WCHAR in_fmt[] = { '%', '.', '2', 'f', 'i', 'n', 0 };
     lstrcpyW(strout, UNDEF);
     if (pda->dlga->Flags & PSD_INHUNDREDTHSOFMILLIMETERS) {
 	wsprintfW(strout,mm_fmt,(size*1.0)/100.0);
@@ -3182,7 +3182,7 @@
 static INT_PTR CALLBACK
 PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-    const static WCHAR __WINE_PAGESETUPDLGDATA[] = 
+    static const WCHAR __WINE_PAGESETUPDLGDATA[] = 
 	{ '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E', 
 	  'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 };
     PageSetupDataW	*pda;

Modified: vendor/wine/dlls/dsound/current/buffer.c
--- vendor/wine/dlls/dsound/current/buffer.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/buffer.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -25,6 +25,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "winreg.h"
 #include "winternl.h"
@@ -897,11 +898,11 @@
 	if ( IsEqualGUID(riid, &IID_IUnknown) ||
 	     IsEqualGUID(riid, &IID_IDirectSoundBuffer) ||
 	     IsEqualGUID(riid, &IID_IDirectSoundBuffer8) ) {
-		if (!This->dsb)
-			SecondaryBufferImpl_Create(This, &(This->dsb));
-		if (This->dsb) {
-			IDirectSoundBuffer8_AddRef((LPDIRECTSOUNDBUFFER8)This->dsb);
-			*ppobj = This->dsb;
+		if (!This->secondary)
+			SecondaryBufferImpl_Create(This, &(This->secondary));
+		if (This->secondary) {
+			IDirectSoundBuffer8_AddRef((LPDIRECTSOUNDBUFFER8)This->secondary);
+			*ppobj = This->secondary;
 			return S_OK;
 		}
 		WARN("IID_IDirectSoundBuffer\n");
@@ -1011,7 +1012,7 @@
 	TRACE("Created buffer at %p\n", dsb);
 
 	dsb->ref = 0;
-	dsb->dsb = 0;
+	dsb->secondary = 0;
 	dsb->dsound = ds;
 	dsb->lpVtbl = &dsbvt;
 	dsb->iks = NULL;
@@ -1199,10 +1200,10 @@
         pdsb->notify = NULL;
     }
 
-    if (pdsb->dsb) {
+    if (pdsb->secondary) {
         WARN("dsb not NULL\n");
-        SecondaryBufferImpl_Destroy(pdsb->dsb);
-        pdsb->dsb = NULL;
+        SecondaryBufferImpl_Destroy(pdsb->secondary);
+        pdsb->secondary = NULL;
     }
 
     while (IDirectSoundBuffer8_Release((LPDIRECTSOUNDBUFFER8)pdsb) > 0);
@@ -1225,7 +1226,7 @@
 
 static ULONG WINAPI SecondaryBufferImpl_AddRef(LPDIRECTSOUNDBUFFER8 iface)
 {
-    IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
+    SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
     ULONG ref = InterlockedIncrement(&(This->ref));
     TRACE("(%p) ref was %ld\n", This, ref - 1);
     return ref;
@@ -1233,12 +1234,12 @@
 
 static ULONG WINAPI SecondaryBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
 {
-    IDirectSoundBufferImpl *This = (IDirectSoundBufferImpl *)iface;
+    SecondaryBufferImpl *This = (SecondaryBufferImpl *)iface;
     ULONG ref = InterlockedDecrement(&(This->ref));
     TRACE("(%p) ref was %ld\n", This, ref + 1);
 
     if (!ref) {
-        This->dsb->dsb = NULL;
+        This->dsb->secondary = NULL;
         IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER8)This->dsb);
         HeapFree(GetProcessHeap(), 0, This);
         TRACE("(%p) released\n", This);

Modified: vendor/wine/dlls/dsound/current/capture.c
--- vendor/wine/dlls/dsound/current/capture.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/capture.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -31,6 +31,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "mmddk.h"
 #include "winreg.h"

Modified: vendor/wine/dlls/dsound/current/dsound.c
--- vendor/wine/dlls/dsound/current/dsound.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/dsound.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -27,6 +27,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "winreg.h"
 #include "mmsystem.h"
 #include "winternl.h"
@@ -45,6 +46,7 @@
 static ULONG WINAPI IDirectSound8_IDirectSound8_AddRef(LPDIRECTSOUND8 iface);
 
 static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice);
+static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device);
 static ULONG DirectSoundDevice_Release(DirectSoundDevice * device);
 
 static const char * dumpCooperativeLevel(DWORD level)
@@ -246,9 +248,13 @@
     TRACE("(%p) ref was %ld\n", This, ref + 1);
 
     if (!ref) {
-        if (This->device)
-            DirectSoundDevice_Release(This->device);
-
+        if (This->device) {
+            if (DirectSoundDevice_Release(This->device) != 0) {
+                /* device not released so make sure primary reference to This removed */
+                if (This->device->primary)
+                    This->device->primary->dsound = NULL;
+            }
+        }
         HeapFree(GetProcessHeap(),0,This);
         TRACE("(%p) released\n", This);
     }
@@ -324,6 +330,7 @@
             WARN("Primary Buffer already created\n");
             IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(This->device->primary));
             *ppdsb = (LPDIRECTSOUNDBUFFER)(This->device->primary);
+            This->device->primary->dsound = This;
         } else {
            This->device->dsbd = *dsbd;
            hres = PrimaryBufferImpl_Create(This, (PrimaryBufferImpl**)&(This->device->primary), &(This->device->dsbd));
@@ -359,7 +366,7 @@
         if (dsb) {
             hres = SecondaryBufferImpl_Create(dsb, (SecondaryBufferImpl**)ppdsb);
             if (*ppdsb) {
-                dsb->dsb = (SecondaryBufferImpl*)*ppdsb;
+                dsb->secondary = (SecondaryBufferImpl*)*ppdsb;
                 IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER)*ppdsb);
             } else
                 WARN("SecondaryBufferImpl_Create failed\n");
@@ -528,7 +535,7 @@
     dsb->dsound = This;
     dsb->ds3db = NULL;
     dsb->iks = NULL; /* FIXME? */
-    dsb->dsb = NULL;
+    dsb->secondary = NULL;
 
     /* variable sized struct so calculate size based on format */
     size = sizeof(WAVEFORMATEX) + pdsb->pwfx->cbSize;
@@ -560,7 +567,7 @@
     } else {
         hres = SecondaryBufferImpl_Create(dsb, (SecondaryBufferImpl**)ppdsb);
         if (*ppdsb) {
-            dsb->dsb = (SecondaryBufferImpl*)*ppdsb;
+            dsb->secondary = (SecondaryBufferImpl*)*ppdsb;
             IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)*ppdsb);
         } else
             WARN("SecondaryBufferImpl_Create failed\n");
@@ -691,7 +698,7 @@
     if (DSOUND_renderer[wod]) {
         if (IsEqualGUID(&devGUID, &DSOUND_renderer[wod]->guid)) {
             device = DSOUND_renderer[wod];
-            device->ref++;
+            DirectSoundDevice_AddRef(device);
             This->device = device;
             return DS_OK;
         } else {
@@ -940,14 +947,20 @@
     return DS_OK;
 }
 
+static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device)
+{
+    ULONG ref = InterlockedIncrement(&(device->ref));
+    TRACE("(%p) ref was %ld\n", device, ref - 1);
+    return ref;
+}
+
 static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
 {
-    int i;
     HRESULT hr;
-    TRACE("(%p) ref was %lu\n", device, device->ref);
-
-    device->ref--;
-    if (device->ref == 0) {
+    ULONG ref = InterlockedDecrement(&(device->ref));
+    TRACE("(%p) ref was %lu\n", device, ref + 1);
+    if (!ref) {
+        int i;
         timeKillEvent(device->timerID);
         timeEndPeriod(DS_TIME_RES);
         /* wait for timer to expire */
@@ -994,7 +1007,7 @@
         HeapFree(GetProcessHeap(),0,device);
         TRACE("(%p) released\n", device); 
     }
-    return device->ref;
+    return ref;
 }
 
 HRESULT WINAPI IDirectSoundImpl_Create(

Modified: vendor/wine/dlls/dsound/current/dsound_main.c
--- vendor/wine/dlls/dsound/current/dsound_main.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/dsound_main.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -43,6 +43,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "winnls.h"
 #include "winreg.h"
 #include "mmsystem.h"

Modified: vendor/wine/dlls/dsound/current/dsound_private.h
--- vendor/wine/dlls/dsound/current/dsound_private.h	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/dsound_private.h	2005-10-27 14:17:43 UTC (rev 18787)
@@ -199,7 +199,7 @@
     const IDirectSoundBuffer8Vtbl *lpVtbl;
     LONG                        ref;
     /* IDirectSoundBufferImpl fields */
-    SecondaryBufferImpl*        dsb;
+    SecondaryBufferImpl*        secondary;
     IDirectSoundImpl*           dsound;
     CRITICAL_SECTION            lock;
     PIDSDRIVERBUFFER            hwbuf;

Modified: vendor/wine/dlls/dsound/current/duplex.c
--- vendor/wine/dlls/dsound/current/duplex.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/duplex.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -30,6 +30,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "mmddk.h"
 #include "winreg.h"

Modified: vendor/wine/dlls/dsound/current/mixer.c
--- vendor/wine/dlls/dsound/current/mixer.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/mixer.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -27,6 +27,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "winreg.h"
 #include "winternl.h"

Modified: vendor/wine/dlls/dsound/current/primary.c
--- vendor/wine/dlls/dsound/current/primary.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/primary.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -25,6 +25,7 @@
 #define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "winreg.h"
 #include "winternl.h"

Modified: vendor/wine/dlls/dsound/current/propset.c
--- vendor/wine/dlls/dsound/current/propset.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/propset.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -23,6 +23,7 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "winreg.h"
 #include "winternl.h"

Modified: vendor/wine/dlls/dsound/current/sound3d.c
--- vendor/wine/dlls/dsound/current/sound3d.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/dsound/current/sound3d.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -44,6 +44,7 @@
 #define NONAMELESSSTRUCT
 #include "windef.h"
 #include "winbase.h"
+#include "winuser.h"
 #include "mmsystem.h"
 #include "winreg.h"
 #include "winternl.h"

Modified: vendor/wine/dlls/ole32/current/compobj.c
--- vendor/wine/dlls/ole32/current/compobj.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/ole32/current/compobj.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -2622,6 +2622,12 @@
                 TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);
                 TranslateMessage(&msg);
                 DispatchMessageW(&msg);
+                if (msg.message == WM_QUIT)
+                {
+                    TRACE("resending WM_QUIT to outer message loop\n");
+                    PostQuitMessage(msg.wParam);
+                    goto done;
+                }
             }
         }
         else if ((res >= WAIT_OBJECT_0) && (res < WAIT_OBJECT_0 + cHandles))
@@ -2642,6 +2648,7 @@
             break;
         }
     }
+done:
     TRACE("-- 0x%08lx\n", hr);
     return hr;
 }

Modified: vendor/wine/dlls/oleaut32/current/tmarshal.c
--- vendor/wine/dlls/oleaut32/current/tmarshal.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/oleaut32/current/tmarshal.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -344,7 +344,9 @@
 #include "poppack.h"
 
 #else /* __i386__ */
-# error You need to implement stubless proxies for your architecture
+# warning You need to implement stubless proxies for your architecture
+typedef struct _TMAsmProxy {
+} TMAsmProxy;
 #endif
 
 typedef struct _TMProxyImpl {
@@ -1939,6 +1941,7 @@
 		for (j=0;j<fdesc->cParams;j++)
 		    nrofargs += _argsize(fdesc->lprgelemdescParam[j].tdesc.vt);
 
+#ifdef __i386__
 		if (fdesc->callconv != CC_STDCALL) {
 		    ERR("calling convention is not stdcall????\n");
 		    return E_FAIL;
@@ -1963,6 +1966,10 @@
 		xasm->bytestopop= (nrofargs+2)*4; /* pop args, This, iMethod */
 		proxy->lpvtbl[i] = xasm;
 		break;
+#else
+                FIXME("not implemented on non i386\n");
+                return E_FAIL;
+#endif
 	    }
 	}
     }

Deleted: vendor/wine/dlls/oleaut32/current/tmarshal.h
--- vendor/wine/dlls/oleaut32/current/tmarshal.h	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/oleaut32/current/tmarshal.h	2005-10-27 14:17:43 UTC (rev 18787)
@@ -1,24 +0,0 @@
-/*
- * Copyright 2002 Marcus Meissner
- *
- * 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
- */
-
-#ifndef TMARSHAL_H
-#define TMARSHAL_H
-HRESULT WINAPI
-TypeLibFac_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
-
-#endif

Modified: vendor/wine/dlls/oleaut32/current/typelib.c
--- vendor/wine/dlls/oleaut32/current/typelib.c	2005-10-27 14:18:09 UTC (rev 18786)
+++ vendor/wine/dlls/oleaut32/current/typelib.c	2005-10-27 14:17:43 UTC (rev 18787)
@@ -4338,7 +4338,8 @@
 	HREFTYPE  *pRefType)
 {
     ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
-    int(i);
+    int i;
+    HRESULT hr = S_OK;
     TLBImplType *pImpl = This->impltypelist;
 
     TRACE("(%p) index %d\n", This, index);
@@ -4358,8 +4359,7 @@
       }
       else
       {
-        if (!pImpl) return TYPE_E_ELEMENTNOTFOUND;
-        *pRefType = pImpl->hRef;
+        hr = TYPE_E_ELEMENTNOTFOUND;
       }
     }
     else
@@ -4370,15 +4370,21 @@
         pImpl = pImpl->next;
       }
 
-      if (!pImpl) return TYPE_E_ELEMENTNOTFOUND;
+      if (pImpl)
+        *pRefType = pImpl->hRef;
+      else
+        hr = TYPE_E_ELEMENTNOTFOUND;
+    }
 
-      *pRefType = pImpl->hRef;
-
-      TRACE("-- 0x%08lx\n", pImpl->hRef );
+    if(TRACE_ON(ole))
+    {
+        if(SUCCEEDED(hr))
+            TRACE("SUCCESS -- hRef = 0x%08lx\n", *pRefType );
+        else
+            TRACE("FAILURE -- hresult = 0x%08lx\n", hr);
     }
 
-    return S_OK;
-
+    return hr;
 }
 
 /* ITypeInfo::GetImplTypeFlags
[truncated at 1000 lines; 1759 more skipped]