winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2006
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
863 discussions
Start a n
N
ew thread
lostwages/ news/2006051501.xml wwn/wn20060515_ ...
by WineHQ
16 May '06
16 May '06
ChangeSet ID: 24844 CVSROOT: /opt/cvs-commit Module name: lostwages Changes by: wineowner(a)winehq.org 2006/05/16 01:33:47 Added files: news : 2006051501.xml wwn : wn20060515_313.xml Log message: WWN #313 Patch:
http://cvs.winehq.org/patch.py?id=24844
Old revision New revision Changes Path Added 1.1 +0 -0 lostwages/news/2006051501.xml Added 1.1 +0 -0 lostwages/wwn/wn20060515_313.xml
1
0
0
0
Robert Shearman : rpcrt4: Implement NdrSimpleStructMemorySize.
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: b96d630022dc78e9458588044dc7b5e39c71c1f2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b96d630022dc78e94585880…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:34:58 2006 +0100 rpcrt4: Implement NdrSimpleStructMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 48ec0b6..aaba7cc 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1491,11 +1491,17 @@ void WINAPI NdrSimpleStructBufferSize(PM unsigned long WINAPI NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { - /* unsigned size = *(LPWORD)(pFormat+2); */ - FIXME("(%p,%p): stub\n", pStubMsg, pFormat); + unsigned short size = *(LPWORD)(pFormat+2); + + TRACE("(%p,%p)\n", pStubMsg, pFormat); + + ALIGN_POINTER(pStubMsg->Buffer, pFormat[1] + 1); + pStubMsg->MemorySize += size; + pStubMsg->Buffer += size; + if (pFormat[0] != RPC_FC_STRUCT) EmbeddedPointerMemorySize(pStubMsg, pFormat+4); - return 0; + return size; } /***********************************************************************
1
0
0
0
Robert Shearman : rpcrt4: Fix the conformant struct functions to not call conformant array functions .
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 2aff761dfd184305f0d94d64427d799b2a5c16da URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=2aff761dfd184305f0d94d6…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:35:31 2006 +0100 rpcrt4: Fix the conformant struct functions to not call conformant array functions. The conformance has to be the first thing in the buffer, in accordance with the DCE/RPC spec and to be compatible with the pointer layout format strings that MIDL generates. --- dlls/rpcrt4/ndr_marshall.c | 103 ++++++++++++++++++++++++++------------------ 1 files changed, 61 insertions(+), 42 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 20c3abb..48ec0b6 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2651,10 +2651,12 @@ unsigned char * WINAPI NdrConformantStr PFORMAT_STRING pFormat) { const NDR_CSTRUCT_FORMAT * pCStructFormat = (NDR_CSTRUCT_FORMAT*)pFormat; - pFormat += sizeof(NDR_CSTRUCT_FORMAT); + PFORMAT_STRING pCArrayFormat; + ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); + pFormat += sizeof(NDR_CSTRUCT_FORMAT); if ((pCStructFormat->type != RPC_FC_CPSTRUCT) && (pCStructFormat->type != RPC_FC_CSTRUCT)) { ERR("invalid format type %x\n", pCStructFormat->type); @@ -2662,22 +2664,35 @@ unsigned char * WINAPI NdrConformantStr return NULL; } + pCArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + + pCStructFormat->offset_to_array_description; + if (*pCArrayFormat != RPC_FC_CARRAY) + { + ERR("invalid array format type %x\n", pCStructFormat->type); + RpcRaiseException(RPC_S_INTERNAL_ERROR); + return NULL; + } + esize = *(const WORD*)(pCArrayFormat+2); + + ComputeConformance(pStubMsg, pMemory + pCStructFormat->memory_size, + pCArrayFormat + 4, 0); + + WriteConformance(pStubMsg); + ALIGN_POINTER(pStubMsg->Buffer, pCStructFormat->alignment + 1); TRACE("memory_size = %d\n", pCStructFormat->memory_size); /* copy constant sized part of struct */ - memcpy(pStubMsg->Buffer, pMemory, pCStructFormat->memory_size); - pStubMsg->Buffer += pCStructFormat->memory_size; + pStubMsg->BufferMark = pStubMsg->Buffer; + memcpy(pStubMsg->Buffer, pMemory, pCStructFormat->memory_size + pStubMsg->MaxCount * esize); + pStubMsg->Buffer += pCStructFormat->memory_size + pStubMsg->MaxCount * esize; - if (pCStructFormat->offset_to_array_description) - { - PFORMAT_STRING pArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + - pCStructFormat->offset_to_array_description; - NdrConformantArrayMarshall(pStubMsg, pMemory + pCStructFormat->memory_size, pArrayFormat); - } if (pCStructFormat->type == RPC_FC_CPSTRUCT) EmbeddedPointerMarshall(pStubMsg, pMemory, pFormat); + + STD_OVERFLOW_CHECK(pStubMsg); + return NULL; } @@ -2690,16 +2705,29 @@ unsigned char * WINAPI NdrConformantStr unsigned char fMustAlloc) { const NDR_CSTRUCT_FORMAT * pCStructFormat = (NDR_CSTRUCT_FORMAT*)pFormat; - pFormat += sizeof(NDR_CSTRUCT_FORMAT); + PFORMAT_STRING pCArrayFormat; + ULONG esize; TRACE("(%p, %p, %p, %d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc); + pFormat += sizeof(NDR_CSTRUCT_FORMAT); if ((pCStructFormat->type != RPC_FC_CPSTRUCT) && (pCStructFormat->type != RPC_FC_CSTRUCT)) { ERR("invalid format type %x\n", pCStructFormat->type); RpcRaiseException(RPC_S_INTERNAL_ERROR); return NULL; } + pCArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + + pCStructFormat->offset_to_array_description; + if (*pCArrayFormat != RPC_FC_CARRAY) + { + ERR("invalid array format type %x\n", pCStructFormat->type); + RpcRaiseException(RPC_S_INTERNAL_ERROR); + return NULL; + } + esize = *(const WORD*)(pCArrayFormat+2); + + pCArrayFormat = ReadConformance(pStubMsg, pCArrayFormat + 4); ALIGN_POINTER(pStubMsg->Buffer, pCStructFormat->alignment + 1); @@ -2708,35 +2736,18 @@ unsigned char * WINAPI NdrConformantStr /* work out how much memory to allocate if we need to do so */ if (!*ppMemory || fMustAlloc) { - SIZE_T size = pCStructFormat->memory_size; - - if (pCStructFormat->offset_to_array_description) - { - unsigned char *buffer; - PFORMAT_STRING pArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + - pCStructFormat->offset_to_array_description; - buffer = pStubMsg->Buffer; - pStubMsg->Buffer += pCStructFormat->memory_size; - size += NdrConformantArrayMemorySize(pStubMsg, pArrayFormat); - pStubMsg->Buffer = buffer; - } + SIZE_T size = pCStructFormat->memory_size + pStubMsg->MaxCount * esize; *ppMemory = NdrAllocate(pStubMsg, size); } /* now copy the data */ - memcpy(*ppMemory, pStubMsg->Buffer, pCStructFormat->memory_size); - pStubMsg->Buffer += pCStructFormat->memory_size; - if (pCStructFormat->offset_to_array_description) - { - PFORMAT_STRING pArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + - pCStructFormat->offset_to_array_description; - unsigned char *pMemoryArray = *ppMemory + pCStructFormat->memory_size; - /* note that we pass fMustAlloc as 0 as we have already allocated the - * memory */ - NdrConformantArrayUnmarshall(pStubMsg, &pMemoryArray, pArrayFormat, 0); - } + pStubMsg->BufferMark = pStubMsg->Buffer; + memcpy(*ppMemory, pStubMsg->Buffer, pCStructFormat->memory_size + pStubMsg->MaxCount * esize); + pStubMsg->Buffer += pCStructFormat->memory_size + pStubMsg->MaxCount * esize; + if (pCStructFormat->type == RPC_FC_CPSTRUCT) EmbeddedPointerUnmarshall(pStubMsg, ppMemory, pFormat, fMustAlloc); + return NULL; } @@ -2748,29 +2759,37 @@ void WINAPI NdrConformantStructBufferSiz PFORMAT_STRING pFormat) { const NDR_CSTRUCT_FORMAT * pCStructFormat = (NDR_CSTRUCT_FORMAT*)pFormat; - pFormat += sizeof(NDR_CSTRUCT_FORMAT); + PFORMAT_STRING pCArrayFormat; + ULONG esize; + TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); + pFormat += sizeof(NDR_CSTRUCT_FORMAT); if ((pCStructFormat->type != RPC_FC_CPSTRUCT) && (pCStructFormat->type != RPC_FC_CSTRUCT)) { ERR("invalid format type %x\n", pCStructFormat->type); RpcRaiseException(RPC_S_INTERNAL_ERROR); return; } + pCArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + + pCStructFormat->offset_to_array_description; + if (*pCArrayFormat != RPC_FC_CARRAY) + { + ERR("invalid array format type %x\n", pCStructFormat->type); + RpcRaiseException(RPC_S_INTERNAL_ERROR); + return; + } + esize = *(const WORD*)(pCArrayFormat+2); + + pCArrayFormat = ComputeConformance(pStubMsg, pMemory + pCStructFormat->memory_size, pCArrayFormat+4, 0); + SizeConformance(pStubMsg); ALIGN_LENGTH(pStubMsg->BufferLength, pCStructFormat->alignment + 1); TRACE("memory_size = %d\n", pCStructFormat->memory_size); - /* add constant sized part of struct to buffer size */ - pStubMsg->BufferLength += pCStructFormat->memory_size; + pStubMsg->BufferLength += pCStructFormat->memory_size + esize * pStubMsg->MaxCount; - if (pCStructFormat->offset_to_array_description) - { - PFORMAT_STRING pArrayFormat = (unsigned char*)&pCStructFormat->offset_to_array_description + - pCStructFormat->offset_to_array_description; - NdrConformantArrayBufferSize(pStubMsg, pMemory + pCStructFormat->memory_size, pArrayFormat); - } if (pCStructFormat->type == RPC_FC_CPSTRUCT) EmbeddedPointerBufferSize(pStubMsg, pMemory, pFormat); }
1
0
0
0
Robert Shearman : rpcrt4: In NdrConformantBufferSize, SizeConformance should be called, not SizeVariance.
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 4af0a6b805f5816163529aeec3f2e55e8ca42e53 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4af0a6b805f5816163529ae…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:35:41 2006 +0100 rpcrt4: In NdrConformantBufferSize, SizeConformance should be called, not SizeVariance. --- dlls/rpcrt4/ndr_marshall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 6156e0f..20c3abb 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2089,7 +2089,7 @@ void WINAPI NdrConformantArrayBufferSize pFormat = ComputeConformance(pStubMsg, pMemory, pFormat+4, 0); size = pStubMsg->MaxCount; - SizeVariance(pStubMsg); + SizeConformance(pStubMsg); ALIGN_LENGTH(pStubMsg->BufferLength, alignment);
1
0
0
0
Robert Shearman : rpcrt4: Save pStubMsg-> ActualCount in a local variable in the complex
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 2479aec4af44ea3498b7334111fdcbb06d5f5c5e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=2479aec4af44ea3498b7334…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:35:51 2006 +0100 rpcrt4: Save pStubMsg->ActualCount in a local variable in the complex array functions, before calling a function that could change it and cause the wrong number of loop iterations. --- dlls/rpcrt4/ndr_marshall.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 3d34b8a..6156e0f 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2283,7 +2283,7 @@ unsigned char * WINAPI NdrComplexArrayMa unsigned char *pMemory, PFORMAT_STRING pFormat) { - ULONG count, def; + ULONG i, count, def; BOOL variance_present; unsigned char alignment; @@ -2314,7 +2314,8 @@ unsigned char * WINAPI NdrComplexArrayMa ALIGN_POINTER(pStubMsg->Buffer, alignment); - for (count = 0; count < pStubMsg->ActualCount; count++) + count = pStubMsg->ActualCount; + for (i = 0; i < count; i++) pMemory = ComplexMarshall(pStubMsg, pMemory, pFormat, NULL); STD_OVERFLOW_CHECK(pStubMsg); @@ -2330,7 +2331,7 @@ unsigned char * WINAPI NdrComplexArrayUn PFORMAT_STRING pFormat, unsigned char fMustAlloc) { - ULONG count, esize; + ULONG i, count, esize; unsigned char alignment; unsigned char *pMemory; unsigned char *Buffer; @@ -2364,7 +2365,8 @@ unsigned char * WINAPI NdrComplexArrayUn ALIGN_POINTER(pStubMsg->Buffer, alignment); pMemory = *ppMemory; - for (count = 0; count < pStubMsg->ActualCount; count++) + count = pStubMsg->ActualCount; + for (i = 0; i < count; i++) pMemory = ComplexUnmarshall(pStubMsg, pMemory, pFormat, NULL, fMustAlloc); return NULL; @@ -2377,7 +2379,7 @@ void WINAPI NdrComplexArrayBufferSize(PM unsigned char *pMemory, PFORMAT_STRING pFormat) { - ULONG count, def; + ULONG i, count, def; unsigned char alignment; BOOL variance_present; @@ -2408,7 +2410,8 @@ void WINAPI NdrComplexArrayBufferSize(PM ALIGN_LENGTH(pStubMsg->BufferLength, alignment); - for (count=0; count < pStubMsg->ActualCount; count++) + count = pStubMsg->ActualCount; + for (i = 0; i < count; i++) pMemory = ComplexBufferSize(pStubMsg, pMemory, pFormat, NULL); } @@ -2418,7 +2421,7 @@ void WINAPI NdrComplexArrayBufferSize(PM unsigned long WINAPI NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { - ULONG count, esize; + ULONG i, count, esize; unsigned char alignment; unsigned char *Buffer; unsigned long SavedMemorySize; @@ -2450,7 +2453,8 @@ unsigned long WINAPI NdrComplexArrayMemo MemorySize = esize * pStubMsg->MaxCount; - for (count = 0; count < pStubMsg->ActualCount; count++) + count = pStubMsg->ActualCount; + for (i = 0; i < count; i++) ComplexStructMemorySize(pStubMsg, pFormat); pStubMsg->MemorySize = SavedMemorySize; @@ -2466,7 +2470,7 @@ void WINAPI NdrComplexArrayFree(PMIDL_ST unsigned char *pMemory, PFORMAT_STRING pFormat) { - ULONG count, def; + ULONG i, count, def; TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); @@ -2486,7 +2490,8 @@ void WINAPI NdrComplexArrayFree(PMIDL_ST pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount); TRACE("variance = %ld\n", pStubMsg->ActualCount); - for (count=0; count < pStubMsg->ActualCount; count++) + count = pStubMsg->ActualCount; + for (i = 0; i < count; i++) pMemory = ComplexFree(pStubMsg, pMemory, pFormat, NULL); }
1
0
0
0
Robert Shearman : rpcrt4: Dereference the memory for pointers in NdrNonEncapsulatedUnionUnmarshall.
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 345c92643e3f1993412851fa0c895506d5f211a3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=345c92643e3f1993412851f…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:35:17 2006 +0100 rpcrt4: Dereference the memory for pointers in NdrNonEncapsulatedUnionUnmarshall. Pointers in a non-encapsulated union behave like embedded pointers, so don't rely on the NdrPointer* functions doing the right thing in this case and call the Pointer* functions directly. --- dlls/rpcrt4/ndr_marshall.c | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 5681430..3d34b8a 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -3113,16 +3113,20 @@ unsigned char * WINAPI NdrNonEncapsulat NDR_MARSHALL m = NdrMarshaller[*desc & NDR_TABLE_MASK]; if (m) { + unsigned char *saved_buffer = NULL; switch(*desc) { case RPC_FC_RP: case RPC_FC_UP: case RPC_FC_OP: case RPC_FC_FP: - pMemory = *(void**)pMemory; + saved_buffer = pStubMsg->Buffer; + pStubMsg->Buffer += 4; /* for pointer ID */ + PointerMarshall(pStubMsg, saved_buffer, *(unsigned char **)pMemory, desc); break; + default: + m(pStubMsg, pMemory, desc); } - m(pStubMsg, pMemory, desc); } else FIXME("no marshaller for embedded type %02x\n", *desc); } @@ -3210,6 +3214,7 @@ unsigned char * WINAPI NdrNonEncapsulat NDR_UNMARSHALL m = NdrUnmarshaller[*desc & NDR_TABLE_MASK]; if (m) { + unsigned char *saved_buffer = NULL; switch(*desc) { case RPC_FC_RP: @@ -3217,9 +3222,14 @@ unsigned char * WINAPI NdrNonEncapsulat case RPC_FC_OP: case RPC_FC_FP: **(void***)ppMemory = NULL; + ALIGN_POINTER(pStubMsg->Buffer, 4); + saved_buffer = pStubMsg->Buffer; + pStubMsg->Buffer += 4; /* for pointer ID */ + PointerUnmarshall(pStubMsg, saved_buffer, *(unsigned char ***)ppMemory, desc, fMustAlloc); break; + default: + m(pStubMsg, ppMemory, desc, fMustAlloc); } - return m(pStubMsg, (unsigned char **)*ppMemory, desc, fMustAlloc); } else FIXME("no marshaller for embedded type %02x\n", *desc); } @@ -3263,10 +3273,13 @@ void WINAPI NdrNonEncapsulatedUnionBuffe case RPC_FC_UP: case RPC_FC_OP: case RPC_FC_FP: - pMemory = *(void**)pMemory; + ALIGN_LENGTH(pStubMsg->BufferLength, 4); + pStubMsg->BufferLength += 4; /* for pointer ID */ + PointerBufferSize(pStubMsg, *(unsigned char **)pMemory, desc); break; + default: + m(pStubMsg, pMemory, desc); } - m(pStubMsg, pMemory, desc); } else FIXME("no buffersizer for embedded type %02x\n", *desc); }
1
0
0
0
Robert Shearman : rpcrt4: Rename ComplexStructSize to ComplexStructMemorySize to reflect the fact that it increments the buffer .
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: f0aea2d5eebe07cdd6c63f04d7a9c08f869749b6 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f0aea2d5eebe07cdd6c63f0…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:35:07 2006 +0100 rpcrt4: Rename ComplexStructSize to ComplexStructMemorySize to reflect the fact that it increments the buffer. Replace the code in EmbeddedComplexSize that sizes non-encapsulated unions without using a memory sizer routine, since this function shouldn't touch the buffer. Add a new function EmbeddedComplexMemorySize and use it in some memory sizer routines where EmbeddedComplexSize was previously used. --- dlls/rpcrt4/ndr_marshall.c | 39 +++++++++++++++++++++++++++++---------- 1 files changed, 29 insertions(+), 10 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 678c38f..5681430 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1523,7 +1523,14 @@ unsigned long WINAPI EmbeddedComplexSize case RPC_FC_USER_MARSHAL: return *(const WORD*)&pFormat[4]; case RPC_FC_NON_ENCAPSULATED_UNION: - return NdrNonEncapsulatedUnionMemorySize(pStubMsg, pFormat); + pFormat += 2; + if (pStubMsg->fHasNewCorrDesc) + pFormat += 6; + else + pFormat += 4; + + pFormat += *(const SHORT*)pFormat; + return *(const SHORT*)pFormat; default: FIXME("unhandled embedded type %02x\n", *pFormat); } @@ -1531,6 +1538,21 @@ unsigned long WINAPI EmbeddedComplexSize } +unsigned long WINAPI EmbeddedComplexMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + NDR_MEMORYSIZE m = NdrMemorySizer[*pFormat & NDR_TABLE_MASK]; + + if (!m) + { + FIXME("no memorysizer for data type=%02x\n", *pFormat); + return 0; + } + + return m(pStubMsg, pFormat); +} + + unsigned char * WINAPI ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, @@ -1776,7 +1798,7 @@ unsigned char * WINAPI ComplexFree(PMIDL return pMemory; } -unsigned long WINAPI ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, +unsigned long WINAPI ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat) { PFORMAT_STRING desc; @@ -1814,7 +1836,7 @@ unsigned long WINAPI ComplexStructSize(P size += pFormat[1]; pFormat += 2; desc = pFormat + *(const SHORT*)pFormat; - size += EmbeddedComplexSize(pStubMsg, desc); + size += EmbeddedComplexMemorySize(pStubMsg, desc); pFormat += 2; continue; case RPC_FC_PAD: @@ -1940,7 +1962,6 @@ unsigned long WINAPI NdrComplexStructMem unsigned size = *(const WORD*)(pFormat+2); PFORMAT_STRING conf_array = NULL; PFORMAT_STRING pointer_desc = NULL; - unsigned long saved_memory_size; TRACE("(%p,%p)\n", pStubMsg, pFormat); @@ -1952,9 +1973,7 @@ unsigned long WINAPI NdrComplexStructMem if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2; - saved_memory_size = pStubMsg->MemorySize; - ComplexStructSize(pStubMsg, pFormat); - pStubMsg->MemorySize = saved_memory_size; + ComplexStructMemorySize(pStubMsg, pFormat); if (conf_array) NdrConformantArrayMemorySize(pStubMsg, conf_array); @@ -2333,7 +2352,7 @@ unsigned char * WINAPI NdrComplexArrayUn pFormat = ReadVariance(pStubMsg, pFormat); Buffer = pStubMsg->Buffer; - esize = ComplexStructSize(pStubMsg, pFormat); + esize = ComplexStructMemorySize(pStubMsg, pFormat); pStubMsg->Buffer = Buffer; if (fMustAlloc || !*ppMemory) @@ -2426,13 +2445,13 @@ unsigned long WINAPI NdrComplexArrayMemo SavedMemorySize = pStubMsg->MemorySize; Buffer = pStubMsg->Buffer; - esize = ComplexStructSize(pStubMsg, pFormat); + esize = ComplexStructMemorySize(pStubMsg, pFormat); pStubMsg->Buffer = Buffer; MemorySize = esize * pStubMsg->MaxCount; for (count = 0; count < pStubMsg->ActualCount; count++) - ComplexStructSize(pStubMsg, pFormat); + ComplexStructMemorySize(pStubMsg, pFormat); pStubMsg->MemorySize = SavedMemorySize;
1
0
0
0
Robert Shearman : rpcrt4: Fix embedded pointers in arrays by taking into account the iteration when calculating the appropriate memory and buffer pointers .
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 788ce20deac20cb68ba1330de3dd95e92ab1c506 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=788ce20deac20cb68ba1330…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon May 15 13:34:47 2006 +0100 rpcrt4: Fix embedded pointers in arrays by taking into account the iteration when calculating the appropriate memory and buffer pointers. --- dlls/rpcrt4/ndr_marshall.c | 45 ++++++++++++++++++++++++++------------------ 1 files changed, 27 insertions(+), 18 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 0fbf0f3..678c38f 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -981,6 +981,7 @@ unsigned char * WINAPI EmbeddedPointerMa unsigned char *Mark = pStubMsg->BufferMark; unsigned long Offset = pStubMsg->Offset; unsigned ofs, rep, count, stride, xofs; + unsigned i; TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); @@ -1016,17 +1017,17 @@ unsigned char * WINAPI EmbeddedPointerMa pFormat += 8; break; } - /* ofs doesn't seem to matter in this context */ - while (rep) { + for (i = 0; i < rep; i++) { PFORMAT_STRING info = pFormat; - unsigned char *membase = pMemory + xofs; + unsigned char *membase = pMemory + (i * stride); + unsigned char *bufbase = Mark + (i * stride); unsigned u; + /* ofs doesn't seem to matter in this context */ for (u=0; u<count; u++,info+=8) { unsigned char *memptr = membase + *(const SHORT*)&info[0]; - unsigned char *bufptr = Mark + *(const SHORT*)&info[2]; + unsigned char *bufptr = bufbase + *(const SHORT*)&info[2]; PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4); } - rep--; } pFormat += 8 * count; } @@ -1047,6 +1048,7 @@ unsigned char * WINAPI EmbeddedPointerUn unsigned char *Mark = pStubMsg->BufferMark; unsigned long Offset = pStubMsg->Offset; unsigned ofs, rep, count, stride, xofs; + unsigned i; TRACE("(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc); @@ -1054,6 +1056,7 @@ unsigned char * WINAPI EmbeddedPointerUn pFormat += 2; while (pFormat[0] != RPC_FC_END) { + TRACE("pFormat[0] = 0x%x\n", pFormat[0]); switch (pFormat[0]) { default: FIXME("unknown repeat type %d\n", pFormat[0]); @@ -1083,16 +1086,17 @@ unsigned char * WINAPI EmbeddedPointerUn break; } /* ofs doesn't seem to matter in this context */ - while (rep) { + for (i = 0; i < rep; i++) { PFORMAT_STRING info = pFormat; - unsigned char *membase = *ppMemory + xofs; + unsigned char *membase = *ppMemory + (i * stride); + unsigned char *bufbase = Mark + (i * stride); unsigned u; for (u=0; u<count; u++,info+=8) { unsigned char *memptr = membase + *(const SHORT*)&info[0]; - unsigned char *bufptr = Mark + *(const SHORT*)&info[2]; + unsigned char *bufptr = bufbase + *(const SHORT*)&info[2]; + *(void **)memptr = NULL; PointerUnmarshall(pStubMsg, bufptr, (unsigned char**)memptr, info+4, fMustAlloc); } - rep--; } pFormat += 8 * count; } @@ -1109,8 +1113,12 @@ void WINAPI EmbeddedPointerBufferSize(PM { unsigned long Offset = pStubMsg->Offset; unsigned ofs, rep, count, stride, xofs; + unsigned i; TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); + + if (pStubMsg->IgnoreEmbeddedPointers) return; + if (*pFormat != RPC_FC_PP) return; pFormat += 2; @@ -1144,15 +1152,14 @@ void WINAPI EmbeddedPointerBufferSize(PM break; } /* ofs doesn't seem to matter in this context */ - while (rep) { + for (i = 0; i < rep; i++) { PFORMAT_STRING info = pFormat; - unsigned char *membase = pMemory + xofs; + unsigned char *membase = pMemory + (i * stride); unsigned u; for (u=0; u<count; u++,info+=8) { unsigned char *memptr = membase + *(const SHORT*)&info[0]; PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4); } - rep--; } pFormat += 8 * count; } @@ -1167,8 +1174,10 @@ unsigned long WINAPI EmbeddedPointerMemo unsigned long Offset = pStubMsg->Offset; unsigned char *Mark = pStubMsg->BufferMark; unsigned ofs, rep, count, stride, xofs; + unsigned i; FIXME("(%p,%p): stub\n", pStubMsg, pFormat); + if (*pFormat != RPC_FC_PP) return 0; pFormat += 2; @@ -1202,14 +1211,14 @@ unsigned long WINAPI EmbeddedPointerMemo break; } /* ofs doesn't seem to matter in this context */ - while (rep) { + for (i = 0; i < rep; i++) { PFORMAT_STRING info = pFormat; + unsigned char *bufbase = Mark + (i * stride); unsigned u; for (u=0; u<count; u++,info+=8) { - unsigned char *bufptr = Mark + *(const SHORT*)&info[2]; + unsigned char *bufptr = bufbase + *(const SHORT*)&info[2]; PointerMemorySize(pStubMsg, bufptr, info+4); } - rep--; } pFormat += 8 * count; } @@ -1226,6 +1235,7 @@ void WINAPI EmbeddedPointerFree(PMIDL_ST { unsigned long Offset = pStubMsg->Offset; unsigned ofs, rep, count, stride, xofs; + unsigned i; TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); if (*pFormat != RPC_FC_PP) return; @@ -1261,15 +1271,14 @@ void WINAPI EmbeddedPointerFree(PMIDL_ST break; } /* ofs doesn't seem to matter in this context */ - while (rep) { + for (i = 0; i < rep; i++) { PFORMAT_STRING info = pFormat; - unsigned char *membase = pMemory + xofs; + unsigned char *membase = pMemory + (i * stride); unsigned u; for (u=0; u<count; u++,info+=8) { unsigned char *memptr = membase + *(const SHORT*)&info[0]; PointerFree(pStubMsg, *(unsigned char**)memptr, info+4); } - rep--; } pFormat += 8 * count; }
1
0
0
0
Ivan Gyurdiev : wined3d: Shaders: share dump_param function, version functions.
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 8b7401c39a47e8cfd402940cd8333ddc56266656 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8b7401c39a47e8cfd402940…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Sun May 14 09:43:31 2006 -0400 wined3d: Shaders: share dump_param function, version functions. --- dlls/wined3d/baseshader.c | 152 ++++++++++++++++++++++++++++++++++++++-- dlls/wined3d/pixelshader.c | 137 +----------------------------------- dlls/wined3d/vertexshader.c | 110 ++--------------------------- dlls/wined3d/wined3d_private.h | 17 ++++ 4 files changed, 174 insertions(+), 242 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=8b7401c39a47e8cfd40…
1
0
0
0
Ivan Gyurdiev : wined3d: Fix incorrect sizeof.
by Alexandre Julliard
15 May '06
15 May '06
Module: wine Branch: refs/heads/master Commit: 7757d7bc5ce1ec6f123a5d9166aecff2a8fec477 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7757d7bc5ce1ec6f123a5d9…
Author: Ivan Gyurdiev <ivg2(a)cornell.edu> Date: Sun May 14 03:44:27 2006 -0400 wined3d: Fix incorrect sizeof. --- dlls/wined3d/stateblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 9c0e851..af08451 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -202,7 +202,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_Ca memory) just do the copy */ if (src->changed) { TRACE("Updating lights for light %ld\n", src->OriginalIndex); - memcpy(&src->OriginalParms, &realLight->OriginalParms, sizeof(PLIGHTINFOEL)); + memcpy(&src->OriginalParms, &realLight->OriginalParms, sizeof(src->OriginalParms)); } /* If 'enabledchanged' then its a LightEnable command */
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200