ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2011
----- 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
16 participants
274 discussions
Start a n
N
ew thread
[rharabien] 54404: [SHELL32] - Remove a not needed hack
by rharabien@svn.reactos.org
Author: rharabien Date: Thu Nov 17 14:33:35 2011 New Revision: 54404 URL:
http://svn.reactos.org/svn/reactos?rev=54404&view=rev
Log: [SHELL32] - Remove a not needed hack Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] Thu Nov 17 14:33:35 2011 @@ -1377,11 +1377,6 @@ HIMAGELIST ShellSmallIconList = 0; HIMAGELIST ShellBigIconList = 0; -void *operator new (size_t, void *buf) -{ - return buf; -} - /************************************************************************* * SHELL32 DllMain * @@ -1393,12 +1388,6 @@ TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad); if (dwReason == DLL_PROCESS_ATTACH) { - /* HACK - the global constructors don't run, so I placement new them here */ - new (&gModule) CShell32Module; - new (&_AtlWinModule) CAtlWinModule; - new (&_AtlBaseModule) CAtlBaseModule; - new (&_AtlComModule) CAtlComModule; - shell32_hInstance = hInstance; gModule.Init(ObjectMap, hInstance, NULL); @@ -1448,7 +1437,7 @@ } /*********************************************************************** - * DllRegisterServer (BROWSEUI.@) + * DllRegisterServer (SHELL32.@) */ STDAPI DllRegisterServer() { @@ -1463,7 +1452,7 @@ } /*********************************************************************** - * DllUnregisterServer (BROWSEUI.@) + * DllUnregisterServer (SHELL32.@) */ STDAPI DllUnregisterServer() {
13 years, 1 month
1
0
0
0
[rharabien] 54403: [SHELL32] - Register Printers folder in ControlPanel namespace. Fixes "Printers is not a GUID" warning
by rharabien@svn.reactos.org
Author: rharabien Date: Thu Nov 17 14:31:19 2011 New Revision: 54403 URL:
http://svn.reactos.org/svn/reactos?rev=54403&view=rev
Log: [SHELL32] - Register Printers folder in ControlPanel namespace. Fixes "Printers is not a GUID" warning Modified: trunk/reactos/dll/win32/shell32/res/rgs/printers.rgs Modified: trunk/reactos/dll/win32/shell32/res/rgs/printers.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/rgs/…
============================================================================== --- trunk/reactos/dll/win32/shell32/res/rgs/printers.rgs [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/res/rgs/printers.rgs [iso-8859-1] Thu Nov 17 14:31:19 2011 @@ -32,7 +32,7 @@ { NoRemove Explorer { - NoRemove Desktop + NoRemove ControlPanel { NoRemove NameSpace {
13 years, 1 month
1
0
0
0
[cgutman] 54402: [NDIS] - Fix a critical bug in registry entry parsing that was causing all REG_SZ values to be reported as NdisParameterTypeInteger - Distinguish between NdisParameterTypeInteger a...
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 16 22:01:11 2011 New Revision: 54402 URL:
http://svn.reactos.org/svn/reactos?rev=54402&view=rev
Log: [NDIS] - Fix a critical bug in registry entry parsing that was causing all REG_SZ values to be reported as NdisParameterTypeInteger - Distinguish between NdisParameterTypeInteger and NdisParameterTypeHexInteger - 3Com NICs are fully functional now [bug 4330] Modified: trunk/reactos/drivers/network/ndis/ndis/config.c Modified: trunk/reactos/drivers/network/ndis/ndis/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Wed Nov 16 22:01:11 2011 @@ -320,304 +320,6 @@ *Status = NDIS_STATUS_SUCCESS; } - -/* - * @implemented - */ -VOID -EXPORT -NdisReadConfiguration( - OUT PNDIS_STATUS Status, - OUT PNDIS_CONFIGURATION_PARAMETER * ParameterValue, - IN NDIS_HANDLE ConfigurationHandle, - IN PNDIS_STRING Keyword, - IN NDIS_PARAMETER_TYPE ParameterType) -/* - * FUNCTION: Read a configuration value from the registry, tracking its resources - * ARGUMENTS: - * Status: points to a place to write status into - * ParameterValue: Pointer to receive a newly-allocated parameter structure - * ConfigurationHandle: handle originally returned by an open function - * Keyword: Value name to read, or one of the following constants: - * Environment - returns NdisEnvironmentWindowsNt - * ProcessorType - returns NdisProcessorX86 until more architectures are added - * NdisVersion - returns NDIS_VERSION - * ParameterType: the type of the value to be queried - * RETURNS: - * - A status in Status - * - A parameter value in ParameterValue - */ -{ - KEY_VALUE_PARTIAL_INFORMATION *KeyInformation; - ULONG KeyDataLength; - PMINIPORT_RESOURCE MiniportResource; - PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext = (PMINIPORT_CONFIGURATION_CONTEXT)ConfigurationHandle; - PVOID Buffer; - - *ParameterValue = NULL; - *Status = NDIS_STATUS_FAILURE; - - NDIS_DbgPrint(MAX_TRACE,("requested read of %wZ\n", Keyword)); - - if (ConfigurationContext == NULL) - { - NDIS_DbgPrint(MIN_TRACE,("invalid parameter ConfigurationContext (0x%x)\n",ConfigurationContext)); - return; - } - - if( - !wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR) - ) - { - *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); - if(!*ParameterValue) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); - if(!MiniportResource) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - ExFreePool(*ParameterValue); - *ParameterValue = NULL; - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; - MiniportResource->Resource = *ParameterValue; - - NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", - MiniportResource->Resource)); - - ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, - &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); - - (*ParameterValue)->ParameterType = NdisParameterInteger; - (*ParameterValue)->ParameterData.IntegerData = NdisEnvironmentWindowsNt; - *Status = NDIS_STATUS_SUCCESS; - - return; - } - - if( - !wcsncmp(Keyword->Buffer, L"ProcessorType", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"ProcessorType") == Keyword->Length/sizeof(WCHAR) - ) - { - *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); - if(!*ParameterValue) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); - if(!MiniportResource) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - ExFreePool(*ParameterValue); - *ParameterValue = NULL; - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; - MiniportResource->Resource = *ParameterValue; - NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); - ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, - &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); - - (*ParameterValue)->ParameterType = NdisParameterInteger; - (*ParameterValue)->ParameterData.IntegerData = NdisProcessorX86; /* XXX non-portable */ - *Status = NDIS_STATUS_SUCCESS; - - return; - } - - if( - !wcsncmp(Keyword->Buffer, L"NdisVersion", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"NdisVersion") == Keyword->Length/sizeof(WCHAR) - ) - { - *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); - if(!*ParameterValue) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); - if(!MiniportResource) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - ExFreePool(*ParameterValue); - *ParameterValue = NULL; - *Status = NDIS_STATUS_RESOURCES; - return; - } - - MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; - MiniportResource->Resource = *ParameterValue; - NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); - ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, - &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); - - (*ParameterValue)->ParameterType = NdisParameterInteger; - (*ParameterValue)->ParameterData.IntegerData = NDIS_VERSION; - *Status = NDIS_STATUS_SUCCESS; - - NDIS_DbgPrint(MAX_TRACE,("ParameterType = %0x%x, ParameterValue = 0x%x\n", - (*ParameterValue)->ParameterType, (*ParameterValue)->ParameterData.IntegerData)); - return; - } - - /* figure out how much buffer i should allocate */ - *Status = ZwQueryValueKey(ConfigurationContext->Handle, Keyword, KeyValuePartialInformation, NULL, 0, &KeyDataLength); - if(*Status != STATUS_BUFFER_OVERFLOW && *Status != STATUS_BUFFER_TOO_SMALL && *Status != STATUS_SUCCESS) - { - NDIS_DbgPrint(MID_TRACE,("ZwQueryValueKey #1 failed for %wZ, status 0x%x\n", Keyword, *Status)); - *Status = NDIS_STATUS_FAILURE; - return; - } - - /* allocate it */ - KeyInformation = ExAllocatePool(PagedPool, KeyDataLength + sizeof(KEY_VALUE_PARTIAL_INFORMATION)); - if(!KeyInformation) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - /* grab the value */ - *Status = ZwQueryValueKey(ConfigurationContext->Handle, Keyword, KeyValuePartialInformation, - KeyInformation, KeyDataLength + sizeof(KEY_VALUE_PARTIAL_INFORMATION), &KeyDataLength); - if(*Status != STATUS_SUCCESS) - { - ExFreePool(KeyInformation); - NDIS_DbgPrint(MIN_TRACE,("ZwQueryValueKey #2 failed for %wZ, status 0x%x\n", Keyword, *Status)); - *Status = NDIS_STATUS_FAILURE; - return; - } - - MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); - if(!MiniportResource) - { - NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); - ExFreePool(KeyInformation); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); - if (!*ParameterValue) - { - NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); - ExFreePool(MiniportResource); - ExFreePool(KeyInformation); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - RtlZeroMemory(*ParameterValue, sizeof(NDIS_CONFIGURATION_PARAMETER)); - - if (KeyInformation->Type == REG_BINARY) - { - NDIS_DbgPrint(MAX_TRACE, ("NdisParameterBinary\n")); - - (*ParameterValue)->ParameterType = NdisParameterBinary; - - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); - if (!Buffer) - { - NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); - ExFreePool(MiniportResource); - ExFreePool(KeyInformation); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); - - (*ParameterValue)->ParameterData.BinaryData.Buffer = Buffer; - (*ParameterValue)->ParameterData.BinaryData.Length = KeyInformation->DataLength; - } - else if (KeyInformation->Type == REG_MULTI_SZ) - { - NDIS_DbgPrint(MAX_TRACE, ("NdisParameterMultiString\n")); - - (*ParameterValue)->ParameterType = NdisParameterMultiString; - - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); - if (!Buffer) - { - NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); - ExFreePool(MiniportResource); - ExFreePool(KeyInformation); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); - - (*ParameterValue)->ParameterData.StringData.Buffer = Buffer; - (*ParameterValue)->ParameterData.StringData.Length = KeyInformation->DataLength; - } - else - { - UNICODE_STRING str; - - str.Length = str.MaximumLength = (USHORT)KeyInformation->DataLength; - str.Buffer = (PWCHAR)KeyInformation->Data; - - if ((*Status = RtlUnicodeStringToInteger(&str, 0, - &(*ParameterValue)->ParameterData.IntegerData)) == STATUS_SUCCESS) - { - NDIS_DbgPrint(MAX_TRACE, ("NdisParameterInteger\n")); - - (*ParameterValue)->ParameterType = NdisParameterInteger; - } - else - { - NDIS_DbgPrint(MAX_TRACE, ("NdisParameterString\n")); - - (*ParameterValue)->ParameterType = NdisParameterString; - - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); - if (!Buffer) - { - NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); - ExFreePool(MiniportResource); - ExFreePool(KeyInformation); - *Status = NDIS_STATUS_RESOURCES; - return; - } - - RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); - - (*ParameterValue)->ParameterData.StringData.Buffer = Buffer; - (*ParameterValue)->ParameterData.StringData.Length = KeyInformation->DataLength; - } - } - - MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; - MiniportResource->Resource = *ParameterValue; - - ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); - - ExFreePool(KeyInformation); - - *Status = NDIS_STATUS_SUCCESS; -} - - UCHAR UnicodeToHexByte(WCHAR chr) /* * FUNCTION: Converts a unicode hex character to its numerical value @@ -658,9 +360,354 @@ case L'f': return 15; } - return -1; + return 0xFF; } +BOOLEAN +IsValidNumericString(PNDIS_STRING String, NDIS_PARAMETER_TYPE *ParameterType) +/* + * FUNCTION: Determines if a string is a valid number + * ARGUMENTS: + * String: Unicode string to evaluate + * RETURNS: + * TRUE if it is valid, FALSE if not + */ +{ + ULONG i; + + /* I don't think this will ever happen, but we warn it if it does */ + if (String->Length == 0) + { + NDIS_DbgPrint(MIN_TRACE, ("Got an empty string; not sure what to do here\n")); + return FALSE; + } + + /* Set the default parameter type */ + *ParameterType = NdisParameterInteger; + + for (i = 0; i < String->Length / sizeof(WCHAR); i++) + { + /* Look at the second character for the base */ + if (i == 1) + { + if (String->Buffer[i] == L'X' || + String->Buffer[i] == L'x') + { + NDIS_DbgPrint(MID_TRACE, ("Identified hex string\n")); + *ParameterType = NdisParameterHexInteger; + continue; + } + } + + /* Skip any NULL characters we find */ + if (String->Buffer[i] == UNICODE_NULL) + continue; + + /* Make sure the character is valid for a numeric string */ + if (UnicodeToHexByte(String->Buffer[i]) == 0xFF) + return FALSE; + } + + /* It's valid */ + return TRUE; +} + +/* + * @implemented + */ +VOID +EXPORT +NdisReadConfiguration( + OUT PNDIS_STATUS Status, + OUT PNDIS_CONFIGURATION_PARAMETER * ParameterValue, + IN NDIS_HANDLE ConfigurationHandle, + IN PNDIS_STRING Keyword, + IN NDIS_PARAMETER_TYPE ParameterType) +/* + * FUNCTION: Read a configuration value from the registry, tracking its resources + * ARGUMENTS: + * Status: points to a place to write status into + * ParameterValue: Pointer to receive a newly-allocated parameter structure + * ConfigurationHandle: handle originally returned by an open function + * Keyword: Value name to read, or one of the following constants: + * Environment - returns NdisEnvironmentWindowsNt + * ProcessorType - returns NdisProcessorX86 until more architectures are added + * NdisVersion - returns NDIS_VERSION + * ParameterType: the type of the value to be queried + * RETURNS: + * - A status in Status + * - A parameter value in ParameterValue + */ +{ + KEY_VALUE_PARTIAL_INFORMATION *KeyInformation; + ULONG KeyDataLength; + PMINIPORT_RESOURCE MiniportResource; + PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext = (PMINIPORT_CONFIGURATION_CONTEXT)ConfigurationHandle; + PVOID Buffer; + + *ParameterValue = NULL; + *Status = NDIS_STATUS_FAILURE; + + NDIS_DbgPrint(MAX_TRACE,("requested read of %wZ\n", Keyword)); + + if (ConfigurationContext == NULL) + { + NDIS_DbgPrint(MIN_TRACE,("invalid parameter ConfigurationContext (0x%x)\n",ConfigurationContext)); + return; + } + + if( + !wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR) + ) + { + *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); + if(!*ParameterValue) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); + if(!MiniportResource) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + ExFreePool(*ParameterValue); + *ParameterValue = NULL; + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; + MiniportResource->Resource = *ParameterValue; + + NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", + MiniportResource->Resource)); + + ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, + &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); + + (*ParameterValue)->ParameterType = NdisParameterInteger; + (*ParameterValue)->ParameterData.IntegerData = NdisEnvironmentWindowsNt; + *Status = NDIS_STATUS_SUCCESS; + + return; + } + + if( + !wcsncmp(Keyword->Buffer, L"ProcessorType", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"ProcessorType") == Keyword->Length/sizeof(WCHAR) + ) + { + *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); + if(!*ParameterValue) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); + if(!MiniportResource) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + ExFreePool(*ParameterValue); + *ParameterValue = NULL; + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; + MiniportResource->Resource = *ParameterValue; + NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); + ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, + &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); + + (*ParameterValue)->ParameterType = NdisParameterInteger; + (*ParameterValue)->ParameterData.IntegerData = NdisProcessorX86; /* XXX non-portable */ + *Status = NDIS_STATUS_SUCCESS; + + return; + } + + if( + !wcsncmp(Keyword->Buffer, L"NdisVersion", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"NdisVersion") == Keyword->Length/sizeof(WCHAR) + ) + { + *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); + if(!*ParameterValue) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); + if(!MiniportResource) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + ExFreePool(*ParameterValue); + *ParameterValue = NULL; + *Status = NDIS_STATUS_RESOURCES; + return; + } + + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; + MiniportResource->Resource = *ParameterValue; + NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); + ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, + &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); + + (*ParameterValue)->ParameterType = NdisParameterInteger; + (*ParameterValue)->ParameterData.IntegerData = NDIS_VERSION; + *Status = NDIS_STATUS_SUCCESS; + + NDIS_DbgPrint(MAX_TRACE,("ParameterType = %0x%x, ParameterValue = 0x%x\n", + (*ParameterValue)->ParameterType, (*ParameterValue)->ParameterData.IntegerData)); + return; + } + + /* figure out how much buffer i should allocate */ + *Status = ZwQueryValueKey(ConfigurationContext->Handle, Keyword, KeyValuePartialInformation, NULL, 0, &KeyDataLength); + if(*Status != STATUS_BUFFER_OVERFLOW && *Status != STATUS_BUFFER_TOO_SMALL && *Status != STATUS_SUCCESS) + { + NDIS_DbgPrint(MID_TRACE,("ZwQueryValueKey #1 failed for %wZ, status 0x%x\n", Keyword, *Status)); + *Status = NDIS_STATUS_FAILURE; + return; + } + + /* allocate it */ + KeyInformation = ExAllocatePool(PagedPool, KeyDataLength + sizeof(KEY_VALUE_PARTIAL_INFORMATION)); + if(!KeyInformation) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + /* grab the value */ + *Status = ZwQueryValueKey(ConfigurationContext->Handle, Keyword, KeyValuePartialInformation, + KeyInformation, KeyDataLength + sizeof(KEY_VALUE_PARTIAL_INFORMATION), &KeyDataLength); + if(*Status != STATUS_SUCCESS) + { + ExFreePool(KeyInformation); + NDIS_DbgPrint(MIN_TRACE,("ZwQueryValueKey #2 failed for %wZ, status 0x%x\n", Keyword, *Status)); + *Status = NDIS_STATUS_FAILURE; + return; + } + + MiniportResource = ExAllocatePool(PagedPool, sizeof(MINIPORT_RESOURCE)); + if(!MiniportResource) + { + NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n")); + ExFreePool(KeyInformation); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); + if (!*ParameterValue) + { + NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + ExFreePool(MiniportResource); + ExFreePool(KeyInformation); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + RtlZeroMemory(*ParameterValue, sizeof(NDIS_CONFIGURATION_PARAMETER)); + + if (KeyInformation->Type == REG_BINARY) + { + NDIS_DbgPrint(MAX_TRACE, ("NdisParameterBinary\n")); + + (*ParameterValue)->ParameterType = NdisParameterBinary; + + Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + if (!Buffer) + { + NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + ExFreePool(MiniportResource); + ExFreePool(KeyInformation); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); + + (*ParameterValue)->ParameterData.BinaryData.Buffer = Buffer; + (*ParameterValue)->ParameterData.BinaryData.Length = KeyInformation->DataLength; + } + else if (KeyInformation->Type == REG_MULTI_SZ) + { + NDIS_DbgPrint(MAX_TRACE, ("NdisParameterMultiString\n")); + + (*ParameterValue)->ParameterType = NdisParameterMultiString; + + Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + if (!Buffer) + { + NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + ExFreePool(MiniportResource); + ExFreePool(KeyInformation); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); + + (*ParameterValue)->ParameterData.StringData.Buffer = Buffer; + (*ParameterValue)->ParameterData.StringData.Length = KeyInformation->DataLength; + } + else + { + UNICODE_STRING str; + + str.Length = str.MaximumLength = (USHORT)KeyInformation->DataLength; + str.Buffer = (PWCHAR)KeyInformation->Data; + + if (IsValidNumericString(&str, &(*ParameterValue)->ParameterType) && + ((*Status = RtlUnicodeStringToInteger(&str, 0, + &(*ParameterValue)->ParameterData.IntegerData)) == STATUS_SUCCESS)) + { + NDIS_DbgPrint(MAX_TRACE, ("NdisParameter(Hex)Integer\n")); + + /* IsValidNumericString sets the parameter type when parsing the string */ + } + else + { + NDIS_DbgPrint(MAX_TRACE, ("NdisParameterString\n")); + + (*ParameterValue)->ParameterType = NdisParameterString; + + Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + if (!Buffer) + { + NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + ExFreePool(MiniportResource); + ExFreePool(KeyInformation); + *Status = NDIS_STATUS_RESOURCES; + return; + } + + RtlCopyMemory(Buffer, KeyInformation->Data, KeyInformation->DataLength); + + (*ParameterValue)->ParameterData.StringData.Buffer = Buffer; + (*ParameterValue)->ParameterData.StringData.Length = KeyInformation->DataLength; + } + } + + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; + MiniportResource->Resource = *ParameterValue; + + ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); + + ExFreePool(KeyInformation); + + *Status = NDIS_STATUS_SUCCESS; +} /* * @implemented
13 years, 1 month
1
0
0
0
[tfaber] 54401: [ATL] - Fix buffer overflow in CComDynamicUnkArray::Add. Found by Coverity (CID 2474) [NDK] - Remove meaningless const attribute from pointer rvalues to make Coverity's life easier
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Nov 16 21:17:38 2011 New Revision: 54401 URL:
http://svn.reactos.org/svn/reactos?rev=54401&view=rev
Log: [ATL] - Fix buffer overflow in CComDynamicUnkArray::Add. Found by Coverity (CID 2474) [NDK] - Remove meaningless const attribute from pointer rvalues to make Coverity's life easier Modified: trunk/reactos/include/ndk/i386/ketypes.h trunk/reactos/include/ndk/ketypes.h trunk/reactos/lib/atl/atlcom.h Modified: trunk/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Wed Nov 16 21:17:38 2011 @@ -27,10 +27,10 @@ // KPCR Access for non-IA64 builds // #define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS)) -#define PCR ((KPCR * const)K0IPCR) +#define PCR ((KPCR *)K0IPCR) #if defined(CONFIG_SMP) || defined(NT_BUILD) #undef KeGetPcr -#define KeGetPcr() ((KPCR * const)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr))) +#define KeGetPcr() ((KPCR *)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr))) #endif // Modified: trunk/reactos/include/ndk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/ketypes.h [iso-8859-1] Wed Nov 16 21:17:38 2011 @@ -128,7 +128,7 @@ // // Dereferencable pointer to KUSER_SHARED_DATA in User-Mode // -#define SharedUserData ((KUSER_SHARED_DATA *CONST)USER_SHARED_DATA) +#define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA) // // Maximum WOW64 Entries in KUSER_SHARED_DATA Modified: trunk/reactos/lib/atl/atlcom.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/atlcom.h?rev=54401…
============================================================================== --- trunk/reactos/lib/atl/atlcom.h [iso-8859-1] (original) +++ trunk/reactos/lib/atl/atlcom.h [iso-8859-1] Wed Nov 16 21:17:38 2011 @@ -849,9 +849,10 @@ return 0; m_ppUnk = newArray; memset(&m_ppUnk[m_nSize], 0, (newSize - m_nSize) * sizeof(IUnknown *)); + curCookie = m_nSize + 1; m_nSize = newSize; - m_ppUnk[m_nSize] = pUnk; - return m_nSize + 1; + m_ppUnk[curCookie - 1] = pUnk; + return curCookie; } BOOL Remove(DWORD dwCookie)
13 years, 1 month
1
0
0
0
[tfaber] 54400: [ADVAPI32_WINETEST] - Fix running the test with a relative path. Already Sent Upstream(TM) - Do the rest of that tiny Winesync, too, while we're at it. Now at 1.3.33 - Remove the sp...
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Nov 16 20:53:18 2011 New Revision: 54400 URL:
http://svn.reactos.org/svn/reactos?rev=54400&view=rev
Log: [ADVAPI32_WINETEST] - Fix running the test with a relative path. Already Sent Upstream(TM) - Do the rest of that tiny Winesync, too, while we're at it. Now at 1.3.33 - Remove the spooler hack in the process. We don't actually need it Modified: trunk/rostests/winetests/advapi32/service.c Modified: trunk/rostests/winetests/advapi32/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/servic…
============================================================================== --- trunk/rostests/winetests/advapi32/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/service.c [iso-8859-1] Wed Nov 16 20:53:18 2011 @@ -32,9 +32,8 @@ #include "wine/test.h" -//static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ -static const CHAR spooler[] = "Eventlog"; /* All platform except reactos :-/ */ -static const CHAR* selfname; +static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ +static CHAR selfname[MAX_PATH]; static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID); static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, @@ -145,7 +144,6 @@ /* Proper SCM handle but different access rights */ scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); SetLastError(0xdeadbeef); - /* ReactOS. See top of the file */ svc_handle = OpenServiceA(scm_handle, spooler, GENERIC_WRITE); if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) skip("Not enough rights to get a handle to the service\n"); @@ -434,8 +432,7 @@ WCHAR displaynameW[2048]; DWORD displaysize, tempsize, tempsizeW; static const CHAR deadbeef[] = "Deadbeef"; - /* ReactOS. See top of the file */ - static const WCHAR spoolerW[] = {'E','v','e','n','t','l','o','g',0}; + static const WCHAR spoolerW[] = {'S','p','o','o','l','e','r',0}; static const WCHAR deadbeefW[] = {'D','e','a','d','b','e','e','f',0}; static const WCHAR abcW[] = {'A','B','C',0}; static const CHAR servicename[] = "Winetest"; @@ -1035,6 +1032,14 @@ else ok(statusproc->dwProcessId == 0, "Expect no process id for this stopped service\n"); + + /* same call with null needed pointer */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, NULL); + ok(!ret, "Expected failure\n"); + ok(broken(GetLastError() == ERROR_INVALID_PARAMETER) /* NT4 */ || + GetLastError() == ERROR_INVALID_ADDRESS, "got %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, statusproc); CloseServiceHandle(svc_handle); @@ -2316,7 +2321,7 @@ char** myARGV; myARGC = winetest_get_mainargs(&myARGV); - selfname = myARGV[0]; + GetFullPathNameA(myARGV[0], sizeof(selfname), selfname, NULL); if (myARGC >= 3) { if (strcmp(myARGV[2], "sleep") == 0)
13 years, 1 month
1
0
0
0
[osiejka] 54399: [TRANSLATION] - Romanian translation update (bug no. 6654) by Stefan Fulea; - Simplified Chineese translation of base/shell and system (bug no. 6655) by Song Fuchang; - Slovak tran...
by osiejka@svn.reactos.org
Author: osiejka Date: Wed Nov 16 20:16:21 2011 New Revision: 54399 URL:
http://svn.reactos.org/svn/reactos?rev=54399&view=rev
Log: [TRANSLATION] - Romanian translation update (bug no. 6654) by Stefan Fulea; - Simplified Chineese translation of base/shell and system (bug no. 6655) by Song Fuchang; - Slovak translation fixes (bug no. 6658) by Mario Kacmar; Added: trunk/reactos/base/shell/cmd/lang/zh-CN.rc (with props) trunk/reactos/base/shell/explorer-new/lang/zh-CN.rc (with props) trunk/reactos/base/system/format/lang/zh-CN.rc (with props) trunk/reactos/base/system/regsvr32/lang/zh-CN.rc (with props) trunk/reactos/base/system/rundll32/lang/zh-CN.rc (with props) trunk/reactos/base/system/runonce/lang/zh-CN.rc (with props) trunk/reactos/base/system/subst/lang/zh-CN.rc (with props) trunk/reactos/base/system/userinit/lang/zh-CN.rc (with props) Modified: trunk/reactos/base/applications/calc/lang/ro-RO.rc trunk/reactos/base/applications/calc/lang/sk-SK.rc trunk/reactos/base/applications/charmap/lang/ro-RO.rc trunk/reactos/base/applications/dxdiag/lang/sk-SK.rc trunk/reactos/base/applications/fontview/lang/sk-SK.rc trunk/reactos/base/applications/games/winmine/lang/ro-RO.rc trunk/reactos/base/applications/kbswitch/lang/sk-SK.rc trunk/reactos/base/applications/magnify/lang/ro-RO.rc trunk/reactos/base/applications/magnify/lang/sk-SK.rc trunk/reactos/base/applications/mmc/lang/sk-SK.rc trunk/reactos/base/applications/mplay32/lang/sk-SK.rc trunk/reactos/base/applications/msconfig/lang/sk-SK.rc trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc trunk/reactos/base/applications/mscutils/servman/lang/ro-RO.rc trunk/reactos/base/applications/mscutils/servman/lang/sk-SK.rc trunk/reactos/base/applications/mspaint/lang/ro-RO.rc trunk/reactos/base/applications/mstsc/lang/sk-SK.rc trunk/reactos/base/applications/network/ipconfig/lang/sk-SK.rc trunk/reactos/base/applications/notepad/lang/ro-RO.rc trunk/reactos/base/applications/screensavers/logon/lang/ro-RO.rc trunk/reactos/base/applications/taskmgr/lang/ro-RO.rc trunk/reactos/base/setup/usetup/lang/ro-RO.h trunk/reactos/base/setup/usetup/lang/sk-SK.h trunk/reactos/base/setup/vmwinst/lang/ro-RO.rc trunk/reactos/base/setup/welcome/rsrc.rc trunk/reactos/base/shell/cmd/rsrc.rc trunk/reactos/base/shell/explorer-new/explorer.rc trunk/reactos/base/system/diskpart/lang/ro-RO.rc trunk/reactos/base/system/format/rsrc.rc trunk/reactos/base/system/regsvr32/rsrc.rc trunk/reactos/base/system/rundll32/rsrc.rc trunk/reactos/base/system/runonce/rsrc.rc trunk/reactos/base/system/subst/rsrc.rc trunk/reactos/base/system/userinit/rsrc.rc trunk/reactos/boot/freeldr/fdebug/lang/ro-RO.rc trunk/reactos/dll/cpl/access/lang/ro-RO.rc trunk/reactos/dll/cpl/appwiz/lang/ro-RO.rc trunk/reactos/dll/cpl/console/lang/ro-RO.rc trunk/reactos/dll/cpl/desk/lang/ro-RO.rc trunk/reactos/dll/cpl/hdwwiz/lang/ro-RO.rc trunk/reactos/dll/cpl/input/lang/ro-RO.rc [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/calc/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/charmap/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
Modified: trunk/reactos/base/applications/dxdiag/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/l…
Modified: trunk/reactos/base/applications/fontview/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/fontview…
Modified: trunk/reactos/base/applications/games/winmine/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/games/wi…
Modified: trunk/reactos/base/applications/kbswitch/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
Modified: trunk/reactos/base/applications/magnify/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/magnify/…
Modified: trunk/reactos/base/applications/magnify/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/magnify/…
Modified: trunk/reactos/base/applications/mmc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mmc/lang…
Modified: trunk/reactos/base/applications/mplay32/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mplay32/…
Modified: trunk/reactos/base/applications/msconfig/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
Modified: trunk/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/servman/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/servman/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mspaint/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
Modified: trunk/reactos/base/applications/mstsc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/la…
Modified: trunk/reactos/base/applications/network/ipconfig/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
Modified: trunk/reactos/base/applications/notepad/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
Modified: trunk/reactos/base/applications/screensavers/logon/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensa…
Modified: trunk/reactos/base/applications/taskmgr/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
Modified: trunk/reactos/base/setup/usetup/lang/ro-RO.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ro-…
Modified: trunk/reactos/base/setup/usetup/lang/sk-SK.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sk-…
Modified: trunk/reactos/base/setup/vmwinst/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/vmwinst/lang/ro…
Modified: trunk/reactos/base/setup/welcome/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/rsrc.rc…
Added: trunk/reactos/base/shell/cmd/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/zh-CN.…
Modified: trunk/reactos/base/shell/cmd/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/rsrc.rc?rev…
Modified: trunk/reactos/base/shell/explorer-new/explorer.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ex…
Added: trunk/reactos/base/shell/explorer-new/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/la…
Modified: trunk/reactos/base/system/diskpart/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
Added: trunk/reactos/base/system/format/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/lang/zh…
Modified: trunk/reactos/base/system/format/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/rsrc.rc…
Added: trunk/reactos/base/system/regsvr32/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/regsvr32/lang/…
Modified: trunk/reactos/base/system/regsvr32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/regsvr32/rsrc.…
Added: trunk/reactos/base/system/rundll32/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/rundll32/lang/…
Modified: trunk/reactos/base/system/rundll32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/rundll32/rsrc.…
Added: trunk/reactos/base/system/runonce/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/runonce/lang/z…
Modified: trunk/reactos/base/system/runonce/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/runonce/rsrc.r…
Added: trunk/reactos/base/system/subst/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/zh-…
Modified: trunk/reactos/base/system/subst/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/rsrc.rc?…
Added: trunk/reactos/base/system/userinit/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/lang/…
Modified: trunk/reactos/base/system/userinit/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/rsrc.…
Modified: trunk/reactos/boot/freeldr/fdebug/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/fdebug/lang/r…
Modified: trunk/reactos/dll/cpl/access/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/ro-RO.…
Modified: trunk/reactos/dll/cpl/appwiz/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/appwiz/lang/ro-RO.…
Modified: trunk/reactos/dll/cpl/console/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/ro-RO…
Modified: trunk/reactos/dll/cpl/desk/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/ro-RO.rc…
Modified: trunk/reactos/dll/cpl/hdwwiz/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/hdwwiz/lang/ro-RO.…
Modified: trunk/reactos/dll/cpl/input/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/ro-RO.r…
13 years, 1 month
1
0
0
0
[jimtabor] 54398: [Ole2] - Fix Adobe Acrobat Reader 7.x from throwing exceptions at start up. Partial sync with wine, See bug 5560.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 16 17:01:04 2011 New Revision: 54398 URL:
http://svn.reactos.org/svn/reactos?rev=54398&view=rev
Log: [Ole2] - Fix Adobe Acrobat Reader 7.x from throwing exceptions at start up. Partial sync with wine, See bug 5560. Modified: trunk/reactos/dll/win32/ole32/ole2.c trunk/reactos/dll/win32/ole32/ole32res.rc Modified: trunk/reactos/dll/win32/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] Wed Nov 16 17:01:04 2011 @@ -6,6 +6,7 @@ * Copyright 1999 Noel Borthwick * Copyright 1999, 2000 Marcus Meissner * Copyright 2005 Juan Lang + * Copyright 2011 Adam Martinson for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -377,6 +378,116 @@ return hr; } +/* This is to work around apps which break COM rules by not implementing + * IDropTarget::QueryInterface(). Windows doesn't expose this because it + * doesn't call CoMarshallInterface() in RegisterDragDrop(). + * The wrapper is only used internally, and only exists for the life of + * the marshal. */ +typedef struct { + IDropTarget IDropTarget_iface; + IDropTarget* inner; + LONG refs; +} DropTargetWrapper; + +static inline DropTargetWrapper* impl_from_IDropTarget(IDropTarget* iface) +{ + return CONTAINING_RECORD(iface, DropTargetWrapper, IDropTarget_iface); +} + +static HRESULT WINAPI DropTargetWrapper_QueryInterface(IDropTarget* iface, + REFIID riid, + void** ppvObject) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IDropTarget)) + { + IDropTarget_AddRef(&This->IDropTarget_iface); + *ppvObject = &This->IDropTarget_iface; + return S_OK; + } + *ppvObject = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI DropTargetWrapper_AddRef(IDropTarget* iface) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + return InterlockedIncrement(&This->refs); +} + +static ULONG WINAPI DropTargetWrapper_Release(IDropTarget* iface) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + ULONG refs = InterlockedDecrement(&This->refs); + if (!refs) + { + IDropTarget_Release(This->inner); + HeapFree(GetProcessHeap(), 0, This); + } + return refs; +} + +static HRESULT WINAPI DropTargetWrapper_DragEnter(IDropTarget* iface, + IDataObject* pDataObj, + DWORD grfKeyState, + POINTL pt, + DWORD* pdwEffect) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + return IDropTarget_DragEnter(This->inner, pDataObj, grfKeyState, pt, pdwEffect); +} + +static HRESULT WINAPI DropTargetWrapper_DragOver(IDropTarget* iface, + DWORD grfKeyState, + POINTL pt, + DWORD* pdwEffect) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + return IDropTarget_DragOver(This->inner, grfKeyState, pt, pdwEffect); +} + +static HRESULT WINAPI DropTargetWrapper_DragLeave(IDropTarget* iface) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + return IDropTarget_DragLeave(This->inner); +} + +static HRESULT WINAPI DropTargetWrapper_Drop(IDropTarget* iface, + IDataObject* pDataObj, + DWORD grfKeyState, + POINTL pt, + DWORD* pdwEffect) +{ + DropTargetWrapper* This = impl_from_IDropTarget(iface); + return IDropTarget_Drop(This->inner, pDataObj, grfKeyState, pt, pdwEffect); +} + +static const IDropTargetVtbl DropTargetWrapperVTbl = +{ + DropTargetWrapper_QueryInterface, + DropTargetWrapper_AddRef, + DropTargetWrapper_Release, + DropTargetWrapper_DragEnter, + DropTargetWrapper_DragOver, + DropTargetWrapper_DragLeave, + DropTargetWrapper_Drop +}; + +static IDropTarget* WrapDropTarget(IDropTarget* inner) +{ + DropTargetWrapper* This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + + if (This) + { + IDropTarget_AddRef(inner); + This->IDropTarget_iface.lpVtbl = &DropTargetWrapperVTbl; + This->inner = inner; + This->refs = 1; + } + return &This->IDropTarget_iface; +} + /*********************************************************************** * get_droptarget_pointer * @@ -409,7 +520,7 @@ HRESULT hr; IStream *stream; HANDLE map; - IUnknown *unk; + IDropTarget *wrapper; TRACE("(%p,%p)\n", hwnd, pDropTarget); @@ -450,16 +561,15 @@ hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); if(FAILED(hr)) return hr; - unk = NULL; - hr = IDropTarget_QueryInterface(pDropTarget, &IID_IUnknown, (void**)&unk); - if (SUCCEEDED(hr) && !unk) hr = E_NOINTERFACE; - if(FAILED(hr)) - { - IStream_Release(stream); - return hr; - } - hr = CoMarshalInterface(stream, &IID_IDropTarget, unk, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG); - IUnknown_Release(unk); + /* IDropTarget::QueryInterface() shouldn't be called, some (broken) apps depend on this. */ + wrapper = WrapDropTarget(pDropTarget); + if(!wrapper) + { + IStream_Release(stream); + return E_OUTOFMEMORY; + } + hr = CoMarshalInterface(stream, &IID_IDropTarget, (IUnknown*)wrapper, MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG); + IDropTarget_Release(wrapper); if(SUCCEEDED(hr)) { @@ -812,13 +922,18 @@ typedef struct { - const IEnumOLEVERBVtbl *lpvtbl; + IEnumOLEVERB IEnumOLEVERB_iface; LONG ref; HKEY hkeyVerb; ULONG index; } EnumOLEVERB; +static inline EnumOLEVERB *impl_from_IEnumOLEVERB(IEnumOLEVERB *iface) +{ + return CONTAINING_RECORD(iface, EnumOLEVERB, IEnumOLEVERB_iface); +} + static HRESULT WINAPI EnumOLEVERB_QueryInterface( IEnumOLEVERB *iface, REFIID riid, void **ppv) { @@ -836,7 +951,7 @@ static ULONG WINAPI EnumOLEVERB_AddRef( IEnumOLEVERB *iface) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); TRACE("()\n"); return InterlockedIncrement(&This->ref); } @@ -844,7 +959,7 @@ static ULONG WINAPI EnumOLEVERB_Release( IEnumOLEVERB *iface) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); LONG refs = InterlockedDecrement(&This->ref); TRACE("()\n"); if (!refs) @@ -859,7 +974,7 @@ IEnumOLEVERB *iface, ULONG celt, LPOLEVERB rgelt, ULONG *pceltFetched) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); HRESULT hr = S_OK; TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched); @@ -946,7 +1061,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip( IEnumOLEVERB *iface, ULONG celt) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); TRACE("(%d)\n", celt); @@ -957,7 +1072,7 @@ static HRESULT WINAPI EnumOLEVERB_Reset( IEnumOLEVERB *iface) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); TRACE("()\n"); @@ -969,7 +1084,7 @@ IEnumOLEVERB *iface, IEnumOLEVERB **ppenum) { - EnumOLEVERB *This = (EnumOLEVERB *)iface; + EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface); HKEY hkeyVerb; TRACE("(%p)\n", ppenum); if (!DuplicateHandle(GetCurrentProcess(), This->hkeyVerb, GetCurrentProcess(), (HANDLE *)&hkeyVerb, 0, FALSE, DUPLICATE_SAME_ACCESS)) @@ -996,12 +1111,12 @@ RegCloseKey(hkeyVerb); return E_OUTOFMEMORY; } - This->lpvtbl = &EnumOLEVERB_VTable; + This->IEnumOLEVERB_iface.lpVtbl = &EnumOLEVERB_VTable; This->ref = 1; This->index = index; This->hkeyVerb = hkeyVerb; - *ppenum = (IEnumOLEVERB *)&This->lpvtbl; - return S_OK; + *ppenum = &This->IEnumOLEVERB_iface; + return S_OK; } /*********************************************************************** @@ -1181,13 +1296,12 @@ } } - if (SUCCEEDED(hres)) - /* - * Initialize the object with it's IPersistStorage interface. - */ - hres = IOleObject_QueryInterface(pUnk, - &IID_IPersistStorage, - (void**)&persistStorage); + /* + * Initialize the object with its IPersistStorage interface. + */ + hres = IOleObject_QueryInterface(pUnk, + &IID_IPersistStorage, + (void**)&persistStorage); if (SUCCEEDED(hres)) { @@ -2224,19 +2338,19 @@ if (*trackerInfo->pdwEffect & DROPEFFECT_MOVE) { + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(2)); + } + else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY) + { + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(3)); + } + else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK) + { + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(4)); + } + else + { hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(1)); - } - else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY) - { - hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(2)); - } - else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK) - { - hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(3)); - } - else - { - hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(0)); } SetCursor(hCur); @@ -2530,7 +2644,17 @@ if (SUCCEEDED(hres2)) { DWORD dwConnection; - hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection); + if (renderopt == OLERENDER_DRAW && !pFormatEtc) { + FORMATETC pfe; + pfe.cfFormat = 0; + pfe.ptd = NULL; + pfe.dwAspect = DVASPECT_CONTENT; + pfe.lindex = -1; + pfe.tymed = TYMED_NULL; + hres = IOleCache_Cache(pOleCache, &pfe, ADVF_PRIMEFIRST, &dwConnection); + } + else + hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection); IOleCache_Release(pOleCache); } } @@ -2614,15 +2738,17 @@ /****************************************************************************** * OleIsRunning [OLE32.@] */ -BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject) +BOOL WINAPI OleIsRunning(LPOLEOBJECT object) { IRunnableObject *pRunnable; HRESULT hr; BOOL running; - TRACE("(%p)\n", pObject); - - hr = IOleObject_QueryInterface(pObject, &IID_IRunnableObject, (void **)&pRunnable); + TRACE("(%p)\n", object); + + if (!object) return FALSE; + + hr = IOleObject_QueryInterface(object, &IID_IRunnableObject, (void **)&pRunnable); if (FAILED(hr)) return TRUE; running = IRunnableObject_IsRunning(pRunnable); Modified: trunk/reactos/dll/win32/ole32/ole32res.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32res.r…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole32res.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole32res.rc [iso-8859-1] Wed Nov 16 17:01:04 2011 @@ -23,10 +23,10 @@ #include "winuser.h" #include "winnls.h" -#define WINE_OLESELFREGISTER #define WINE_FILENAME_STR "ole32.dll" +#define WINE_EXTRAVALUES VALUE "OLESelfRegister","" -#include <wine/wine_common_ver.rc> +#include "wine/wine_common_ver.rc" /* * Everything that does not depend on language, @@ -37,13 +37,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: nodrop.cur */ -0 CURSOR nodrop.cur +1 CURSOR nodrop.cur /* @makedep: drag_move.cur */ -1 CURSOR drag_move.cur +2 CURSOR drag_move.cur /* @makedep: drag_copy.cur */ -2 CURSOR drag_copy.cur +3 CURSOR drag_copy.cur /* @makedep: drag_link.cur */ -3 CURSOR drag_link.cur +4 CURSOR drag_link.cur
13 years, 1 month
1
0
0
0
[jimtabor] 54397: [Win32k|User32] - Correct more types.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 16 16:35:50 2011 New Revision: 54397 URL:
http://svn.reactos.org/svn/reactos?rev=54397&view=rev
Log: [Win32k|User32] - Correct more types. Modified: trunk/reactos/dll/win32/user32/windows/message.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/ntuser/message.c Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Wed Nov 16 16:35:50 2011 @@ -2369,7 +2369,7 @@ UcMsg.wParam, UcMsg.lParam, (ULONG_PTR)&dsm, - FNID_SENDMESSAGETIMEOUT, + FNID_SENDMESSAGEWTOOPTION, TRUE); MsgiAnsiToUnicodeReply(&UcMsg, &AnsiMsg, &Result); @@ -2436,7 +2436,7 @@ wParam, lParam, (ULONG_PTR)&dsm, - FNID_SENDMESSAGETIMEOUT, + FNID_SENDMESSAGEWTOOPTION, FALSE); if (lpdwResult) *lpdwResult = dsm.Result; Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed Nov 16 16:35:50 2011 @@ -696,7 +696,7 @@ #define FNID_SENDMESSAGEFF 0x02B2 // Kernel has option to use TimeOut or normal msg send, based on type of msg. #define FNID_SENDMESSAGEWTOOPTION 0x02B3 -#define FNID_SENDMESSAGETIMEOUT 0x02B4 +#define FNID_SENDMESSAGECALLPROC 0x02B4 #define FNID_BROADCASTSYSTEMMESSAGE 0x02B5 #define FNID_TOOLTIPS 0x02B6 #define FNID_SENDNOTIFYMESSAGE 0x02B7 @@ -894,7 +894,7 @@ typedef struct _WNDMSG { DWORD maxMsgs; - DWORD abMsgs; + PINT abMsgs; } WNDMSG, *PWNDMSG; typedef struct _SHAREDINFO Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed Nov 16 16:35:50 2011 @@ -2418,7 +2418,8 @@ } break; } - case FNID_SENDMESSAGETIMEOUT: + case FNID_SENDMESSAGEFF: + case FNID_SENDMESSAGEWTOOPTION: { DOSENDMESSAGE dsm, *pdsm = (PDOSENDMESSAGE)ResultInfo; if (ResultInfo)
13 years, 1 month
1
0
0
0
[jimtabor] 54396: [Win32k|User32] - Patch by Shinobu Maehara: fix for kernel-mode/user-mode marshalling of WM_DDE_ACK.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 16 16:24:18 2011 New Revision: 54396 URL:
http://svn.reactos.org/svn/reactos?rev=54396&view=rev
Log: [Win32k|User32] - Patch by Shinobu Maehara: fix for kernel-mode/user-mode marshalling of WM_DDE_ACK. Modified: trunk/reactos/dll/win32/user32/windows/dialog.c trunk/reactos/dll/win32/user32/windows/message.c trunk/reactos/include/reactos/win32k/ntuser.h Modified: trunk/reactos/dll/win32/user32/windows/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Wed Nov 16 16:24:18 2011 @@ -288,7 +288,7 @@ info->windowName = HeapAlloc( GetProcessHeap(), 0, sizeof(L"#65535") ); if (info->windowName != NULL) { - swprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1)); + wsprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1)); info->windowNameFree = TRUE; } else Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Wed Nov 16 16:24:18 2011 @@ -234,36 +234,24 @@ { PKMDDELPARAM DdeLparam; DdeLparam = HeapAlloc(GetProcessHeap(), 0, sizeof(KMDDELPARAM)); - if (NULL == DdeLparam) + if (NULL == DdeLparam || !UnpackDDElParam( + UMMsg->message, UMMsg->lParam, + &DdeLparam->uiLo, &DdeLparam->uiHi)) return FALSE; + /* + If this is a reply to WM_DDE_EXECUTE then + uiHi will contain a hMem, hence >= 0x10000. + Otherwise, it will be be an atom, a 16-bit value. + */ + if(DdeLparam->uiHi >= 0x10000) { - return FALSE; - } - if (Posted) - { - DdeLparam->Packed = TRUE; - if (! UnpackDDElParam(UMMsg->message, UMMsg->lParam, - &DdeLparam->Value.Packed.uiLo, - &DdeLparam->Value.Packed.uiHi)) - { - return FALSE; - } - if (0 != HIWORD(DdeLparam->Value.Packed.uiHi)) - { - /* uiHi should contain a hMem from WM_DDE_EXECUTE */ - HGLOBAL h = DdeGetPair((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi); + HGLOBAL h = DdeGetPair((HGLOBAL)(ULONG_PTR)DdeLparam->uiHi); if (NULL != h) { - GlobalFree((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi); - DdeLparam->Value.Packed.uiHi = (UINT_PTR) h; + GlobalFree((HGLOBAL)(ULONG_PTR)DdeLparam->uiHi); + DdeLparam->uiHi = (UINT_PTR) h; } } FreeDDElParam(UMMsg->message, UMMsg->lParam); - } - else - { - DdeLparam->Packed = FALSE; - DdeLparam->Value.Unpacked = UMMsg->lParam; - } KMMsg->lParam = (LPARAM) DdeLparam; } break; @@ -376,17 +364,8 @@ case WM_DDE_ACK: { PKMDDELPARAM DdeLparam = (PKMDDELPARAM) KMMsg->lParam; - if (DdeLparam->Packed) - { - UMMsg->lParam = PackDDElParam(KMMsg->message, - DdeLparam->Value.Packed.uiLo, - DdeLparam->Value.Packed.uiHi); + UMMsg->lParam = PackDDElParam(KMMsg->message, DdeLparam->uiLo, DdeLparam->uiHi); } - else - { - UMMsg->lParam = DdeLparam->Value.Unpacked; - } - } break; case WM_DDE_EXECUTE: Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed Nov 16 16:24:18 2011 @@ -488,7 +488,7 @@ #define WNDS_HASCREATESTRUCTNAME 0X00020000 #define WNDS_SERVERSIDEWINDOWPROC 0x00040000 // Call proc inside win32k. #define WNDS_ANSIWINDOWPROC 0x00080000 -#define WNDS_BEGINGACTIVATED 0x00100000 +#define WNDS_BEINGACTIVATED 0x00100000 #define WNDS_HASPALETTE 0x00200000 #define WNDS_PAINTNOTPROCESSED 0x00400000 #define WNDS_SYNCPAINTPENDING 0x00800000 @@ -2692,15 +2692,15 @@ HANDLE Handle, PICONINFO IconInfo); +#if 0 // Correct type. BOOL NTAPI NtUserSetCursorIconData( - HANDLE Handle, - PBOOL fIcon, - POINT *Hotspot, - HMODULE hModule, - HRSRC hRsrc, - HRSRC hGroupRsrc); + HCURSOR hCursor, + PUNICODE_STRING ModuleName, + PUNICODE_STRING ResourceName, + PCURSORDATA pCursorData); +#endif DWORD NTAPI @@ -3178,16 +3178,8 @@ typedef struct tagKMDDELPARAM { - BOOL Packed; - union - { - struct - { UINT_PTR uiLo; UINT_PTR uiHi; - } Packed; - LPARAM Unpacked; - } Value; } KMDDELPARAM, *PKMDDELPARAM; @@ -3329,6 +3321,16 @@ IN HWND hWnd, IN DWORD dwFlags); +BOOL +NTAPI +NtUserSetCursorIconData( + HANDLE Handle, + PBOOL fIcon, + POINT *Hotspot, + HMODULE hModule, + HRSRC hRsrc, + HRSRC hGroupRsrc); + typedef struct _SETSCROLLBARINFO { int nTrackPos;
13 years, 1 month
1
0
0
0
[cgutman] 54395: [NPFS] - Execute the failure case while holding the mutex otherwise we crash
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Nov 16 04:39:49 2011 New Revision: 54395 URL:
http://svn.reactos.org/svn/reactos?rev=54395&view=rev
Log: [NPFS] - Execute the failure case while holding the mutex otherwise we crash Modified: trunk/reactos/drivers/filesystems/npfs/rw.c Modified: trunk/reactos/drivers/filesystems/npfs/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/r…
============================================================================== --- trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] Wed Nov 16 04:39:49 2011 @@ -463,6 +463,8 @@ NULL); DPRINT("Finished waiting (%wZ)! Status: %x\n", &Ccb->Fcb->PipeName, Status); + ExAcquireFastMutex(&Ccb->DataListLock); + if ((Status == STATUS_USER_APC) || (Status == STATUS_KERNEL_APC) || (Status == STATUS_ALERTED)) { Status = STATUS_CANCELLED; @@ -472,7 +474,6 @@ { ASSERT(FALSE); } - ExAcquireFastMutex(&Ccb->DataListLock); } else {
13 years, 1 month
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
28
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
Results per page:
10
25
50
100
200