mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- Sync oleacc, oleaut32, olesvr32 with Wine 1.1.27
svn path=/trunk/; revision=42681
This commit is contained in:
parent
76426a56bd
commit
3631591a72
12 changed files with 64 additions and 34 deletions
|
@ -40,6 +40,12 @@ HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject,
|
|||
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;
|
||||
}
|
||||
|
||||
LRESULT WINAPI LresultFromObject( REFIID riid, WPARAM wParam, LPUNKNOWN pAcc )
|
||||
{
|
||||
FIXME("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc );
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -132,8 +132,8 @@ struct OLEFontImpl
|
|||
/*
|
||||
* Size ratio
|
||||
*/
|
||||
long cyLogical;
|
||||
long cyHimetric;
|
||||
LONG cyLogical;
|
||||
LONG cyHimetric;
|
||||
|
||||
IConnectionPoint *pPropertyNotifyCP;
|
||||
IConnectionPoint *pFontEventsCP;
|
||||
|
|
|
@ -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 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
|
|||
if (pixel == (transparent & 0x000000FFU)) monoPointer[j >> 3] |= 1 << (7 - (j & 7));
|
||||
}
|
||||
}
|
||||
hdcref = GetDC(0);
|
||||
hTempMask = CreateDIBitmap(
|
||||
hdcref,
|
||||
&bmi->bmiHeader,
|
||||
|
@ -1238,7 +1240,6 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
|
|||
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 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
|
|||
DeleteObject(hTempMask);
|
||||
}
|
||||
|
||||
DeleteDC(hdcref);
|
||||
ReleaseDC(0, hdcref);
|
||||
This->desc.picType = PICTYPE_BITMAP;
|
||||
OLEPictureImpl_SetBitmap(This);
|
||||
DGifCloseFile(gif);
|
||||
|
@ -1366,7 +1367,7 @@ static HRESULT OLEPictureImpl_LoadJpeg(OLEPictureImpl *This, BYTE *xbuf, ULONG x
|
|||
(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 @@ static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
|
|||
bi,
|
||||
DIB_RGB_COLORS
|
||||
);
|
||||
DeleteDC(hdcref);
|
||||
ReleaseDC(0, hdcref);
|
||||
if (This->desc.u.bmp.hbitmap == 0)
|
||||
return E_FAIL;
|
||||
This->desc.picType = PICTYPE_BITMAP;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef WINE_OLEAUT32_RESOURCE_H
|
||||
#define WINE_OLEAUT32_RESOURCE_H
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
/* Localised boolean text */
|
||||
#define IDS_TRUE 100
|
||||
#define IDS_FALSE 101
|
||||
|
|
|
@ -938,7 +938,7 @@ typedef struct tagITypeLibImpl
|
|||
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 @@ typedef struct tagITypeInfoImpl
|
|||
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 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
|
|||
/* 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);
|
||||
|
|
|
@ -760,7 +760,7 @@ static int ctl2_alloc_custdata(
|
|||
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 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetHelpContext(ICreateTypeLib2 * iface,
|
|||
/******************************************************************************
|
||||
* 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)
|
||||
{
|
||||
|
@ -3214,6 +3217,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetLcid(ICreateTypeLib2 * iface, LCID lc
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ static unsigned int get_type_size(ULONG *pFlags, VARTYPE vt)
|
|||
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 @@ ULONG WINAPI LPSAFEARRAY_UserSize(ULONG *pFlags, ULONG StartingSize, LPSAFEARRAY
|
|||
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 @@ unsigned char * WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buf
|
|||
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 @@ unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *B
|
|||
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);
|
||||
|
|
|
@ -588,7 +588,7 @@ void WINAPI VariantInit(VARIANTARG* pVarg)
|
|||
*
|
||||
* 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 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
|
|||
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);
|
||||
|
|
|
@ -5788,6 +5788,16 @@ HRESULT WINAPI VarDecCmp(const DECIMAL* pDecLeft, const DECIMAL* pDecRight)
|
|||
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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -210,3 +210,13 @@ OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC hDoc)
|
|||
FIXME("(%d): stub.\n", hDoc);
|
||||
return OLE_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* OleRevokeServer [OLESVR32.3]
|
||||
*
|
||||
*/
|
||||
OLESTATUS WINAPI OleRevokeServer(LHSERVER hServer)
|
||||
{
|
||||
FIXME("(%d): stub.\n", hServer);
|
||||
return OLE_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue