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
April 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
19 participants
296 discussions
Start a n
N
ew thread
[ekohl] 51514: [NETEVENT] - Remove netevent.c and netevent.spec because netevent.dll is a resource-only dll. - Set entrypoint to 0.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Apr 30 23:41:40 2011 New Revision: 51514 URL:
http://svn.reactos.org/svn/reactos?rev=51514&view=rev
Log: [NETEVENT] - Remove netevent.c and netevent.spec because netevent.dll is a resource-only dll. - Set entrypoint to 0. Removed: trunk/reactos/dll/win32/netevent/netevent.c trunk/reactos/dll/win32/netevent/netevent.spec Modified: trunk/reactos/dll/win32/netevent/netevent.rbuild Removed: trunk/reactos/dll/win32/netevent/netevent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/neteven…
============================================================================== --- trunk/reactos/dll/win32/netevent/netevent.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/netevent.c (removed) @@ -1,25 +1,0 @@ -/* - * PROJECT: ReactOS Network Event Handler - * LICENSE: GPL - See COPYING in the top level directory - * FILE: dll/win32/netevent/netevent.c - * PURPOSE: Dummy main file - * COPYRIGHT: Eric Kohl - */ - -#include <windows.h> - -BOOL -WINAPI -DllMain(IN HINSTANCE hinstDLL, - IN DWORD dwReason, - IN LPVOID lpvReserved) -{ - switch (dwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - } - - return TRUE; -} Modified: trunk/reactos/dll/win32/netevent/netevent.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/neteven…
============================================================================== --- trunk/reactos/dll/win32/netevent/netevent.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/netevent.rbuild [iso-8859-1] Sat Apr 30 23:41:40 2011 @@ -1,8 +1,6 @@ -<module name="netevent" type="win32dll" baseaddress="${BASEADDRESS_NETEVENT}" installbase="system32" installname="netevent.dll" unicode="true"> - <importlibrary definition="netevent.spec" /> +<module name="netevent" type="win32dll" baseaddress="${BASEADDRESS_NETEVENT}" installbase="system32" installname="netevent.dll" entrypoint="0" unicode="true"> <include base="netevent">.</include> <include base="neteventmsg" root="intermediate">.</include> <dependency>neteventmsg</dependency> - <file>netevent.c</file> <file>netevt.rc</file> </module> Removed: trunk/reactos/dll/win32/netevent/netevent.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/neteven…
============================================================================== --- trunk/reactos/dll/win32/netevent/netevent.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/netevent.spec (removed) @@ -1,1 +1,0 @@ -# netevent.dll exports
13 years, 7 months
1
0
0
0
[ekohl] 51513: [EVENTLOG] Implement an event source list and use it to find the event log file for a given event source when an event was reported.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Apr 30 22:33:53 2011 New Revision: 51513 URL:
http://svn.reactos.org/svn/reactos?rev=51513&view=rev
Log: [EVENTLOG] Implement an event source list and use it to find the event log file for a given event source when an event was reported. Added: trunk/reactos/base/services/eventlog/eventsource.c (with props) Modified: trunk/reactos/base/services/eventlog/eventlog.c trunk/reactos/base/services/eventlog/eventlog.h trunk/reactos/base/services/eventlog/eventlog.rbuild trunk/reactos/base/services/eventlog/rpc.c Modified: trunk/reactos/base/services/eventlog/eventlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] Sat Apr 30 22:33:53 2011 @@ -174,12 +174,11 @@ } -BOOL LoadLogFile(HKEY hKey, WCHAR * LogName) +PLOGFILE LoadLogFile(HKEY hKey, WCHAR * LogName) { DWORD MaxValueLen, ValueLen, Type, ExpandedLen; WCHAR *Buf = NULL, *Expanded = NULL; LONG Result; - BOOL ret = TRUE; PLOGFILE pLogf; DPRINT("LoadLogFile: %S\n", LogName); @@ -188,11 +187,10 @@ NULL, NULL, &MaxValueLen, NULL, NULL); Buf = HeapAlloc(MyHeap, 0, MaxValueLen); - if (!Buf) { DPRINT1("Can't allocate heap!\n"); - return FALSE; + return NULL; } ValueLen = MaxValueLen; @@ -203,29 +201,27 @@ &Type, (LPBYTE) Buf, &ValueLen); - if (Result != ERROR_SUCCESS) { DPRINT1("RegQueryValueEx failed: %d\n", GetLastError()); HeapFree(MyHeap, 0, Buf); - return FALSE; + return NULL; } if (Type != REG_EXPAND_SZ && Type != REG_SZ) { DPRINT1("%S\\File - value of wrong type %x.\n", LogName, Type); HeapFree(MyHeap, 0, Buf); - return FALSE; + return NULL; } ExpandedLen = ExpandEnvironmentStrings(Buf, NULL, 0); Expanded = HeapAlloc(MyHeap, 0, ExpandedLen * sizeof(WCHAR)); - if (!Expanded) { DPRINT1("Can't allocate heap!\n"); HeapFree(MyHeap, 0, Buf); - return FALSE; + return NULL; } ExpandEnvironmentStrings(Buf, Expanded, ExpandedLen); @@ -237,12 +233,11 @@ if (pLogf == NULL) { DPRINT1("Failed to create %S!\n", Expanded); - ret = FALSE; } HeapFree(MyHeap, 0, Buf); HeapFree(MyHeap, 0, Expanded); - return ret; + return pLogf; } BOOL LoadLogFiles(HKEY eventlogKey) @@ -251,6 +246,7 @@ DWORD MaxLognameLen, LognameLen; WCHAR *Buf = NULL; INT i; + PLOGFILE pLogFile; RegQueryInfoKey(eventlogKey, NULL, NULL, NULL, NULL, @@ -288,10 +284,16 @@ return FALSE; } - if (!LoadLogFile(SubKey, Buf)) + pLogFile = LoadLogFile(SubKey, Buf); + if (pLogFile != NULL) + { + DPRINT("Loaded %S\n", Buf); + LoadEventSources(SubKey, pLogFile); + } + else + { DPRINT1("Failed to load %S\n", Buf); - else - DPRINT("Loaded %S\n", Buf); + } RegCloseKey(SubKey); LognameLen = MaxLognameLen; @@ -310,6 +312,7 @@ HKEY elogKey; LogfListInitialize(); + InitEventSourceList(); MyHeap = HeapCreate(0, 1024 * 256, 0); Modified: trunk/reactos/base/services/eventlog/eventlog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] Sat Apr 30 22:33:53 2011 @@ -93,19 +93,17 @@ LIST_ENTRY ListEntry; } LOGFILE, *PLOGFILE; -#if 0 typedef struct _EVENTSOURCE { LIST_ENTRY EventSourceListEntry; PLOGFILE LogFile; - ULONG CurrentRecord; WCHAR szName[1]; } EVENTSOURCE, *PEVENTSOURCE; -#endif typedef struct _LOGHANDLE { LIST_ENTRY LogHandleListEntry; + PEVENTSOURCE EventSource; PLOGFILE LogFile; ULONG CurrentRecord; WCHAR szName[1]; @@ -192,6 +190,17 @@ VOID SystemTimeToEventTime(SYSTEMTIME * pSystemTime, DWORD * pEventTime); +/* eventsource.c */ +VOID InitEventSourceList(VOID); + +BOOL +LoadEventSources(HKEY hKey, + PLOGFILE pLogFile); + +PEVENTSOURCE +GetEventSourceByName(LPCWSTR Name); + + /* logport.c */ NTSTATUS WINAPI PortThreadRoutine(PVOID Param); Modified: trunk/reactos/base/services/eventlog/eventlog.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.rbuild [iso-8859-1] Sat Apr 30 22:33:53 2011 @@ -9,6 +9,7 @@ <library>rpcrt4</library> <library>pseh</library> <file>eventlog.c</file> + <file>eventsource.c</file> <file>logport.c</file> <file>eventlog.rc</file> <file>rpc.c</file> Added: trunk/reactos/base/services/eventlog/eventsource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventsource.c (added) +++ trunk/reactos/base/services/eventlog/eventsource.c [iso-8859-1] Sat Apr 30 22:33:53 2011 @@ -1,0 +1,150 @@ +/* + * PROJECT: ReactOS kernel + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/services/eventlog/eventsource.c + * PURPOSE: Event logging service + * COPYRIGHT: Copyright 2011 Eric Kohl + */ + +/* INCLUDES *****************************************************************/ + +#include "eventlog.h" + +static LIST_ENTRY EventSourceListHead; +static CRITICAL_SECTION EventSourceListCs; + +/* FUNCTIONS ****************************************************************/ + +VOID +InitEventSourceList(VOID) +{ + InitializeCriticalSection(&EventSourceListCs); + InitializeListHead(&EventSourceListHead); +} + + +static VOID +DumpEventSourceList(VOID) +{ + PLIST_ENTRY CurrentEntry; + PEVENTSOURCE EventSource; + + DPRINT("DumpEventSourceList()\n"); + EnterCriticalSection(&EventSourceListCs); + + CurrentEntry = EventSourceListHead.Flink; + while (CurrentEntry != &EventSourceListHead) + { + EventSource = CONTAINING_RECORD(CurrentEntry, + EVENTSOURCE, + EventSourceListEntry); + + DPRINT("EventSource->szName: %S\n", EventSource->szName); + + CurrentEntry = CurrentEntry->Flink; + } + + LeaveCriticalSection(&EventSourceListCs); + + DPRINT("Done\n"); +} + + +BOOL +LoadEventSources(HKEY hKey, + PLOGFILE pLogFile) +{ + PEVENTSOURCE lpEventSource; + DWORD dwMaxSubKeyLength; + DWORD dwEventSourceNameLength; + DWORD dwIndex; + WCHAR *Buf = NULL; + + DPRINT("LoadEventSources\n"); + + RegQueryInfoKeyW(hKey, NULL, NULL, NULL, NULL, &dwMaxSubKeyLength, NULL, + NULL, NULL, NULL, NULL, NULL); + + DPRINT("dwMaxSubKeyLength: %lu\n", dwMaxSubKeyLength); + + dwMaxSubKeyLength++; + + Buf = HeapAlloc(MyHeap, 0, dwMaxSubKeyLength * sizeof(WCHAR)); + if (!Buf) + { + DPRINT1("Error: can't allocate heap!\n"); + return FALSE; + } + + dwEventSourceNameLength = dwMaxSubKeyLength; + + dwIndex = 0; + while (RegEnumKeyExW(hKey, + dwIndex, + Buf, + &dwEventSourceNameLength, + NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + DPRINT("Event Source: %S\n", Buf); + + lpEventSource = HeapAlloc(MyHeap, 0, sizeof(EVENTSOURCE) + wcslen(Buf) * sizeof(WCHAR)); + if (lpEventSource != NULL) + { + wcscpy(lpEventSource->szName, Buf); + lpEventSource->LogFile = pLogFile; + + DPRINT("Insert event source: %S\n", lpEventSource->szName); + + + EnterCriticalSection(&EventSourceListCs); + InsertTailList(&EventSourceListHead, + &lpEventSource->EventSourceListEntry); + LeaveCriticalSection(&EventSourceListCs); + } + + dwEventSourceNameLength = dwMaxSubKeyLength; + dwIndex++; + } + + HeapFree(MyHeap, 0, Buf); + + DumpEventSourceList(); + + return TRUE; +} + + +PEVENTSOURCE +GetEventSourceByName(LPCWSTR Name) +{ + PLIST_ENTRY CurrentEntry; + PEVENTSOURCE Result = NULL; + + DPRINT("GetEventSourceByName(%S)\n", Name); + EnterCriticalSection(&EventSourceListCs); + + CurrentEntry = EventSourceListHead.Flink; + while (CurrentEntry != &EventSourceListHead) + { + PEVENTSOURCE Item = CONTAINING_RECORD(CurrentEntry, + EVENTSOURCE, + EventSourceListEntry); + + DPRINT("Item->szName: %S\n", Item->szName); +// if ((*(Item->szName) != 0) && !_wcsicmp(Item->szName, Name)) + if (_wcsicmp(Item->szName, Name) == 0) + { + DPRINT("Found it\n"); + Result = Item; + break; + } + + CurrentEntry = CurrentEntry->Flink; + } + + LeaveCriticalSection(&EventSourceListCs); + + DPRINT("Done (Result: %p)\n", Result); + + return Result; +} Propchange: trunk/reactos/base/services/eventlog/eventsource.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/base/services/eventlog/eventsource.c ------------------------------------------------------------------------------ svn:keywords = author date id revision Modified: trunk/reactos/base/services/eventlog/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/rpc…
============================================================================== --- trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] Sat Apr 30 22:33:53 2011 @@ -49,6 +49,9 @@ PLOGHANDLE lpLogHandle; PLOGFILE currentLogFile = NULL; INT i, LogsActive; + PEVENTSOURCE pEventSource; + + DPRINT("ElfCreateEventLogHandle(Name: %S)\n", Name); lpLogHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(LOGHANDLE) + ((wcslen(Name) + 1) * sizeof(WCHAR))); @@ -70,19 +73,36 @@ /* If Creating, default to the Application Log in case we fail, as documented on MSDN */ if (Create == TRUE) - lpLogHandle->LogFile = LogfListItemByName(L"Application"); + { + pEventSource = GetEventSourceByName(Name); + DPRINT("EventSource: %p\n", pEventSource); + if (pEventSource) + { + DPRINT("EventSource LogFile: %p\n", pEventSource->LogFile); + lpLogHandle->LogFile = pEventSource->LogFile; + } + else + { + DPRINT("EventSource LogFile: Application log file\n"); + lpLogHandle->LogFile = LogfListItemByName(L"Application"); + } + + DPRINT("LogHandle LogFile: %p\n", lpLogHandle->LogFile); + } else + { lpLogHandle->LogFile = NULL; - for (i = 1; i <= LogsActive; i++) - { - currentLogFile = LogfListItemByIndex(i); - - if (_wcsicmp(Name, currentLogFile->LogName) == 0) + for (i = 1; i <= LogsActive; i++) { - lpLogHandle->LogFile = LogfListItemByIndex(i); - lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile); - break; + currentLogFile = LogfListItemByIndex(i); + + if (_wcsicmp(Name, currentLogFile->LogName) == 0) + { + lpLogHandle->LogFile = LogfListItemByIndex(i); + lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile); + break; + } } } @@ -267,12 +287,16 @@ DWORD MinorVersion, IELF_HANDLE *LogHandle) { + DPRINT1("ElfrRegisterEventSourceW()\n"); + if ((MajorVersion != 1) || (MinorVersion != 1)) return STATUS_INVALID_PARAMETER; /* RegModuleName must be an empty string */ if (RegModuleName->Length > 0) return STATUS_INVALID_PARAMETER; + + DPRINT1("ModuleName: %S\n", ModuleName->Buffer); /*FIXME: UNCServerName must specify the server or empty for local */
13 years, 7 months
1
0
0
0
[jimtabor] 51512: [Win32k] - Update key state when key and hardware is set before the event set. This allows input.c to post and set key states.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Apr 30 22:17:55 2011 New Revision: 51512 URL:
http://svn.reactos.org/svn/reactos?rev=51512&view=rev
Log: [Win32k] - Update key state when key and hardware is set before the event set. This allows input.c to post and set key states. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Sat Apr 30 22:17:55 2011 @@ -466,7 +466,6 @@ FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE; Msg.pt = gpsi->ptCursor; - update_input_key_state(FocusMessageQueue, &Msg); MsqPostMessage(FocusMessageQueue, &Msg, TRUE, QS_KEY); } else @@ -1006,6 +1005,9 @@ { InsertTailList(&MessageQueue->HardwareMessagesListHead, &Message->ListEntry); + + if (MessageBits & QS_KEY) + update_input_key_state( MessageQueue, Msg ); } Message->QS_Flags = MessageBits;
13 years, 7 months
1
0
0
0
[rharabien] 51510: [COMCTL32] * Properly support WM_SYSCOLORCHANGE in ListView controls with default background. Should be sent to Wine (tm)
by rharabien@svn.reactos.org
Author: rharabien Date: Sat Apr 30 21:41:15 2011 New Revision: 51510 URL:
http://svn.reactos.org/svn/reactos?rev=51510&view=rev
Log: [COMCTL32] * Properly support WM_SYSCOLORCHANGE in ListView controls with default background. Should be sent to Wine (tm) Modified: trunk/reactos/dll/win32/comctl32/listview.c Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Sat Apr 30 21:41:15 2011 @@ -315,6 +315,7 @@ COLORREF clrBk; COLORREF clrText; COLORREF clrTextBk; + BOOL bDefaultBkColor; /* font */ HFONT hDefaultFont; @@ -7870,7 +7871,8 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk) { TRACE("(clrBk=%x)\n", clrBk); - + + infoPtr->bDefaultBkColor = FALSE; if(infoPtr->clrBk != clrBk) { if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush); infoPtr->clrBk = clrBk; @@ -9263,6 +9265,7 @@ infoPtr->clrText = CLR_DEFAULT; infoPtr->clrTextBk = CLR_DEFAULT; LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow); + infoPtr->bDefaultBkColor = TRUE; /* set default values */ infoPtr->nFocusedItem = -1; @@ -11525,6 +11528,11 @@ case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); + if (infoPtr->bDefaultBkColor) + { + LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow); + infoPtr->bDefaultBkColor = TRUE; + } return 0; /* case WM_TIMER: */
13 years, 7 months
1
0
0
0
[jimtabor] 51509: [Win32k] - Clear and set send erase background bit when sending WM_ERASEBKGND and if return zero reset the bit. This prevents a message loop in riched20 when calling GetUpdateRect...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Apr 30 21:14:11 2011 New Revision: 51509 URL:
http://svn.reactos.org/svn/reactos?rev=51509&view=rev
Log: [Win32k] - Clear and set send erase background bit when sending WM_ERASEBKGND and if return zero reset the bit. This prevents a message loop in riched20 when calling GetUpdateRect. Spotted by Michael Martin. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Sat Apr 30 21:14:11 2011 @@ -244,7 +244,7 @@ } - if (Wnd->state & WNDS_ERASEBACKGROUND) + if (Wnd->state & WNDS_SENDERASEBACKGROUND) { if (Wnd->hrgnUpdate) { @@ -252,9 +252,11 @@ Wnd->hrgnUpdate, DCX_CACHE|DCX_USESTYLE|DCX_INTERSECTRGN|DCX_KEEPCLIPRGN); - if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0)) + Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); + // Kill the loop, so Clear before we send. + if (!co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0)) { - Wnd->state &= ~WNDS_ERASEBACKGROUND; + Wnd->state |= (WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); } UserReleaseDC(Wnd, hDC, FALSE); } @@ -379,7 +381,7 @@ if (Flags & RDW_FRAME) Wnd->state |= WNDS_SENDNCPAINT; if (Flags & RDW_ERASE) - Wnd->state |= WNDS_ERASEBACKGROUND; + Wnd->state |= WNDS_SENDERASEBACKGROUND; Flags |= RDW_FRAME; } @@ -398,11 +400,11 @@ } if (Wnd->hrgnUpdate == NULL) - Wnd->state &= ~WNDS_ERASEBACKGROUND; + Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); if (Flags & RDW_NOFRAME) Wnd->state &= ~WNDS_SENDNCPAINT; if (Flags & RDW_NOERASE) - Wnd->state &= ~WNDS_ERASEBACKGROUND; + Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); } if (Flags & RDW_INTERNALPAINT) @@ -819,7 +821,7 @@ Window->state &= ~WNDS_SENDNCPAINT; MsqDecPaintCountQueue(Window->head.pti->MessageQueue); co_IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0); - if (hRgn != (HANDLE)1 && hRgn != NULL && GreIsHandleValid(hRgn)) + if (hRgn != HRGN_WINDOW && hRgn != NULL && GreIsHandleValid(hRgn)) { /* NOTE: The region can already by deleted! */ GreDeleteObject(hRgn); @@ -854,10 +856,14 @@ Window->state &= ~WNDS_INTERNALPAINT; - if (Window->state & WNDS_ERASEBACKGROUND) - { - Window->state &= ~WNDS_ERASEBACKGROUND; + if (Window->state & WNDS_SENDERASEBACKGROUND) + { + Window->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); Ps.fErase = !co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)Ps.hdc, 0); + if ( Ps.fErase ) + { + Window->state |= (WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); + } } else {
13 years, 7 months
1
0
0
0
[rharabien] 51508: [SNDVOL32 & TASKMGR] * Properly support WM_SYSCOLORCHANGE
by rharabien@svn.reactos.org
Author: rharabien Date: Sat Apr 30 19:32:37 2011 New Revision: 51508 URL:
http://svn.reactos.org/svn/reactos?rev=51508&view=rev
Log: [SNDVOL32 & TASKMGR] * Properly support WM_SYSCOLORCHANGE Modified: trunk/reactos/base/applications/sndvol32/sndvol32.c trunk/reactos/base/applications/taskmgr/taskmgr.c Modified: trunk/reactos/base/applications/sndvol32/sndvol32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
============================================================================== --- trunk/reactos/base/applications/sndvol32/sndvol32.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndvol32/sndvol32.c [iso-8859-1] Sat Apr 30 19:32:37 2011 @@ -574,6 +574,16 @@ IDCANCEL); break; } + + case WM_SYSCOLORCHANGE: + { + HWND hwndControls; + + /* Forward WM_SYSCOLORCHANGE to common controls */ + hwndControls = GetDlgItem(hwndDlg, IDC_CONTROLS); + SendMessage(hwndControls, WM_SYSCOLORCHANGE, 0, 0); + break; + } } return 0; Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] Sat Apr 30 19:32:37 2011 @@ -396,6 +396,12 @@ case WM_MENUSELECT: TaskManager_OnMenuSelect(hDlg, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam); break; + case WM_SYSCOLORCHANGE: + /* Forward WM_SYSCOLORCHANGE to common controls */ + SendMessage(hApplicationPageListCtrl, WM_SYSCOLORCHANGE, 0, 0); + SendMessage(hProcessPageListCtrl, WM_SYSCOLORCHANGE, 0, 0); + SendMessage(hProcessPageHeaderCtrl, WM_SYSCOLORCHANGE, 0, 0); + break; } return 0;
13 years, 7 months
1
0
0
0
[janderwald] 51507: [USBEHCI_NEW] - Silence usb bulk control traces
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Apr 30 18:46:10 2011 New Revision: 51507 URL:
http://svn.reactos.org/svn/reactos?rev=51507&view=rev
Log: [USBEHCI_NEW] - Silence usb bulk control traces Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Sat Apr 30 18:46:10 2011 @@ -774,7 +774,7 @@ { ULONG Value; - DPRINT1("CUSBHardwareDevice::ClearPortStatus\n"); + DPRINT("CUSBHardwareDevice::ClearPortStatus\n"); if (PortId > m_Capabilities.HCSParams.PortCount) return STATUS_UNSUCCESSFUL; @@ -818,7 +818,7 @@ { ULONG Value; - DPRINT1("CUSBHardwareDevice::SetPortFeature\n"); + DPRINT("CUSBHardwareDevice::SetPortFeature\n"); if (PortId > m_Capabilities.HCSParams.PortCount) return STATUS_UNSUCCESSFUL; Modified: branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hub_controller.cpp [iso-8859-1] Sat Apr 30 18:46:10 2011 @@ -799,7 +799,7 @@ DPRINT1("Control Transfer is not expected!!!\n"); return STATUS_INVALID_DEVICE_REQUEST; case USB_ENDPOINT_TYPE_BULK: - DPRINT1("Initiating Bulk Transfer\n"); + DPRINT("Initiating Bulk Transfer\n"); break; case USB_ENDPOINT_TYPE_ISOCHRONOUS: case USB_ENDPOINT_TYPE_INTERRUPT: Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Sat Apr 30 18:46:10 2011 @@ -98,7 +98,7 @@ { NTSTATUS Status = STATUS_SUCCESS; - DPRINT1("CUSBQueue::Initialize()\n"); + DPRINT("CUSBQueue::Initialize()\n"); ASSERT(Hardware); @@ -208,7 +208,7 @@ return Status; } - DPRINT1("Request %p QueueHead %p inserted into AsyncQueue\n", Request, QueueHead); + DPRINT("Request %p QueueHead %p inserted into AsyncQueue\n", Request, QueueHead); // // Add it to the pending list @@ -518,7 +518,7 @@ // IsQueueHeadComplete = Request->IsQueueHeadComplete(QueueHead); - DPRINT1("Request %p QueueHead %p Complete %d\n", Request, QueueHead, IsQueueHeadComplete); + DPRINT("Request %p QueueHead %p Complete %d\n", Request, QueueHead, IsQueueHeadComplete); // // check if queue head is complete @@ -550,7 +550,7 @@ OUT PULONG ShouldRingDoorBell) { - DPRINT1("CUSBQueue::InterruptCallback\n"); + DPRINT("CUSBQueue::InterruptCallback\n"); // // iterate asynchronous list @@ -666,7 +666,7 @@ PLIST_ENTRY Entry; PQUEUE_HEAD CurrentQH; - DPRINT1("CUSBQueue::CompleteAsyncRequests\n"); + DPRINT("CUSBQueue::CompleteAsyncRequests\n"); // // first acquire request lock Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] Sat Apr 30 18:46:10 2011 @@ -261,7 +261,7 @@ // // Create one using TransferBuffer // - DPRINT1("Creating Mdl from Urb Buffer %p Length %lu\n", Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); + DPRINT("Creating Mdl from Urb Buffer %p Length %lu\n", Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); m_TransferBufferMDL = IoAllocateMdl(Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength, FALSE, @@ -384,7 +384,7 @@ Urb->UrbBulkOrInterruptTransfer.TransferBufferLength = InternalCalculateTransferLength(); } - DPRINT1("Request %p Completing Irp %p NtStatusCode %x UrbStatusCode %x Transferred Length %lu\n", this, m_Irp, NtStatusCode, UrbStatusCode, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); + DPRINT("Request %p Completing Irp %p NtStatusCode %x UrbStatusCode %x Transferred Length %lu\n", this, m_Irp, NtStatusCode, UrbStatusCode, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); // // FIXME: check if the transfer was split @@ -521,7 +521,6 @@ // // FIXME: check if request was split // - UNIMPLEMENTED return TRUE; } //---------------------------------------------------------------------------------------- @@ -790,12 +789,12 @@ PC_ASSERT(Base); - DPRINT1("EndPointAddress %x\n", m_EndpointDescriptor->bEndpointAddress); - DPRINT1("EndPointDirection %x\n", USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)); - - DPRINT1("Request %p Base Address %p TransferBytesLength %lu MDL %p\n", this, Base, BytesAvailable, m_TransferBufferMDL); - DPRINT1("InternalGetPidDirection() %d EndPointAddress %x\n", InternalGetPidDirection(), m_EndpointDescriptor->bEndpointAddress & 0x0F); - DPRINT1("Irp %p QueueHead %p\n", m_Irp, QueueHead); + DPRINT("EndPointAddress %x\n", m_EndpointDescriptor->bEndpointAddress); + DPRINT("EndPointDirection %x\n", USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)); + + DPRINT("Request %p Base Address %p TransferBytesLength %lu MDL %p\n", this, Base, BytesAvailable, m_TransferBufferMDL); + DPRINT("InternalGetPidDirection() %d EndPointAddress %x\n", InternalGetPidDirection(), m_EndpointDescriptor->bEndpointAddress & 0x0F); + DPRINT("Irp %p QueueHead %p\n", m_Irp, QueueHead); //PC_ASSERT(InternalGetPidDirection() == USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)); @@ -868,7 +867,7 @@ // BytesAvailable -= m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer; - DPRINT1("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], + DPRINT("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], BufferIndex, m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer, BytesAvailable); } else @@ -879,7 +878,7 @@ m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer = BytesAvailable; BytesAvailable = 0; - DPRINT1("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], + DPRINT("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], BufferIndex, m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer, BytesAvailable); break; } @@ -913,7 +912,7 @@ // BytesAvailable -= PAGE_SIZE; - DPRINT1("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], + DPRINT("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], BufferIndex, m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer, BytesAvailable); } else @@ -938,7 +937,7 @@ // // done // - DPRINT1("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], + DPRINT("TransferDescriptor %p BufferPointer %p BufferIndex %lu TotalBytes %lu Remaining %lu\n", m_TransferDescriptors[Index], m_TransferDescriptors[Index]->BufferPointer[BufferIndex], BufferIndex, m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer, BytesAvailable); break; @@ -1465,7 +1464,6 @@ // // release transfer descriptors // - DPRINT1("m_TransferDescriptor[0] Length %lu\n", m_TransferDescriptors[0]->Token.Bits.TotalBytesToTransfer); m_DmaManager->Release(m_TransferDescriptors[0], sizeof(QUEUE_TRANSFER_DESCRIPTOR)); m_TransferDescriptors[0] = 0; } Modified: branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usbehci.h [iso-8859-1] Sat Apr 30 18:46:10 2011 @@ -2,7 +2,7 @@ #define USBEHCI_H__ #include <ntddk.h> -#define YDEBUG +#define NDEBUG #include <debug.h> #include <hubbusif.h> #include <usbbusif.h>
13 years, 7 months
1
0
0
0
[janderwald] 51506: [USBEHCI_NEW] - Store number of bytes transferred in the transfer descriptors - Perform queue head completion when the door bell ring has been acknowledged. Fixes race condition...
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Apr 30 17:44:43 2011 New Revision: 51506 URL:
http://svn.reactos.org/svn/reactos?rev=51506&view=rev
Log: [USBEHCI_NEW] - Store number of bytes transferred in the transfer descriptors - Perform queue head completion when the door bell ring has been acknowledged. Fixes race condition between multiple irps in the async list - Fix calculation of transfer length when the request is an bulk in operation - Use EndPointDescriptor member to access transfer type / pid direction - Use MmGetSystemAddressForMdlSafe to retrieve system address for urb buffer - Fix check if first transfer buffer finishes on first size if the size is of page_size - With these changes and little luck and good weather, usb mass storage devices have been seen to work in Windows XP SP3 - Code inspired of mjmartin usbehci driver and Haiku's usb stack Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.h branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp Modified: branches/usb-bringup/drivers/usb/usbehci_new/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/hardware.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/hardware.h [iso-8859-1] Sat Apr 30 17:44:43 2011 @@ -127,6 +127,7 @@ //Software ULONG PhysicalAddr; LIST_ENTRY LinkedDescriptors; + ULONG TotalBytesToTransfer; } QUEUE_TRANSFER_DESCRIPTOR, *PQUEUE_TRANSFER_DESCRIPTOR; // Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_queue.cpp [iso-8859-1] Sat Apr 30 17:44:43 2011 @@ -52,6 +52,8 @@ PDMA_ADAPTER m_Adapter; PQUEUE_HEAD AsyncListQueueHead; LIST_ENTRY m_CompletedRequestAsyncList; + LIST_ENTRY m_PendingRequestAsyncList; + // queue head manipulation functions VOID LinkQueueHead(PQUEUE_HEAD HeadQueueHead, PQUEUE_HEAD NewQueueHead); @@ -119,6 +121,11 @@ // Initialize completed async list head // InitializeListHead(&m_CompletedRequestAsyncList); + + // + // Initialize pending async list head + // + InitializeListHead(&m_PendingRequestAsyncList); return Status; } @@ -425,16 +432,154 @@ NTSTATUS Status) { IUSBRequest *Request; + PQUEUE_HEAD NewQueueHead; + + // + // now unlink the queue head + // FIXME: implement chained queue heads + // + UnlinkQueueHead(CurrentQH); + + // + // get contained usb request + // + Request = (IUSBRequest*)CurrentQH->Request; + + // + // check if the request is complete + // + if (Request->IsRequestComplete() == FALSE) + { + // + // request is still in complete + // get new queue head + // + Status = Request->GetQueueHead(&NewQueueHead); + + // + // add to pending list + // + InsertTailList(&m_PendingRequestAsyncList, &NewQueueHead->LinkedQueueHeads); + } + + // + // put queue head into completed queue head list + // + InsertTailList(&m_CompletedRequestAsyncList, &CurrentQH->LinkedQueueHeads); + +} + +VOID +CUSBQueue::ProcessAsyncList( + IN NTSTATUS Status, + OUT PULONG ShouldRingDoorBell) +{ + KIRQL OldLevel; + PLIST_ENTRY Entry; + PQUEUE_HEAD QueueHead; + IUSBRequest * Request; + BOOLEAN IsQueueHeadComplete; + + // + // lock completed async list + // + KeAcquireSpinLock(&m_Lock, &OldLevel); + + // + // walk async list + // + Entry = AsyncListQueueHead->LinkedQueueHeads.Flink; + + while(Entry != &AsyncListQueueHead->LinkedQueueHeads) + { + // + // get queue head structure + // + QueueHead = (PQUEUE_HEAD)CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads); + + // + // sanity check + // + PC_ASSERT(QueueHead->Request); + + // + // get IUSBRequest interface + // + Request = (IUSBRequest*)QueueHead->Request; + + + // + // move to next entry + // + Entry = Entry->Flink; + + // + // check if queue head is complete + // + IsQueueHeadComplete = Request->IsQueueHeadComplete(QueueHead); + + DPRINT1("Request %p QueueHead %p Complete %d\n", Request, QueueHead, IsQueueHeadComplete); + + // + // check if queue head is complete + // + if (IsQueueHeadComplete) + { + // + // current queue head is complete + // + QueueHeadCompletion(QueueHead, Status); + + // + // ring door bell is going to be necessary + // + *ShouldRingDoorBell = TRUE; + } + } + + // + // release lock + // + KeReleaseSpinLock(&m_Lock, OldLevel); +} + + +VOID +CUSBQueue::InterruptCallback( + IN NTSTATUS Status, + OUT PULONG ShouldRingDoorBell) +{ + + DPRINT1("CUSBQueue::InterruptCallback\n"); + + // + // iterate asynchronous list + // + *ShouldRingDoorBell = FALSE; + ProcessAsyncList(Status, ShouldRingDoorBell); + + // + // TODO: implement periodic schedule processing + // +} + +VOID +CUSBQueue::QueueHeadCleanup( + PQUEUE_HEAD CurrentQH) +{ + IUSBRequest * Request; + BOOLEAN ShouldReleaseWhenDone; USBD_STATUS UrbStatus; - PQUEUE_HEAD NewQueueHead; - - // - // this function is called when a queue head has been completed + + // + // sanity checks // PC_ASSERT(CurrentQH->Token.Bits.Active == 0); - - // - // get contained usb request + PC_ASSERT(CurrentQH->Request); + + + // + // get request // Request = (IUSBRequest*)CurrentQH->Request; @@ -481,145 +626,7 @@ // // notify request that a queue head has been completed // - Request->CompletionCallback(Status, UrbStatus, CurrentQH); - - // - // now unlink the queue head - // FIXME: implement chained queue heads - // - UnlinkQueueHead(CurrentQH); - - // - // check if the request is complete - // - if (Request->IsRequestComplete() == FALSE) - { - // - // request is still in complete - // get new queue head - // - Status = Request->GetQueueHead(&NewQueueHead); - - // - // add to pending list - // - LinkQueueHead(AsyncListQueueHead, NewQueueHead); - } - else - { - // - // put queue head into completed queue head list - // - InsertTailList(&m_CompletedRequestAsyncList, &CurrentQH->LinkedQueueHeads); - } -} - -VOID -CUSBQueue::ProcessAsyncList( - IN NTSTATUS Status, - OUT PULONG ShouldRingDoorBell) -{ - KIRQL OldLevel; - PLIST_ENTRY Entry; - PQUEUE_HEAD QueueHead; - IUSBRequest * Request; - - // - // lock completed async list - // - KeAcquireSpinLock(&m_Lock, &OldLevel); - - // - // walk async list - // - Entry = AsyncListQueueHead->LinkedQueueHeads.Flink; - - while(Entry != &AsyncListQueueHead->LinkedQueueHeads) - { - // - // get queue head structure - // - QueueHead = (PQUEUE_HEAD)CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads); - - // - // sanity check - // - PC_ASSERT(QueueHead->Request); - - // - // get IUSBRequest interface - // - Request = (IUSBRequest*)QueueHead->Request; - - - // - // move to next entry - // - Entry = Entry->Flink; - - DPRINT1("Request %p QueueHead %p Complete %d\n", Request, QueueHead, Request->IsQueueHeadComplete(QueueHead)); - - // - // check if queue head is complete - // - if (Request->IsQueueHeadComplete(QueueHead)) - { - // - // current queue head is complete - // - QueueHeadCompletion(QueueHead, Status); - - // - // ring door bell is going to be necessary - // - *ShouldRingDoorBell = TRUE; - } - } - - // - // release lock - // - KeReleaseSpinLock(&m_Lock, OldLevel); - -} - - -VOID -CUSBQueue::InterruptCallback( - IN NTSTATUS Status, - OUT PULONG ShouldRingDoorBell) -{ - - DPRINT1("CUSBQueue::InterruptCallback\n"); - - // - // iterate asynchronous list - // - *ShouldRingDoorBell = FALSE; - ProcessAsyncList(Status, ShouldRingDoorBell); - - // - // TODO: implement periodic schedule processing - // -} - -VOID -CUSBQueue::QueueHeadCleanup( - PQUEUE_HEAD CurrentQH) -{ - IUSBRequest * Request; - BOOLEAN ShouldReleaseWhenDone; - - // - // sanity checks - // - PC_ASSERT(CurrentQH->Token.Bits.Active == 0); - PC_ASSERT(CurrentQH->Request); - - // - // get request - // - Request = (IUSBRequest*)CurrentQH->Request; + Request->CompletionCallback(STATUS_SUCCESS /*FIXME*/, UrbStatus, CurrentQH); // // let IUSBRequest free the queue head @@ -690,6 +697,27 @@ } // + // is there a pending async entry + // + if (!IsListEmpty(&m_PendingRequestAsyncList)) + { + // + // remove first entry + // + Entry = RemoveHeadList(&m_CompletedRequestAsyncList); + + // + // get queue head structure + // + CurrentQH = (PQUEUE_HEAD)CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads); + + // + // Add it to the pending list + // + LinkQueueHead(AsyncListQueueHead, CurrentQH); + } + + // // release lock // KeReleaseSpinLock(&m_Lock, OldLevel); Modified: branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbehci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] Sat Apr 30 17:44:43 2011 @@ -61,6 +61,7 @@ UCHAR GetDeviceAddress(); NTSTATUS BuildSetupPacket(); NTSTATUS BuildSetupPacketFromURB(); + ULONG InternalCalculateTransferLength(); // constructor / destructor CUSBRequest(IUnknown *OuterUnknown){} @@ -253,9 +254,14 @@ if (!Urb->UrbBulkOrInterruptTransfer.TransferBufferMDL) { // + // sanity check + // + PC_ASSERT(Urb->UrbBulkOrInterruptTransfer.TransferBuffer); + + // // Create one using TransferBuffer // - DPRINT1("Creating Mdl from Urb Buffer\n"); + DPRINT1("Creating Mdl from Urb Buffer %p Length %lu\n", Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); m_TransferBufferMDL = IoAllocateMdl(Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength, FALSE, @@ -370,8 +376,15 @@ // Urb->UrbHeader.Length = 0; } - - DPRINT1("Request %p Completing Irp %p NtStatusCode %x UrbStatusCode %x\n", this, m_Irp, NtStatusCode, UrbStatusCode); + else + { + // + // calculate transfer length + // + Urb->UrbBulkOrInterruptTransfer.TransferBufferLength = InternalCalculateTransferLength(); + } + + DPRINT1("Request %p Completing Irp %p NtStatusCode %x UrbStatusCode %x Transferred Length %lu\n", this, m_Irp, NtStatusCode, UrbStatusCode, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); // // FIXME: check if the transfer was split @@ -525,9 +538,6 @@ ULONG CUSBRequest::InternalGetTransferType() { - PIO_STACK_LOCATION IoStack; - PURB Urb; - PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor; ULONG TransferType; // @@ -535,38 +545,12 @@ // if (m_Irp) { - // - // get stack location - // - IoStack = IoGetCurrentIrpStackLocation(m_Irp); - - // - // get urb - // - Urb = (PURB)IoStack->Parameters.Others.Argument1; - - // - // check if there is a handle - // - if (Urb->UrbBulkOrInterruptTransfer.PipeHandle) - { - // - // cast to end point - // - EndpointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)Urb->UrbBulkOrInterruptTransfer.PipeHandle; - - // - // end point is defined in the low byte of bmAttributes - // - TransferType = (EndpointDescriptor->bmAttributes & USB_ENDPOINT_TYPE_MASK); - } - else - { - // - // no pipe handle, assume it is a control transfer - // - TransferType = USB_ENDPOINT_TYPE_CONTROL; - } + ASSERT(m_EndpointDescriptor); + + // + // end point is defined in the low byte of bmAttributes + // + TransferType = (m_EndpointDescriptor->bmAttributes & USB_ENDPOINT_TYPE_MASK); } else { @@ -585,30 +569,13 @@ UCHAR CUSBRequest::InternalGetPidDirection() { - PIO_STACK_LOCATION IoStack; - PURB Urb; - PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor; - ASSERT(m_Irp); - // - // get stack location - // - IoStack = IoGetCurrentIrpStackLocation(m_Irp); - - // - // get urb - // - Urb = (PURB)IoStack->Parameters.Others.Argument1; - - // - // cast to end point - // - EndpointDescriptor = (PUSB_ENDPOINT_DESCRIPTOR)Urb->UrbBulkOrInterruptTransfer.PipeHandle; + ASSERT(m_EndpointDescriptor); // // end point is defined in the low byte of bEndpointAddress // - return (EndpointDescriptor->bEndpointAddress & USB_ENDPOINT_DIRECTION_MASK) >> 7; + return (m_EndpointDescriptor->bEndpointAddress & USB_ENDPOINT_DIRECTION_MASK) >> 7; } //---------------------------------------------------------------------------------------- @@ -816,16 +783,19 @@ // // get virtual base of mdl // - Base = MmGetMdlVirtualAddress(m_TransferBufferMDL); + Base = MmGetSystemAddressForMdlSafe(m_TransferBufferMDL, NormalPagePriority); BytesAvailable = m_TransferBufferLength; PC_ASSERT(m_EndpointDescriptor); + PC_ASSERT(Base); + DPRINT1("EndPointAddress %x\n", m_EndpointDescriptor->bEndpointAddress); DPRINT1("EndPointDirection %x\n", USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)); - DPRINT1("Request %p Base Address %p TransferBytesLength %lu\n", this, Base, BytesAvailable); + DPRINT1("Request %p Base Address %p TransferBytesLength %lu MDL %p\n", this, Base, BytesAvailable, m_TransferBufferMDL); DPRINT1("InternalGetPidDirection() %d EndPointAddress %x\n", InternalGetPidDirection(), m_EndpointDescriptor->bEndpointAddress & 0x0F); + DPRINT1("Irp %p QueueHead %p\n", m_Irp, QueueHead); //PC_ASSERT(InternalGetPidDirection() == USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)); @@ -881,7 +851,7 @@ // // check if request fills another page // - if (PageOffset + BytesAvailable >= PAGE_SIZE) + if (PageOffset + BytesAvailable > PAGE_SIZE) { // // move to next page @@ -977,6 +947,11 @@ } // + // store transfer bytes of descriptor + // + m_TransferDescriptors[Index]->TotalBytesToTransfer = m_TransferDescriptors[Index]->Token.Bits.TotalBytesToTransfer; + + // // Go ahead and link descriptors // if (Index > 0) @@ -1579,6 +1554,36 @@ *OutMDL = m_TransferBufferMDL; *TransferLength = m_TransferBufferLength; } +//----------------------------------------------------------------------------------------- +ULONG +CUSBRequest::InternalCalculateTransferLength() +{ + if (!m_Irp) + { + // + // FIXME: get length for control request + // + return m_TransferBufferLength; + } + + // + // sanity check + // + ASSERT(m_EndpointDescriptor); + + if (USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)) + { + // + // bulk in request + // + return m_TransferDescriptors[0]->TotalBytesToTransfer - m_TransferDescriptors[0]->Token.Bits.TotalBytesToTransfer; + } + + // + // bulk out transfer + // + return m_TransferBufferLength; +} //----------------------------------------------------------------------------------------- NTSTATUS
13 years, 7 months
1
0
0
0
[ilardig] 51505: [SUBST] Italian update by Paolo Devoti. See issue #6178 for more details.
by ilardig@svn.reactos.org
Author: ilardig Date: Sat Apr 30 15:55:13 2011 New Revision: 51505 URL:
http://svn.reactos.org/svn/reactos?rev=51505&view=rev
Log: [SUBST] Italian update by Paolo Devoti. See issue #6178 for more details. Modified: trunk/reactos/base/system/subst/lang/it-IT.rc Modified: trunk/reactos/base/system/subst/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/it-…
============================================================================== --- trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] Sat Apr 30 15:55:13 2011 @@ -3,9 +3,9 @@ STRINGTABLE BEGIN - IDS_INCORRECT_PARAMETER_COUNT "Numero di parametri invalido - %s\n" - IDS_INVALID_PARAMETER "Incorrect number of parameters - %s\n" - IDS_INVALID_PARAMETER2 "Parametro invalido - %s\n" + IDS_INCORRECT_PARAMETER_COUNT "Numero di parametri errato - %s\n" + IDS_INVALID_PARAMETER "Numero di parametri errato - %s\n" + IDS_INVALID_PARAMETER2 "Parametro errato - %s\n" IDS_DRIVE_ALREAD_SUBSTED "Unità già sostituita\n" IDS_FAILED_WITH_ERROCODE "Interruzione con codice di errore 0x%x: %s\n" IDS_USAGE "Associa un percorso ad una lettera di unità.\n\nSUBST [unità1: [unità2:]percorso]\nSUBST unità1: /D\n\n unità1: \
13 years, 7 months
1
0
0
0
[akhaldi] 51504: [CRT/MINGW-W64] * Reorganize dll entry and C runtime initialization. By Kai Tietz.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 30 14:26:21 2011 New Revision: 51504 URL:
http://svn.reactos.org/svn/reactos?rev=51504&view=rev
Log: [CRT/MINGW-W64] * Reorganize dll entry and C runtime initialization. By Kai Tietz. Modified: trunk/reactos/lib/3rdparty/mingw/crtdll.c Modified: trunk/reactos/lib/3rdparty/mingw/crtdll.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crtdll.…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/crtdll.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/crtdll.c [iso-8859-1] Sat Apr 30 14:26:21 2011 @@ -180,33 +180,33 @@ goto i__leave; } _pei386_runtime_relocator (); - if (retcode && dwReason == DLL_PROCESS_ATTACH) + if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH) + { + retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved); + if (!retcode) + goto i__leave; + retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved); + if (! retcode) + { + if (dwReason == DLL_PROCESS_ATTACH) + _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + goto i__leave; + } + } + if (dwReason == DLL_PROCESS_ATTACH) __main (); - if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH) + retcode = DllMain(hDllHandle,dwReason,lpreserved); + if (dwReason == DLL_PROCESS_ATTACH && ! retcode) + { + DllMain (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + DllEntryPoint (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + } + if (dwReason == DLL_PROCESS_DETACH || dwReason == DLL_THREAD_DETACH) { retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved); - if (retcode) - retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved); - if (! retcode) - goto i__leave; - } - retcode = DllMain(hDllHandle,dwReason,lpreserved); - if ((dwReason == DLL_PROCESS_ATTACH) && ! retcode) - { - DllMain (hDllHandle, DLL_PROCESS_DETACH, lpreserved); - _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved); - DllEntryPoint (hDllHandle, DLL_PROCESS_DETACH, lpreserved); - } - if (dwReason == DLL_PROCESS_DETACH || dwReason == DLL_THREAD_DETACH) - { if (_CRT_INIT (hDllHandle, dwReason, lpreserved) == FALSE) - { - retcode = FALSE; - } - if (retcode) - { - retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved); - } + retcode = FALSE; } i__leave: __native_dllmain_reason = UINT_MAX;
13 years, 7 months
1
0
0
0
← Newer
1
2
3
4
...
30
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
Results per page:
10
25
50
100
200