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
July 2008
----- 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
25 participants
761 discussions
Start a n
N
ew thread
[jmorlan] 34808: - IntWriteConsoleInput: Copy the data *to* the capture buffer, not *from* it! - Move code for handling ^C (plus that weird pseudo-scrolling thing) from ConioProcessChar to ConioProcessKey, so that WriteConsoleInput won't generate ctrl events. - ConioProcessChar: Remove redundant NULL == Console checks (Console can't be NULL at this point), and move debug message into the check in ConioProcessKey.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Sat Jul 26 10:20:21 2008 New Revision: 34808 URL:
http://svn.reactos.org/svn/reactos?rev=34808&view=rev
Log: - IntWriteConsoleInput: Copy the data *to* the capture buffer, not *from* it! - Move code for handling ^C (plus that weird pseudo-scrolling thing) from ConioProcessChar to ConioProcessKey, so that WriteConsoleInput won't generate ctrl events. - ConioProcessChar: Remove redundant NULL == Console checks (Console can't be NULL at this point), and move debug message into the check in ConioProcessKey. Modified: trunk/reactos/dll/win32/kernel32/misc/console.c trunk/reactos/subsystems/win32/csrss/win32csr/conio.c Modified: trunk/reactos/dll/win32/kernel32/misc/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/console.c [iso-8859-1] Sat Jul 26 10:20:21 2008 @@ -2046,7 +2046,7 @@ /* Allocate space in the Buffer */ CsrCaptureMessageBuffer(CaptureBuffer, - NULL, + lpBuffer, Size, (PVOID*)&Request.Data.WriteConsoleInputRequest.InputRecord); @@ -2069,12 +2069,6 @@ /* Return the number of events read */ DPRINT("Events read: %lx\n", Request.Data.WriteConsoleInputRequest.Length); *lpNumberOfEventsWritten = Request.Data.WriteConsoleInputRequest.Length; - - /* Copy into the buffer */ - DPRINT("Copying to buffer\n"); - RtlCopyMemory(lpBuffer, - Request.Data.WriteConsoleInputRequest.InputRecord, - sizeof(INPUT_RECORD) * *lpNumberOfEventsWritten); } else { Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] Sat Jul 26 10:20:21 2008 @@ -980,74 +980,6 @@ BOOL bClientWake = FALSE; ConsoleInput *TempInput; - /* process Ctrl-C and Ctrl-Break */ - if (Console->Mode & ENABLE_PROCESSED_INPUT && - KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown && - ((KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) || - (KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode == 'C')) && - (KeyEventRecord->InputEvent.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))) - { - PCSRSS_PROCESS_DATA current; - PLIST_ENTRY current_entry; - DPRINT1("Console_Api Ctrl-C\n"); - current_entry = Console->ProcessList.Flink; - while (current_entry != &Console->ProcessList) - { - current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry); - current_entry = current_entry->Flink; - ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current); - } - HeapFree(Win32CsrApiHeap, 0, KeyEventRecord); - return; - } - - if (0 != (KeyEventRecord->InputEvent.Event.KeyEvent.dwControlKeyState - & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) - && (VK_UP == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode - || VK_DOWN == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode)) - { - if (KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown) - { - /* scroll up or down */ - if (NULL == Console) - { - DPRINT1("No Active Console!\n"); - HeapFree(Win32CsrApiHeap, 0, KeyEventRecord); - return; - } - if (VK_UP == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode) - { - /* only scroll up if there is room to scroll up into */ - if (Console->ActiveBuffer->CurrentY != Console->ActiveBuffer->MaxY - 1) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + - Console->ActiveBuffer->MaxY - 1) % - Console->ActiveBuffer->MaxY; - Console->ActiveBuffer->CurrentY++; - } - } - else - { - /* only scroll down if there is room to scroll down into */ - if (Console->ActiveBuffer->CurrentY != 0) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + 1) % - Console->ActiveBuffer->MaxY; - Console->ActiveBuffer->CurrentY--; - } - } - ConioDrawConsole(Console); - } - HeapFree(Win32CsrApiHeap, 0, KeyEventRecord); - return; - } - if (NULL == Console) - { - DPRINT1("No Active Console!\n"); - HeapFree(Win32CsrApiHeap, 0, KeyEventRecord); - return; - } - if (0 != (Console->Mode & (ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT))) { switch(KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar) @@ -1266,6 +1198,7 @@ if (NULL == Console) { + DPRINT1("No Active Console!\n"); return; } @@ -1296,15 +1229,69 @@ (AsciiChar >= ' ') ? AsciiChar : '.', ShiftState); - if (! ConInRec->Fake || ! ConInRec->NotChar) - { - /* FIXME - convert to ascii */ - ConioProcessChar(Console, ConInRec); - } - else + if (ConInRec->Fake && ConInRec->NotChar) { HeapFree(Win32CsrApiHeap, 0, ConInRec); - } + return; + } + + /* process Ctrl-C and Ctrl-Break */ + if (Console->Mode & ENABLE_PROCESSED_INPUT && + er.Event.KeyEvent.bKeyDown && + ((er.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) || + (er.Event.KeyEvent.wVirtualKeyCode == 'C')) && + (er.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))) + { + PCSRSS_PROCESS_DATA current; + PLIST_ENTRY current_entry; + DPRINT1("Console_Api Ctrl-C\n"); + current_entry = Console->ProcessList.Flink; + while (current_entry != &Console->ProcessList) + { + current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry); + current_entry = current_entry->Flink; + ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current); + } + HeapFree(Win32CsrApiHeap, 0, ConInRec); + return; + } + + if (0 != (er.Event.KeyEvent.dwControlKeyState + & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) + && (VK_UP == er.Event.KeyEvent.wVirtualKeyCode + || VK_DOWN == er.Event.KeyEvent.wVirtualKeyCode)) + { + if (er.Event.KeyEvent.bKeyDown) + { + /* scroll up or down */ + if (VK_UP == er.Event.KeyEvent.wVirtualKeyCode) + { + /* only scroll up if there is room to scroll up into */ + if (Console->ActiveBuffer->CurrentY != Console->ActiveBuffer->MaxY - 1) + { + Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + + Console->ActiveBuffer->MaxY - 1) % + Console->ActiveBuffer->MaxY; + Console->ActiveBuffer->CurrentY++; + } + } + else + { + /* only scroll down if there is room to scroll down into */ + if (Console->ActiveBuffer->CurrentY != 0) + { + Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + 1) % + Console->ActiveBuffer->MaxY; + Console->ActiveBuffer->CurrentY--; + } + } + ConioDrawConsole(Console); + } + HeapFree(Win32CsrApiHeap, 0, ConInRec); + return; + } + /* FIXME - convert to ascii */ + ConioProcessChar(Console, ConInRec); } CSR_API(CsrGetScreenBufferInfo)
16 years, 5 months
1
0
0
0
[jimtabor] 34807: - Attempt to initiate hook set from kernel space.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jul 26 07:27:40 2008 New Revision: 34807 URL:
http://svn.reactos.org/svn/reactos?rev=34807&view=rev
Log: - Attempt to initiate hook set from kernel space. Modified: trunk/reactos/subsystems/win32/win32k/include/hook.h trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c trunk/reactos/subsystems/win32/win32k/ntuser/hook.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c Modified: trunk/reactos/subsystems/win32/win32k/include/hook.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/hook.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/hook.h [iso-8859-1] Sat Jul 26 07:27:40 2008 @@ -49,7 +49,8 @@ LRESULT FASTCALL co_EVENT_CallEvents(DWORD, HWND, LONG, LONG); VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread); PHOOK FASTCALL IntGetHookObject(HHOOK); -LRESULT FASTCALL UserCallNextHookEx( int HookId, int Code, WPARAM wParam, LPARAM lParam, BOOL Ansi); +PHOOK FASTCALL IntGetNextHook(PHOOK Hook); +LRESULT FASTCALL UserCallNextHookEx( PHOOK pHook, int Code, WPARAM wParam, LPARAM lParam, BOOL Ansi); #endif /* _WIN32K_HOOK_H */ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/defwnd.c [iso-8859-1] Sat Jul 26 07:27:40 2008 @@ -19,14 +19,14 @@ if (!ISITHOOKED(WH_CBT)) return 0; - if (!UserCallNextHookEx(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam, Ansi)) +// if (!UserCallNextHookEx(WH_CBT, HCBT_SYSCOMMAND, wParam, lParam, Ansi)) return 0; switch (wParam & 0xfff0) { case SC_MOVE: case SC_SIZE: - return UserCallNextHookEx(WH_CBT, HCBT_MOVESIZE, (WPARAM)Window->hSelf, lParam, Ansi); + // return UserCallNextHookEx(WH_CBT, HCBT_MOVESIZE, (WPARAM)Window->hSelf, lParam, Ansi); break; } return 1; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Sat Jul 26 07:27:40 2008 @@ -161,7 +161,8 @@ } /* find the next hook in the chain, skipping the deleted ones */ -static PHOOK FASTCALL +PHOOK +FASTCALL IntGetNextHook(PHOOK Hook) { PHOOKTABLE Table = IntGetTable(Hook); @@ -279,11 +280,16 @@ return NT_SUCCESS(Status) ? uResult : 0; } -LRESULT FASTCALL +/* + Called from inside kernel space. + */ +LRESULT +FASTCALL co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam) { - PHOOK Hook; + PHOOK Hook, SaveHook; PW32THREAD Win32Thread; + PW32CLIENTINFO ClientInfo; PHOOKTABLE Table; LRESULT Result; PWINSTATION_OBJECT WinStaObj; @@ -330,8 +336,14 @@ GlobalHooks->Counts[HOOKID_TO_INDEX(HookId)]++; } + ClientInfo = GetWin32ClientInfo(); + SaveHook = ClientInfo->phkCurrent; + ClientInfo->phkCurrent = Hook; // Load the call. + Result = co_IntCallHookProc(HookId, Code, wParam, lParam, Hook->Proc, Hook->Ansi, &Hook->ModuleName); + + ClientInfo->phkCurrent = SaveHook; Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation, KernelMode, @@ -397,9 +409,19 @@ } } +static LRESULT +FASTCALL +co_HOOK_CallHookNext(PHOOK Hook, INT Code, WPARAM wParam, LPARAM lParam) +{ + return co_IntCallHookProc(Hook->HookId, Code, wParam, lParam, Hook->Proc, + Hook->Ansi, &Hook->ModuleName); +} + + LRESULT FASTCALL IntCallDebugHook( + PHOOK Hook, int Code, WPARAM wParam, LPARAM lParam) @@ -514,15 +536,18 @@ } if (HooklParam) Debug.lParam = (LPARAM)HooklParam; - lResult = co_HOOK_CallHooks(WH_DEBUG, Code, wParam, (LPARAM)&Debug); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Debug); if (HooklParam) ExFreePool(HooklParam); return lResult; } +/* + Called from user space via CallNextHook. + */ LRESULT FASTCALL UserCallNextHookEx( - int HookId, + PHOOK Hook, int Code, WPARAM wParam, LPARAM lParam, @@ -532,7 +557,8 @@ BOOL BadChk = FALSE; // Handle this one first. - if ((HookId == WH_MOUSE) || (HookId == WH_CBT && Code == HCBT_CLICKSKIPPED)) + if ((Hook->HookId == WH_MOUSE) || + (Hook->HookId == WH_CBT && Code == HCBT_CLICKSKIPPED)) { MOUSEHOOKSTRUCTEX Mouse; if (lParam) @@ -558,12 +584,12 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&Mouse); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Mouse); } return lResult; } - switch(HookId) + switch(Hook->HookId) { case WH_MOUSE_LL: { @@ -591,7 +617,7 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&Mouse); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Mouse); } break; } @@ -622,7 +648,7 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&Keyboard); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Keyboard); } break; } @@ -655,8 +681,8 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&Msg); - if (lParam && (HookId == WH_GETMESSAGE)) + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Msg); + if (lParam && (Hook->HookId == WH_GETMESSAGE)) { _SEH_TRY { @@ -685,7 +711,7 @@ switch (Code) { case HCBT_CREATEWND: // Use Ansi. - lResult = co_HOOK_CallHooks(HookId, Code, wParam, lParam); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam); break; case HCBT_MOVESIZE: @@ -715,7 +741,7 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&rt); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&rt); } break; } @@ -747,7 +773,7 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)&CbAs); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&CbAs); } break; } @@ -755,7 +781,7 @@ The rest just use default. */ default: - lResult = co_HOOK_CallHooks(HookId, Code, wParam, lParam); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam); break; } break; @@ -787,7 +813,7 @@ } if (!BadChk) { - lResult = co_HOOK_CallHooks(HookId, Code, wParam, (LPARAM)(lParam ? &EventMsg : NULL)); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)(lParam ? &EventMsg : NULL)); if (lParam) { _SEH_TRY @@ -814,7 +840,7 @@ } case WH_DEBUG: - lResult = IntCallDebugHook( Code, wParam, lParam); + lResult = IntCallDebugHook(Hook, Code, wParam, lParam); break; /* Default the rest like, WH_FOREGROUNDIDLE, WH_KEYBOARD and WH_SHELL. @@ -822,11 +848,11 @@ case WH_FOREGROUNDIDLE: case WH_KEYBOARD: case WH_SHELL: - lResult = co_HOOK_CallHooks(HookId, Code, wParam, lParam); + lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam); break; default: - DPRINT1("Unsupported HOOK Id -> %d\n",HookId); + DPRINT1("Unsupported HOOK Id -> %d\n",Hook->HookId); break; } return lResult; @@ -844,8 +870,6 @@ PW32CLIENTINFO ClientInfo; PWINSTATION_OBJECT WinStaObj; NTSTATUS Status; - LRESULT lResult; - INT HookId; DECLARE_RETURN(LRESULT); DPRINT("Enter NtUserCallNextHookEx\n"); @@ -855,7 +879,6 @@ KernelMode, 0, &WinStaObj); - if (!NT_SUCCESS(Status)) { SetLastNtError(Status); @@ -866,9 +889,14 @@ ClientInfo = GetWin32ClientInfo(); - HookObj = ClientInfo->phkCurrent; // Use this one set from SetWindowHook. - - HookId = HookObj->HookId; + if (!ClientInfo) RETURN( 0); + + HookObj = ClientInfo->phkCurrent; + + if (!HookObj) RETURN( 0); + + UserReferenceObject(HookObj); + Ansi = HookObj->Ansi; if (NULL != HookObj->Thread && (HookObj->Thread != PsGetCurrentThread())) @@ -880,19 +908,11 @@ } NextObj = IntGetNextHook(HookObj); + ClientInfo->phkCurrent = NextObj; // Preset next hook from list. + UserCallNextHookEx( HookObj, Code, wParam, lParam, Ansi); UserDereferenceObject(HookObj); - if (NULL != NextObj) - { - lResult = UserCallNextHookEx( HookId, Code, wParam, lParam, Ansi); - - ClientInfo->phkCurrent = NextObj; - - if (lResult == 0) RETURN( 0); - RETURN( (LRESULT)NextObj); - } - ClientInfo->phkCurrent = NextObj; - - RETURN( 0); + + RETURN( (LRESULT)NextObj); CLEANUP: DPRINT("Leave NtUserCallNextHookEx, ret=%i\n",_ret_); @@ -1109,8 +1129,8 @@ Hook->Ansi = Ansi; Handle = Hook->Self; -// Set the client threads next hook based on the hooks type. - ClientInfo->phkCurrent = IntGetNextHook( Hook); +// Clear the client threads next hook. + ClientInfo->phkCurrent = 0; UserDereferenceObject(Hook); ObDereferenceObject(WinStaObj); 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] Sat Jul 26 07:27:40 2008 @@ -2087,33 +2087,62 @@ break; case FNID_SENDMESSAGECALLBACK: break; + // CallNextHook bypass. case FNID_CALLWNDPROC: - { - CWPSTRUCT CWP; + case FNID_CALLWNDPROCRET: + { PW32CLIENTINFO ClientInfo = GetWin32ClientInfo(); - CWP.hwnd = hWnd; - CWP.message = Msg; - CWP.wParam = wParam; - CWP.lParam = lParam; - lResult = co_HOOK_CallHooks( WH_CALLWNDPROC, - HC_ACTION, - ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0), - (LPARAM)&CWP ); - } - break; - case FNID_CALLWNDPROCRET: - { - CWPRETSTRUCT CWPR; - PW32CLIENTINFO ClientInfo = GetWin32ClientInfo(); - CWPR.hwnd = hWnd; - CWPR.message = Msg; - CWPR.wParam = wParam; - CWPR.lParam = lParam; - CWPR.lResult = ClientInfo->dwHookData; - lResult = co_HOOK_CallHooks( WH_CALLWNDPROCRET, - HC_ACTION, - ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0), - (LPARAM)&CWPR ); + PHOOK NextObj, Hook = ClientInfo->phkCurrent; + + if (!ClientInfo || !Hook) break; + + UserReferenceObject(Hook); + + if (Hook->Thread && (Hook->Thread != PsGetCurrentThread())) + { + UserDereferenceObject(Hook); + break; + } + + NextObj = IntGetNextHook(Hook); + ClientInfo->phkCurrent = NextObj; + + if ( Hook->HookId == WH_CALLWNDPROC) + { + CWPSTRUCT CWP; + CWP.hwnd = hWnd; + CWP.message = Msg; + CWP.wParam = wParam; + CWP.lParam = lParam; + DPRINT1("WH_CALLWNDPROC: Hook %x NextHook %x\n", Hook, NextObj ); + + lResult = co_IntCallHookProc( Hook->HookId, + HC_ACTION, + ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0), + (LPARAM)&CWP, + Hook->Proc, + Hook->Ansi, + &Hook->ModuleName); + } + else + { + CWPRETSTRUCT CWPR; + CWPR.hwnd = hWnd; + CWPR.message = Msg; + CWPR.wParam = wParam; + CWPR.lParam = lParam; + CWPR.lResult = ClientInfo->dwHookData; + + lResult = co_IntCallHookProc( Hook->HookId, + HC_ACTION, + ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0), + (LPARAM)&CWPR, + Hook->Proc, + Hook->Ansi, + &Hook->ModuleName); + } + UserDereferenceObject(Hook); + lResult = (LRESULT) NextObj; } break; }
16 years, 5 months
1
0
0
0
[fireball] 34806: Jon Griffiths msvcrt: Implement ___setlc_active_func/___unguarded_readlc_active_add_func
by fireball@svn.reactos.org
Author: fireball Date: Sat Jul 26 06:54:54 2008 New Revision: 34806 URL:
http://svn.reactos.org/svn/reactos?rev=34806&view=rev
Log: Jon Griffiths msvcrt: Implement ___setlc_active_func/___unguarded_readlc_active_add_func Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.def trunk/reactos/lib/sdk/crt/locale/locale.c Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.de…
============================================================================== --- trunk/reactos/dll/win32/msvcrt/msvcrt.def [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvcrt/msvcrt.def [iso-8859-1] Sat Jul 26 06:54:54 2008 @@ -104,8 +104,8 @@ ; ___lc_collate_cp_func @99 ; ___lc_handle_func @100 ; ___mb_cur_max_func @101 -; ___setlc_active_func @102 -; ___unguarded_readlc_active_add_func @103 + ___setlc_active_func @102 + ___unguarded_readlc_active_add_func @103 __argc @104 DATA __argv @105 DATA __badioinfo @106 DATA Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Sat Jul 26 06:54:54 2008 @@ -875,3 +875,19 @@ { return MSVCRT___lc_codepage; } + +/********************************************************************* + * ___unguarded_readlc_active_add_func (MSVCRT.@) + */ +unsigned int * CDECL ___unguarded_readlc_active_add_func(void) +{ + return &__unguarded_readlc_active; +} + +/********************************************************************* + * ___setlc_active_func (MSVCRT.@) + */ +unsigned int CDECL ___setlc_active_func(void) +{ + return __setlc_active; +}
16 years, 5 months
1
0
0
0
[fireball] 34805: - Sync with Wine (null-initializing some exported data).
by fireball@svn.reactos.org
Author: fireball Date: Sat Jul 26 06:45:59 2008 New Revision: 34805 URL:
http://svn.reactos.org/svn/reactos?rev=34805&view=rev
Log: - Sync with Wine (null-initializing some exported data). Modified: trunk/reactos/lib/sdk/crt/locale/locale.c trunk/reactos/lib/sdk/crt/stdio/file.c Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Sat Jul 26 06:45:59 2008 @@ -27,7 +27,7 @@ */ #define MAX_ELEM_LEN 64 /* Max length of country/language/CP string */ -unsigned char MSVCRT_mbctype[257]; +unsigned char MSVCRT_mbctype[257] = { 0 }; static int g_mbcp_is_multibyte = 0; /* It seems that the data about valid trail bytes is not available from kernel32 @@ -49,11 +49,11 @@ }; -char MSVCRT_current_lc_all[MAX_LOCALE_LENGTH]; -LCID MSVCRT_current_lc_all_lcid; -int MSVCRT___lc_codepage; -int MSVCRT___lc_collate_cp; -HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1]; +char MSVCRT_current_lc_all[MAX_LOCALE_LENGTH] = { 0 }; +LCID MSVCRT_current_lc_all_lcid = 0; +int MSVCRT___lc_codepage = 0; +int MSVCRT___lc_collate_cp = 0; +HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 }; /* MT */ #define LOCK_LOCALE _mlock(_SETLOCALE_LOCK); Modified: trunk/reactos/lib/sdk/crt/stdio/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Sat Jul 26 06:45:59 2008 @@ -96,7 +96,7 @@ /*static */ioinfo fdesc[MAX_FILES]; -FILE _iob[3]; +FILE _iob[3] = { { 0 } }; static int fdstart = 3; /* first unallocated fd */ static int fdend = 3; /* highest allocated fd */
16 years, 5 months
1
0
0
0
[sserapion] 34804: Merge 34789, make appropriate changes to ReactOS-amd64.rbuild
by sserapion@svn.reactos.org
Author: sserapion Date: Sat Jul 26 03:21:51 2008 New Revision: 34804 URL:
http://svn.reactos.org/svn/reactos?rev=34804&view=rev
Log: Merge 34789, make appropriate changes to ReactOS-amd64.rbuild Modified: branches/ros-amd64-bringup/reactos/Makefile branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild branches/ros-amd64-bringup/reactos/ReactOS-ppc.rbuild Modified: branches/ros-amd64-bringup/reactos/Makefile URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/Makef…
============================================================================== --- branches/ros-amd64-bringup/reactos/Makefile [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/Makefile [iso-8859-1] Sat Jul 26 03:21:51 2008 @@ -38,7 +38,7 @@ # This can require several minutes to complete. If you only need to check # dependencies for a single or few modules then you can use the # module_depends targets instead. This target can also repair a damaged or -# missing makefile-{ROS_ARCH}.auto if needed. +# missing makefile-${ROS_ARCH}.auto if needed. # # module_depends # These targets do a dependency check of individual modules. Replace module @@ -125,7 +125,7 @@ # -r Input XML # # ROS_AUTOMAKE -# Alternate name of makefile.auto +# Alternate name of makefile-${ROS_ARCH}.auto # # ROS_BUILDENGINE # The Build engine to be used. The variable defaults to rbuild (RBUILD_TARGET) @@ -158,7 +158,11 @@ endif ifeq ($(ROS_AUTOMAKE),) -ROS_AUTOMAKE=makefile.auto + ifeq ($(ARCH),i386) + ROS_AUTOMAKE=makefile.auto + else + ROS_AUTOMAKE=makefile-$(ARCH).auto + endif endif all: $(ROS_AUTOMAKE) Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
============================================================================== --- branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] Sat Jul 26 03:21:51 2008 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> -<project name="ReactOS" makefile="makefile.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<project name="ReactOS" makefile="makefile-amd64.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> <xi:include href="config-amd64.rbuild"> <xi:fallback> <xi:include href="config-amd64.template.rbuild" /> Modified: branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
============================================================================== --- branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ReactOS-arm.rbuild [iso-8859-1] Sat Jul 26 03:21:51 2008 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> -<project name="ReactOS" makefile="makefile.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<project name="ReactOS" makefile="makefile-arm.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> <xi:include href="config-arm.rbuild"> <xi:fallback> <xi:include href="config-arm.template.rbuild" /> Modified: branches/ros-amd64-bringup/reactos/ReactOS-ppc.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
============================================================================== --- branches/ros-amd64-bringup/reactos/ReactOS-ppc.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ReactOS-ppc.rbuild [iso-8859-1] Sat Jul 26 03:21:51 2008 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> -<project name="ReactOS" makefile="makefile.ppc" xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<project name="ReactOS" makefile="makefile-ppc.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> <xi:include href="config-ppc.rbuild"> <xi:fallback> <xi:include href="config-ppc.template.rbuild" />
16 years, 5 months
1
0
0
0
[sserapion] 34803: Fix more warnings. Convert pciidex to use spec file. NOTE: drivers need to be carefully reviewed for 64bit safety. There is a lot of stuff that can kill us that won't show up in any compiler, knowing ros we probably have at least some issues. Everything but network/ compiles error free.
by sserapion@svn.reactos.org
Author: sserapion Date: Sat Jul 26 01:08:04 2008 New Revision: 34803 URL:
http://svn.reactos.org/svn/reactos?rev=34803&view=rev
Log: Fix more warnings. Convert pciidex to use spec file. NOTE: drivers need to be carefully reviewed for 64bit safety. There is a lot of stuff that can kill us that won't show up in any compiler, knowing ros we probably have at least some issues. Everything but network/ compiles error free. Added: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec (with props) Removed: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -218,7 +218,7 @@ /* Register GUID_DEVICE_SYS_BUTTON interface and report capability */ if (DeviceExtension->NewCaps != DeviceExtension->ReportedCaps) { - WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL); + WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL); if (WaitingIrp) { /* Cancel the current power irp, as capability changed */ @@ -273,7 +273,7 @@ } /* Directly complete the IOCTL_GET_SYS_BUTTON_EVENT Irp (if any) */ - WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL); + WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL); if (WaitingIrp) { PULONG pEvent = (PULONG)WaitingIrp->AssociatedIrp.SystemBuffer; @@ -447,7 +447,7 @@ else { WaitingIrp = InterlockedCompareExchangePointer( - &DeviceExtension->PowerIrp, + (PVOID)&DeviceExtension->PowerIrp, Irp, NULL); /* Check if an Irp is already pending */ @@ -465,7 +465,7 @@ PowerKey = InterlockedExchange((PLONG)&DeviceExtension->LastPowerKey, 0); if (PowerKey != 0) { - (VOID)InterlockedCompareExchangePointer(&DeviceExtension->PowerIrp, NULL, Irp); + (VOID)InterlockedCompareExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL, Irp); *(PULONG)Irp->AssociatedIrp.SystemBuffer = PowerKey; Status = STATUS_SUCCESS; Irp->IoStatus.Status = Status; Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -99,7 +99,7 @@ AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].Flags = CM_RESOURCE_INTERRUPT_LATCHED; AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level = KEYBOARD_IRQ; AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector = 0; - AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (KAFFINITY)-1; + AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (LONG_PTR)(KAFFINITY)-1; /* Create default resource list translated */ AllocatedResourcesTranslated = ExAllocatePoolWithTag(PagedPool, ResourceListSize, I8042PRT_TAG); @@ -115,7 +115,7 @@ AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level, AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector, (PKIRQL)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level, - &AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity); + (PVOID)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity); /* Send IRP_MN_START_DEVICE */ TopDeviceObject = IoGetAttachedDeviceReference(Pdo); Modified: branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -532,7 +532,7 @@ /* Fill the read buffer */ TRACE_(SERENUM, "Fill the read buffer\n"); - Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count); + Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count); if (!NT_SUCCESS(Status)) goto ByeBye; RtlInitUnicodeString(&DeviceId, L"Serenum\\Mouse"); Modified: branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1504,7 +1504,7 @@ srb, irpStack->MajorFunction, irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0, - MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4), + MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4), &status); // @@ -1519,7 +1519,7 @@ retry = TRUE; } - if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) { + if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) { // // Retry request. @@ -1656,7 +1656,7 @@ srb, irpStack->MajorFunction, irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0, - MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4), + MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4), &status); // @@ -1671,7 +1671,7 @@ retry = TRUE; } - if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) { + if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) { // // Retry request. If the class driver has supplied a StartIo, Modified: branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -927,7 +927,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1]; - PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; + //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; ULONG i; UCHAR errorByte; UCHAR srbStatus; @@ -1435,7 +1435,7 @@ // is clear and then just wait for an arbitrary amount of time! // if (deviceExtension->DeviceFlags[i] & DFLAGS_ATAPI_DEVICE) { - PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1]; + //PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1]; PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[i >> 1]; ULONG waitCount; @@ -2139,7 +2139,7 @@ PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PULONG adapterCount = (PULONG)Context; PUCHAR ioSpace; - ULONG i,j; + ULONG i; ULONG irq; ULONG portBase; ULONG retryCount; @@ -2600,12 +2600,12 @@ --*/ { - PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension; - ULONG rangeNumber = 0; + //PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension; + //ULONG rangeNumber = 0; ULONG pciBuffer; ULONG slotNumber; ULONG functionNumber; - ULONG status; + //ULONG status; PCI_SLOT_NUMBER slotData; PPCI_COMMON_CONFIG pciData; UCHAR vendorString[5]; @@ -2668,8 +2668,8 @@ vendorStrPtr = vendorString; deviceStrPtr = deviceString; - AtapiHexToString(pciData->VendorID, &vendorStrPtr); - AtapiHexToString(pciData->DeviceID, &deviceStrPtr); + AtapiHexToString(pciData->VendorID, (PVOID)&vendorStrPtr); + AtapiHexToString(pciData->DeviceID, (PVOID)&deviceStrPtr); DebugPrint((2, "FindBrokenController: Bus %x Slot %x Function %x Vendor %s Product %s\n", @@ -2747,7 +2747,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; - ULONG nativeModeAdapterTableIndex = (ULONG)Context; + ULONG nativeModeAdapterTableIndex = (ULONG_PTR)Context; ULONG channel; PUCHAR ioSpace; BOOLEAN atapiOnly, @@ -2803,8 +2803,8 @@ vendorStrPtr = vendorString; deviceStrPtr = deviceString; - AtapiHexToString(pciData.VendorID, &vendorStrPtr); - AtapiHexToString(pciData.DeviceID, &deviceStrPtr); + AtapiHexToString(pciData.VendorID, (PVOID)&vendorStrPtr); + AtapiHexToString(pciData.DeviceID, (PVOID)&deviceStrPtr); // // Compare strings. @@ -3515,7 +3515,7 @@ ULONG status; ULONG i; UCHAR statusByte,interruptReason; - BOOLEAN commandComplete = FALSE; + //BOOLEAN commandComplete = FALSE; BOOLEAN atapiDev = FALSE; if (srb) { @@ -4771,7 +4771,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1]; - PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; + //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; ULONG startingSector; ULONG sectors; ULONG endSector; @@ -5759,7 +5759,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; - ULONG status; + //ULONG status; PSENSE_DATA senseBuffer = (PSENSE_DATA)Srb->DataBuffer; @@ -6258,7 +6258,7 @@ newStatus = ScsiPortInitialize(DriverObject, Argument2, &hwInitializationData, - (PVOID) i); + (PVOID)(ULONG_PTR)i); if (newStatus < statusToReturn) statusToReturn = newStatus; } Removed: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def (removed) @@ -1,8 +1,0 @@ -LIBRARY pciidex.sys - -EXPORTS -PciIdeXGetBusData@16 -PciIdeXInitialize@16 -PciIdeXSetBusData@20 - -;EOF Modified: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1,8 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> <module name="pciidex" type="kernelmodedriver" installbase="system32/drivers" installname="pciidex.sys"> - <importlibrary definition="pciidex.def" /> + <importlibrary definition="pciidex.spec.def" /> <library>ntoskrnl</library> + <file>pciidex.spec</file> <file>fdo.c</file> <file>miniport.c</file> <file>misc.c</file> Added: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec (added) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1,0 +1,5 @@ + +@ stdcall PciIdeXGetBusData(ptr ptr long long) +@ stdcall PciIdeXInitialize(ptr ptr ptr long) +@ stdcall PciIdeXSetBusData(ptr ptr ptr long long) + Propchange: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -366,9 +366,9 @@ } else // hint-name { - Name = (PCHAR)((ULONG)DriverBase + - *FunctionNameList + 2); - Hint = *(PUSHORT)((ULONG)DriverBase + *FunctionNameList); + Name = (PCHAR)((ULONG_PTR)DriverBase + + (ULONG_PTR)*FunctionNameList + 2); + Hint = *(PUSHORT)((ULONG_PTR)DriverBase + (ULONG_PTR)*FunctionNameList); } #if 0 DPRINT(" Hint:%04x Name:%s\n", Hint, pName);
16 years, 5 months
1
0
0
0
[tkreuzer] 34802: make ncitool generate at least valid 64 bit assembly
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jul 25 20:17:03 2008 New Revision: 34802 URL:
http://svn.reactos.org/svn/reactos?rev=34802&view=rev
Log: make ncitool generate at least valid 64 bit assembly Modified: branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c Modified: branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c [iso-8859-1] Fri Jul 25 20:17:03 2008 @@ -51,6 +51,11 @@ #define UserModeStub_x86 " movl $0x%x, %%eax\n" \ " movl $KUSER_SHARED_SYSCALL, %%ecx\n" \ " call *(%%ecx)\n" \ + " ret $0x%x\n\n" + +#define UserModeStub_amd64 " movq $0x%x, %%rax\n" \ + " movq $KUSER_SHARED_SYSCALL, %%rcx\n" \ + " call *(%%rcx)\n" \ " ret $0x%x\n\n" #define UserModeStub_ppc " stwu 1,-16(1)\n" \ @@ -91,6 +96,13 @@ " leal 4(%%esp), %%edx\n" \ " pushfl\n" \ " pushl $KGDT_R0_CODE\n" \ + " call _KiSystemService\n" \ + " ret $0x%x\n\n" + +#define KernelModeStub_amd64 " movq $0x%x, %%rax\n" \ + " leaq 4(%%rsp), %%rdx\n" \ + " pushfq\n" \ + " pushq $KGDT_R0_CODE\n" \ " call _KiSystemService\n" \ " ret $0x%x\n\n" @@ -130,7 +142,7 @@ struct ncitool_data_t ncitool_data[] = { { "i386", 4, KernelModeStub_x86, UserModeStub_x86, ".global _%s@%d\n", "_%s@%d:\n" }, - { "amd64", 4, KernelModeStub_x86, UserModeStub_x86, + { "amd64", 4, KernelModeStub_amd64, UserModeStub_amd64, ".global _%s@%d\n", "_%s@%d:\n" }, { "powerpc", 4, KernelModeStub_ppc, UserModeStub_ppc, "\t.globl %s\n", "%s:\n" },
16 years, 5 months
1
0
0
0
[tkreuzer] 34801: - hack amd64/ke.h - unhack inernal/ntoskrnl.h - more files compile
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jul 25 20:07:27 2008 New Revision: 34801 URL:
http://svn.reactos.org/svn/reactos?rev=34801&view=rev
Log: - hack amd64/ke.h - unhack inernal/ntoskrnl.h - more files compile Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Fri Jul 25 20:07:27 2008 @@ -1,5 +1,5 @@ -#ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H -#define __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H +#ifndef __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H +#define __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H #if __GNUC__ >=3 #pragma GCC system_header @@ -45,9 +45,10 @@ #ifndef __ASM__ -//#include "intrin_i.h" +#include "intrin_i.h" -#define KeArchFnInit() Ke386FnInit() +//#define KeArchFnInit() Ke386FnInit() +#define KeArchFnInit() DbgPrint("KeArchFnInit is unimplemented!\n"); #define KeArchHaltProcessor() Ke386HaltProcessor() extern ULONG Ke386CacheAlignment; @@ -136,6 +137,6 @@ #endif #endif -#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H */ +#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */ /* EOF */ Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1] Fri Jul 25 20:07:27 2008 @@ -17,7 +17,7 @@ #ifdef _NTOSKRNL_ -#if !defined (_ARM_) && !defined (_M_AMD64) +#ifndef _ARM_ #define KeGetCurrentThread _KeGetCurrentThread #define KeGetPreviousMode _KeGetPreviousMode #endif @@ -34,7 +34,7 @@ #define InterlockedExchange _InterlockedExchange #define InterlockedExchangeAdd _InterlockedExchangeAdd -//#include "ke.h" +#include "ke.h" #include "i386/mm.h" #include "i386/fpu.h" #include "i386/v86m.h" Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Fri Jul 25 20:07:27 2008 @@ -94,29 +94,29 @@ </directory> </if> <file>apc.c</file> - <!-- file>balmgr.c</file --> + <file>balmgr.c</file> <!-- file>bug.c</file --> - <!-- file>clock.c</file --> + <file>clock.c</file> <file>config.c</file> <file>devqueue.c</file> - <!-- file>dpc.c</file --> + <file>dpc.c</file> <file>eventobj.c</file> <file>except.c</file> <file>freeldr.c</file> <file>gate.c</file> <file>gmutex.c</file> <file>ipi.c</file> - <!-- file>krnlinit.c</file --> + <file>krnlinit.c</file> <file>mutex.c</file> <file>procobj.c</file> - <!-- file>profobj.c</file --> - <!-- file>queue.c</file --> - <!-- file>semphobj.c</file --> + <file>profobj.c</file> + <file>queue.c</file> + <file>semphobj.c</file> <file>spinlock.c</file> - <!-- file>thrdschd.c</file --> - <!-- file>thrdobj.c</file --> - <!-- file>timerobj.c</file --> - <!-- file>wait.c</file --> + <file>thrdschd.c</file> + <file>thrdobj.c</file> + <file>timerobj.c</file> + <file>wait.c</file> </directory> <directory name="cc"> <file>cacheman.c</file> @@ -182,7 +182,7 @@ <file>ioport.S</file> </directory> </if> - <!-- file>atom.c</file --> + <file>atom.c</file> <file>callback.c</file> <file>dbgctrl.c</file> <file>efi.c</file> @@ -194,7 +194,7 @@ <file>handle.c</file> <file>harderr.c</file> <file>hdlsterm.c</file> - <!-- file>init.c</file --> + <file>init.c</file> <file>keyedevt.c</file> <file>locale.c</file> <!-- file>lookas.c</file --> @@ -206,7 +206,7 @@ <!-- file>sem.c</file --> <file>shutdown.c</file> <!-- file>sysinfo.c</file --> - <!-- file>time.c</file --> + <file>time.c</file> <!-- file>timer.c</file --> <file>uuid.c</file> <file>win32k.c</file> @@ -251,12 +251,12 @@ <file>driver.c</file> <file>drvrlist.c</file> <file>error.c</file> - <!-- file>file.c</file --> + <file>file.c</file> <!-- file>iocomp.c</file --> <file>ioevent.c</file> <file>iofunc.c</file> <file>iomdl.c</file> - <!-- file>iomgr.c</file --> + <file>iomgr.c</file> <file>iorsrce.c</file> <file>iotimer.c</file> <file>iowork.c</file> @@ -316,7 +316,7 @@ </directory> <file>kdinit.c</file> <file>kdio.c</file> - <!-- file>kdmain.c</file --> + <file>kdmain.c</file> </directory> </if> <if property="_WINKD_" value ="1"> @@ -369,7 +369,7 @@ <!-- file>mdlsup.c</file --> <!-- file>mm.c</file --> <!-- file>mminit.c</file --> - <!-- file>mpw.c</file --> + <file>mpw.c</file> <!-- file>ncache.c</file --> <file>npool.c</file> <file>pagefile.c</file> @@ -395,8 +395,8 @@ </if> </directory> <directory name="ob"> - <!-- file>obdir.c</file --> - <!-- file>obinit.c</file --> + <file>obdir.c</file> + <file>obinit.c</file> <file>obhandle.c</file> <file>obname.c</file> <file>oblife.c</file> @@ -426,7 +426,7 @@ <file>kill.c</file> <file>psnotify.c</file> <file>process.c</file> - <!-- file>psmgr.c</file --> + <file>psmgr.c</file> <file>query.c</file> <file>quota.c</file> <file>security.c</file>
16 years, 5 months
1
0
0
0
[tkreuzer] 34800: - add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jul 25 20:05:57 2008 New Revision: 34800 URL:
http://svn.reactos.org/svn/reactos?rev=34800&view=rev
Log: - add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] Fri Jul 25 20:05:57 2008 @@ -5506,9 +5506,17 @@ #define PROFILE_LEVEL 15 #define HIGH_LEVEL 15 +#define KI_USER_SHARED_DATA 0xFFFFF78000000000 + typedef struct _KFLOATING_SAVE { ULONG Dummy; } KFLOATING_SAVE, *PKFLOATING_SAVE; + +NTKERNELAPI +KIRQL +KeGetCurrentIrql ( + VOID + ); #elif defined(__PowerPC__)
16 years, 5 months
1
0
0
0
[jimtabor] 34799: - Fix boot add missing return.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Jul 25 19:25:42 2008 New Revision: 34799 URL:
http://svn.reactos.org/svn/reactos?rev=34799&view=rev
Log: - Fix boot add missing return. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c 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] Fri Jul 25 19:25:42 2008 @@ -301,7 +301,7 @@ LPMSG lpmsg, INT code) { - BOOL BadChk = FALSE; + BOOL BadChk = FALSE, Ret = TRUE; MSG Msg; DECLARE_RETURN(BOOL); @@ -331,7 +331,7 @@ if (!co_HOOK_CallHooks( WH_SYSMSGFILTER, code, 0, (LPARAM)&Msg)) { - co_HOOK_CallHooks( WH_MSGFILTER, code, 0, (LPARAM)&Msg); + Ret = co_HOOK_CallHooks( WH_MSGFILTER, code, 0, (LPARAM)&Msg); } _SEH_TRY @@ -349,6 +349,7 @@ } _SEH_END; if (BadChk) RETURN( FALSE); + RETURN( Ret) CLEANUP: DPRINT("Leave NtUserCallMsgFilter. ret=%i\n", _ret_);
16 years, 5 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
77
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Results per page:
10
25
50
100
200