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
August 2005
----- 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
23 participants
669 discussions
Start a n
N
ew thread
[gvg] 17038: Francois Gouget <fgouget@free.fr>
by gvg@svn.reactos.com
Francois Gouget <fgouget(a)free.fr> Fix winapi_check documentation warnings. Modified: trunk/reactos/lib/olepro32/olepro32stubs.c _____ Modified: trunk/reactos/lib/olepro32/olepro32stubs.c --- trunk/reactos/lib/olepro32/olepro32stubs.c 2005-08-03 22:46:31 UTC (rev 17037) +++ trunk/reactos/lib/olepro32/olepro32stubs.c 2005-08-03 22:49:47 UTC (rev 17038) @@ -59,7 +59,7 @@ } /*********************************************************************** - * DllGetClassObject (OLEPRO32.256) + * DllGetClassObject (OLEPRO32.@) */ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID* ppv ) {
19 years, 4 months
1
0
0
0
[gvg] 17037: Sync to Wine-20050628:
by gvg@svn.reactos.com
Sync to Wine-20050628: Dmitry Timoshkov <dmitry(a)codeweavers.com> - Make remaining OLE interface vtables const. Robert Shearman <rob(a)codeweavers.com> - DispInvoke is correct so there is no need to print a fixme. - The typelib marshaler should only free the memory it actually allocated. - Add special cases for two lesser used types that aren't sizeof(DWORD) sized. - If we are accessing a method from a superclass then we need to use the superclass's ITypeInfo otherwise we could get errors when accessing hreftypes that aren't present in the subclass. - Don't print out cryptic message if IDispatch or IUnknown object is just NULL. - puArgErr is a ref pointer so we have to provide a dummy pointer if it is NULL. - Fail gracefully and notify caller if we ran out of memoy or if variant copying failed. - Clear out parameters to stop bad pointers lying around in memory if the function doesn't set them to anything. - Fix the return values from QueryPathOfRegTypeLib. - Open registry key with least access rights necessary. - Documentation updates. Michael Stefaniuc <mstefani(a)redhat.de> - VarCmp: handle comparision of VT_EMPTY with an integer - small comment fix - Reimplement VarAdd, had missing functionality and wrong behaviour. - Fix a typo in VarMul. - more VarFormat fixes for number formats (exponent, mixed '#' and '0' in formats, rounding, etc). Simplify the code. - previous VarFormat todo_wine tests pass now + add more tests - Fix VarFormat for formats that mix '0' and '#' in the whole number part. - Fix VarFormat for negative exponent formats. - Add tests for the above + a couple of "todo_wine"'s. - implement handling of exponents (e+,e-,E+,E-) when parsing number formats - fix a small cut'n'paste error in the comments Francois Gouget <fgouget(a)free.fr> - Assorted spelling fixes. Marcus Meissner <marcus(a)jet.franken.de> - Added VarMonthName() implementation. - Corrected string length method in ITypeLib::IsName() and FindName() for LPOLESTR type. - Fixed IType::Invoke in regards to handling propertyget variables longer than 4 bytes (like VT_DATE). - Added testcases for OLE Picture handling. - Implemented PICTYPE_NONE loading. - Cleaned up stream loading, handle "lt" magic. - Fixed some small problems exposed by tests against native. Stefan Huehner <stefan(a)huehner.org> - Fix some more -Wstrict-prototypes warnings. Huw Davies <huw(a)codeweavers.com> - Add comments describing the first DWORD in an import table entry. Modified: trunk/reactos/lib/oleaut32/connpt.c Modified: trunk/reactos/lib/oleaut32/dispatch.c Modified: trunk/reactos/lib/oleaut32/oaidl_p.c Modified: trunk/reactos/lib/oleaut32/oleaut32.spec Modified: trunk/reactos/lib/oleaut32/olefont.c Modified: trunk/reactos/lib/oleaut32/olepicture.c Modified: trunk/reactos/lib/oleaut32/recinfo.c Modified: trunk/reactos/lib/oleaut32/tmarshal.c Modified: trunk/reactos/lib/oleaut32/typelib.c Modified: trunk/reactos/lib/oleaut32/typelib.h Modified: trunk/reactos/lib/oleaut32/typelib2.c Modified: trunk/reactos/lib/oleaut32/usrmarshal.c Modified: trunk/reactos/lib/oleaut32/varformat.c Modified: trunk/reactos/lib/oleaut32/variant.c _____ Modified: trunk/reactos/lib/oleaut32/connpt.c --- trunk/reactos/lib/oleaut32/connpt.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/connpt.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -48,7 +48,7 @@ */ typedef struct ConnectionPointImpl { - IConnectionPointVtbl *lpvtbl; + const IConnectionPointVtbl *lpvtbl; /* IUnknown of our main object*/ IUnknown *Obj; @@ -66,7 +66,7 @@ DWORD nSinks; } ConnectionPointImpl; -static IConnectionPointVtbl ConnectionPointImpl_VTable; +static const IConnectionPointVtbl ConnectionPointImpl_VTable; /*********************************************************************** * @@ -74,7 +74,7 @@ */ typedef struct EnumConnectionsImpl { - IEnumConnectionsVtbl *lpvtbl; + const IEnumConnectionsVtbl *lpvtbl; DWORD ref; @@ -351,7 +351,7 @@ return hr; } -static IConnectionPointVtbl ConnectionPointImpl_VTable = +static const IConnectionPointVtbl ConnectionPointImpl_VTable = { ConnectionPointImpl_QueryInterface, ConnectionPointImpl_AddRef, @@ -364,7 +364,7 @@ }; -static IEnumConnectionsVtbl EnumConnectionsImpl_VTable; +static const IEnumConnectionsVtbl EnumConnectionsImpl_VTable; static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface); /*********************************************************************** * @@ -587,7 +587,7 @@ return S_OK; } -static IEnumConnectionsVtbl EnumConnectionsImpl_VTable = +static const IEnumConnectionsVtbl EnumConnectionsImpl_VTable = { EnumConnectionsImpl_QueryInterface, EnumConnectionsImpl_AddRef, _____ Modified: trunk/reactos/lib/oleaut32/dispatch.c --- trunk/reactos/lib/oleaut32/dispatch.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/dispatch.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -17,7 +17,6 @@ * 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: Type coercion is implemented in variant.c but not called yet. */ #include "config.h" @@ -78,11 +77,7 @@ EXCEPINFO *pexcepinfo, /* [out] Destination for exception information */ UINT *puArgErr) /* [out] Destination for bad argument */ { - /** - * TODO: - * For each param, call DispGetParam to perform type coercion - */ - FIXME("Coercion of arguments not implemented\n"); + TRACE("\n"); return ITypeInfo_Invoke(ptinfo, _this, dispidMember, wFlags, pparams, pvarResult, pexcepinfo, puArgErr); @@ -219,7 +214,7 @@ typedef struct { - IDispatchVtbl *lpVtbl; + const IDispatchVtbl *lpVtbl; void * pvThis; ITypeInfo * pTypeInfo; ULONG ref; @@ -422,7 +417,7 @@ return DispInvoke(This->pvThis, This->pTypeInfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } -static IDispatchVtbl StdDispatch_VTable = +static const IDispatchVtbl StdDispatch_VTable = { StdDispatch_QueryInterface, StdDispatch_AddRef, _____ Modified: trunk/reactos/lib/oleaut32/oaidl_p.c --- trunk/reactos/lib/oleaut32/oaidl_p.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/oaidl_p.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -906,7 +906,7 @@ } -const CINTERFACE_PROXY_VTABLE(7) _IDispatchProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(7) _IDispatchProxyVtbl = { { &IID_IDispatch }, { @@ -929,7 +929,7 @@ IDispatch_RemoteInvoke_Stub }; -const CInterfaceStubVtbl _IDispatchStubVtbl = +static const CInterfaceStubVtbl _IDispatchStubVtbl = { { &IID_IDispatch, @@ -1447,7 +1447,7 @@ } -const CINTERFACE_PROXY_VTABLE(7) _IEnumVARIANTProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(7) _IEnumVARIANTProxyVtbl = { { &IID_IEnumVARIANT }, { @@ -1470,7 +1470,7 @@ IEnumVARIANT_Clone_Stub }; -const CInterfaceStubVtbl _IEnumVARIANTStubVtbl = +static const CInterfaceStubVtbl _IEnumVARIANTStubVtbl = { { &IID_IEnumVARIANT, @@ -2009,7 +2009,7 @@ } -const CINTERFACE_PROXY_VTABLE(5) _ITypeCompProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(5) _ITypeCompProxyVtbl = { { &IID_ITypeComp }, { @@ -2028,7 +2028,7 @@ ITypeComp_RemoteBindType_Stub }; -const CInterfaceStubVtbl _ITypeCompStubVtbl = +static const CInterfaceStubVtbl _ITypeCompStubVtbl = { { &IID_ITypeComp, @@ -4804,7 +4804,7 @@ } -const CINTERFACE_PROXY_VTABLE(22) _ITypeInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(22) _ITypeInfoProxyVtbl = { { &IID_ITypeInfo }, { @@ -4857,7 +4857,7 @@ ITypeInfo_LocalReleaseVarDesc_Stub }; -const CInterfaceStubVtbl _ITypeInfoStubVtbl = +static const CInterfaceStubVtbl _ITypeInfoStubVtbl = { { &IID_ITypeInfo, @@ -7141,7 +7141,7 @@ } -const CINTERFACE_PROXY_VTABLE(37) _ITypeInfo2ProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(37) _ITypeInfo2ProxyVtbl = { { &IID_ITypeInfo2 }, { @@ -7224,7 +7224,7 @@ ITypeInfo2_GetAllImplTypeCustData_Stub }; -const CInterfaceStubVtbl _ITypeInfo2StubVtbl = +static const CInterfaceStubVtbl _ITypeInfo2StubVtbl = { { &IID_ITypeInfo2, @@ -8924,7 +8924,7 @@ } -const CINTERFACE_PROXY_VTABLE(13) _ITypeLibProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(13) _ITypeLibProxyVtbl = { { &IID_ITypeLib }, { @@ -8959,7 +8959,7 @@ ITypeLib_LocalReleaseTLibAttr_Stub }; -const CInterfaceStubVtbl _ITypeLibStubVtbl = +static const CInterfaceStubVtbl _ITypeLibStubVtbl = { { &IID_ITypeLib, @@ -9631,7 +9631,7 @@ } -const CINTERFACE_PROXY_VTABLE(17) _ITypeLib2ProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(17) _ITypeLib2ProxyVtbl = { { &IID_ITypeLib2 }, { @@ -10330,7 +10330,7 @@ } -const CINTERFACE_PROXY_VTABLE(8) _IErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(8) _IErrorInfoProxyVtbl = { { &IID_IErrorInfo }, { @@ -10355,7 +10355,7 @@ IErrorInfo_GetHelpContext_Stub }; -const CInterfaceStubVtbl _IErrorInfoStubVtbl = +static const CInterfaceStubVtbl _IErrorInfoStubVtbl = { { &IID_IErrorInfo, @@ -10926,7 +10926,7 @@ } -const CINTERFACE_PROXY_VTABLE(8) _ICreateErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(8) _ICreateErrorInfoProxyVtbl = { { &IID_ICreateErrorInfo }, { @@ -10951,7 +10951,7 @@ ICreateErrorInfo_SetHelpContext_Stub }; -const CInterfaceStubVtbl _ICreateErrorInfoStubVtbl = +static const CInterfaceStubVtbl _ICreateErrorInfoStubVtbl = { { &IID_ICreateErrorInfo, @@ -11080,7 +11080,7 @@ } -const CINTERFACE_PROXY_VTABLE(4) _ISupportErrorInfoProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(4) _ISupportErrorInfoProxyVtbl = { { &IID_ISupportErrorInfo }, { @@ -11097,7 +11097,7 @@ ISupportErrorInfo_InterfaceSupportsErrorInfo_Stub }; -const CInterfaceStubVtbl _ISupportErrorInfoStubVtbl = +static const CInterfaceStubVtbl _ISupportErrorInfoStubVtbl = { { &IID_ISupportErrorInfo, @@ -11347,7 +11347,7 @@ 0 /* Reserved5 */ }; -const CINTERFACE_PROXY_VTABLE(4) _ITypeFactoryProxyVtbl = +static const CINTERFACE_PROXY_VTABLE(4) _ITypeFactoryProxyVtbl = { { &IID_ITypeFactory }, { @@ -11364,7 +11364,7 @@ ITypeFactory_CreateFromTypeInfo_Stub }; -const CInterfaceStubVtbl _ITypeFactoryStubVtbl = +static const CInterfaceStubVtbl _ITypeFactoryStubVtbl = { { &IID_ITypeFactory, @@ -13702,39 +13702,39 @@ } }; -const CInterfaceProxyVtbl * _oaidl_ProxyVtblList[] = +static const CInterfaceProxyVtbl * _oaidl_ProxyVtblList[] = { - ( CInterfaceProxyVtbl *) &_IDispatchProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeLibProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeCompProxyVtbl, - ( CInterfaceProxyVtbl *) &_IEnumVARIANTProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeLib2ProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeInfo2ProxyVtbl, - ( CInterfaceProxyVtbl *) &_IErrorInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ITypeFactoryProxyVtbl, - ( CInterfaceProxyVtbl *) &_ICreateErrorInfoProxyVtbl, - ( CInterfaceProxyVtbl *) &_ISupportErrorInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_IDispatchProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeLibProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeCompProxyVtbl, + ( const CInterfaceProxyVtbl *) &_IEnumVARIANTProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeLib2ProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeInfo2ProxyVtbl, + ( const CInterfaceProxyVtbl *) &_IErrorInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ITypeFactoryProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ICreateErrorInfoProxyVtbl, + ( const CInterfaceProxyVtbl *) &_ISupportErrorInfoProxyVtbl, 0 }; -const CInterfaceStubVtbl * _oaidl_StubVtblList[] = +static const CInterfaceStubVtbl * _oaidl_StubVtblList[] = { - ( CInterfaceStubVtbl *) &_IDispatchStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeLibStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeCompStubVtbl, - ( CInterfaceStubVtbl *) &_IEnumVARIANTStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeLib2StubVtbl, - ( CInterfaceStubVtbl *) &_ITypeInfo2StubVtbl, - ( CInterfaceStubVtbl *) &_IErrorInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ITypeFactoryStubVtbl, - ( CInterfaceStubVtbl *) &_ICreateErrorInfoStubVtbl, - ( CInterfaceStubVtbl *) &_ISupportErrorInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_IDispatchStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeLibStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeCompStubVtbl, + ( const CInterfaceStubVtbl *) &_IEnumVARIANTStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeLib2StubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeInfo2StubVtbl, + ( const CInterfaceStubVtbl *) &_IErrorInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ITypeFactoryStubVtbl, + ( const CInterfaceStubVtbl *) &_ICreateErrorInfoStubVtbl, + ( const CInterfaceStubVtbl *) &_ISupportErrorInfoStubVtbl, 0 }; -PCInterfaceName const _oaidl_InterfaceNamesList[] = +static const PCInterfaceName _oaidl_InterfaceNamesList[] = { "IDispatch", "ITypeInfo", @@ -13767,8 +13767,8 @@ const ExtendedProxyFileInfo oaidl_ProxyFileInfo = { - (PCInterfaceProxyVtblList *) & _oaidl_ProxyVtblList, - (PCInterfaceStubVtblList *) & _oaidl_StubVtblList, + (const PCInterfaceProxyVtblList *) & _oaidl_ProxyVtblList, + (const PCInterfaceStubVtblList *) & _oaidl_StubVtblList, (const PCInterfaceName * ) & _oaidl_InterfaceNamesList, 0, /* no delegation */ & _oaidl_IID_Lookup, _____ Modified: trunk/reactos/lib/oleaut32/oleaut32.spec --- trunk/reactos/lib/oleaut32/oleaut32.spec 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/oleaut32.spec 2005-08-03 22:46:31 UTC (rev 17037) @@ -126,7 +126,7 @@ 126 stdcall VarBoolFromDisp(ptr long ptr) 127 stdcall VarFormatCurrency(ptr long long long long long ptr) 128 stub VarWeekdayName # stdcall (long long long long ptr) -129 stub VarMonthName # stdcall (long long long ptr) +129 stdcall VarMonthName(long long long ptr) 130 stdcall VarUI1FromI2(long ptr) 131 stdcall VarUI1FromI4(long ptr) 132 stdcall VarUI1FromR4(long ptr) _____ Modified: trunk/reactos/lib/oleaut32/olefont.c --- trunk/reactos/lib/oleaut32/olefont.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/olefont.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -63,12 +63,12 @@ * The first two are supported by the first vtable, the next two are * supported by the second table and the last two have their own. */ - IFontVtbl* lpvtbl1; - IDispatchVtbl* lpvtbl2; - IPersistStreamVtbl* lpvtbl3; - IConnectionPointContainerVtbl* lpvtbl4; - IPersistPropertyBagVtbl* lpvtbl5; - IPersistStreamInitVtbl* lpvtbl6; + const IFontVtbl* lpvtbl1; + const IDispatchVtbl* lpvtbl2; + const IPersistStreamVtbl* lpvtbl3; + const IConnectionPointContainerVtbl* lpvtbl4; + const IPersistPropertyBagVtbl* lpvtbl5; + const IPersistStreamInitVtbl* lpvtbl6; /* * Reference count for that instance of the class. */ @@ -219,7 +219,7 @@ /* * Virtual function tables for the OLEFontImpl class. */ -static IFontVtbl OLEFontImpl_VTable = +static const IFontVtbl OLEFontImpl_VTable = { OLEFontImpl_QueryInterface, OLEFontImpl_AddRef, @@ -250,7 +250,7 @@ OLEFontImpl_SetHdc }; -static IDispatchVtbl OLEFontImpl_IDispatch_VTable = +static const IDispatchVtbl OLEFontImpl_IDispatch_VTable = { OLEFontImpl_IDispatch_QueryInterface, OLEFontImpl_IDispatch_AddRef, @@ -261,7 +261,7 @@ OLEFontImpl_Invoke }; -static IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable = +static const IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable = { OLEFontImpl_IPersistStream_QueryInterface, OLEFontImpl_IPersistStream_AddRef, @@ -273,7 +273,7 @@ OLEFontImpl_GetSizeMax }; -static IConnectionPointContainerVtbl +static const IConnectionPointContainerVtbl OLEFontImpl_IConnectionPointContainer_VTable = { OLEFontImpl_IConnectionPointContainer_QueryInterface, @@ -283,8 +283,9 @@ OLEFontImpl_FindConnectionPoint }; -static IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable; -static IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable; +static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable; +static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable; + /*********************************************************************** ******* * OleCreateFontIndirect [OLEAUT32.420] */ @@ -2002,7 +2003,7 @@ return E_FAIL; } -static IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable = +static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable = { OLEFontImpl_IPersistPropertyBag_QueryInterface, OLEFontImpl_IPersistPropertyBag_AddRef, @@ -2080,7 +2081,7 @@ return S_OK; } -static IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = +static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = { OLEFontImpl_IPersistStreamInit_QueryInterface, OLEFontImpl_IPersistStreamInit_AddRef, @@ -2100,7 +2101,7 @@ typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -2137,7 +2138,7 @@ return S_OK; } -static IClassFactoryVtbl SFCF_Vtbl = { +static const IClassFactoryVtbl SFCF_Vtbl = { SFCF_QueryInterface, SFCF_AddRef, SFCF_Release, _____ Modified: trunk/reactos/lib/oleaut32/olepicture.c --- trunk/reactos/lib/oleaut32/olepicture.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/olepicture.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -103,10 +103,10 @@ * IPicture handles IUnknown */ - IPictureVtbl *lpvtbl1; - IDispatchVtbl *lpvtbl2; - IPersistStreamVtbl *lpvtbl3; - IConnectionPointContainerVtbl *lpvtbl4; + const IPictureVtbl *lpvtbl1; + const IDispatchVtbl *lpvtbl2; + const IPersistStreamVtbl *lpvtbl3; + const IConnectionPointContainerVtbl *lpvtbl4; /* Object reference count */ DWORD ref; @@ -156,10 +156,10 @@ /* * Predeclare VTables. They get initialized at the end. */ -static IPictureVtbl OLEPictureImpl_VTable; -static IDispatchVtbl OLEPictureImpl_IDispatch_VTable; -static IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable; -static IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable; +static const IPictureVtbl OLEPictureImpl_VTable; +static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable; +static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable; +static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable; /*********************************************************************** * Implementation of the OLEPictureImpl class. @@ -334,6 +334,9 @@ case PICTYPE_ENHMETAFILE: DeleteEnhMetaFile(Obj->desc.u.emf.hemf); break; + case PICTYPE_NONE: + /* Nothing to do */ + break; default: FIXME("Unsupported type %d - unable to delete\n", Obj->desc.picType); break; @@ -485,6 +488,9 @@ OLEPictureImpl *This = (OLEPictureImpl *)iface; TRACE("(%p)->(%p)\n", This, phandle); switch(This->desc.picType) { + case PICTYPE_NONE: + *phandle = 0; + break; case PICTYPE_BITMAP: *phandle = (OLE_HANDLE)This->desc.u.bmp.hbitmap; break; @@ -512,8 +518,10 @@ OLE_HANDLE *phandle) { OLEPictureImpl *This = (OLEPictureImpl *)iface; - FIXME("(%p)->(%p): stub\n", This, phandle); - return E_NOTIMPL; + FIXME("(%p)->(%p): stub, return 0 palette.\n", This, phandle); + + *phandle = 0; + return S_OK; } /*********************************************************************** * @@ -992,7 +1000,8 @@ */ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) { HRESULT hr = E_FAIL; - ULONG xread; + BOOL headerisdata = FALSE; + ULONG xread, toread; BYTE *xbuf; DWORD header[2]; WORD magic; @@ -1013,43 +1022,54 @@ */ hr=IStream_Stat(pStm,&statstg,STATFLAG_NONAME); if (hr) - FIXME("Stat failed with hres %lx\n",hr); + FIXME("Stat failed with hres %lx\n",hr); hr=IStream_Read(pStm,header,8,&xread); if (hr || xread!=8) { FIXME("Failure while reading picture header (hr is %lx, nread is %ld).\n",hr,xread); return hr; } - if (!memcmp(&(header[0]), "GIF8", 4) || /* GIF header */ - !memcmp(&(header[0]), "BM", 2) || /* BMP header */ - !memcmp(&(header[0]), "\xff\xd8", 2) || /* JPEG header */ - header[1] > statstg.cbSize.QuadPart || (header[1]==0)) {/* Incorrect header, assume none. */ - xread = 8; - xbuf = This->data = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,statstg.cbSize.QuadPart); - memcpy(xbuf,&header,8); - This->datalen = statstg.cbSize.QuadPart; - while (xread < This->datalen) { + + headerisdata = FALSE; + xread = 0; + if (!memcmp(&(header[0]),"lt\0\0", 4) && (header[1] <= statstg.cbSize.QuadPart-8)) { + toread = header[1]; + } else { + if (!memcmp(&(header[0]), "GIF8", 4) || /* GIF header */ + !memcmp(&(header[0]), "BM", 2) || /* BMP header */ + !memcmp(&(header[0]), "\xff\xd8", 2) || /* JPEG header */ + (header[1] > statstg.cbSize.QuadPart) || /* invalid size */ + (header[1]==0) + ) {/* Incorrect header, assume none. */ + headerisdata = TRUE; + toread = statstg.cbSize.QuadPart-8; + xread = 8; + } else { + FIXME("Unknown stream header magic: %08lx\n", header[0]); + toread = header[1]; + } + } + + This->datalen = toread+(headerisdata?8:0); + xbuf = This->data = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, This->datalen); + + if (headerisdata) + memcpy (xbuf, &header, 8); + + while (xread < This->datalen) { ULONG nread; hr = IStream_Read(pStm,xbuf+xread,This->datalen-xread,&nread); xread+=nread; if (hr || !nread) break; - } - if (xread != This->datalen) - FIXME("Could only read %ld of %d bytes in no-header case?\n",xread,This->datalen); - } else { - xread = 0; - xbuf = This->data = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,header[1]); - This->datalen = header[1]; - while (xread < header[1]) { - ULONG nread; - hr = IStream_Read(pStm,xbuf+xread,header[1]-xread,&nread); - xread+=nread; - if (hr || !nread) - break; - } - if (xread != header[1]) - FIXME("Could only read %ld of %ld bytes?\n",xread,header[1]); } + if (xread != This->datalen) + FIXME("Could only read %ld of %d bytes out of stream?\n",xread,This->datalen); + + if (This->datalen == 0) { /* Marks the "NONE" picture */ + This->desc.picType = PICTYPE_NONE; + return S_OK; + } + magic = xbuf[0] + (xbuf[1]<<8); switch (magic) { case 0x4947: { /* GIF */ @@ -1917,7 +1937,7 @@ } -static IPictureVtbl OLEPictureImpl_VTable = +static const IPictureVtbl OLEPictureImpl_VTable = { OLEPictureImpl_QueryInterface, OLEPictureImpl_AddRef, @@ -1938,7 +1958,7 @@ OLEPictureImpl_get_Attributes }; -static IDispatchVtbl OLEPictureImpl_IDispatch_VTable = +static const IDispatchVtbl OLEPictureImpl_IDispatch_VTable = { OLEPictureImpl_IDispatch_QueryInterface, OLEPictureImpl_IDispatch_AddRef, @@ -1949,7 +1969,7 @@ OLEPictureImpl_Invoke }; -static IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable = +static const IPersistStreamVtbl OLEPictureImpl_IPersistStream_VTable = { OLEPictureImpl_IPersistStream_QueryInterface, OLEPictureImpl_IPersistStream_AddRef, @@ -1961,7 +1981,7 @@ OLEPictureImpl_GetSizeMax }; -static IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable = +static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContainer_VTable = { OLEPictureImpl_IConnectionPointContainer_QueryInterface, OLEPictureImpl_IConnectionPointContainer_AddRef, @@ -2189,7 +2209,7 @@ typedef struct { /* IUnknown fields */ - IClassFactoryVtbl *lpVtbl; + const IClassFactoryVtbl *lpVtbl; DWORD ref; } IClassFactoryImpl; @@ -2227,7 +2247,7 @@ return S_OK; } -static IClassFactoryVtbl SPCF_Vtbl = { +static const IClassFactoryVtbl SPCF_Vtbl = { SPCF_QueryInterface, SPCF_AddRef, SPCF_Release, _____ Modified: trunk/reactos/lib/oleaut32/recinfo.c --- trunk/reactos/lib/oleaut32/recinfo.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/recinfo.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -41,7 +41,7 @@ } fieldstr; typedef struct { - IRecordInfoVtbl *lpVtbl; + const IRecordInfoVtbl *lpVtbl; ULONG ref; GUID guid; @@ -476,7 +476,7 @@ return S_OK; } -static IRecordInfoVtbl IRecordInfoImplVtbl = { +static const IRecordInfoVtbl IRecordInfoImplVtbl = { IRecordInfoImpl_QueryInterface, IRecordInfoImpl_AddRef, IRecordInfoImpl_Release, _____ Modified: trunk/reactos/lib/oleaut32/tmarshal.c --- trunk/reactos/lib/oleaut32/tmarshal.c 2005-08-03 22:31:39 UTC (rev 17036) +++ trunk/reactos/lib/oleaut32/tmarshal.c 2005-08-03 22:46:31 UTC (rev 17037) @@ -355,8 +355,8 @@ #endif typedef struct _TMProxyImpl { - LPVOID *lpvtbl; - IRpcProxyBufferVtbl *lpvtbl2; + LPVOID *lpvtbl; + const IRpcProxyBufferVtbl *lpvtbl2; ULONG ref; TMAsmProxy *asmstubs; @@ -443,7 +443,7 @@ } -static IRpcProxyBufferVtbl tmproxyvtable = { +static const IRpcProxyBufferVtbl tmproxyvtable = { TMProxyImpl_QueryInterface, TMProxyImpl_AddRef, TMProxyImpl_Release, @@ -455,6 +455,10 @@ int _argsize(DWORD vt) { switch (vt) { + case VT_R8: + return sizeof(double)/sizeof(DWORD); + case VT_CY: + return sizeof(CY)/sizeof(DWORD); case VT_DATE: return sizeof(DATE)/sizeof(DWORD); case VT_VARIANT: @@ -607,7 +611,10 @@ } case VT_PTR: { DWORD cookie; + BOOL derefhere; + derefhere = (tdesc->u.lptdesc->vt != VT_USERDEFINED); + if (debugout) TRACE_(olerelay)("*"); /* Write always, so the other side knows when it gets a NULL pointer. */ @@ -620,7 +627,7 @@ return S_OK; } hres = serialize_param(tinfo,writeit,debugout,dealloc,tdesc->u.lptdesc,(DWORD*) *arg,buf); - if (dealloc) HeapFree(GetProcessHeap(),0,(LPVOID)arg); + if (derefhere && dealloc) HeapFree(GetProcessHeap(),0,(LPVOID)*arg); return hres; } case VT_UNKNOWN: @@ -686,6 +693,7 @@ (DWORD*)(((LPBYTE)arg)+vdesc->u.oInst), buf ); + ITypeInfo_ReleaseVarDesc(tinfo2, vdesc); if (hres!=S_OK) return hres; if (debugout && (i<(tattr->cVars-1))) @@ -1432,7 +1440,7 @@ /* Searches function, also in inherited interfaces */ static HRESULT _get_funcdesc( - ITypeInfo *tinfo, int iMethod, FUNCDESC **fdesc, BSTR *iname, BSTR *fname) + ITypeInfo *tinfo, int iMethod, ITypeInfo **tactual, FUNCDESC **fdesc, BSTR *iname, BSTR *fname) { int i = 0, j = 0; HRESULT hres; @@ -1440,6 +1448,9 @@ if (fname) *fname = NULL; if (iname) *iname = NULL; + *tactual = tinfo; + ITypeInfo_AddRef(*tactual); + while (1) { hres = ITypeInfo_GetFuncDesc(tinfo, i, fdesc); if (hres) { @@ -1464,7 +1475,7 @@ ERR("Did not find a typeinfo for reftype %ld?\n",href); continue; } - hres = _get_funcdesc(tinfo2,iMethod,fdesc,iname,fname); + hres = _get_funcdesc(tinfo2,iMethod,tactual,fdesc,iname,fname); ITypeInfo_Release(tinfo2); if (!hres) return S_OK; } @@ -1496,12 +1507,14 @@ int nrofnames; int is_idispatch_getidsofnames = 0; DWORD remoteresult = 0; + ITypeInfo *tinfo; EnterCriticalSection(&tpinfo->crit); - hres = _get_funcdesc(tpinfo->tinfo,method,&fdesc,&iname,&fname); + hres = _get_funcdesc(tpinfo->tinfo,method,&tinfo,&fdesc,&iname,&fname); if (hres) { ERR("Did not find typeinfo/funcdesc entry for method %d!\n",method); + ITypeInfo_Release(tinfo); LeaveCriticalSection(&tpinfo->crit); return E_FAIL; } @@ -1509,6 +1522,7 @@ if (!tpinfo->chanbuf) { WARN("Tried to use disconnected proxy\n"); + ITypeInfo_Release(tinfo); LeaveCriticalSection(&tpinfo->crit); return RPC_E_DISCONNECTED; } @@ -1537,6 +1551,8 @@ hres = serialize_IDispatch_GetIDsOfNames(TRUE,relaydeb,args,&buf); if (hres != S_OK) { FIXME("serialize of IDispatch::GetIDsOfNames failed!\n"); + ITypeInfo_Release(tinfo); + LeaveCriticalSection(&tpinfo->crit); return hres; } goto afterserialize; @@ -1553,7 +1569,7 @@ /* Need them for hack below */ memset(names,0,sizeof(names)); - if (ITypeInfo_GetNames(tpinfo->tinfo,fdesc->memid,names,sizeof(names)/sizeo f(names[0]),&nrofnames)) + if (ITypeInfo_GetNames(tinfo,fdesc->memid,names,sizeof(names)/sizeof(names[ 0]),&nrofnames)) nrofnames = 0; if (nrofnames > sizeof(names)/sizeof(names[0])) ERR("Need more names!\n"); @@ -1582,7 +1598,7 @@ /* DISPPARAMS* needs special serializer */ if (!lstrcmpW(names[i+1],pdispparamsW)) { hres = serialize_DISPPARAM_ptr( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, relaydeb, FALSE, @@ -1594,7 +1610,7 @@ } if (!lstrcmpW(names[i+1],ppvObjectW)) { hres = serialize_LPVOID_ptr( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, relaydeb, FALSE, @@ -1608,7 +1624,7 @@ } if (!isserialized) hres = serialize_param( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, relaydeb, FALSE, @@ -1695,7 +1711,7 @@ /* deserialize DISPPARAM */ if (!lstrcmpW(names[i+1],pdispparamsW)) { hres = deserialize_DISPPARAM_ptr( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT, relaydeb, FALSE, @@ -1711,7 +1727,7 @@ } if (!lstrcmpW(names[i+1],ppvObjectW)) { hres = deserialize_LPVOID_ptr( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT, relaydeb, FALSE, @@ -1725,7 +1741,7 @@ } if (!isdeserialized) hres = deserialize_param( - tpinfo->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT, relaydeb, FALSE, @@ -1750,6 +1766,7 @@ return status; HeapFree(GetProcessHeap(),0,buf.base); + ITypeInfo_Release(tinfo); LeaveCriticalSection(&tpinfo->crit); return remoteresult; } @@ -1842,7 +1859,9 @@ int j; /* nrofargs without This */ int nrofargs; - hres = _get_funcdesc(tinfo,i,&fdesc,NULL,NULL); + ITypeInfo *tinfo2; + hres = _get_funcdesc(tinfo,i,&tinfo2,&fdesc,NULL,NULL); + ITypeInfo_Release(tinfo2); if (hres) { ERR("GetFuncDesc %lx should not fail here.\n",hres); return hres; @@ -1891,7 +1910,7 @@ } typedef struct _TMStubImpl { - IRpcStubBufferVtbl *lpvtbl; + const IRpcStubBufferVtbl *lpvtbl; ULONG ref; LPUNKNOWN pUnk; @@ -1976,6 +1995,7 @@ BSTR names[10]; BSTR fname = NULL,iname = NULL; BOOL is_idispatch_getidsofnames = 0; + ITypeInfo *tinfo; memset(&buf,0,sizeof(buf)); buf.size = xmsg->cbBuffer; @@ -1996,7 +2016,7 @@ xmsg->cbBuffer = buf.size; return hres; } - hres = _get_funcdesc(This->tinfo,xmsg->iMethod,&fdesc,&iname,&fname); + hres = _get_funcdesc(This->tinfo,xmsg->iMethod,&tinfo,&fdesc,&iname,&fname); if (hres) { ERR("GetFuncDesc on method %ld failed with %lx\n",xmsg->iMethod,hres); return hres; @@ -2010,7 +2030,7 @@ /* Need them for hack below */ memset(names,0,sizeof(names)); - ITypeInfo_GetNames(This->tinfo,fdesc->memid,names,sizeof(names)/sizeof(n ames[0]),&nrofnames); + ITypeInfo_GetNames(tinfo,fdesc->memid,names,sizeof(names)/sizeof(names[0 ]),&nrofnames); if (nrofnames > sizeof(names)/sizeof(names[0])) { ERR("Need more names!\n"); } @@ -2047,7 +2067,7 @@ /* deserialize DISPPARAM */ if (!lstrcmpW(names[i+1],pdispparamsW)) { hres = deserialize_DISPPARAM_ptr( - This->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, FALSE, TRUE, @@ -2063,7 +2083,7 @@ } if (!lstrcmpW(names[i+1],ppvObjectW)) { hres = deserialize_LPVOID_ptr( - This->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, FALSE, TRUE, @@ -2077,7 +2097,7 @@ } if (!isdeserialized) hres = deserialize_param( - This->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN, FALSE, TRUE, @@ -2129,7 +2149,7 @@ /* DISPPARAMS* needs special serializer */ if (!lstrcmpW(names[i+1],pdispparamsW)) { hres = serialize_DISPPARAM_ptr( - This->tinfo, + tinfo, elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT, FALSE, [truncated at 1000 lines; 1479 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17036: Sync to Wine-20050628:
by gvg@svn.reactos.com
Sync to Wine-20050628: Robert Shearman <rob(a)codeweavers.com> - Convert some registry helper functions to use unicode versions of CLSID & registry functions (untested). - Add registry entries for local-only OLE interfaces. - Change IUnknown to local interface. - IUnknown isn't a remotable interface so the stub manager shouldn't need a marshaller for it. - Change the RPC code to use the unicode versions of the CLSID & registry functions. - Don't disconnect proxies flagged with SORFP_NOLIFETIMEMGMT. It makes no sense and only causes trouble for proxies that depend on these proxies being available. - Change some of the registry helper functions to use the unicode versions of the CLSID & registry functions. - Reindent CoGetClassObject and output an error message if the class isn't registered. - Add tests for the touched functions. Dmitry Timoshkov <dmitry(a)codeweavers.com> - Make remaining OLE interface vtables const. Richard Cohen <richard(a)daijobu.co.uk> - Base FileMonikerImpl_Save() on XP. - Correct handling of Unicode strings & multibyte locales. - More error checking. - Change ERR to WARN. - Match Windows quick & dirty estimate for GetSizeMax(). Stefan Huehner <stefan(a)huehner.org> - Fix some more -Wstrict-prototypes warnings. Mike Hearn <mike(a)navi.cx> - Add some tracing to the IRemUnknown RpcProxyBuffer implementation. Eric Pouech <pouech-eric(a)wanadoo.fr> - Const correctness fixes. Richard Cohen <richard(a)daijobu.co.uk> - IEnum::Clone shouldn't do a Reset. Marcus Meissner <marcus(a)jet.franken.de> - Removed CLSID_CompositeMoniker (conflicting with static definition). Alexandre Julliard <julliard(a)winehq.org> - Sort entry points alphabetically. Modified: trunk/reactos/lib/ole32/antimoniker.c Modified: trunk/reactos/lib/ole32/bindctx.c Modified: trunk/reactos/lib/ole32/clipboard.c Modified: trunk/reactos/lib/ole32/compobj.c Modified: trunk/reactos/lib/ole32/compobj_private.h Modified: trunk/reactos/lib/ole32/compositemoniker.c Modified: trunk/reactos/lib/ole32/datacache.c Modified: trunk/reactos/lib/ole32/defaulthandler.c Modified: trunk/reactos/lib/ole32/errorinfo.c Modified: trunk/reactos/lib/ole32/filemoniker.c Modified: trunk/reactos/lib/ole32/ftmarshal.c Modified: trunk/reactos/lib/ole32/git.c Modified: trunk/reactos/lib/ole32/hglobalstream.c Modified: trunk/reactos/lib/ole32/ifs.c Modified: trunk/reactos/lib/ole32/itemmoniker.c Modified: trunk/reactos/lib/ole32/marshal.c Modified: trunk/reactos/lib/ole32/memlockbytes.c Modified: trunk/reactos/lib/ole32/memlockbytes16.c Modified: trunk/reactos/lib/ole32/moniker.c Modified: trunk/reactos/lib/ole32/moniker.h Modified: trunk/reactos/lib/ole32/ole16.c Modified: trunk/reactos/lib/ole32/ole2.c Modified: trunk/reactos/lib/ole32/ole32.spec Modified: trunk/reactos/lib/ole32/oleobj.c Modified: trunk/reactos/lib/ole32/oleproxy.c Modified: trunk/reactos/lib/ole32/regsvr.c Modified: trunk/reactos/lib/ole32/rpc.c Modified: trunk/reactos/lib/ole32/stg_prop.c Modified: trunk/reactos/lib/ole32/stg_stream.c Modified: trunk/reactos/lib/ole32/storage.c Modified: trunk/reactos/lib/ole32/storage32.c Modified: trunk/reactos/lib/ole32/storage32.h Modified: trunk/reactos/lib/ole32/stubmanager.c _____ Modified: trunk/reactos/lib/ole32/antimoniker.c --- trunk/reactos/lib/ole32/antimoniker.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/antimoniker.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -42,12 +42,12 @@ /* AntiMoniker data structure */ typedef struct AntiMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether * two monikers are equal. That's whay IROTData interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -530,7 +530,7 @@ /*********************************************************************** *********/ /* Virtual function table for the AntiMonikerImpl class which include IPersist,*/ /* IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_AntiMonikerImpl = +static const IMonikerVtbl VT_AntiMonikerImpl = { AntiMonikerImpl_QueryInterface, AntiMonikerImpl_AddRef, @@ -559,7 +559,7 @@ /*********************************************************************** *********/ /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { AntiMonikerROTDataImpl_QueryInterface, AntiMonikerROTDataImpl_AddRef, _____ Modified: trunk/reactos/lib/ole32/bindctx.c --- trunk/reactos/lib/ole32/bindctx.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/bindctx.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -50,7 +50,7 @@ /* BindCtx data strucrture */ typedef struct BindCtxImpl{ - IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ + const IBindCtxVtbl *lpVtbl; /* VTable relative to the IBindCtx interface.*/ ULONG ref; /* reference counter for this object */ @@ -474,7 +474,7 @@ } /* Virtual function table for the BindCtx class. */ -static IBindCtxVtbl VT_BindCtxImpl = +static const IBindCtxVtbl VT_BindCtxImpl = { BindCtxImpl_QueryInterface, BindCtxImpl_AddRef, _____ Modified: trunk/reactos/lib/ole32/clipboard.c --- trunk/reactos/lib/ole32/clipboard.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/clipboard.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -96,7 +96,7 @@ /* * List all interface VTables here */ - IDataObjectVtbl* lpvtbl1; /* IDataObject VTable */ + const IDataObjectVtbl* lpvtbl1; /* IDataObject VTable */ /* * The hidden OLE clipboard window. This window is used as the bridge between the @@ -135,7 +135,7 @@ typedef struct { /* IEnumFORMATETC VTable */ - IEnumFORMATETCVtbl *lpVtbl; + const IEnumFORMATETCVtbl *lpVtbl; /* IEnumFORMATETC fields */ UINT posFmt; /* current enumerator position */ @@ -250,7 +250,7 @@ /* * Virtual function table for the OLEClipbrd's exposed IDataObject interface */ -static IDataObjectVtbl OLEClipbrd_IDataObject_VTable = +static const IDataObjectVtbl OLEClipbrd_IDataObject_VTable = { OLEClipbrd_IDataObject_QueryInterface, OLEClipbrd_IDataObject_AddRef, @@ -269,7 +269,7 @@ /* * Virtual function table for IEnumFORMATETC interface */ -static struct IEnumFORMATETCVtbl efvt = +static const IEnumFORMATETCVtbl efvt = { OLEClipbrd_IEnumFORMATETC_QueryInterface, OLEClipbrd_IEnumFORMATETC_AddRef, _____ Modified: trunk/reactos/lib/ole32/compobj.c --- trunk/reactos/lib/ole32/compobj.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/compobj.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -76,6 +76,8 @@ HINSTANCE OLE32_hInstance = 0; /* FIXME: make static ... */ +#define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) + /*********************************************************************** ***** * This section defines variables internal to the COM module. * @@ -195,7 +197,7 @@ UnregisterClassW(wszAptWinClass, OLE32_hInstance); } -static void COM_TlsDestroy() +static void COM_TlsDestroy(void) { struct oletls *info = NtCurrentTeb()->ReservedForOle; if (info) @@ -981,6 +983,16 @@ return MultiByteToWideChar( CP_ACP, 0, xguid, -1, str, cmax ); } +/* open HKCR\\CLSID\\{string form of clsid} key */ +DWORD COM_OpenKeyForCLSID(REFCLSID clsid, REGSAM access, HKEY *key) +{ + static const WCHAR wszCLSIDSlash[] = {'C','L','S','I','D','\\',0}; + WCHAR path[CHARS_IN_GUID + ARRAYSIZE(wszCLSIDSlash) - 1]; + strcpyW(path, wszCLSIDSlash); + StringFromGUID2(clsid, path + strlenW(wszCLSIDSlash), CHARS_IN_GUID); + return RegOpenKeyExW(HKEY_CLASSES_ROOT, path, 0, access, key); +} + /*********************************************************************** ******* * ProgIDFromCLSID [OLE32.@] * @@ -997,43 +1009,42 @@ */ HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID) { - char strCLSID[50], *buf, *buf2; - DWORD buf2len; - HKEY xhkey; - LPMALLOC mllc; + static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0}; + HKEY hkey = NULL; + HKEY hkey_clsid; HRESULT ret = S_OK; - WINE_StringFromCLSID(clsid, strCLSID); - - buf = HeapAlloc(GetProcessHeap(), 0, strlen(strCLSID)+14); - sprintf(buf,"CLSID\\%s\\ProgID", strCLSID); - if (RegOpenKeyA(HKEY_CLASSES_ROOT, buf, &xhkey)) + if (ERROR_SUCCESS != COM_OpenKeyForCLSID(clsid, KEY_READ, &hkey_clsid)) ret = REGDB_E_CLASSNOTREG; - HeapFree(GetProcessHeap(), 0, buf); + if (ret == S_OK) + { + if (RegOpenKeyExW(hkey_clsid, wszProgID, 0, KEY_READ, &hkey)) + ret = REGDB_E_CLASSNOTREG; + RegCloseKey(hkey_clsid); + } if (ret == S_OK) { - buf2 = HeapAlloc(GetProcessHeap(), 0, 255); - buf2len = 255; - if (RegQueryValueA(xhkey, NULL, buf2, &buf2len)) + DWORD progidlen = 0; + + if (RegQueryValueW(hkey, NULL, NULL, &progidlen)) ret = REGDB_E_CLASSNOTREG; if (ret == S_OK) { - if (CoGetMalloc(0,&mllc)) - ret = E_OUTOFMEMORY; - else + *lplpszProgID = CoTaskMemAlloc(progidlen * sizeof(WCHAR)); + if (*lplpszProgID) { - DWORD len = MultiByteToWideChar( CP_ACP, 0, buf2, -1, NULL, 0 ); - *lplpszProgID = IMalloc_Alloc(mllc, len * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, buf2, -1, *lplpszProgID, len ); + if (RegQueryValueW(hkey, NULL, *lplpszProgID, &progidlen)) + ret = REGDB_E_CLASSNOTREG; } + else + ret = E_OUTOFMEMORY; } - HeapFree(GetProcessHeap(), 0, buf2); - RegCloseKey(xhkey); } + RegCloseKey(hkey); return ret; } @@ -1089,7 +1100,7 @@ HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid) { static const WCHAR clsidW[] = { '\\','C','L','S','I','D',0 }; - char buf2[80]; + WCHAR buf2[CHARS_IN_GUID]; DWORD buf2len = sizeof(buf2); HKEY xhkey; @@ -1103,13 +1114,13 @@ } HeapFree(GetProcessHeap(),0,buf); - if (RegQueryValueA(xhkey,NULL,buf2,&buf2len)) + if (RegQueryValueW(xhkey,NULL,buf2,&buf2len)) { RegCloseKey(xhkey); return CO_E_CLASSSTRING; } RegCloseKey(xhkey); - return __CLSIDFromStringA(buf2,riid); + return CLSIDFromString(buf2,riid); } @@ -1151,46 +1162,41 @@ */ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid) { - char *buf, buf2[40]; - DWORD buf2len; - HKEY xhkey; + static const WCHAR wszInterface[] = {'I','n','t','e','r','f','a','c','e','\\',0}; + static const WCHAR wszPSC[] = {'\\','P','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0} ; + WCHAR path[ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1 + ARRAYSIZE(wszPSC)]; + WCHAR value[CHARS_IN_GUID]; + DWORD len; + HKEY hkey; TRACE("() riid=%s, pclsid=%p\n", debugstr_guid(riid), pclsid); - /* Get the input iid as a string */ - WINE_StringFromCLSID(riid, buf2); - /* Allocate memory for the registry key we will construct. - (length of iid string plus constant length of static text */ - buf = HeapAlloc(GetProcessHeap(), 0, strlen(buf2)+27); - if (buf == NULL) - return E_OUTOFMEMORY; + /* Interface\\{string form of riid}\\ProxyStubClsid32 */ + strcpyW(path, wszInterface); + StringFromGUID2(riid, path + ARRAYSIZE(wszInterface) - 1, CHARS_IN_GUID); + strcpyW(path + ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1, wszPSC); - /* Construct the registry key we want */ - sprintf(buf,"Interface\\%s\\ProxyStubClsid32", buf2); - /* Open the key.. */ - if (RegOpenKeyA(HKEY_CLASSES_ROOT, buf, &xhkey)) + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, path, 0, KEY_READ, &hkey)) { WARN("No PSFactoryBuffer object is registered for IID %s\n", debugstr_guid(riid)); - HeapFree(GetProcessHeap(),0,buf); return REGDB_E_IIDNOTREG; } - HeapFree(GetProcessHeap(),0,buf); /* ... Once we have the key, query the registry to get the value of CLSID as a string, and convert it into a proper CLSID structure to be passed back to the app */ - buf2len = sizeof(buf2); - if ( (RegQueryValueA(xhkey,NULL,buf2,&buf2len)) ) + len = sizeof(value); + if (ERROR_SUCCESS != RegQueryValueW(hkey, NULL, value, &len)) { - RegCloseKey(xhkey); + RegCloseKey(hkey); return REGDB_E_IIDNOTREG; } - RegCloseKey(xhkey); + RegCloseKey(hkey); /* We have the CLSid we want back from the registry as a string, so lets convert it into a CLSID structure */ - if ( (__CLSIDFromStringA(buf2,pclsid)) != NOERROR) + if (CLSIDFromString(value, pclsid) != NOERROR) return REGDB_E_IIDNOTREG; TRACE ("() Returning CLSID=%s\n", debugstr_guid(pclsid)); @@ -1528,25 +1534,24 @@ } /*********************************************************************** - * compobj_RegReadPath [internal] + * COM_RegReadPath [internal] * * Reads a registry value and expands it when necessary */ -static HRESULT -compobj_RegReadPath(char * keyname, char * valuename, char * dst, DWORD dstlen) +HRESULT COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *valuename, WCHAR * dst, DWORD dstlen) { HRESULT hres; HKEY key; DWORD keytype; - char src[MAX_PATH]; - DWORD dwLength = dstlen; + WCHAR src[MAX_PATH]; + DWORD dwLength = dstlen * sizeof(WCHAR); - if((hres = RegOpenKeyExA(HKEY_CLASSES_ROOT, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) { - if( (hres = RegQueryValueExA(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) { + if((hres = RegOpenKeyExW(hkeyroot, keyname, 0, KEY_READ, &key)) == ERROR_SUCCESS) { + if( (hres = RegQueryValueExW(key, NULL, NULL, &keytype, (LPBYTE)src, &dwLength)) == ERROR_SUCCESS ) { if (keytype == REG_EXPAND_SZ) { - if (dstlen <= ExpandEnvironmentStringsA(src, dst, dstlen)) hres = ERROR_MORE_DATA; + if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) hres = ERROR_MORE_DATA; } else { - lstrcpynA(dst, src, dstlen); + lstrcpynW(dst, src, dstlen); } } RegCloseKey (key); @@ -1565,17 +1570,11 @@ */ HRESULT WINAPI CoGetClassObject( REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, - REFIID iid, LPVOID *ppv -) { + REFIID iid, LPVOID *ppv) +{ LPUNKNOWN regClassObject; HRESULT hres = E_UNEXPECTED; - char xclsid[80]; - HINSTANCE hLibrary; - typedef HRESULT (CALLBACK *DllGetClassObjectFunc)(REFCLSID clsid, REFIID iid, LPVOID *ppv); - DllGetClassObjectFunc DllGetClassObject; - WINE_StringFromCLSID((LPCLSID)rclsid,xclsid); - TRACE("\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid)); if (pServerInfo) { @@ -1589,9 +1588,7 @@ */ if (S_OK == COM_GetRegisteredClassObject(rclsid, dwClsContext, ®ClassObject)) { - /* - * Get the required interface from the retrieved pointer. - */ + /* Get the required interface from the retrieved pointer. */ hres = IUnknown_QueryInterface(regClassObject, iid, ppv); /* @@ -1605,32 +1602,49 @@ } /* first try: in-process */ - if ((CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER) & dwClsContext) { - char keyname[MAX_PATH]; - char dllpath[MAX_PATH+1]; + if ((CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER) & dwClsContext) + { + static const WCHAR wszInprocServer32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0}; + HINSTANCE hLibrary; + typedef HRESULT (CALLBACK *DllGetClassObjectFunc)(REFCLSID clsid, REFIID iid, LPVOID *ppv); + DllGetClassObjectFunc DllGetClassObject; + WCHAR dllpath[MAX_PATH+1]; + HKEY hkey; - sprintf(keyname,"CLSID\\%s\\InprocServer32",xclsid); + if (ERROR_SUCCESS != COM_OpenKeyForCLSID(rclsid, KEY_READ, &hkey)) + { + ERR("class %s not registered\n", debugstr_guid(rclsid)); + hres = REGDB_E_CLASSNOTREG; + } - if ( compobj_RegReadPath(keyname, NULL, dllpath, sizeof(dllpath)) != ERROR_SUCCESS) { - /* failure: CLSID is not found in registry */ - WARN("class %s not registered inproc\n", xclsid); + if (COM_RegReadPath(hkey, wszInprocServer32, NULL, dllpath, ARRAYSIZE(dllpath)) != ERROR_SUCCESS) + { + /* failure: CLSID is not found in registry */ + WARN("class %s not registered inproc\n", debugstr_guid(rclsid)); hres = REGDB_E_CLASSNOTREG; - } else { - if ((hLibrary = LoadLibraryExA(dllpath, 0, LOAD_WITH_ALTERED_SEARCH_PATH)) == 0) { - /* failure: DLL could not be loaded */ - ERR("couldn't load InprocServer32 dll %s\n", dllpath); - hres = E_ACCESSDENIED; /* FIXME: or should this be CO_E_DLLNOTFOUND? */ - } else if (!(DllGetClassObject = (DllGetClassObjectFunc)GetProcAddress(hLibrary, "DllGetClassObject"))) { - /* failure: the dll did not export DllGetClassObject */ - ERR("couldn't find function DllGetClassObject in %s\n", dllpath); - FreeLibrary( hLibrary ); - hres = CO_E_DLLNOTFOUND; - } else { - /* OK: get the ClassObject */ - COMPOBJ_DLLList_Add( hLibrary ); - return DllGetClassObject(rclsid, iid, ppv); - } - } + } + else + { + if ((hLibrary = LoadLibraryExW(dllpath, 0, LOAD_WITH_ALTERED_SEARCH_PATH)) == 0) + { + /* failure: DLL could not be loaded */ + ERR("couldn't load InprocServer32 dll %s\n", debugstr_w(dllpath)); + hres = E_ACCESSDENIED; /* FIXME: or should this be CO_E_DLLNOTFOUND? */ + } + else if (!(DllGetClassObject = (DllGetClassObjectFunc)GetProcAddress(hLibrary, "DllGetClassObject"))) + { + /* failure: the dll did not export DllGetClassObject */ + ERR("couldn't find function DllGetClassObject in %s\n", debugstr_w(dllpath)); + FreeLibrary( hLibrary ); + hres = CO_E_DLLNOTFOUND; + } + else + { + /* OK: get the ClassObject */ + COMPOBJ_DLLList_Add( hLibrary ); + return DllGetClassObject(rclsid, iid, ppv); + } + } } /* Next try out of process */ @@ -2154,28 +2168,27 @@ */ HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew) { - HKEY hkey = 0; - char buf[200]; - WCHAR wbuf[200]; + static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0}; + HKEY hkey = NULL; + WCHAR buf[CHARS_IN_GUID]; DWORD len; HRESULT res = S_OK; - sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]); - if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey)) + if (ERROR_SUCCESS != COM_OpenKeyForCLSID(clsidOld, KEY_READ, &hkey)) { res = REGDB_E_CLASSNOTREG; - goto done; + goto done; } - len = 200; + + len = sizeof(buf); /* we can just query for the default value of AutoConvertTo key like that, without opening the AutoConvertTo key and querying for NULL (default) */ - if (RegQueryValueA(hkey,"AutoConvertTo",buf,&len)) + if (RegQueryValueW(hkey, wszAutoConvertTo, buf, &len)) { res = REGDB_E_KEYMISSING; - goto done; + goto done; } - MultiByteToWideChar( CP_ACP, 0, buf, -1, wbuf, sizeof(wbuf)/sizeof(WCHAR) ); - CLSIDFromString(wbuf,pClsidNew); + res = CLSIDFromString(buf, pClsidNew); done: if (hkey) RegCloseKey(hkey); return res; @@ -2199,27 +2212,26 @@ */ HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew) { - HKEY hkey = 0; - char buf[47]; - char szClsidNew[39]; + static const WCHAR wszAutoTreatAs[] = {'A','u','t','o','T','r','e','a','t','A','s',0}; + static const WCHAR wszTreatAs[] = {'T','r','e','a','t','A','s',0}; + HKEY hkey = NULL; + WCHAR szClsidNew[CHARS_IN_GUID]; HRESULT res = S_OK; - char auto_treat_as[39]; + WCHAR auto_treat_as[CHARS_IN_GUID]; LONG auto_treat_as_size = sizeof(auto_treat_as); CLSID id; - sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]); - WINE_StringFromCLSID(clsidNew, szClsidNew); - if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey)) + if (ERROR_SUCCESS != COM_OpenKeyForCLSID(clsidOld, KEY_READ | KEY_WRITE, &hkey)) { res = REGDB_E_CLASSNOTREG; goto done; } if (!memcmp( clsidOld, clsidNew, sizeof(*clsidOld) )) { - if (!RegQueryValueA(hkey, "AutoTreatAs", auto_treat_as, &auto_treat_as_size) && - !__CLSIDFromStringA(auto_treat_as, &id)) + if (!RegQueryValueW(hkey, wszAutoTreatAs, auto_treat_as, &auto_treat_as_size) && + !CLSIDFromString(auto_treat_as, &id)) { - if (RegSetValueA(hkey, "TreatAs", REG_SZ, auto_treat_as, strlen(auto_treat_as)+1)) + if (RegSetValueW(hkey, wszTreatAs, REG_SZ, auto_treat_as, sizeof(auto_treat_as))) { res = REGDB_E_WRITEREGDB; goto done; @@ -2227,13 +2239,14 @@ } else { - RegDeleteKeyA(hkey, "TreatAs"); + RegDeleteKeyW(hkey, wszTreatAs); goto done; } } - else if (RegSetValueA(hkey, "TreatAs", REG_SZ, szClsidNew, strlen(szClsidNew)+1)) + else if (!StringFromGUID2(clsidNew, szClsidNew, ARRAYSIZE(szClsidNew)) && + !RegSetValueW(hkey, wszTreatAs, REG_SZ, szClsidNew, sizeof(szClsidNew))) { - res = REGDB_E_WRITEREGDB; + res = REGDB_E_WRITEREGDB; goto done; } @@ -2260,32 +2273,31 @@ */ HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID clsidNew) { - HKEY hkey = 0; - char buf[200], szClsidNew[200]; + static const WCHAR wszTreatAs[] = {'T','r','e','a','t','A','s',0}; + HKEY hkey = NULL; + WCHAR szClsidNew[CHARS_IN_GUID]; HRESULT res = S_OK; LONG len = sizeof(szClsidNew); FIXME("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew); - sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]); memcpy(clsidNew,clsidOld,sizeof(CLSID)); /* copy over old value */ - if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey)) + if (COM_OpenKeyForCLSID(clsidOld, KEY_READ, &hkey)) { res = REGDB_E_CLASSNOTREG; goto done; } - if (RegQueryValueA(hkey, "TreatAs", szClsidNew, &len)) + if (RegQueryValueW(hkey, wszTreatAs, szClsidNew, &len)) { res = S_FALSE; goto done; } - res = __CLSIDFromStringA(szClsidNew,clsidNew); + res = CLSIDFromString(szClsidNew,clsidNew); if (FAILED(res)) - FIXME("Failed CLSIDFromStringA(%s), hres %lx?\n",szClsidNew,res); + ERR("Failed CLSIDFromStringA(%s), hres 0x%08lx\n", debugstr_w(szClsidNew), res); done: if (hkey) RegCloseKey(hkey); return res; - } /*********************************************************************** ******* _____ Modified: trunk/reactos/lib/ole32/compobj_private.h --- trunk/reactos/lib/ole32/compobj_private.h 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/compobj_private.h 2005-08-03 22:31:39 UTC (rev 17036) @@ -163,6 +163,7 @@ extern HRESULT WINE_StringFromCLSID(const CLSID *id,LPSTR idstr); HRESULT WINAPI __CLSIDFromStringA(LPCSTR idstr, CLSID *id); +DWORD COM_OpenKeyForCLSID(REFCLSID clsid, REGSAM access, HKEY *key); HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv); /* Stub Manager */ @@ -256,4 +257,6 @@ extern HINSTANCE OLE32_hInstance; /* FIXME: make static */ +#define CHARS_IN_GUID 39 /* including NULL */ + #endif /* __WINE_OLE_COMPOBJ_H */ _____ Modified: trunk/reactos/lib/ole32/compositemoniker.c --- trunk/reactos/lib/ole32/compositemoniker.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/compositemoniker.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -const CLSID CLSID_CompositeMoniker = { +static const CLSID CLSID_CompositeMoniker = { 0x309, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46} }; @@ -46,13 +46,13 @@ /* CompositeMoniker data structure */ typedef struct CompositeMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData * interface to test whether two monikers are equal. That's why IROTData * interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -68,7 +68,7 @@ /* EnumMoniker data structure */ typedef struct EnumMonikerImpl{ - IEnumMonikerVtbl *lpVtbl; /* VTable relative to the IEnumMoniker interface.*/ + const IEnumMonikerVtbl *lpVtbl; /* VTable relative to the IEnumMoniker interface.*/ ULONG ref; /* reference counter for this object */ @@ -1388,7 +1388,7 @@ /*********************************************************************** *********/ /* Virtual function table for the IROTData class */ -static IEnumMonikerVtbl VT_EnumMonikerImpl = +static const IEnumMonikerVtbl VT_EnumMonikerImpl = { EnumMonikerImpl_QueryInterface, EnumMonikerImpl_AddRef, @@ -1453,7 +1453,7 @@ /* Virtual function table for the CompositeMonikerImpl class which includes */ /* IPersist, IPersistStream and IMoniker functions. */ -static IMonikerVtbl VT_CompositeMonikerImpl = +static const IMonikerVtbl VT_CompositeMonikerImpl = { CompositeMonikerImpl_QueryInterface, CompositeMonikerImpl_AddRef, @@ -1482,7 +1482,7 @@ /*********************************************************************** *********/ /* Virtual function table for the IROTData class. */ -static IROTDataVtbl VT_ROTDataImpl = +static const IROTDataVtbl VT_ROTDataImpl = { CompositeMonikerROTDataImpl_QueryInterface, CompositeMonikerROTDataImpl_AddRef, _____ Modified: trunk/reactos/lib/ole32/datacache.c --- trunk/reactos/lib/ole32/datacache.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/datacache.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -93,12 +93,12 @@ /* * List all interface VTables here */ - IDataObjectVtbl* lpvtbl1; - IUnknownVtbl* lpvtbl2; - IPersistStorageVtbl* lpvtbl3; - IViewObject2Vtbl* lpvtbl4; - IOleCache2Vtbl* lpvtbl5; - IOleCacheControlVtbl* lpvtbl6; + const IDataObjectVtbl* lpvtbl1; + const IUnknownVtbl* lpvtbl2; + const IPersistStorageVtbl* lpvtbl3; + const IViewObject2Vtbl* lpvtbl4; + const IOleCache2Vtbl* lpvtbl5; + const IOleCacheControlVtbl* lpvtbl6; /* * Reference count of this object @@ -1617,14 +1617,14 @@ /* * Virtual function tables for the DataCache class. */ -static IUnknownVtbl DataCache_NDIUnknown_VTable = +static const IUnknownVtbl DataCache_NDIUnknown_VTable = { DataCache_NDIUnknown_QueryInterface, DataCache_NDIUnknown_AddRef, DataCache_NDIUnknown_Release }; -static IDataObjectVtbl DataCache_IDataObject_VTable = +static const IDataObjectVtbl DataCache_IDataObject_VTable = { DataCache_IDataObject_QueryInterface, DataCache_IDataObject_AddRef, @@ -1640,7 +1640,7 @@ DataCache_EnumDAdvise }; -static IPersistStorageVtbl DataCache_IPersistStorage_VTable = +static const IPersistStorageVtbl DataCache_IPersistStorage_VTable = { DataCache_IPersistStorage_QueryInterface, DataCache_IPersistStorage_AddRef, @@ -1654,7 +1654,7 @@ DataCache_HandsOffStorage }; -static IViewObject2Vtbl DataCache_IViewObject2_VTable = +static const IViewObject2Vtbl DataCache_IViewObject2_VTable = { DataCache_IViewObject2_QueryInterface, DataCache_IViewObject2_AddRef, @@ -1668,7 +1668,7 @@ DataCache_GetExtent }; -static IOleCache2Vtbl DataCache_IOleCache2_VTable = +static const IOleCache2Vtbl DataCache_IOleCache2_VTable = { DataCache_IOleCache2_QueryInterface, DataCache_IOleCache2_AddRef, @@ -1682,7 +1682,7 @@ DataCache_DiscardCache }; -static IOleCacheControlVtbl DataCache_IOleCacheControl_VTable = +static const IOleCacheControlVtbl DataCache_IOleCacheControl_VTable = { DataCache_IOleCacheControl_QueryInterface, DataCache_IOleCacheControl_AddRef, _____ Modified: trunk/reactos/lib/ole32/defaulthandler.c --- trunk/reactos/lib/ole32/defaulthandler.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/defaulthandler.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -70,10 +70,10 @@ /* * List all interface VTables here */ - IOleObjectVtbl* lpvtbl1; - IUnknownVtbl* lpvtbl2; - IDataObjectVtbl* lpvtbl3; - IRunnableObjectVtbl* lpvtbl4; + const IOleObjectVtbl* lpvtbl1; + const IUnknownVtbl* lpvtbl2; + const IDataObjectVtbl* lpvtbl3; + const IRunnableObjectVtbl* lpvtbl4; /* * Reference count of this object @@ -325,7 +325,7 @@ /* * Virtual function tables for the DefaultHandler class. */ -static IOleObjectVtbl DefaultHandler_IOleObject_VTable = +static const IOleObjectVtbl DefaultHandler_IOleObject_VTable = { DefaultHandler_QueryInterface, DefaultHandler_AddRef, @@ -353,14 +353,14 @@ DefaultHandler_SetColorScheme }; -static IUnknownVtbl DefaultHandler_NDIUnknown_VTable = +static const IUnknownVtbl DefaultHandler_NDIUnknown_VTable = { DefaultHandler_NDIUnknown_QueryInterface, DefaultHandler_NDIUnknown_AddRef, DefaultHandler_NDIUnknown_Release, }; -static IDataObjectVtbl DefaultHandler_IDataObject_VTable = +static const IDataObjectVtbl DefaultHandler_IDataObject_VTable = { DefaultHandler_IDataObject_QueryInterface, DefaultHandler_IDataObject_AddRef, @@ -376,7 +376,7 @@ DefaultHandler_EnumDAdvise }; -static IRunnableObjectVtbl DefaultHandler_IRunnableObject_VTable = +static const IRunnableObjectVtbl DefaultHandler_IRunnableObject_VTable = { DefaultHandler_IRunnableObject_QueryInterface, DefaultHandler_IRunnableObject_AddRef, _____ Modified: trunk/reactos/lib/ole32/errorinfo.c --- trunk/reactos/lib/ole32/errorinfo.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/errorinfo.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -128,9 +128,9 @@ typedef struct ErrorInfoImpl { - IErrorInfoVtbl *lpvtei; - ICreateErrorInfoVtbl *lpvtcei; - ISupportErrorInfoVtbl *lpvtsei; + const IErrorInfoVtbl *lpvtei; + const ICreateErrorInfoVtbl *lpvtcei; + const ISupportErrorInfoVtbl *lpvtsei; DWORD ref; GUID m_Guid; @@ -140,9 +140,9 @@ DWORD m_dwHelpContext; } ErrorInfoImpl; -static IErrorInfoVtbl IErrorInfoImpl_VTable; -static ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable; -static ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable; +static const IErrorInfoVtbl IErrorInfoImpl_VTable; +static const ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable; +static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable; /* converts an object pointer to This @@ -303,7 +303,7 @@ return S_OK; } -static IErrorInfoVtbl IErrorInfoImpl_VTable = +static const IErrorInfoVtbl IErrorInfoImpl_VTable = { IErrorInfoImpl_QueryInterface, IErrorInfoImpl_AddRef, @@ -402,7 +402,7 @@ return S_OK; } -static ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable = +static const ICreateErrorInfoVtbl ICreateErrorInfoImpl_VTable = { ICreateErrorInfoImpl_QueryInterface, ICreateErrorInfoImpl_AddRef, @@ -452,7 +452,7 @@ return (IsEqualIID(riid, &This->m_Guid)) ? S_OK : S_FALSE; } -static ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable = +static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable = { ISupportErrorInfoImpl_QueryInterface, ISupportErrorInfoImpl_AddRef, _____ Modified: trunk/reactos/lib/ole32/filemoniker.c --- trunk/reactos/lib/ole32/filemoniker.c 2005-08-03 22:31:41 UTC (rev 17035) +++ trunk/reactos/lib/ole32/filemoniker.c 2005-08-03 22:31:39 UTC (rev 17036) @@ -46,12 +46,12 @@ /* filemoniker data structure */ typedef struct FileMonikerImpl{ - IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ + const IMonikerVtbl* lpvtbl1; /* VTable relative to the IMoniker interface.*/ /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether * two monikers are equal. That's whay IROTData interface is implemented by monikers. */ - IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ + const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/ ULONG ref; /* reference counter for this object */ @@ -182,121 +182,155 @@ * written by FileMonikerImpl_Save */ static HRESULT WINAPI -FileMonikerImpl_Load(IMoniker* iface,IStream* pStm) +FileMonikerImpl_Load(IMoniker* iface, IStream* pStm) { HRESULT res; - CHAR* filePathA; - WCHAR* filePathW; + CHAR* filePathA = NULL; + WCHAR* filePathW = NULL; ULONG bread; WORD wbuffer; - DWORD dwbuffer,length,i,doubleLenHex,doubleLenDec; + DWORD dwbuffer, bytesA, bytesW, len; + int i; FileMonikerImpl *This = (FileMonikerImpl *)iface; TRACE("(%p,%p)\n",iface,pStm); - /* first WORD is non significative */ + /* first WORD must be 0 */ res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread); if (bread!=sizeof(WORD) || wbuffer!=0) { - ERR("Couldn't read 0 word\n"); - return E_FAIL; + WARN("Couldn't read 0 word\n"); + goto fail; } /* read filePath string length (plus one) */ - res=IStream_Read(pStm,&length,sizeof(DWORD),&bread); + res=IStream_Read(pStm,&bytesA,sizeof(DWORD),&bread); if (bread != sizeof(DWORD)) { - ERR("Couldn't read file string length\n"); - return E_FAIL; + WARN("Couldn't read file string length\n"); + goto fail; } /* read filePath string */ - filePathA=HeapAlloc(GetProcessHeap(),0,length); - res=IStream_Read(pStm,filePathA,length,&bread); - HeapFree(GetProcessHeap(),0,filePathA); - if (bread != length) + filePathA=HeapAlloc(GetProcessHeap(),0,bytesA); + if (!filePathA) { - ERR("Couldn't read file path string\n"); - return E_FAIL; + res = E_OUTOFMEMORY; + goto fail; } + res=IStream_Read(pStm,filePathA,bytesA,&bread); + if (bread != bytesA) + { + WARN("Couldn't read file path string\n"); + goto fail; + } + /* read the first constant */ IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread); if (bread != sizeof(DWORD) || dwbuffer != 0xDEADFFFF) { - ERR("Couldn't read 0xDEADFFFF constant\n"); - return E_FAIL; + WARN("Couldn't read 0xDEADFFFF constant\n"); + goto fail; } - length--; - - for(i=0;i<10;i++){ - res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread); - if (bread!=sizeof(WORD) || wbuffer!=0) + for(i=0;i<5;i++) + { + res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread); + if (bread!=sizeof(DWORD) || dwbuffer!=0) { - ERR("Couldn't read 0 padding\n"); - return E_FAIL; + WARN("Couldn't read 0 padding\n"); + goto fail; } } - if (length>8) - length=0; + res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread); + if (bread!=sizeof(DWORD)) + goto fail; - doubleLenHex=doubleLenDec=2*length; - if (length > 5) - doubleLenDec+=6; + if (!dwbuffer) /* No W-string */ + { + bytesA--; + len=MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, filePathA, bytesA, NULL, 0); + if (!len) + goto fail; - res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread); - if (bread!=sizeof(DWORD) || dwbuffer!=doubleLenDec) - return E_FAIL; + filePathW=HeapAlloc(GetProcessHeap(),0,(len+1)*sizeof(WCHAR)); + if (!filePathW) + { + res = E_OUTOFMEMORY; + goto fail; + } + MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, filePathA, -1, filePathW, len+1); + goto succeed; + } - if (length==0) - return res; + if (dwbuffer < 6) + goto fail; + bytesW=dwbuffer - 6; + res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),&bread); - if (bread!=sizeof(DWORD) || dwbuffer!=doubleLenHex) - return E_FAIL; + if (bread!=sizeof(DWORD) || dwbuffer!=bytesW) + goto fail; res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread); if (bread!=sizeof(WORD) || wbuffer!=0x3) - return E_FAIL; + goto fail; - filePathW=HeapAlloc(GetProcessHeap(),0,(length+1)*sizeof(WCHAR)); - filePathW[length]=0; - res=IStream_Read(pStm,filePathW,doubleLenHex,&bread); - if (bread!=doubleLenHex) { - HeapFree(GetProcessHeap(), 0, filePathW); - return E_FAIL; + len=bytesW/sizeof(WCHAR); + filePathW=HeapAlloc(GetProcessHeap(),0,(len+1)*sizeof(WCHAR)); + if(!filePathW) [truncated at 1000 lines; 1370 more skipped]
19 years, 4 months
1
0
0
0
[weiden] 17035: fixed difference in signedness warning (GCC4)
by weiden@svn.reactos.com
fixed difference in signedness warning (GCC4) Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c _____ Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c --- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-08-03 22:12:15 UTC (rev 17034) +++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-08-03 22:31:41 UTC (rev 17035) @@ -434,7 +434,7 @@ lpValueName, 0, DataType, - Buffer, + (const BYTE*)Buffer, Length)) ret = CR_REGISTRY_ERROR; }
19 years, 4 months
1
0
0
0
[gvg] 17034: Sync to Wine-20050628:
by gvg@svn.reactos.com
Sync to Wine-20050628: Mike McCormack <mike(a)codeweavers.com> - Repaint the area behind the "transparent" text control when it changes. - Implement transparency in the text control. - Make the MSI icon control work. - Make tabs work in msi dialogs. - Added support for the MSI MaskEdit control. - Use a richedit control for license text. - Fix radio button groups. Don't add the WS_GROUP style to every window. - Use standard lists in the event subscription code. - Take the dialog frame into account when calculating the dialog size. - Use MSI_QueryGetRecord in one more place. - Create a helper function to fetch a single record from a query. - More -Wmissing-declarations and -Wwrite-strings warning fixes. - Get rid of some redundant parser types. - Use the new helper function MSI_QueryGetRecord. - Use MSI_RecordGetString in more actions. - Use MSI_RecordGetString where possible. - Fixes for -Wmissing-declarations and -Wwrite-strings warnings. - Remove some unused code. - Add and correct some function declarations. - Improve number parsing and avoid unicode.h. - avoid unicode.h - add a missing function prototype - Create a stub implementation for MsiViewGetError. - Remove more types from the parser. - Test and fix the size of stream fields in a record. - Clean up headers and make some functions static. Marcus Meissner <meissner(a)suse.de> - Use a simpler expression for the "RichEdit20W" string to workaround compiler bug. - Remove cszbs from msi/action.h. Aric Stewart <aric(a)codeweavers.com> Mike McCormack <mike(a)codeweavers.com> - Allow dialog controls to subscribe to installer events. - Fix handling of checkbox properties. - Implement dialog events and hook up the dialog code. Aric Stewart <aric(a)codeweavers.com> - Break out all the file related actions and helper functions into files.c - Break out all the top level apis into install.c. - Break out all the class registration actions into classes.c. This includes RegisterClassInfo, RegisterProgIds, RegisterExtensions and RegisterMIMETypes. - Break out all the helper functions into helpers.c. - Added module upgrade.c and implemented FindRelatedProducts. - A long overdue fix to MSI_SetTargetPath. This should fix an error with some installers that where unable to change the target path. - Add functions to add the User UpgradeCodes. - A simple cleanup to only track the temp file if we need to have it laying around because the action is going on asynchronously. Otherwise clean up the temp file as the action finishes. - Introduce really basic scripting of actions. This is primarily to get the order of execution of the action correct since some custom actions can be scripted and others are run during the script building phase. - Perform ExecuteAction at UILevel 2. - Rework CreateShortcuts to use MSI_IterateRecords. - Properly handle -1 as a registry key root. - Rework SelfRegModules to use MSI_IterateRecords. - Rework component, feature and file loading to use MSI_IterateRecords. - Rework RegisterFonts to use MSI_IterateRecords. - Rework WriteIniValues to use MSI_IterateRecords. - Rework PublishProduct to use MSI_IterateRecords. - Rework RegisterTypeLibraries to use MSI_IterateR - Rework LaunchConditions to use MSI_IterateRecord - Rework CostFinalize to use MSI_IterateRecords. - Rework WriteRegistryValues to use MSI_IterateRecords. - Rework CreateFolders to use MSI_IterateRecords. - Use MSI_IterateRecords for processing actions. Some whitespace cleanup and replace a comment block I did not want to remove. - Flesh out the remaining keys in RegisterProduct. - Extending upon Mike McCormack's cleanup to use MSI_RecordGetString. - Register the Product Version also. Also help plug some memory leaks pointed out by Mike McCormack. - Avoid a loop where a parent's parent refers to itself as its parent. - Added module upgrade.c and implemented FindRelatedProducts. - Set the Preselected property if appropriate (relevant to MigrateFeatureStates when implemented). - Write out Product Language and Product Icon to the registry. - Write out UpgradeCodes to the registry to allow for future upgrades. - Don't get caught in loops on parent progids. - Since multiple progids can refer to 1 class we need to check if that class is isntalled instead of just relying on having it set the InstallMe variable. - Add install_on_demand for Extension servers also. currently defaulting to TRUE. - Extension need to have 1 verb to mark the given progid to be installed. - Do not loop if a ProgId's Parent Index it itself. - Add a VersionIndIndex for tracking version independent fields for the ProgIds properly. - Print a message for skipped actions in ProcessExecSequence like in the UISequence. - Do not change a features state to Advertise if it explicitly disallows it. - For typelibs index 1 do not add \\1 to the path. This cleans up registry diffs with native MSI. - Register the FileType and correct short vs long path problems with InprocServer32. Also add install_on_demand boolean for future expansion. - First pass at writing out CurVer keys for ProgIds. Also print a message for the actions we skip. Lines up with native MSI output logs for ease of comparison. - A big rewrite of the whole RegisterClass, RegisterProgId, RegisterExtension and RegisterMIME actions. We now handle verbs properly, handle dependancies and such properly and keep track of what we need to register and what we do not properly. - Allow control events to return codes to halt the processing of event. Needed for the SetTargetPath Event. - Fix situations where TARGETDIR is set to a non \ terminated path. Fixes a few installers. - Redo how we extract files from a cabinet in order to dramatically improve performance, especially if picking and choosing files out of the cabinet. - Duplicate files should not fail if unable to get Destination Directory. - Use MSI_IterateRecords for DuplicateFiles. - Add UI messages to FindRelatedProducts. - Reduce unneeded includes. - A "1" is returned not a 1 for AssignmentType. Also as a bit more to the FIXME message. - Add Language to the values we can query with MsiGetProductInfo. - Correct a crash if the length buffer is NULL. - Locate where a buffer size is not being set and correctly handle the buffer size conversion from W to A (with help from Robert Shearman). - Make sure the TRACE statements do not spew garbage by using debugstr_wn. - Restrict deformating of nested index keys [[1]]. - Introduce the beginning of group deformating {}. - Implement the [!file] format to produce the short filename. Stefan Huehner <stefan(a)huehner.org> - Fix more -Wstrict-prototypes warnings. Francois Gouget <fgouget(a)free.fr> - Assorted spelling fixes. Dmitry Timoshkov <dmitry(a)codeweavers.com> - Make more of the OLE interface vtables const. Added: trunk/reactos/include/wine/msvcrt/ Added: trunk/reactos/include/wine/msvcrt/fcntl.h Modified: trunk/reactos/lib/msi/Makefile.in Modified: trunk/reactos/lib/msi/action.c Modified: trunk/reactos/lib/msi/action.h Added: trunk/reactos/lib/msi/classes.c Modified: trunk/reactos/lib/msi/cond.tab.c Modified: trunk/reactos/lib/msi/cond.tab.h Modified: trunk/reactos/lib/msi/cond.y Modified: trunk/reactos/lib/msi/create.c Modified: trunk/reactos/lib/msi/custom.c Modified: trunk/reactos/lib/msi/database.c Modified: trunk/reactos/lib/msi/dialog.c Added: trunk/reactos/lib/msi/events.c Added: trunk/reactos/lib/msi/files.c Modified: trunk/reactos/lib/msi/format.c Added: trunk/reactos/lib/msi/helpers.c Modified: trunk/reactos/lib/msi/insert.c Added: trunk/reactos/lib/msi/install.c Modified: trunk/reactos/lib/msi/msi.c Modified: trunk/reactos/lib/msi/msi.spec Modified: trunk/reactos/lib/msi/msi.xml Modified: trunk/reactos/lib/msi/msipriv.h Modified: trunk/reactos/lib/msi/msiquery.c Modified: trunk/reactos/lib/msi/order.c Modified: trunk/reactos/lib/msi/package.c Modified: trunk/reactos/lib/msi/preview.c Modified: trunk/reactos/lib/msi/query.h Modified: trunk/reactos/lib/msi/record.c Modified: trunk/reactos/lib/msi/registry.c Modified: trunk/reactos/lib/msi/select.c Modified: trunk/reactos/lib/msi/sql.tab.c Modified: trunk/reactos/lib/msi/sql.tab.h Modified: trunk/reactos/lib/msi/sql.y Modified: trunk/reactos/lib/msi/suminfo.c Modified: trunk/reactos/lib/msi/table.c Modified: trunk/reactos/lib/msi/tokenize.c Modified: trunk/reactos/lib/msi/update.c Added: trunk/reactos/lib/msi/upgrade.c Modified: trunk/reactos/lib/msi/where.c Modified: trunk/reactos/w32api/include/msi.h Modified: trunk/reactos/w32api/include/msidefs.h Modified: trunk/reactos/w32api/include/msiquery.h _____ Added: trunk/reactos/include/wine/msvcrt/fcntl.h --- trunk/reactos/include/wine/msvcrt/fcntl.h 2005-08-03 21:34:01 UTC (rev 17033) +++ trunk/reactos/include/wine/msvcrt/fcntl.h 2005-08-03 22:12:15 UTC (rev 17034) @@ -0,0 +1,10 @@ +#ifndef __WINE_MSVCRT_FCNTL_H +#define __WINE_MSVCRT_FCNTL_H + +/* + * Compatibility header + */ + +#include <fcntl.h> + +#endif /* __WINE_MSVCRT_FCNTL_H */ Property changes on: trunk/reactos/include/wine/msvcrt/fcntl.h ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/msi/Makefile.in --- trunk/reactos/lib/msi/Makefile.in 2005-08-03 21:34:01 UTC (rev 17033) +++ trunk/reactos/lib/msi/Makefile.in 2005-08-03 22:12:15 UTC (rev 17034) @@ -4,21 +4,26 @@ VPATH = @srcdir@ MODULE = msi.dll IMPORTLIB = libmsi.$(IMPLIBEXT) -IMPORTS = shell32 cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32 +IMPORTS = shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32 EXTRALIBS = -luuid $(LIBUNICODE) C_SRCS = \ action.c \ appsearch.c \ + classes.c \ create.c \ custom.c \ database.c \ delete.c \ dialog.c \ distinct.c \ + events.c \ + files.c \ format.c \ handle.c \ + helpers.c \ insert.c \ + install.c \ msi.c \ msiquery.c \ order.c \ @@ -33,6 +38,7 @@ table.c \ tokenize.c \ update.c \ + upgrade.c \ where.c RC_SRCS = msi.rc _____ Modified: trunk/reactos/lib/msi/action.c --- trunk/reactos/lib/msi/action.c 2005-08-03 21:34:01 UTC (rev 17033) +++ trunk/reactos/lib/msi/action.c 2005-08-03 22:12:15 UTC (rev 17034) @@ -1,7 +1,7 @@ /* * Implementation of the Microsoft Installer (msi.dll) * - * Copyright 2004 Aric Stewart for CodeWeavers + * Copyright 2004,2005 Aric Stewart for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,7 +27,6 @@ */ #include <stdarg.h> -#include <stdio.h> #define COBJMACROS @@ -36,15 +35,8 @@ #include "winerror.h" #include "winreg.h" #include "wine/debug.h" -#include "fdi.h" -#include "msi.h" -#include "msiquery.h" #include "msidefs.h" -#include "fcntl.h" -#include "objbase.h" -#include "objidl.h" #include "msipriv.h" -#include "winnls.h" #include "winuser.h" #include "shlobj.h" #include "wine/unicode.h" @@ -62,8 +54,6 @@ static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran); static UINT ACTION_ProcessUISequence(MSIPACKAGE *package); static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI); -static UINT build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name, - LPWSTR *FilePath); /* * action handlers @@ -75,17 +65,11 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package); static UINT ACTION_CostFinalize(MSIPACKAGE *package); static UINT ACTION_FileCost(MSIPACKAGE *package); -static UINT ACTION_InstallFiles(MSIPACKAGE *package); -static UINT ACTION_DuplicateFiles(MSIPACKAGE *package); static UINT ACTION_WriteRegistryValues(MSIPACKAGE *package); static UINT ACTION_InstallInitialize(MSIPACKAGE *package); static UINT ACTION_InstallValidate(MSIPACKAGE *package); static UINT ACTION_ProcessComponents(MSIPACKAGE *package); static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package); -static UINT ACTION_RegisterClassInfo(MSIPACKAGE *package); -static UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package); -static UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package); -static UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package); static UINT ACTION_RegisterUser(MSIPACKAGE *package); static UINT ACTION_CreateShortcuts(MSIPACKAGE *package); static UINT ACTION_PublishProduct(MSIPACKAGE *package); @@ -101,26 +85,18 @@ static UINT ACTION_RegisterFonts(MSIPACKAGE *package); static UINT ACTION_PublishComponents(MSIPACKAGE *package); - /* * consts and values used */ -static const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0}; -static const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0}; -static const WCHAR cszTargetDir[] = {'T','A','R','G','E','T','D','I','R',0}; -static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0}; -static const WCHAR cszDatabase[]={'D','A','T','A','B','A','S','E',0}; static const WCHAR c_colon[] = {'C',':','\\',0}; -static const WCHAR szProductCode[]= - {'P','r','o','d','u','c','t','C','o','d','e',0}; -static const WCHAR cszbs[]={'\\',0}; + const static WCHAR szCreateFolders[] = {'C','r','e','a','t','e','F','o','l','d','e','r','s',0}; const static WCHAR szCostFinalize[] = {'C','o','s','t','F','i','n','a','l','i','z','e',0}; -const static WCHAR szInstallFiles[] = +const WCHAR szInstallFiles[] = {'I','n','s','t','a','l','l','F','i','l','e','s',0}; -const static WCHAR szDuplicateFiles[] = +const WCHAR szDuplicateFiles[] = {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0}; const static WCHAR szWriteRegistryValues[] = {'W','r','i','t','e','R','e','g','i','s','t','r','y', @@ -140,9 +116,9 @@ const static WCHAR szRegisterTypeLibraries[] = {'R','e','g','i','s','t','e','r','T','y','p','e', 'L','i','b','r','a','r','i','e','s',0}; -const static WCHAR szRegisterClassInfo[] = +const WCHAR szRegisterClassInfo[] = {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}; -const static WCHAR szRegisterProgIdInfo[] = +const WCHAR szRegisterProgIdInfo[] = {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o' ,0}; const static WCHAR szCreateShortcuts[] = {'C','r','e','a','t','e','S','h','o','r','t','c','u','t','s',0}; @@ -167,7 +143,7 @@ {'F','o','r','c','e','R','e','b','o','o','t',0}; const static WCHAR szResolveSource[] = {'R','e','s','o','l','v','e','S','o','u','r','c','e',0}; -const static WCHAR szAppSearch[] = +const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0}; const static WCHAR szAllocateRegistrySpace[] = {'A','l','l','o','c','a','t','e','R','e','g','i','s','t','r','y', @@ -182,7 +158,7 @@ {'D','i','s','a','b','l','e','R','o','l','l','b','a','c','k',0}; const static WCHAR szExecuteAction[] = {'E','x','e','c','u','t','e','A','c','t','i','o','n',0}; -const static WCHAR szFindRelatedProducts[] = +const WCHAR szFindRelatedProducts[] = {'F','i','n','d','R','e','l','a','t','e','d', 'P','r','o','d','u','c','t','s',0}; const static WCHAR szInstallAdminPackage[] = @@ -193,10 +169,10 @@ 'F','i','l','e',0}; const static WCHAR szIsolateComponents[] = {'I','s','o','l','a','t','e','C','o','m','p','o','n','e','n','t','s',0}; -const static WCHAR szMigrateFeatureStates[] = +const WCHAR szMigrateFeatureStates[] = {'M','i','g','r','a','t','e','F','e','a','t','u','r','e', 'S','t','a','t','e','s',0}; -const static WCHAR szMoveFiles[] = +const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0}; const static WCHAR szMsiPublishAssemblies[] = {'M','s','i','P','u','b','l','i','s','h', @@ -208,31 +184,31 @@ {'I','n','s','t','a','l','l','O','D','B','C',0}; const static WCHAR szInstallServices[] = {'I','n','s','t','a','l','l','S','e','r','v','i','c','e','s',0}; -const static WCHAR szPatchFiles[] = +const WCHAR szPatchFiles[] = {'P','a','t','c','h','F','i','l','e','s',0}; const static WCHAR szPublishComponents[] = {'P','u','b','l','i','s','h','C','o','m','p','o','n','e','n','t','s',0}; const static WCHAR szRegisterComPlus[] = {'R','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; -const static WCHAR szRegisterExtensionInfo[] = +const WCHAR szRegisterExtensionInfo[] = {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n', 'I','n','f','o',0}; const static WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; -const static WCHAR szRegisterMIMEInfo[] = +const WCHAR szRegisterMIMEInfo[] = {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}; const static WCHAR szRegisterUser[] = {'R','e','g','i','s','t','e','r','U','s','e','r',0}; -const static WCHAR szRemoveDuplicateFiles[] = +const WCHAR szRemoveDuplicateFiles[] = {'R','e','m','o','v','e','D','u','p','l','i','c','a','t','e', 'F','i','l','e','s',0}; const static WCHAR szRemoveEnvironmentStrings[] = {'R','e','m','o','v','e','E','n','v','i','r','o','n','m','e','n','t', 'S','t','r','i','n','g','s',0}; -const static WCHAR szRemoveExistingProducts[] = +const WCHAR szRemoveExistingProducts[] = {'R','e','m','o','v','e','E','x','i','s','t','i','n','g', 'P','r','o','d','u','c','t','s',0}; -const static WCHAR szRemoveFiles[] = +const WCHAR szRemoveFiles[] = {'R','e','m','o','v','e','F','i','l','e','s',0}; const static WCHAR szRemoveFolders[] = {'R','e','m','o','v','e','F','o','l','d','e','r','s',0}; @@ -262,19 +238,19 @@ 'C','o','m','p','o','n','e','n','t','s',0}; const static WCHAR szUnpublishFeatures[] = {'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0}; -const static WCHAR szUnregisterClassInfo[] = +const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s', 'I','n','f','o',0}; const static WCHAR szUnregisterComPlus[] = {'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; -const static WCHAR szUnregisterExtensionInfo[] = +const WCHAR szUnregisterExtensionInfo[] = {'U','n','r','e','g','i','s','t','e','r', 'E','x','t','e','n','s','i','o','n','I','n','f','o',0}; const static WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}; -const static WCHAR szUnregisterMIMEInfo[] = +const WCHAR szUnregisterMIMEInfo[] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o' ,0}; -const static WCHAR szUnregisterProgIdInfo[] = +const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d', 'I','n','f','o',0}; const static WCHAR szUnregisterTypeLibraries[] = @@ -305,7 +281,7 @@ { szDuplicateFiles, ACTION_DuplicateFiles }, { szExecuteAction, ACTION_ExecuteAction }, { szFileCost, ACTION_FileCost }, - { szFindRelatedProducts, NULL}, + { szFindRelatedProducts, ACTION_FindRelatedProducts }, { szForceReboot, ACTION_ForceReboot }, { szInstallAdminPackage, NULL}, { szInstallExecute, ACTION_InstallExecute }, @@ -371,343 +347,22 @@ }; -/******************************************************** - * helper functions to get around current HACKS and such +/******************************************************** + * helper functions ********************************************************/ -inline static void reduce_to_longfilename(WCHAR* filename) -{ - LPWSTR p = strchrW(filename,'|'); - if (p) - memmove(filename, p+1, (strlenW(p+1)+1)*sizeof(WCHAR)); -} -inline static void reduce_to_shortfilename(WCHAR* filename) +static void ce_actiontext(MSIPACKAGE* package, LPCWSTR action) { - LPWSTR p = strchrW(filename,'|'); - if (p) - *p = 0; -} + static const WCHAR szActionText[] = + {'A','c','t','i','o','n','T','e','x','t',0}; + MSIRECORD *row; -WCHAR *load_dynamic_stringW(MSIRECORD *row, INT index) -{ - UINT rc; - DWORD sz; - LPWSTR ret; - - sz = 0; - if (MSI_RecordIsNull(row,index)) - return NULL; - - rc = MSI_RecordGetStringW(row,index,NULL,&sz); - - /* having an empty string is different than NULL */ - if (sz == 0) - { - ret = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)); - ret[0] = 0; - return ret; - } - - sz ++; - ret = HeapAlloc(GetProcessHeap(),0,sz * sizeof (WCHAR)); - rc = MSI_RecordGetStringW(row,index,ret,&sz); - if (rc!=ERROR_SUCCESS) - { - ERR("Unable to load dynamic string\n"); - HeapFree(GetProcessHeap(), 0, ret); - ret = NULL; - } - return ret; -} - -LPWSTR load_dynamic_property(MSIPACKAGE *package, LPCWSTR prop, UINT* rc) -{ - DWORD sz = 0; - LPWSTR str; - UINT r; - - r = MSI_GetPropertyW(package, prop, NULL, &sz); - if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA) - { - if (rc) - *rc = r; - return NULL; - } - sz++; - str = HeapAlloc(GetProcessHeap(),0,sz*sizeof(WCHAR)); - r = MSI_GetPropertyW(package, prop, str, &sz); - if (r != ERROR_SUCCESS) - { - HeapFree(GetProcessHeap(),0,str); - str = NULL; - } - if (rc) - *rc = r; - return str; -} - -int get_loaded_component(MSIPACKAGE* package, LPCWSTR Component ) -{ - int rc = -1; - DWORD i; - - for (i = 0; i < package->loaded_components; i++) - { - if (strcmpW(Component,package->components[i].Component)==0) - { - rc = i; - break; - } - } - return rc; -} - -int get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature ) -{ - int rc = -1; - DWORD i; - - for (i = 0; i < package->loaded_features; i++) - { - if (strcmpW(Feature,package->features[i].Feature)==0) - { - rc = i; - break; - } - } - return rc; -} - -int get_loaded_file(MSIPACKAGE* package, LPCWSTR file) -{ - int rc = -1; - DWORD i; - - for (i = 0; i < package->loaded_files; i++) - { - if (strcmpW(file,package->files[i].File)==0) - { - rc = i; - break; - } - } - return rc; -} - -int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path) -{ - DWORD i; - DWORD index; - - if (!package) - return -2; - - for (i=0; i < package->loaded_files; i++) - if (strcmpW(package->files[i].File,name)==0) - return -1; - - index = package->loaded_files; - package->loaded_files++; - if (package->loaded_files== 1) - package->files = HeapAlloc(GetProcessHeap(),0,sizeof(MSIFILE)); - else - package->files = HeapReAlloc(GetProcessHeap(),0, - package->files , package->loaded_files * sizeof(MSIFILE)); - - memset(&package->files[index],0,sizeof(MSIFILE)); - - package->files[index].File = strdupW(name); - package->files[index].TargetPath = strdupW(path); - package->files[index].Temporary = TRUE; - - TRACE("Tracking tempfile (%s)\n",debugstr_w(package->files[index].File)); - - return 0; -} - -static void remove_tracked_tempfiles(MSIPACKAGE* package) -{ - DWORD i; - - if (!package) - return; - - for (i = 0; i < package->loaded_files; i++) - { - if (package->files[i].Temporary) - { - TRACE("Cleaning up %s\n",debugstr_w(package->files[i].TargetPath)); - DeleteFileW(package->files[i].TargetPath); - } - - } -} - -/* wrapper to resist a need for a full rewrite right now */ -DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data ) -{ - if (ptr) - { - MSIRECORD *rec = MSI_CreateRecord(1); - DWORD size = 0; - - MSI_RecordSetStringW(rec,0,ptr); - MSI_FormatRecordW(package,rec,NULL,&size); - if (size >= 0) - { - size++; - *data = HeapAlloc(GetProcessHeap(),0,size*sizeof(WCHAR)); - if (size > 1) - MSI_FormatRecordW(package,rec,*data,&size); - else - *data[0] = 0; - msiobj_release( &rec->hdr ); - return sizeof(WCHAR)*size; - } - msiobj_release( &rec->hdr ); - } - - *data = NULL; - return 0; -} - -/* Called when the package is being closed */ -void ACTION_free_package_structures( MSIPACKAGE* package) -{ - INT i; - - TRACE("Freeing package action data\n"); - - remove_tracked_tempfiles(package); - - /* No dynamic buffers in features */ - if (package->features && package->loaded_features > 0) - HeapFree(GetProcessHeap(),0,package->features); - - for (i = 0; i < package->loaded_folders; i++) - { - HeapFree(GetProcessHeap(),0,package->folders[i].Directory); - HeapFree(GetProcessHeap(),0,package->folders[i].TargetDefault); - HeapFree(GetProcessHeap(),0,package->folders[i].SourceDefault); - HeapFree(GetProcessHeap(),0,package->folders[i].ResolvedTarget); - HeapFree(GetProcessHeap(),0,package->folders[i].ResolvedSource); - HeapFree(GetProcessHeap(),0,package->folders[i].Property); - } - if (package->folders && package->loaded_folders > 0) - HeapFree(GetProcessHeap(),0,package->folders); - - for (i = 0; i < package->loaded_components; i++) - HeapFree(GetProcessHeap(),0,package->components[i].FullKeypath); - - if (package->components && package->loaded_components > 0) - HeapFree(GetProcessHeap(),0,package->components); - - for (i = 0; i < package->loaded_files; i++) - { - HeapFree(GetProcessHeap(),0,package->files[i].File); - HeapFree(GetProcessHeap(),0,package->files[i].FileName); - HeapFree(GetProcessHeap(),0,package->files[i].ShortName); - HeapFree(GetProcessHeap(),0,package->files[i].Version); - HeapFree(GetProcessHeap(),0,package->files[i].Language); - HeapFree(GetProcessHeap(),0,package->files[i].SourcePath); - HeapFree(GetProcessHeap(),0,package->files[i].TargetPath); - } - - if (package->files && package->loaded_files > 0) - HeapFree(GetProcessHeap(),0,package->files); - - for (i = 0; i < package->DeferredActionCount; i++) - HeapFree(GetProcessHeap(),0,package->DeferredAction[i]); - HeapFree(GetProcessHeap(),0,package->DeferredAction); - - for (i = 0; i < package->CommitActionCount; i++) - HeapFree(GetProcessHeap(),0,package->CommitAction[i]); - HeapFree(GetProcessHeap(),0,package->CommitAction); - - HeapFree(GetProcessHeap(),0,package->PackagePath); -} - -static void ui_progress(MSIPACKAGE *package, int a, int b, int c, int d ) -{ - MSIRECORD * row; - - row = MSI_CreateRecord(4); - MSI_RecordSetInteger(row,1,a); - MSI_RecordSetInteger(row,2,b); - MSI_RecordSetInteger(row,3,c); - MSI_RecordSetInteger(row,4,d); - MSI_ProcessMessage(package, INSTALLMESSAGE_PROGRESS, row); - msiobj_release(&row->hdr); - - msi_dialog_check_messages(NULL); -} - -static void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record) -{ - static const WCHAR Query_t[] = - {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', - '`','A','c','t','i','o', 'n','T','e','x','t','`',' ', - 'W','H','E','R','E',' ', '`','A','c','t','i','o','n','`',' ','=', - ' ','\'','%','s','\'',0}; - WCHAR message[1024]; - UINT rc; - MSIQUERY * view; - MSIRECORD * row = 0; - DWORD size; - - if (!package->LastAction || strcmpW(package->LastAction,action)) - { - rc = MSI_OpenQuery(package->db, &view, Query_t, action); - if (rc != ERROR_SUCCESS) - return; - - rc = MSI_ViewExecute(view, 0); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return; - } - rc = MSI_ViewFetch(view,&row); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return; - } - - if (MSI_RecordIsNull(row,3)) - { - msiobj_release(&row->hdr); - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return; - } - - /* update the cached actionformat */ - HeapFree(GetProcessHeap(),0,package->ActionFormat); - package->ActionFormat = load_dynamic_stringW(row,3); - - HeapFree(GetProcessHeap(),0,package->LastAction); - package->LastAction = strdupW(action); - - msiobj_release(&row->hdr); - MSI_ViewClose(view); - msiobj_release(&view->hdr); - } - - MSI_RecordSetStringW(record,0,package->ActionFormat); - size = 1024; - MSI_FormatRecordW(package,record,message,&size); - row = MSI_CreateRecord(1); - MSI_RecordSetStringW(row,1,message); - - MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONDATA, row); + MSI_RecordSetStringW(row,1,action); + ControlEvent_FireSubscribedEvent(package,szActionText, row); msiobj_release(&row->hdr); } - static void ui_actionstart(MSIPACKAGE *package, LPCWSTR action) { static const WCHAR template_s[]= @@ -722,44 +377,25 @@ ' ','\'','%','s','\'',0}; WCHAR message[1024]; WCHAR timet[0x100]; - UINT rc; - MSIQUERY * view; MSIRECORD * row = 0; - WCHAR *ActionText=NULL; + LPCWSTR ActionText; GetTimeFormatW(LOCALE_USER_DEFAULT, 0, NULL, format, timet, 0x100); - rc = MSI_OpenQuery(package->db, &view, Query_t, action); - if (rc != ERROR_SUCCESS) + row = MSI_QueryGetRecord( package->db, Query_t, action ); + if (!row) return; - rc = MSI_ViewExecute(view, 0); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return; - } - rc = MSI_ViewFetch(view,&row); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return; - } - ActionText = load_dynamic_stringW(row,2); - msiobj_release(&row->hdr); - MSI_ViewClose(view); - msiobj_release(&view->hdr); + ActionText = MSI_RecordGetString(row,2); sprintfW(message,template_s,timet,action,ActionText); + msiobj_release(&row->hdr); row = MSI_CreateRecord(1); MSI_RecordSetStringW(row,1,message); MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, row); msiobj_release(&row->hdr); - HeapFree(GetProcessHeap(),0,ActionText); } static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, @@ -791,82 +427,6 @@ msiobj_release(&row->hdr); } -/* - * build_directory_name() - * - * This function is to save messing round with directory names - * It handles adding backslashes between path segments, - * and can add \ at the end of the directory name if told to. - * - * It takes a variable number of arguments. - * It always allocates a new string for the result, so make sure - * to free the return value when finished with it. - * - * The first arg is the number of path segments that follow. - * The arguments following count are a list of path segments. - * A path segment may be NULL. - * - * Path segments will be added with a \ separating them. - * A \ will not be added after the last segment, however if the - * last segment is NULL, then the last character will be a \ - * - */ -static LPWSTR build_directory_name(DWORD count, ...) -{ - DWORD sz = 1, i; - LPWSTR dir; - va_list va; - - va_start(va,count); - for(i=0; i<count; i++) - { - LPCWSTR str = va_arg(va,LPCWSTR); - if (str) - sz += strlenW(str) + 1; - } - va_end(va); - - dir = HeapAlloc(GetProcessHeap(), 0, sz*sizeof(WCHAR)); - dir[0]=0; - - va_start(va,count); - for(i=0; i<count; i++) - { - LPCWSTR str = va_arg(va,LPCWSTR); - if (!str) - continue; - strcatW(dir, str); - if( ((i+1)!=count) && dir[strlenW(dir)-1]!='\\') - strcatW(dir, cszbs); - } - return dir; -} - -static BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, INT index, - INSTALLSTATE check ) -{ - if (package->components[index].Installed == check) - return FALSE; - - if (package->components[index].ActionRequest == check) - return TRUE; - else - return FALSE; -} - -static BOOL ACTION_VerifyFeatureForAction(MSIPACKAGE* package, INT index, - INSTALLSTATE check ) -{ - if (package->features[index].Installed == check) - return FALSE; - - if (package->features[index].ActionRequest == check) - return TRUE; - else - return FALSE; -} - - /**************************************************** * TOP level entry points *****************************************************/ @@ -883,8 +443,10 @@ static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0}; MSI_SetPropertyW(package, szAction, szInstall); - package->ExecuteSequenceRun = FALSE; + package->script = HeapAlloc(GetProcessHeap(),0,sizeof(MSISCRIPT)); + memset(package->script,0,sizeof(MSISCRIPT)); + if (szPackagePath) { LPWSTR p, check, path; @@ -993,15 +555,17 @@ rc = ERROR_SUCCESS; } + package->script->CurrentlyScripting= FALSE; + /* process the ending type action */ if (rc == ERROR_SUCCESS) ACTION_PerformActionSequence(package,-1,ui); else if (rc == ERROR_INSTALL_USEREXIT) ACTION_PerformActionSequence(package,-2,ui); - else if (rc == ERROR_FUNCTION_FAILED) - ACTION_PerformActionSequence(package,-3,ui); else if (rc == ERROR_INSTALL_SUSPEND) ACTION_PerformActionSequence(package,-4,ui); + else /* failed */ + ACTION_PerformActionSequence(package,-3,ui); /* finish up running custom actions */ ACTION_FinishCustomActions(package); @@ -1011,10 +575,7 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI) { - MSIQUERY * view; - UINT rc; - WCHAR buffer[0x100]; - DWORD sz = 0x100; + UINT rc = ERROR_SUCCESS; MSIRECORD * row = 0; static const WCHAR ExecSeqQuery[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', @@ -1029,67 +590,39 @@ ' ', '=',' ','%','i',0}; if (UI) - rc = MSI_OpenQuery(package->db, &view, UISeqQuery, seq); + row = MSI_QueryGetRecord(package->db, UISeqQuery, seq); else - rc = MSI_OpenQuery(package->db, &view, ExecSeqQuery, seq); + row = MSI_QueryGetRecord(package->db, ExecSeqQuery, seq); - if (rc == ERROR_SUCCESS) + if (row) { - rc = MSI_ViewExecute(view, 0); + LPCWSTR action, cond; - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - goto end; - } - TRACE("Running the actions\n"); - rc = MSI_ViewFetch(view,&row); - if (rc != ERROR_SUCCESS) - { - rc = ERROR_SUCCESS; - goto end; - } - /* check conditions */ - if (!MSI_RecordIsNull(row,2)) + cond = MSI_RecordGetString(row,2); + if (cond) { - LPWSTR cond = NULL; - cond = load_dynamic_stringW(row,2); - - if (cond) - { - /* this is a hack to skip errors in the condition code */ - if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE) - { - HeapFree(GetProcessHeap(),0,cond); - msiobj_release(&row->hdr); - goto end; - } - else - HeapFree(GetProcessHeap(),0,cond); - } + /* this is a hack to skip errors in the condition code */ + if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE) + goto end; } - sz=0x100; - rc = MSI_RecordGetStringW(row,1,buffer,&sz); - if (rc != ERROR_SUCCESS) + action = MSI_RecordGetString(row,1); + if (!action) { - ERR("Error is %x\n",rc); - msiobj_release(&row->hdr); + ERR("failed to fetch action\n"); + rc = ERROR_FUNCTION_FAILED; goto end; } if (UI) - rc = ACTION_PerformUIAction(package,buffer); + rc = ACTION_PerformUIAction(package,action); else - rc = ACTION_PerformAction(package,buffer); - msiobj_release(&row->hdr); + rc = ACTION_PerformAction(package,action,FALSE); end: - MSI_ViewClose(view); - msiobj_release(&view->hdr); + msiobj_release(&row->hdr); } else rc = ERROR_SUCCESS; @@ -1097,6 +630,51 @@ return rc; } +typedef struct { + MSIPACKAGE* package; + BOOL UI; +} iterate_action_param; + +static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param) +{ + iterate_action_param *iap= (iterate_action_param*)param; + UINT rc; + LPCWSTR cond, action; + + action = MSI_RecordGetString(row,1); + if (!action) + { + ERR("Error is retrieving action name\n"); + return ERROR_FUNCTION_FAILED; + } + + /* check conditions */ + cond = MSI_RecordGetString(row,2); + if (cond) + { + /* this is a hack to skip errors in the condition code */ + if (MSI_EvaluateConditionW(iap->package, cond) == MSICONDITION_FALSE) + { + TRACE("Skipping action: %s (condition is false)\n", + debugstr_w(action)); + return ERROR_SUCCESS; + } + } + + if (iap->UI) + rc = ACTION_PerformUIAction(iap->package,action); + else + rc = ACTION_PerformAction(iap->package,action,FALSE); + + if (rc == ERROR_FUNCTION_NOT_CALLED) + rc = ERROR_SUCCESS; + + if (rc != ERROR_SUCCESS) + ERR("Execution halted due to error (%i)\n",rc); + + return rc; +} + static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran) { MSIQUERY * view; @@ -1117,122 +695,41 @@ ' ','\'', 'I','n','s','t','a','l','l', 'V','a','l','i','d','a','t','e','\'', 0}; INT seq = 0; + iterate_action_param iap; + iap.package = package; + iap.UI = FALSE; - if (package->ExecuteSequenceRun) + if (package->script->ExecuteSequenceRun) { TRACE("Execute Sequence already Run\n"); return ERROR_SUCCESS; } - package->ExecuteSequenceRun = TRUE; - + package->script->ExecuteSequenceRun = TRUE; + /* get the sequence number */ if (UIran) { - rc = MSI_DatabaseOpenViewW(package->db, IVQuery, &view); - if (rc != ERROR_SUCCESS) - return rc; - rc = MSI_ViewExecute(view, 0); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return rc; - } - rc = MSI_ViewFetch(view,&row); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - return rc; - } + row = MSI_QueryGetRecord(package->db, IVQuery); + if( !row ) + return ERROR_FUNCTION_FAILED; seq = MSI_RecordGetInteger(row,1); msiobj_release(&row->hdr); - MSI_ViewClose(view); - msiobj_release(&view->hdr); } rc = MSI_OpenQuery(package->db, &view, ExecSeqQuery, seq); if (rc == ERROR_SUCCESS) { - rc = MSI_ViewExecute(view, 0); + TRACE("Running the actions\n"); - if (rc != ERROR_SUCCESS) - { - MSI_ViewClose(view); - msiobj_release(&view->hdr); - goto end; - } - - TRACE("Running the actions\n"); - - while (1) - { [truncated at 1000 lines; 11128 more skipped]
19 years, 4 months
1
0
0
0
[gvg] 17033: Sync to Wine-20050628:
by gvg@svn.reactos.com
Sync to Wine-20050628: Mike McCormack <mike(a)codeweavers.com> - Switch IShellLink to use shlwapi.SHCreateStreamOnFileW. Dmitry Timoshkov <dmitry(a)codeweavers.com> - Make remaining OLE interface vtables const. Alexandre Julliard <julliard(a)winehq.org> - Sort entry points in the same order as Windows. Stefan Huehner <stefan(a)huehner.org> - Fix some more -Wstrict-prototypes warnings. Modified: trunk/reactos/lib/shlwapi/assoc.c Modified: trunk/reactos/lib/shlwapi/istream.c Modified: trunk/reactos/lib/shlwapi/path.c Modified: trunk/reactos/lib/shlwapi/regstream.c Modified: trunk/reactos/lib/shlwapi/shlwapi.spec _____ Modified: trunk/reactos/lib/shlwapi/assoc.c --- trunk/reactos/lib/shlwapi/assoc.c 2005-08-03 21:18:24 UTC (rev 17032) +++ trunk/reactos/lib/shlwapi/assoc.c 2005-08-03 21:34:01 UTC (rev 17033) @@ -58,13 +58,13 @@ typedef struct { - IQueryAssociationsVtbl *lpVtbl; + const IQueryAssociationsVtbl *lpVtbl; LONG ref; HKEY hkeySource; HKEY hkeyProgID; } IQueryAssociationsImpl; -static struct IQueryAssociationsVtbl IQueryAssociations_vtbl; +static const IQueryAssociationsVtbl IQueryAssociations_vtbl; /*********************************************************************** *** * IQueryAssociations_Constructor [internal] @@ -693,7 +693,7 @@ return E_NOTIMPL; } -static struct IQueryAssociationsVtbl IQueryAssociations_vtbl = +static const IQueryAssociationsVtbl IQueryAssociations_vtbl = { IQueryAssociations_fnQueryInterface, IQueryAssociations_fnAddRef, _____ Modified: trunk/reactos/lib/shlwapi/istream.c --- trunk/reactos/lib/shlwapi/istream.c 2005-08-03 21:18:24 UTC (rev 17032) +++ trunk/reactos/lib/shlwapi/istream.c 2005-08-03 21:34:01 UTC (rev 17033) @@ -35,10 +35,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); +#define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) +#define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0) +#define STGM_CREATE_MODE(stgm) ((stgm)&0x0f000) + /* Layout of ISHFileStream object */ typedef struct { - IStreamVtbl *lpVtbl; + const IStreamVtbl *lpVtbl; ULONG ref; HANDLE hFile; DWORD dwMode; @@ -65,8 +69,7 @@ IsEqualIID(riid, &IID_IStream)) { *ppvObj = This; - - IStream_AddRef((IStream*)*ppvObj); + IStream_AddRef(iface); return S_OK; } return E_NOINTERFACE; @@ -112,22 +115,21 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG* pcbRead) { ISHFileStream *This = (ISHFileStream *)iface; - HRESULT hRet = S_OK; DWORD dwRead = 0; TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbRead); if (!pv) - hRet = STG_E_INVALIDPOINTER; - else if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL)) + return STG_E_INVALIDPOINTER; + + if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL)) { - hRet = (HRESULT)GetLastError(); - if(hRet > 0) - hRet = HRESULT_FROM_WIN32(hRet); + ERR("error %ld reading file\n", GetLastError()); + return HRESULT_FROM_WIN32(GetLastError()); } if (pcbRead) *pcbRead = dwRead; - return hRet; + return S_OK; } /*********************************************************************** *** @@ -136,24 +138,28 @@ static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb, ULONG* pcbWritten) { ISHFileStream *This = (ISHFileStream *)iface; - HRESULT hRet = S_OK; DWORD dwWritten = 0; TRACE("(%p,%p,0x%08lx,%p)\n", This, pv, cb, pcbWritten); if (!pv) - hRet = STG_E_INVALIDPOINTER; - else if (!(This->dwMode & STGM_WRITE)) - hRet = E_FAIL; - else if (!WriteFile(This->hFile, pv, cb, &dwWritten, NULL)) + return STG_E_INVALIDPOINTER; + + switch (STGM_ACCESS_MODE(This->dwMode)) { - hRet = (HRESULT)GetLastError(); - if(hRet > 0) - hRet = HRESULT_FROM_WIN32(hRet); + case STGM_WRITE: + case STGM_READWRITE: + break; + default: + return E_FAIL; } + + if (!WriteFile(This->hFile, pv, cb, &dwWritten, NULL)) + return HRESULT_FROM_WIN32(GetLastError()); + if (pcbWritten) *pcbWritten = dwWritten; - return hRet; + return S_OK; } /*********************************************************************** *** @@ -169,6 +175,8 @@ IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */ dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin); + if( dwPos == INVALID_SET_FILE_POINTER ) + return E_FAIL; if (pNewPos) { @@ -186,8 +194,15 @@ ISHFileStream *This = (ISHFileStream *)iface; TRACE("(%p,%ld)\n", This, libNewSize.u.LowPart); + IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */ - return E_NOTIMPL; + if( ! SetFilePointer( This->hFile, libNewSize.QuadPart, NULL, FILE_BEGIN ) ) + return E_FAIL; + + if( ! SetEndOfFile( This->hFile ) ) + return E_FAIL; + + return S_OK; } /*********************************************************************** *** @@ -325,7 +340,7 @@ return E_NOTIMPL; } -static struct IStreamVtbl SHLWAPI_fsVTable = +static const IStreamVtbl SHLWAPI_fsVTable = { IStream_fnQueryInterface, IStream_fnAddRef, @@ -403,29 +418,27 @@ *lppStream = NULL; - if (dwMode & ~(STGM_WRITE|STGM_READWRITE|STGM_SHARE_DENY_NONE|STGM_SHARE_DENY_READ|ST GM_CREATE)) - { - WARN("Invalid mode 0x%08lX\n", dwMode); + if (dwMode & STGM_TRANSACTED) return E_INVALIDARG; - } /* Access */ - switch (dwMode & (STGM_WRITE|STGM_READWRITE)) + switch (STGM_ACCESS_MODE(dwMode)) { - case STGM_READWRITE|STGM_WRITE: case STGM_READWRITE: dwAccess = GENERIC_READ|GENERIC_WRITE; break; case STGM_WRITE: dwAccess = GENERIC_WRITE; break; - default: + case STGM_READ: dwAccess = GENERIC_READ; break; + default: + return E_INVALIDARG; } /* Sharing */ - switch (dwMode & STGM_SHARE_DENY_READ) + switch (STGM_SHARE_MODE(dwMode)) { case STGM_SHARE_DENY_READ: dwShare = FILE_SHARE_WRITE; @@ -436,17 +449,24 @@ case STGM_SHARE_EXCLUSIVE: dwShare = 0; break; + case STGM_SHARE_DENY_NONE: + dwShare = FILE_SHARE_READ|FILE_SHARE_WRITE; + break; default: - dwShare = FILE_SHARE_READ|FILE_SHARE_WRITE; + return E_INVALIDARG; } - /* FIXME: Creation Flags, MSDN is fuzzy on the mapping... */ - if (dwMode == STGM_FAILIFTHERE) - dwCreate = bCreate ? CREATE_NEW : OPEN_EXISTING; - else if (dwMode & STGM_CREATE) + switch(STGM_CREATE_MODE(dwMode)) + { + case STGM_FAILIFTHERE: + dwCreate = OPEN_EXISTING; + break; + case STGM_CREATE: dwCreate = CREATE_ALWAYS; - else - dwCreate = OPEN_ALWAYS; + break; + default: + return E_INVALIDARG; + } /* Open HANDLE to file */ hFile = CreateFileW(lpszPath, dwAccess, dwShare, NULL, dwCreate, @@ -478,19 +498,12 @@ HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream) { - DWORD dwAttr; - TRACE("(%s,%ld,%p)\n", debugstr_w(lpszPath), dwMode, lppStream); if (!lpszPath || !lppStream) return E_INVALIDARG; - dwAttr = GetFileAttributesW(lpszPath); - if (dwAttr == INVALID_FILE_ATTRIBUTES) - dwAttr = 0; - - return SHCreateStreamOnFileEx(lpszPath, dwMode|STGM_WRITE, dwAttr, - TRUE, NULL, lppStream); + return SHCreateStreamOnFileEx(lpszPath, dwMode, 0, FALSE, NULL, lppStream); } /*********************************************************************** ** _____ Modified: trunk/reactos/lib/shlwapi/path.c --- trunk/reactos/lib/shlwapi/path.c 2005-08-03 21:18:24 UTC (rev 17032) +++ trunk/reactos/lib/shlwapi/path.c 2005-08-03 21:34:01 UTC (rev 17033) @@ -2979,7 +2979,7 @@ * * Internal helper for PathMakeSystemFolderW. */ -static BOOL WINAPI SHLWAPI_UseSystemForSystemFolders() +static BOOL WINAPI SHLWAPI_UseSystemForSystemFolders(void) { static BOOL bCheckedReg = FALSE; static BOOL bUseSystemForSystemFolders = FALSE; _____ Modified: trunk/reactos/lib/shlwapi/regstream.c --- trunk/reactos/lib/shlwapi/regstream.c 2005-08-03 21:18:24 UTC (rev 17032) +++ trunk/reactos/lib/shlwapi/regstream.c 2005-08-03 21:34:01 UTC (rev 17033) @@ -35,7 +35,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct -{ IStreamVtbl *lpVtbl; +{ + const IStreamVtbl *lpVtbl; DWORD ref; HKEY hKey; LPBYTE pbBuffer; @@ -255,7 +256,7 @@ return E_NOTIMPL; } -static struct IStreamVtbl rstvt = +static const IStreamVtbl rstvt = { IStream_fnQueryInterface, IStream_fnAddRef, @@ -305,7 +306,7 @@ return E_NOTIMPL; } -static struct IStreamVtbl DummyRegStreamVTable = +static const IStreamVtbl DummyRegStreamVTable = { IStream_fnQueryInterface, IStream_fnAddRefDummy, /* Overridden */ _____ Modified: trunk/reactos/lib/shlwapi/shlwapi.spec --- trunk/reactos/lib/shlwapi/shlwapi.spec 2005-08-03 21:18:24 UTC (rev 17032) +++ trunk/reactos/lib/shlwapi/shlwapi.spec 2005-08-03 21:34:01 UTC (rev 17033) @@ -547,6 +547,7 @@ 551 stub -noname IShellFolder_CompareIDs @ stdcall AssocCreate(long long long long ptr ptr) +@ stdcall AssocIsDangerous(long) @ stdcall AssocQueryKeyA(long long str ptr ptr) @ stdcall AssocQueryKeyW(long long wstr ptr ptr) @ stdcall AssocQueryStringA(long long ptr ptr str ptr) @@ -593,6 +594,8 @@ @ stdcall PathFindNextComponentW (wstr) @ stdcall PathFindOnPathA (str ptr) @ stdcall PathFindOnPathW (wstr ptr) +@ stdcall PathFindSuffixArrayA(str ptr long) +@ stdcall PathFindSuffixArrayW(wstr ptr long) @ stdcall PathGetArgsA (str) @ stdcall PathGetArgsW (wstr) @ stdcall PathGetCharTypeA(long) @@ -602,9 +605,15 @@ @ stdcall PathIsContentTypeA(str str) @ stdcall PathIsContentTypeW(wstr wstr) @ stdcall PathIsDirectoryA(str) +@ stdcall PathIsDirectoryEmptyA(str) +@ stdcall PathIsDirectoryEmptyW(wstr) @ stdcall PathIsDirectoryW(wstr) @ stdcall PathIsFileSpecA(str) @ stdcall PathIsFileSpecW(wstr) +@ stdcall PathIsLFNFileSpecA(str) +@ stdcall PathIsLFNFileSpecW(wstr) +@ stdcall PathIsNetworkPathA(str) +@ stdcall PathIsNetworkPathW(wstr) @ stdcall PathIsPrefixA(str str) @ stdcall PathIsPrefixW(wstr wstr) @ stdcall PathIsRelativeA (str) @@ -657,11 +666,22 @@ @ stdcall PathStripPathW(wstr) @ stdcall PathStripToRootA(str) @ stdcall PathStripToRootW(wstr) +@ stdcall PathUnExpandEnvStringsA(str ptr long) +@ stdcall PathUnExpandEnvStringsW(wstr ptr long) +@ stdcall PathUndecorateA(str) +@ stdcall PathUndecorateW(wstr) @ stdcall PathUnmakeSystemFolderA(str) @ stdcall PathUnmakeSystemFolderW(wstr) @ stdcall PathUnquoteSpacesA (str) @ stdcall PathUnquoteSpacesW (wstr) +@ stdcall SHAutoComplete(ptr long) +@ stdcall SHCopyKeyA(long str long long) +@ stdcall SHCopyKeyW(long wstr long long) @ stdcall SHCreateShellPalette(long) +@ stdcall SHCreateStreamOnFileA(str long ptr) +@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) +@ stdcall SHCreateStreamOnFileW(wstr long ptr) +@ stdcall SHCreateStreamWrapper(ptr ptr long ptr) @ stdcall SHDeleteEmptyKeyA(long ptr) @ stdcall SHDeleteEmptyKeyW(long ptr) @ stdcall SHDeleteKeyA(long str) @@ -675,13 +695,14 @@ @ stdcall SHEnumValueA(long long str ptr ptr ptr ptr) @ stdcall SHEnumValueW(long long wstr ptr ptr ptr ptr) @ stdcall SHGetInverseCMAP ( ptr long ) +@ stdcall SHGetThreadRef (ptr) @ stdcall SHGetValueA ( long str str ptr ptr ptr ) @ stdcall SHGetValueW ( long wstr wstr ptr ptr ptr ) @ stdcall SHIsLowMemoryMachine(long) -@ stdcall SHOpenRegStreamA(long str str long) -@ stdcall SHOpenRegStreamW(long wstr str long) @ stdcall SHOpenRegStream2A(long str str long) @ stdcall SHOpenRegStream2W(long wstr str long) +@ stdcall SHOpenRegStreamA(long str str long) +@ stdcall SHOpenRegStreamW(long wstr str long) @ stdcall SHQueryInfoKeyA(long ptr ptr ptr ptr) @ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) @@ -693,12 +714,15 @@ @ stdcall SHRegDeleteEmptyUSKeyW(long wstr long) @ stdcall SHRegDeleteUSValueA(long str long) @ stdcall SHRegDeleteUSValueW(long wstr long) +@ stdcall SHRegDuplicateHKey (long) @ stdcall SHRegEnumUSKeyA(long long str ptr long) @ stdcall SHRegEnumUSKeyW(long long wstr ptr long) @ stdcall SHRegEnumUSValueA(long long ptr ptr ptr ptr ptr long) @ stdcall SHRegEnumUSValueW(long long ptr ptr ptr ptr ptr long) @ stdcall SHRegGetBoolUSValueA(str str long long) @ stdcall SHRegGetBoolUSValueW(wstr wstr long long) +@ stdcall SHRegGetPathA(long str str ptr long) +@ stdcall SHRegGetPathW(long wstr wstr ptr long) @ stdcall SHRegGetUSValueA ( str str ptr ptr ptr long ptr long ) @ stdcall SHRegGetUSValueW ( wstr wstr ptr ptr ptr long ptr long ) @ stdcall SHRegOpenUSKeyA ( str long long long long ) @@ -707,12 +731,20 @@ @ stdcall SHRegQueryInfoUSKeyW ( long ptr ptr ptr ptr long ) @ stdcall SHRegQueryUSValueA ( long str ptr ptr ptr long ptr long ) @ stdcall SHRegQueryUSValueW ( long wstr ptr ptr ptr long ptr long ) +@ stdcall SHRegSetPathA(long str str str long) +@ stdcall SHRegSetPathW(long wstr wstr wstr long) @ stdcall SHRegSetUSValueA ( str str long ptr long long) @ stdcall SHRegSetUSValueW ( wstr wstr long ptr long long) @ stdcall SHRegWriteUSValueA (long str long ptr long long) @ stdcall SHRegWriteUSValueW (long str long ptr long long) +@ stdcall SHRegisterValidateTemplate(wstr long) +@ stdcall SHReleaseThreadRef() +@ stdcall SHSetThreadRef (ptr) @ stdcall SHSetValueA (long str str long ptr long) @ stdcall SHSetValueW (long wstr wstr long ptr long) +@ stdcall SHSkipJunction(ptr ptr) +@ stdcall SHStrDupA (str ptr) +@ stdcall SHStrDupW (wstr ptr) @ stdcall StrCSpnA (str str) @ stdcall StrCSpnIA (str str) @ stdcall StrCSpnIW (wstr wstr) @@ -725,6 +757,7 @@ @ stdcall StrChrIW (wstr long) @ stdcall StrChrW (wstr long) @ stdcall StrCmpIW (wstr wstr) +@ stdcall StrCmpLogicalW(wstr wstr) @ stdcall StrCmpNA (str str long) @ stdcall StrCmpNIA (str str long) @ stdcall StrCmpNIW (wstr wstr long) @@ -734,8 +767,11 @@ @ stdcall StrCpyW (ptr wstr) @ stdcall StrDupA (str) @ stdcall StrDupW (wstr) +@ stdcall StrFormatByteSize64A(long long ptr long) @ stdcall StrFormatByteSizeA(long ptr long) @ stdcall StrFormatByteSizeW(long long ptr long) +@ stdcall StrFormatKBSizeA(long long str long) +@ stdcall StrFormatKBSizeW(long long wstr long) @ stdcall StrFromTimeIntervalA(ptr long long long) @ stdcall StrFromTimeIntervalW(ptr long long long) @ stdcall StrIsIntlEqualA(long str str long) @@ -750,6 +786,11 @@ @ stdcall StrRChrW (wstr wstr long) @ stdcall StrRStrIA (str str str) @ stdcall StrRStrIW (wstr wstr wstr) +@ stdcall StrRetToBSTR(ptr ptr ptr) +@ stdcall StrRetToBufA(ptr ptr ptr long) +@ stdcall StrRetToBufW(ptr ptr ptr long) +@ stdcall StrRetToStrA(ptr ptr ptr) +@ stdcall StrRetToStrW(ptr ptr ptr) @ stdcall StrSpnA (str str) @ stdcall StrSpnW (wstr wstr) @ stdcall StrStrA(str str) @@ -788,52 +829,8 @@ @ stdcall UrlIsW(wstr long) @ stdcall UrlUnescapeA(str ptr ptr long) @ stdcall UrlUnescapeW(wstr ptr ptr long) +@ stdcall _SHGetInstanceExplorer(ptr) @ varargs wnsprintfA(ptr long str) @ varargs wnsprintfW(ptr long wstr) @ stdcall wvnsprintfA(ptr long str ptr) @ stdcall wvnsprintfW(ptr long wstr ptr) - - -# exported in later versions -@ stdcall AssocIsDangerous(long) -@ stdcall StrRetToBufA(ptr ptr ptr long) -@ stdcall StrRetToBufW(ptr ptr ptr long) -@ stdcall StrRetToBSTR(ptr ptr ptr) -@ stdcall StrRetToStrA(ptr ptr ptr) -@ stdcall StrRetToStrW(ptr ptr ptr) -@ stdcall SHRegGetPathA(long str str ptr long) -@ stdcall SHRegGetPathW(long wstr wstr ptr long) -@ stdcall PathIsDirectoryEmptyA(str) -@ stdcall PathIsDirectoryEmptyW(wstr) -@ stdcall PathIsNetworkPathA(str) -@ stdcall PathIsNetworkPathW(wstr) -@ stdcall PathIsLFNFileSpecA(str) -@ stdcall PathIsLFNFileSpecW(wstr) -@ stdcall PathFindSuffixArrayA(str ptr long) -@ stdcall PathFindSuffixArrayW(wstr ptr long) -@ stdcall _SHGetInstanceExplorer(ptr) -@ stdcall PathUndecorateA(str) -@ stdcall PathUndecorateW(wstr) -@ stdcall PathUnExpandEnvStringsA(str ptr long) -@ stdcall PathUnExpandEnvStringsW(wstr ptr long) -@ stdcall SHCopyKeyA(long str long long) -@ stdcall SHCopyKeyW(long wstr long long) -@ stdcall SHAutoComplete(ptr long) -@ stdcall SHCreateStreamOnFileA(str long ptr) -@ stdcall SHCreateStreamOnFileW(wstr long ptr) -@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) -@ stdcall SHCreateStreamWrapper(ptr ptr long ptr) -@ stdcall SHGetThreadRef (ptr) -@ stdcall SHRegDuplicateHKey (long) -@ stdcall SHRegSetPathA(long str str str long) -@ stdcall SHRegSetPathW(long wstr wstr wstr long) -@ stdcall SHRegisterValidateTemplate(wstr long) -@ stdcall SHSetThreadRef (ptr) -@ stdcall SHReleaseThreadRef() -@ stdcall SHSkipJunction(ptr ptr) -@ stdcall SHStrDupA (str ptr) -@ stdcall SHStrDupW (wstr ptr) -@ stdcall StrFormatByteSize64A(long long ptr long) -@ stdcall StrFormatKBSizeA(long long str long) -@ stdcall StrFormatKBSizeW(long long wstr long) -@ stdcall StrCmpLogicalW(wstr wstr)
19 years, 4 months
1
0
0
0
[navaraf] 17032: Deliver timers only to corresponding message queues.
by navaraf@svn.reactos.com
Deliver timers only to corresponding message queues. Modified: branches/win32k rewrite attempt/win32k/ntuser/timer.c _____ Modified: branches/win32k rewrite attempt/win32k/ntuser/timer.c --- branches/win32k rewrite attempt/win32k/ntuser/timer.c 2005-08-03 20:15:58 UTC (rev 17031) +++ branches/win32k rewrite attempt/win32k/ntuser/timer.c 2005-08-03 21:18:24 UTC (rev 17032) @@ -230,6 +230,8 @@ LIST_FOR_EACH_SAFE(EnumEntry, &gExpiredTimersList, Timer, TIMER_ENTRY, ListEntry) { if (Wnd && Timer->Wnd != Wnd) continue; + + if (Timer->Queue != Queue) continue; if (UserMessageFilter(Timer->Message, MsgFilterMin, MsgFilterMax)) {
19 years, 4 months
1
0
0
0
[weiden] 17031: implemented OffsetClipRgn()
by weiden@svn.reactos.com
implemented OffsetClipRgn() Modified: trunk/reactos/subsys/win32k/objects/cliprgn.c _____ Modified: trunk/reactos/subsys/win32k/objects/cliprgn.c --- trunk/reactos/subsys/win32k/objects/cliprgn.c 2005-08-03 20:10:32 UTC (rev 17030) +++ trunk/reactos/subsys/win32k/objects/cliprgn.c 2005-08-03 20:15:58 UTC (rev 17031) @@ -187,7 +187,7 @@ LPRECT rc) { int Ret; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; RECT Saferect; Ret = IntGdiGetClipBox(hDC, &Saferect); @@ -327,8 +327,28 @@ int XOffset, int YOffset) { - UNIMPLEMENTED; - return 0; + INT Result; + DC *dc; + + if(!(dc = DC_LockDc(hDC))) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return ERROR; + } + + if(dc->w.hClipRgn != NULL) + { + Result = NtGdiOffsetRgn(dc->w.hClipRgn, + XOffset, + YOffset); + } + else + { + Result = NULLREGION; + } + + DC_UnlockDc(dc); + return Result; } BOOL STDCALL NtGdiPtVisible(HDC hDC,
19 years, 4 months
1
0
0
0
[ekohl] 17030: - Add registry property constants.
by ekohl@svn.reactos.com
- Add registry property constants. - Finish CM_Set_DevNode_Registry_Property_ExW. Modified: trunk/reactos/include/wine/cfgmgr32.h Modified: trunk/reactos/lib/setupapi/cfgmgr.c Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c Modified: trunk/reactos/w32api/include/ddk/cfgmgr32.h _____ Modified: trunk/reactos/include/wine/cfgmgr32.h --- trunk/reactos/include/wine/cfgmgr32.h 2005-08-03 19:34:29 UTC (rev 17029) +++ trunk/reactos/include/wine/cfgmgr32.h 2005-08-03 20:10:32 UTC (rev 17030) @@ -95,7 +95,36 @@ #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS +/* Properties for CM_Get/Set_DevNode_Registry_Property[_Ex]A/W */ +#define CM_DRP_DEVICEDESC 0x00000001 +#define CM_DRP_HARDWAREID 0x00000002 +#define CM_DRP_COMPATIBLEIDS 0x00000003 +#define CM_DRP_UNUSED0 0x00000004 +#define CM_DRP_SERVICE 0x00000005 +#define CM_DRP_UNUSED1 0x00000006 +#define CM_DRP_UNUSED2 0x00000007 +#define CM_DRP_CLASS 0x00000008 +#define CM_DRP_CLASSGUID 0x00000009 +#define CM_DRP_DRIVER 0x0000000A +#define CM_DRP_CONFIGFLAGS 0x0000000B +#define CM_DRP_MFG 0x0000000C +#define CM_DRP_FRIENDLYNAME 0x0000000D +#define CM_DRP_LOCATION_INFORMATION 0x0000000E +#define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F +#define CM_DRP_CAPABILITIES 0x00000010 +#define CM_DRP_UI_NUMBER 0x00000011 +#define CM_DRP_UPPERFILTERS 0x00000012 +#define CM_DRP_LOWERFILTERS 0x00000013 +#define CM_DRP_BUSTYPEGUID 0x00000014 +#define CM_DRP_LEGACYBUSTYPE 0x00000015 +#define CM_DRP_BUSNUMBER 0x00000016 +#define CM_DRP_ENUMERATOR_NAME 0x00000017 +#define CM_DRP_MIN 0x00000001 +#define CM_DRP_MAX 0x00000017 + + + CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE ); CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE ); #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine) _____ Modified: trunk/reactos/lib/setupapi/cfgmgr.c --- trunk/reactos/lib/setupapi/cfgmgr.c 2005-08-03 19:34:29 UTC (rev 17029) +++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-08-03 20:10:32 UTC (rev 17030) @@ -440,7 +440,7 @@ if (dnDevInst == 0) return CR_INVALID_DEVNODE; - if (ulProperty < 1 /* CM_DRP_MIN */ || ulProperty > 0x17 /* CM_DRP_MAX */) + if (ulProperty < CM_DRP_MIN || ulProperty > CM_DRP_MAX) return CR_INVALID_PROPERTY; /* pulRegDataType is optional */ @@ -1356,7 +1356,7 @@ if (dnDevInst == 0) return CR_INVALID_DEVNODE; - if (ulProperty < 1 /* CM_DRP_MIN */ || ulProperty > 0x17 /* CM_DRP_MAX */) + if (ulProperty < CM_DRP_MIN || ulProperty > CM_DRP_MAX) return CR_INVALID_PROPERTY; if (Buffer != NULL && ulLength == 0) @@ -1385,8 +1385,64 @@ if (lpDevInst == NULL) return CR_INVALID_DEVNODE; - ulType = REG_SZ; /* FIXME */ + switch (ulProperty) + { + case CM_DRP_DEVICEDESC: + ulType = REG_SZ; + break; + case CM_DRP_HARDWAREID: + ulType = REG_MULTI_SZ; + break; + + case CM_DRP_COMPATIBLEIDS: + ulType = REG_MULTI_SZ; + break; + + case CM_DRP_SERVICE: + ulType = REG_SZ; + break; + + case CM_DRP_CLASS: + ulType = REG_SZ; + break; + + case CM_DRP_CLASSGUID: + ulType = REG_SZ; + break; + + case CM_DRP_DRIVER: + ulType = REG_SZ; + break; + + case CM_DRP_CONFIGFLAGS: + ulType = REG_DWORD; + break; + + case CM_DRP_MFG: + ulType = REG_SZ; + break; + + case CM_DRP_FRIENDLYNAME: + ulType = REG_SZ; + break; + + case CM_DRP_LOCATION_INFORMATION: + ulType = REG_SZ; + break; + + case CM_DRP_UPPERFILTERS: + ulType = REG_MULTI_SZ; + break; + + case CM_DRP_LOWERFILTERS: + ulType = REG_MULTI_SZ; + break; + + default: + return CR_INVALID_PROPERTY; + } + return PNP_SetDeviceRegProp(BindingHandle, lpDevInst, ulProperty, _____ Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c --- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-08-03 19:34:29 UTC (rev 17029) +++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-08-03 20:10:32 UTC (rev 17030) @@ -345,20 +345,104 @@ unsigned long Flags) { CONFIGRET ret = CR_SUCCESS; -// ULONG Data; + LPWSTR lpValueName = NULL; + HKEY hKey = 0; - DPRINT1("PNP_SetDeviceRegProp() called\n"); + DPRINT("PNP_SetDeviceRegProp() called\n"); - DPRINT1("DeviceId: %S\n", DeviceId); + DPRINT("DeviceId: %S\n", DeviceId); + DPRINT("Property: %lu\n", Property); + DPRINT("DataType: %lu\n", DataType); + DPRINT("Length: %lu\n", Length); - DPRINT1("Property: %lu\n", Property); - DPRINT1("DataType: %lu\n", DataType); - DPRINT1("Length: %lu\n", Length); + switch (Property) + { + case CM_DRP_DEVICEDESC: + lpValueName = L"DeviceDesc"; + break; - DPRINT1("Data: %lx\n", *((PULONG)Buffer)); + case CM_DRP_HARDWAREID: + lpValueName = L"HardwareID"; + break; - DPRINT1("PNP_SetDeviceRegProp() done (returns %lx)\n", ret); + case CM_DRP_COMPATIBLEIDS: + lpValueName = L"CompatibleIDs"; + break; + case CM_DRP_SERVICE: + lpValueName = L"Service"; + break; + + case CM_DRP_CLASS: + lpValueName = L"Class"; + break; + + case CM_DRP_CLASSGUID: + lpValueName = L"ClassGUID"; + break; + + case CM_DRP_DRIVER: + lpValueName = L"Driver"; + break; + + case CM_DRP_CONFIGFLAGS: + lpValueName = L"ConfigFlags"; + break; + + case CM_DRP_MFG: + lpValueName = L"Mfg"; + break; + + case CM_DRP_FRIENDLYNAME: + lpValueName = L"FriendlyName"; + break; + + case CM_DRP_LOCATION_INFORMATION: + lpValueName = L"LocationInformation"; + break; + + case CM_DRP_UPPERFILTERS: + lpValueName = L"UpperFilters"; + break; + + case CM_DRP_LOWERFILTERS: + lpValueName = L"LowerFilters"; + break; + + default: + return CR_INVALID_PROPERTY; + } + + DPRINT("Value name: %S\n", lpValueName); + + if (RegOpenKeyExW(hEnumKey, + DeviceId, + 0, + KEY_ALL_ACCESS, + &hKey)) + return CR_INVALID_DEVNODE; + + if (Length == 0) + { + if (RegDeleteValueW(hKey, + lpValueName)) + ret = CR_REGISTRY_ERROR; + } + else + { + if (RegSetValueExW(hKey, + lpValueName, + 0, + DataType, + Buffer, + Length)) + ret = CR_REGISTRY_ERROR; + } + + RegCloseKey(hKey); + + DPRINT("PNP_SetDeviceRegProp() done (returns %lx)\n", ret); + return ret; } @@ -374,10 +458,106 @@ DWORD Flags) { CONFIGRET ret = CR_SUCCESS; + LPWSTR lpValueName = NULL; ULONG Data; DPRINT1("PNP_GetDeviceRegProp() called\n"); + switch (Property) + { + case CM_DRP_DEVICEDESC: + lpValueName = L"DeviceDesc"; + break; + + case CM_DRP_HARDWAREID: + lpValueName = L"HardwareID"; + break; + + case CM_DRP_COMPATIBLEIDS: + lpValueName = L"CompatibleIDs"; + break; + + case CM_DRP_SERVICE: + lpValueName = L"Service"; + break; + + case CM_DRP_CLASS: + lpValueName = L"Class"; + break; + + case CM_DRP_CLASSGUID: + lpValueName = L"ClassGUID"; + break; + + case CM_DRP_DRIVER: + lpValueName = L"Driver"; + break; + + case CM_DRP_CONFIGFLAGS: + lpValueName = L"ConfigFlags"; + break; + + case CM_DRP_MFG: + lpValueName = L"Mfg"; + break; + + case CM_DRP_FRIENDLYNAME: + lpValueName = L"FriendlyName"; + break; + + case CM_DRP_LOCATION_INFORMATION: + lpValueName = L"LocationInformation"; + break; + + case CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME: + lpValueName = NULL; + break; + + case CM_DRP_CAPABILITIES: + lpValueName = L"Capabilities"; + break; + + case CM_DRP_UI_NUMBER: + break; + + case CM_DRP_UPPERFILTERS: + lpValueName = L"UpperFilters"; + break; + + case CM_DRP_LOWERFILTERS: + lpValueName = L"LowerFilters"; + break; + + case CM_DRP_BUSTYPEGUID: + break; + + case CM_DRP_LEGACYBUSTYPE: + break; + + case CM_DRP_BUSNUMBER: + break; + + case CM_DRP_ENUMERATOR_NAME: + break; + + default: + return CR_INVALID_PROPERTY; + } + + DPRINT1("Value name: %S\n", lpValueName); + + if (lpValueName) + { + /* Retrieve information from the Registry */ + + } + else + { + /* Retrieve information from the Device Node */ + + } + + Data = 0xbaadf00d; memcpy(Buffer, &Data, sizeof(ULONG)); *Length = sizeof(ULONG); _____ Modified: trunk/reactos/w32api/include/ddk/cfgmgr32.h --- trunk/reactos/w32api/include/ddk/cfgmgr32.h 2005-08-03 19:34:29 UTC (rev 17029) +++ trunk/reactos/w32api/include/ddk/cfgmgr32.h 2005-08-03 20:10:32 UTC (rev 17030) @@ -197,7 +197,34 @@ #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001 #define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001 +#define CM_DRP_DEVICEDESC 0x00000001 +#define CM_DRP_HARDWAREID 0x00000002 +#define CM_DRP_COMPATIBLEIDS 0x00000003 +#define CM_DRP_UNUSED0 0x00000004 +#define CM_DRP_SERVICE 0x00000005 +#define CM_DRP_UNUSED1 0x00000006 +#define CM_DRP_UNUSED2 0x00000007 +#define CM_DRP_CLASS 0x00000008 +#define CM_DRP_CLASSGUID 0x00000009 +#define CM_DRP_DRIVER 0x0000000A +#define CM_DRP_CONFIGFLAGS 0x0000000B +#define CM_DRP_MFG 0x0000000C +#define CM_DRP_FRIENDLYNAME 0x0000000D +#define CM_DRP_LOCATION_INFORMATION 0x0000000E +#define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F +#define CM_DRP_CAPABILITIES 0x00000010 +#define CM_DRP_UI_NUMBER 0x00000011 +#define CM_DRP_UPPERFILTERS 0x00000012 +#define CM_DRP_LOWERFILTERS 0x00000013 +#define CM_DRP_BUSTYPEGUID 0x00000014 +#define CM_DRP_LEGACYBUSTYPE 0x00000015 +#define CM_DRP_BUSNUMBER 0x00000016 +#define CM_DRP_ENUMERATOR_NAME 0x00000017 +#define CM_DRP_MIN 0x00000001 +#define CM_DRP_MAX 0x00000017 + + typedef struct BusNumber_Des_s { DWORD BUSD_Count; DWORD BUSD_Type;
19 years, 4 months
1
0
0
0
[navaraf] 17029: Use valid timer ID for SetTimer.
by navaraf@svn.reactos.com
Use valid timer ID for SetTimer. Modified: trunk/reactos/lib/syssetup/install.c Modified: trunk/reactos/lib/syssetup/wizard.c _____ Modified: trunk/reactos/lib/syssetup/install.c --- trunk/reactos/lib/syssetup/install.c 2005-08-03 19:28:51 UTC (rev 17028) +++ trunk/reactos/lib/syssetup/install.c 2005-08-03 19:34:29 UTC (rev 17029) @@ -241,7 +241,7 @@ case WM_INITDIALOG: SendDlgItemMessage(hWnd, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300)); - SetTimer(hWnd, 0, 50, NULL); + SetTimer(hWnd, 1, 50, NULL); return TRUE; case WM_TIMER: _____ Modified: trunk/reactos/lib/syssetup/wizard.c --- trunk/reactos/lib/syssetup/wizard.c 2005-08-03 19:28:51 UTC (rev 17028) +++ trunk/reactos/lib/syssetup/wizard.c 2005-08-03 19:34:29 UTC (rev 17029) @@ -1301,7 +1301,7 @@ SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300)); - SetTimer(hwndDlg, 0, 50, NULL); + SetTimer(hwndDlg, 1, 50, NULL); break; case PSN_WIZNEXT:
19 years, 4 months
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
67
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
Results per page:
10
25
50
100
200