Author: dchapyshev Date: Sat Aug 15 11:29:45 2009 New Revision: 42681
URL: http://svn.reactos.org/svn/reactos?rev=42681&view=rev Log: - Sync oleacc, oleaut32, olesvr32 with Wine 1.1.27
Modified: trunk/reactos/dll/win32/oleacc/main.c trunk/reactos/dll/win32/oleacc/oleacc.spec trunk/reactos/dll/win32/oleaut32/olefont.c trunk/reactos/dll/win32/oleaut32/olepicture.c trunk/reactos/dll/win32/oleaut32/resource.h trunk/reactos/dll/win32/oleaut32/typelib.c trunk/reactos/dll/win32/oleaut32/typelib2.c trunk/reactos/dll/win32/oleaut32/usrmarshal.c trunk/reactos/dll/win32/oleaut32/variant.c trunk/reactos/dll/win32/oleaut32/vartype.c trunk/reactos/dll/win32/olesvr32/olesvr32.spec trunk/reactos/dll/win32/olesvr32/olesvr_main.c
Modified: trunk/reactos/dll/win32/oleacc/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleacc/main.c?rev... ============================================================================== --- trunk/reactos/dll/win32/oleacc/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleacc/main.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -37,6 +37,12 @@ { FIXME("%p %d %s %p\n", hwnd, idObject, debugstr_guid( riidInterface ), ppvObject ); + return E_NOTIMPL; +} + +HRESULT WINAPI ObjectFromLresult( LRESULT result, REFIID riid, WPARAM wParam, void **ppObject ) +{ + FIXME("%ld %s %ld %p\n", result, debugstr_guid(riid), wParam, ppObject ); return E_NOTIMPL; }
Modified: trunk/reactos/dll/win32/oleacc/oleacc.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleacc/oleacc.spe... ============================================================================== --- trunk/reactos/dll/win32/oleacc/oleacc.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleacc/oleacc.spec [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -16,5 +16,5 @@ @ stub IID_IAccessibleHandler @ stub LIBID_Accessibility @ stdcall LresultFromObject(ptr long ptr) -@ stub ObjectFromLresult +@ stdcall ObjectFromLresult(long ptr long ptr) @ stub WindowFromAccessibleObject
Modified: trunk/reactos/dll/win32/oleaut32/olefont.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olefont.... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/olefont.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olefont.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -132,8 +132,8 @@ /* * Size ratio */ - long cyLogical; - long cyHimetric; + LONG cyLogical; + LONG cyHimetric;
IConnectionPoint *pPropertyNotifyCP; IConnectionPoint *pFontEventsCP;
Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepictu... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -52,7 +52,10 @@ #define UINT8 JPEG_UINT8 #define UINT16 JPEG_UINT16 #define boolean jpeg_boolean +#undef HAVE_STDLIB_H # include <jpeglib.h> +#undef HAVE_STDLIB_H +#define HAVE_STDLIB_H 1 #undef UINT8 #undef UINT16 #undef boolean @@ -1229,7 +1232,6 @@ if (pixel == (transparent & 0x000000FFU)) monoPointer[j >> 3] |= 1 << (7 - (j & 7)); } } - hdcref = GetDC(0); hTempMask = CreateDIBitmap( hdcref, &bmi->bmiHeader, @@ -1238,7 +1240,6 @@ bmi, DIB_RGB_COLORS ); - DeleteDC(hdcref);
bmi->bmiHeader.biHeight = -bmi->bmiHeader.biHeight; This->hbmMask = CreateBitmap(bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight, 1, 1, NULL); @@ -1263,7 +1264,7 @@ DeleteObject(hTempMask); }
- DeleteDC(hdcref); + ReleaseDC(0, hdcref); This->desc.picType = PICTYPE_BITMAP; OLEPictureImpl_SetBitmap(This); DGifCloseFile(gif); @@ -1366,7 +1367,7 @@ (BITMAPINFO*)&bmi, DIB_RGB_COLORS ); - DeleteDC(hdcref); + ReleaseDC(0, hdcref); This->desc.picType = PICTYPE_BITMAP; OLEPictureImpl_SetBitmap(This); HeapFree(GetProcessHeap(),0,bits); @@ -1395,7 +1396,7 @@ bi, DIB_RGB_COLORS ); - DeleteDC(hdcref); + ReleaseDC(0, hdcref); if (This->desc.u.bmp.hbitmap == 0) return E_FAIL; This->desc.picType = PICTYPE_BITMAP;
Modified: trunk/reactos/dll/win32/oleaut32/resource.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/resource... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/resource.h [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -19,6 +19,8 @@ */ #ifndef WINE_OLEAUT32_RESOURCE_H #define WINE_OLEAUT32_RESOURCE_H + +#include <windef.h>
/* Localised boolean text */ #define IDS_TRUE 100
Modified: trunk/reactos/dll/win32/oleaut32/typelib.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib.... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -938,7 +938,7 @@ BSTR DocString; BSTR HelpFile; BSTR HelpStringDll; - unsigned long dwHelpContext; + DWORD dwHelpContext; int TypeInfoCount; /* nr of typeinfo's in librarry */ struct tagITypeInfoImpl *pTypeInfo; /* linked list of type info data */ int ctCustData; /* number of items in cust data list */ @@ -1058,8 +1058,8 @@ BSTR Name; BSTR DocString; BSTR DllName; - unsigned long dwHelpContext; - unsigned long dwHelpStringContext; + DWORD dwHelpContext; + DWORD dwHelpStringContext;
/* functions */ TLBFuncDesc * funclist; /* linked list with function descriptions */ @@ -2872,13 +2872,7 @@ /* TLIBATTR fields */ MSFT_ReadGuid(&pTypeLibImpl->LibAttr.guid, tlbHeader.posguid, &cx);
- /* pTypeLibImpl->LibAttr.lcid = tlbHeader.lcid;*/ - /* Windows seems to have zero here, is this correct? */ - if(SUBLANGID(tlbHeader.lcid) == SUBLANG_NEUTRAL) - pTypeLibImpl->LibAttr.lcid = MAKELCID(MAKELANGID(PRIMARYLANGID(tlbHeader.lcid),0),0); - else - pTypeLibImpl->LibAttr.lcid = 0; - + pTypeLibImpl->LibAttr.lcid = tlbHeader.lcid2; pTypeLibImpl->LibAttr.syskind = tlbHeader.varflags & 0x0f; /* check the mask */ pTypeLibImpl->LibAttr.wMajorVerNum = LOWORD(tlbHeader.version); pTypeLibImpl->LibAttr.wMinorVerNum = HIWORD(tlbHeader.version);
Modified: trunk/reactos/dll/win32/oleaut32/typelib2.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib2... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -760,7 +760,7 @@ if (offset == -1) return offset;
*((unsigned short *)&This->typelib_segment_data[MSFT_SEG_CUSTDATA][offset]) = VT_UI4; - *((unsigned long *)&This->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+2]) = V_UI4(pVarVal); + *((unsigned int *)&This->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+2]) = V_UI4(pVarVal); break;
default: @@ -3204,7 +3204,10 @@ /****************************************************************************** * ICreateTypeLib2_SetLcid {OLEAUT32} * - * See ICreateTypeLib_SetLcid. + * Sets both the lcid and lcid2 members in the header to lcid. + * + * As a special case if lcid == LOCALE_NEUTRAL (0), then the first header lcid + * is set to US English while the second one is set to 0. */ static HRESULT WINAPI ICreateTypeLib2_fnSetLcid(ICreateTypeLib2 * iface, LCID lcid) { @@ -3213,6 +3216,8 @@ TRACE("(%p,%d)\n", iface, lcid);
This->typelib_header.lcid = This->typelib_header.lcid2 = lcid; + + if(lcid == LOCALE_NEUTRAL) This->typelib_header.lcid = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
return S_OK; }
Modified: trunk/reactos/dll/win32/oleaut32/usrmarshal.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/usrmarsh... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -232,7 +232,7 @@ case VT_DECIMAL: return sizeof(DECIMAL); case VT_BSTR: - return sizeof(BSTR); + return sizeof(ULONG); case VT_VARIANT: return sizeof(VARIANT); case VT_UNKNOWN: @@ -764,7 +764,7 @@ HRESULT hr;
size += sizeof(ULONG); - size += FIELD_OFFSET(struct _wireSAFEARRAY, uArrayStructs); + size += 2 * sizeof(USHORT) + 2 * sizeof(ULONG);
sftype = SAFEARRAY_GetUnionType(psa); size += sizeof(ULONG); @@ -850,23 +850,23 @@ VARTYPE vt; SAFEARRAY *psa = *ppsa; ULONG ulCellCount = SAFEARRAY_GetCellCount(psa); - wireSAFEARRAY wiresa; SF_TYPE sftype; GUID guid;
*(ULONG *)Buffer = psa->cDims; Buffer += sizeof(ULONG); - wiresa = (wireSAFEARRAY)Buffer; - wiresa->cDims = psa->cDims; - wiresa->fFeatures = psa->fFeatures; - wiresa->cbElements = psa->cbElements; + *(USHORT *)Buffer = psa->cDims; + Buffer += sizeof(USHORT); + *(USHORT *)Buffer = psa->fFeatures; + Buffer += sizeof(USHORT); + *(ULONG *)Buffer = psa->cbElements; + Buffer += sizeof(ULONG);
hr = SafeArrayGetVartype(psa, &vt); if (FAILED(hr)) vt = 0;
- wiresa->cLocks = (USHORT)psa->cLocks | (vt << 16); - - Buffer += FIELD_OFFSET(struct _wireSAFEARRAY, uArrayStructs); + *(ULONG *)Buffer = (USHORT)psa->cLocks | (vt << 16); + Buffer += sizeof(ULONG);
sftype = SAFEARRAY_GetUnionType(psa); *(ULONG *)Buffer = sftype; @@ -987,7 +987,7 @@ Buffer += sizeof(ULONG);
wiresa = (wireSAFEARRAY)Buffer; - Buffer += FIELD_OFFSET(struct _wireSAFEARRAY, uArrayStructs); + Buffer += 2 * sizeof(USHORT) + 2 * sizeof(ULONG);
if (cDims != wiresa->cDims) RpcRaiseException(RPC_S_INVALID_BOUND);
Modified: trunk/reactos/dll/win32/oleaut32/variant.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/variant.... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/variant.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/variant.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -588,7 +588,7 @@ * * RETURNS * Success: S_OK. Any previous value in pVarg is freed and its type is set to VT_EMPTY. - * Failure: DISP_E_BADVARTYPE, if the variant is a not a valid variant type. + * Failure: DISP_E_BADVARTYPE, if the variant is not a valid variant type. */ HRESULT WINAPI VariantClear(VARIANTARG* pVarg) { @@ -5571,7 +5571,9 @@ V_VT(result) = VT_I8; V_I8(result) = V_I8(&lv) % V_I8(&rv);
- TRACE("V_I8(left) == %ld, V_I8(right) == %ld, V_I8(result) == %ld\n", (long)V_I8(&lv), (long)V_I8(&rv), (long)V_I8(result)); + TRACE("V_I8(left) == %s, V_I8(right) == %s, V_I8(result) == %s\n", + wine_dbgstr_longlong(V_I8(&lv)), wine_dbgstr_longlong(V_I8(&rv)), + wine_dbgstr_longlong(V_I8(result)));
/* convert left and right to the destination type */ rc = VariantChangeType(result, result, 0, resT);
Modified: trunk/reactos/dll/win32/oleaut32/vartype.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/vartype.... ============================================================================== --- trunk/reactos/dll/win32/oleaut32/vartype.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/vartype.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -5787,6 +5787,16 @@ { HRESULT hRet; DECIMAL result; + + if (!pDecLeft || !pDecRight) + return VARCMP_NULL; + + if ((!(DEC_SIGN(pDecLeft) & DECIMAL_NEG)) && (DEC_SIGN(pDecRight) & DECIMAL_NEG) && + (DEC_HI32(pDecLeft) | DEC_MID32(pDecLeft) | DEC_LO32(pDecLeft))) + return VARCMP_GT; + else if ((DEC_SIGN(pDecLeft) & DECIMAL_NEG) && (!(DEC_SIGN(pDecRight) & DECIMAL_NEG)) && + (DEC_HI32(pDecLeft) | DEC_MID32(pDecLeft) | DEC_LO32(pDecLeft))) + return VARCMP_LT;
/* Subtract right from left, and compare the result to 0 */ hRet = VarDecSub(pDecLeft, pDecRight, &result);
Modified: trunk/reactos/dll/win32/olesvr32/olesvr32.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/olesvr32/olesvr32... ============================================================================== --- trunk/reactos/dll/win32/olesvr32/olesvr32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/olesvr32/olesvr32.spec [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -1,6 +1,6 @@ 1 stub WEP 2 stdcall OleRegisterServer(str ptr ptr long long) - 3 stub OleRevokeServer + 3 stdcall OleRevokeServer(long) 4 stdcall OleBlockServer(long) 5 stdcall OleUnblockServer(long ptr) 6 stdcall OleRegisterServerDoc(ptr str ptr ptr)
Modified: trunk/reactos/dll/win32/olesvr32/olesvr_main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/olesvr32/olesvr_m... ============================================================================== --- trunk/reactos/dll/win32/olesvr32/olesvr_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/olesvr32/olesvr_main.c [iso-8859-1] Sat Aug 15 11:29:45 2009 @@ -210,3 +210,13 @@ FIXME("(%d): stub.\n", hDoc); return OLE_OK; } + +/****************************************************************************** + * OleRevokeServer [OLESVR32.3] + * + */ +OLESTATUS WINAPI OleRevokeServer(LHSERVER hServer) +{ + FIXME("(%d): stub.\n", hServer); + return OLE_OK; +}