mirror of
https://github.com/reactos/reactos.git
synced 2025-05-17 16:27:00 +00:00
- Sync ole32, oleacc, oleaut32 with Wine 1.1.21
svn path=/trunk/; revision=40849
This commit is contained in:
parent
0ef4ce7310
commit
cc308abba4
8 changed files with 248 additions and 13 deletions
|
@ -1197,7 +1197,7 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
|
|||
hr = get_stgmed_for_stream(h, med);
|
||||
else
|
||||
{
|
||||
FIXME("Unhandled tymed - emum tymed %x req tymed %x\n", entry->fmtetc.tymed, fmt->tymed);
|
||||
FIXME("Unhandled tymed - mask %x req tymed %x\n", mask, fmt->tymed);
|
||||
hr = E_FAIL;
|
||||
goto end;
|
||||
}
|
||||
|
@ -1214,8 +1214,108 @@ end:
|
|||
static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
|
||||
STGMEDIUM *med)
|
||||
{
|
||||
FIXME("(%p, %p {%s}, %p): stub\n", iface, fmt, dump_fmtetc(fmt), med);
|
||||
return E_NOTIMPL;
|
||||
snapshot *This = impl_from_IDataObject(iface);
|
||||
HANDLE h;
|
||||
HRESULT hr;
|
||||
ole_priv_data *enum_data = NULL;
|
||||
ole_priv_data_entry *entry;
|
||||
TYMED supported;
|
||||
|
||||
TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
|
||||
|
||||
if ( !fmt || !med ) return E_INVALIDARG;
|
||||
|
||||
if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
|
||||
|
||||
if(!This->data)
|
||||
hr = get_current_dataobject(&This->data);
|
||||
|
||||
if(This->data)
|
||||
{
|
||||
hr = IDataObject_GetDataHere(This->data, fmt, med);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
CloseClipboard();
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
h = GetClipboardData(fmt->cfFormat);
|
||||
if(!h)
|
||||
{
|
||||
hr = DV_E_FORMATETC;
|
||||
goto end;
|
||||
}
|
||||
|
||||
hr = get_priv_data(&enum_data);
|
||||
if(FAILED(hr)) goto end;
|
||||
|
||||
entry = find_format_in_list(enum_data->entries, enum_data->count, fmt->cfFormat);
|
||||
if(entry)
|
||||
{
|
||||
if(!td_equal(fmt->ptd, entry->fmtetc.ptd))
|
||||
{
|
||||
hr = DV_E_FORMATETC;
|
||||
goto end;
|
||||
}
|
||||
supported = entry->fmtetc.tymed;
|
||||
}
|
||||
else /* non-Ole format */
|
||||
supported = TYMED_HGLOBAL;
|
||||
|
||||
switch(med->tymed)
|
||||
{
|
||||
case TYMED_HGLOBAL:
|
||||
{
|
||||
DWORD src_size = GlobalSize(h);
|
||||
DWORD dst_size = GlobalSize(med->u.hGlobal);
|
||||
hr = E_FAIL;
|
||||
if(dst_size >= src_size)
|
||||
{
|
||||
void *src = GlobalLock(h);
|
||||
void *dst = GlobalLock(med->u.hGlobal);
|
||||
|
||||
memcpy(dst, src, src_size);
|
||||
GlobalUnlock(med->u.hGlobal);
|
||||
GlobalUnlock(h);
|
||||
hr = S_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYMED_ISTREAM:
|
||||
{
|
||||
DWORD src_size = GlobalSize(h);
|
||||
void *src = GlobalLock(h);
|
||||
hr = IStream_Write(med->u.pstm, src, src_size, NULL);
|
||||
GlobalUnlock(h);
|
||||
break;
|
||||
}
|
||||
case TYMED_ISTORAGE:
|
||||
{
|
||||
STGMEDIUM copy;
|
||||
if(!(supported & TYMED_ISTORAGE))
|
||||
{
|
||||
hr = E_FAIL;
|
||||
goto end;
|
||||
}
|
||||
hr = get_stgmed_for_storage(h, ©);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IStorage_CopyTo(copy.u.pstg, 0, NULL, NULL, med->u.pstg);
|
||||
ReleaseStgMedium(©);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("Unhandled tymed - supported %x req tymed %x\n", supported, med->tymed);
|
||||
hr = E_FAIL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
end:
|
||||
HeapFree(GetProcessHeap(), 0, enum_data);
|
||||
if ( !CloseClipboard() ) hr = CLIPBRD_E_CANT_CLOSE;
|
||||
return hr;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -493,6 +493,31 @@ static APARTMENT *apartment_findmain(void)
|
|||
return result;
|
||||
}
|
||||
|
||||
/* gets the multi-threaded apartment if it exists. The caller must
|
||||
* release the reference from the apartment as soon as the apartment pointer
|
||||
* is no longer required. */
|
||||
static APARTMENT *apartment_find_multi_threaded(void)
|
||||
{
|
||||
APARTMENT *result = NULL;
|
||||
struct list *cursor;
|
||||
|
||||
EnterCriticalSection(&csApartment);
|
||||
|
||||
LIST_FOR_EACH( cursor, &apts )
|
||||
{
|
||||
struct apartment *apt = LIST_ENTRY( cursor, struct apartment, entry );
|
||||
if (apt->multi_threaded)
|
||||
{
|
||||
result = apt;
|
||||
apartment_addref(result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&csApartment);
|
||||
return result;
|
||||
}
|
||||
|
||||
struct host_object_params
|
||||
{
|
||||
HKEY hkeydll;
|
||||
|
@ -2237,6 +2262,7 @@ HRESULT WINAPI CoGetClassObject(
|
|||
LPUNKNOWN regClassObject;
|
||||
HRESULT hres = E_UNEXPECTED;
|
||||
APARTMENT *apt;
|
||||
BOOL release_apt = FALSE;
|
||||
|
||||
TRACE("\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid));
|
||||
|
||||
|
@ -2245,11 +2271,14 @@ HRESULT WINAPI CoGetClassObject(
|
|||
|
||||
*ppv = NULL;
|
||||
|
||||
apt = COM_CurrentApt();
|
||||
if (!apt)
|
||||
if (!(apt = COM_CurrentApt()))
|
||||
{
|
||||
ERR("apartment not initialised\n");
|
||||
return CO_E_NOTINITIALIZED;
|
||||
if (!(apt = apartment_find_multi_threaded()))
|
||||
{
|
||||
ERR("apartment not initialised\n");
|
||||
return CO_E_NOTINITIALIZED;
|
||||
}
|
||||
release_apt = TRUE;
|
||||
}
|
||||
|
||||
if (pServerInfo) {
|
||||
|
@ -2273,7 +2302,7 @@ HRESULT WINAPI CoGetClassObject(
|
|||
* is good since we are not returning it in the "out" parameter.
|
||||
*/
|
||||
IUnknown_Release(regClassObject);
|
||||
|
||||
if (release_apt) apartment_release(apt);
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
@ -2284,7 +2313,10 @@ HRESULT WINAPI CoGetClassObject(
|
|||
HKEY hkey;
|
||||
|
||||
if (IsEqualCLSID(rclsid, &CLSID_InProcFreeMarshaler))
|
||||
{
|
||||
if (release_apt) apartment_release(apt);
|
||||
return FTMarshalCF_Create(iid, ppv);
|
||||
}
|
||||
|
||||
hres = COM_OpenKeyForCLSID(rclsid, wszInprocServer32, KEY_READ, &hkey);
|
||||
if (FAILED(hres))
|
||||
|
@ -2308,7 +2340,10 @@ HRESULT WINAPI CoGetClassObject(
|
|||
/* return if we got a class, otherwise fall through to one of the
|
||||
* other types */
|
||||
if (SUCCEEDED(hres))
|
||||
{
|
||||
if (release_apt) apartment_release(apt);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
|
||||
/* Next try in-process handler */
|
||||
|
@ -2339,8 +2374,12 @@ HRESULT WINAPI CoGetClassObject(
|
|||
/* return if we got a class, otherwise fall through to one of the
|
||||
* other types */
|
||||
if (SUCCEEDED(hres))
|
||||
{
|
||||
if (release_apt) apartment_release(apt);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
if (release_apt) apartment_release(apt);
|
||||
|
||||
/* Next try out of process */
|
||||
if (CLSCTX_LOCAL_SERVER & dwClsContext)
|
||||
|
@ -2418,6 +2457,7 @@ HRESULT WINAPI CoCreateInstance(
|
|||
{
|
||||
HRESULT hres;
|
||||
LPCLASSFACTORY lpclf = 0;
|
||||
APARTMENT *apt;
|
||||
|
||||
TRACE("(rclsid=%s, pUnkOuter=%p, dwClsContext=%08x, riid=%s, ppv=%p)\n", debugstr_guid(rclsid),
|
||||
pUnkOuter, dwClsContext, debugstr_guid(iid), ppv);
|
||||
|
@ -2433,10 +2473,14 @@ HRESULT WINAPI CoCreateInstance(
|
|||
*/
|
||||
*ppv = 0;
|
||||
|
||||
if (!COM_CurrentApt())
|
||||
if (!(apt = COM_CurrentApt()))
|
||||
{
|
||||
if (!(apt = apartment_find_multi_threaded()))
|
||||
{
|
||||
ERR("apartment not initialised\n");
|
||||
return CO_E_NOTINITIALIZED;
|
||||
}
|
||||
apartment_release(apt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -160,7 +160,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
|
|||
return S_OK;
|
||||
}
|
||||
/* It is not our lockbytes implementation, so use a more generic way */
|
||||
hres = ILockBytes_Stat(plkbyt,&stbuf,0);
|
||||
hres = ILockBytes_Stat(plkbyt,&stbuf,STATFLAG_NONAME);
|
||||
if (hres != S_OK) {
|
||||
ERR("Cannot ILockBytes_Stat, %x\n",hres);
|
||||
return hres;
|
||||
|
|
|
@ -1904,7 +1904,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
|
|||
|
||||
TRACE("marshalling IClassFactory to client\n");
|
||||
|
||||
hres = IStream_Stat(pStm,&ststg,0);
|
||||
hres = IStream_Stat(pStm,&ststg,STATFLAG_NONAME);
|
||||
if (hres) return hres;
|
||||
|
||||
seekto.u.LowPart = 0;
|
||||
|
|
|
@ -6310,7 +6310,7 @@ HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid){
|
|||
/*
|
||||
* read a STATSTG structure (contains the clsid) from the storage
|
||||
*/
|
||||
hRes=IStorage_Stat(pstg,&pstatstg,STATFLAG_DEFAULT);
|
||||
hRes=IStorage_Stat(pstg,&pstatstg,STATFLAG_NONAME);
|
||||
|
||||
if(SUCCEEDED(hRes))
|
||||
*pclsid=pstatstg.clsid;
|
||||
|
|
|
@ -25,3 +25,4 @@
|
|||
#include "oleacc_Fr.rc"
|
||||
#include "oleacc_Ko.rc"
|
||||
#include "oleacc_Nl.rc"
|
||||
#include "oleacc_Pl.rc"
|
||||
|
|
90
reactos/dll/win32/oleacc/oleacc_Pl.rc
Normal file
90
reactos/dll/win32/oleacc/oleacc_Pl.rc
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Polish resources for oleacc
|
||||
*
|
||||
* Copyright 2009 Łukasz Wojniłowicz
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
0 "unknown object" /* undocumented */
|
||||
ROLE_SYSTEM_TITLEBAR "pasek tytułu"
|
||||
ROLE_SYSTEM_MENUBAR "pasek menu"
|
||||
ROLE_SYSTEM_SCROLLBAR "pasek przewijania"
|
||||
ROLE_SYSTEM_GRIP "grip"
|
||||
ROLE_SYSTEM_SOUND "dźwięk"
|
||||
ROLE_SYSTEM_CURSOR "kursor"
|
||||
ROLE_SYSTEM_CARET "daszek"
|
||||
ROLE_SYSTEM_ALERT "ostrzeżenie"
|
||||
ROLE_SYSTEM_WINDOW "okno"
|
||||
ROLE_SYSTEM_CLIENT "klient"
|
||||
ROLE_SYSTEM_MENUPOPUP "menu rozwijane"
|
||||
ROLE_SYSTEM_MENUITEM "element menu"
|
||||
ROLE_SYSTEM_TOOLTIP "podpowiedź"
|
||||
ROLE_SYSTEM_APPLICATION "aplikacja"
|
||||
ROLE_SYSTEM_DOCUMENT "dokument"
|
||||
ROLE_SYSTEM_PANE "pane"
|
||||
ROLE_SYSTEM_CHART "wykres"
|
||||
ROLE_SYSTEM_DIALOG "dialog"
|
||||
ROLE_SYSTEM_BORDER "obramowanie"
|
||||
ROLE_SYSTEM_GROUPING "grupowanie"
|
||||
ROLE_SYSTEM_SEPARATOR "separator"
|
||||
ROLE_SYSTEM_TOOLBAR "pasek narzędzi"
|
||||
ROLE_SYSTEM_STATUSBAR "pasek stanu"
|
||||
ROLE_SYSTEM_TABLE "tabela"
|
||||
ROLE_SYSTEM_COLUMNHEADER "nagłówek kolumny"
|
||||
ROLE_SYSTEM_ROWHEADER "nagłówek wiersza"
|
||||
ROLE_SYSTEM_COLUMN "kolumna"
|
||||
ROLE_SYSTEM_ROW "wiersz"
|
||||
ROLE_SYSTEM_CELL "komórka"
|
||||
ROLE_SYSTEM_LINK "link"
|
||||
ROLE_SYSTEM_HELPBALLOON "dymek pomocy"
|
||||
ROLE_SYSTEM_CHARACTER "znak"
|
||||
ROLE_SYSTEM_LIST "lista"
|
||||
ROLE_SYSTEM_LISTITEM "element listy"
|
||||
ROLE_SYSTEM_OUTLINE "zarys"
|
||||
ROLE_SYSTEM_OUTLINEITEM "element zarysu"
|
||||
ROLE_SYSTEM_PAGETAB "page tab"
|
||||
ROLE_SYSTEM_PROPERTYPAGE "strona właściwości"
|
||||
ROLE_SYSTEM_INDICATOR "wskaźnik"
|
||||
ROLE_SYSTEM_GRAPHIC "grafika"
|
||||
ROLE_SYSTEM_STATICTEXT "tekst statyczny"
|
||||
ROLE_SYSTEM_TEXT "tekst"
|
||||
ROLE_SYSTEM_PUSHBUTTON "przycisk"
|
||||
ROLE_SYSTEM_CHECKBUTTON "przycisk zaznaczany"
|
||||
ROLE_SYSTEM_RADIOBUTTON "przycisk opcji"
|
||||
ROLE_SYSTEM_COMBOBOX "pole kombi"
|
||||
ROLE_SYSTEM_DROPLIST "lista rozwijana"
|
||||
ROLE_SYSTEM_PROGRESSBAR "pasek postępu"
|
||||
ROLE_SYSTEM_DIAL "dial"
|
||||
ROLE_SYSTEM_HOTKEYFIELD "hot key field"
|
||||
ROLE_SYSTEM_SLIDER "suwak"
|
||||
ROLE_SYSTEM_SPINBUTTON "spin box"
|
||||
ROLE_SYSTEM_DIAGRAM "diagram"
|
||||
ROLE_SYSTEM_ANIMATION "animacja"
|
||||
ROLE_SYSTEM_EQUATION "równanie"
|
||||
ROLE_SYSTEM_BUTTONDROPDOWN "przycisk rozwijany"
|
||||
ROLE_SYSTEM_BUTTONMENU "przycisk menu"
|
||||
ROLE_SYSTEM_BUTTONDROPDOWNGRID "siatka przycisków rozwijanych"
|
||||
ROLE_SYSTEM_WHITESPACE "biała spacja"
|
||||
ROLE_SYSTEM_PAGETABLIST "page tab list"
|
||||
ROLE_SYSTEM_CLOCK "zegar"
|
||||
ROLE_SYSTEM_SPLITBUTTON "przycisk rozdzielania"
|
||||
ROLE_SYSTEM_IPADDRESS "adres IP"
|
||||
ROLE_SYSTEM_OUTLINEBUTTON "przycisk zarysu"
|
||||
}
|
|
@ -213,7 +213,7 @@ _marshal_interface(marshal_state *buf, REFIID riid, LPUNKNOWN pUnk) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
hres = IStream_Stat(pStm,&ststg,0);
|
||||
hres = IStream_Stat(pStm,&ststg,STATFLAG_NONAME);
|
||||
if (hres) {
|
||||
ERR("Stream stat failed\n");
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in a new issue