Author: akhaldi
Date: Tue Jun 7 10:51:58 2016
New Revision: 71581
URL:
http://svn.reactos.org/svn/reactos?rev=71581&view=rev
Log:
[OLEAUT32] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/reactos/dll/win32/oleaut32/oleaut.c
trunk/reactos/dll/win32/oleaut32/oleaut32.spec
trunk/reactos/dll/win32/oleaut32/olepicture.c
trunk/reactos/dll/win32/oleaut32/typelib.c
trunk/reactos/dll/win32/oleaut32/typelib.h
trunk/reactos/dll/win32/oleaut32/variant.c
trunk/reactos/dll/win32/oleaut32/vartype.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/oleaut32/oleaut.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut.…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] Tue Jun 7 10:51:58 2016
@@ -100,7 +100,7 @@
static inline bstr_t *bstr_from_str(BSTR str)
{
- return CONTAINING_RECORD(str, bstr_t, u.str);
+ return CONTAINING_RECORD((void *)str, bstr_t, u.str);
}
static inline bstr_cache_entry_t *get_cache_entry_from_idx(unsigned cache_idx)
Modified: trunk/reactos/dll/win32/oleaut32/oleaut32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut3…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/oleaut32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/oleaut32.spec [iso-8859-1] Tue Jun 7 10:51:58 2016
@@ -374,7 +374,7 @@
419 stdcall OleCreatePictureIndirect(ptr ptr long ptr)
420 stdcall OleCreateFontIndirect(ptr ptr ptr)
421 stdcall OleTranslateColor(long long long)
-422 stub OleLoadPictureFile
+422 stdcall OleLoadPictureFile(int128 ptr)
423 stdcall OleSavePictureFile(ptr wstr)
424 stdcall OleLoadPicturePath(wstr ptr long long ptr ptr)
425 stdcall VarUI4FromI8(int64 ptr)
Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Tue Jun 7 10:51:58 2016
@@ -246,6 +246,18 @@
}
}
+static void OLEPictureImpl_SetEMF(OLEPictureImpl *This)
+{
+ ENHMETAHEADER emh;
+
+ GetEnhMetaFileHeader(This->desc.u.emf.hemf, sizeof(emh), &emh);
+
+ This->origWidth = 0;
+ This->origHeight = 0;
+ This->himetricWidth = emh.rclFrame.right - emh.rclFrame.left;
+ This->himetricHeight = emh.rclFrame.bottom - emh.rclFrame.top;
+}
+
/************************************************************************
* OLEPictureImpl_Construct
*
@@ -326,7 +338,11 @@
case PICTYPE_ICON:
OLEPictureImpl_SetIcon(newObject);
break;
+
case PICTYPE_ENHMETAFILE:
+ OLEPictureImpl_SetEMF(newObject);
+ break;
+
default:
FIXME("Unsupported type %d\n", pictDesc->picType);
newObject->himetricWidth = newObject->himetricHeight = 0;
@@ -616,8 +632,7 @@
TRACE("(%p)->(%p, (%d,%d), (%d,%d) <- (%d,%d), (%d,%d), %p)\n",
This, hdc, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds);
if(prcWBounds)
- TRACE("prcWBounds (%d,%d) - (%d,%d)\n", prcWBounds->left,
prcWBounds->top,
- prcWBounds->right, prcWBounds->bottom);
+ TRACE("prcWBounds %s\n", wine_dbgstr_rect(prcWBounds));
if(cx == 0 || cy == 0 || cxSrc == 0 || cySrc == 0){
return CTL_E_INVALIDPROPERTYVALUE;
@@ -814,19 +829,6 @@
}
/************************************************************************
- * OLEPictureImpl_SaveAsFile
- */
-static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface,
- IStream *pstream,
- BOOL SaveMemCopy,
- LONG *pcbSize)
-{
- OLEPictureImpl *This = impl_from_IPicture(iface);
- FIXME("(%p)->(%p, %d, %p), hacked stub.\n", This, pstream, SaveMemCopy,
pcbSize);
- return IStream_Write(pstream,This->data,This->datalen,(ULONG*)pcbSize);
-}
-
-/************************************************************************
* OLEPictureImpl_get_Attributes
*/
static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface,
@@ -979,23 +981,16 @@
{
BITMAPFILEHEADER *bfh = (BITMAPFILEHEADER*)xbuf;
BITMAPINFO *bi = (BITMAPINFO*)(bfh+1);
- HDC hdcref;
-
- /* Does not matter whether this is a coreheader or not, we only use
- * components which are in both
- */
- hdcref = GetDC(0);
- This->desc.u.bmp.hbitmap = CreateDIBitmap(
- hdcref,
- &(bi->bmiHeader),
- CBM_INIT,
- xbuf+bfh->bfOffBits,
- bi,
- DIB_RGB_COLORS
- );
- ReleaseDC(0, hdcref);
+ void *bits;
+ BITMAP bmp;
+
+ This->desc.u.bmp.hbitmap = CreateDIBSection(0, bi, DIB_RGB_COLORS, &bits,
NULL, 0);
if (This->desc.u.bmp.hbitmap == 0)
return E_FAIL;
+
+ GetObjectA(This->desc.u.bmp.hbitmap, sizeof(bmp), &bmp);
+ memcpy(bits, xbuf + bfh->bfOffBits, bmp.bmHeight * bmp.bmWidthBytes);
+
This->desc.picType = PICTYPE_BITMAP;
OLEPictureImpl_SetBitmap(This);
return S_OK;
@@ -1005,10 +1000,9 @@
{
HRESULT hr;
BITMAPINFOHEADER bih;
- HDC hdcref;
UINT width, height;
UINT stride, buffersize;
- LPBYTE bits=NULL;
+ BYTE *bits;
WICRect rc;
IWICBitmapSource *real_source;
UINT x, y;
@@ -1036,10 +1030,10 @@
stride = 4 * width;
buffersize = stride * height;
- bits = HeapAlloc(GetProcessHeap(), 0, buffersize);
- if (!bits)
+ This->desc.u.bmp.hbitmap = CreateDIBSection(0, (BITMAPINFO*)&bih,
DIB_RGB_COLORS, (void **)&bits, NULL, 0);
+ if (This->desc.u.bmp.hbitmap == 0)
{
- hr = E_OUTOFMEMORY;
+ hr = E_FAIL;
goto end;
}
@@ -1049,21 +1043,8 @@
rc.Height = height;
hr = IWICBitmapSource_CopyPixels(real_source, &rc, stride, buffersize, bits);
if (FAILED(hr))
- goto end;
-
- hdcref = GetDC(0);
- This->desc.u.bmp.hbitmap = CreateDIBitmap(
- hdcref,
- &bih,
- CBM_INIT,
- bits,
- (BITMAPINFO*)&bih,
- DIB_RGB_COLORS);
-
- if (This->desc.u.bmp.hbitmap == 0)
{
- hr = E_FAIL;
- ReleaseDC(0, hdcref);
+ DeleteObject(This->desc.u.bmp.hbitmap);
goto end;
}
@@ -1086,8 +1067,10 @@
if (has_alpha)
{
- HDC hdcBmp, hdcXor, hdcMask;
+ HDC hdcref, hdcBmp, hdcXor, hdcMask;
HBITMAP hbmoldBmp, hbmoldXor, hbmoldMask;
+
+ hdcref = GetDC(0);
This->hbmXor = CreateDIBitmap(
hdcref,
@@ -1118,12 +1101,10 @@
DeleteDC(hdcBmp);
DeleteDC(hdcXor);
DeleteDC(hdcMask);
- }
-
- ReleaseDC(0, hdcref);
+ ReleaseDC(0, hdcref);
+ }
end:
- HeapFree(GetProcessHeap(), 0, bits);
IWICBitmapSource_Release(real_source);
return hr;
}
@@ -1742,6 +1723,17 @@
return success;
}
+static BOOL serializeEMF(HENHMETAFILE hemf, void **buf, unsigned *size)
+{
+ *size = GetEnhMetaFileBits(hemf, 0, NULL);
+ if (!*size) return FALSE;
+
+ *buf = HeapAlloc(GetProcessHeap(), 0, *size);
+ if (!*buf) return FALSE;
+
+ return GetEnhMetaFileBits(hemf, *size, *buf) != 0;
+}
+
static HRESULT WINAPI OLEPictureImpl_Save(
IPersistStream* iface,IStream*pStm,BOOL fClearDirty)
{
@@ -1817,11 +1809,30 @@
IStream_Write(pStm, This->data, This->datalen, &dummy);
hResult = S_OK;
break;
+
+ case PICTYPE_ENHMETAFILE:
+ if (This->bIsDirty || !This->data)
+ {
+ serializeResult = serializeEMF(This->desc.u.emf.hemf, &pIconData,
&iDataSize);
+ if (!serializeResult)
+ {
+ hResult = E_FAIL;
+ break;
+ }
+
+ HeapFree(GetProcessHeap(), 0, This->data);
+ This->data = pIconData;
+ This->datalen = iDataSize;
+ }
+ header[0] = 0x0000746c;
+ header[1] = This->datalen;
+ IStream_Write(pStm, header, 2 * sizeof(DWORD), &dummy);
+ IStream_Write(pStm, This->data, This->datalen, &dummy);
+ hResult = S_OK;
+ break;
+
case PICTYPE_METAFILE:
FIXME("(%p,%p,%d), PICTYPE_METAFILE not
implemented!\n",This,pStm,fClearDirty);
- break;
- case PICTYPE_ENHMETAFILE:
- FIXME("(%p,%p,%d),PICTYPE_ENHMETAFILE not
implemented!\n",This,pStm,fClearDirty);
break;
default:
FIXME("(%p,%p,%d), [unknown type] not
implemented!\n",This,pStm,fClearDirty);
@@ -1839,6 +1850,98 @@
return E_NOTIMPL;
}
+/************************************************************************
+ * OLEPictureImpl_SaveAsFile
+ */
+static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface,
+ IStream *stream, BOOL mem_copy, LONG *size)
+{
+ OLEPictureImpl *This = impl_from_IPicture(iface);
+ void *data;
+ unsigned data_size;
+ ULONG written;
+ HRESULT hr;
+
+ FIXME("(%p)->(%p,%d,%p): semi-stub\n", This, stream, mem_copy, size);
+
+ switch (This->desc.picType)
+ {
+ case PICTYPE_NONE:
+ return S_OK;
+
+ case PICTYPE_ICON:
+ if (!mem_copy) return E_FAIL;
+
+ if (This->bIsDirty || !This->data)
+ {
+ if (!serializeIcon(This->desc.u.icon.hicon, &data, &data_size))
+ return E_FAIL;
+ HeapFree(GetProcessHeap(), 0, This->data);
+ This->data = data;
+ This->datalen = data_size;
+ }
+ hr = IStream_Write(stream, This->data, This->datalen, &written);
+ if (hr == S_OK && size) *size = written;
+ return hr;
+
+ case PICTYPE_BITMAP:
+ if (!mem_copy) return E_FAIL;
+
+ if (This->bIsDirty || !This->data)
+ {
+ switch (This->keepOrigFormat ? This->loadtime_format :
BITMAP_FORMAT_BMP)
+ {
+ case BITMAP_FORMAT_BMP:
+ if (!serializeBMP(This->desc.u.bmp.hbitmap, &data,
&data_size))
+ return E_FAIL;
+ break;
+ case BITMAP_FORMAT_JPEG:
+ FIXME("BITMAP_FORMAT_JPEG is not implemented\n");
+ return E_NOTIMPL;
+ case BITMAP_FORMAT_GIF:
+ FIXME("BITMAP_FORMAT_GIF is not implemented\n");
+ return E_NOTIMPL;
+ case BITMAP_FORMAT_PNG:
+ FIXME("BITMAP_FORMAT_PNG is not implemented\n");
+ return E_NOTIMPL;
+ default:
+ FIXME("PICTYPE_BITMAP/%#x is not implemented\n",
This->loadtime_format);
+ return E_NOTIMPL;
+ }
+
+ HeapFree(GetProcessHeap(), 0, This->data);
+ This->data = data;
+ This->datalen = data_size;
+ }
+ hr = IStream_Write(stream, This->data, This->datalen, &written);
+ if (hr == S_OK && size) *size = written;
+ return hr;
+
+ case PICTYPE_METAFILE:
+ FIXME("PICTYPE_METAFILE is not implemented\n");
+ return E_NOTIMPL;
+
+ case PICTYPE_ENHMETAFILE:
+ if (!mem_copy) return E_FAIL;
+
+ if (This->bIsDirty || !This->data)
+ {
+ if (!serializeEMF(This->desc.u.emf.hemf, &data, &data_size))
+ return E_FAIL;
+ HeapFree(GetProcessHeap(), 0, This->data);
+ This->data = data;
+ This->datalen = data_size;
+ }
+ hr = IStream_Write(stream, This->data, This->datalen, &written);
+ if (hr == S_OK && size) *size = written;
+ return hr;
+
+ default:
+ FIXME("%#x is not implemented\n", This->desc.picType);
+ break;
+ }
+ return E_NOTIMPL;
+}
/************************************************************************
* IDispatch
@@ -2295,6 +2398,72 @@
return hr;
}
+static HRESULT create_stream(const WCHAR *filename, IStream **stream)
+{
+ HANDLE hFile;
+ DWORD dwFileSize;
+ HGLOBAL hGlobal = NULL;
+ DWORD dwBytesRead;
+ HRESULT hr = S_OK;
+
+ hFile = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (hFile == INVALID_HANDLE_VALUE)
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ dwFileSize = GetFileSize(hFile, NULL);
+ if (dwFileSize != INVALID_FILE_SIZE)
+ {
+ hGlobal = GlobalAlloc(GMEM_FIXED, dwFileSize);
+ if (!hGlobal)
+ hr = E_OUTOFMEMORY;
+ else
+ {
+ if (!ReadFile(hFile, hGlobal, dwFileSize, &dwBytesRead, NULL))
+ {
+ GlobalFree(hGlobal);
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ }
+ }
+ }
+
+ CloseHandle(hFile);
+
+ if (FAILED(hr)) return hr;
+
+ hr = CreateStreamOnHGlobal(hGlobal, TRUE, stream);
+ if (FAILED(hr))
+ GlobalFree(hGlobal);
+
+ return hr;
+}
+
+/***********************************************************************
+ * OleLoadPictureFile (OLEAUT32.422)
+ */
+HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
+{
+ IStream *stream;
+ HRESULT hr;
+
+ TRACE("(%s,%p)\n", wine_dbgstr_variant(&filename), picture);
+
+ if (V_VT(&filename) != VT_BSTR)
+ return CTL_E_FILENOTFOUND;
+
+ hr = create_stream(V_BSTR(&filename), &stream);
+ if (hr != S_OK)
+ {
+ if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ return CTL_E_FILENOTFOUND;
+
+ return CTL_E_PATHFILEACCESSERROR;
+ }
+
+ hr = OleLoadPicture(stream, 0, FALSE, &IID_IDispatch, (void **)picture);
+ IStream_Release(stream);
+ return hr;
+}
+
/***********************************************************************
* OleSavePictureFile (OLEAUT32.423)
*/
@@ -2312,16 +2481,8 @@
LPVOID *ppvRet )
{
static const WCHAR file[] = {
'f','i','l','e',':',0 };
- IPicture *ipicture;
- HANDLE hFile;
- DWORD dwFileSize;
- HGLOBAL hGlobal = NULL;
- DWORD dwBytesRead;
IStream *stream;
- BOOL bRead;
- IPersistStream *pStream;
HRESULT hRes;
- HRESULT init_res;
WCHAR *file_candidate;
WCHAR path_buf[MAX_PATH];
@@ -2349,36 +2510,9 @@
/* Handle candidate DOS paths separately. */
if (file_candidate[1] == ':') {
- hFile = CreateFileW(file_candidate, GENERIC_READ, 0, NULL, OPEN_EXISTING,
- 0, NULL);
- if (hFile == INVALID_HANDLE_VALUE)
- return INET_E_RESOURCE_NOT_FOUND;
-
- dwFileSize = GetFileSize(hFile, NULL);
- if (dwFileSize != INVALID_FILE_SIZE )
- {
- hGlobal = GlobalAlloc(GMEM_FIXED,dwFileSize);
- if ( hGlobal)
- {
- bRead = ReadFile(hFile, hGlobal, dwFileSize, &dwBytesRead, NULL) &&
dwBytesRead == dwFileSize;
- if (!bRead)
- {
- GlobalFree(hGlobal);
- hGlobal = 0;
- }
- }
- }
- CloseHandle(hFile);
-
- if (!hGlobal)
+ hRes = create_stream(file_candidate, &stream);
+ if (FAILED(hRes))
return INET_E_RESOURCE_NOT_FOUND;
-
- hRes = CreateStreamOnHGlobal(hGlobal, TRUE, &stream);
- if (FAILED(hRes))
- {
- GlobalFree(hGlobal);
- return hRes;
- }
} else {
IMoniker *pmnk;
IBindCtx *pbc;
@@ -2398,31 +2532,9 @@
return hRes;
}
- init_res = CoInitialize(NULL);
-
- hRes = CoCreateInstance(&CLSID_StdPicture, punkCaller, CLSCTX_INPROC_SERVER,
- &IID_IPicture, (LPVOID*)&ipicture);
- if (SUCCEEDED(hRes)) {
- hRes = IPicture_QueryInterface(ipicture, &IID_IPersistStream,
(LPVOID*)&pStream);
-
- if (SUCCEEDED(hRes)) {
- hRes = IPersistStream_Load(pStream, stream);
-
- if (SUCCEEDED(hRes)) {
- hRes = IPicture_QueryInterface(ipicture, riid, ppvRet);
-
- if (FAILED(hRes))
- ERR("Failed to get interface %s from IPicture.\n",
debugstr_guid(riid));
- }
- IPersistStream_Release(pStream);
- }
- IPicture_Release(ipicture);
- }
+ hRes = OleLoadPicture(stream, 0, FALSE, riid, ppvRet);
IStream_Release(stream);
-
- if (SUCCEEDED(init_res))
- CoUninitialize();
return hRes;
}
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] Tue Jun 7 10:51:58 2016
@@ -3536,6 +3536,10 @@
/* name, eventually add to a hash table */
pTypeLibImpl->Name = MSFT_ReadName(&cx, tlbHeader.NameOffset);
+ TRACE("%s, syskind %d, version %d.%d, flags %04x\n",
+ debugstr_w(pTypeLibImpl->Name->str), pTypeLibImpl->syskind,
+ pTypeLibImpl->ver_major, pTypeLibImpl->ver_minor,
pTypeLibImpl->libflags);
+
/* help info */
pTypeLibImpl->DocString = MSFT_ReadString(&cx, tlbHeader.helpstring);
pTypeLibImpl->HelpFile = MSFT_ReadString(&cx, tlbHeader.helpfile);
@@ -7080,6 +7084,7 @@
UINT cNamedArgs = pDispParams->cNamedArgs;
DISPID *rgdispidNamedArgs = pDispParams->rgdispidNamedArgs;
UINT vargs_converted=0;
+ ULONG_PTR offset;
hres = S_OK;
@@ -7327,7 +7332,11 @@
break;
}
}
- if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed types
here */
+ if (FAILED(hres))
+ {
+ ERR("failed: %08x\n", hres);
+ goto func_fail; /* FIXME: we don't free changed types here */
+ }
/* VT_VOID is a special case for return types, so it is not
* handled in the general function */
@@ -7340,7 +7349,16 @@
if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed
types here */
}
- hres = DispCallFunc(pIUnk, func_desc->oVft & 0xFFFC,
func_desc->callconv,
+ offset = func_desc->oVft & 0xFFFC;
+#ifdef _WIN64
+ if (This->pTypeLib->syskind == SYS_WIN32)
+ {
+ offset *= 2;
+ TRACE("extended offset to %#lx for SYS_WIN32\n", offset);
+ }
+#endif
+ TRACE("func_desc->oVft %#x, offset %#lx\n", func_desc->oVft,
offset);
+ hres = DispCallFunc(pIUnk, offset, func_desc->callconv,
V_VT(&varresult), func_desc->cParams, rgvt,
prgpvarg, &varresult);
Modified: trunk/reactos/dll/win32/oleaut32/typelib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/typelib.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/typelib.h [iso-8859-1] Tue Jun 7 10:51:58 2016
@@ -211,7 +211,7 @@
/* after this may follow an array with default value pointers if the
* appropriate bit in the FKCCIC field has been set:
- * INT oDefautlValue[nrargs];
+ * INT oDefaultValue[nrargs];
*/
/* Parameter info one per argument*/
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] Tue Jun 7 10:51:58 2016
@@ -28,6 +28,15 @@
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(variant);
+
+static CRITICAL_SECTION cache_cs;
+static CRITICAL_SECTION_DEBUG critsect_debug =
+{
+ 0, 0, &cache_cs,
+ { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": cache_cs") }
+};
+static CRITICAL_SECTION cache_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
/* Convert a variant from one type to another */
static inline HRESULT VARIANT_Coerce(VARIANTARG* pd, LCID lcid, USHORT wFlags,
@@ -1474,7 +1483,6 @@
static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID lcid,
DWORD dwFlags)
{
static const VARIANT_NUMBER_CHARS defaultChars = {
'-','+','.',',','$',0,'.',',' };
- static CRITICAL_SECTION csLastChars = { NULL, -1, 0, 0, 0, 0 };
static VARIANT_NUMBER_CHARS lastChars;
static LCID lastLcid = -1;
static DWORD lastFlags = 0;
@@ -1482,14 +1490,14 @@
WCHAR buff[4];
/* To make caching thread-safe, a critical section is needed */
- EnterCriticalSection(&csLastChars);
+ EnterCriticalSection(&cache_cs);
/* Asking for default locale entries is very expensive: It is a registry
server call. So cache one locally, as Microsoft does it too */
if(lcid == lastLcid && dwFlags == lastFlags)
{
memcpy(lpChars, &lastChars, sizeof(defaultChars));
- LeaveCriticalSection(&csLastChars);
+ LeaveCriticalSection(&cache_cs);
return;
}
@@ -1516,7 +1524,7 @@
memcpy(&lastChars, lpChars, sizeof(defaultChars));
lastLcid = lcid;
lastFlags = dwFlags;
- LeaveCriticalSection(&csLastChars);
+ LeaveCriticalSection(&cache_cs);
}
/* Number Parsing States */
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] Tue Jun 7 10:51:58 2016
@@ -7658,11 +7658,13 @@
/* Parse the string into our structure */
while (*strIn)
{
- if (dp.dwCount >= 6)
- break;
-
if (isdigitW(*strIn))
{
+ if (dp.dwCount >= 6)
+ {
+ hRet = DISP_E_TYPEMISMATCH;
+ break;
+ }
dp.dwValues[dp.dwCount] = strtoulW(strIn, &strIn, 10);
dp.dwCount++;
strIn--;
@@ -7678,9 +7680,14 @@
{
if (i <= 25)
{
- dp.dwValues[dp.dwCount] = ParseDateMonths[i];
- dp.dwFlags[dp.dwCount] |= (DP_MONTH|DP_DATESEP);
- dp.dwCount++;
+ if (dp.dwCount >= 6)
+ hRet = DISP_E_TYPEMISMATCH;
+ else
+ {
+ dp.dwValues[dp.dwCount] = ParseDateMonths[i];
+ dp.dwFlags[dp.dwCount] |= (DP_MONTH|DP_DATESEP);
+ dp.dwCount++;
+ }
}
else if (i > 39 && i < 42)
{
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Jun 7 10:51:58 2016
@@ -144,7 +144,7 @@
reactos/dll/win32/odbccp32 # Synced to WineStaging-1.9.4
reactos/dll/win32/ole32 # Synced to WineStaging-1.9.11
reactos/dll/win32/oleacc # Synced to WineStaging-1.9.4
-reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.4
+reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.11
reactos/dll/win32/olecli32 # Synced to WineStaging-1.9.4
reactos/dll/win32/oledlg # Synced to WineStaging-1.9.4
reactos/dll/win32/olepro32 # Synced to WineStaging-1.9.4