ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2004
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
824 discussions
Start a n
N
ew thread
[gvg] 12601: Tag Wine-20041201
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/shdocvw/Wine-20041201/ _____ Copied: vendor/wine/dlls/shdocvw/Wine-20041201 (from rev 12600, vendor/wine/dlls/shdocvw/current)
19 years, 12 months
1
0
0
0
[gvg] 12600: Wine-20041201 vendor drop
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/shdocvw/ Added: vendor/wine/dlls/shdocvw/current/ Added: vendor/wine/dlls/shdocvw/current/Makefile.in Added: vendor/wine/dlls/shdocvw/current/classinfo.c Added: vendor/wine/dlls/shdocvw/current/events.c Added: vendor/wine/dlls/shdocvw/current/factory.c Added: vendor/wine/dlls/shdocvw/current/misc.c Added: vendor/wine/dlls/shdocvw/current/oleobject.c Added: vendor/wine/dlls/shdocvw/current/persist.c Added: vendor/wine/dlls/shdocvw/current/regsvr.c Added: vendor/wine/dlls/shdocvw/current/shdocvw.h Added: vendor/wine/dlls/shdocvw/current/shdocvw.rc Added: vendor/wine/dlls/shdocvw/current/shdocvw.spec Added: vendor/wine/dlls/shdocvw/current/shdocvw_main.c Added: vendor/wine/dlls/shdocvw/current/version.rc Added: vendor/wine/dlls/shdocvw/current/webbrowser.c _____ Added: vendor/wine/dlls/shdocvw/current/Makefile.in --- vendor/wine/dlls/shdocvw/current/Makefile.in 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/Makefile.in 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,25 @@ +EXTRADEFS = -D_SHDOCVW_ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = shdocvw.dll +IMPORTS = urlmon ole32 user32 advapi32 kernel32 +EXTRALIBS = -luuid + +C_SRCS = \ + classinfo.c \ + events.c \ + factory.c \ + misc.c \ + oleobject.c \ + persist.c \ + regsvr.c \ + shdocvw_main.c \ + webbrowser.c + +RC_SRCS = shdocvw.rc + +@MAKE_DLL_RULES@ + +### Dependencies: _____ Added: vendor/wine/dlls/shdocvw/current/classinfo.c --- vendor/wine/dlls/shdocvw/current/classinfo.c 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/classinfo.c 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,170 @@ +/* + * Implementation of IProvideClassInfo interfaces for IE Web Browser control + * + * Copyright 2001 John R. Sheets (for CodeWeavers) + * + * 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 + */ + +#include <stdarg.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "shdocvw.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +/********************************************************************** + * Implement the IProvideClassInfo interface + * + * FIXME: Should we just pass in the IProvideClassInfo2 methods rather + * reimplementing them here? + */ + +static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface, + REFIID riid, LPVOID *ppobj) +{ + IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface; + + FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface) +{ + IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface) +{ + IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/* Return an ITypeInfo interface to retrieve type library info about + * this control. + */ +static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI) +{ + FIXME("stub: LPTYPEINFO = %p\n", *ppTI); + return S_OK; +} + +/********************************************************************** + * IProvideClassInfo virtual function table for IE Web Browser component + */ + +static IProvideClassInfoVtbl WBPCI_Vtbl = +{ + WBPCI_QueryInterface, + WBPCI_AddRef, + WBPCI_Release, + WBPCI_GetClassInfo +}; + +IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 }; + + +/********************************************************************** + * Implement the IProvideClassInfo2 interface (inherits from + * IProvideClassInfo). + */ + +static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface, + REFIID riid, LPVOID *ppobj) +{ + IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface; + + FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface) +{ + IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface) +{ + IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/* Return an ITypeInfo interface to retrieve type library info about + * this control. + */ +static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI) +{ + FIXME("stub: LPTYPEINFO = %p\n", *ppTI); + return S_OK; +} + +/* Get the IID for generic default event callbacks. This IID will + * in theory be used to later query for an IConnectionPoint to connect + * an event sink (callback implementation in the OLE control site) + * to this control. +*/ +static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface, + DWORD dwGuidKind, GUID *pGUID) +{ + FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID)); + + if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) + { + FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind); + return E_FAIL; /* Is there a better return type here? */ + } + + /* FIXME: Returning IPropertyNotifySink interface, but should really + * return a more generic event set (???) dispinterface. + * However, this hack, allows a control site to return with success + * (MFC's COleControlSite falls back to older IProvideClassInfo interface + * if GetGUID() fails to return a non-NULL GUID). + */ + memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID)); + FIXME("Wrongly returning IPropertyNotifySink interface %s\n", + debugstr_guid(pGUID)); + + return S_OK; +} + +/********************************************************************** + * IProvideClassInfo virtual function table for IE Web Browser component + */ + +static IProvideClassInfo2Vtbl WBPCI2_Vtbl = +{ + WBPCI2_QueryInterface, + WBPCI2_AddRef, + WBPCI2_Release, + WBPCI2_GetClassInfo, + WBPCI2_GetGUID +}; + +IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 }; _____ Added: vendor/wine/dlls/shdocvw/current/events.c --- vendor/wine/dlls/shdocvw/current/events.c 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/events.c 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,212 @@ +/* + * Implementation of event-related interfaces for IE Web Browser control: + * + * - IConnectionPointContainer + * - IConnectionPoint + * + * Copyright 2001 John R. Sheets (for CodeWeavers) + * + * 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 + */ + +#include <string.h> +#include "wine/debug.h" +#include "shdocvw.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + + +static const GUID IID_INotifyDBEvents = + { 0xdb526cc0, 0xd188, 0x11cd, { 0xad, 0x48, 0x00, 0xaa, 0x00, 0x3c, 0x9c, 0xb6 } }; + +/********************************************************************** + * Implement the IConnectionPointContainer interface + */ + +static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface, + REFIID riid, LPVOID *ppobj) +{ + IConnectionPointContainerImpl *This = (IConnectionPointContainerImpl *)iface; + + FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface) +{ + IConnectionPointContainerImpl *This = (IConnectionPointContainerImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface) +{ + IConnectionPointContainerImpl *This = (IConnectionPointContainerImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/* Get a list of connection points inside this container. */ +static HRESULT WINAPI WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface, + LPENUMCONNECTIONPOINTS *ppEnum) +{ + FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum); + return S_OK; +} + +/* Retrieve the connection point in this container associated with the + * riid interface. When events occur in the control, the control can + * call backwards into its embedding site, through these interfaces. + */ +static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface, + REFIID riid, LPCONNECTIONPOINT *ppCP) +{ + TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid), *ppCP); + + /* For now, return the same IConnectionPoint object for both + * event interface requests. + */ + if (IsEqualGUID (&IID_INotifyDBEvents, riid)) + { + TRACE("Returning connection point %p for IID_INotifyDBEvents\n", + &SHDOCVW_ConnectionPoint); + *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint; + return S_OK; + } + else if (IsEqualGUID (&IID_IPropertyNotifySink, riid)) + { + TRACE("Returning connection point %p for IID_IPropertyNotifySink\n", + &SHDOCVW_ConnectionPoint); + *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint; + return S_OK; + } + + return E_FAIL; +} + +/********************************************************************** + * IConnectionPointContainer virtual function table for IE Web Browser component + */ + +static IConnectionPointContainerVtbl WBCPC_Vtbl = +{ + WBCPC_QueryInterface, + WBCPC_AddRef, + WBCPC_Release, + WBCPC_EnumConnectionPoints, + WBCPC_FindConnectionPoint +}; + +IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer = { &WBCPC_Vtbl, 1 }; + + +/********************************************************************** + * Implement the IConnectionPoint interface + */ + +static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface, + REFIID riid, LPVOID *ppobj) +{ + IConnectionPointImpl *This = (IConnectionPointImpl *)iface; + + FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface) +{ + IConnectionPointImpl *This = (IConnectionPointImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface) +{ + IConnectionPointImpl *This = (IConnectionPointImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId) +{ + FIXME("stub: %s\n", debugstr_guid(pIId)); + return S_OK; +} + +/* Get this connection point's owning container */ +static HRESULT WINAPI +WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface, + LPCONNECTIONPOINTCONTAINER *ppCPC) +{ + FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC); + return S_OK; +} + +/* Connect the pUnkSink event-handling implementation (in the control site) + * to this connection point. Return a handle to this connection in + * pdwCookie (for later use in Unadvise()). + */ +static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface, + LPUNKNOWN pUnkSink, DWORD *pdwCookie) +{ + static int new_cookie; + + FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie); + + *pdwCookie = ++new_cookie; + TRACE ("Returning cookie = %ld\n", *pdwCookie); + + return S_OK; +} + +/* Disconnect this implementation from the connection point. */ +static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface, + DWORD dwCookie) +{ + FIXME("stub: cookie to disconnect = %lx\n", dwCookie); + return S_OK; +} + +/* Get a list of connections in this connection point. */ +static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface, + LPENUMCONNECTIONS *ppEnum) +{ + FIXME("stub: IEnumConnections = %p\n", *ppEnum); + return S_OK; +} + +/********************************************************************** + * IConnectionPoint virtual function table for IE Web Browser component + */ + +static IConnectionPointVtbl WBCP_Vtbl = +{ + WBCP_QueryInterface, + WBCP_AddRef, + WBCP_Release, + WBCP_GetConnectionInterface, + WBCP_GetConnectionPointContainer, + WBCP_Advise, + WBCP_Unadvise, + WBCP_EnumConnections +}; + +IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 }; _____ Added: vendor/wine/dlls/shdocvw/current/factory.c --- vendor/wine/dlls/shdocvw/current/factory.c 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/factory.c 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,121 @@ +/* + * Implementation of class factory for IE Web Browser + * + * Copyright 2001 John R. Sheets (for CodeWeavers) + * + * 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 + */ + +#include <string.h> +#include "wine/debug.h" +#include "shdocvw.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +/********************************************************************** + * Implement the IWebBrowser class factory + * + * (Based on implementation in ddraw/main.c) + */ + +/********************************************************************** + * WBCF_QueryInterface (IUnknown) + */ +static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface, + REFIID riid, LPVOID *ppobj) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + TRACE ("\n"); + + /* + * Perform a sanity check on the parameters. + */ + if ((This == NULL) || (ppobj == NULL) ) + return E_INVALIDARG; + + return E_NOINTERFACE; +} + +/********************************************************************** ** + * WBCF_AddRef (IUnknown) + */ +static ULONG WINAPI WBCF_AddRef(LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +/********************************************************************** ** + * WBCF_Release (IUnknown) + */ +static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/********************************************************************** ** + * WBCF_CreateInstance (IClassFactory) + */ +static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, + REFIID riid, LPVOID *ppobj) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + + /* Don't support aggregation (yet?) */ + if (pOuter) + { + TRACE ("Failed attempt to aggregate IWebBrowser\n"); + return CLASS_E_NOAGGREGATION; + } + + TRACE("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj); + + if ((IsEqualGUID (&IID_IOleObject, riid))) + { + TRACE ("Instantiating IOleObject component\n"); + *ppobj = (LPVOID)&SHDOCVW_OleObject; + + return S_OK; + } + return CLASS_E_CLASSNOTAVAILABLE; +} + +/********************************************************************** ** + * WBCF_LockServer (IClassFactory) + */ +static HRESULT WINAPI WBCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) +{ + IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + FIXME("(%p)->(%d),stub!\n", This, dolock); + return S_OK; +} + +static IClassFactoryVtbl WBCF_Vtbl = +{ + WBCF_QueryInterface, + WBCF_AddRef, + WBCF_Release, + WBCF_CreateInstance, + WBCF_LockServer +}; + +IClassFactoryImpl SHDOCVW_ClassFactory = { &WBCF_Vtbl, 1 }; _____ Added: vendor/wine/dlls/shdocvw/current/misc.c --- vendor/wine/dlls/shdocvw/current/misc.c 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/misc.c 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,93 @@ +/* + * Implementation of miscellaneous interfaces for IE Web Browser control: + * + * - IQuickActivate + * + * Copyright 2001 John R. Sheets (for CodeWeavers) + * + * 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 + */ + +#include "wine/debug.h" +#include "shdocvw.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +/********************************************************************** + * Implement the IQuickActivate interface + */ + +static HRESULT WINAPI WBQA_QueryInterface(LPQUICKACTIVATE iface, + REFIID riid, LPVOID *ppobj) +{ + IQuickActivateImpl *This = (IQuickActivateImpl *)iface; + + FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI WBQA_AddRef(LPQUICKACTIVATE iface) +{ + IQuickActivateImpl *This = (IQuickActivateImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +static ULONG WINAPI WBQA_Release(LPQUICKACTIVATE iface) +{ + IQuickActivateImpl *This = (IQuickActivateImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/* Alternative interface for quicker, easier activation of a control. */ +static HRESULT WINAPI WBQA_QuickActivate(LPQUICKACTIVATE iface, + QACONTAINER *pQaContainer, + QACONTROL *pQaControl) +{ + FIXME("stub: QACONTAINER = %p, QACONTROL = %p\n", pQaContainer, pQaControl); + return S_OK; +} + +static HRESULT WINAPI WBQA_SetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel) +{ + FIXME("stub: LPSIZEL = %p\n", pSizel); + return E_NOINTERFACE; +} + +static HRESULT WINAPI WBQA_GetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel) +{ + FIXME("stub: LPSIZEL = %p\n", pSizel); + return E_NOINTERFACE; +} + +/********************************************************************** + * IQuickActivate virtual function table for IE Web Browser component + */ + +static IQuickActivateVtbl WBQA_Vtbl = +{ + WBQA_QueryInterface, + WBQA_AddRef, + WBQA_Release, + WBQA_QuickActivate, + WBQA_SetContentExtent, + WBQA_GetContentExtent +}; + +IQuickActivateImpl SHDOCVW_QuickActivate = { &WBQA_Vtbl, 1 }; _____ Added: vendor/wine/dlls/shdocvw/current/oleobject.c --- vendor/wine/dlls/shdocvw/current/oleobject.c 2004-12-31 16:00:23 UTC (rev 12599) +++ vendor/wine/dlls/shdocvw/current/oleobject.c 2004-12-31 16:05:11 UTC (rev 12600) @@ -0,0 +1,615 @@ +/* + * Implementation of IOleObject interfaces for IE Web Browser + * + * - IOleObject + * - IOleInPlaceObject + * - IOleControl + * + * Copyright 2001 John R. Sheets (for CodeWeavers) + * + * 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 + */ + +#include <string.h> +#include "wine/debug.h" +#include "shdocvw.h" +#include "ole2.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +/********************************************************************** + * Implement the IOleObject interface for the web browser component + * + * Based on DefaultHandler code in dlls/ole32/defaulthandler.c. + */ + +static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface); +static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface); + +/********************************************************************** ** + * WBOOBJ_QueryInterface (IUnknown) + * + * Interfaces we need to (at least pretend to) retrieve: + * + * a6bc3ac0-dbaa-11ce-9de3-00aa004bb851 IID_IProvideClassInfo2 + * b196b283-bab4-101a-b69c-00aa00341d07 IID_IProvideClassInfo + * cf51ed10-62fe-11cf-bf86-00a0c9034836 IID_IQuickActivate + * 7fd52380-4e07-101b-ae2d-08002b2ec713 IID_IPersistStreamInit + * 0000010a-0000-0000-c000-000000000046 IID_IPersistStorage + * b196b284-bab4-101a-b69c-00aa00341d07 IID_IConnectionPointContainer + */ +static HRESULT WINAPI WBOOBJ_QueryInterface(LPOLEOBJECT iface, + REFIID riid, void** ppobj) +{ + IOleObjectImpl *This = (IOleObjectImpl *)iface; + + /* + * Perform a sanity check on the parameters. + */ + if ((This == NULL) || (ppobj == NULL) ) + return E_INVALIDARG; + + if (IsEqualGUID (&IID_IPersistStorage, riid)) + { + TRACE("Returning IID_IPersistStorage interface\n"); + *ppobj = (LPVOID)&SHDOCVW_PersistStorage; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IPersistStreamInit, riid)) + { + TRACE("Returning IID_IPersistStreamInit interface\n"); + *ppobj = (LPVOID)&SHDOCVW_PersistStreamInit; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IProvideClassInfo, riid)) + { + TRACE("Returning IID_IProvideClassInfo interface\n"); + *ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IProvideClassInfo2, riid)) + { + TRACE("Returning IID_IProvideClassInfo2 interface %p\n", + &SHDOCVW_ProvideClassInfo2); + *ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo2; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IQuickActivate, riid)) + { + TRACE("Returning IID_IQuickActivate interface\n"); + *ppobj = (LPVOID)&SHDOCVW_QuickActivate; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IConnectionPointContainer, riid)) + { + TRACE("Returning IID_IConnectionPointContainer interface\n"); + *ppobj = (LPVOID)&SHDOCVW_ConnectionPointContainer; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IOleInPlaceObject, riid)) + { + TRACE("Returning IID_IOleInPlaceObject interface\n"); + *ppobj = (LPVOID)&SHDOCVW_OleInPlaceObject; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IOleControl, riid)) + { + TRACE("Returning IID_IOleControl interface\n"); + *ppobj = (LPVOID)&SHDOCVW_OleControl; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IWebBrowser, riid)) + { + TRACE("Returning IID_IWebBrowser interface\n"); + *ppobj = (LPVOID)&SHDOCVW_WebBrowser; + WBOOBJ_AddRef (iface); + return S_OK; + } + else if (IsEqualGUID (&IID_IDispatch, riid)) + { + TRACE("Returning IID_IDispatch interface\n"); + *ppobj = (LPVOID)&SHDOCVW_WebBrowser; + WBOOBJ_AddRef (iface); + return S_OK; + } + + TRACE ("Failed to find iid = %s\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +/********************************************************************** ** + * WBOOBJ_AddRef (IUnknown) + */ +static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface) +{ + IOleObjectImpl *This = (IOleObjectImpl *)iface; + + TRACE("\n"); + return ++(This->ref); +} + +/********************************************************************** ** + * WBOOBJ_Release (IUnknown) + */ +static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface) +{ + IOleObjectImpl *This = (IOleObjectImpl *)iface; + + /* static class, won't be freed */ + TRACE("\n"); + return --(This->ref); +} + +/********************************************************************** ** + * WBOOBJ_SetClientSite (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_SetClientSite(LPOLEOBJECT iface, + LPOLECLIENTSITE pClientSite) +{ + FIXME("stub: (%p, %p)\n", iface, pClientSite); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_GetClientSite (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_GetClientSite(LPOLEOBJECT iface, + LPOLECLIENTSITE* ppClientSite) +{ + FIXME("stub: (%p)\n", *ppClientSite); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_SetHostNames (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_SetHostNames(LPOLEOBJECT iface, LPCOLESTR szContainerApp, + LPCOLESTR szContainerObj) +{ + FIXME("stub: (%p, %s, %s)\n", iface, debugstr_w(szContainerApp), + debugstr_w(szContainerObj)); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_Close (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_Close(LPOLEOBJECT iface, DWORD dwSaveOption) +{ + FIXME("stub: ()\n"); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_SetMoniker (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_SetMoniker(LPOLEOBJECT iface, + DWORD dwWhichMoniker, IMoniker* pmk) +{ + FIXME("stub: (%p, %ld, %p)\n", iface, dwWhichMoniker, pmk); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_GetMoniker (IOleObject) + * + * Delegate this request to the client site if we have one. + */ +static HRESULT WINAPI WBOOBJ_GetMoniker(LPOLEOBJECT iface, DWORD dwAssign, + DWORD dwWhichMoniker, LPMONIKER *ppmk) +{ + FIXME("stub (%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk); + return E_FAIL; +} + +/********************************************************************** ** + * WBOOBJ_InitFromData (IOleObject) + * + * This method is meaningless if the server is not running + */ +static HRESULT WINAPI WBOOBJ_InitFromData(LPOLEOBJECT iface, LPDATAOBJECT pDataObject, + BOOL fCreation, DWORD dwReserved) +{ + FIXME("stub: (%p, %p, %d, %ld)\n", iface, pDataObject, fCreation, dwReserved); + return OLE_E_NOTRUNNING; +} + +/********************************************************************** ** + * WBOOBJ_GetClipboardData (IOleObject) + * + * This method is meaningless if the server is not running + */ +static HRESULT WINAPI WBOOBJ_GetClipboardData(LPOLEOBJECT iface, DWORD dwReserved, + LPDATAOBJECT *ppDataObject) +{ + FIXME("stub: (%p, %ld, %p)\n", iface, dwReserved, ppDataObject); + return OLE_E_NOTRUNNING; +} + +/********************************************************************** ** + * WBOOBJ_DoVerb (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_DoVerb(LPOLEOBJECT iface, LONG iVerb, struct tagMSG* lpmsg, + LPOLECLIENTSITE pActiveSite, LONG lindex, + HWND hwndParent, LPCRECT lprcPosRect) +{ + FIXME(": stub iVerb = %ld\n", iVerb); + switch (iVerb) + { + case OLEIVERB_INPLACEACTIVATE: + FIXME ("stub for OLEIVERB_INPLACEACTIVATE\n"); + break; + case OLEIVERB_HIDE: + FIXME ("stub for OLEIVERB_HIDE\n"); + break; + } + + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_EnumVerbs (IOleObject) + * + * Delegate to OleRegEnumVerbs. + */ +static HRESULT WINAPI WBOOBJ_EnumVerbs(LPOLEOBJECT iface, + IEnumOLEVERB** ppEnumOleVerb) +{ + TRACE("(%p, %p)\n", iface, ppEnumOleVerb); + + return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb); +} + +/********************************************************************** ** + * WBOOBJ_EnumVerbs (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_Update(LPOLEOBJECT iface) +{ + FIXME(": Stub\n"); + return E_NOTIMPL; +} + +/********************************************************************** ** + * WBOOBJ_IsUpToDate (IOleObject) + * + * This method is meaningless if the server is not running + */ +static HRESULT WINAPI WBOOBJ_IsUpToDate(LPOLEOBJECT iface) +{ + FIXME("(%p)\n", iface); + return OLE_E_NOTRUNNING; +} + +/********************************************************************** ** + * WBOOBJ_GetUserClassID (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_GetUserClassID(LPOLEOBJECT iface, CLSID* pClsid) +{ + FIXME("stub: (%p, %p)\n", iface, pClsid); + return S_OK; +} + +/********************************************************************** ** + * WBOOBJ_GetUserType (IOleObject) + * + * Delegate to OleRegGetUserType. + */ +static HRESULT WINAPI WBOOBJ_GetUserType(LPOLEOBJECT iface, DWORD dwFormOfType, + LPOLESTR* pszUserType) +{ + TRACE("(%p, %ld, %p)\n", iface, dwFormOfType, pszUserType); + + return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType); +} + +/********************************************************************** ** + * WBOOBJ_SetExtent (IOleObject) + * + * This method is meaningless if the server is not running + */ +static HRESULT WINAPI WBOOBJ_SetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect, + SIZEL* psizel) +{ + FIXME("stub: (%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect, + psizel->cx, psizel->cy); + return OLE_E_NOTRUNNING; +} + +/********************************************************************** ** + * WBOOBJ_GetExtent (IOleObject) + */ +static HRESULT WINAPI WBOOBJ_GetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect, + SIZEL* psizel) +{ + FIXME("stub: (%p, %lx, %p)\n", iface, dwDrawAspect, psizel); + return S_OK; +} + +/********************************************************************** ** [truncated at 1000 lines; 2280 more skipped]
19 years, 12 months
1
0
0
0
[gvg] 12599: Import and merge Wine-20041201
by gvg@svn.reactos.com
Import and merge Wine-20041201 Added: trunk/reactos/lib/shell32/ Modified: trunk/reactos/lib/shell32/Makefile.in Added: trunk/reactos/lib/shell32/Makefile.ros-template Modified: trunk/reactos/lib/shell32/control.c Modified: trunk/reactos/lib/shell32/iconcache.c Added: trunk/reactos/lib/shell32/makefile Added: trunk/reactos/lib/shell32/ros-systray.c Modified: trunk/reactos/lib/shell32/shell32_Ca.rc Modified: trunk/reactos/lib/shell32/shell32_Cn.rc Modified: trunk/reactos/lib/shell32/shell32_Cs.rc Modified: trunk/reactos/lib/shell32/shell32_Da.rc Modified: trunk/reactos/lib/shell32/shell32_De.rc Modified: trunk/reactos/lib/shell32/shell32_En.rc Modified: trunk/reactos/lib/shell32/shell32_Eo.rc Modified: trunk/reactos/lib/shell32/shell32_Es.rc Modified: trunk/reactos/lib/shell32/shell32_Fi.rc Modified: trunk/reactos/lib/shell32/shell32_Fr.rc Modified: trunk/reactos/lib/shell32/shell32_Hu.rc Modified: trunk/reactos/lib/shell32/shell32_It.rc Modified: trunk/reactos/lib/shell32/shell32_Ja.rc Modified: trunk/reactos/lib/shell32/shell32_Ko.rc Modified: trunk/reactos/lib/shell32/shell32_Nl.rc Modified: trunk/reactos/lib/shell32/shell32_No.rc Modified: trunk/reactos/lib/shell32/shell32_Pl.rc Modified: trunk/reactos/lib/shell32/shell32_Pt.rc Modified: trunk/reactos/lib/shell32/shell32_Ru.rc Modified: trunk/reactos/lib/shell32/shell32_Si.rc Modified: trunk/reactos/lib/shell32/shell32_Sk.rc Modified: trunk/reactos/lib/shell32/shell32_Sv.rc Modified: trunk/reactos/lib/shell32/shell32_Uk.rc Modified: trunk/reactos/lib/shell32/shell32_Wa.rc Modified: trunk/reactos/lib/shell32/shell32_Zh.rc Modified: trunk/reactos/lib/shell32/shell32_main.c Modified: trunk/reactos/lib/shell32/shell32_main.h Modified: trunk/reactos/lib/shell32/shellfolder.h Modified: trunk/reactos/lib/shell32/shellpath.c Modified: trunk/reactos/lib/shell32/shres.rc _____ Copied: trunk/reactos/lib/shell32 (from rev 12598, vendor/wine/dlls/shell32/current) _____ Modified: trunk/reactos/lib/shell32/Makefile.in --- vendor/wine/dlls/shell32/current/Makefile.in 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/Makefile.in 2004-12-31 16:00:23 UTC (rev 12599) @@ -46,7 +46,7 @@ shpolicy.c \ shv_bg_cmenu.c \ shv_item_cmenu.c \ - systray.c + ros-systray.c RC_SRCS = shres.rc RC_BINSRC = shres.rc _____ Added: trunk/reactos/lib/shell32/Makefile.ros-template --- vendor/wine/dlls/shell32/current/Makefile.ros-template 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/Makefile.ros-template 2004-12-31 16:00:23 UTC (rev 12599) @@ -0,0 +1,30 @@ +# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ + +TARGET_NAME = shell32 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ + +TARGET_SDKLIBS = wine.a @IMPORTS@ ole32.a wine_uuid.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_SHELL32) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +TARGET_CLEAN = authors.c + +default: all + +authors.c: +ifeq ($(HOST),mingw32-linux) + echo 'const char * const SHELL_Authors[] = { "Copyright 1993-2004 WINE team", "Copyright 1998-2004 ReactOS team", 0 };' > authors.c +else + echo const char * const SHELL_Authors[] = { "Copyright 1993-2004 WINE team", "Copyright 1998-2004 ReactOS team", 0 }; > authors.c +endif + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk _____ Modified: trunk/reactos/lib/shell32/control.c --- vendor/wine/dlls/shell32/current/control.c 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/control.c 2004-12-31 16:00:23 UTC (rev 12599) @@ -464,6 +464,7 @@ void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, LPCSTR cmdline, INT cmdshow ) { +#if !defined(__CYGWIN__) && !defined (__MINGW32__) && !defined(_MSC_VER) WORD args[5]; SEGPTR cmdline_seg; @@ -478,6 +479,10 @@ args[0] = cmdshow; WOWCallback16Ex( proc, WCB16_PASCAL, sizeof(args), args, NULL ); UnMapLS( cmdline_seg ); +#else + FIXME( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", + proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); +#endif } /*********************************************************************** ** _____ Modified: trunk/reactos/lib/shell32/iconcache.c --- vendor/wine/dlls/shell32/current/iconcache.c 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/iconcache.c 2004-12-31 16:00:23 UTC (rev 12599) @@ -143,9 +143,23 @@ { HICON hiconLarge=0; HICON hiconSmall=0; - PrivateExtractIconsW( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 ); - PrivateExtractIconsW( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 ); +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + } + + if (PrivateExtractIconExW) + PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge, &hiconSmall, 1); + else +#endif + { + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1, 0); + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1, 0); + } + if ( !hiconLarge || !hiconSmall) { WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall); @@ -362,8 +376,12 @@ pdump(pidl); if (pIndex) - PidlToSicIndex ( sh, pidl, 1, 0, pIndex); - PidlToSicIndex ( sh, pidl, 0, 0, &Index); + if (!PidlToSicIndex ( sh, pidl, 1, 0, pIndex)) + *pIndex = -1; + + if (!PidlToSicIndex ( sh, pidl, 0, 0, &Index)) + return -1; + return Index; } @@ -420,6 +438,19 @@ */ UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) { + /* get entry point of undocumented function PrivateExtractIconExW() in user32 */ +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + + if (!PrivateExtractIconExW) + return 0; + } +#endif + TRACE("%s %i %p %p %i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons); return PrivateExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); _____ Added: trunk/reactos/lib/shell32/makefile --- vendor/wine/dlls/shell32/current/makefile 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/makefile 2004-12-31 16:00:23 UTC (rev 12599) @@ -0,0 +1,9 @@ +# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____ Added: trunk/reactos/lib/shell32/ros-systray.c --- vendor/wine/dlls/shell32/current/ros-systray.c 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/ros-systray.c 2004-12-31 16:00:23 UTC (rev 12599) @@ -0,0 +1,80 @@ +/* + * Copyright 2004 Martin Fuchs + * + * Pass on icon notification messages to the systray implementation + * in the currently running shell. + * + * 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 + */ + +#include <stdarg.h> +#include <malloc.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "shellapi.h" + + + /* copy data structure for tray notifications */ +typedef struct TrayNotifyCDS_Dummy { + DWORD cookie; + DWORD notify_code; + DWORD nicon_data[1]; // placeholder for NOTIFYICONDATA structure +} TrayNotifyCDS_Dummy; + + /* The only difference between Shell_NotifyIconA and Shell_NotifyIconW is the call to SendMessageA/W. */ +static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, int nid_size, BOOL unicode) +{ + HWND hwnd; + COPYDATASTRUCT data; + + BOOL ret = FALSE; + int len = sizeof(TrayNotifyCDS_Dummy)-sizeof(DWORD)+nid_size; + + TrayNotifyCDS_Dummy* pnotify_data = (TrayNotifyCDS_Dummy*) alloca(len); + + pnotify_data->cookie = 1; + pnotify_data->notify_code = dwMessage; + memcpy(&pnotify_data->nicon_data, pnid, nid_size); + + data.dwData = 1; + data.cbData = len; + data.lpData = pnotify_data; + + for(hwnd=0; hwnd=FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL); ) + if ((unicode?SendMessageW:SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data)) + ret = TRUE; + + return ret; +} + + +/********************************************************************** *** + * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIconA [SHELL32.297] + */ +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, FALSE); +} + +/********************************************************************** *** + * Shell_NotifyIconW [SHELL32.298] + */ +BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, TRUE); +} _____ Modified: trunk/reactos/lib/shell32/shell32_Ca.rc --- vendor/wine/dlls/shell32/current/shell32_Ca.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Ca.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Quant a %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "D'Acord", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "D'Acord", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine ha estat construit per:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS ha estat construit per:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Cn.rc --- vendor/wine/dlls/shell32/current/shell32_Cn.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Cn.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -24,11 +24,12 @@ CAPTION "¹ØÓÚ %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "È·¶¨", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "È·¶¨", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -37,7 +38,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "ÊäÈë³ÌÐò£¬Ä¿Â¼£¬Îļþ»òÕßInternet×ÊÔ´Ãû£¬Wine½«ÎªÄú´ò¿ªËü¡£", 12289, 36, 11, 182, 18 + LTEXT "ÊäÈë³ÌÐò£¬Ä¿Â¼£¬Îļþ»òÕßInternet×ÊÔ´Ãû£¬ReactOS½«ÎªÄú´ò¿ªËü¡£", 12289, 36, 11, 182, 18 LTEXT "´ò¿ª(&O):", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "È·¶¨", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Cs.rc --- vendor/wine/dlls/shell32/current/shell32_Cs.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Cs.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "O aplikaci %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine je d¡lem:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS je d¡lem:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Zadejte název programu, slozky, dokumentu, nebo zdroje v síti Internet a Wine jej pro vás otevøe.", 12289, 36, 11, 182, 18 + LTEXT "Zadejte název programu, slozky, dokumentu, nebo zdroje v síti Internet a ReactOS jej pro vás otevøe.", 12289, 36, 11, 182, 18 LTEXT "&Otevøít:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Da.rc --- vendor/wine/dlls/shell32/current/shell32_Da.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Da.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Om %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_De.rc --- vendor/wine/dlls/shell32/current/shell32_De.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_De.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "Informationen über %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "WINE wurde für Sie gekeltert von:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS wurde Ihnen zur Verfügung gestellt von:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Den Namen eines Programmes, eines Ordners, eines Dokumentes oder einer Internet Ressource eingeben, und Wine wird es für Sie öffnen", 12289, 36, 11, 182, 18 + LTEXT "Den Namen eines Programmes, eines Ordners, eines Dokumentes oder einer Internet Ressource eingeben, und ReactOS wird es für Sie öffnen", 12289, 36, 11, 182, 18 LTEXT "&Öffnen:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -185,5 +186,5 @@ IDS_RESTART_TITLE "Neustarten" IDS_RESTART_PROMPT "Möchten Sie, dass ein simulierter Windows Neustart durchgeführt wird ?" IDS_SHUTDOWN_TITLE "Anhalten" - IDS_SHUTDOWN_PROMPT "Möchten Sie die aktuelle Wine Sitzung beenden ?" + IDS_SHUTDOWN_PROMPT "Möchten Sie die aktuelle ReactOS Sitzung beenden ?" } _____ Modified: trunk/reactos/lib/shell32/shell32_En.rc --- vendor/wine/dlls/shell32/current/shell32_En.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_En.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -109,11 +109,12 @@ CAPTION "About %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -122,7 +123,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -181,10 +182,10 @@ /* message box strings */ STRINGTABLE DISCARDABLE { - IDS_RESTART_TITLE "Restart" - IDS_RESTART_PROMPT "Do you want to simulate a Windows reboot?" - IDS_SHUTDOWN_TITLE "Shutdown" - IDS_SHUTDOWN_PROMPT "Do you want to shutdown your Wine session?" + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" } /* shell folder path default values */ _____ Modified: trunk/reactos/lib/shell32/shell32_Eo.rc --- vendor/wine/dlls/shell32/current/shell32_Eo.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Eo.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Pri %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "Enorde", 1, 153, 130, 50, 12 + DEFPUSHBUTTON "Enorde", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Es.rc --- vendor/wine/dlls/shell32/current/shell32_Es.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Es.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "Acerca de %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "Aceptar", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "Aceptar", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine está disponible gracias a:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS está disponible gracias a:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Introduzca el nombre de un programa, carpeta, documento o recurso de Internet, y Wine lo abrirá para usted.", 12289, 36, 11, 182, 18 + LTEXT "Introduzca el nombre de un programa, carpeta, documento o recurso de Internet, y ReactOS lo abrirá para usted.", 12289, 36, 11, 182, 18 LTEXT "&Abrir:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "Aceptar", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -185,5 +186,5 @@ IDS_RESTART_TITLE "Reiniciar" IDS_RESTART_PROMPT "¿Desea simular un reinicio de Windows?" IDS_SHUTDOWN_TITLE "Apagar" - IDS_SHUTDOWN_PROMPT "¿Desea terminar su sesión Wine?" + IDS_SHUTDOWN_PROMPT "¿Desea terminar su sesión ReactOS?" } _____ Modified: trunk/reactos/lib/shell32/shell32_Fi.rc --- vendor/wine/dlls/shell32/current/shell32_Fi.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Fi.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Tietoja: %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine:n tekijät:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS:n tekijät:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Fr.rc --- vendor/wine/dlls/shell32/current/shell32_Fr.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Fr.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -112,11 +112,12 @@ CAPTION "À propos de %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine est une réalisation de :", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS est une réalisation de :", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -125,7 +126,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et Wine l'ouvrira pour vous.", 12289, 36, 11, 182, 18 + LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et ReactOS l'ouvrira pour vous.", 12289, 36, 11, 182, 18 LTEXT "&Ouvrir :", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -187,7 +188,7 @@ IDS_RESTART_TITLE "Redémarrer" IDS_RESTART_PROMPT "Voulez-vous simuler le redémarrage de Windows?" IDS_SHUTDOWN_TITLE "Arrêter" - IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session Wine?" + IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS?" } /* shell folder path default values */ _____ Modified: trunk/reactos/lib/shell32/shell32_Hu.rc --- vendor/wine/dlls/shell32/current/shell32_Hu.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Hu.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "A %s-rõl" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "A WINE-t írták:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "A ReactOS-t írták:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_It.rc --- vendor/wine/dlls/shell32/current/shell32_It.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_It.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "Informazioni su %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine è disponibile grazie a:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS è disponibile grazie a:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Digitare il nome del programma, della cartella, del documento o della risorsa internet, e Wine la aprirà.", 12289, 36, 11, 182, 18 + LTEXT "Digitare il nome del programma, della cartella, del documento o della risorsa internet, e ReactOS la aprirà.", 12289, 36, 11, 182, 18 LTEXT "&Apri:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -186,5 +187,5 @@ IDS_RESTART_TITLE "Riavvia" IDS_RESTART_PROMPT "Vuoi simulare un riavvio do Windows?" IDS_SHUTDOWN_TITLE "Termina sessione" - IDS_SHUTDOWN_PROMPT "Vuoi terminare la sessione di Wine?" + IDS_SHUTDOWN_PROMPT "Vuoi terminare la sessione di ReactOS?" } _____ Modified: trunk/reactos/lib/shell32/shell32_Ja.rc --- vendor/wine/dlls/shell32/current/shell32_Ja.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Ja.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -103,11 +103,12 @@ CAPTION "%s ,É,Â,¢,Ä" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -116,7 +117,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Ko.rc --- vendor/wine/dlls/shell32/current/shell32_Ko.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Ko.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "%s¿¡ °üÇÏ¿©" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "È®ÀÎ", 1, 153, 130, 50, 12 + DEFPUSHBUTTON "È®ÀÎ", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Nl.rc --- vendor/wine/dlls/shell32/current/shell32_Nl.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Nl.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Info %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine is geschreven door:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS is geschreven door:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_No.rc --- vendor/wine/dlls/shell32/current/shell32_No.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_No.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Om %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine was brought to you by:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Pl.rc --- vendor/wine/dlls/shell32/current/shell32_Pl.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Pl.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "O %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Mo¿esz korzystaæ z Wine'a dziêki:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Mo¿esz korzystaæ z ReactOS'a dziêki:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Wpisz nazwê programu, katalogu, dokumentu, a Wine otworzy go dla ciebie.", 12289, 36, 11, 182, 18 + LTEXT "Wpisz nazwê programu, katalogu, dokumentu, a ReactOS otworzy go dla ciebie.", 12289, 36, 11, 182, 18 LTEXT "&Otwórz:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -185,5 +186,5 @@ IDS_RESTART_TITLE "Uruchom ponownie" IDS_RESTART_PROMPT "Czy chcesz zasymulowaæ zrestartowanie Windowsa?" IDS_SHUTDOWN_TITLE "Wy³¹cz" - IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê Wine'a?" + IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê ReactOS'a?" } _____ Modified: trunk/reactos/lib/shell32/shell32_Pt.rc --- vendor/wine/dlls/shell32/current/shell32_Pt.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Pt.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -110,11 +110,12 @@ CAPTION "Sobre %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine foi disponibilizado por:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS foi disponibilizado por:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -123,7 +124,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Digite o nome do programa, pasta, documento, ou endereço Internet, que o Wine irá abrí-lo para você.", 12289, 36, 11, 182, 18 + LTEXT "Digite o nome do programa, pasta, documento, ou endereço Internet, que o ReactOS irá abrí-lo para você.", 12289, 36, 11, 182, 18 LTEXT "&Abrir:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP @@ -185,5 +186,5 @@ IDS_RESTART_TITLE "Reiniciar" IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?" IDS_SHUTDOWN_TITLE "Desligar" - IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no Wine?" + IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no ReactOS?" } _____ Modified: trunk/reactos/lib/shell32/shell32_Ru.rc --- vendor/wine/dlls/shell32/current/shell32_Ru.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Ru.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Î %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Ðàçðàáîò÷èêè Wine:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Ðàçðàáîò÷èêè ReactOS:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Ââåäèòå èìÿ ïðîãðàììû, ïàïêè, äîêóìåíòà èëè ðåñóðñ Èíòåðíåòà, è Wine îòêðîåò èõ.", 12289, 36, 11, 182, 18 + LTEXT "Ââåäèòå èìÿ ïðîãðàììû, ïàïêè, äîêóìåíòà èëè ðåñóðñ Èíòåðíåòà, è ReactOS îòêðîåò èõ.", 12289, 36, 11, 182, 18 LTEXT "&Îòêðûòü:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Si.rc --- vendor/wine/dlls/shell32/current/shell32_Si.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Si.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "O %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "V redu", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "V redu", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine so ustvarili:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS so ustvarili:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Vnesite ime programa, mape, dokumenta ali spletne strani, in Wine ga (jo) bo odprl.", 12289, 36, 11, 182, 18 + LTEXT "Vnesite ime programa, mape, dokumenta ali spletne strani, in ReactOS ga (jo) bo odprl.", 12289, 36, 11, 182, 18 LTEXT "&Odpri:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "V redu", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Sk.rc --- vendor/wine/dlls/shell32/current/shell32_Sk.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Sk.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,10 +23,11 @@ CAPTION "O programe %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 LTEXT "Víno pre vás pripravili:", 98, 8, 55, 137, 10 } @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and Wine will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 LTEXT "&Open:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Sv.rc --- vendor/wine/dlls/shell32/current/shell32_Sv.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Sv.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -23,11 +23,12 @@ CAPTION "Om %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine hade inte varit möjligt utan dessa personer:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS hade inte varit möjligt utan dessa personer:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -36,7 +37,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Skriv namnet på ett program, en mapp eller ett dokument och wine kommer att öppna det för dig.", 12289, 36, 11, 182, 18 + LTEXT "Skriv namnet på ett program, en mapp eller ett dokument och ReactOS kommer att öppna det för dig.", 12289, 36, 11, 182, 18 LTEXT "&Öppna:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Uk.rc --- vendor/wine/dlls/shell32/current/shell32_Uk.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Uk.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -109,11 +109,12 @@ CAPTION "Ïðî %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 130, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Ðîçðîáíèêè Wine:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Ðîçðîáíèêè ReactOS:", 98, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -122,7 +123,7 @@ FONT 8, "MS Shell Dlg" { ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Ââåä³òü ³ì'ÿ ïðîãðàìè, òåêè, äîêóìåíòó ÷è ðåñóðñ ²íòåðíåòó, ³ Wine â³äêðèº ¿õ.", 12289, 36, 11, 182, 18 + LTEXT "Ââåä³òü ³ì'ÿ ïðîãðàìè, òåêè, äîêóìåíòó ÷è ðåñóðñ ²íòåðíåòó, ³ ReactOS â³äêðèº ¿õ.", 12289, 36, 11, 182, 18 LTEXT "&³äêðèòè:", 12305, 7, 39, 24, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP _____ Modified: trunk/reactos/lib/shell32/shell32_Wa.rc --- vendor/wine/dlls/shell32/current/shell32_Wa.rc 2004-12-31 15:57:39 UTC (rev 12598) +++ trunk/reactos/lib/shell32/shell32_Wa.rc 2004-12-31 16:00:23 UTC (rev 12599) @@ -28,11 +28,12 @@ CAPTION "Å dfait di %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "I Va", IDOK, 153, 130, 50, 12 + DEFPUSHBUTTON "I Va", IDOK, 153, 133, 50, 12, WS_TABSTOP LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 189, 10, 14, 16 - LTEXT "", 100, 8, 10, 137, 33 - LTEXT "Wine a estu fwait par:", 98, 8, 55, 137, 10 + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 [truncated at 1000 lines; 8253 more skipped]
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12598
by gvg@svn.reactos.com
Need to remove existing files before doing vendor import Deleted: trunk/reactos/lib/shell32/
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12597
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/shell32/Wine-20041201/ _____ Copied: vendor/wine/dlls/shell32/Wine-20041201 (from rev 12596, vendor/wine/dlls/shell32/current)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12596
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/shell32/ Added: vendor/wine/dlls/shell32/current/ Added: vendor/wine/dlls/shell32/current/Makefile.in Added: vendor/wine/dlls/shell32/current/autocomplete.c Added: vendor/wine/dlls/shell32/current/brsfolder.c Added: vendor/wine/dlls/shell32/current/changenotify.c Added: vendor/wine/dlls/shell32/current/classes.c Added: vendor/wine/dlls/shell32/current/clipboard.c Added: vendor/wine/dlls/shell32/current/control.c Added: vendor/wine/dlls/shell32/current/cpanel.h Added: vendor/wine/dlls/shell32/current/cpanelfolder.c Added: vendor/wine/dlls/shell32/current/dataobject.c Added: vendor/wine/dlls/shell32/current/debughlp.c Added: vendor/wine/dlls/shell32/current/debughlp.h Added: vendor/wine/dlls/shell32/current/dialogs.c Added: vendor/wine/dlls/shell32/current/dragdrophelper.c Added: vendor/wine/dlls/shell32/current/enumidlist.c Added: vendor/wine/dlls/shell32/current/enumidlist.h Added: vendor/wine/dlls/shell32/current/folders.c Added: vendor/wine/dlls/shell32/current/iconcache.c Added: vendor/wine/dlls/shell32/current/memorystream.c Added: vendor/wine/dlls/shell32/current/pidl.c Added: vendor/wine/dlls/shell32/current/pidl.h Added: vendor/wine/dlls/shell32/current/regsvr.c Added: vendor/wine/dlls/shell32/current/shell.c Added: vendor/wine/dlls/shell32/current/shell.spec Added: vendor/wine/dlls/shell32/current/shell32.spec Added: vendor/wine/dlls/shell32/current/shell32_Ca.rc Added: vendor/wine/dlls/shell32/current/shell32_Cn.rc Added: vendor/wine/dlls/shell32/current/shell32_Cs.rc Added: vendor/wine/dlls/shell32/current/shell32_Da.rc Added: vendor/wine/dlls/shell32/current/shell32_De.rc Added: vendor/wine/dlls/shell32/current/shell32_En.rc Added: vendor/wine/dlls/shell32/current/shell32_Eo.rc Added: vendor/wine/dlls/shell32/current/shell32_Es.rc Added: vendor/wine/dlls/shell32/current/shell32_Fi.rc Added: vendor/wine/dlls/shell32/current/shell32_Fr.rc Added: vendor/wine/dlls/shell32/current/shell32_Hu.rc Added: vendor/wine/dlls/shell32/current/shell32_It.rc Added: vendor/wine/dlls/shell32/current/shell32_Ja.rc Added: vendor/wine/dlls/shell32/current/shell32_Ko.rc Added: vendor/wine/dlls/shell32/current/shell32_Nl.rc Added: vendor/wine/dlls/shell32/current/shell32_No.rc Added: vendor/wine/dlls/shell32/current/shell32_Pl.rc Added: vendor/wine/dlls/shell32/current/shell32_Pt.rc Added: vendor/wine/dlls/shell32/current/shell32_Ru.rc Added: vendor/wine/dlls/shell32/current/shell32_Si.rc Added: vendor/wine/dlls/shell32/current/shell32_Sk.rc Added: vendor/wine/dlls/shell32/current/shell32_Sv.rc Added: vendor/wine/dlls/shell32/current/shell32_Uk.rc Added: vendor/wine/dlls/shell32/current/shell32_Wa.rc Added: vendor/wine/dlls/shell32/current/shell32_Zh.rc Added: vendor/wine/dlls/shell32/current/shell32_main.c Added: vendor/wine/dlls/shell32/current/shell32_main.h Added: vendor/wine/dlls/shell32/current/shell32_xx.rc Added: vendor/wine/dlls/shell32/current/shellfolder.h Added: vendor/wine/dlls/shell32/current/shelllink.c Added: vendor/wine/dlls/shell32/current/shellole.c Added: vendor/wine/dlls/shell32/current/shellord.c Added: vendor/wine/dlls/shell32/current/shellpath.c Added: vendor/wine/dlls/shell32/current/shellreg.c Added: vendor/wine/dlls/shell32/current/shellstring.c Added: vendor/wine/dlls/shell32/current/shfldr.h Added: vendor/wine/dlls/shell32/current/shfldr_desktop.c Added: vendor/wine/dlls/shell32/current/shfldr_fs.c Added: vendor/wine/dlls/shell32/current/shfldr_mycomp.c Added: vendor/wine/dlls/shell32/current/shlexec.c Added: vendor/wine/dlls/shell32/current/shlfileop.c Added: vendor/wine/dlls/shell32/current/shlfolder.c Added: vendor/wine/dlls/shell32/current/shlfsbind.c Added: vendor/wine/dlls/shell32/current/shlmenu.c Added: vendor/wine/dlls/shell32/current/shlview.c Added: vendor/wine/dlls/shell32/current/shpolicy.c Added: vendor/wine/dlls/shell32/current/shres.rc Added: vendor/wine/dlls/shell32/current/shresdef.h Added: vendor/wine/dlls/shell32/current/shv_bg_cmenu.c Added: vendor/wine/dlls/shell32/current/shv_item_cmenu.c Added: vendor/wine/dlls/shell32/current/systray.c Added: vendor/wine/dlls/shell32/current/undocshell.h Added: vendor/wine/dlls/shell32/current/version.h Added: vendor/wine/dlls/shell32/current/version.rc Added: vendor/wine/dlls/shell32/current/version16.rc _____ Added: vendor/wine/dlls/shell32/current/Makefile.in --- vendor/wine/dlls/shell32/current/Makefile.in 2004-12-31 15:52:05 UTC (rev 12595) +++ vendor/wine/dlls/shell32/current/Makefile.in 2004-12-31 15:56:15 UTC (rev 12596) @@ -0,0 +1,92 @@ +EXTRADEFS = -D_SHELL32_ -DCOM_NO_WINDOWS_H +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = shell32.dll +IMPORTS = shlwapi comctl32 user32 gdi32 advapi32 kernel32 +DELAYIMPORTS = ole32 +EXTRALIBS = -luuid $(LIBUNICODE) + +C_SRCS = \ + authors.c \ + autocomplete.c \ + brsfolder.c \ + changenotify.c \ + classes.c \ + clipboard.c \ + control.c \ + cpanelfolder.c \ + dataobject.c \ + debughlp.c \ + dialogs.c \ + dragdrophelper.c \ + enumidlist.c \ + folders.c \ + iconcache.c \ + memorystream.c \ + pidl.c \ + regsvr.c \ + shell32_main.c \ + shelllink.c \ + shellole.c \ + shellord.c \ + shellpath.c \ + shellreg.c \ + shellstring.c \ + shfldr_desktop.c \ + shfldr_fs.c \ + shfldr_mycomp.c \ + shlexec.c \ + shlfileop.c \ + shlfolder.c \ + shlfsbind.c \ + shlmenu.c \ + shlview.c \ + shpolicy.c \ + shv_bg_cmenu.c \ + shv_item_cmenu.c \ + systray.c + +RC_SRCS = shres.rc +RC_BINSRC = shres.rc +RC_BINARIES = \ + cdrom.ico \ + desktop.ico \ + document.ico \ + drive.ico \ + floppy.ico \ + folder.ico \ + folder_open.ico \ + mycomputer.ico \ + netdrive.ico \ + netdrive2.ico \ + ramdisk.ico + +C_SRCS16 = shell.c +RC_SRCS16 = version16.rc +SPEC_SRCS16 = shell.spec + +SUBDIRS = tests + +@MAKE_DLL_RULES@ + +# Special rules for 16-bit resource files + +version16.res: version16.rc + $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc + +shell.spec.c: shell.spec version16.res + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res version16.res --dll $(SRCDIR)/shell.spec + +authors.c: $(TOPSRCDIR)/AUTHORS + (LC_ALL=C; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \ + sed -e '1,2d' -e 's/\(.*\)/ \"\1\",/' $(TOPSRCDIR)/AUTHORS && \ + echo ' 0 };') >$@ || ($(RM) $@ && false) + +depend: authors.c + +clean:: + $(RM) authors.c + +### Dependencies: _____ Added: vendor/wine/dlls/shell32/current/autocomplete.c --- vendor/wine/dlls/shell32/current/autocomplete.c 2004-12-31 15:52:05 UTC (rev 12595) +++ vendor/wine/dlls/shell32/current/autocomplete.c 2004-12-31 15:56:15 UTC (rev 12596) @@ -0,0 +1,646 @@ +/* + * AutoComplete interfaces implementation. + * + * Copyright 2004 Maxime Bellengé <maxime.bellenge(a)laposte.net> + * + * 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 + */ + +/* + Implemented: + - ACO_AUTOAPPEND style + - ACO_AUTOSUGGEST style + - ACO_UPDOWNKEYDROPSLIST style + + - Handle pwzsRegKeyPath and pwszQuickComplete in Init + + TODO: + - implement ACO_SEARCH style + - implement ACO_FILTERPREFIXES style + - implement ACO_USETAB style + - implement ACO_RTLREADING style + + */ +#include "config.h" + +#include <stdarg.h> +#include <stdlib.h> +#include <string.h> + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "undocshell.h" +#include "shlwapi.h" +#include "winerror.h" +#include "objbase.h" + +#include "pidl.h" +#include "shlguid.h" +#include "shlobj.h" +#include "shldisp.h" +#include "debughlp.h" + +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct +{ + IAutoCompleteVtbl *lpVtbl; + IAutoComplete2Vtbl *lpvtblAutoComplete2; + DWORD ref; + BOOL enabled; + HWND hwndEdit; + HWND hwndListBox; + WNDPROC wpOrigEditProc; + WNDPROC wpOrigLBoxProc; + WCHAR *txtbackup; + WCHAR *quickComplete; + IEnumString *enumstr; + AUTOCOMPLETEOPTIONS options; +} IAutoCompleteImpl; + +static struct IAutoCompleteVtbl acvt; +static struct IAutoComplete2Vtbl ac2vt; + +#define _IAutoComplete2_Offset ((int)(&(((IAutoCompleteImpl*)0)->lpvtblAutoComplete2))) +#define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtblAutoComplete2) + +static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + +/********************************************************************** **** + * IAutoComplete_Constructor + */ +HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IAutoCompleteImpl *lpac; + + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + + lpac = (IAutoCompleteImpl*)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); + if (!lpac) + return E_OUTOFMEMORY; + + lpac->ref = 1; + lpac->lpVtbl = &acvt; + lpac->lpvtblAutoComplete2 = &ac2vt; + lpac->enabled = TRUE; + lpac->enumstr = NULL; + lpac->options = ACO_AUTOAPPEND; + lpac->wpOrigEditProc = NULL; + lpac->hwndListBox = NULL; + lpac->txtbackup = NULL; + lpac->quickComplete = NULL; + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { + IUnknown_Release (_IUnknown_ (lpac)); + return E_NOINTERFACE; + } + + TRACE("-- (%p)->\n",lpac); + + return S_OK; +} + +/********************************************************************** **** + * AutoComplete_QueryInterface + */ +static HRESULT WINAPI IAutoComplete_fnQueryInterface( + IAutoComplete * iface, + REFIID riid, + LPVOID *ppvObj) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, shdebugstr_guid(riid), ppvObj); + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IAutoComplete)) + { + *ppvObj = (IAutoComplete*)This; + } + else if(IsEqualIID(riid, &IID_IAutoComplete2)) + { + *ppvObj = _IAutoComplete2_ (This); + } + + if (*ppvObj) + { + IAutoComplete_AddRef((IAutoComplete*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/********************************************************************** ******** + * IAutoComplete_fnAddRef + */ +static ULONG WINAPI IAutoComplete_fnAddRef( + IAutoComplete * iface) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(%lu)\n",This,This->ref); + return ++(This->ref); +} + +/********************************************************************** ******** + * IAutoComplete_fnRelease + */ +static ULONG WINAPI IAutoComplete_fnRelease( + IAutoComplete * iface) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(%lu)\n",This,This->ref); + + if (!--(This->ref)) { + TRACE(" destroying IAutoComplete(%p)\n",This); + if (This->quickComplete) + HeapFree(GetProcessHeap(), 0, This->quickComplete); + if (This->txtbackup) + HeapFree(GetProcessHeap(), 0, This->txtbackup); + if (This->hwndListBox) + DestroyWindow(This->hwndListBox); + if (This->enumstr) + IEnumString_Release(This->enumstr); + HeapFree(GetProcessHeap(), 0, This); + return 0; + } + return This->ref; +} + +/********************************************************************** ******** + * IAutoComplete_fnEnable + */ +static HRESULT WINAPI IAutoComplete_fnEnable( + IAutoComplete * iface, + BOOL fEnable) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + HRESULT hr = S_OK; + + TRACE("(%p)->(%s)\n", This, (fEnable)?"true":"false"); + + This->enabled = fEnable; + + return hr; +} + +/********************************************************************** ******** + * IAutoComplete_fnInit + */ +static HRESULT WINAPI IAutoComplete_fnInit( + IAutoComplete * iface, + HWND hwndEdit, + IUnknown *punkACL, + LPCOLESTR pwzsRegKeyPath, + LPCOLESTR pwszQuickComplete) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + static const WCHAR lbName[] = {'L','i','s','t','B','o','x',0}; + + TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", + This, (long)hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); + + if (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); + if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); + if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); + if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); + if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); + if (This->options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); + if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); + + This->hwndEdit = hwndEdit; + + if (!SUCCEEDED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { + TRACE("No IEnumString interface\n"); + return E_NOINTERFACE; + } + + This->wpOrigEditProc = (WNDPROC) SetWindowLongPtrW( hwndEdit, GWLP_WNDPROC, (LONG_PTR) ACEditSubclassProc); + SetWindowLongPtrW( hwndEdit, GWLP_USERDATA, (LONG_PTR)This); + + if (This->options & ACO_AUTOSUGGEST) { + HWND hwndParent; + + hwndParent = GetParent(This->hwndEdit); + + /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ + This->hwndListBox = CreateWindowExW(0, lbName, NULL, + WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hwndParent, NULL, + (HINSTANCE)GetWindowLongPtrW( hwndParent, GWLP_HINSTANCE ), NULL); + + if (This->hwndListBox) { + This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc); + SetWindowLongPtrW( This->hwndListBox, GWLP_USERDATA, (LONG_PTR)This); + } + } + + if (pwzsRegKeyPath) { + WCHAR *key; + WCHAR result[MAX_PATH]; + WCHAR *value; + HKEY hKey = 0; + LONG res; + LONG len; + + /* pwszRegKeyPath contains the key as well as the value, so we split */ + key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); + strcpyW(key, pwzsRegKeyPath); + value = strrchrW(key, '\\'); + *value = 0; + value++; + /* Now value contains the value and buffer the key */ + res = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey); + if (res != ERROR_SUCCESS) { + /* if the key is not found, MSDN states we must seek in HKEY_LOCAL_MACHINE */ + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey); + } + if (res == ERROR_SUCCESS) { + res = RegQueryValueW(hKey, value, result, &len); + if (res == ERROR_SUCCESS) { + This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); + strcpyW(This->quickComplete, result); + } + RegCloseKey(hKey); + } + HeapFree(GetProcessHeap(), 0, key); + } + + if ((pwszQuickComplete) && (!This->quickComplete)) { + This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); + lstrcpyW(This->quickComplete, pwszQuickComplete); + } + + return S_OK; +} + +/********************************************************************** **** + * IAutoComplete_fnVTable + */ +static IAutoCompleteVtbl acvt = +{ + IAutoComplete_fnQueryInterface, + IAutoComplete_fnAddRef, + IAutoComplete_fnRelease, + IAutoComplete_fnInit, + IAutoComplete_fnEnable, +}; + +/********************************************************************** **** + * AutoComplete2_QueryInterface + */ +static HRESULT WINAPI IAutoComplete2_fnQueryInterface( + IAutoComplete2 * iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + return IAutoComplete_QueryInterface((IAutoComplete*)This, riid, ppvObj); +} + +/********************************************************************** ******** + * IAutoComplete2_fnAddRef + */ +static ULONG WINAPI IAutoComplete2_fnAddRef( + IAutoComplete2 * iface) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IAutoComplete2_AddRef((IAutoComplete*)This); +} + +/********************************************************************** ******** + * IAutoComplete2_fnRelease + */ +static ULONG WINAPI IAutoComplete2_fnRelease( + IAutoComplete2 * iface) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IAutoComplete_Release((IAutoComplete*)This); +} + +/********************************************************************** ******** + * IAutoComplete2_fnEnable + */ +static HRESULT WINAPI IAutoComplete2_fnEnable( + IAutoComplete2 * iface, + BOOL fEnable) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false"); + + return IAutoComplete_Enable((IAutoComplete*)This, fEnable); +} + +/********************************************************************** ******** + * IAutoComplete2_fnInit + */ +static HRESULT WINAPI IAutoComplete2_fnInit( + IAutoComplete2 * iface, + HWND hwndEdit, + IUnknown *punkACL, + LPCOLESTR pwzsRegKeyPath, + LPCOLESTR pwszQuickComplete) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p)\n", This); + + return IAutoComplete_Init((IAutoComplete*)This, hwndEdit, punkACL, pwzsRegKeyPath, pwszQuickComplete); +} + +/********************************************************************** **** + * IAutoComplete_fnGetOptions + */ +static HRESULT WINAPI IAutoComplete2_fnGetOptions( + IAutoComplete2 * iface, + DWORD *pdwFlag) +{ + HRESULT hr = S_OK; + + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p) -> (%p)\n", This, pdwFlag); + + *pdwFlag = This->options; + + return hr; +} + +/********************************************************************** **** + * IAutoComplete_fnSetOptions + */ +static HRESULT WINAPI IAutoComplete2_fnSetOptions( + IAutoComplete2 * iface, + DWORD dwFlag) +{ + HRESULT hr = S_OK; + + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p) -> (0x%lx)\n", This, dwFlag); + + This->options = dwFlag; + + return hr; +} + +/********************************************************************** **** + * IAutoComplete2_fnVTable + */ +static IAutoComplete2Vtbl ac2vt = +{ + IAutoComplete2_fnQueryInterface, + IAutoComplete2_fnAddRef, + IAutoComplete2_fnRelease, + IAutoComplete2_fnInit, + IAutoComplete2_fnEnable, + /* IAutoComplete2 */ + IAutoComplete2_fnSetOptions, + IAutoComplete2_fnGetOptions, +}; + +/* + Window procedure for autocompletion + */ +static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + LPOLESTR strs; + HRESULT hr; + WCHAR hwndText[255]; + WCHAR *hwndQCText; + RECT r; + BOOL control, filled, displayall = FALSE; + int cpt, height, sel; + + if (!This->enabled) return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + switch (uMsg) + { + case CB_SHOWDROPDOWN: + ShowWindow(This->hwndListBox, SW_HIDE); + break; + case WM_KILLFOCUS: + if ((This->options && ACO_AUTOSUGGEST) && + ((HWND)wParam != This->hwndListBox)) + { + ShowWindow(This->hwndListBox, SW_HIDE); + } + break; + case WM_KEYUP: + + GetWindowTextW( hwnd, (LPWSTR)hwndText, 255); + + switch(wParam) { + case VK_RETURN: + /* If quickComplete is set and control is pressed, replace the string */ + control = GetKeyState(VK_CONTROL) & 0x8000; + if (control && This->quickComplete) { + hwndQCText = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + (lstrlenW(This->quickComplete)+lstrlenW(hwndText))*sizeof(WCHAR)); + sel = sprintfW(hwndQCText, This->quickComplete, hwndText); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); + SendMessageW(hwnd, EM_SETSEL, 0, sel); + HeapFree(GetProcessHeap(), 0, hwndQCText); + } + + ShowWindow(This->hwndListBox, SW_HIDE); + return 0; + case VK_LEFT: + case VK_RIGHT: + return 0; + case VK_UP: + case VK_DOWN: + /* Two cases here : + - if the listbox is not visible, displays it + with all the entries if the style ACO_UPDOWNKEYDROPSLIST + is present but does not select anything. + - if the listbox is visible, change the selection + */ + if ( (This->options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) + && (!IsWindowVisible(This->hwndListBox) && (! *hwndText)) ) + { + /* We must dispays all the entries */ + displayall = TRUE; + } else { + if (IsWindowVisible(This->hwndListBox)) { + int count; + + count = SendMessageW(This->hwndListBox, LB_GETCOUNT, 0, 0); + /* Change the selection */ + sel = SendMessageW(This->hwndListBox, LB_GETCURSEL, 0, 0); + if (wParam == VK_UP) + sel = ((sel-1)<0)?count-1:sel-1; + else + sel = ((sel+1)>= count)?-1:sel+1; + SendMessageW(This->hwndListBox, LB_SETCURSEL, sel, 0); + if (sel != -1) { + WCHAR *msg; + int len; + + len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); + msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(msg), lstrlenW(msg)); + HeapFree(GetProcessHeap(), 0, msg); + } else { + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)This->txtbackup); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(This->txtbackup), lstrlenW(This->txtbackup)); + } + } + return 0; + } + break; + case VK_BACK: + case VK_DELETE: + if ((! *hwndText) && (This->options & ACO_AUTOSUGGEST)) { + ShowWindow(This->hwndListBox, SW_HIDE); + return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + } + if (This->options & ACO_AUTOAPPEND) { + DWORD b; + SendMessageW(hwnd, EM_GETSEL, (WPARAM)&b, (LPARAM)NULL); + if (b>1) { + hwndText[b-1] = '\0'; + } else { + hwndText[0] = '\0'; + SetWindowTextW(hwnd, hwndText); + } + } + break; + default: + ; + } + + SendMessageW(This->hwndListBox, LB_RESETCONTENT, 0, 0); + + HeapFree(GetProcessHeap(), 0, This->txtbackup); + This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); + lstrcpyW(This->txtbackup, hwndText); + + /* Returns if there is no text to search and we doesn't want to display all the entries */ + if ((!displayall) && (! *hwndText) ) + break; + + IEnumString_Reset(This->enumstr); + filled = FALSE; + for(cpt = 0;;) { + hr = IEnumString_Next(This->enumstr, 1, &strs, NULL); + if (hr != S_OK) + break; + + if ((LPWSTR)strstrW(strs, hwndText) == strs) { + + if (This->options & ACO_AUTOAPPEND) { + SetWindowTextW(hwnd, strs); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(hwndText), lstrlenW(strs)); + break; + } + + if (This->options & ACO_AUTOSUGGEST) { + SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs); + filled = TRUE; + cpt++; + } + } + } + + if (This->options & ACO_AUTOSUGGEST) { + if (filled) { + height = SendMessageW(This->hwndListBox, LB_GETITEMHEIGHT, 0, 0); + SendMessageW(This->hwndListBox, LB_CARETOFF, 0, 0); + GetWindowRect(hwnd, &r); + SetParent(This->hwndListBox, HWND_DESKTOP); + /* It seems that Windows XP displays 7 lines at most + and otherwise displays a vertical scroll bar */ + SetWindowPos(This->hwndListBox, HWND_TOP, + r.left, r.bottom + 1, r.right - r.left, min(height * 7, height*(cpt+1)), + SWP_SHOWWINDOW ); + } else { + ShowWindow(This->hwndListBox, SW_HIDE); + } + } + + break; + default: + return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + } + + return 0; +} + +static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + WCHAR *msg; + int sel = -1, len; + + switch (uMsg) { + case WM_MOUSEMOVE: + sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam); + SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0); + break; + case WM_LBUTTONDOWN: + len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); + msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + sel = (INT)SendMessageW(hwnd, LB_GETCURSEL, 0, 0); + SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(This->hwndEdit, EM_SETSEL, 0, lstrlenW(msg)); + ShowWindow(hwnd, SW_HIDE); + HeapFree(GetProcessHeap(), 0, msg); + break; + default: + return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); + } + return 0; +} _____ Added: vendor/wine/dlls/shell32/current/brsfolder.c --- vendor/wine/dlls/shell32/current/brsfolder.c 2004-12-31 15:52:05 UTC (rev 12595) +++ vendor/wine/dlls/shell32/current/brsfolder.c 2004-12-31 15:56:15 UTC (rev 12596) @@ -0,0 +1,517 @@ +/* + * Copyright 1999 Juergen Schmied + * + * 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 + * + * FIXME: + * - many memory leaks + * - many flags unimplemented + */ + +#include <stdlib.h> +#include <string.h> + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "wine/debug.h" +#include "undocshell.h" +#include "shlguid.h" +#include "pidl.h" +#include "shell32_main.h" +#include "shellapi.h" +#include "shresdef.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static HWND hwndTreeView; +static LPBROWSEINFOW lpBrowseInfo; +static LPITEMIDLIST pidlRet; + +static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent, IEnumIDList* lpe); +static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent); + +#define SUPPORTEDFLAGS (BIF_STATUSTEXT | \ + BIF_BROWSEFORCOMPUTER | \ + BIF_RETURNFSANCESTORS | \ + BIF_RETURNONLYFSDIRS | \ + BIF_BROWSEINCLUDEFILES) + +static inline DWORD BrowseFlagsToSHCONTF(UINT ulFlags) +{ + return SHCONTF_FOLDERS | (ulFlags & BIF_BROWSEINCLUDEFILES ? SHCONTF_NONFOLDERS : 0); +} + +static void InitializeTreeView(HWND hwndParent, LPCITEMIDLIST root) +{ + HIMAGELIST hImageList; + IShellFolder * lpsf; + HRESULT hr; + IEnumIDList * pEnumIL = NULL; + LPITEMIDLIST parentofroot; + parentofroot = ILClone(root); + ILRemoveLastID(parentofroot); + + hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW); + Shell_GetImageList(NULL, &hImageList); + + TRACE("dlg=%p tree=%p\n", hwndParent, hwndTreeView ); + + if (hImageList && hwndTreeView) + TreeView_SetImageList(hwndTreeView, hImageList, 0); + + if (_ILIsDesktop (root)) { + hr = SHGetDesktopFolder(&lpsf); + } else { + IShellFolder * lpsfdesktop; + + hr = SHGetDesktopFolder(&lpsfdesktop); + if (SUCCEEDED(hr)) { + hr = IShellFolder_BindToObject(lpsfdesktop, parentofroot, 0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf); + IShellFolder_Release(lpsfdesktop); + } + } + if (SUCCEEDED(hr)) + { + IShellFolder * pSFRoot; + if (_ILIsPidlSimple(root)) + { + pSFRoot = lpsf; + IShellFolder_AddRef(pSFRoot); + } + else + hr = IShellFolder_BindToObject(lpsf,ILFindLastID(root),0,&IID_IShellFolder,(L PVOID *)&pSFRoot); + if (SUCCEEDED(hr)) + { + hr = IShellFolder_EnumObjects( + pSFRoot, + hwndParent, + BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), + &pEnumIL); + IShellFolder_Release(pSFRoot); + } + } + + if (SUCCEEDED(hr) && hwndTreeView) + { + TreeView_DeleteAllItems(hwndTreeView); + TreeView_Expand(hwndTreeView, + InsertTreeViewItem(lpsf, _ILIsPidlSimple(root) ? root : ILFindLastID(root), parentofroot, pEnumIL, TVI_ROOT), + TVE_EXPAND); + } + + if (SUCCEEDED(hr)) + IShellFolder_Release(lpsf); + + TRACE("done\n"); +} + +static int GetIcon(LPITEMIDLIST lpi, UINT uFlags) +{ + SHFILEINFOW sfi; + SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags); + return sfi.iIcon; +} + +static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTVITEMW lpTV_ITEM) +{ + LPITEMIDLIST pidlDesktop = NULL; + + TRACE("%p %p\n",lpifq, lpTV_ITEM); + + if (!lpifq) + { + pidlDesktop = _ILCreateDesktop(); + lpifq = pidlDesktop; + } + + lpTV_ITEM->iImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON); + lpTV_ITEM->iSelectedImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_OPENICON); + + if (pidlDesktop) + ILFree(pidlDesktop); + + return; +} + +typedef struct tagID +{ + LPSHELLFOLDER lpsfParent; + LPITEMIDLIST lpi; + LPITEMIDLIST lpifq; + IEnumIDList* pEnumIL; +} TV_ITEMDATA, *LPTV_ITEMDATA; + +static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName) +{ + BOOL bSuccess=TRUE; + STRRET str; + + TRACE("%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName); + if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str))) + { + if (FAILED(StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi))) + { + bSuccess = FALSE; + } + } + else + bSuccess = FALSE; + + TRACE("-- %s\n", debugstr_w(lpFriendlyName)); + return bSuccess; +} + +static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent) +{ + TVITEMW tvi; + TVINSERTSTRUCTW tvins; + WCHAR szBuff[MAX_PATH]; + LPTV_ITEMDATA lptvid=0; + + tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; + + tvi.cChildren= pEnumIL ? 1 : 0; + tvi.mask |= TVIF_CHILDREN; + + if (!(lptvid = (LPTV_ITEMDATA)SHAlloc(sizeof(TV_ITEMDATA)))) + return NULL; + + if (!GetName(lpsf, pidl, SHGDN_NORMAL, szBuff)) + return NULL; + + tvi.pszText = szBuff; + tvi.cchTextMax = MAX_PATH; + tvi.lParam = (LPARAM)lptvid; + + IShellFolder_AddRef(lpsf); + lptvid->lpsfParent = lpsf; + lptvid->lpi = ILClone(pidl); + lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl); + lptvid->pEnumIL = pEnumIL; + GetNormalAndSelectedIcons(lptvid->lpifq, &tvi); + + tvins.u.item = tvi; + tvins.hInsertAfter = NULL; + tvins.hParent = hParent; + + return (HTREEITEM)TreeView_InsertItemW(hwndTreeView, &tvins); +} + +static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe) +{ + HTREEITEM hPrev = 0; + LPITEMIDLIST pidlTemp = 0; + ULONG ulFetched; + HRESULT hr; + HWND hwnd=GetParent(hwndTreeView); + + TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); + SetCapture(GetParent(hwndTreeView)); + SetCursor(LoadCursorA(0, (LPSTR)IDC_WAIT)); + + while (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)) + { + ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; + IEnumIDList* pEnumIL = NULL; + IShellFolder* pSFChild = NULL; + IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs); + if (ulAttrs & SFGAO_FOLDER) + { + hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*) &pSFChild); + if (SUCCEEDED(hr)) + { + hr = IShellFolder_EnumObjects(pSFChild, hwnd, BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), &pEnumIL); + if (SUCCEEDED(hr)) + { + if ((IEnumIDList_Skip(pEnumIL, 1) != S_OK) || FAILED(IEnumIDList_Reset(pEnumIL))) + { + IEnumIDList_Release(pEnumIL); + pEnumIL = NULL; + } + } + IShellFolder_Release(pSFChild); + } [truncated at 1000 lines; 44732 more skipped]
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12595
by gvg@svn.reactos.com
Import and merge Wine-20041201 Added: trunk/reactos/lib/rpcrt4/ Added: trunk/reactos/lib/rpcrt4/Makefile Added: trunk/reactos/lib/rpcrt4/Makefile.ros-template Modified: trunk/reactos/lib/rpcrt4/rpc_server.c _____ Copied: trunk/reactos/lib/rpcrt4 (from rev 12594, vendor/wine/dlls/rpcrt4/current) _____ Added: trunk/reactos/lib/rpcrt4/Makefile --- vendor/wine/dlls/rpcrt4/current/Makefile 2004-12-31 15:50:08 UTC (rev 12594) +++ trunk/reactos/lib/rpcrt4/Makefile 2004-12-31 15:52:05 UTC (rev 12595) @@ -0,0 +1,9 @@ +# $Id: Makefile 9303 2004-05-04 20:10:07Z navaraf $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____ Added: trunk/reactos/lib/rpcrt4/Makefile.ros-template --- vendor/wine/dlls/rpcrt4/current/Makefile.ros-template 2004-12-31 15:50:08 UTC (rev 12594) +++ trunk/reactos/lib/rpcrt4/Makefile.ros-template 2004-12-31 15:52:05 UTC (rev 12595) @@ -0,0 +1,22 @@ +# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ + +TARGET_NAME = rpcrt4 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -Wall + +TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_RPCRT4) + +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +TARGET_NORC = yes + +default: all + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk _____ Modified: trunk/reactos/lib/rpcrt4/rpc_server.c --- vendor/wine/dlls/rpcrt4/current/rpc_server.c 2004-12-31 15:50:08 UTC (rev 12594) +++ trunk/reactos/lib/rpcrt4/rpc_server.c 2004-12-31 15:52:05 UTC (rev 12595) @@ -185,6 +185,7 @@ return packet; } +#ifndef __REACTOS__ typedef struct { PRPC_MESSAGE msg; void* buf; @@ -205,20 +206,25 @@ TRACE("returning failure packet\n"); return EXCEPTION_EXECUTE_HANDLER; } +#endif static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSAGE* msg) { RpcServerInterface* sif; RPC_DISPATCH_FUNCTION func; +#ifndef __REACTOS__ packet_state state; +#endif UUID *object_uuid; RpcPktHdr *response; void *buf = msg->Buffer; RPC_STATUS status; +#ifndef __REACTOS__ state.msg = msg; state.buf = buf; TlsSetValue(worker_tls, &state); +#endif switch (hdr->common.ptype) { case PKT_BIND: @@ -305,11 +311,15 @@ MAKEWORD(hdr->common.drep[2], hdr->common.drep[3])); /* dispatch */ +#ifndef __REACTOS__ __TRY { if (func) func(msg); } __EXCEPT(rpc_filter) { /* failure packet was created in rpc_filter */ } __ENDTRY +#else + if (func) func(msg); +#endif /* send response packet */ I_RpcSend(msg); @@ -333,7 +343,9 @@ I_RpcFreeBuffer(msg); msg->Buffer = NULL; RPCRT4_FreeHeader(hdr); +#ifndef __REACTOS__ TlsSetValue(worker_tls, NULL); +#endif } static DWORD CALLBACK RPCRT4_worker_thread(LPVOID the_arg)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12594
by gvg@svn.reactos.com
Need to remove existing files before doing vendor import Deleted: trunk/reactos/lib/rpcrt4/
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12593
by gvg@svn.reactos.com
Tag Wine-20041201 Added: vendor/wine/dlls/rpcrt4/Wine-20041201/ _____ Copied: vendor/wine/dlls/rpcrt4/Wine-20041201 (from rev 12592, vendor/wine/dlls/rpcrt4/current)
19 years, 12 months
1
0
0
0
Integrated change by gvg in revision 12592
by gvg@svn.reactos.com
Wine-20041201 vendor drop Added: vendor/wine/dlls/rpcrt4/ Added: vendor/wine/dlls/rpcrt4/current/ Added: vendor/wine/dlls/rpcrt4/current/Makefile.in Added: vendor/wine/dlls/rpcrt4/current/cproxy.c Added: vendor/wine/dlls/rpcrt4/current/cpsf.c Added: vendor/wine/dlls/rpcrt4/current/cpsf.h Added: vendor/wine/dlls/rpcrt4/current/cstub.c Added: vendor/wine/dlls/rpcrt4/current/ndr_marshall.c Added: vendor/wine/dlls/rpcrt4/current/ndr_midl.c Added: vendor/wine/dlls/rpcrt4/current/ndr_misc.h Added: vendor/wine/dlls/rpcrt4/current/ndr_ole.c Added: vendor/wine/dlls/rpcrt4/current/ndr_stubless.c Added: vendor/wine/dlls/rpcrt4/current/rpc_binding.c Added: vendor/wine/dlls/rpcrt4/current/rpc_binding.h Added: vendor/wine/dlls/rpcrt4/current/rpc_defs.h Added: vendor/wine/dlls/rpcrt4/current/rpc_epmap.c Added: vendor/wine/dlls/rpcrt4/current/rpc_message.c Added: vendor/wine/dlls/rpcrt4/current/rpc_message.h Added: vendor/wine/dlls/rpcrt4/current/rpc_misc.h Added: vendor/wine/dlls/rpcrt4/current/rpc_server.c Added: vendor/wine/dlls/rpcrt4/current/rpc_server.h Added: vendor/wine/dlls/rpcrt4/current/rpcrt4.spec Added: vendor/wine/dlls/rpcrt4/current/rpcrt4_main.c Added: vendor/wine/dlls/rpcrt4/current/rpcss_np_client.c Added: vendor/wine/dlls/rpcrt4/current/rpcss_np_client.h _____ Added: vendor/wine/dlls/rpcrt4/current/Makefile.in --- vendor/wine/dlls/rpcrt4/current/Makefile.in 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/Makefile.in 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,29 @@ +EXTRADEFS = -D_RPCRT4_ -DCOM_NO_WINDOWS_H -DMSWMSG +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = rpcrt4.dll +IMPORTS = iphlpapi advapi32 kernel32 ntdll +EXTRALIBS = -luuid + +C_SRCS = \ + cproxy.c \ + cpsf.c \ + cstub.c \ + ndr_marshall.c \ + ndr_midl.c \ + ndr_ole.c \ + ndr_stubless.c \ + rpc_binding.c \ + rpc_epmap.c \ + rpc_message.c \ + rpc_server.c \ + rpcrt4_main.c \ + rpcss_np_client.c + +SUBDIRS = tests + +@MAKE_DLL_RULES@ + +### Dependencies: _____ Added: vendor/wine/dlls/rpcrt4/current/cproxy.c --- vendor/wine/dlls/rpcrt4/current/cproxy.c 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/cproxy.c 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,342 @@ +/* + * COM proxy implementation + * + * Copyright 2001 Ove Kåven, TransGaming Technologies + * + * 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 + * + * TODO: Handle non-i386 architectures + * Get rid of #if 0'ed code. + */ + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" +#include "rpcproxy.h" + +#include "cpsf.h" +#include "ndr_misc.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +struct StublessThunk; + +/* I don't know what MS's std proxy structure looks like, + so this probably doesn't match, but that shouldn't matter */ +typedef struct { + IRpcProxyBufferVtbl *lpVtbl; + LPVOID *PVtbl; + DWORD RefCount; + const MIDL_STUBLESS_PROXY_INFO *stubless; + const IID* piid; + LPUNKNOWN pUnkOuter; + PCInterfaceName name; + LPPSFACTORYBUFFER pPSFactory; + LPRPCCHANNELBUFFER pChannel; + struct StublessThunk *thunks; +} StdProxyImpl; + +static IRpcProxyBufferVtbl StdProxy_Vtbl; + +#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) + +/* How the Windows stubless proxy thunks work is explained at + *
http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp
, + * but I'll use a slightly different method, to make life easier */ + +#if defined(__i386__) + +#include "pshpack1.h" + +struct StublessThunk { + BYTE push; + DWORD index; + BYTE call; + LONG handler; + BYTE ret; + WORD bytes; + BYTE pad[3]; +}; + +#include "poppack.h" + +/* adjust the stack size since we don't use Windows's method */ +#define STACK_ADJUST sizeof(DWORD) + +#define FILL_STUBLESS(x,idx,stk) \ + x->push = 0x68; /* pushl [immediate] */ \ + x->index = (idx); \ + x->call = 0xe8; /* call [near] */ \ + x->handler = (char*)ObjectStubless - (char*)&x->ret; \ + x->ret = 0xc2; /* ret [immediate] */ \ + x->bytes = stk; \ + x->pad[0] = 0x8d; /* leal (%esi),%esi */ \ + x->pad[1] = 0x76; \ + x->pad[2] = 0x00; + +static HRESULT WINAPI ObjectStubless(DWORD index) +{ + char *args = (char*)(&index + 2); + LPVOID iface = *(LPVOID*)args; + + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + + PFORMAT_STRING fs = This->stubless->ProcFormatString + This->stubless->FormatStringOffset[index]; + unsigned bytes = *(const WORD*)(fs+8) - STACK_ADJUST; + TRACE("(%p)->(%ld)([%d bytes]) ret=%08lx\n", iface, index, bytes, *(DWORD*)(args+bytes)); + + return RPCRT4_NdrClientCall2(This->stubless->pStubDesc, fs, args); +} + +#else /* __i386__ */ + +/* can't do that on this arch */ +struct StublessThunk { int dummy; }; +#define FILL_STUBLESS(x,idx,stk) \ + ERR("stubless proxies are not supported on this architecture\n"); +#define STACK_ADJUST 0 + +#endif /* __i386__ */ + +HRESULT WINAPI StdProxy_Construct(REFIID riid, + LPUNKNOWN pUnkOuter, + PCInterfaceName name, + CInterfaceProxyVtbl *vtbl, + CInterfaceStubVtbl *svtbl, + LPPSFACTORYBUFFER pPSFactory, + LPRPCPROXYBUFFER *ppProxy, + LPVOID *ppvObj) +{ + StdProxyImpl *This; + const MIDL_STUBLESS_PROXY_INFO *stubless = NULL; + + TRACE("(%p,%p,%p,%p,%p) %s\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj, name); + + /* I can't find any other way to detect stubless proxies than this hack */ + if (!IsEqualGUID(vtbl->header.piid, riid)) { + stubless = *(const void **)vtbl; + vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1); + TRACE("stubless=%p\n", stubless); + } + + TRACE("iid=%s\n", debugstr_guid(vtbl->header.piid)); + TRACE("vtbl=%p\n", vtbl->Vtbl); + + if (!IsEqualGUID(vtbl->header.piid, riid)) { + ERR("IID mismatch during proxy creation\n"); + return RPC_E_UNEXPECTED; + } + + This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(StdProxyImpl)); + if (!This) return E_OUTOFMEMORY; + + if (stubless) { + unsigned i, count = svtbl->header.DispatchTableCount; + /* Maybe the original vtbl is just modified directly to point at + * ObjectStublessClientXXX thunks in real Windows, but I don't like it + */ + TRACE("stubless thunks: count=%d\n", count); + This->thunks = HeapAlloc(GetProcessHeap(),0,sizeof(struct StublessThunk)*count); + This->PVtbl = HeapAlloc(GetProcessHeap(),0,sizeof(LPVOID)*count); + for (i=0; i<count; i++) { + struct StublessThunk *thunk = &This->thunks[i]; + if (vtbl->Vtbl[i] == (LPVOID)-1) { + PFORMAT_STRING fs = stubless->ProcFormatString + stubless->FormatStringOffset[i]; + unsigned bytes = *(const WORD*)(fs+8) - STACK_ADJUST; + TRACE("method %d: stacksize=%d\n", i, bytes); + FILL_STUBLESS(thunk, i, bytes) + This->PVtbl[i] = thunk; + } + else { + memset(thunk, 0, sizeof(struct StublessThunk)); + This->PVtbl[i] = vtbl->Vtbl[i]; + } + } + } + else + This->PVtbl = vtbl->Vtbl; + + This->lpVtbl = &StdProxy_Vtbl; + /* 1 reference for the proxy and 1 for the object */ + This->RefCount = 2; + This->stubless = stubless; + This->piid = vtbl->header.piid; + This->pUnkOuter = pUnkOuter; + This->name = name; + This->pPSFactory = pPSFactory; + This->pChannel = NULL; + *ppProxy = (LPRPCPROXYBUFFER)&This->lpVtbl; + *ppvObj = &This->PVtbl; + IPSFactoryBuffer_AddRef(pPSFactory); + + return S_OK; +} + +static void WINAPI StdProxy_Destruct(LPRPCPROXYBUFFER iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + + if (This->pChannel) + IRpcProxyBuffer_Disconnect(iface); + + IPSFactoryBuffer_Release(This->pPSFactory); + if (This->thunks) { + HeapFree(GetProcessHeap(),0,This->PVtbl); + HeapFree(GetProcessHeap(),0,This->thunks); + } + HeapFree(GetProcessHeap(),0,This); +} + +static HRESULT WINAPI StdProxy_QueryInterface(LPRPCPROXYBUFFER iface, + REFIID riid, + LPVOID *obj) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(riid),obj); + + if (IsEqualGUID(&IID_IUnknown,riid) || + IsEqualGUID(This->piid,riid)) { + *obj = &This->PVtbl; + This->RefCount++; + return S_OK; + } + + if (IsEqualGUID(&IID_IRpcProxyBuffer,riid)) { + *obj = &This->lpVtbl; + This->RefCount++; + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI StdProxy_AddRef(LPRPCPROXYBUFFER iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + TRACE("(%p)->AddRef()\n",This); + + return ++(This->RefCount); +} + +static ULONG WINAPI StdProxy_Release(LPRPCPROXYBUFFER iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + TRACE("(%p)->Release()\n",This); + + if (!--(This->RefCount)) { + StdProxy_Destruct((LPRPCPROXYBUFFER)&This->lpVtbl); + return 0; + } + return This->RefCount; +} + +static HRESULT WINAPI StdProxy_Connect(LPRPCPROXYBUFFER iface, + LPRPCCHANNELBUFFER pChannel) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + TRACE("(%p)->Connect(%p)\n",This,pChannel); + + This->pChannel = pChannel; + IRpcChannelBuffer_AddRef(pChannel); + return S_OK; +} + +static VOID WINAPI StdProxy_Disconnect(LPRPCPROXYBUFFER iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + TRACE("(%p)->Disconnect()\n",This); + + IRpcChannelBuffer_Release(This->pChannel); + This->pChannel = NULL; +} + +static IRpcProxyBufferVtbl StdProxy_Vtbl = +{ + StdProxy_QueryInterface, + StdProxy_AddRef, + StdProxy_Release, + StdProxy_Connect, + StdProxy_Disconnect +}; + +HRESULT WINAPI StdProxy_GetChannel(LPVOID iface, + LPRPCCHANNELBUFFER *ppChannel) +{ + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + TRACE("(%p)->GetChannel(%p) %s\n",This,ppChannel,This->name); + + *ppChannel = This->pChannel; + return S_OK; +} + +HRESULT WINAPI StdProxy_GetIID(LPVOID iface, + const IID **ppiid) +{ + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + TRACE("(%p)->GetIID(%p) %s\n",This,ppiid,This->name); + + *ppiid = This->piid; + return S_OK; +} + +HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface, + REFIID riid, + LPVOID *ppvObj) +{ + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + TRACE("(%p)->QueryInterface(%s,%p) %s\n",This,debugstr_guid(riid),ppvObj,This->name); + return IUnknown_QueryInterface(This->pUnkOuter,riid,ppvObj); +} + +ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + TRACE("(%p)->AddRef() %s\n",This,This->name); +#if 0 /* interface refcounting */ + return ++(This->RefCount); +#else /* object refcounting */ + return IUnknown_AddRef(This->pUnkOuter); +#endif +} + +ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface) +{ + ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + TRACE("(%p)->Release() %s\n",This,This->name); +#if 0 /* interface refcounting */ + if (!--(This->RefCount)) { + StdProxy_Destruct((LPRPCPROXYBUFFER)&This->lpVtbl); + return 0; + } + return This->RefCount; +#else /* object refcounting */ + return IUnknown_Release(This->pUnkOuter); +#endif +} + +HRESULT WINAPI +CreateProxyFromTypeInfo( LPTYPEINFO pTypeInfo, LPUNKNOWN pUnkOuter, REFIID riid, + LPRPCPROXYBUFFER *ppProxy, LPVOID *ppv ) +{ + FIXME("%p %p %s %p %p\n", pTypeInfo, pUnkOuter, debugstr_guid(riid), ppProxy, ppv); + return E_NOTIMPL; +} _____ Added: vendor/wine/dlls/rpcrt4/current/cpsf.c --- vendor/wine/dlls/rpcrt4/current/cpsf.c 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/cpsf.c 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,263 @@ +/* + * COM proxy/stub factory (CStdPSFactory) implementation + * + * Copyright 2001 Ove Kåven, TransGaming Technologies + * + * 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 + */ + +#include <stdarg.h> +#include <stdio.h> +#include <string.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" + +#include "objbase.h" + +#include "rpcproxy.h" + +#include "wine/debug.h" + +#include "cpsf.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +static BOOL FindProxyInfo(const ProxyFileInfo **pProxyFileList, REFIID riid, const ProxyFileInfo **pProxyInfo, int *pIndex) +{ + while (*pProxyFileList) { + if ((*pProxyFileList)->pIIDLookupRtn(riid, pIndex)) { + *pProxyInfo = *pProxyFileList; + TRACE("found: ProxyInfo %p Index %d\n", *pProxyInfo, *pIndex); + return TRUE; + } + pProxyFileList++; + } + TRACE("not found\n"); + return FALSE; +} + +static HRESULT WINAPI CStdPSFactory_QueryInterface(LPPSFACTORYBUFFER iface, + REFIID riid, + LPVOID *obj) +{ + CStdPSFactoryBuffer *This = (CStdPSFactoryBuffer *)iface; + TRACE("(%p)->QueryInterface(%s,%p)\n",iface,debugstr_guid(riid),obj); + if (IsEqualGUID(&IID_IUnknown,riid) || + IsEqualGUID(&IID_IPSFactoryBuffer,riid)) { + *obj = This; + This->RefCount++; + return S_OK; + } + return E_NOINTERFACE; +} + +static ULONG WINAPI CStdPSFactory_AddRef(LPPSFACTORYBUFFER iface) +{ + CStdPSFactoryBuffer *This = (CStdPSFactoryBuffer *)iface; + TRACE("(%p)->AddRef()\n",iface); + return ++(This->RefCount); +} + +static ULONG WINAPI CStdPSFactory_Release(LPPSFACTORYBUFFER iface) +{ + CStdPSFactoryBuffer *This = (CStdPSFactoryBuffer *)iface; + TRACE("(%p)->Release()\n",iface); + return --(This->RefCount); +} + +static HRESULT WINAPI CStdPSFactory_CreateProxy(LPPSFACTORYBUFFER iface, + LPUNKNOWN pUnkOuter, + REFIID riid, + LPRPCPROXYBUFFER *ppProxy, + LPVOID *ppv) +{ + CStdPSFactoryBuffer *This = (CStdPSFactoryBuffer *)iface; + const ProxyFileInfo *ProxyInfo; + int Index; + TRACE("(%p)->CreateProxy(%p,%s,%p,%p)\n",iface,pUnkOuter, + debugstr_guid(riid),ppProxy,ppv); + if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index)) + return E_NOINTERFACE; + return StdProxy_Construct(riid, pUnkOuter, ProxyInfo->pNamesArray[Index], + ProxyInfo->pProxyVtblList[Index], + ProxyInfo->pStubVtblList[Index], iface, ppProxy, ppv); +} + +static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, + REFIID riid, + LPUNKNOWN pUnkServer, + LPRPCSTUBBUFFER *ppStub) +{ + CStdPSFactoryBuffer *This = (CStdPSFactoryBuffer *)iface; + const ProxyFileInfo *ProxyInfo; + int Index; + TRACE("(%p)->CreateStub(%s,%p,%p)\n",iface,debugstr_guid(riid), + pUnkServer,ppStub); + if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index)) + return E_NOINTERFACE; + return CStdStubBuffer_Construct(riid, pUnkServer, ProxyInfo->pNamesArray[Index], + ProxyInfo->pStubVtblList[Index], iface, ppStub); +} + +static IPSFactoryBufferVtbl CStdPSFactory_Vtbl = +{ + CStdPSFactory_QueryInterface, + CStdPSFactory_AddRef, + CStdPSFactory_Release, + CStdPSFactory_CreateProxy, + CStdPSFactory_CreateStub +}; + +/********************************************************************** * + * NdrDllGetClassObject [RPCRT4.@] + */ +HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, + const ProxyFileInfo **pProxyFileList, + const CLSID *pclsid, + CStdPSFactoryBuffer *pPSFactoryBuffer) +{ + *ppv = NULL; + if (!pPSFactoryBuffer->lpVtbl) { + pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl; + pPSFactoryBuffer->RefCount = 0; + pPSFactoryBuffer->pProxyFileList = pProxyFileList; + } + if (IsEqualGUID(rclsid, pclsid)) + return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/********************************************************************** * + * NdrDllCanUnloadNow [RPCRT4.@] + */ +HRESULT WINAPI NdrDllCanUnloadNow(CStdPSFactoryBuffer *pPSFactoryBuffer) +{ + return !(pPSFactoryBuffer->RefCount); +} + +/********************************************************************** * + * NdrDllRegisterProxy [RPCRT4.@] + */ +HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, + const ProxyFileInfo **pProxyFileList, + const CLSID *pclsid) +{ + LPSTR clsid; + char keyname[120], module[MAX_PATH]; + HKEY key, subkey; + DWORD len; + + TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid)); + UuidToStringA((UUID*)pclsid, (unsigned char**)&clsid); + + /* register interfaces to point to clsid */ + while (*pProxyFileList) { + unsigned u; + for (u=0; u<(*pProxyFileList)->TableSize; u++) { + CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u]; + PCInterfaceName name = (*pProxyFileList)->pNamesArray[u]; + LPSTR iid; + + TRACE("registering %s %s => %s\n", name, debugstr_guid(proxy->header.piid), clsid); + + UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid); + snprintf(keyname, sizeof(keyname), "Interface\\{%s}", iid); + RpcStringFreeA((unsigned char**)&iid); + if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, + KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { + if (name) + RegSetValueExA(key, NULL, 0, REG_SZ, name, strlen(name)); + if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0, + KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { + snprintf(module, sizeof(module), "{%s}", clsid); + RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module)); + RegCloseKey(subkey); + } + RegCloseKey(key); + } + } + pProxyFileList++; + } + + /* register clsid to point to module */ + snprintf(keyname, sizeof(keyname), "CLSID\\{%s}", clsid); + len = GetModuleFileNameA(hDll, module, sizeof(module)); + if (len && len < sizeof(module)) { + TRACE("registering CLSID %s => %s\n", clsid, module); + if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, + KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { + if (RegCreateKeyExA(key, "InProcServer32", 0, NULL, 0, + KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { + RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module)); + RegCloseKey(subkey); + } + RegCloseKey(key); + } + } + + /* done */ + RpcStringFreeA((unsigned char**)&clsid); + return S_OK; +} + +/********************************************************************** * + * NdrDllUnregisterProxy [RPCRT4.@] + */ +HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll, + const ProxyFileInfo **pProxyFileList, + const CLSID *pclsid) +{ + LPSTR clsid; + char keyname[120], module[MAX_PATH]; + DWORD len; + + TRACE("(%p,%p,%s)\n", hDll, pProxyFileList, debugstr_guid(pclsid)); + UuidToStringA((UUID*)pclsid, (unsigned char**)&clsid); + + /* unregister interfaces */ + while (*pProxyFileList) { + unsigned u; + for (u=0; u<(*pProxyFileList)->TableSize; u++) { + CInterfaceStubVtbl *proxy = (*pProxyFileList)->pStubVtblList[u]; + PCInterfaceName name = (*pProxyFileList)->pNamesArray[u]; + LPSTR iid; + + TRACE("unregistering %s %s <= %s\n", name, debugstr_guid(proxy->header.piid), clsid); + + UuidToStringA((UUID*)proxy->header.piid, (unsigned char**)&iid); + snprintf(keyname, sizeof(keyname), "Interface\\{%s}", iid); + RpcStringFreeA((unsigned char**)&iid); + RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname); + } + pProxyFileList++; + } + + /* unregister clsid */ + snprintf(keyname, sizeof(keyname), "CLSID\\{%s}", clsid); + len = GetModuleFileNameA(hDll, module, sizeof(module)); + if (len && len < sizeof(module)) { + TRACE("unregistering CLSID %s <= %s\n", clsid, module); + RegDeleteKeyA(HKEY_CLASSES_ROOT, keyname); + } + + /* done */ + RpcStringFreeA((unsigned char**)&clsid); + return S_OK; +} _____ Added: vendor/wine/dlls/rpcrt4/current/cpsf.h --- vendor/wine/dlls/rpcrt4/current/cpsf.h 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/cpsf.h 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,44 @@ +/* + * COM proxy definitions + * + * Copyright 2001 Ove Kåven, TransGaming Technologies + * + * 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 __WINE_CPSF_H +#define __WINE_CPSF_H + +HRESULT WINAPI StdProxy_Construct(REFIID riid, + LPUNKNOWN pUnkOuter, + PCInterfaceName name, + CInterfaceProxyVtbl *vtbl, + CInterfaceStubVtbl *svtbl, + LPPSFACTORYBUFFER pPSFactory, + LPRPCPROXYBUFFER *ppProxy, + LPVOID *ppvObj); +HRESULT WINAPI StdProxy_GetChannel(LPVOID iface, + LPRPCCHANNELBUFFER *ppChannel); +HRESULT WINAPI StdProxy_GetIID(LPVOID iface, + const IID **piid); + +HRESULT WINAPI CStdStubBuffer_Construct(REFIID riid, + LPUNKNOWN pUnkServer, + PCInterfaceName name, + CInterfaceStubVtbl *vtbl, + LPPSFACTORYBUFFER pPSFactory, + LPRPCSTUBBUFFER *ppStub); + +#endif /* __WINE_CPSF_H */ _____ Added: vendor/wine/dlls/rpcrt4/current/cstub.c --- vendor/wine/dlls/rpcrt4/current/cstub.c 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/cstub.c 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,169 @@ +/* + * COM stub (CStdStubBuffer) implementation + * + * Copyright 2001 Ove Kåven, TransGaming Technologies + * + * 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 + */ + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" + +#include "rpcproxy.h" + +#include "wine/debug.h" + +#include "cpsf.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +#define STUB_HEADER(This) (((CInterfaceStubHeader*)((This)->lpVtbl))[-1]) + +HRESULT WINAPI CStdStubBuffer_Construct(REFIID riid, + LPUNKNOWN pUnkServer, + PCInterfaceName name, + CInterfaceStubVtbl *vtbl, + LPPSFACTORYBUFFER pPSFactory, + LPRPCSTUBBUFFER *ppStub) +{ + CStdStubBuffer *This; + + TRACE("(%p,%p,%p,%p) %s\n", pUnkServer, vtbl, pPSFactory, ppStub, name); + TRACE("iid=%s\n", debugstr_guid(vtbl->header.piid)); + TRACE("vtbl=%p\n", &vtbl->Vtbl); + + if (!IsEqualGUID(vtbl->header.piid, riid)) { + ERR("IID mismatch during stub creation\n"); + return RPC_E_UNEXPECTED; + } + + This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(CStdStubBuffer)); + if (!This) return E_OUTOFMEMORY; + + This->lpVtbl = &vtbl->Vtbl; + This->RefCount = 1; + This->pvServerObject = pUnkServer; + This->pPSFactory = pPSFactory; + *ppStub = (LPRPCSTUBBUFFER)This; + + IUnknown_AddRef(This->pvServerObject); + IPSFactoryBuffer_AddRef(pPSFactory); + return S_OK; +} + +HRESULT WINAPI CStdStubBuffer_QueryInterface(LPRPCSTUBBUFFER iface, + REFIID riid, + LPVOID *obj) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(riid),obj); + + if (IsEqualGUID(&IID_IUnknown,riid) || + IsEqualGUID(&IID_IRpcStubBuffer,riid)) { + *obj = This; + This->RefCount++; + return S_OK; + } + return E_NOINTERFACE; +} + +ULONG WINAPI CStdStubBuffer_AddRef(LPRPCSTUBBUFFER iface) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->AddRef()\n",This); + return ++(This->RefCount); +} + +ULONG WINAPI NdrCStdStubBuffer_Release(LPRPCSTUBBUFFER iface, + LPPSFACTORYBUFFER pPSF) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->Release()\n",This); + + if (!--(This->RefCount)) { + if(This->pvServerObject) + IUnknown_Release(This->pvServerObject); + if(This->pPSFactory) + IPSFactoryBuffer_Release(This->pPSFactory); + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->RefCount; +} + +HRESULT WINAPI CStdStubBuffer_Connect(LPRPCSTUBBUFFER iface, + LPUNKNOWN lpUnkServer) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->Connect(%p)\n",This,lpUnkServer); + This->pvServerObject = lpUnkServer; + return S_OK; +} + +void WINAPI CStdStubBuffer_Disconnect(LPRPCSTUBBUFFER iface) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->Disconnect()\n",This); + This->pvServerObject = NULL; +} + +HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface, + PRPCOLEMESSAGE pMsg, + LPRPCCHANNELBUFFER pChannel) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + DWORD dwPhase = STUB_UNMARSHAL; + TRACE("(%p)->Invoke(%p,%p)\n",This,pMsg,pChannel); + + STUB_HEADER(This).pDispatchTable[pMsg->iMethod](iface, pChannel, (PRPC_MESSAGE)pMsg, &dwPhase); + return S_OK; +} + +LPRPCSTUBBUFFER WINAPI CStdStubBuffer_IsIIDSupported(LPRPCSTUBBUFFER iface, + REFIID riid) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->IsIIDSupported(%s)\n",This,debugstr_guid(riid)); + return IsEqualGUID(STUB_HEADER(This).piid, riid) ? iface : NULL; +} + +ULONG WINAPI CStdStubBuffer_CountRefs(LPRPCSTUBBUFFER iface) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->CountRefs()\n",This); + return This->RefCount; +} + +HRESULT WINAPI CStdStubBuffer_DebugServerQueryInterface(LPRPCSTUBBUFFER iface, + LPVOID *ppv) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->DebugServerQueryInterface(%p)\n",This,ppv); + return S_OK; +} + +void WINAPI CStdStubBuffer_DebugServerRelease(LPRPCSTUBBUFFER iface, + LPVOID pv) +{ + CStdStubBuffer *This = (CStdStubBuffer *)iface; + TRACE("(%p)->DebugServerRelease(%p)\n",This,pv); +} _____ Added: vendor/wine/dlls/rpcrt4/current/ndr_marshall.c --- vendor/wine/dlls/rpcrt4/current/ndr_marshall.c 2004-12-31 15:44:47 UTC (rev 12591) +++ vendor/wine/dlls/rpcrt4/current/ndr_marshall.c 2004-12-31 15:47:31 UTC (rev 12592) @@ -0,0 +1,2118 @@ +/* + * NDR data marshalling + * + * Copyright 2002 Greg Turner + * + * 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 + * + * TODO: + * - figure out whether we *really* got this right + * - check for errors and throw exceptions + */ + +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" + +#include "ndr_misc.h" +#include "rpcndr.h" + +#include "wine/unicode.h" +#include "wine/rpcfc.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +#define BUFFER_PARANOIA 20 + +#if defined(__i386__) + #define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \ + (*((UINT32 *)(pchar)) = (uint32)) + + #define LITTLE_ENDIAN_UINT32_READ(pchar) \ + (*((UINT32 *)(pchar))) +#else + /* these would work for i386 too, but less efficient */ + #define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \ + (*(pchar) = LOBYTE(LOWORD(uint32)), \ + *((pchar)+1) = HIBYTE(LOWORD(uint32)), \ + *((pchar)+2) = LOBYTE(HIWORD(uint32)), \ + *((pchar)+3) = HIBYTE(HIWORD(uint32)), \ + (uint32)) /* allow as r-value */ + + #define LITTLE_ENDIAN_UINT32_READ(pchar) \ + (MAKELONG( \ + MAKEWORD(*(pchar), *((pchar)+1)), \ + MAKEWORD(*((pchar)+2), *((pchar)+3)))) +#endif + +#define BIG_ENDIAN_UINT32_WRITE(pchar, uint32) \ + (*((pchar)+3) = LOBYTE(LOWORD(uint32)), \ + *((pchar)+2) = HIBYTE(LOWORD(uint32)), \ + *((pchar)+1) = LOBYTE(HIWORD(uint32)), \ + *(pchar) = HIBYTE(HIWORD(uint32)), \ + (uint32)) /* allow as r-value */ + +#define BIG_ENDIAN_UINT32_READ(pchar) \ + (MAKELONG( \ + MAKEWORD(*((pchar)+3), *((pchar)+2)), \ + MAKEWORD(*((pchar)+1), *(pchar)))) + +#ifdef NDR_LOCAL_IS_BIG_ENDIAN + #define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \ + BIG_ENDIAN_UINT32_WRITE(pchar, uint32) + #define NDR_LOCAL_UINT32_READ(pchar) \ + BIG_ENDIAN_UINT32_READ(pchar) +#else + #define NDR_LOCAL_UINT32_WRITE(pchar, uint32) \ + LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) + #define NDR_LOCAL_UINT32_READ(pchar) \ + LITTLE_ENDIAN_UINT32_READ(pchar) +#endif + +/* _Align must be the desired alignment minus 1, + * e.g. ALIGN_LENGTH(len, 3) to align on a dword boundary. */ +#define ALIGNED_LENGTH(_Len, _Align) (((_Len)+(_Align))&~(_Align)) +#define ALIGNED_POINTER(_Ptr, _Align) ((LPVOID)ALIGNED_LENGTH((ULONG_PTR)(_Ptr), _Align)) +#define ALIGN_LENGTH(_Len, _Align) _Len = ALIGNED_LENGTH(_Len, _Align) +#define ALIGN_POINTER(_Ptr, _Align) _Ptr = ALIGNED_POINTER(_Ptr, _Align) + +#define STD_OVERFLOW_CHECK(_Msg) do { \ + TRACE("buffer=%d/%ld\n", _Msg->Buffer - _Msg->BufferStart, _Msg->BufferLength); \ + if (_Msg->Buffer > _Msg->BufferEnd) ERR("buffer overflow %d bytes\n", _Msg->Buffer - _Msg->BufferEnd); \ + } while (0) + +#define NDR_TABLE_SIZE 128 +#define NDR_TABLE_MASK 127 + +NDR_MARSHALL NdrMarshaller[NDR_TABLE_SIZE] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x10 */ + 0, + /* 0x11 */ + NdrPointerMarshall, NdrPointerMarshall, + NdrPointerMarshall, NdrPointerMarshall, + /* 0x15 */ + NdrSimpleStructMarshall, NdrSimpleStructMarshall, + 0, 0, 0, + NdrComplexStructMarshall, + /* 0x1b */ + NdrConformantArrayMarshall, 0, 0, 0, 0, 0, + NdrComplexArrayMarshall, + /* 0x22 */ + NdrConformantStringMarshall, 0, 0, [truncated at 1000 lines; 7732 more skipped]
19 years, 12 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200