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
2025
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
List overview
Download
Ros-diffs
September 2008
----- 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
ros-diffs@reactos.org
27 participants
747 discussions
Start a n
N
ew thread
[cgutman] 36193: - unimplemented -> implemented
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 12:07:30 2008 New Revision: 36193 URL:
http://svn.reactos.org/svn/reactos?rev=36193&view=rev
Log: - unimplemented -> implemented Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c branches/aicom-network-fixes/drivers/network/ndis/ndis/efilter.c branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 12:07:30 2008 @@ -465,7 +465,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/efilter.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/efilter.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/efilter.c [iso-8859-1] Sat Sep 13 12:07:30 2008 @@ -59,7 +59,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT @@ -100,7 +100,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] Sat Sep 13 12:07:30 2008 @@ -198,7 +198,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT @@ -819,7 +819,7 @@ /* - * @unimplemented + * @implemented */ NDIS_STATUS EXPORT
16 years, 3 months
1
0
0
0
[cgutman] 36192: - Implement NdisDprFreePacket - Implement NdisDprFreePacketNonInterlocked
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 11:40:45 2008 New Revision: 36192 URL:
http://svn.reactos.org/svn/reactos?rev=36192&view=rev
Log: - Implement NdisDprFreePacket - Implement NdisDprFreePacketNonInterlocked Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 11:40:45 2008 @@ -791,7 +791,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT @@ -803,11 +803,17 @@ * Packet = Pointer to packet to free */ { -} - - -/* - * @unimplemented + NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet)); + + KeAcquireSpinLockAtDpcLevel(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock); + Packet->Private.Head = (PNDIS_BUFFER)((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList; + ((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList = Packet; + KeReleaseSpinLockFromDpcLevel(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock); +} + + +/* + * @implemented */ VOID EXPORT @@ -819,6 +825,10 @@ * Packet = Pointer to packet to free */ { + NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet)); + + Packet->Private.Head = (PNDIS_BUFFER)((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList; + ((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList = Packet; }
16 years, 3 months
1
0
0
0
[cgutman] 36191: - Implement NdisDprAllocatePacketNonInterlocked
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 11:36:43 2008 New Revision: 36191 URL:
http://svn.reactos.org/svn/reactos?rev=36191&view=rev
Log: - Implement NdisDprAllocatePacketNonInterlocked Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 11:36:43 2008 @@ -745,7 +745,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT @@ -761,7 +761,32 @@ * PoolHandle = Handle returned by NdisAllocatePacketPool */ { - *Status = NDIS_STATUS_FAILURE; + PNDIS_PACKET Temp; + PNDISI_PACKET_POOL Pool = (PNDISI_PACKET_POOL)PoolHandle; + + NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n", + Status, Packet, PoolHandle)); + + *Packet = NULL; + + if (Pool == NULL) + { + *Status = NDIS_STATUS_FAILURE; + return; + } + + if (Pool->FreeList) { + Temp = Pool->FreeList; + Pool->FreeList = (PNDIS_PACKET)Temp->Private.Head; + + RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE)); + Temp->Private.Pool = Pool; + + *Packet = Temp; + *Status = NDIS_STATUS_SUCCESS; + } else { + *Status = NDIS_STATUS_RESOURCES; + } }
16 years, 3 months
1
0
0
0
[cgutman] 36190: - Implement NdisDprAllocatePacket
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 11:33:23 2008 New Revision: 36190 URL:
http://svn.reactos.org/svn/reactos?rev=36190&view=rev
Log: - Implement NdisDprAllocatePacket Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 11:33:23 2008 @@ -694,7 +694,7 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT @@ -710,7 +710,37 @@ * PoolHandle = Handle returned by NdisAllocatePacketPool */ { - *Status = NDIS_STATUS_FAILURE; + PNDIS_PACKET Temp; + PNDISI_PACKET_POOL Pool = (PNDISI_PACKET_POOL)PoolHandle; + + NDIS_DbgPrint(MAX_TRACE, ("Status (0x%X) Packet (0x%X) PoolHandle (0x%X).\n", + Status, Packet, PoolHandle)); + + *Packet = NULL; + + if (Pool == NULL) + { + *Status = NDIS_STATUS_FAILURE; + return; + } + + KeAcquireSpinLockAtDpcLevel(&Pool->SpinLock.SpinLock); + + if (Pool->FreeList) { + Temp = Pool->FreeList; + Pool->FreeList = (PNDIS_PACKET)Temp->Private.Head; + + KeReleaseSpinLockFromDpcLevel(&Pool->SpinLock.SpinLock); + + RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE)); + Temp->Private.Pool = Pool; + + *Packet = Temp; + *Status = NDIS_STATUS_SUCCESS; + } else { + *Status = NDIS_STATUS_RESOURCES; + KeReleaseSpinLockFromDpcLevel(&Pool->SpinLock.SpinLock); + } }
16 years, 3 months
1
0
0
0
[cwittich] 36189: sync rpc4rt winetests as well
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 13 11:18:44 2008 New Revision: 36189 URL:
http://svn.reactos.org/svn/reactos?rev=36189&view=rev
Log: sync rpc4rt winetests as well Modified: trunk/rostests/winetests/rpcrt4/cstub.c trunk/rostests/winetests/rpcrt4/generated.c trunk/rostests/winetests/rpcrt4/ndr_marshall.c trunk/rostests/winetests/rpcrt4/rpc.c trunk/rostests/winetests/rpcrt4/server.c trunk/rostests/winetests/rpcrt4/server.idl Modified: trunk/rostests/winetests/rpcrt4/cstub.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/cstub.c?…
============================================================================== --- trunk/rostests/winetests/rpcrt4/cstub.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/cstub.c [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -30,6 +30,7 @@ #include <winerror.h> +#include "initguid.h" #include "rpc.h" #include "rpcdce.h" #include "rpcproxy.h" Modified: trunk/rostests/winetests/rpcrt4/generated.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/generate…
============================================================================== --- trunk/rostests/winetests/rpcrt4/generated.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/generated.c [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -308,12 +308,12 @@ { /* ARRAY_INFO (pack 4) */ TEST_TYPE(ARRAY_INFO, 24, 4); - TEST_FIELD(ARRAY_INFO, long, Dimension, 0, 4, 4); - TEST_FIELD(ARRAY_INFO, unsigned long *, BufferConformanceMark, 4, 4, 4); - TEST_FIELD(ARRAY_INFO, unsigned long *, BufferVarianceMark, 8, 4, 4); - TEST_FIELD(ARRAY_INFO, unsigned long *, MaxCountArray, 12, 4, 4); - TEST_FIELD(ARRAY_INFO, unsigned long *, OffsetArray, 16, 4, 4); - TEST_FIELD(ARRAY_INFO, unsigned long *, ActualCountArray, 20, 4, 4); + TEST_FIELD(ARRAY_INFO, LONG, Dimension, 0, 4, 4); + TEST_FIELD(ARRAY_INFO, ULONG *, BufferConformanceMark, 4, 4, 4); + TEST_FIELD(ARRAY_INFO, ULONG *, BufferVarianceMark, 8, 4, 4); + TEST_FIELD(ARRAY_INFO, ULONG *, MaxCountArray, 12, 4, 4); + TEST_FIELD(ARRAY_INFO, ULONG *, OffsetArray, 16, 4, 4); + TEST_FIELD(ARRAY_INFO, ULONG *, ActualCountArray, 20, 4, 4); } static void test_pack_COMM_FAULT_OFFSETS(void) @@ -328,8 +328,8 @@ { /* CS_STUB_INFO (pack 4) */ TEST_TYPE(CS_STUB_INFO, 12, 4); - TEST_FIELD(CS_STUB_INFO, unsigned long, WireCodeset, 0, 4, 4); - TEST_FIELD(CS_STUB_INFO, unsigned long, DesiredReceivingCodeset, 4, 4, 4); + TEST_FIELD(CS_STUB_INFO, ULONG, WireCodeset, 0, 4, 4); + TEST_FIELD(CS_STUB_INFO, ULONG, DesiredReceivingCodeset, 4, 4, 4); TEST_FIELD(CS_STUB_INFO, void *, CSArrayInfo, 8, 4, 4); } @@ -344,7 +344,7 @@ TEST_TYPE(FULL_PTR_TO_REFID_ELEMENT, 16, 4); TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, struct _FULL_PTR_TO_REFID_ELEMENT *, Next, 0, 4, 4); TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, void *, Pointer, 4, 4, 4); - TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned long, RefId, 8, 4, 4); + TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, ULONG, RefId, 8, 4, 4); TEST_FIELD(FULL_PTR_TO_REFID_ELEMENT, unsigned char, State, 12, 1, 1); } @@ -404,20 +404,19 @@ TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferStart, 8, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferEnd, 12, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, BufferMark, 16, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, BufferLength, 20, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, MemorySize, 24, 4, 4); + TEST_FIELD(MIDL_STUB_MESSAGE, ULONG, BufferLength, 20, 4, 4); + TEST_FIELD(MIDL_STUB_MESSAGE, ULONG, MemorySize, 24, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, Memory, 28, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, int, IsClient, 32, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, int, ReuseBuffer, 36, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_ALLOC_ALL_NODES_CONTEXT *, pAllocAllNodesContext, 40, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, struct NDR_POINTER_QUEUE_STATE *, pPointerQueueState, 44, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, int, IgnoreEmbeddedPointers, 48, 4, 4); TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char *, PointerBufferMark, 52, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, fBufferValid, 56, 1, 1); + TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, CorrDespIncrement, 56, 1, 1); TEST_FIELD(MIDL_STUB_MESSAGE, unsigned char, uFlags, 57, 1, 1); TEST_FIELD(MIDL_STUB_MESSAGE, ULONG_PTR, MaxCount, 60, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, Offset, 64, 4, 4); - TEST_FIELD(MIDL_STUB_MESSAGE, unsigned long, ActualCount, 68, 4, 4); + TEST_FIELD(MIDL_STUB_MESSAGE, ULONG, Offset, 64, 4, 4); + TEST_FIELD(MIDL_STUB_MESSAGE, ULONG, ActualCount, 68, 4, 4); } static void test_pack_MIDL_STUBLESS_PROXY_INFO(void) @@ -464,6 +463,19 @@ TEST_TYPE(NDR_SCONTEXT, 4, 4); } +static void test_pack_NDR_USER_MARSHAL_INFO(void) +{ + /* NDR_USER_MARSHAL_INFO (pack 4) */ + TEST_FIELD(NDR_USER_MARSHAL_INFO, ULONG, InformationLevel, 0, 4, 4); +} + +static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void) +{ + /* NDR_USER_MARSHAL_INFO_LEVEL1 (pack 4) */ + TEST_FIELD(NDR_USER_MARSHAL_INFO_LEVEL1, void *, Buffer, 0, 4, 4); + TEST_FIELD(NDR_USER_MARSHAL_INFO_LEVEL1, ULONG, BufferSize, 4, 4, 4); +} + static void test_pack_PARRAY_INFO(void) { /* PARRAY_INFO */ @@ -563,7 +575,7 @@ { /* SCONTEXT_QUEUE (pack 4) */ TEST_TYPE(SCONTEXT_QUEUE, 8, 4); - TEST_FIELD(SCONTEXT_QUEUE, unsigned long, NumberOfObjects, 0, 4, 4); + TEST_FIELD(SCONTEXT_QUEUE, ULONG, NumberOfObjects, 0, 4, 4); TEST_FIELD(SCONTEXT_QUEUE, NDR_SCONTEXT *, ArrayOfObjects, 4, 4, 4); } @@ -580,10 +592,10 @@ static void test_pack_USER_MARSHAL_CB(void) { /* USER_MARSHAL_CB (pack 4) */ - TEST_FIELD(USER_MARSHAL_CB, unsigned long, Flags, 0, 4, 4); + TEST_FIELD(USER_MARSHAL_CB, ULONG, Flags, 0, 4, 4); TEST_FIELD(USER_MARSHAL_CB, PMIDL_STUB_MESSAGE, pStubMsg, 4, 4, 4); TEST_FIELD(USER_MARSHAL_CB, PFORMAT_STRING, pReserve, 8, 4, 4); - TEST_FIELD(USER_MARSHAL_CB, unsigned long, Signature, 12, 4, 4); + TEST_FIELD(USER_MARSHAL_CB, ULONG, Signature, 12, 4, 4); } static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void) @@ -649,6 +661,8 @@ test_pack_NDR_NOTIFY_ROUTINE(); test_pack_NDR_RUNDOWN(); test_pack_NDR_SCONTEXT(); + test_pack_NDR_USER_MARSHAL_INFO(); + test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(); test_pack_PARRAY_INFO(); test_pack_PFORMAT_STRING(); test_pack_PFULL_PTR_TO_REFID_ELEMENT(); Modified: trunk/rostests/winetests/rpcrt4/ndr_marshall.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/ndr_mars…
============================================================================== --- trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -97,6 +97,41 @@ }; static RPC_IF_HANDLE IFoo_v0_0_s_ifspec = (RPC_IF_HANDLE)& IFoo___RpcServerInterface; +static BOOL use_pointer_ids = FALSE; + +static void determine_pointer_marshalling_style(void) +{ + RPC_MESSAGE RpcMessage; + MIDL_STUB_MESSAGE StubMsg; + MIDL_STUB_DESC StubDesc; + char ch = 0xde; + + static const unsigned char fmtstr_up_char[] = + { + 0x12, 0x8, /* FC_UP [simple_pointer] */ + 0x2, /* FC_CHAR */ + 0x5c, /* FC_PAD */ + }; + + StubDesc = Object_StubDesc; + StubDesc.pFormatTypes = NULL; + + NdrClientInitializeNew( + &RpcMessage, + &StubMsg, + &StubDesc, + 0); + + StubMsg.BufferLength = 8; + StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); + NdrPointerMarshall(&StubMsg, (unsigned char*)&ch, fmtstr_up_char); + ok(StubMsg.Buffer == StubMsg.BufferStart + 5, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); + + use_pointer_ids = (*(unsigned int *)StubMsg.BufferStart != (unsigned int)&ch); + trace("Pointer marshalling using %s\n", use_pointer_ids ? "pointer ids" : "pointer value"); + + HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); +} static void test_ndr_simple_type(void) { @@ -423,8 +458,11 @@ ch = 0xa5; ch_ptr = &ch; - *(void**)wiredata = ch_ptr; - wiredata[sizeof(void*)] = ch; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)ch_ptr; + wiredata[4] = ch; test_pointer_marshal(fmtstr_up_char, ch_ptr, 1, wiredata, 5, NULL, 0, "up_char"); test_pointer_marshal(fmtstr_up_byte, ch_ptr, 1, wiredata, 5, NULL, 0, "up_byte"); @@ -437,21 +475,30 @@ test_pointer_marshal(fmtstr_rpup_char2, ch_ptr, 1, wiredata, 5, NULL, 0, "rpup_char2"); s = 0xa597; - *(void**)wiredata = &s; - *(unsigned short*)(wiredata + sizeof(void*)) = s; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&s; + *(unsigned short*)(wiredata + 4) = s; test_pointer_marshal(fmtstr_up_wchar, &s, 2, wiredata, 6, NULL, 0, "up_wchar"); test_pointer_marshal(fmtstr_up_short, &s, 2, wiredata, 6, NULL, 0, "up_short"); test_pointer_marshal(fmtstr_up_ushort, &s, 2, wiredata, 6, NULL, 0, "up_ushort"); i = 0x7fff; - *(void**)wiredata = &i; - *(unsigned short*)(wiredata + sizeof(void*)) = i; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&i; + *(unsigned short*)(wiredata + 4) = i; test_pointer_marshal(fmtstr_up_enum16, &i, 2, wiredata, 6, NULL, 0, "up_enum16"); l = 0xcafebabe; - *(void**)wiredata = &l; - *(unsigned long*)(wiredata + sizeof(void*)) = l; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&l; + *(unsigned long*)(wiredata + 4) = l; test_pointer_marshal(fmtstr_up_long, &l, 4, wiredata, 8, NULL, 0, "up_long"); test_pointer_marshal(fmtstr_up_ulong, &l, 4, wiredata, 8, NULL, 0, "up_ulong"); @@ -459,20 +506,29 @@ test_pointer_marshal(fmtstr_up_errorstatus, &l, 4, wiredata, 8, NULL, 0, "up_errorstatus"); ll = ((ULONGLONG)0xcafebabe) << 32 | 0xdeadbeef; - *(void**)wiredata = ≪ - *(void**)(wiredata + sizeof(void*)) = NULL; - *(ULONGLONG*)(wiredata + 2 * sizeof(void*)) = ll; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)≪ + *(unsigned int **)(wiredata + 4) = 0; + *(ULONGLONG*)(wiredata + 8) = ll; test_pointer_marshal(fmtstr_up_longlong, &ll, 8, wiredata, 16, NULL, 0, "up_longlong"); f = 3.1415f; - *(void**)wiredata = &f; - *(float*)(wiredata + sizeof(void*)) = f; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&f; + *(float*)(wiredata + 4) = f; test_pointer_marshal(fmtstr_up_float, &f, 4, wiredata, 8, NULL, 0, "up_float"); d = 3.1415; - *(void**)wiredata = &d; - *(void**)(wiredata + sizeof(void*)) = NULL; - *(double*)(wiredata + 2 * sizeof(void*)) = d; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&d; + *(unsigned int *)(wiredata + 4) = 0; + *(double*)(wiredata + 8) = d; test_pointer_marshal(fmtstr_up_double, &d, 8, wiredata, 16, NULL, 0, "up_double"); } @@ -877,6 +933,9 @@ }; + /* zero the entire structure, including the holes */ + memset(&s1, 0, sizeof(s1)); + /* FC_STRUCT */ s1.s = 0x1234; s1.c = 0xa5; @@ -888,13 +947,19 @@ memcpy(wiredata, &s1, wiredatalen); test_simple_struct_marshal(fmtstr_simple_struct + 4, &s1, 24, wiredata, 24, NULL, 0, "struct"); - *(void**)wiredata = &s1; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&s1; memcpy(wiredata + 4, &s1, wiredatalen); if (0) { /* one of the unmarshallings crashes Wine */ test_pointer_marshal(fmtstr_simple_struct, &s1, 24, wiredata, 28, NULL, 0, "struct"); } + + /* zero the entire structure, including the hole */ + memset(&ps1, 0, sizeof(ps1)); /* FC_PSTRUCT */ ps1.l1 = 0xdeadbeef; @@ -902,12 +967,25 @@ ps1.pl1 = &l; c = 'a'; ps1.pc1 = &c; - memcpy(wiredata + 4, &ps1, 12); + *(unsigned int *)(wiredata + 4) = 0xdeadbeef; + if (use_pointer_ids) + { + *(unsigned int *)(wiredata + 8) = 0x20000; + *(unsigned int *)(wiredata + 12) = 0x20004; + } + else + { + *(unsigned int *)(wiredata + 8) = (unsigned int)&l; + *(unsigned int *)(wiredata + 12) = (unsigned int)&c; + } memcpy(wiredata + 16, &l, 4); memcpy(wiredata + 20, &c, 1); test_simple_struct_marshal(fmtstr_pointer_struct + 4, &ps1, 17, wiredata + 4, 17, ps1_cmp, 2, "pointer_struct"); - *(void**)wiredata = &ps1; + if (use_pointer_ids) + *(unsigned int *)wiredata = 0x20000; + else + *(unsigned int *)wiredata = (unsigned int)&ps1; if (0) { /* one of the unmarshallings crashes Wine */ @@ -1083,10 +1161,12 @@ ok(stubMsg.IsClient == 1, "stubMsg.IsClient should have been 1 instead of %u\n", stubMsg.IsClient); TEST_ZERO(ReuseBuffer, "%d"); TEST_ZERO(pAllocAllNodesContext, "%p"); - TEST_ZERO(pPointerQueueState, "%p"); + ok(stubMsg.pPointerQueueState == 0 || + broken(stubMsg.pPointerQueueState == (void *)0xcccccccc), /* win2k */ + "stubMsg.pPointerQueueState should have been unset instead of %p\n", stubMsg.pPointerQueueState); TEST_ZERO(IgnoreEmbeddedPointers, "%d"); TEST_ZERO(PointerBufferMark, "%p"); - TEST_ZERO(fBufferValid, "%d"); + TEST_ZERO(CorrDespIncrement, "%d"); TEST_ZERO(uFlags, "%d"); /* FIXME: UniquePtrCount */ TEST_ULONG_PTR_UNSET(MaxCount); @@ -1104,12 +1184,23 @@ TEST_ZERO(PointerLength, "%d"); TEST_ZERO(fInDontFree, "%d"); TEST_ZERO(fDontCallFreeInst, "%d"); - TEST_ZERO(fInOnlyParam, "%d"); + ok(stubMsg.fInOnlyParam == 0 || + stubMsg.fInOnlyParam == -1, /* Vista */ + "fInOnlyParam should have been set to 0 or -1 instead of %d\n", stubMsg.fInOnlyParam); TEST_ZERO(fHasReturn, "%d"); TEST_ZERO(fHasExtensions, "%d"); TEST_ZERO(fHasNewCorrDesc, "%d"); - TEST_ZERO(fUnused, "%d"); - ok(stubMsg.fUnused2 == 0xffffcccc, "stubMsg.fUnused2 should have been 0xcccc instead of 0x%x\n", stubMsg.fUnused2); + TEST_ZERO(fIsIn, "%d"); + TEST_ZERO(fIsOut, "%d"); + TEST_ZERO(fIsOicf, "%d"); + TEST_ZERO(fBufferValid, "%d"); + TEST_ZERO(fHasMemoryValidateCallback, "%d"); + TEST_ZERO(fInFree, "%d"); + TEST_ZERO(fNeedMCCP, "%d"); + ok(stubMsg.fUnused == 0 || + stubMsg.fUnused == -2, /* Vista */ + "fUnused should have been set to 0 or -2 instead of %d\n", stubMsg.fUnused); + ok(stubMsg.fUnused2 == 0xffffcccc, "stubMsg.fUnused2 should have been 0xffffcccc instead of 0x%x\n", stubMsg.fUnused2); ok(stubMsg.dwDestContext == MSHCTX_DIFFERENTMACHINE, "stubMsg.dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %d\n", stubMsg.dwDestContext); TEST_ZERO(pvDestContext, "%p"); TEST_POINTER_UNSET(SavedContextHandles); @@ -1175,12 +1266,18 @@ TEST_ULONG_UNSET(MemorySize); TEST_POINTER_UNSET(Memory); ok(stubMsg.IsClient == 0, "stubMsg.IsClient should have been 0 instead of %u\n", stubMsg.IsClient); - TEST_ZERO(ReuseBuffer, "%d"); + ok(stubMsg.ReuseBuffer == 0 || + broken(stubMsg.ReuseBuffer == 1), /* win2k */ + "stubMsg.ReuseBuffer should have been set to zero instead of %d\n", stubMsg.ReuseBuffer); TEST_ZERO(pAllocAllNodesContext, "%p"); - TEST_ZERO(pPointerQueueState, "%p"); + ok(stubMsg.pPointerQueueState == 0 || + broken(stubMsg.pPointerQueueState == (void *)0xcccccccc), /* win2k */ + "stubMsg.pPointerQueueState should have been unset instead of %p\n", stubMsg.pPointerQueueState); TEST_ZERO(IgnoreEmbeddedPointers, "%d"); TEST_ZERO(PointerBufferMark, "%p"); - ok(stubMsg.fBufferValid == 0xcc, "fBufferValid should have been unset instead of 0x%x\n", stubMsg.fBufferValid); + ok(stubMsg.CorrDespIncrement == 0xcc || + stubMsg.CorrDespIncrement == 0, + "CorrDespIncrement should have been unset instead of 0x%x\n", stubMsg.CorrDespIncrement); TEST_ZERO(uFlags, "%d"); /* FIXME: UniquePtrCount */ TEST_ULONG_PTR_UNSET(MaxCount); @@ -1198,12 +1295,23 @@ TEST_ZERO(PointerLength, "%d"); TEST_ZERO(fInDontFree, "%d"); TEST_ZERO(fDontCallFreeInst, "%d"); - TEST_ZERO(fInOnlyParam, "%d"); + ok(stubMsg.fInOnlyParam == 0 || + stubMsg.fInOnlyParam == -1, /* Vista */ + "fInOnlyParam should have been set to 0 or -1 instead of %d\n", stubMsg.fInOnlyParam); TEST_ZERO(fHasReturn, "%d"); TEST_ZERO(fHasExtensions, "%d"); TEST_ZERO(fHasNewCorrDesc, "%d"); - TEST_ZERO(fUnused, "%d"); - ok(stubMsg.fUnused2 == 0xffffcccc, "stubMsg.fUnused2 should have been 0xcccc instead of 0x%x\n", stubMsg.fUnused2); + TEST_ZERO(fIsIn, "%d"); + TEST_ZERO(fIsOut, "%d"); + TEST_ZERO(fIsOicf, "%d"); + trace("fBufferValid = %d\n", stubMsg.fBufferValid); + TEST_ZERO(fHasMemoryValidateCallback, "%d"); + TEST_ZERO(fInFree, "%d"); + TEST_ZERO(fNeedMCCP, "%d"); + ok(stubMsg.fUnused == 0 || + stubMsg.fUnused == -2, /* Vista */ + "fUnused should have been set to 0 or -2 instead of %d\n", stubMsg.fUnused); + ok(stubMsg.fUnused2 == 0xffffcccc, "stubMsg.fUnused2 should have been 0xffffcccc instead of 0x%x\n", stubMsg.fUnused2); ok(stubMsg.dwDestContext == MSHCTX_DIFFERENTMACHINE, "stubMsg.dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %d\n", stubMsg.dwDestContext); TEST_ZERO(pvDestContext, "%p"); TEST_POINTER_UNSET(SavedContextHandles); @@ -1315,6 +1423,7 @@ void *ptr; unsigned char *mem, *mem_orig; unsigned char memsrc[20]; + unsigned int i; static const unsigned char fmtstr_conf_array[] = { @@ -1328,6 +1437,9 @@ 0x5b /* FC_END */ }; + for (i = 0; i < sizeof(memsrc); i++) + memsrc[i] = i * i; + StubDesc = Object_StubDesc; StubDesc.pFormatTypes = fmtstr_conf_array; @@ -1702,6 +1814,105 @@ ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); HeapFree(GetProcessHeap(), 0, mem_orig); + HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); +} + +static void test_conf_complex_struct(void) +{ + RPC_MESSAGE RpcMessage; + MIDL_STUB_MESSAGE StubMsg; + MIDL_STUB_DESC StubDesc; + void *ptr; + unsigned int i; + struct conf_complex + { + unsigned int size; + unsigned int *array[1]; + }; + struct conf_complex *memsrc; + struct conf_complex *mem; + + static const unsigned char fmtstr_complex_struct[] = + { +/* 0 */ + 0x1b, /* FC_CARRAY */ + 0x3, /* 3 */ +/* 2 */ NdrFcShort( 0x4 ), /* 4 */ +/* 4 */ 0x8, /* Corr desc: FC_LONG */ + 0x0, /* */ +/* 6 */ NdrFcShort( 0xfffc ), /* -4 */ +/* 8 */ + 0x4b, /* FC_PP */ + 0x5c, /* FC_PAD */ +/* 10 */ + 0x48, /* FC_VARIABLE_REPEAT */ + 0x49, /* FC_FIXED_OFFSET */ +/* 12 */ NdrFcShort( 0x4 ), /* 4 */ +/* 14 */ NdrFcShort( 0x0 ), /* 0 */ +/* 16 */ NdrFcShort( 0x1 ), /* 1 */ +/* 18 */ NdrFcShort( 0x0 ), /* 0 */ +/* 20 */ NdrFcShort( 0x0 ), /* 0 */ +/* 22 */ 0x12, 0x8, /* FC_UP [simple_pointer] */ +/* 24 */ 0x8, /* FC_LONG */ + 0x5c, /* FC_PAD */ +/* 26 */ + 0x5b, /* FC_END */ + + 0x8, /* FC_LONG */ +/* 28 */ 0x5c, /* FC_PAD */ + 0x5b, /* FC_END */ +/* 30 */ + 0x1a, /* FC_BOGUS_STRUCT */ + 0x3, /* 3 */ +/* 32 */ NdrFcShort( 0x4 ), /* 4 */ +/* 34 */ NdrFcShort( 0xffffffde ), /* Offset= -34 (0) */ +/* 36 */ NdrFcShort( 0x0 ), /* Offset= 0 (36) */ +/* 38 */ 0x8, /* FC_LONG */ + 0x5b, /* FC_END */ + }; + + memsrc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + FIELD_OFFSET(struct conf_complex, array[20])); + memsrc->size = 20; + + StubDesc = Object_StubDesc; + StubDesc.pFormatTypes = fmtstr_complex_struct; + + NdrClientInitializeNew( + &RpcMessage, + &StubMsg, + &StubDesc, + 0); + + StubMsg.BufferLength = 0; + NdrComplexStructBufferSize( &StubMsg, + (unsigned char *)memsrc, + &fmtstr_complex_struct[30] ); + ok(StubMsg.BufferLength >= 28, "length %d\n", StubMsg.BufferLength); + + /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ + StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); + StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; + + ptr = NdrComplexStructMarshall( &StubMsg, (unsigned char *)memsrc, + &fmtstr_complex_struct[30] ); + ok(ptr == NULL, "ret %p\n", ptr); + ok(*(unsigned int *)StubMsg.BufferStart == 20, "Conformance should have been 20 instead of %d\n", (unsigned int)StubMsg.BufferStart); + ok(*(unsigned int *)(StubMsg.BufferStart + 4) == 20, "conf_complex.size should have been 20 instead of %d\n", (unsigned int)(StubMsg.BufferStart + 4)); + for (i = 0; i < 20; i++) + ok(*(unsigned int *)(StubMsg.BufferStart + 8 + i * 4) == 0, "pointer id for conf_complex.array[%d] should have been 0 instead of 0x%x\n", i, *(unsigned int *)(StubMsg.BufferStart + 8 + i * 4)); + + /* Server */ + my_alloc_called = 0; + StubMsg.IsClient = 0; + mem = NULL; + StubMsg.Buffer = StubMsg.BufferStart; + ptr = NdrComplexStructUnmarshall( &StubMsg, (unsigned char **)&mem, &fmtstr_complex_struct[30], 0); + ok(ptr == NULL, "ret %p\n", ptr); + ok(mem->size == 20, "mem->size wasn't unmarshalled correctly (%d)\n", mem->size); + ok(mem->array[0] == NULL, "mem->array[0] wasn't unmarshalled correctly (%p)\n", mem->array[0]); + StubMsg.pfnFree(mem); + HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); } @@ -1716,6 +1927,8 @@ unsigned char *binding; RPC_BINDING_HANDLE Handle; RPC_STATUS status; + ULONG prev_buffer_length; + BOOL old_buffer_valid_location; StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface; @@ -1744,23 +1957,33 @@ ok(ret == StubMsg.Buffer, "NdrGetBuffer should have returned the same value as StubMsg.Buffer instead of %p\n", ret); ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n"); ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n"); - ok(RpcMessage.BufferLength == 10, "RpcMessage.BufferLength should have been 10 instead of %d\n", RpcMessage.BufferLength); + ok(RpcMessage.BufferLength == 10 || + broken(RpcMessage.BufferLength == 12), /* win2k */ + "RpcMessage.BufferLength should have been 10 instead of %d\n", RpcMessage.BufferLength); ok(RpcMessage.RpcFlags == 0, "RpcMessage.RpcFlags should have been 0x0 instead of 0x%lx\n", RpcMessage.RpcFlags); ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); ok(!StubMsg.BufferStart, "BufferStart should have been NULL instead of %p\n", StubMsg.BufferStart); ok(!StubMsg.BufferEnd, "BufferEnd should have been NULL instead of %p\n", StubMsg.BufferEnd); todo_wine ok(StubMsg.BufferLength == 0, "BufferLength should have left as 0 instead of being set to %d\n", StubMsg.BufferLength); - ok(StubMsg.fBufferValid == TRUE, "fBufferValid should have been TRUE instead of 0x%x\n", StubMsg.fBufferValid); - + old_buffer_valid_location = !StubMsg.fBufferValid; + if (old_buffer_valid_location) + ok(broken(StubMsg.CorrDespIncrement == TRUE), "fBufferValid should have been TRUE instead of 0x%x\n", StubMsg.CorrDespIncrement); + else + ok(StubMsg.fBufferValid, "fBufferValid should have been non-zero instead of 0x%x\n", StubMsg.fBufferValid); + + prev_buffer_length = RpcMessage.BufferLength; StubMsg.BufferLength = 1; NdrFreeBuffer(&StubMsg); ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n"); ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n"); - ok(RpcMessage.BufferLength == 10, "RpcMessage.BufferLength should have been left as 10 instead of %d\n", RpcMessage.BufferLength); + ok(RpcMessage.BufferLength == prev_buffer_length, "RpcMessage.BufferLength should have been left as %d instead of %d\n", prev_buffer_length, RpcMessage.BufferLength); ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); ok(StubMsg.BufferLength == 1, "BufferLength should have left as 1 instead of being set to %d\n", StubMsg.BufferLength); - ok(StubMsg.fBufferValid == FALSE, "fBufferValid should have been FALSE instead of 0x%x\n", StubMsg.fBufferValid); + if (old_buffer_valid_location) + ok(broken(StubMsg.CorrDespIncrement == FALSE), "fBufferValid should have been FALSE instead of 0x%x\n", StubMsg.CorrDespIncrement); + else + ok(!StubMsg.fBufferValid, "fBufferValid should have been FALSE instead of %d\n", StubMsg.fBufferValid); /* attempt double-free */ NdrFreeBuffer(&StubMsg); @@ -1816,6 +2039,8 @@ START_TEST( ndr_marshall ) { + determine_pointer_marshalling_style(); + test_ndr_simple_type(); test_simple_types(); test_nontrivial_pointer_types(); @@ -1827,6 +2052,7 @@ test_conformant_array(); test_conformant_string(); test_nonconformant_string(); + test_conf_complex_struct(); test_ndr_buffer(); test_NdrMapCommAndFaultStatus(); } Modified: trunk/rostests/winetests/rpcrt4/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpc.c?re…
============================================================================== --- trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -261,6 +261,10 @@ ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, + RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status); + status = RpcMgmtStopServerListening(NULL); ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", status); @@ -325,7 +329,9 @@ BOOL same; ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); + ok(ret == RPC_S_OK || + broken(ret == RPC_S_INVALID_RPC_PROTSEQ), /* Vista */ + "TowerConstruct failed with error %ld\n", ret); if (ret == RPC_S_INVALID_RPC_PROTSEQ) { /* Windows Vista fails with this error and crashes if we continue */ @@ -388,7 +394,9 @@ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\\pipe\\test", NULL, &tower); ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK || + broken(ret != RPC_S_OK), /* win2k, indeterminate */ + "TowerExplode failed with error %ld\n", ret); /* Windows XP SP3 sets address to NULL */ ok(!address || !strcmp(address, ""), "address was \"%s\" instead of \"\"\n or NULL (XP SP3)", address); @@ -400,7 +408,13 @@ { LONG win32status; RPC_STATUS rpc_status; + BOOL on_win9x = FALSE; BOOL w2k3_up = FALSE; + + /* Win9x always returns the given status */ + win32status = I_RpcMapWin32Status(ERROR_ACCESS_DENIED); + if (win32status == ERROR_ACCESS_DENIED) + on_win9x = TRUE; /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */ win32status = I_RpcMapWin32Status(9999); @@ -410,9 +424,14 @@ w2k3_up = TRUE; } + /* On Windows XP-SP1 and below some statuses are not mapped and return + * the given status + */ for (rpc_status = 0; rpc_status < 10000; rpc_status++) { LONG expected_win32status; + BOOL missing = FALSE; + win32status = I_RpcMapWin32Status(rpc_status); switch (rpc_status) { @@ -425,10 +444,10 @@ case ERROR_MAX_THRDS_REACHED: expected_win32status = STATUS_NO_MEMORY; break; case ERROR_NOACCESS: expected_win32status = STATUS_ACCESS_VIOLATION; break; case ERROR_NOT_ENOUGH_SERVER_MEMORY: expected_win32status = STATUS_INSUFF_SERVER_RESOURCES; break; - case ERROR_WRONG_PASSWORD: expected_win32status = STATUS_WRONG_PASSWORD; break; - case ERROR_INVALID_LOGON_HOURS: expected_win32status = STATUS_INVALID_LOGON_HOURS; break; - case ERROR_PASSWORD_EXPIRED: expected_win32status = STATUS_PASSWORD_EXPIRED; break; - case ERROR_ACCOUNT_DISABLED: expected_win32status = STATUS_ACCOUNT_DISABLED; break; + case ERROR_WRONG_PASSWORD: expected_win32status = STATUS_WRONG_PASSWORD; missing = TRUE; break; + case ERROR_INVALID_LOGON_HOURS: expected_win32status = STATUS_INVALID_LOGON_HOURS; missing = TRUE; break; + case ERROR_PASSWORD_EXPIRED: expected_win32status = STATUS_PASSWORD_EXPIRED; missing = TRUE; break; + case ERROR_ACCOUNT_DISABLED: expected_win32status = STATUS_ACCOUNT_DISABLED; missing = TRUE; break; case ERROR_INVALID_SECURITY_DESCR: expected_win32status = STATUS_INVALID_SECURITY_DESCR; break; case RPC_S_INVALID_STRING_BINDING: expected_win32status = RPC_NT_INVALID_STRING_BINDING; break; case RPC_S_WRONG_KIND_OF_BINDING: expected_win32status = RPC_NT_WRONG_KIND_OF_BINDING; break; @@ -502,10 +521,10 @@ case RPC_S_FP_OVERFLOW: expected_win32status = RPC_NT_FP_OVERFLOW; break; case RPC_S_CALL_IN_PROGRESS: expected_win32status = RPC_NT_CALL_IN_PROGRESS; break; case RPC_S_NO_MORE_BINDINGS: expected_win32status = RPC_NT_NO_MORE_BINDINGS; break; - case RPC_S_CALL_CANCELLED: expected_win32status = RPC_NT_CALL_CANCELLED; break; + case RPC_S_CALL_CANCELLED: expected_win32status = RPC_NT_CALL_CANCELLED; missing = TRUE; break; case RPC_S_INVALID_OBJECT: expected_win32status = RPC_NT_INVALID_OBJECT; break; - case RPC_S_INVALID_ASYNC_HANDLE: expected_win32status = RPC_NT_INVALID_ASYNC_HANDLE; break; - case RPC_S_INVALID_ASYNC_CALL: expected_win32status = RPC_NT_INVALID_ASYNC_CALL; break; + case RPC_S_INVALID_ASYNC_HANDLE: expected_win32status = RPC_NT_INVALID_ASYNC_HANDLE; missing = TRUE; break; + case RPC_S_INVALID_ASYNC_CALL: expected_win32status = RPC_NT_INVALID_ASYNC_CALL; missing = TRUE; break; case RPC_S_GROUP_MEMBER_NOT_FOUND: expected_win32status = RPC_NT_GROUP_MEMBER_NOT_FOUND; break; case RPC_X_NO_MORE_ENTRIES: expected_win32status = RPC_NT_NO_MORE_ENTRIES; break; case RPC_X_SS_CHAR_TRANS_OPEN_FAIL: expected_win32status = RPC_NT_SS_CHAR_TRANS_OPEN_FAIL; break; @@ -518,19 +537,26 @@ case RPC_X_ENUM_VALUE_OUT_OF_RANGE: expected_win32status = RPC_NT_ENUM_VALUE_OUT_OF_RANGE; break; case RPC_X_BYTE_COUNT_TOO_SMALL: expected_win32status = RPC_NT_BYTE_COUNT_TOO_SMALL; break; case RPC_X_BAD_STUB_DATA: expected_win32status = RPC_NT_BAD_STUB_DATA; break; - case RPC_X_PIPE_CLOSED: expected_win32status = RPC_NT_PIPE_CLOSED; break; - case RPC_X_PIPE_DISCIPLINE_ERROR: expected_win32status = RPC_NT_PIPE_DISCIPLINE_ERROR; break; - case RPC_X_PIPE_EMPTY: expected_win32status = RPC_NT_PIPE_EMPTY; break; - case ERROR_PASSWORD_MUST_CHANGE: expected_win32status = STATUS_PASSWORD_MUST_CHANGE; break; - case ERROR_ACCOUNT_LOCKED_OUT: expected_win32status = STATUS_ACCOUNT_LOCKED_OUT; break; + case RPC_X_PIPE_CLOSED: expected_win32status = RPC_NT_PIPE_CLOSED; missing = TRUE; break; + case RPC_X_PIPE_DISCIPLINE_ERROR: expected_win32status = RPC_NT_PIPE_DISCIPLINE_ERROR; missing = TRUE; break; + case RPC_X_PIPE_EMPTY: expected_win32status = RPC_NT_PIPE_EMPTY; missing = TRUE; break; + case ERROR_PASSWORD_MUST_CHANGE: expected_win32status = STATUS_PASSWORD_MUST_CHANGE; missing = TRUE; break; + case ERROR_ACCOUNT_LOCKED_OUT: expected_win32status = STATUS_ACCOUNT_LOCKED_OUT; missing = TRUE; break; default: if (w2k3_up) expected_win32status = STATUS_UNSUCCESSFUL; else expected_win32status = rpc_status; } - ok(win32status == expected_win32status, "I_RpcMapWin32Status(%ld) should have returned 0x%x instead of 0x%x\n", - rpc_status, expected_win32status, win32status); + + if (on_win9x) + missing = TRUE; + + ok(win32status == expected_win32status || + broken(missing && win32status == rpc_status), + "I_RpcMapWin32Status(%ld) should have returned 0x%x instead of 0x%x%s\n", + rpc_status, expected_win32status, win32status, + broken(missing) ? " (or have returned with the given status)" : ""); } } @@ -554,7 +580,6 @@ ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); - todo_wine ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint); todo_wine ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options); @@ -570,7 +595,6 @@ ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); - todo_wine ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint); todo_wine ok(options && !strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options); @@ -588,9 +612,7 @@ /* test with invalid uuid */ status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL); - todo_wine ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %ld\n", status); - todo_wine ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); /* test with invalid endpoint */ @@ -644,6 +666,10 @@ ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", exception, EXCEPTION_CONTINUE_SEARCH, retval); break; + case STATUS_IN_PAGE_ERROR: + case STATUS_HANDLE_NOT_CLOSABLE: + trace("I_RpcExceptionFilter(0x%x) returned %d\n", exception, retval); + break; default: ok(retval == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", exception, EXCEPTION_EXECUTE_HANDLER, retval); @@ -651,15 +677,104 @@ } } +static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address, + RPC_CSTR endpoint) +{ + static unsigned char annotation[] = "Test annotation string."; + RPC_STATUS status; + RPC_BINDING_VECTOR *binding_vector; + handle_t handle; + unsigned char *binding; + + status = RpcServerUseProtseqEp(protseq, 20, endpoint, NULL); + ok(status == RPC_S_OK, "%s: RpcServerUseProtseqEp failed (%lu)\n", protseq, status); + + status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); + ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%lu)\n", protseq, status); + + status = RpcServerInqBindings(&binding_vector); + ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %lu\n", protseq, status); + + status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation); + ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status); + + status = RpcStringBindingCompose(NULL, protseq, address, + NULL, NULL, &binding); + ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%lu)\n", protseq, status); + + status = RpcBindingFromStringBinding(binding, &handle); + ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%lu)\n", protseq, status); + + RpcStringFree(&binding); + + status = RpcBindingReset(handle); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + + RpcStringFree(&binding); + + status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec); + ok(status == RPC_S_OK, "%s: RpcEpResolveBinding failed with error %lu\n", protseq, status); + + status = RpcBindingReset(handle); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + + status = RpcBindingFree(&handle); + ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %lu\n", protseq, status); + + status = RpcServerUnregisterIf(NULL, NULL, FALSE); + ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%lu)\n", protseq, status); + + status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL); + ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %lu\n", protseq, status); + + status = RpcBindingVectorFree(&binding_vector); + ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %lu\n", protseq, status); +} + +static void test_RpcStringBindingFromBinding(void) +{ + static unsigned char ncacn_np[] = "ncacn_np"; + static unsigned char address[] = "."; + static unsigned char endpoint[] = "\\pipe\\wine_rpc_test"; + RPC_STATUS status; + handle_t handle; + RPC_CSTR binding; + + status = RpcStringBindingCompose(NULL, ncacn_np, address, + endpoint, NULL, &binding); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + + status = RpcBindingFromStringBinding(binding, &handle); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + RpcStringFree(&binding); + + status = RpcBindingToStringBinding(handle, &binding); + ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status); + + ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"), + "binding string didn't match what was expected: \"%s\"\n", binding); + RpcStringFree(&binding); + + status = RpcBindingFree(&handle); + ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); +} + START_TEST( rpc ) { - trace ( " ** Uuid Conversion and Comparison Tests **\n" ); + static unsigned char ncacn_np[] = "ncacn_np"; + static unsigned char ncalrpc[] = "ncalrpc"; + static unsigned char np_address[] = "."; + static unsigned char np_endpoint[] = "\\pipe\\wine_rpc_test"; + static unsigned char lrpc_endpoint[] = "wine_rpc_test"; + UuidConversionAndComparison(); - trace ( " ** DceErrorInqText **\n"); TestDceErrorInqText(); test_rpc_ncacn_ip_tcp(); test_towers(); test_I_RpcMapWin32Status(); test_RpcStringBindingParseA(); test_I_RpcExceptionFilter(); -} + test_endpoint_mapper(ncacn_np, np_address, np_endpoint); + test_endpoint_mapper(ncalrpc, NULL, lrpc_endpoint); + test_RpcStringBindingFromBinding(); +} Modified: trunk/rostests/winetests/rpcrt4/server.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/server.c…
============================================================================== --- trunk/rostests/winetests/rpcrt4/server.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/server.c [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -333,10 +333,28 @@ } } +double +s_square_unencu(int t, unencu_t *eu) +{ + switch (t) + { + case ENCU_I: return eu->i * eu->i; + case ENCU_F: return eu->f * eu->f; + default: + return 0.0; + } +} + void s_check_se2(se_t *s) { ok(s->f == E2, "check_se2\n"); +} + +int +s_sum_parr(int *a[3]) +{ + return s_sum_pcarr(a, 3); } int @@ -346,12 +364,6 @@ for (i = 0; i < n; ++i) s += *a[i]; return s; -} - -int -s_sum_parr(int *a[3]) -{ - return s_sum_pcarr(a, 3); } int @@ -651,6 +663,24 @@ n[i].ppi = NULL; n[i].pppi = NULL; } +} + +void +s_get_numbers_struct(numbers_struct_t **ns) +{ + int i; + *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5])); + if (!*ns) return; + (*ns)->length = 5; + (*ns)->size = 5; + for (i = 0; i < (*ns)->length; i++) + { + (*ns)->numbers[i].pi = NULL; + (*ns)->numbers[i].ppi = NULL; + (*ns)->numbers[i].pppi = NULL; + } + (*ns)->numbers[0].pi = midl_user_allocate(sizeof(*(*ns)->numbers[i].pi)); + *(*ns)->numbers[0].pi = 5; } void @@ -826,6 +856,7 @@ { encue_t eue; encu_t eu; + unencu_t uneu; sun_t su; int i; @@ -853,6 +884,12 @@ eu.t = ENCU_F; eu.tagged_union.f = 3.0; ok(square_encu(&eu) == 9.0, "RPC square_encu\n"); + + uneu.i = 4; + ok(square_unencu(ENCU_I, &uneu) == 16.0, "RPC square_unencu\n"); + + uneu.f = 5.0; + ok(square_unencu(ENCU_F, &uneu) == 25.0, "RPC square_unencu\n"); eue.t = E1; eue.tagged_union.i1 = 8; @@ -1096,6 +1133,7 @@ doub_carr_t *dc; int *pi; pints_t api[5]; + numbers_struct_t *ns; ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n"); @@ -1177,12 +1215,22 @@ api[0].pi = pi; get_5numbers(1, api); ok(api[0].pi == pi, "RPC varying array [out] pointer changed from %p to %p\n", pi, api[0].pi); - ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *pi); + ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi); api[0].pi = pi; get_numbers(1, 1, api); ok(api[0].pi == pi, "RPC conformant varying array [out] pointer changed from %p to %p\n", pi, api[0].pi); - ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *pi); + ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi); + + ns = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(numbers_struct_t, numbers[5])); + ns->length = 5; + ns->size = 5; + ns->numbers[0].pi = pi; + get_numbers_struct(&ns); + ok(ns->numbers[0].pi == pi, "RPC conformant varying struct embedded pointer changed from %p to %p\n", pi, ns->numbers[0].pi); + ok(*ns->numbers[0].pi == 5, "pi unmarshalled incorrectly %d\n", *ns->numbers[0].pi); + + HeapFree(GetProcessHeap(), 0, ns); HeapFree(GetProcessHeap(), 0, pi); } @@ -1240,14 +1288,29 @@ static unsigned char np[] = "ncacn_np"; static unsigned char pipe[] = PIPE; RPC_STATUS status, iptcp_status, np_status; + RPC_STATUS (RPC_ENTRY *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*, + RPC_MGR_EPV*, unsigned int,unsigned int,RPC_IF_CALLBACK_FN*); + DWORD ret; iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status); np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); - ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status); - - //status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); - //ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); + if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) + skip("Protocol sequence ncacn_np is not supported\n"); + else + ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status); + + pRpcServerRegisterIfEx = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "RpcServerRegisterIfEx"); + if (pRpcServerRegisterIfEx) + { + trace("Using RpcServerRegisterIfEx\n"); + status = pRpcServerRegisterIfEx(IServer_v0_0_s_ifspec, NULL, NULL, + RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, + RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); + } + else + status = RpcServerRegisterIf(IServer_v0_0_s_ifspec, NULL, NULL); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); status = RpcServerListen(1, 20, TRUE); ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); stop_event = CreateEvent(NULL, FALSE, FALSE, NULL); @@ -1267,10 +1330,16 @@ return; } - ok(WAIT_OBJECT_0 == WaitForSingleObject(stop_event, 60000), "WaitForSingleObject\n"); - status = RpcMgmtWaitServerListen(); - todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); + ret = WaitForSingleObject(stop_event, 1000); + ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n"); + /* if the stop event didn't fire then RpcMgmtWaitServerListen will wait + * forever, so don't bother calling it in this case */ + if (ret == WAIT_OBJECT_0) + { + status = RpcMgmtWaitServerListen(); + todo_wine { + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); + } } } Modified: trunk/rostests/winetests/rpcrt4/server.idl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/server.i…
============================================================================== --- trunk/rostests/winetests/rpcrt4/server.idl [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/server.idl [iso-8859-1] Sat Sep 13 11:18:44 2008 @@ -195,6 +195,12 @@ case ENCU_F: float f; } encu_t; + typedef [switch_type(int)] union unencu + { + [case (ENCU_I)] int i; + [case (ENCU_F)] float f; + } unencu_t; + typedef enum { E1 = 23, @@ -215,6 +221,7 @@ } se_t; double square_encu(encu_t *eu); + double square_unencu(int t, [switch_is(t)] unencu_t *eu); int sum_parr(int *a[3]); int sum_pcarr([size_is(n)] int *a[], int n); int enum_ord(e_t e); @@ -319,8 +326,17 @@ type as a return value. */ s123_t *get_s123(void); + typedef struct + { + unsigned int length; + unsigned int size; + [size_is(size), length_is(length)] pints_t numbers[]; + } numbers_struct_t; + void get_5numbers([in] int count, [out, length_is(count)] pints_t pn[5]); void get_numbers([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]); + void get_numbers_struct([out] numbers_struct_t **ns); + str_t get_filename(void); void context_handle_test(void); void stop(void);
16 years, 3 months
1
0
0
0
[cwittich] 36188: sync most of rpcrt4 to wine 1.1.4
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 13 10:52:50 2008 New Revision: 36188 URL:
http://svn.reactos.org/svn/reactos?rev=36188&view=rev
Log: sync most of rpcrt4 to wine 1.1.4 Added: trunk/reactos/dll/win32/rpcrt4/ndr_es.c (with props) trunk/reactos/include/psdk/midles.h (with props) Modified: trunk/reactos/dll/win32/rpcrt4/cpsf.c trunk/reactos/dll/win32/rpcrt4/ndr_clientserver.c trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c trunk/reactos/dll/win32/rpcrt4/ndr_ole.c trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c trunk/reactos/dll/win32/rpcrt4/ndr_stubless.h trunk/reactos/dll/win32/rpcrt4/rpc_assoc.c trunk/reactos/dll/win32/rpcrt4/rpc_binding.c trunk/reactos/dll/win32/rpcrt4/rpc_binding.h trunk/reactos/dll/win32/rpcrt4/rpc_defs.h trunk/reactos/dll/win32/rpcrt4/rpc_message.c trunk/reactos/dll/win32/rpcrt4/rpc_message.h trunk/reactos/dll/win32/rpcrt4/rpc_transport.c trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec trunk/reactos/include/psdk/ndrtypes.h trunk/reactos/include/psdk/oleidl.idl trunk/reactos/include/psdk/rpcdce.h trunk/reactos/include/psdk/rpcdcep.h trunk/reactos/include/psdk/rpcndr.h trunk/reactos/include/psdk/rpcproxy.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/rpcrt4/cpsf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/cpsf.c?re…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_clientserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_clien…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_contexthandle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_conte…
Added: trunk/reactos/dll/win32/rpcrt4/ndr_es.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_es.c?…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_marshall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_marsh…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_ole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_ole.c…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_stubl…
Modified: trunk/reactos/dll/win32/rpcrt4/ndr_stubless.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_stubl…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_assoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_assoc…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_binding.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_bindi…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_binding.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_bindi…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_defs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_defs.…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_messa…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_message.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_messa…
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_transport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_trans…
Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.rb…
Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.sp…
Added: trunk/reactos/include/psdk/midles.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/midles.h?rev=…
Modified: trunk/reactos/include/psdk/ndrtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ndrtypes.h?re…
Modified: trunk/reactos/include/psdk/oleidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/oleidl.idl?re…
Modified: trunk/reactos/include/psdk/rpcdce.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcdce.h?rev=…
Modified: trunk/reactos/include/psdk/rpcdcep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcdcep.h?rev…
Modified: trunk/reactos/include/psdk/rpcndr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcndr.h?rev=…
Modified: trunk/reactos/include/psdk/rpcproxy.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcproxy.h?re…
16 years, 3 months
1
0
0
0
[cwittich] 36187: replace NtCurrentTeb()->ProcessEnvironmentBlock by NtCurrentPeb()
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 13 09:27:43 2008 New Revision: 36187 URL:
http://svn.reactos.org/svn/reactos?rev=36187&view=rev
Log: replace NtCurrentTeb()->ProcessEnvironmentBlock by NtCurrentPeb() Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Sat Sep 13 09:27:43 2008 @@ -195,17 +195,17 @@ Init(VOID) { /* Set up the kernel callbacks. */ - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] = (PVOID)User32CallWindowProcFromKernel; - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] = (PVOID)User32CallSendAsyncProcForKernel; - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] = (PVOID)User32LoadSysMenuTemplateForKernel; - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] = (PVOID)User32SetupDefaultCursors; - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_HOOKPROC] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_HOOKPROC] = (PVOID)User32CallHookProcFromKernel; - NtCurrentTeb()->ProcessEnvironmentBlock->KernelCallbackTable[USER32_CALLBACK_EVENTPROC] = + NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_EVENTPROC] = (PVOID)User32CallEventProcFromKernel; g_pi = GetW32ProcessInfo();
16 years, 3 months
1
0
0
0
[cgutman] 36186: - Hints from MSDN show that we should use MmGetSystemAddressForMdl instead of MmGetMdlVirtualAddress
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 07:45:26 2008 New Revision: 36186 URL:
http://svn.reactos.org/svn/reactos?rev=36186&view=rev
Log: - Hints from MSDN show that we should use MmGetSystemAddressForMdl instead of MmGetMdlVirtualAddress Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 07:45:26 2008 @@ -894,7 +894,7 @@ if (Buffer != NULL) { *_FirstBufferLength = MmGetMdlByteCount(Buffer); - *_FirstBufferVA = MmGetMdlVirtualAddress(Buffer); + *_FirstBufferVA = MmGetSystemAddressForMdl(Buffer); Buffer = Buffer->Next; } else { *_FirstBufferLength = 0;
16 years, 3 months
1
0
0
0
[cgutman] 36185: - Fix a possible crash
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 13 07:22:45 2008 New Revision: 36185 URL:
http://svn.reactos.org/svn/reactos?rev=36185&view=rev
Log: - Fix a possible crash Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep 13 07:22:45 2008 @@ -891,13 +891,15 @@ Buffer = _Packet->Private.Head; *_FirstBuffer = Buffer; - *_FirstBufferVA = MmGetMdlVirtualAddress(Buffer); if (Buffer != NULL) { *_FirstBufferLength = MmGetMdlByteCount(Buffer); + *_FirstBufferVA = MmGetMdlVirtualAddress(Buffer); Buffer = Buffer->Next; - } else + } else { *_FirstBufferLength = 0; + *_FirstBufferVA = NULL; + } *_TotalBufferLength = *_FirstBufferLength;
16 years, 3 months
1
0
0
0
[cwittich] 36184: fix some more kernel32_module winetests
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Sep 13 06:35:01 2008 New Revision: 36184 URL:
http://svn.reactos.org/svn/reactos?rev=36184&view=rev
Log: fix some more kernel32_module winetests Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ld…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] Sat Sep 13 06:35:01 2008 @@ -38,6 +38,7 @@ PWCHAR EnvironmentBufferW = NULL; LPCWSTR lpModuleEnd = NULL; UNICODE_STRING ModuleName; + DWORD LastError = GetLastError(); /* GetEnvironmentVariable changes LastError */ if (lpModule != NULL) { @@ -89,6 +90,7 @@ Pos += GetEnvironmentVariableW(L"PATH", EnvironmentBufferW + Pos, Length - Pos); EnvironmentBufferW[Pos] = 0; + SetLastError(LastError); return EnvironmentBufferW; } @@ -175,6 +177,7 @@ NTSTATUS Status; PWSTR SearchPath; ULONG DllCharacteristics; + BOOL FreeString = FALSE; (void)hFile; @@ -197,6 +200,17 @@ dwFlags & LOAD_WITH_ALTERED_SEARCH_PATH ? lpLibFileName : NULL); RtlInitUnicodeString(&DllName, (LPWSTR)lpLibFileName); + if (DllName.Buffer[DllName.Length/sizeof(WCHAR) - 1] == L' ') + { + RtlCreateUnicodeString(&DllName, (LPWSTR)lpLibFileName); + while (DllName.Length > sizeof(WCHAR) && + DllName.Buffer[DllName.Length/sizeof(WCHAR) - 1] == L' ') + { + DllName.Length -= sizeof(WCHAR); + } + DllName.Buffer[DllName.Length/sizeof(WCHAR)] = UNICODE_NULL; + FreeString = TRUE; + } if (InWindows) { /* Call the API Properly */ @@ -211,6 +225,8 @@ Status = LdrLoadDll(SearchPath, &dwFlags, &DllName, (PVOID*)&hInst); } RtlFreeHeap(RtlGetProcessHeap(), 0, SearchPath); + if (FreeString) + RtlFreeUnicodeString(&DllName); if ( !NT_SUCCESS(Status)) { SetLastErrorByStatus (Status);
16 years, 3 months
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
75
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
Results per page:
10
25
50
100
200