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
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
January 2005
----- 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
28 participants
703 discussions
Start a n
N
ew thread
[gvg] 12974: Wine-20050111 vendor drop
by gvg@svn.reactos.com
Wine-20050111 vendor drop Added: vendor/wine/dlls/oleaut32/Wine-20050111/ Modified: vendor/wine/dlls/oleaut32/Wine-20050111/oaidl_p.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/ole2disp.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/oleaut32.rc Added: vendor/wine/dlls/oleaut32/Wine-20050111/oleaut32_Ru.rc Modified: vendor/wine/dlls/oleaut32/Wine-20050111/olefont.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/olepicture.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/safearray.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/tmarshal.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/typelib.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/typelib16.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/typelib2.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/varformat.c Modified: vendor/wine/dlls/oleaut32/Wine-20050111/variant.c Modified: vendor/wine/dlls/oleaut32/current/oaidl_p.c Modified: vendor/wine/dlls/oleaut32/current/ole2disp.c Modified: vendor/wine/dlls/oleaut32/current/oleaut32.rc Added: vendor/wine/dlls/oleaut32/current/oleaut32_Ru.rc Modified: vendor/wine/dlls/oleaut32/current/olefont.c Modified: vendor/wine/dlls/oleaut32/current/olepicture.c Modified: vendor/wine/dlls/oleaut32/current/safearray.c Modified: vendor/wine/dlls/oleaut32/current/tmarshal.c Modified: vendor/wine/dlls/oleaut32/current/typelib.c Modified: vendor/wine/dlls/oleaut32/current/typelib16.c Modified: vendor/wine/dlls/oleaut32/current/typelib2.c Modified: vendor/wine/dlls/oleaut32/current/varformat.c Modified: vendor/wine/dlls/oleaut32/current/variant.c _____ Copied: vendor/wine/dlls/oleaut32/Wine-20050111 (from rev 12927, vendor/wine/dlls/oleaut32/current) _____ Modified: vendor/wine/dlls/oleaut32/Wine-20050111/oaidl_p.c --- vendor/wine/dlls/oleaut32/current/oaidl_p.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/oleaut32/Wine-20050111/oaidl_p.c 2005-01-12 19:24:24 UTC (rev 12974) @@ -57,8 +57,8 @@ } MIDL_PROC_FORMAT_STRING; -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; +static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; +static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; /* Standard interface: __MIDL_itf_oaidl_0000, ver. 0.0, @@ -77,7 +77,7 @@ GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} } */ -extern const MIDL_STUB_DESC Object_StubDesc; +static const MIDL_STUB_DESC Object_StubDesc; HRESULT STDMETHODCALLTYPE IDispatch_GetTypeInfoCount_Proxy( @@ -116,9 +116,11 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - *pctinfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pctinfo = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -157,7 +159,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( UINT __RPC_FAR * )pctinfo = 0; + pctinfo = 0; RpcTryFinally { pctinfo = &_M0; @@ -169,9 +171,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pctinfo; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pctinfo; + _StubMsg.Buffer += sizeof(UINT); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -224,9 +228,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = iTInfo; + *( UINT __RPC_FAR * )_StubMsg.Buffer = iTInfo; + _StubMsg.Buffer += sizeof(UINT); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); NdrProxySendReceive(This, &_StubMsg); @@ -239,7 +245,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -280,15 +287,17 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; + ppTInfo = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] ); - iTInfo = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + iTInfo = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); ppTInfo = &_M1; _M1 = 0; @@ -315,7 +324,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -396,9 +406,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[54] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cNames; + _StubMsg.Buffer += sizeof(UINT); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); NdrProxySendReceive(This, &_StubMsg); @@ -410,7 +422,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88], (unsigned char)0 ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -454,8 +467,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR __RPC_FAR * )rgszNames = 0; - ( DISPID __RPC_FAR * )rgDispId = 0; + rgszNames = 0; + rgDispId = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -472,9 +485,12 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - cNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); + - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); rgDispId = NdrAllocate(&_StubMsg,cNames * 4); @@ -505,7 +521,8 @@ (unsigned char __RPC_FAR *)rgDispId, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[88] ); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -626,22 +643,26 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] ); NdrProxyGetBuffer(This, &_StubMsg); - *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++ = dispIdMember; + *( DISPID __RPC_FAR * )_StubMsg.Buffer = dispIdMember; + _StubMsg.Buffer += sizeof(DISPID); NdrSimpleStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg, (unsigned char __RPC_FAR *)riid, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38] ); - *(( LCID __RPC_FAR * )_StubMsg.Buffer)++ = lcid; + *( LCID __RPC_FAR * )_StubMsg.Buffer = lcid; + _StubMsg.Buffer += sizeof(LCID); - *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++ = dwFlags; + *( DWORD __RPC_FAR * )_StubMsg.Buffer = dwFlags; + _StubMsg.Buffer += sizeof(DWORD); NdrComplexStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg, (unsigned char __RPC_FAR *)pDispParams, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1080] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cVarRef; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cVarRef; + _StubMsg.Buffer += sizeof(UINT); _StubMsg.MaxCount = cVarRef; @@ -671,7 +692,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pArgErr = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pArgErr = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); NdrComplexArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRef, @@ -679,7 +701,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -744,27 +767,30 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( DISPPARAMS __RPC_FAR * )pDispParams = 0; - ( VARIANT __RPC_FAR * )pVarResult = 0; - ( EXCEPINFO __RPC_FAR * )pExcepInfo = 0; - ( UINT __RPC_FAR * )pArgErr = 0; - ( UINT __RPC_FAR * )rgVarRefIdx = 0; - ( VARIANTARG __RPC_FAR * )rgVarRef = 0; + pDispParams = 0; + pVarResult = 0; + pExcepInfo = 0; + pArgErr = 0; + rgVarRefIdx = 0; + rgVarRef = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[34] ); - dispIdMember = *(( DISPID __RPC_FAR * )_StubMsg.Buffer)++; + dispIdMember = *( DISPID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DISPID); NdrSimpleStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&riid, (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[38], (unsigned char)0 ); - lcid = *(( LCID __RPC_FAR * )_StubMsg.Buffer)++; + lcid = *( LCID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(LCID); - dwFlags = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++; + dwFlags = *( DWORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DWORD); NdrComplexStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&pDispParams, @@ -772,7 +798,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - cVarRef = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cVarRef = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); NdrConformantArrayUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&rgVarRefIdx, @@ -838,7 +865,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1138] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pArgErr; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pArgErr; + _StubMsg.Buffer += sizeof(UINT); _StubMsg.MaxCount = cVarRef; @@ -847,7 +875,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1184] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -963,7 +992,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); @@ -976,9 +1006,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pCeltFetched = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + *pCeltFetched = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1027,14 +1059,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( VARIANT __RPC_FAR * )rgVar = 0; - ( ULONG __RPC_FAR * )pCeltFetched = 0; + rgVar = 0; + pCeltFetched = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[72] ); - celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); rgVar = NdrAllocate(&_StubMsg,celt * 16); pCeltFetched = &_M11; @@ -1071,9 +1104,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1206] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = *pCeltFetched; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = *pCeltFetched; + _StubMsg.Buffer += sizeof(ULONG); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1121,14 +1156,16 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = celt; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = celt; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1167,9 +1204,9 @@ if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[84] ); - celt = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + celt = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - *_pdwStubPhase = STUB_CALL_SERVER; _RetVal = (((IEnumVARIANT*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Skip((IEnumVARIANT *) ((CStdStubBuffer *)This)->pvServerObject,celt); @@ -1177,7 +1214,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1221,8 +1259,9 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; - + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); + } RpcFinally { @@ -1264,7 +1303,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1326,7 +1366,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1365,7 +1406,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( IEnumVARIANT __RPC_FAR *__RPC_FAR * )ppEnum = 0; + ppEnum = 0; RpcTryFinally { ppEnum = &_M12; @@ -1389,7 +1430,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1224] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1548,9 +1590,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal; + _StubMsg.Buffer += sizeof(ULONG); - *(( WORD __RPC_FAR * )_StubMsg.Buffer)++ = wFlags; + *( WORD __RPC_FAR * )_StubMsg.Buffer = wFlags; + _StubMsg.Buffer += sizeof(WORD); NdrProxySendReceive(This, &_StubMsg); @@ -1588,7 +1632,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1660,13 +1705,13 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR )szName = 0; - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; - ( DESCKIND __RPC_FAR * )pDescKind = 0; - ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0; - ( LPVARDESC __RPC_FAR * )ppVarDesc = 0; - ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTypeComp = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + szName = 0; + ppTInfo = 0; + pDescKind = 0; + ppFuncDesc = 0; + ppVarDesc = 0; + ppTypeComp = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -1678,9 +1723,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); - wFlags = *(( WORD __RPC_FAR * )_StubMsg.Buffer)++; + wFlags = *( WORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(WORD); ppTInfo = &_M15; _M15 = 0; @@ -1759,7 +1806,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1568] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1845,7 +1893,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1248] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = lHashVal; + *( ULONG __RPC_FAR * )_StubMsg.Buffer = lHashVal; + _StubMsg.Buffer += sizeof(ULONG); NdrProxySendReceive(This, &_StubMsg); @@ -1858,7 +1907,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -1899,8 +1949,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPOLESTR )szName = 0; - ( ITypeInfo __RPC_FAR *__RPC_FAR * )ppTInfo = 0; + szName = 0; + ppTInfo = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) @@ -1912,7 +1962,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - lHashVal = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++; + lHashVal = *( ULONG __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(ULONG); ppTInfo = &_M23; _M23 = 0; @@ -1941,7 +1992,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[6] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2058,7 +2110,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2103,8 +2156,8 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPTYPEATTR __RPC_FAR * )ppTypeAttr = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppTypeAttr = 0; + pDummy = 0; RpcTryFinally { ppTypeAttr = &_M24; @@ -2142,7 +2195,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1644] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2212,7 +2266,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2251,7 +2306,7 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( ITypeComp __RPC_FAR *__RPC_FAR * )ppTComp = 0; + ppTComp = 0; RpcTryFinally { ppTComp = &_M26; @@ -2275,7 +2330,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1540] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2340,7 +2396,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2358,7 +2415,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2404,14 +2462,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPFUNCDESC __RPC_FAR * )ppFuncDesc = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppFuncDesc = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[158] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); ppFuncDesc = &_M27; _M27 = 0; @@ -2449,7 +2508,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1660] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2518,7 +2578,8 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2536,7 +2597,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2582,14 +2644,15 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( LPVARDESC __RPC_FAR * )ppVarDesc = 0; - ( CLEANLOCALSTORAGE __RPC_FAR * )pDummy = 0; + ppVarDesc = 0; + pDummy = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[170] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); ppVarDesc = &_M29; _M29 = 0; @@ -2627,7 +2690,8 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1676] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2693,9 +2757,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++ = memid; + *( MEMBERID __RPC_FAR * )_StubMsg.Buffer = memid; + _StubMsg.Buffer += sizeof(MEMBERID); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = cMaxNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = cMaxNames; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); @@ -2708,9 +2774,11 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pcNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + *pcNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2760,16 +2828,18 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( BSTR __RPC_FAR * )rgBstrNames = 0; - ( UINT __RPC_FAR * )pcNames = 0; + rgBstrNames = 0; + pcNames = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[182] ); - memid = *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++; + memid = *( MEMBERID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(MEMBERID); - cMaxNames = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + cMaxNames = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); rgBstrNames = NdrAllocate(&_StubMsg,cMaxNames * 4); pcNames = &_M34; @@ -2807,9 +2877,11 @@ (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[1690] ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = *pcNames; + *( UINT __RPC_FAR * )_StubMsg.Buffer = *pcNames; + _StubMsg.Buffer += sizeof(UINT); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2862,16 +2934,19 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - *pRefType = *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++; + *pRefType = *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HREFTYPE); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2911,13 +2986,14 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( HREFTYPE __RPC_FAR * )pRefType = 0; + pRefType = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); pRefType = &_M35; @@ -2931,9 +3007,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HREFTYPE __RPC_FAR * )_StubMsg.Buffer)++ = *pRefType; + *( HREFTYPE __RPC_FAR * )_StubMsg.Buffer = *pRefType; + _StubMsg.Buffer += sizeof(HREFTYPE); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -2978,16 +3056,19 @@ _StubMsg.BufferLength = 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( UINT __RPC_FAR * )_StubMsg.Buffer)++ = index; + *( UINT __RPC_FAR * )_StubMsg.Buffer = index; + _StubMsg.Buffer += sizeof(UINT); NdrProxySendReceive(This, &_StubMsg); if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - *pImplTypeFlags = *(( INT __RPC_FAR * )_StubMsg.Buffer)++; + *pImplTypeFlags = *( INT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(INT); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3027,13 +3108,14 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( INT __RPC_FAR * )pImplTypeFlags = 0; + pImplTypeFlags = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[196] ); - index = *(( UINT __RPC_FAR * )_StubMsg.Buffer)++; + index = *( UINT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(UINT); pImplTypeFlags = &_M36; @@ -3047,9 +3129,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( INT __RPC_FAR * )_StubMsg.Buffer)++ = *pImplTypeFlags; + *( INT __RPC_FAR * )_StubMsg.Buffer = *pImplTypeFlags; + _StubMsg.Buffer += sizeof(INT); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3093,7 +3177,8 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3138,7 +3223,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3182,7 +3268,8 @@ if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[88] ); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3227,7 +3314,8 @@ _StubMsg.BufferLength = 4U; NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg); - *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal; + *( HRESULT __RPC_FAR * )_StubMsg.Buffer = _RetVal; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3309,9 +3397,11 @@ _StubMsg.BufferLength = 4U + 4U; NdrProxyGetBuffer(This, &_StubMsg); - *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++ = memid; + *( MEMBERID __RPC_FAR * )_StubMsg.Buffer = memid; + _StubMsg.Buffer += sizeof(MEMBERID); - *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++ = refPtrFlags; + *( DWORD __RPC_FAR * )_StubMsg.Buffer = refPtrFlags; + _StubMsg.Buffer += sizeof(DWORD); NdrProxySendReceive(This, &_StubMsg); @@ -3329,7 +3419,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - *pdwHelpContext = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++; + *pdwHelpContext = *( DWORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DWORD); NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR * __RPC_FAR *)&pBstrHelpFile, @@ -3337,7 +3428,8 @@ (unsigned char)0 ); _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3); - _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++; + _RetVal = *( HRESULT __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(HRESULT); } RpcFinally @@ -3396,18 +3488,20 @@ &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer); - ( BSTR __RPC_FAR * )pBstrName = 0; - ( BSTR __RPC_FAR * )pBstrDocString = 0; - ( DWORD __RPC_FAR * )pdwHelpContext = 0; - ( BSTR __RPC_FAR * )pBstrHelpFile = 0; + pBstrName = 0; + pBstrDocString = 0; + pdwHelpContext = 0; + pBstrHelpFile = 0; RpcTryFinally { if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[204] ); - memid = *(( MEMBERID __RPC_FAR * )_StubMsg.Buffer)++; + memid = *( MEMBERID __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(MEMBERID); - refPtrFlags = *(( DWORD __RPC_FAR * )_StubMsg.Buffer)++; + refPtrFlags = *( DWORD __RPC_FAR * )_StubMsg.Buffer; + _StubMsg.Buffer += sizeof(DWORD); pBstrName = &_M37; MIDL_memset( @@ -3465,14 +3559,16 @@ [truncated at 1000 lines; 7289 more skipped]
19 years, 10 months
1
0
0
0
[blight] 12973: Add possibility to make KDB break on module-loads. Fix handling of breakpoints in usermode with KDB. Set ExceptionRecord->ExceptionFlags to 0 for breakpoints/singlesteps and noncontinuable for everything else. Fix WriteProcessMemory.
by blight@svn.reactos.com
Add possibility to make KDB break on module-loads. Fix handling of breakpoints in usermode with KDB. Set ExceptionRecord->ExceptionFlags to 0 for breakpoints/singlesteps and noncontinuable for everything else. Fix WriteProcessMemory. Modified: trunk/reactos/ntoskrnl/dbg/kdb.c Modified: trunk/reactos/ntoskrnl/dbg/kdb.h Modified: trunk/reactos/ntoskrnl/dbg/kdb_symbols.c Modified: trunk/reactos/ntoskrnl/ke/catch.c Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c Modified: trunk/reactos/ntoskrnl/mm/virtual.c _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb.c --- trunk/reactos/ntoskrnl/dbg/kdb.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/dbg/kdb.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -60,8 +60,9 @@ static BOOLEAN KdbHandleUmode = FALSE; static BOOLEAN KdbHandleHandled = FALSE; +static BOOLEAN KdbBreakOnModuleLoad = FALSE; + static BOOLEAN KdbIgnoreNextSingleStep = FALSE; - static ULONG KdbLastSingleStepFrom = 0xFFFFFFFF; static BOOLEAN KdbEnteredOnSingleStep = FALSE; @@ -75,6 +76,8 @@ ULONG DbgStopCondition(ULONG Aargc, PCH Argv[], PKTRAP_FRAME Tf); ULONG +DbgModuleLoadedAction(ULONG Aargc, PCH Argv[], PKTRAP_FRAME Tf); +ULONG DbgEchoToggle(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf); ULONG DbgRegsCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf); @@ -129,7 +132,8 @@ {"cont", "cont", "Exit the debugger", DbgContCommand}, {"echo", "echo", "Toggle serial echo", DbgEchoToggle}, {"condition", "condition [all|umode|kmode]", "Kdbg enter condition", DbgStopCondition}, - + {"module-loaded", "module-loaded [break|continue]", "Module-loaded action", DbgModuleLoadedAction}, + {"regs", "regs", "Display general purpose registers", DbgRegsCommand}, {"dregs", "dregs", "Display debug registers", DbgDRegsCommand}, {"cregs", "cregs", "Display control registers", DbgCRegsCommand}, @@ -909,9 +913,8 @@ { PVOID Address; - DbgPrint("Frames: "); - while (Frame != NULL && (ULONG_PTR)Frame >= StackLimit && - (ULONG_PTR)Frame < StackBase) /* FIXME: why limit this to StackBase/StackLimit? */ + DbgPrint("Frames:\n"); + while (Frame != NULL) { if (!NT_SUCCESS(KdbpSafeReadMemory(&Address, Frame + 1, sizeof (Address)))) { @@ -1353,6 +1356,32 @@ } ULONG +DbgModuleLoadedAction(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf) +{ + if (Argc == 1) + { + if (KdbBreakOnModuleLoad) + DbgPrint("Current setting: break\n"); + else + DbgPrint("Current setting: continue\n"); + } + else if (!strcmp(Argv[1], "break")) + { + KdbBreakOnModuleLoad = TRUE; + } + else if (!strcmp(Argv[1], "continue")) + { + KdbBreakOnModuleLoad = FALSE; + } + else + { + DbgPrint("Unknown setting: %s\n", Argv[1]); + } + + return(TRUE); +} + +ULONG DbgEchoToggle(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf) { KbdEchoOn = !KbdEchoOn; @@ -1656,23 +1685,24 @@ LONG BreakPointNr; ULONG ExpNr = (ULONG)TrapFrame->DebugArgMark; + /* Always handle beakpoints */ if (ExpNr != 1 && ExpNr != 3) { DbgPrint(":KDBG:Entered:%s:%s\n", PreviousMode==KernelMode ? "kmode" : "umode", AlwaysHandle ? "always" : "if-unhandled"); - } - - /* If we aren't handling umode exceptions then return */ - if (PreviousMode == UserMode && !KdbHandleUmode && !AlwaysHandle) - { - return kdContinue; - } - /* If the exception would be unhandled (and we care) then handle it */ - if (PreviousMode == KernelMode && !KdbHandleHandled && !AlwaysHandle) - { - return kdContinue; + /* If we aren't handling umode exceptions then return */ + if (PreviousMode == UserMode && !KdbHandleUmode && !AlwaysHandle) + { + return kdHandleException; + } + + /* If the exception would be unhandled (and we care) then handle it */ + if (PreviousMode == KernelMode && !KdbHandleHandled && !AlwaysHandle) + { + return kdHandleException; + } } /* Exception inside the debugger? Game over. */ @@ -1772,3 +1802,14 @@ return(kdContinue); } } + +VOID +KdbModuleLoaded(IN PUNICODE_STRING Name) +{ + if (!KdbBreakOnModuleLoad) + return; + + DbgPrint("Module %wZ loaded.\n", Name); + DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C); +} + _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb.h --- trunk/reactos/ntoskrnl/dbg/kdb.h 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/dbg/kdb.h 2005-01-12 19:04:06 UTC (rev 12973) @@ -72,6 +72,10 @@ VOID KdbProfileInterrupt(ULONG_PTR Eip); +VOID +KdbModuleLoaded(IN PUNICODE_STRING Name); + + struct KDB_BPINFO { DWORD Addr; DWORD Type; _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb_symbols.c --- trunk/reactos/ntoskrnl/dbg/kdb_symbols.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/dbg/kdb_symbols.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -816,6 +816,9 @@ PSYMBOLFILE_HEADER SymbolFileHeader; PIMAGE_SYMBOL_INFO_CACHE CachedSymbolFile; + /* Allow KDB to break on module load */ + KdbModuleLoaded(FileName); + /* Get the path to the symbol store */ wcscpy(TmpFileName, L"\\SystemRoot\\symbols\\"); _____ Modified: trunk/reactos/ntoskrnl/ke/catch.c --- trunk/reactos/ntoskrnl/ke/catch.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/ke/catch.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -50,6 +50,7 @@ DPRINT("KiDispatchException() called\n"); + /* PCR->KeExceptionDispatchCount++; */ if (Context == NULL) @@ -95,8 +96,12 @@ NTSTATUS StatusOfCopy; #ifdef KDBG - KdbEnterDebuggerException (ExceptionRecord, PreviousMode, - Context, Tf, FALSE); + Action = KdbEnterDebuggerException (ExceptionRecord, PreviousMode, + Context, Tf, FALSE); + if (Action == kdContinue) + { + return; + } #endif /* FIXME: Forward exception to user mode debugger */ @@ -141,8 +146,12 @@ /* FIXME: Forward the exception to the process exception port */ #ifdef KDBG - KdbEnterDebuggerException (ExceptionRecord, PreviousMode, - Context, Tf, TRUE); + Action = KdbEnterDebuggerException (ExceptionRecord, PreviousMode, + Context, Tf, TRUE); + if (Action == kdContinue) + { + return; + } #endif /* Terminate the offending thread */ @@ -153,8 +162,12 @@ { /* PreviousMode == KernelMode */ #ifdef KDBG - KdbEnterDebuggerException (ExceptionRecord, PreviousMode, - Context, Tf, FALSE); + Action = KdbEnterDebuggerException (ExceptionRecord, PreviousMode, + Context, Tf, FALSE); + if (Action == kdContinue) + { + return; + } #endif Value = RtlpDispatchException (ExceptionRecord, Context); _____ Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c --- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -190,9 +190,9 @@ Er.NumberParameters = 0; } - Er.ExceptionFlags = ((NTSTATUS) STATUS_SINGLE_STEP == (NTSTATUS) Er.ExceptionCode - || (NTSTATUS) STATUS_BREAKPOINT == (NTSTATUS) Er.ExceptionCode) ? - EXCEPTION_NONCONTINUABLE : 0; + Er.ExceptionFlags = (STATUS_SINGLE_STEP == Er.ExceptionCode || + STATUS_BREAKPOINT == Er.ExceptionCode) ? + 0 : EXCEPTION_NONCONTINUABLE; KiDispatchException(&Er, 0, Tf, KernelMode, TRUE); _____ Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c --- trunk/reactos/ntoskrnl/ke/i386/usertrap.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/ke/i386/usertrap.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -132,9 +132,9 @@ } - Er.ExceptionFlags = ((NTSTATUS) STATUS_SINGLE_STEP == (NTSTATUS) Er.ExceptionCode || - (NTSTATUS) STATUS_BREAKPOINT == (NTSTATUS) Er.ExceptionCode) ? - EXCEPTION_NONCONTINUABLE : 0; + Er.ExceptionFlags = (STATUS_SINGLE_STEP == Er.ExceptionCode || + STATUS_BREAKPOINT == Er.ExceptionCode) ? + 0 : EXCEPTION_NONCONTINUABLE; KiDispatchException(&Er, 0, Tf, UserMode, TRUE); return(0); _____ Modified: trunk/reactos/ntoskrnl/mm/virtual.c --- trunk/reactos/ntoskrnl/mm/virtual.c 2005-01-12 16:09:12 UTC (rev 12972) +++ trunk/reactos/ntoskrnl/mm/virtual.c 2005-01-12 19:04:06 UTC (rev 12973) @@ -350,6 +350,56 @@ } +NTSTATUS STDCALL +MiProtectVirtualMemory(IN PEPROCESS Process, + IN OUT PVOID *BaseAddress, + IN OUT PULONG NumberOfBytesToProtect, + IN ULONG NewAccessProtection, + OUT PULONG OldAccessProtection OPTIONAL) +{ + PMEMORY_AREA MemoryArea; + PMADDRESS_SPACE AddressSpace; + ULONG OldAccessProtection_; + NTSTATUS Status; + + *NumberOfBytesToProtect = + PAGE_ROUND_UP((*BaseAddress) + (*NumberOfBytesToProtect)) - + PAGE_ROUND_DOWN(*BaseAddress); + *BaseAddress = (PVOID)PAGE_ROUND_DOWN(*BaseAddress); + + AddressSpace = &Process->AddressSpace; + + MmLockAddressSpace(AddressSpace); + MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, *BaseAddress); + if (MemoryArea == NULL) + { + MmUnlockAddressSpace(AddressSpace); + return STATUS_UNSUCCESSFUL; + } + + if (OldAccessProtection == NULL) + OldAccessProtection = &OldAccessProtection_; + + if (MemoryArea->Type == MEMORY_AREA_VIRTUAL_MEMORY) + { + Status = MmProtectAnonMem(AddressSpace, MemoryArea, *BaseAddress, + *NumberOfBytesToProtect, NewAccessProtection, + OldAccessProtection); + } + else if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) + { + Status = MmProtectSectionView(AddressSpace, MemoryArea, *BaseAddress, + *NumberOfBytesToProtect, + NewAccessProtection, + OldAccessProtection); + } + + MmUnlockAddressSpace(AddressSpace); + + return Status; +} + + /* (tMk 2004.II.5) * FUNCTION: * Called from VirtualProtectEx (lib\kernel32\mem\virtual.c) @@ -357,15 +407,13 @@ */ NTSTATUS STDCALL NtProtectVirtualMemory(IN HANDLE ProcessHandle, - IN PVOID *UnsafeBaseAddress, - IN ULONG *UnsafeNumberOfBytesToProtect, + IN OUT PVOID *UnsafeBaseAddress, + IN OUT ULONG *UnsafeNumberOfBytesToProtect, IN ULONG NewAccessProtection, OUT PULONG UnsafeOldAccessProtection) { - PMEMORY_AREA MemoryArea; PEPROCESS Process; NTSTATUS Status; - PMADDRESS_SPACE AddressSpace; ULONG OldAccessProtection; PVOID BaseAddress; ULONG NumberOfBytesToProtect; @@ -377,18 +425,14 @@ if (!NT_SUCCESS(Status)) return Status; - // (tMk 2004.II.5) in Microsoft SDK I read: - // 'if this parameter is NULL or does not point to a valid variable, the function fails' + /* (tMk 2004.II.5) in Microsoft SDK I read: + * 'if this parameter is NULL or does not point to a valid variable, the function fails' + */ if(UnsafeOldAccessProtection == NULL) { return(STATUS_INVALID_PARAMETER); } - NumberOfBytesToProtect = - PAGE_ROUND_UP(BaseAddress + NumberOfBytesToProtect) - - PAGE_ROUND_DOWN(BaseAddress); - BaseAddress = (PVOID)PAGE_ROUND_DOWN(BaseAddress); - Status = ObReferenceObjectByHandle(ProcessHandle, PROCESS_VM_OPERATION, PsProcessType, @@ -401,32 +445,12 @@ return(Status); } - AddressSpace = &Process->AddressSpace; + Status = MiProtectVirtualMemory(Process, + &BaseAddress, + &NumberOfBytesToProtect, + NewAccessProtection, + &OldAccessProtection); - MmLockAddressSpace(AddressSpace); - MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress); - if (MemoryArea == NULL) - { - MmUnlockAddressSpace(AddressSpace); - ObDereferenceObject(Process); - return(STATUS_UNSUCCESSFUL); - } - - if (MemoryArea->Type == MEMORY_AREA_VIRTUAL_MEMORY) - { - Status = MmProtectAnonMem(AddressSpace, MemoryArea, BaseAddress, - NumberOfBytesToProtect, NewAccessProtection, - &OldAccessProtection); - } - else if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW) - { - Status = MmProtectSectionView(AddressSpace, MemoryArea, BaseAddress, - NumberOfBytesToProtect, - NewAccessProtection, - &OldAccessProtection); - } - - MmUnlockAddressSpace(AddressSpace); ObDereferenceObject(Process); MmCopyToCaller(UnsafeOldAccessProtection, &OldAccessProtection, sizeof(ULONG)); @@ -590,12 +614,15 @@ IN PVOID BaseAddress, IN PVOID Buffer, IN ULONG NumberOfBytesToWrite, - OUT PULONG NumberOfBytesWritten) + OUT PULONG NumberOfBytesWritten OPTIONAL) { NTSTATUS Status; PMDL Mdl; PVOID SystemAddress; PEPROCESS Process; + ULONG OldProtection = 0; + PVOID ProtectBaseAddress; + ULONG ProtectNumberOfBytes; DPRINT("NtWriteVirtualMemory(ProcessHandle %x, BaseAddress %x, " "Buffer %x, NumberOfBytesToWrite %d)\n",ProcessHandle,BaseAddress, @@ -612,23 +639,62 @@ return(Status); } + /* We have to make sure the target memory is writable. + * + * I am not sure if it is correct to do this in any case, but it has to be + * done at least in some cases because you can use WriteProcessMemory to + * write into the .text section of a module where memcpy() would crash. + * -blight (2005/01/09) + */ + ProtectBaseAddress = BaseAddress; + ProtectNumberOfBytes = NumberOfBytesToWrite; + + /* Write memory */ if (Process == PsGetCurrentProcess()) { + Status = MiProtectVirtualMemory(Process, + &ProtectBaseAddress, + &ProtectNumberOfBytes, + PAGE_READWRITE, + &OldProtection); + if (!NT_SUCCESS(Status)) + { + ObDereferenceObject(Process); + return Status; + } memcpy(BaseAddress, Buffer, NumberOfBytesToWrite); } else { + /* Create MDL describing the source buffer. */ Mdl = MmCreateMdl(NULL, Buffer, NumberOfBytesToWrite); - MmProbeAndLockPages(Mdl, - UserMode, - IoReadAccess); if(Mdl == NULL) { ObDereferenceObject(Process); return(STATUS_NO_MEMORY); } + + /* Make the target area writable. */ + Status = MiProtectVirtualMemory(Process, + &ProtectBaseAddress, + &ProtectNumberOfBytes, + PAGE_READWRITE, + &OldProtection); + if (!NT_SUCCESS(Status)) + { + ObDereferenceObject(Process); + ExFreePool(Mdl); + return Status; + } + + /* Map the MDL. */ + MmProbeAndLockPages(Mdl, + UserMode, + IoReadAccess); + + /* Copy memory from the mapped MDL into the target buffer. */ KeAttachProcess(&Process->Pcb); SystemAddress = MmGetSystemAddressForMdl(Mdl); @@ -636,6 +702,7 @@ KeDetachProcess(); + /* Free the MDL. */ if (Mdl->MappedSystemVa != NULL) { MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl); @@ -644,9 +711,22 @@ ExFreePool(Mdl); } + /* Reset the protection of the target memory. */ + Status = MiProtectVirtualMemory(Process, + &ProtectBaseAddress, + &ProtectNumberOfBytes, + OldProtection, + &OldProtection); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to reset protection of the target memory! (Status 0x%x)\n", Status); + /* FIXME: Should we bugcheck here? */ + } + ObDereferenceObject(Process); - *NumberOfBytesWritten = NumberOfBytesToWrite; + if (NumberOfBytesWritten != NULL) + MmCopyToCaller(NumberOfBytesWritten, &NumberOfBytesToWrite, sizeof(ULONG)); return(STATUS_SUCCESS); }
19 years, 10 months
1
0
0
0
[navaraf] 12972: - Fix compilation error in KeIpiGenericCall.
by navaraf@svn.reactos.com
- Fix compilation error in KeIpiGenericCall. - Revert my last changes in RPoolMgr.h. Currently they cause more harm than good. :( Modified: trunk/reactos/ntoskrnl/ke/ipi.c Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h _____ Modified: trunk/reactos/ntoskrnl/ke/ipi.c --- trunk/reactos/ntoskrnl/ke/ipi.c 2005-01-12 15:35:12 UTC (rev 12971) +++ trunk/reactos/ntoskrnl/ke/ipi.c 2005-01-12 16:09:12 UTC (rev 12972) @@ -157,7 +157,7 @@ } VOID -KeIpiGenericCall(VOID STDCALL (*Function)(PVOID), PVOID Argument) +KeIpiGenericCall(VOID (STDCALL *Function)(PVOID), PVOID Argument) { KIRQL oldIrql; ULONG TargetSet; _____ Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h --- trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-12 15:35:12 UTC (rev 12971) +++ trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-12 16:09:12 UTC (rev 12972) @@ -12,18 +12,17 @@ #define RPOOLMGR_H typedef unsigned long rulong; -typedef ULONG_PTR rulong_ptr; -#define R_IS_POOL_PTR(pool,ptr) (void*)(ptr) >= pool->UserBase && (rulong_ptr)(ptr) < ((rulong_ptr)pool->UserBase + pool->UserSize) +#define R_IS_POOL_PTR(pool,ptr) (void*)(ptr) >= pool->UserBase && (ULONG_PTR)(ptr) < ((ULONG_PTR)pool->UserBase + pool->UserSize) #define R_ASSERT_PTR(pool,ptr) ASSERT( R_IS_POOL_PTR(pool,ptr) ) #define R_ASSERT_SIZE(pool,sz) ASSERT( sz > (sizeof(R_USED)+2*R_RZ) && sz >= sizeof(R_FREE) && sz < pool->UserSize ) #ifndef R_ROUND_UP -#define R_ROUND_UP(x,s) ((PVOID)(((rulong_ptr)(x)+(s)-1) & ~((rulong_ptr)(s)-1))) +#define R_ROUND_UP(x,s) ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1))) #endif//R_ROUND_UP #ifndef R_ROUND_DOWN -#define R_ROUND_DOWN(x,s) ((PVOID)(((rulong_ptr)(x)) & ~((rulong_ptr)(s)-1))) +#define R_ROUND_DOWN(x,s) ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1))) #endif//R_ROUND_DOWN #ifndef R_QUEMIN @@ -78,9 +77,9 @@ #endif//R_MAGIC rulong PrevSize : 30; rulong Status : 2; - rulong_ptr Size; + rulong Size; #if R_STACK - rulong_ptr LastOwnerStack[R_STACK]; + ULONG_PTR LastOwnerStack[R_STACK]; #endif//R_STACK struct _R_FREE* NextFree; struct _R_FREE* PrevFree; @@ -94,9 +93,9 @@ #endif//R_MAGIC rulong PrevSize : 30; rulong Status : 2; - rulong_ptr Size; + rulong Size; #if R_STACK - rulong_ptr LastOwnerStack[R_STACK]; + ULONG_PTR LastOwnerStack[R_STACK]; #endif//R_STACK struct _R_USED* NextUsed; #if R_RZ @@ -116,9 +115,9 @@ typedef struct _R_POOL { void* PoolBase; - rulong_ptr PoolSize; + rulong PoolSize; void* UserBase; - rulong_ptr UserSize; + rulong UserSize; rulong Alignments[3]; PR_FREE FirstFree, LastFree; R_QUE Que[R_QUECOUNT][3]; @@ -148,7 +147,7 @@ #endif//R_STACK static int -RQueWhich ( rulong_ptr size ) +RQueWhich ( rulong size ) { rulong que, quesize; for ( que=0, quesize=16; que < R_QUECOUNT; que++, quesize<<=1 ) @@ -288,7 +287,7 @@ } PR_POOL -RPoolInit ( void* PoolBase, rulong_ptr PoolSize, int align1, int align2, int align3 ) +RPoolInit ( void* PoolBase, rulong PoolSize, int align1, int align2, int align3 ) { int align, que; PR_POOL pool = (PR_POOL)PoolBase; @@ -568,7 +567,7 @@ } static void -RSetSize ( PR_POOL pool, PR_FREE Block, rulong_ptr NewSize, PR_FREE NextBlock ) +RSetSize ( PR_POOL pool, PR_FREE Block, rulong NewSize, PR_FREE NextBlock ) { R_ASSERT_PTR(pool,Block); ASSERT ( NewSize < pool->UserSize ); @@ -581,7 +580,7 @@ } static PR_FREE -RFreeSplit ( PR_POOL pool, PR_FREE Block, rulong_ptr NewSize ) +RFreeSplit ( PR_POOL pool, PR_FREE Block, rulong NewSize ) { PR_FREE NewBlock = (PR_FREE)((char*)Block + NewSize); RSetSize ( pool, NewBlock, Block->Size - NewSize, NULL ); @@ -655,7 +654,7 @@ #define RiUsedInitRedZone(Block,UserSize) #else//R_RZ static void -RiUsedInitRedZone ( PR_USED Block, rulong_ptr UserSize ) +RiUsedInitRedZone ( PR_USED Block, rulong UserSize ) { // write out buffer-overrun detection bytes char* Addr = (char*)RHdrToBody(Block); @@ -669,7 +668,7 @@ #endif//R_RZ static void* -RPoolAlloc ( PR_POOL pool, rulong_ptr NumberOfBytes, rulong Tag, rulong align ) +RPoolAlloc ( PR_POOL pool, rulong NumberOfBytes, rulong Tag, rulong align ) { PR_USED NewBlock; PR_FREE BestBlock, @@ -678,8 +677,10 @@ BestPreviousBlock, CurrentBlock; void* BestAlignedAddr; - rulong_ptr que, queBytes = NumberOfBytes; - rulong BlockSize, Alignment; + int que, + queBytes = NumberOfBytes; + rulong BlockSize, + Alignment; int que_reclaimed = 0; ASSERT ( pool );
19 years, 10 months
1
0
0
0
[navaraf] 12971: Portability fixes.
by navaraf@svn.reactos.com
Portability fixes. Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h Modified: trunk/reactos/ntoskrnl/mm/pe.c _____ Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h --- trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-12 15:00:32 UTC (rev 12970) +++ trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-12 15:35:12 UTC (rev 12971) @@ -12,17 +12,18 @@ #define RPOOLMGR_H typedef unsigned long rulong; +typedef ULONG_PTR rulong_ptr; -#define R_IS_POOL_PTR(pool,ptr) (void*)(ptr) >= pool->UserBase && (ULONG_PTR)(ptr) < ((ULONG_PTR)pool->UserBase + pool->UserSize) +#define R_IS_POOL_PTR(pool,ptr) (void*)(ptr) >= pool->UserBase && (rulong_ptr)(ptr) < ((rulong_ptr)pool->UserBase + pool->UserSize) #define R_ASSERT_PTR(pool,ptr) ASSERT( R_IS_POOL_PTR(pool,ptr) ) #define R_ASSERT_SIZE(pool,sz) ASSERT( sz > (sizeof(R_USED)+2*R_RZ) && sz >= sizeof(R_FREE) && sz < pool->UserSize ) #ifndef R_ROUND_UP -#define R_ROUND_UP(x,s) ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1))) +#define R_ROUND_UP(x,s) ((PVOID)(((rulong_ptr)(x)+(s)-1) & ~((rulong_ptr)(s)-1))) #endif//R_ROUND_UP #ifndef R_ROUND_DOWN -#define R_ROUND_DOWN(x,s) ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1))) +#define R_ROUND_DOWN(x,s) ((PVOID)(((rulong_ptr)(x)) & ~((rulong_ptr)(s)-1))) #endif//R_ROUND_DOWN #ifndef R_QUEMIN @@ -77,9 +78,9 @@ #endif//R_MAGIC rulong PrevSize : 30; rulong Status : 2; - rulong Size; + rulong_ptr Size; #if R_STACK - ULONG_PTR LastOwnerStack[R_STACK]; + rulong_ptr LastOwnerStack[R_STACK]; #endif//R_STACK struct _R_FREE* NextFree; struct _R_FREE* PrevFree; @@ -93,9 +94,9 @@ #endif//R_MAGIC rulong PrevSize : 30; rulong Status : 2; - rulong Size; + rulong_ptr Size; #if R_STACK - ULONG_PTR LastOwnerStack[R_STACK]; + rulong_ptr LastOwnerStack[R_STACK]; #endif//R_STACK struct _R_USED* NextUsed; #if R_RZ @@ -115,9 +116,9 @@ typedef struct _R_POOL { void* PoolBase; - rulong PoolSize; + rulong_ptr PoolSize; void* UserBase; - rulong UserSize; + rulong_ptr UserSize; rulong Alignments[3]; PR_FREE FirstFree, LastFree; R_QUE Que[R_QUECOUNT][3]; @@ -147,7 +148,7 @@ #endif//R_STACK static int -RQueWhich ( rulong size ) +RQueWhich ( rulong_ptr size ) { rulong que, quesize; for ( que=0, quesize=16; que < R_QUECOUNT; que++, quesize<<=1 ) @@ -287,7 +288,7 @@ } PR_POOL -RPoolInit ( void* PoolBase, rulong PoolSize, int align1, int align2, int align3 ) +RPoolInit ( void* PoolBase, rulong_ptr PoolSize, int align1, int align2, int align3 ) { int align, que; PR_POOL pool = (PR_POOL)PoolBase; @@ -567,7 +568,7 @@ } static void -RSetSize ( PR_POOL pool, PR_FREE Block, rulong NewSize, PR_FREE NextBlock ) +RSetSize ( PR_POOL pool, PR_FREE Block, rulong_ptr NewSize, PR_FREE NextBlock ) { R_ASSERT_PTR(pool,Block); ASSERT ( NewSize < pool->UserSize ); @@ -580,7 +581,7 @@ } static PR_FREE -RFreeSplit ( PR_POOL pool, PR_FREE Block, rulong NewSize ) +RFreeSplit ( PR_POOL pool, PR_FREE Block, rulong_ptr NewSize ) { PR_FREE NewBlock = (PR_FREE)((char*)Block + NewSize); RSetSize ( pool, NewBlock, Block->Size - NewSize, NULL ); @@ -654,7 +655,7 @@ #define RiUsedInitRedZone(Block,UserSize) #else//R_RZ static void -RiUsedInitRedZone ( PR_USED Block, rulong UserSize ) +RiUsedInitRedZone ( PR_USED Block, rulong_ptr UserSize ) { // write out buffer-overrun detection bytes char* Addr = (char*)RHdrToBody(Block); @@ -668,7 +669,7 @@ #endif//R_RZ static void* -RPoolAlloc ( PR_POOL pool, rulong NumberOfBytes, rulong Tag, rulong align ) +RPoolAlloc ( PR_POOL pool, rulong_ptr NumberOfBytes, rulong Tag, rulong align ) { PR_USED NewBlock; PR_FREE BestBlock, @@ -677,10 +678,8 @@ BestPreviousBlock, CurrentBlock; void* BestAlignedAddr; - int que, - queBytes = NumberOfBytes; - rulong BlockSize, - Alignment; + rulong_ptr que, queBytes = NumberOfBytes; + rulong BlockSize, Alignment; int que_reclaimed = 0; ASSERT ( pool ); _____ Modified: trunk/reactos/ntoskrnl/mm/pe.c --- trunk/reactos/ntoskrnl/mm/pe.c 2005-01-12 15:00:32 UTC (rev 12970) +++ trunk/reactos/ntoskrnl/mm/pe.c 2005-01-12 15:35:12 UTC (rev 12971) @@ -343,7 +343,7 @@ } else { - ULONG32 cbOptHeaderOffsetSize; + ULONG cbOptHeaderOffsetSize; nStatus = STATUS_INVALID_IMAGE_FORMAT;
19 years, 10 months
1
0
0
0
[navaraf] 12970: KJK::Hyperion <noog@libero.it>
by navaraf@svn.reactos.com
KJK::Hyperion <noog(a)libero.it> Mark ELF sections as non-paged for now. Fix 64bit compilation warning in PeFmtCreateSection. Modified: trunk/reactos/ntoskrnl/mm/elf.c Modified: trunk/reactos/ntoskrnl/mm/pe.c _____ Modified: trunk/reactos/ntoskrnl/mm/elf.c --- trunk/reactos/ntoskrnl/mm/elf.c 2005-01-12 14:57:03 UTC (rev 12969) +++ trunk/reactos/ntoskrnl/mm/elf.c 2005-01-12 15:00:32 UTC (rev 12970) @@ -628,6 +628,12 @@ else pssSegments[j].Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA; + /* + FIXME: see the TODO above. This is the safest way to load ELF drivers, for + now, if a bit wasteful of memory + */ + pssSegments[j].Characteristics |= IMAGE_SCN_MEM_NOT_PAGED; + /* Copy-on-write */ pssSegments[j].WriteCopy = TRUE; _____ Modified: trunk/reactos/ntoskrnl/mm/pe.c --- trunk/reactos/ntoskrnl/mm/pe.c 2005-01-12 14:57:03 UTC (rev 12969) +++ trunk/reactos/ntoskrnl/mm/pe.c 2005-01-12 15:00:32 UTC (rev 12970) @@ -343,7 +343,7 @@ } else { - SIZE_T cbOptHeaderOffsetSize; + ULONG32 cbOptHeaderOffsetSize; nStatus = STATUS_INVALID_IMAGE_FORMAT;
19 years, 10 months
1
0
0
0
[navaraf] 12969: Portability fixes.
by navaraf@svn.reactos.com
Portability fixes. Modified: trunk/reactos/include/ntos/rtl.h _____ Modified: trunk/reactos/include/ntos/rtl.h --- trunk/reactos/include/ntos/rtl.h 2005-01-12 14:51:38 UTC (rev 12968) +++ trunk/reactos/include/ntos/rtl.h 2005-01-12 14:57:03 UTC (rev 12969) @@ -2239,7 +2239,7 @@ * ); */ #define RtlRetrieveUshort(DestAddress,SrcAddress) \ - if ((ULONG)(SrcAddress) & SHORT_MASK) \ + if ((ULONG_PTR)(SrcAddress) & SHORT_MASK) \ { \ ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \ ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \ @@ -2347,7 +2347,7 @@ * ); */ #define RtlStoreUlong(Address,Value) \ - if ((ULONG)(Address) & LONG_MASK) \ + if ((ULONG_PTR)(Address) & LONG_MASK) \ { \ ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value) ); \ ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Val ue)); \ @@ -2356,7 +2356,7 @@ } \ else \ { \ - *((PULONG)(Address))=(ULONG)(Value); \ + *((PULONG_PTR)(Address))=(ULONG_PTR)(Value); \ } /* @@ -2367,7 +2367,7 @@ * ); */ #define RtlStoreUshort(Address,Value) \ - if ((ULONG)(Address) & SHORT_MASK) \ + if ((ULONG_PTR)(Address) & SHORT_MASK) \ { \ ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value )); \ ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value )); \
19 years, 10 months
1
0
0
0
[navaraf] 12968: Fix definition of RtlRetrieveUlong to be 64bit safe.
by navaraf@svn.reactos.com
Fix definition of RtlRetrieveUlong to be 64bit safe. Modified: trunk/reactos/include/ntos/rtl.h _____ Modified: trunk/reactos/include/ntos/rtl.h --- trunk/reactos/include/ntos/rtl.h 2005-01-12 14:09:07 UTC (rev 12967) +++ trunk/reactos/include/ntos/rtl.h 2005-01-12 14:51:38 UTC (rev 12968) @@ -2219,7 +2219,7 @@ * ); */ #define RtlRetrieveUlong(DestAddress,SrcAddress) \ - if ((ULONG)(SrcAddress) & LONG_MASK) \ + if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \ { \ ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \ ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
19 years, 10 months
1
0
0
0
[navaraf] 12967: Fix the build, sorry.
by navaraf@svn.reactos.com
Fix the build, sorry. Modified: trunk/reactos/ntoskrnl/ps/thread.c _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-01-12 14:07:55 UTC (rev 12966) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-01-12 14:09:07 UTC (rev 12967) @@ -981,34 +981,6 @@ } -NTSTATUS STDCALL -NtAlertThread (IN HANDLE ThreadHandle) -{ - PETHREAD Thread; - NTSTATUS Status; - NTSTATUS ThreadStatus; - KIRQL oldIrql; - - Status = ObReferenceObjectByHandle(ThreadHandle, - THREAD_SUSPEND_RESUME, - PsThreadType, - UserMode, - (PVOID*)&Thread, - NULL); - if (Status != STATUS_SUCCESS) - { - return(Status); - } - - ThreadStatus = STATUS_ALERTED; - oldIrql = KeAcquireDispatcherDatabaseLock(); - (VOID)PsUnblockThread(Thread, &ThreadStatus, 0); - KeReleaseDispatcherDatabaseLock(oldIrql); - - ObDereferenceObject(Thread); - return(STATUS_SUCCESS); -} - /********************************************************************** * NtOpenThread/4 *
19 years, 10 months
1
0
0
0
[royce] 12966: forgot to recurse If elements when generating macros
by royce@svn.reactos.com
forgot to recurse If elements when generating macros Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-01-12 13:43:05 UTC (rev 12965) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-01-12 14:07:55 UTC (rev 12966) @@ -267,6 +267,7 @@ const vector<File*>& files, const vector<Include*>* includes, const vector<Define*>& defines, + const vector<If*>* ifs, const string& cflags_macro, const string& nasmflags_macro, const string& objs_macro) const @@ -319,6 +320,35 @@ } fprintf ( fMakefile, "\n" ); } + + if ( ifs && ifs->size() ) + { + for ( size_t i = 0; i < module.ifs.size(); i++ ) + { + If& rIf = *(*ifs)[i]; + if ( rIf.defines.size() || rIf.files.size() || rIf.ifs.size() ) + { + fprintf ( + fMakefile, + "ifeq ($(%s),\"%s\")\n", + rIf.property.c_str(), + rIf.value.c_str() ); + GenerateMacros ( + module, + "+=", + rIf.files, + NULL, + rIf.defines, + &rIf.ifs, + cflags_macro, + nasmflags_macro, + objs_macro ); + fprintf ( + fMakefile, + "endif\n\n" ); + } + } + } } void @@ -334,6 +364,7 @@ module.files, &module.includes, module.defines, + NULL, cflags_macro, nasmflags_macro, objs_macro ); @@ -342,7 +373,7 @@ for ( size_t i = 0; i < module.ifs.size(); i++ ) { If& rIf = *module.ifs[i]; - if ( rIf.defines.size() || rIf.files.size() ) + if ( rIf.defines.size() || rIf.files.size() || rIf.ifs.size() ) { fprintf ( fMakefile, @@ -355,6 +386,7 @@ rIf.files, NULL, rIf.defines, + &rIf.ifs, cflags_macro, nasmflags_macro, objs_macro ); _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-01-12 13:43:05 UTC (rev 12965) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-01-12 14:07:55 UTC (rev 12966) @@ -51,6 +51,7 @@ const std::vector<File*>& files, const std::vector<Include*>* includes, const std::vector<Define*>& defines, + const std::vector<If*>* ifs, const std::string& cflags_macro, const std::string& nasmflags_macro, const std::string& objs_macro) const;
19 years, 10 months
1
0
0
0
[navaraf] 12965: Basic support for priority boosting.
by navaraf@svn.reactos.com
Basic support for priority boosting. Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/ps.h Modified: trunk/reactos/ntoskrnl/ke/event.c Modified: trunk/reactos/ntoskrnl/ke/mutex.c Modified: trunk/reactos/ntoskrnl/ke/queue.c Modified: trunk/reactos/ntoskrnl/ke/sem.c Modified: trunk/reactos/ntoskrnl/ke/timer.c Modified: trunk/reactos/ntoskrnl/ke/wait.c Modified: trunk/reactos/ntoskrnl/ps/create.c Modified: trunk/reactos/ntoskrnl/ps/kill.c Modified: trunk/reactos/ntoskrnl/ps/thread.c _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-01-12 13:43:05 UTC (rev 12965) @@ -147,7 +147,7 @@ VOID KeReleaseDispatcherDatabaseLock(KIRQL Irql); VOID KeReleaseDispatcherDatabaseLockFromDpcLevel(VOID); -BOOLEAN KiDispatcherObjectWake(DISPATCHER_HEADER* hdr); +BOOLEAN KiDispatcherObjectWake(DISPATCHER_HEADER* hdr, KPRIORITY increment); VOID STDCALL KeExpireTimers(PKDPC Apc, PVOID Arg1, PVOID Arg2, _____ Modified: trunk/reactos/ntoskrnl/include/internal/ps.h --- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-01-12 13:43:05 UTC (rev 12965) @@ -528,7 +528,7 @@ PsBlockThread(PNTSTATUS Status, UCHAR Alertable, ULONG WaitMode, BOOLEAN DispatcherLock, KIRQL WaitIrql, UCHAR WaitReason); VOID -PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus); +PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus, KPRIORITY Increment); VOID PsApplicationProcessorInit(VOID); VOID _____ Modified: trunk/reactos/ntoskrnl/ke/event.c --- trunk/reactos/ntoskrnl/ke/event.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/event.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -87,9 +87,9 @@ OldIrql = KeAcquireDispatcherDatabaseLock(); - ret = InterlockedExchange(&(Event->Header.SignalState),1); + ret = InterlockedExchange(&Event->Header.SignalState,1); - KiDispatcherObjectWake((DISPATCHER_HEADER *)Event); + KiDispatcherObjectWake(&Event->Header, Increment); if (Wait == FALSE) { @@ -117,8 +117,8 @@ DPRINT("KePulseEvent(Event %x, Wait %x)\n",Event,Wait); OldIrql = KeAcquireDispatcherDatabaseLock(); - ret = InterlockedExchange(&(Event->Header.SignalState),1); - KiDispatcherObjectWake((DISPATCHER_HEADER *)Event); + ret = InterlockedExchange(&Event->Header.SignalState,1); + KiDispatcherObjectWake(&Event->Header, Increment); InterlockedExchange(&(Event->Header.SignalState),0); if (Wait == FALSE) _____ Modified: trunk/reactos/ntoskrnl/ke/mutex.c --- trunk/reactos/ntoskrnl/ke/mutex.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/mutex.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -82,7 +82,7 @@ Mutex->OwnerThread = NULL; if (Mutex->MutantListEntry.Flink && Mutex->MutantListEntry.Blink) RemoveEntryList(&Mutex->MutantListEntry); - KiDispatcherObjectWake(&Mutex->Header); + KiDispatcherObjectWake(&Mutex->Header, IO_NO_INCREMENT); } if (Wait == FALSE) @@ -191,7 +191,7 @@ Mutant->OwnerThread = NULL; if (Mutant->MutantListEntry.Flink && Mutant->MutantListEntry.Blink) RemoveEntryList(&Mutant->MutantListEntry); - KiDispatcherObjectWake(&Mutant->Header); + KiDispatcherObjectWake(&Mutant->Header, Increment); } if (Wait == FALSE) _____ Modified: trunk/reactos/ntoskrnl/ke/queue.c --- trunk/reactos/ntoskrnl/ke/queue.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/queue.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -100,7 +100,7 @@ !IsListEmpty(&Queue->Header.WaitListHead) && KeGetCurrentThread()->Queue != Queue) { - KiDispatcherObjectWake(&Queue->Header); + KiDispatcherObjectWake(&Queue->Header, IO_NO_INCREMENT); } return InitialState; @@ -179,7 +179,7 @@ if (Thread->Queue->CurrentCount < Thread->Queue->MaximumCount && !IsListEmpty(&Thread->Queue->EntryListHead)) { - KiDispatcherObjectWake(&Thread->Queue->Header); + KiDispatcherObjectWake(&Thread->Queue->Header, 0); } } _____ Modified: trunk/reactos/ntoskrnl/ke/sem.c --- trunk/reactos/ntoskrnl/ke/sem.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/sem.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -105,7 +105,7 @@ Semaphore->Header.SignalState += Adjustment; if (InitialState == 0) { - KiDispatcherObjectWake(&Semaphore->Header); + KiDispatcherObjectWake(&Semaphore->Header, SEMAPHORE_INCREMENT); } if (Wait == FALSE) _____ Modified: trunk/reactos/ntoskrnl/ke/timer.c --- trunk/reactos/ntoskrnl/ke/timer.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/timer.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -529,7 +529,7 @@ KeAcquireDispatcherDatabaseLockAtDpcLevel(); Timer->Header.SignalState = TRUE; - KiDispatcherObjectWake(&Timer->Header); + KiDispatcherObjectWake(&Timer->Header, 0); KeReleaseDispatcherDatabaseLockFromDpcLevel(); if (Timer->Period != 0) _____ Modified: trunk/reactos/ntoskrnl/ke/wait.c --- trunk/reactos/ntoskrnl/ke/wait.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ke/wait.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -25,8 +25,8 @@ static KSPIN_LOCK DispatcherDatabaseLock; -#define KeDispatcherObjectWakeOne(hdr) KeDispatcherObjectWakeOneOrAll(hdr, FALSE) -#define KeDispatcherObjectWakeAll(hdr) KeDispatcherObjectWakeOneOrAll(hdr, TRUE) +#define KeDispatcherObjectWakeOne(hdr, increment) KeDispatcherObjectWakeOneOrAll(hdr, increment, FALSE) +#define KeDispatcherObjectWakeAll(hdr, increment) KeDispatcherObjectWakeOneOrAll(hdr, increment, TRUE) extern POBJECT_TYPE EXPORTED ExMutantObjectType; extern POBJECT_TYPE EXPORTED ExSemaphoreObjectType; @@ -227,13 +227,14 @@ if (WasWaiting) { - PsUnblockThread((PETHREAD)Thread, &WaitStatus); + PsUnblockThread((PETHREAD)Thread, &WaitStatus, 0); } return WasWaiting; } static BOOLEAN KeDispatcherObjectWakeOneOrAll(DISPATCHER_HEADER * hdr, + KPRIORITY increment, BOOLEAN WakeAll) { PKWAIT_BLOCK Waiter; @@ -332,7 +333,8 @@ WakedAny = TRUE; DPRINT("Waking %x status = %x\n", WaiterHead->Thread, Status); - PsUnblockThread(CONTAINING_RECORD(WaiterHead->Thread, ETHREAD, Tcb), &Status); + PsUnblockThread(CONTAINING_RECORD(WaiterHead->Thread, ETHREAD, Tcb), + &Status, increment); } } @@ -340,7 +342,7 @@ } -BOOLEAN KiDispatcherObjectWake(DISPATCHER_HEADER* hdr) +BOOLEAN KiDispatcherObjectWake(DISPATCHER_HEADER* hdr, KPRIORITY increment) /* * FUNCTION: Wake threads waiting on a dispatcher object * NOTE: The exact semantics of waking are dependant on the type of object @@ -355,19 +357,19 @@ switch (hdr->Type) { case InternalNotificationEvent: - return(KeDispatcherObjectWakeAll(hdr)); + return(KeDispatcherObjectWakeAll(hdr, increment)); case InternalNotificationTimer: - return(KeDispatcherObjectWakeAll(hdr)); + return(KeDispatcherObjectWakeAll(hdr, increment)); case InternalSynchronizationEvent: - return(KeDispatcherObjectWakeOne(hdr)); + return(KeDispatcherObjectWakeOne(hdr, increment)); case InternalSynchronizationTimer: - return(KeDispatcherObjectWakeOne(hdr)); + return(KeDispatcherObjectWakeOne(hdr, increment)); case InternalQueueType: - return(KeDispatcherObjectWakeOne(hdr)); + return(KeDispatcherObjectWakeOne(hdr, increment)); case InternalSemaphoreType: DPRINT("hdr->SignalState %d\n", hdr->SignalState); @@ -376,20 +378,20 @@ do { DPRINT("Waking one semaphore waiter\n"); - Ret = KeDispatcherObjectWakeOne(hdr); + Ret = KeDispatcherObjectWakeOne(hdr, increment); } while(hdr->SignalState > 0 && Ret) ; return(Ret); } else return FALSE; case InternalProcessType: - return(KeDispatcherObjectWakeAll(hdr)); + return(KeDispatcherObjectWakeAll(hdr, increment)); case InternalThreadType: - return(KeDispatcherObjectWakeAll(hdr)); + return(KeDispatcherObjectWakeAll(hdr, increment)); case InternalMutexType: - return(KeDispatcherObjectWakeOne(hdr)); + return(KeDispatcherObjectWakeOne(hdr, increment)); } DbgPrint("Dispatcher object %x has unknown type %d\n", hdr, hdr->Type); KEBUGCHECK(0); @@ -723,7 +725,7 @@ if (CurrentThread->Queue->CurrentCount < CurrentThread->Queue->MaximumCount && !IsListEmpty(&CurrentThread->Queue->EntryListHead)) { - KiDispatcherObjectWake(&CurrentThread->Queue->Header); + KiDispatcherObjectWake(&CurrentThread->Queue->Header, IO_NO_INCREMENT); } } _____ Modified: trunk/reactos/ntoskrnl/ps/create.c --- trunk/reactos/ntoskrnl/ps/create.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ps/create.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -748,7 +748,7 @@ Thread->Tcb.Alerted[KernelMode] = TRUE; oldIrql = KeAcquireDispatcherDatabaseLock (); - PsUnblockThread(Thread, NULL); + PsUnblockThread(Thread, NULL, 0); KeReleaseDispatcherDatabaseLock(oldIrql); @@ -814,9 +814,9 @@ *ClientId=Thread->Cid; } - oldIrql = KeAcquireDispatcherDatabaseLock (); - PsUnblockThread(Thread, NULL); - KeReleaseDispatcherDatabaseLock(oldIrql); + oldIrql = KeAcquireDispatcherDatabaseLock (); + PsUnblockThread(Thread, NULL, 0); + KeReleaseDispatcherDatabaseLock(oldIrql); return(STATUS_SUCCESS); } _____ Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -191,7 +191,7 @@ oldIrql = KeAcquireDispatcherDatabaseLock(); CurrentThread->Tcb.DispatcherHeader.SignalState = TRUE; - KiDispatcherObjectWake(&CurrentThread->Tcb.DispatcherHeader); + KiDispatcherObjectWake(&CurrentThread->Tcb.DispatcherHeader, IO_NO_INCREMENT); KeReleaseDispatcherDatabaseLock (oldIrql); /* The last thread shall close the door on exit */ @@ -325,7 +325,7 @@ } OldIrql = KeAcquireDispatcherDatabaseLock (); Process->Pcb.DispatcherHeader.SignalState = TRUE; - KiDispatcherObjectWake(&Process->Pcb.DispatcherHeader); + KiDispatcherObjectWake(&Process->Pcb.DispatcherHeader, IO_NO_INCREMENT); KeReleaseDispatcherDatabaseLock (OldIrql); ObDereferenceObject(Process); return(STATUS_SUCCESS); _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-01-12 13:35:43 UTC (rev 12964) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-01-12 13:43:05 UTC (rev 12965) @@ -475,7 +475,7 @@ } VOID -PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus) +PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus, KPRIORITY Increment) { if (THREAD_STATE_TERMINATED_1 == Thread->Tcb.State || THREAD_STATE_TERMINATED_2 == Thread->Tcb.State) @@ -493,6 +493,22 @@ { ULONG Processor; KAFFINITY Affinity; + + /* FIXME: This propably isn't the right way to do it... */ + if (Thread->Tcb.Priority < LOW_REALTIME_PRIORITY && + Thread->Tcb.BasePriority < LOW_REALTIME_PRIORITY - 2) + { + if (!Thread->Tcb.PriorityDecrement && !Thread->Tcb.DisableBoost) + { + Thread->Tcb.Priority = Thread->Tcb.BasePriority + Increment; + Thread->Tcb.PriorityDecrement = Increment; + } + } + else + { + Thread->Tcb.Quantum = Thread->Tcb.ApcState.Process->ThreadQuantum; + } + if (WaitStatus != NULL) { Thread->Tcb.WaitStatus = *WaitStatus; @@ -965,7 +981,34 @@ } +NTSTATUS STDCALL +NtAlertThread (IN HANDLE ThreadHandle) +{ + PETHREAD Thread; + NTSTATUS Status; + NTSTATUS ThreadStatus; + KIRQL oldIrql; + Status = ObReferenceObjectByHandle(ThreadHandle, + THREAD_SUSPEND_RESUME, + PsThreadType, + UserMode, + (PVOID*)&Thread, + NULL); + if (Status != STATUS_SUCCESS) + { + return(Status); + } + + ThreadStatus = STATUS_ALERTED; + oldIrql = KeAcquireDispatcherDatabaseLock(); + (VOID)PsUnblockThread(Thread, &ThreadStatus, 0); + KeReleaseDispatcherDatabaseLock(oldIrql); + + ObDereferenceObject(Thread); + return(STATUS_SUCCESS); +} + /********************************************************************** * NtOpenThread/4 *
19 years, 10 months
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200