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
December 2005
----- 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
40 participants
704 discussions
Start a n
N
ew thread
[gvg] 19816: SVN maintenance
by gvg@svn.reactos.com
SVN maintenance Property changes on: trunk/reactos/drivers/multimedia/portcls ___________________________________________________________________ Name: svn:ignore + GNUmakefile Property changes on: trunk/reactos/lib/keyboard/kbdhu ___________________________________________________________________ Name: svn:ignore + GNUmakefile
19 years
1
0
0
0
[gvg] 19815: Send proper messages/events to processes during logoff and kill them if they
by gvg@svn.reactos.com
Send proper messages/events to processes during logoff and kill them if they dont self-destruct. Work in progress, not complete yet. Committed so others can work on it too. Modified: trunk/reactos/include/reactos/winlogon.h Modified: trunk/reactos/lib/user32/misc/exit.c Modified: trunk/reactos/subsys/csrss/win32csr/conio.c Modified: trunk/reactos/subsys/csrss/win32csr/dllmain.c Modified: trunk/reactos/subsys/csrss/win32csr/exitros.c Added: trunk/reactos/subsys/csrss/win32csr/resource.h Modified: trunk/reactos/subsys/csrss/win32csr/win32csr.rc Modified: trunk/reactos/subsys/csrss/win32csr/win32csr.xml Modified: trunk/reactos/subsys/system/winlogon/sas.c Modified: trunk/reactos/subsys/system/winlogon/winlogon.c Modified: trunk/reactos/subsys/system/winlogon/winlogon.h Modified: trunk/reactos/subsys/system/winlogon/wlx.c _____ Modified: trunk/reactos/include/reactos/winlogon.h --- trunk/reactos/include/reactos/winlogon.h 2005-12-01 22:24:00 UTC (rev 19814) +++ trunk/reactos/include/reactos/winlogon.h 2005-12-01 22:29:57 UTC (rev 19815) @@ -10,15 +10,12 @@ #ifndef REACTOS_WINLOGON_H_INCLUDED #define REACTOS_WINLOGON_H_INCLUDED -#define WINLOGON_DESKTOP L"Winlogon" -#define WINLOGON_SAS_CLASS L"SAS window class" -#define WINLOGON_SAS_TITLE L"SAS" - #define PM_WINLOGON_EXITWINDOWS WM_APP -#define EWX_INTERNAL_FLAG 0x10000 +#define EWX_INTERNAL_FLAG 0x10000 #define EWX_INTERNAL_KILL_USER_APPS (EWX_INTERNAL_FLAG | 0x100) #define EWX_INTERNAL_KILL_ALL_APPS (EWX_INTERNAL_FLAG | 0x200) +#define EWX_INTERNAL_FLAG_LOGOFF 0x1000 #endif /* REACTOS_WINLOGON_H_INCLUDED */ _____ Modified: trunk/reactos/lib/user32/misc/exit.c --- trunk/reactos/lib/user32/misc/exit.c 2005-12-01 22:24:00 UTC (rev 19814) +++ trunk/reactos/lib/user32/misc/exit.c 2005-12-01 22:29:57 UTC (rev 19815) @@ -13,11 +13,9 @@ * Sequence of events: * * - App (usually explorer) calls ExitWindowsEx() - * - ExitWindowsEx() sends a message to CSRSS (note: investigation shows it - * doesn't transfer to kernel mode) + * - ExitWindowsEx() sends a message to CSRSS * - CSRSS impersonates the caller and sends a message to a hidden WinLogon window - * - WinLogon sends a SAS event to the GINA, asking for permission (e.g. if the - * required rights are granted) to proceed + * - WinLogon checks if the caller has the required privileges * - WinLogon enters pending log-out state * - WinLogon impersonates the interactive user and calls ExitWindowsEx() again, * passing some special internal flags @@ -28,7 +26,7 @@ * CSRSS will put up a dialog box asking if the process should be terminated. * Using the registry key HKCU\Control Panel\Desktop\AutoEndTask you can * specify that the dialog box shouldn't be shown and CSRSS should just - * terminates the thread. If the the WM_ENDSESSION message is processed + * terminate the thread. If the the WM_ENDSESSION message is processed * but the thread doesn't terminate within the timeout specified by * HKCU\Control Panel\Desktop\WaitToKillAppTimeout CSRSS will terminate * the thread. When all the top-level windows have been destroyed CSRSS @@ -53,15 +51,13 @@ * dialog boxes or kill threads/processes. Same for console processes, * using the CTRL_SHUTDOWN_EVENT. The Service Control Manager is one of * these console processes and has a special timeout value WaitToKillServiceTimeout. - * - WinLogon calls ADVAPI32.InitiateSystemShutdown() - * - ADVAPI32.InitiateSystemShutdown*() issues a "InitiateSystemShutdown" request - * to the SM (SMSS API # 1) + * - WinLogon issues a "InitiateSystemShutdown" request to the SM (SMSS API # 1) * - the SM propagates the shutdown request to every environment subsystem it * started since bootstrap time (still active ones, of course) * - each environment subsystem, on shutdown request, releases every resource * it aquired during its life (processes, memory etc), then dies * - when every environment subsystem has gone to bed, the SM actually initiates - * to shutdown the kernel and executive by calling NtShutdownSystem. + * the kernel and executive shutdown by calling NtShutdownSystem. */ /* * @implemented _____ Modified: trunk/reactos/subsys/csrss/win32csr/conio.c --- trunk/reactos/subsys/csrss/win32csr/conio.c 2005-12-01 22:24:00 UTC (rev 19814) +++ trunk/reactos/subsys/csrss/win32csr/conio.c 2005-12-01 22:29:57 UTC (rev 19815) @@ -56,7 +56,7 @@ } VOID FASTCALL -ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData) +ConioConsoleCtrlEventTimeout(DWORD Event, PCSRSS_PROCESS_DATA ProcessData, DWORD Timeout) { HANDLE Thread; @@ -73,10 +73,17 @@ DPRINT1("Failed thread creation (Error: 0x%x)\n", GetLastError()); return; } + WaitForSingleObject(Thread, Timeout); CloseHandle(Thread); } } +VOID FASTCALL +ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData) +{ + ConioConsoleCtrlEventTimeout(Event, ProcessData, INFINITE); +} + #define GET_CELL_BUFFER(b,o)\ (b)->Buffer[(o)++] _____ Modified: trunk/reactos/subsys/csrss/win32csr/dllmain.c --- trunk/reactos/subsys/csrss/win32csr/dllmain.c 2005-12-01 22:24:00 UTC (rev 19814) +++ trunk/reactos/subsys/csrss/win32csr/dllmain.c 2005-12-01 22:29:57 UTC (rev 19815) @@ -143,11 +143,18 @@ NTSTATUS FASTCALL Win32CsrReleaseObject(PCSRSS_PROCESS_DATA ProcessData, - HANDLE Object) + HANDLE Object) { return (CsrExports.CsrReleaseObjectProc)(ProcessData, Object); } +NTSTATUS FASTCALL +Win32CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc, + PVOID Context) +{ + return (CsrExports.CsrEnumProcessesProc)(EnumProc, Context); +} + static BOOL STDCALL Win32CsrInitComplete(void) { _____ Modified: trunk/reactos/subsys/csrss/win32csr/exitros.c --- trunk/reactos/subsys/csrss/win32csr/exitros.c 2005-12-01 22:24:00 UTC (rev 19814) +++ trunk/reactos/subsys/csrss/win32csr/exitros.c 2005-12-01 22:29:57 UTC (rev 19815) @@ -9,6 +9,8 @@ /* INCLUDES ******************************************************************/ #include "w32csr.h" +#include <sddl.h> +#include "resource.h" #define NDEBUG #include <debug.h> @@ -52,7 +54,8 @@ DWORD WindowCreator; Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE); - Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE); + Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - + sizeof(PORT_MESSAGE); if (0 == GetWindowThreadProcessId(Request->Data.SetLogonNotifyWindowRequest.Logon NotifyWindow, &WindowCreator)) @@ -75,34 +78,873 @@ return Request->Status; } -CSR_API(CsrExitReactos) +typedef struct tagSHUTDOWN_SETTINGS { - Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE); - Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE); + BOOL AutoEndTasks; + DWORD HungAppTimeout; + DWORD WaitToKillAppTimeout; +} SHUTDOWN_SETTINGS, *PSHUTDOWN_SETTINGS; +#define DEFAULT_AUTO_END_TASKS FALSE +#define DEFAULT_HUNG_APP_TIMEOUT 5000 +#define DEFAULT_WAIT_TO_KILL_APP_TIMEOUT 20000 + +typedef struct tagNOTIFY_CONTEXT +{ + DWORD ProcessId; + UINT Msg; + WPARAM wParam; + LPARAM lParam; + HDESK Desktop; + DWORD StartTime; + DWORD QueryResult; + HWND Dlg; + DWORD EndNowResult; + BOOL ShowUI; + HANDLE UIThread; + HWND WndClient; + PSHUTDOWN_SETTINGS ShutdownSettings; + LPTHREAD_START_ROUTINE SendMessageProc; +} NOTIFY_CONTEXT, *PNOTIFY_CONTEXT; + +#define QUERY_RESULT_ABORT 0 +#define QUERY_RESULT_CONTINUE 1 +#define QUERY_RESULT_TIMEOUT 2 +#define QUERY_RESULT_ERROR 3 +#define QUERY_RESULT_FORCE 4 + +static void FASTCALL +UpdateProgressBar(HWND ProgressBar, PNOTIFY_CONTEXT NotifyContext) +{ + DWORD Passed; + + Passed = GetTickCount() - NotifyContext->StartTime; + Passed -= NotifyContext->ShutdownSettings->HungAppTimeout; + if (NotifyContext->ShutdownSettings->WaitToKillAppTimeout < Passed) + { + Passed = NotifyContext->ShutdownSettings->WaitToKillAppTimeout; + } + SendMessageW(ProgressBar, PBM_SETPOS, Passed / 2, 0); +} + +static INT_PTR CALLBACK +EndNowDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam) +{ + INT_PTR Result; + PNOTIFY_CONTEXT NotifyContext; + HWND ProgressBar; + DWORD TitleLength; + int Len; + LPWSTR Title; + + switch(Msg) + { + case WM_INITDIALOG: + NotifyContext = (PNOTIFY_CONTEXT) lParam; + NotifyContext->EndNowResult = QUERY_RESULT_ABORT; + SetWindowLongPtrW(Dlg, DWLP_USER, (LONG_PTR) lParam); + TitleLength = SendMessageW(NotifyContext->WndClient, WM_GETTEXTLENGTH, + 0, 0) + + GetWindowTextLengthW(Dlg); + Title = HeapAlloc(Win32CsrApiHeap, 0, (TitleLength + 1) * sizeof(WCHAR)); + if (NULL != Title) + { + Len = GetWindowTextW(Dlg, Title, TitleLength + 1); + SendMessageW(NotifyContext->WndClient, WM_GETTEXT, + TitleLength + 1 - Len, (LPARAM) (Title + Len)); + SetWindowTextW(Dlg, Title); + HeapFree(Win32CsrApiHeap, 0, Title); + } + ProgressBar = GetDlgItem(Dlg, IDC_PROGRESS); + SendMessageW(ProgressBar, PBM_SETRANGE32, 0, + NotifyContext->ShutdownSettings->WaitToKillAppTimeout / 2); + UpdateProgressBar(ProgressBar, NotifyContext); + SetTimer(Dlg, 0, 200, NULL); + Result = FALSE; + break; + + case WM_TIMER: + NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); + ProgressBar = GetDlgItem(Dlg, IDC_PROGRESS); + UpdateProgressBar(ProgressBar, NotifyContext); + Result = TRUE; + break; + + case WM_COMMAND: + if (BN_CLICKED == HIWORD(wParam) && IDC_END_NOW == LOWORD(wParam)) + { + NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); + NotifyContext->EndNowResult = QUERY_RESULT_FORCE; + SendMessageW(Dlg, WM_CLOSE, 0, 0); + Result = TRUE; + } + else + { + Result = FALSE; + } + break; + + case WM_CLOSE: + DestroyWindow(Dlg); + Result = TRUE; + break; + + case WM_DESTROY: + NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); + NotifyContext->Dlg = NULL; + KillTimer(Dlg, 0); + PostQuitMessage(NotifyContext->EndNowResult); + Result = TRUE; + break; + + default: + Result = FALSE; + break; + } + + return Result; +} + +typedef void (STDCALL *INITCOMMONCONTROLS_PROC)(void); + +static void FASTCALL +CallInitCommonControls() +{ + static BOOL Initialized = FALSE; + HMODULE Lib; + INITCOMMONCONTROLS_PROC InitProc; + + if (Initialized) + { + return; + } + + Lib = LoadLibraryW(L"COMCTL32.DLL"); + if (NULL == Lib) + { + return; + } + InitProc = (INITCOMMONCONTROLS_PROC) GetProcAddress(Lib, "InitCommonControls"); + if (NULL == InitProc) + { + return; + } + + (*InitProc)(); + + Initialized = TRUE; +} + +static DWORD WINAPI +EndNowThreadProc(LPVOID Parameter) +{ + PNOTIFY_CONTEXT NotifyContext = (PNOTIFY_CONTEXT) Parameter; + MSG Msg; + + SetThreadDesktop(NotifyContext->Desktop); + SwitchDesktop(NotifyContext->Desktop); + CallInitCommonControls(); + NotifyContext->Dlg = CreateDialogParam(Win32CsrDllHandle, + MAKEINTRESOURCE(IDD_END_NOW), NULL, + EndNowDlgProc, (LPARAM) NotifyContext); + if (NULL == NotifyContext->Dlg) + { + return 0; + } + ShowWindow(NotifyContext->Dlg, SW_SHOWNORMAL); + + while (GetMessageW(&Msg, NULL, 0, 0)) + { + if (! IsDialogMessage(NotifyContext->Dlg, &Msg)) + { + TranslateMessage(&Msg); + DispatchMessageW(&Msg); + } + } + + return Msg.wParam; +} + +typedef struct tagMESSAGE_CONTEXT +{ + HWND Wnd; + UINT Msg; + WPARAM wParam; + LPARAM lParam; + DWORD Timeout; +} MESSAGE_CONTEXT, *PMESSAGE_CONTEXT; + +static DWORD WINAPI +SendQueryEndSession(LPVOID Parameter) +{ + PMESSAGE_CONTEXT Context = (PMESSAGE_CONTEXT) Parameter; + LRESULT Result; + + if (SendMessageTimeoutW(Context->Wnd, WM_QUERYENDSESSION, Context->wParam, + Context->lParam, SMTO_NORMAL, Context->Timeout, + &Result)) + { + return Result ? QUERY_RESULT_CONTINUE : QUERY_RESULT_ABORT; + } + + return 0 == GetLastError() ? QUERY_RESULT_TIMEOUT : QUERY_RESULT_ERROR; +} + +static DWORD WINAPI +SendEndSession(LPVOID Parameter) +{ + PMESSAGE_CONTEXT Context = (PMESSAGE_CONTEXT) Parameter; + LRESULT Result; + + if (Context->wParam) + { + if (SendMessageTimeoutW(Context->Wnd, WM_ENDSESSION, Context->wParam, + Context->lParam, SMTO_NORMAL, Context->Timeout, + &Result)) + { + return QUERY_RESULT_CONTINUE; + } + return 0 == GetLastError() ? QUERY_RESULT_TIMEOUT : QUERY_RESULT_ERROR; + } + else + { + SendMessage(Context->Wnd, WM_ENDSESSION, Context->wParam, + Context->lParam); + return QUERY_RESULT_CONTINUE; + } +} + +static BOOL CALLBACK +NotifyTopLevelEnum(HWND Wnd, LPARAM lParam) +{ + PNOTIFY_CONTEXT NotifyContext = (PNOTIFY_CONTEXT) lParam; + MESSAGE_CONTEXT MessageContext; + DWORD Now, Passed; + DWORD Timeout, WaitStatus; + DWORD ProcessId; + HANDLE MessageThread; + HANDLE Threads[2]; + + if (0 == GetWindowThreadProcessId(Wnd, &ProcessId)) + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + return FALSE; + } + + if (ProcessId == NotifyContext->ProcessId) + { + Now = GetTickCount(); + if (0 == NotifyContext->StartTime) + { + NotifyContext->StartTime = Now; + } + /* Note: Passed is computed correctly even when GetTickCount() wraps due + to unsigned arithmetic */ + Passed = Now - NotifyContext->StartTime; + MessageContext.Wnd = Wnd; + MessageContext.Msg = NotifyContext->Msg; + MessageContext.wParam = NotifyContext->wParam; + MessageContext.lParam = NotifyContext->lParam; + MessageContext.Timeout = NotifyContext->ShutdownSettings->HungAppTimeout; + if (! NotifyContext->ShutdownSettings->AutoEndTasks) + { + MessageContext.Timeout += NotifyContext->ShutdownSettings->WaitToKillAppTimeout; + } + if (Passed < MessageContext.Timeout) + { + MessageContext.Timeout -= Passed; + MessageThread = CreateThread(NULL, 0, NotifyContext->SendMessageProc, + (LPVOID) &MessageContext, 0, NULL); + if (NULL == MessageThread) + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + return FALSE; + } + Timeout = NotifyContext->ShutdownSettings->HungAppTimeout; + if (Passed < Timeout) + { + Timeout -= Passed; + WaitStatus = WaitForSingleObjectEx(MessageThread, Timeout, FALSE); + } + else + { + WaitStatus = WAIT_TIMEOUT; + } + if (WAIT_TIMEOUT == WaitStatus) + { + NotifyContext->WndClient = Wnd; + if (NULL == NotifyContext->UIThread && NotifyContext->ShowUI) + { + NotifyContext->UIThread = CreateThread(NULL, 0, + EndNowThreadProc, + (LPVOID) NotifyContext, + 0, NULL); + } + Threads[0] = MessageThread; + Threads[1] = NotifyContext->UIThread; + WaitStatus = WaitForMultipleObjectsEx(NULL == NotifyContext->UIThread ? + 1 : 2, + Threads, FALSE, INFINITE, + FALSE); + if (WAIT_OBJECT_0 == WaitStatus) + { + if (! GetExitCodeThread(MessageThread, &NotifyContext->QueryResult)) + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + } + } + else if (WAIT_OBJECT_0 + 1 == WaitStatus) + { + if (! GetExitCodeThread(NotifyContext->UIThread, + &NotifyContext->QueryResult)) + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + } + } + else + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + } + if (WAIT_OBJECT_0 != WaitStatus) + { + TerminateThread(MessageThread, QUERY_RESULT_TIMEOUT); + } + } + else if (WAIT_OBJECT_0 == WaitStatus) + { + if (! GetExitCodeThread(MessageThread, + &NotifyContext->QueryResult)) + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + } + } + else + { + NotifyContext->QueryResult = QUERY_RESULT_ERROR; + } + CloseHandle(MessageThread); + } + else + { + NotifyContext->QueryResult = QUERY_RESULT_TIMEOUT; + } + } + + return QUERY_RESULT_CONTINUE == NotifyContext->QueryResult; +} + +static BOOL CALLBACK +NotifyDesktopEnum(LPWSTR DesktopName, LPARAM lParam) +{ + PNOTIFY_CONTEXT Context = (PNOTIFY_CONTEXT) lParam; + + Context->Desktop = OpenDesktopW(DesktopName, 0, FALSE, + DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP); + if (NULL == Context->Desktop) + { + DPRINT1("OpenDesktop failed with error %d\n", GetLastError()); + Context->QueryResult = QUERY_RESULT_ERROR; + return FALSE; + } + + EnumDesktopWindows(Context->Desktop, NotifyTopLevelEnum, lParam); + + CloseDesktop(Context->Desktop); + + return QUERY_RESULT_CONTINUE == Context->QueryResult; +} + +static BOOL FASTCALL +NotifyTopLevelWindows(PNOTIFY_CONTEXT Context) +{ + HWINSTA WindowStation; + + WindowStation = GetProcessWindowStation(); + if (NULL == WindowStation) + { + DPRINT1("GetProcessWindowStation failed with error %d\n", GetLastError()); + return TRUE; + } + + EnumDesktopsW(WindowStation, NotifyDesktopEnum, (LPARAM) Context); + + return TRUE; +} + +static BOOL FASTCALL +NotifyAndTerminateProcess(PCSRSS_PROCESS_DATA ProcessData, + PSHUTDOWN_SETTINGS ShutdownSettings, + UINT Flags) +{ + NOTIFY_CONTEXT Context; + HANDLE Process; + DWORD QueryResult = QUERY_RESULT_CONTINUE; + + Context.QueryResult = QUERY_RESULT_CONTINUE; + + if (0 == (Flags & EWX_FORCE)) + { + if (NULL != ProcessData->Console) + { + ConioConsoleCtrlEventTimeout(CTRL_LOGOFF_EVENT, ProcessData, + ShutdownSettings->WaitToKillAppTimeout); + } + else + { + Context.ProcessId = (DWORD) ProcessData->ProcessId; + Context.wParam = 0; + Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ? + ENDSESSION_LOGOFF : 0); + Context.StartTime = 0; + Context.UIThread = NULL; + Context.ShowUI = DtbgIsDesktopVisible(); + Context.Dlg = NULL; + Context.ShutdownSettings = ShutdownSettings; + Context.SendMessageProc = SendQueryEndSession; + + NotifyTopLevelWindows(&Context); + + Context.wParam = (QUERY_RESULT_ABORT != Context.QueryResult); + Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ? + ENDSESSION_LOGOFF : 0); + Context.SendMessageProc = SendEndSession; + Context.ShowUI = DtbgIsDesktopVisible() && + (QUERY_RESULT_ABORT != Context.QueryResult); + QueryResult = Context.QueryResult; + Context.QueryResult = QUERY_RESULT_CONTINUE; + + NotifyTopLevelWindows(&Context); + + if (NULL != Context.UIThread) + { + if (NULL != Context.Dlg) + { + SendMessageW(Context.Dlg, WM_CLOSE, 0, 0); + } + else + { + TerminateThread(Context.UIThread, QUERY_RESULT_ERROR); + } + CloseHandle(Context.UIThread); + } + } + + if (QUERY_RESULT_ABORT == QueryResult) + { + return FALSE; + } + } + + /* Terminate this process */ + Process = OpenProcess(PROCESS_TERMINATE, FALSE, + (DWORD) ProcessData->ProcessId); + if (NULL == Process) + { + DPRINT1("Unable to open process %d, error %d\n", ProcessData->ProcessId, + GetLastError()); + return TRUE; + } + TerminateProcess(Process, 0); + CloseHandle(Process); + + return TRUE; +} + +typedef struct tagPROCESS_ENUM_CONTEXT +{ + UINT ProcessCount; + PCSRSS_PROCESS_DATA *ProcessData; + TOKEN_ORIGIN TokenOrigin; + DWORD ShellProcess; + DWORD CsrssProcess; +} PROCESS_ENUM_CONTEXT, *PPROCESS_ENUM_CONTEXT; + +static NTSTATUS STDCALL +ExitReactosProcessEnum(PCSRSS_PROCESS_DATA ProcessData, PVOID Data) +{ + HANDLE Process; + HANDLE Token; + TOKEN_ORIGIN Origin; + DWORD ReturnLength; + PPROCESS_ENUM_CONTEXT Context = (PPROCESS_ENUM_CONTEXT) Data; + PCSRSS_PROCESS_DATA *NewData; + + /* Do not kill winlogon or csrss */ + if ((DWORD) ProcessData->ProcessId == Context->CsrssProcess || + ProcessData->ProcessId == LogonProcess) + { + return STATUS_SUCCESS; + } + + /* Get the login session of this process */ + Process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, + (DWORD) ProcessData->ProcessId); + if (NULL == Process) + { + DPRINT1("Unable to open process %d, error %d\n", ProcessData->ProcessId, + GetLastError()); + return STATUS_UNSUCCESSFUL; + } + + if (! OpenProcessToken(Process, TOKEN_QUERY, &Token)) + { + DPRINT1("Unable to open token for process %d, error %d\n", + ProcessData->ProcessId, GetLastError()); + CloseHandle(Process); + return STATUS_UNSUCCESSFUL; + } + CloseHandle(Process); + + if (! GetTokenInformation(Token, TokenOrigin, &Origin, + sizeof(TOKEN_ORIGIN), &ReturnLength)) + { + DPRINT1("GetTokenInformation failed for process %d with error %d\n", + ProcessData->ProcessId, GetLastError()); + CloseHandle(Token); + return STATUS_UNSUCCESSFUL; + } + CloseHandle(Token); + + /* This process will be killed if it's in the correct logon session */ + if (RtlEqualLuid(&(Context->TokenOrigin.OriginatingLogonSession), + &(Origin.OriginatingLogonSession))) + { + /* Kill the shell process last */ + if ((DWORD) ProcessData->ProcessId == Context->ShellProcess) + { + ProcessData->ShutdownLevel = 0; + } + NewData = HeapAlloc(Win32CsrApiHeap, 0, (Context->ProcessCount + 1) + * sizeof(PCSRSS_PROCESS_DATA)); + if (NULL == NewData) + { + return STATUS_NO_MEMORY; + } + if (0 != Context->ProcessCount) + { + memcpy(NewData, Context->ProcessData, + Context->ProcessCount * sizeof(PCSRSS_PROCESS_DATA)); + HeapFree(Win32CsrApiHeap, 0, Context->ProcessData); + } + Context->ProcessData = NewData; + Context->ProcessData[Context->ProcessCount] = ProcessData; + Context->ProcessCount++; + } + + return STATUS_SUCCESS; +} + +static int +ProcessDataCompare(const void *Elem1, const void *Elem2) +{ + const PCSRSS_PROCESS_DATA *ProcessData1 = (PCSRSS_PROCESS_DATA *) Elem1; + const PCSRSS_PROCESS_DATA *ProcessData2 = (PCSRSS_PROCESS_DATA *) Elem2; + + if ((*ProcessData1)->ShutdownLevel < (*ProcessData2)->ShutdownLevel) + { + return +1; + } + else if ((*ProcessData2)->ShutdownLevel < (*ProcessData1)->ShutdownLevel) + { + return -1; + } + else if ((*ProcessData1)->ProcessId < (*ProcessData2)->ProcessId) + { + return +1; + } + else if ((*ProcessData2)->ProcessId < (*ProcessData1)->ProcessId) + { + return -1; + } + + return 0; +} + +static DWORD FASTCALL +GetShutdownSetting(HKEY DesktopKey, LPCWSTR ValueName, DWORD DefaultValue) +{ + BYTE ValueBuffer[16]; + LONG ErrCode; + DWORD Type; + DWORD ValueSize; + UNICODE_STRING StringValue; + ULONG Value; + + ValueSize = sizeof(ValueBuffer); + ErrCode = RegQueryValueExW(DesktopKey, ValueName, NULL, &Type, ValueBuffer, + &ValueSize); + if (ERROR_SUCCESS != ErrCode) + { + DPRINT("GetShutdownSetting for %S failed with error code %ld\n", + ValueName, ErrCode); + return DefaultValue; + } + + if (REG_SZ == Type) + { + RtlInitUnicodeString(&StringValue, (LPCWSTR) ValueBuffer); + if (! NT_SUCCESS(RtlUnicodeStringToInteger(&StringValue, 10, &Value))) + { + DPRINT1("Unable to convert value %S for setting %S\n", + StringValue.Buffer, ValueName); + return DefaultValue; + } + return (DWORD) Value; + } + else if (REG_DWORD == Type) + { + return *((DWORD *) ValueBuffer); + } + + DPRINT1("Unexpected registry type %d for setting %S\n", Type, ValueName); + return DefaultValue; +} + +static void FASTCALL +LoadShutdownSettings(PSID Sid, PSHUTDOWN_SETTINGS ShutdownSettings) +{ + static WCHAR Subkey[] = L"\\Control Panel\\Desktop"; + LPWSTR StringSid; + WCHAR InitialKeyName[128]; + LPWSTR KeyName; + HKEY DesktopKey; + LONG ErrCode; + + ShutdownSettings->AutoEndTasks = DEFAULT_AUTO_END_TASKS; + ShutdownSettings->HungAppTimeout = DEFAULT_HUNG_APP_TIMEOUT; + ShutdownSettings->WaitToKillAppTimeout = DEFAULT_WAIT_TO_KILL_APP_TIMEOUT; + + if (! ConvertSidToStringSidW(Sid, &StringSid)) + { + DPRINT1("ConvertSidToStringSid failed with error %d, using default shutdown settings\n", + GetLastError()); + return; + } + if (wcslen(StringSid) + wcslen(Subkey) + 1 <= + sizeof(InitialKeyName) / sizeof(WCHAR)) + { + KeyName = InitialKeyName; + } + else + { + KeyName = HeapAlloc(Win32CsrApiHeap, 0, + (wcslen(StringSid) + wcslen(Subkey) + 1) * + sizeof(WCHAR)); + if (NULL == KeyName) + { + DPRINT1("Failed to allocate memory, using default shutdown settings\n"); + LocalFree(StringSid); + return; + } + } + wcscat(wcscpy(KeyName, StringSid), Subkey); + LocalFree(StringSid); + + ErrCode = RegOpenKeyExW(HKEY_USERS, KeyName, 0, KEY_QUERY_VALUE, &DesktopKey); + if (KeyName != InitialKeyName) + { + HeapFree(Win32CsrApiHeap, 0, KeyName); + } + if (ERROR_SUCCESS != ErrCode) + { + DPRINT1("RegOpenKeyEx failed with error %ld, using default shutdown settings\n", ErrCode); + return; + } + + ShutdownSettings->AutoEndTasks = (BOOL) GetShutdownSetting(DesktopKey, L"AutoEndTasks", + (DWORD) DEFAULT_AUTO_END_TASKS); + ShutdownSettings->HungAppTimeout = GetShutdownSetting(DesktopKey, + L"HungAppTimeout", + DEFAULT_HUNG_APP_TIMEOUT); + ShutdownSettings->WaitToKillAppTimeout = GetShutdownSetting(DesktopKey, + L"WaitToKillAppTimeout", + DEFAULT_WAIT_TO_KILL_APP_TIMEOUT); + + RegCloseKey(DesktopKey); +} + +static NTSTATUS FASTCALL +InternalExitReactos(DWORD ProcessId, DWORD ThreadId, UINT Flags) +{ + HANDLE CallerThread; + HANDLE CallerToken; + NTSTATUS Status; + PROCESS_ENUM_CONTEXT Context; + DWORD ReturnLength; + HWND ShellWnd; + UINT ProcessIndex; + char FixedUserInfo[64]; + TOKEN_USER *UserInfo; + SHUTDOWN_SETTINGS ShutdownSettings; + + if (ProcessId != (DWORD) LogonProcess) + { + DPRINT1("Internal ExitWindowsEx call not from winlogon\n"); + return STATUS_ACCESS_DENIED; + } + + CallerThread = OpenThread(THREAD_QUERY_INFORMATION, FALSE, ThreadId); + if (NULL == CallerThread) + { + DPRINT1("OpenThread failed with error %d\n", GetLastError()); + return STATUS_UNSUCCESSFUL; + } + if (! OpenThreadToken(CallerThread, TOKEN_QUERY, FALSE, &CallerToken)) + { + DPRINT1("OpenThreadToken failed with error %d\n", GetLastError()); + CloseHandle(CallerThread); + return STATUS_UNSUCCESSFUL; + } + CloseHandle(CallerThread); + + Context.ProcessCount = 0; + Context.ProcessData = NULL; + if (! GetTokenInformation(CallerToken, TokenOrigin, &Context.TokenOrigin, + sizeof(TOKEN_ORIGIN), &ReturnLength)) + { + DPRINT1("GetTokenInformation failed with error %d\n", GetLastError()); + CloseHandle(CallerToken); + return STATUS_UNSUCCESSFUL; + } + if (! GetTokenInformation(CallerToken, TokenUser, FixedUserInfo, + sizeof(FixedUserInfo), &ReturnLength)) + { + if (sizeof(FixedUserInfo) < ReturnLength) + { + UserInfo = HeapAlloc(Win32CsrApiHeap, 0, ReturnLength); + if (NULL == UserInfo) + { + DPRINT1("Unable to allocate %u bytes for user info\n", + (unsigned) ReturnLength); + CloseHandle(CallerToken); + return STATUS_NO_MEMORY; + } + if (! GetTokenInformation(CallerToken, TokenUser, UserInfo, + ReturnLength, &ReturnLength)) + { + DPRINT1("GetTokenInformation failed with error %d\n", + GetLastError()); + HeapFree(Win32CsrApiHeap, 0, UserInfo); + CloseHandle(CallerToken); + return STATUS_UNSUCCESSFUL; + } + } + else + { + DPRINT1("GetTokenInformation failed with error %d\n", GetLastError()); + CloseHandle(CallerToken); + return STATUS_UNSUCCESSFUL; + } + } + else + { + UserInfo = (TOKEN_USER *) FixedUserInfo; + } + CloseHandle(CallerToken); + LoadShutdownSettings(UserInfo->User.Sid, &ShutdownSettings); + if (UserInfo != (TOKEN_USER *) FixedUserInfo) + { + HeapFree(Win32CsrApiHeap, 0, UserInfo); + } + Context.CsrssProcess = GetCurrentProcessId(); + ShellWnd = GetShellWindow(); + if (NULL == ShellWnd) + { + DPRINT("No shell present\n"); + Context.ShellProcess = 0; + } + else if (0 == GetWindowThreadProcessId(ShellWnd, &Context.ShellProcess)) + { + DPRINT1("Can't get process id of shell window\n"); + Context.ShellProcess = 0; + } + + Status = Win32CsrEnumProcesses(ExitReactosProcessEnum, &Context); + if (! NT_SUCCESS(Status)) + { + DPRINT1("Failed to enumerate registered processes, status 0x%x\n", + Status); + if (NULL != Context.ProcessData) + { + HeapFree(Win32CsrApiHeap, 0, Context.ProcessData); + } + return Status; + } + + qsort(Context.ProcessData, Context.ProcessCount, sizeof(PCSRSS_PROCESS_DATA), + ProcessDataCompare); + + /* Terminate processes, stop if we find one kicking and screaming it doesn't + want to die */ + Status = STATUS_SUCCESS; + for (ProcessIndex = 0; + ProcessIndex < Context.ProcessCount && NT_SUCCESS(Status); + ProcessIndex++) + { + if (! NotifyAndTerminateProcess(Context.ProcessData[ProcessIndex], + &ShutdownSettings, Flags)) + { + Status = STATUS_REQUEST_ABORTED; + } + } + + /* Cleanup */ + if (NULL != Context.ProcessData) + { + HeapFree(Win32CsrApiHeap, 0, Context.ProcessData); + } + + return Status; +} + +static NTSTATUS FASTCALL +UserExitReactos(DWORD UserProcessId, UINT Flags) +{ + NTSTATUS Status; + if (NULL == LogonNotifyWindow) { DPRINT1("No LogonNotifyWindow registered\n"); - Request->Status = STATUS_NOT_FOUND; - return Request->Status; + return STATUS_NOT_FOUND; } /* FIXME Inside 2000 says we should impersonate the caller here */ - Request->Status = SendMessageW(LogonNotifyWindow, PM_WINLOGON_EXITWINDOWS, - (WPARAM) Request->Header.ClientId.UniqueProcess, - (LPARAM) Request->Data.ExitReactosRequest.Flags); - /* If the message isn't handled, the return value is 0, so 0 doesn't indicate success. - Success is indicated by a 1 return value, if anything besides 0 or 1 it's a - NTSTATUS value */ - if (1 == Request->Status) + Status = SendMessageW(LogonNotifyWindow, PM_WINLOGON_EXITWINDOWS, + (WPARAM) UserProcessId, + (LPARAM) Flags); + /* If the message isn't handled, the return value is 0, so 0 doesn't indicate + success. Success is indicated by a 1 return value, if anything besides 0 + or 1 it's a NTSTATUS value */ + if (1 == Status) { [truncated at 1000 lines; 346 more skipped]
19 years
1
0
0
0
[mf] 19814: simplify secure function usage using template overloads
by mf@svn.reactos.com
simplify secure function usage using template overloads Modified: trunk/reactos/subsys/system/explorer/explorer.vcproj Modified: trunk/reactos/subsys/system/explorer/precomp.h Modified: trunk/reactos/subsys/system/explorer/shell/fatfs.cpp Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp Modified: trunk/reactos/subsys/system/explorer/shell/pane.cpp Modified: trunk/reactos/subsys/system/explorer/shell/regfs.cpp Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp Modified: trunk/reactos/subsys/system/explorer/utility/utility.cpp Modified: trunk/reactos/subsys/system/explorer/utility/utility.h Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.h _____ Modified: trunk/reactos/subsys/system/explorer/explorer.vcproj --- trunk/reactos/subsys/system/explorer/explorer.vcproj 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/explorer.vcproj 2005-12-01 22:24:00 UTC (rev 19814) @@ -43,7 +43,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - PreprocessorDefinitions="_DEBUG;UNICODE;WIN32;_WIN32_IE=0x0600;_WIN32_WI NNT=0x0501" + PreprocessorDefinitions="_DEBUG;UNICODE;WIN32;_WIN32_IE=0x0600;_WIN32_WI NNT=0x0501,_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES,_CRT_SECURE_CPP_OVERL OAD_STANDARD_NAMES_COUNT" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -141,7 +141,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - PreprocessorDefinitions="NDEBUG;UNICODE;WIN32;_WIN32_IE=0x0600;_WIN32_WI NNT=0x0501" + PreprocessorDefinitions="NDEBUG;UNICODE;WIN32;_WIN32_IE=0x0600;_WIN32_WI NNT=0x0501,_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES,_CRT_SECURE_CPP_OVERL OAD_STANDARD_NAMES_COUNT" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -426,7 +426,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - PreprocessorDefinitions="_DEBUG;WIN32;_WIN32_IE=0x0600;_WIN32_WINNT=0x05 01" + PreprocessorDefinitions="_DEBUG;WIN32;_WIN32_IE=0x0600;_WIN32_WINNT=0x05 01,_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES,_CRT_SECURE_CPP_OVERLOAD_STAN DARD_NAMES_COUNT" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -524,7 +524,7 @@ Name="VCCLCompilerTool" Optimization="1" InlineFunctionExpansion="1" - PreprocessorDefinitions="NDEBUG;WIN32;_WIN32_IE=0x0600;_WIN32_WINNT=0x05 01;_CRT_SECURE_NO_DEPRECATE_xx" + PreprocessorDefinitions="NDEBUG;WIN32;_WIN32_IE=0x0600;_WIN32_WINNT=0x05 01;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES,_CRT_SECURE_CPP_OVERLOAD_STAN DARD_NAMES_COUNT" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" _____ Modified: trunk/reactos/subsys/system/explorer/precomp.h --- trunk/reactos/subsys/system/explorer/precomp.h 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/precomp.h 2005-12-01 22:24:00 UTC (rev 19814) @@ -25,6 +25,9 @@ // Martin Fuchs, 17.05.2004 // +#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1 +#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1 + #include "utility/utility.h" #include "explorer.h" _____ Modified: trunk/reactos/subsys/system/explorer/shell/fatfs.cpp --- trunk/reactos/subsys/system/explorer/shell/fatfs.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/shell/fatfs.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -83,7 +83,7 @@ TCHAR buffer[MAX_PATH]; - _tcscpy_s(buffer, COUNTOF(buffer), (LPCTSTR)_path); + _tcscpy(buffer, (LPCTSTR)_path); LPTSTR pname = buffer + _tcslen(buffer); int plen = COUNTOF(buffer) - _tcslen(buffer); _____ Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp --- trunk/reactos/subsys/system/explorer/shell/mainframe.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/shell/mainframe.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -1021,7 +1021,7 @@ if (activate_drive_window(root)) return 0; - _tsplitpath_s(root, drv, COUNTOF(drv), 0, 0, 0, 0, 0, 0); + _tsplitpath_s(root, drv, COUNTOF(drv), NULL, 0, NULL, 0, NULL, 0); if (!SetCurrentDirectory(drv)) { display_error(_hwnd, GetLastError()); @@ -1251,14 +1251,14 @@ TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE]; HWND child_wnd; - _tsplitpath_s(path, drv1, COUNTOF(drv1), 0, 0, 0, 0, 0, 0); + _tsplitpath_s(path, drv1, COUNTOF(drv1), NULL, 0, NULL, 0, NULL, 0); // search for a already open window for the same drive for(child_wnd=::GetNextWindow(_hmdiclient,GW_CHILD); child_wnd; child_wnd=::GetNextWindow(child_wnd, GW_HWNDNEXT)) { FileChildWindow* child = (FileChildWindow*) SendMessage(child_wnd, PM_GET_FILEWND_PTR, 0, 0); if (child) { - _tsplitpath_s(child->get_root()._path, drv2, COUNTOF(drv2), 0, 0, 0, 0, 0, 0); + _tsplitpath_s(child->get_root()._path, drv2, COUNTOF(drv2), NULL, 0, NULL, 0, NULL, 0); if (!lstrcmpi(drv2, drv1)) { SendMessage(_hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0); _____ Modified: trunk/reactos/subsys/system/explorer/shell/pane.cpp --- trunk/reactos/subsys/system/explorer/shell/pane.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/shell/pane.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -501,7 +501,7 @@ if (visible_cols & COL_SIZE) { ULONGLONG size = ((ULONGLONG)entry->_data.nFileSizeHigh << 32) | entry->_data.nFileSizeLow; - _stprintf_s1(buffer, BUFFER_LEN, TEXT("%") LONGLONGARG TEXT("d"), size); + _stprintf(buffer, TEXT("%") LONGLONGARG TEXT("d"), size); if (calcWidthCol == -1) _out_wrkr.output_number(dis, _positions, col, buffer); @@ -539,7 +539,7 @@ ULONGLONG index = ((ULONGLONG)entry->_bhfi.nFileIndexHigh << 32) | entry->_bhfi.nFileIndexLow; if (visible_cols & COL_INDEX) { - _stprintf_s1(buffer, BUFFER_LEN, TEXT("%") LONGLONGARG TEXT("X"), index); + _stprintf(buffer, TEXT("%") LONGLONGARG TEXT("X"), index); if (calcWidthCol == -1) _out_wrkr.output_text(dis, _positions, col, buffer, DT_RIGHT); _____ Modified: trunk/reactos/subsys/system/explorer/shell/regfs.cpp --- trunk/reactos/subsys/system/explorer/shell/regfs.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/shell/regfs.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -40,7 +40,7 @@ TCHAR buffer[MAX_PATH]; - _tcscpy_s(buffer, COUNTOF(buffer), (LPCTSTR)_path); + _tcscpy(buffer, (LPCTSTR)_path); LPTSTR pname = buffer + _tcslen(buffer); int plen = MAX_PATH - _tcslen(buffer); @@ -65,7 +65,7 @@ break; w32fd.dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY; - _tcsncpy_s(w32fd.cFileName, COUNTOF(w32fd.cFileName), name, name_len); + _tcsncpy(w32fd.cFileName, name, name_len); _tcscpy_s(pname, plen, name); entry = new RegDirectory(this, buffer, _hKeyRoot); @@ -153,7 +153,7 @@ entry->_content = _tcsdup(value); else if (type == REG_DWORD) { TCHAR b[32]; - _stprintf_s1(b, COUNTOF(b), TEXT("%ld"), *(DWORD*)&value); + _stprintf(b, TEXT("%ld"), *(DWORD*)&value); entry->_content = _tcsdup(b); } } @@ -254,49 +254,49 @@ _data.dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY; entry = new RegDirectory(this, TEXT("\\"), HKEY_CURRENT_USER); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_CURRENT_USER")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_CURRENT_USER")); entry->_level = level; first_entry = entry; last = entry; entry = new RegDirectory(this, TEXT("\\"), HKEY_LOCAL_MACHINE); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_LOCAL_MACHINE")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_LOCAL_MACHINE")); entry->_level = level; last->_next = entry; last = entry; entry = new RegDirectory(this, TEXT("\\"), HKEY_CLASSES_ROOT); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_CLASSES_ROOT")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_CLASSES_ROOT")); entry->_level = level; last->_next = entry; last = entry; entry = new RegDirectory(this, TEXT("\\"), HKEY_USERS); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_USERS")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_USERS")); entry->_level = level; last->_next = entry; last = entry; /* entry = new RegDirectory(this, TEXT("\\"), HKEY_PERFORMANCE_DATA); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_PERFORMANCE_DATA")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_PERFORMANCE_DATA")); entry->_level = level; last->_next = entry; last = entry; */ entry = new RegDirectory(this, TEXT("\\"), HKEY_CURRENT_CONFIG); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_CURRENT_CONFIG")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_CURRENT_CONFIG")); entry->_level = level; last->_next = entry; last = entry; /* entry = new RegDirectory(this, TEXT("\\"), HKEY_DYN_DATA); - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), TEXT("HKEY_DYN_DATA")); + _tcscpy(entry->_data.cFileName, TEXT("HKEY_DYN_DATA")); entry->_level = level; last->_next = entry; _____ Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.cpp --- trunk/reactos/subsys/system/explorer/shell/shellfs.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/shell/shellfs.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -61,7 +61,7 @@ if (path) { // fill with drive names "C:", ... assert(_tcslen(path) < GlobalSize(medium.UNION_MEMBER(hGlobal))); - _tcscpy_s(pw32fdata->cFileName, COUNTOF(pw32fdata->cFileName), path); + _tcscpy(pw32fdata->cFileName, path); UINT sem_org = SetErrorMode(SEM_FAILCRITICALERRORS); @@ -412,7 +412,7 @@ if (SUCCEEDED(name_from_pidl(_folder, pidls[n], name, COUNTOF(name), SHGDN_INFOLDER|0x2000/*0x2000=SHGDN_INCLUDE_NONFILESYS*/))) { if (!entry->_data.cFileName[0]) - _tcscpy_s(entry->_data.cFileName, COUNTOF(entry->_data.cFileName), name); + _tcscpy(entry->_data.cFileName, name); else if (_tcscmp(entry->_display_name, name)) entry->_display_name = _tcsdup(name); // store display name separate from file name; sort display by file name } _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp --- trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -100,7 +100,7 @@ SpecialFolderFSPath app_data(CSIDL_APPDATA, _hwnd); ///@todo perhaps also look into CSIDL_COMMON_APPDATA ? - _stprintf_s1(path, COUNTOF(path), TEXT("%s\\")QUICKLAUNCH_FOLDER, (LPCTSTR)app_data); + _stprintf(path, TEXT("%s\\")QUICKLAUNCH_FOLDER, (LPCTSTR)app_data); RecursiveCreateDirectory(path); _dir = new ShellDirectory(GetDesktopFolder(), path, _hwnd); _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -250,8 +250,8 @@ if (!ignore.empty()) { _tsplitpath_s(ignore, ignore_path, COUNTOF(ignore_path), ignore_dir, COUNTOF(ignore_dir), ignore_name, COUNTOF(ignore_name), ignore_ext, COUNTOF(ignore_ext)); - _tcscat_s(ignore_path, COUNTOF(ignore_path), ignore_dir); - _tcscat_s(ignore_name, COUNTOF(ignore_path), ignore_ext); + _tcscat(ignore_path, ignore_dir); + _tcscat(ignore_name, ignore_ext); dir.get_path(dir_path, COUNTOF(dir_path)); _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp --- trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -1285,7 +1285,7 @@ TCHAR buffer[8]; if (!GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, buffer, sizeof(buffer)/sizeof(TCHAR))) - _tcscpy_s(buffer, COUNTOF(buffer), TEXT("00:00")); + _tcscpy(buffer, TEXT("00:00")); DrawText(canvas, buffer, -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT); int clockwindowWidth = rect.right-rect.left + 4; @@ -1324,7 +1324,7 @@ GetLocalTime(&systime); if (GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &systime, NULL, buffer, 64)) - _tcscpy_s(pdi->szText, COUNTOF(pdi->szText), buffer); + _tcscpy(pdi->szText, buffer); else pdi->szText[0] = '\0'; } @@ -1344,7 +1344,7 @@ if (GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, buffer, sizeof(buffer)/sizeof(TCHAR))) if (_tcscmp(buffer, _time)) { - _tcscpy_s(_time, COUNTOF(_time), buffer); + _tcscpy(_time, buffer); return true; // The text to display has changed. } _____ Modified: trunk/reactos/subsys/system/explorer/utility/utility.cpp --- trunk/reactos/subsys/system/explorer/utility/utility.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/utility/utility.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -393,7 +393,7 @@ { TCHAR path[MAX_PATH], hole_path[MAX_PATH]; - _tcscpy_s(hole_path, COUNTOF(hole_path), path_in); + _tcscpy(hole_path, path_in); int drv_len = 0; LPCTSTR d; @@ -418,7 +418,7 @@ HANDLE hFind = FindFirstFile(hole_path, &w32fd); if (hFind == INVALID_HANDLE_VALUE) { - _tcsncpy_s(path, COUNTOF(path), hole_path, drv_len); + _tcsncpy(path, hole_path, drv_len); int i = drv_len; for(p=dir; *p=='/'||*p=='\\'; p++) @@ -521,7 +521,7 @@ TCHAR drv[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT]; _tsplitpath_s(path, drv, COUNTOF(drv), dir, COUNTOF(dir), fname, COUNTOF(fname), ext, COUNTOF(ext)); - _stprintf_s2(path, COUNTOF(path), TEXT("%s%s"), drv, dir); + _stprintf(path, TEXT("%s%s"), drv, dir); fname_out.printf(TEXT("%s%s"), fname, ext); } _____ Modified: trunk/reactos/subsys/system/explorer/utility/utility.h --- trunk/reactos/subsys/system/explorer/utility/utility.h 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/utility/utility.h 2005-12-01 22:24:00 UTC (rev 19814) @@ -69,7 +69,11 @@ #define for if (0) {} else for +#ifdef _countof +#define COUNTOF _countof +#else #define COUNTOF(x) (sizeof(x)/sizeof(x[0])) +#endif #define BUFFER_LEN 2048 @@ -169,12 +173,6 @@ // secure CRT functions #ifdef __STDC_WANT_SECURE_LIB__ // for VS 2005: _MSC_VER>=1400 -#undef _vsntprintf -#define _vsntprintf(b, s, f, l) _vsntprintf_s(b, s, s, f, l) - -#undef _sntprintf -#define _sntprintf(b, s, f, l) _sntprintf_s(b, s, s, f, l) - #define _stprintf_s1 _stprintf_s #define _stprintf_s2 _stprintf_s @@ -182,9 +180,7 @@ #define strcpy_s(d, l, s) strcpy(d, s) #define _tcscpy_s(d, l, s) _tcscpy(d, s) -#define _tcscat_s(d, l, s) _tcscat(d, s) #define wcsncpy_s(d, l, s, n) wcsncpy(d, s, n) -#define _tcsncpy_s(d, l, s, n) _tcsncpy(d, s, n) #define _stprintf_s1(b, l, f, p1) _stprintf(b, f, p1) #define _stprintf_s2(b, l, f, p1,p2) _stprintf(b, f, p1,p2) #define _tsplitpath_s(f, d,dl, p,pl, n,nl, e,el) _tsplitpath(f, d, p, n, e) _____ Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp --- trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp 2005-12-01 22:24:00 UTC (rev 19814) @@ -492,7 +492,7 @@ default: if ((unsigned)*p<20 && *p!='\t' && *p!='\r' && *p!='\n') { char b[16]; - sprintf_s1(b, COUNTOF(b), "&%d;", (unsigned)*p); + sprintf(b, "&%d;", (unsigned)*p); for(const char*q=b; *q; ) *o++ = *q++; } else _____ Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.h --- trunk/reactos/subsys/system/explorer/utility/xmlstorage.h 2005-12-01 22:15:57 UTC (rev 19813) +++ trunk/reactos/subsys/system/explorer/utility/xmlstorage.h 2005-12-01 22:24:00 UTC (rev 19814) @@ -71,14 +71,6 @@ namespace XMLStorage { - // secure CRT functions -#ifdef __STDC_WANT_SECURE_LIB__ // VS 2005 -#define sprintf_s1 sprintf_s -#else -#define sprintf_s1(b, l, f, p1) sprintf(b, f, p1) -#endif - - #ifndef XS_String #ifdef XS_STRING_UTF8 @@ -282,7 +274,7 @@ { FileHolder(LPCTSTR path, LPCTSTR mode) { -#ifdef __STDC_WANT_SECURE_LIB__ // VS2005 +#ifdef __STDC_WANT_SECURE_LIB__ // secure CRT functions using VS 2005 if (_tfopen_s(&_pfile, path, mode) != 0) _pfile = NULL; #else
19 years
1
0
0
0
[hpoussin] 19813: HMACHINE and DEVINST are not the same thing. Fix their usage
by hpoussin@svn.reactos.com
HMACHINE and DEVINST are not the same thing. Fix their usage Modified: trunk/reactos/lib/setupapi/devinst.c Modified: trunk/reactos/lib/setupapi/setupapi_private.h _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-12-01 22:08:48 UTC (rev 19812) +++ trunk/reactos/lib/setupapi/devinst.c 2005-12-01 22:15:57 UTC (rev 19813) @@ -621,6 +621,22 @@ return hDevInfo; } +static DWORD +GetErrorCodeFromCrCode(const IN CONFIGRET cr) +{ + switch (cr) + { + case CR_INVALID_MACHINENAME: return ERROR_INVALID_COMPUTERNAME; + case CR_OUT_OF_MEMORY: return ERROR_NOT_ENOUGH_MEMORY; + case CR_SUCCESS: return ERROR_SUCCESS; + default: + /* FIXME */ + return ERROR_GEN_FAILURE; + } + + /* Does not happen */ +} + /*********************************************************************** * SetupDiCreateDeviceInfoListExW (SETUPAPI.@) */ @@ -698,13 +714,7 @@ cr = CM_Connect_MachineW(UNCServerName, &list->hMachine); if (cr != CR_SUCCESS) { - switch (cr) - { - case CR_OUT_OF_MEMORY: rc = ERROR_NOT_ENOUGH_MEMORY; break; - case CR_INVALID_MACHINENAME: rc = ERROR_INVALID_COMPUTERNAME; break; - default: rc = ERROR_GEN_FAILURE; break; - } - SetLastError(rc); + SetLastError(GetErrorCodeFromCrCode(cr)); goto cleanup; } #endif @@ -758,7 +768,7 @@ memcpy(&DeviceInfoData->ClassGuid, &DevInfo->ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = (DWORD)list->hMachine; + DeviceInfoData->DevInst = DevInfo->dnDevInst; DeviceInfoData->Reserved = (ULONG_PTR)DevInfo; ret = TRUE; } @@ -1124,11 +1134,13 @@ static BOOL CreateDeviceInfoElement( + IN struct DeviceInfoSet *list, IN LPCWSTR InstancePath, IN LPCGUID pClassGuid, OUT struct DeviceInfoElement **pDeviceInfo) { DWORD size; + CONFIGRET cr; struct DeviceInfoElement *deviceInfo; *pDeviceInfo = NULL; @@ -1141,6 +1153,14 @@ return FALSE; } memset(deviceInfo, 0, size); + + cr = CM_Locate_DevNode_ExW(&deviceInfo->dnDevInst, (DEVINSTID_W)InstancePath, CM_LOCATE_DEVNODE_PHANTOM, list->hMachine); + if (cr != CR_SUCCESS) + { + SetLastError(GetErrorCodeFromCrCode(cr)); + return FALSE; + } + deviceInfo->InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W); wcscpy(deviceInfo->Data, InstancePath); deviceInfo->DeviceName = deviceInfo->Data; @@ -1281,7 +1301,7 @@ } /* Add the entry to the list */ - if (!CreateDeviceInfoElement(InstancePath, &KeyGuid, &deviceInfo)) + if (!CreateDeviceInfoElement(list, InstancePath, &KeyGuid, &deviceInfo)) { RegCloseKey(hDeviceIdKey); return GetLastError(); @@ -1440,7 +1460,7 @@ struct DeviceInterface *interfaceInfo; TRACE("Adding %s to list\n", debugstr_w(ptr)); /* Step 1. Create a device info element */ - if (!CreateDeviceInfoElement(ptr, &GUID_SERENUM_BUS_ENUMERATOR, &deviceInfo)) + if (!CreateDeviceInfoElement(list, ptr, &GUID_SERENUM_BUS_ENUMERATOR, &deviceInfo)) { if (devices != buf) HeapFree(GetProcessHeap(), 0, devices); @@ -1664,7 +1684,7 @@ /* We have found a device */ /* Step 1. Create a device info element */ - if (!CreateDeviceInfoElement(InstancePath, &ClassGuid, &deviceInfo)) + if (!CreateDeviceInfoElement(list, InstancePath, &ClassGuid, &deviceInfo)) { RegCloseKey(hReferenceKey); RegCloseKey(hDeviceInstanceKey); @@ -2061,7 +2081,6 @@ PDWORD RequiredSize, PSP_DEVINFO_DATA DeviceInfoData) { - struct DeviceInfoSet *list; BOOL ret = FALSE; TRACE("%p %p %p %lu %p %p\n", DeviceInfoSet, @@ -2072,7 +2091,7 @@ SetLastError(ERROR_INVALID_PARAMETER); else if (DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) SetLastError(ERROR_INVALID_HANDLE); - else if ((list = (struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC) + else if (((struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC) SetLastError(ERROR_INVALID_HANDLE); else if (DeviceInterfaceData->cbSize != sizeof(SP_DEVICE_INTERFACE_DATA)) SetLastError(ERROR_INVALID_USER_BUFFER); @@ -2106,7 +2125,7 @@ memcpy(&DeviceInfoData->ClassGuid, &deviceInterface->DeviceInfo->ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = (DWORD)list->hMachine; + DeviceInfoData->DevInst = deviceInterface->DeviceInfo->dnDevInst; DeviceInfoData->Reserved = (ULONG_PTR)deviceInterface->DeviceInfo; } ret = TRUE; @@ -4199,7 +4218,7 @@ { struct DeviceInfoElement *deviceInfo; - if (CreateDeviceInfoElement(DeviceName, ClassGuid, &deviceInfo)) + if (CreateDeviceInfoElement(list, DeviceName, ClassGuid, &deviceInfo)) { InsertTailList(&list->ListHead, &deviceInfo->ListEntry); @@ -4214,7 +4233,7 @@ else { memcpy(&DeviceInfoData->ClassGuid, ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = (DWORD)list->hMachine; + DeviceInfoData->DevInst = deviceInfo->dnDevInst; DeviceInfoData->Reserved = (ULONG_PTR)deviceInfo; ret = TRUE; } @@ -5121,7 +5140,7 @@ /* FIXME: try to get ClassGUID from registry, instead of * sending GUID_NULL to CreateDeviceInfoElement */ - if (!CreateDeviceInfoElement(DeviceInstanceId, &GUID_NULL, &deviceInfo)) + if (!CreateDeviceInfoElement(list, DeviceInstanceId, &GUID_NULL, &deviceInfo)) { RegCloseKey(hKey); return FALSE; @@ -5135,7 +5154,7 @@ if (ret && deviceInfo && DeviceInfoData) { memcpy(&DeviceInfoData->ClassGuid, &deviceInfo->ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = (DWORD)list->hMachine; + DeviceInfoData->DevInst = deviceInfo->dnDevInst; DeviceInfoData->Reserved = (ULONG_PTR)deviceInfo; } } _____ Modified: trunk/reactos/lib/setupapi/setupapi_private.h --- trunk/reactos/lib/setupapi/setupapi_private.h 2005-12-01 22:08:48 UTC (rev 19812) +++ trunk/reactos/lib/setupapi/setupapi_private.h 2005-12-01 22:15:57 UTC (rev 19813) @@ -85,6 +85,7 @@ struct DeviceInfoElement /* Element of DeviceInfoSet.ListHead */ { LIST_ENTRY ListEntry; + DEVINST dnDevInst; /* Used in CM_* functions */ /* Reserved Field points to a struct DriverInfoElement */ SP_DEVINSTALL_PARAMS_W InstallParams;
19 years
1
0
0
0
[weiden] 19812: fixed uninitialized variable warning
by weiden@svn.reactos.com
fixed uninitialized variable warning Modified: trunk/reactos/lib/syssetup/wizard.c _____ Modified: trunk/reactos/lib/syssetup/wizard.c --- trunk/reactos/lib/syssetup/wizard.c 2005-12-01 21:38:13 UTC (rev 19811) +++ trunk/reactos/lib/syssetup/wizard.c 2005-12-01 22:08:48 UTC (rev 19812) @@ -1415,7 +1415,7 @@ { PREGISTRATIONDATA RegistrationData; REGISTRATIONNOTIFY RegistrationNotify; - DWORD LastError; + DWORD LastError = NO_ERROR; WCHAR UnknownError[84]; RegistrationData = (PREGISTRATIONDATA) Parameter; @@ -1424,24 +1424,20 @@ _SEH_TRY { - if (SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg), - hSysSetupInf, - L"RegistrationPhase2", - SPINST_REGISTRY | - SPINST_REGISTERCALLBACKAWARE | - SPINST_REGSVR, - 0, - NULL, - 0, - RegistrationNotificationProc, - RegistrationData, - NULL, - NULL)) + if (!SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg), + hSysSetupInf, + L"RegistrationPhase2", + SPINST_REGISTRY | + SPINST_REGISTERCALLBACKAWARE | + SPINST_REGSVR, + 0, + NULL, + 0, + RegistrationNotificationProc, + RegistrationData, + NULL, + NULL)) { - LastError = NO_ERROR; - } - else - { LastError = GetLastError(); } }
19 years
1
0
0
0
[sedwards] 19810: stop the abuse of having the ddk directory in the path when including a ddk header
by sedwards@svn.reactos.com
stop the abuse of having the ddk directory in the path when including a ddk header Modified: trunk/reactos/apps/utils/nts2w32err/nts2w32err.c Modified: trunk/reactos/apps/utils/objdir/objdir.c Modified: trunk/reactos/apps/utils/partinfo/partinfo.c Modified: trunk/reactos/apps/utils/pice/loader/stdinc.h Modified: trunk/reactos/apps/utils/pice/module/patch.c Modified: trunk/reactos/apps/utils/pice/module/precomp.h Modified: trunk/reactos/apps/utils/pice/module/privateice.c Modified: trunk/reactos/apps/utils/pice/shared/shared.h Modified: trunk/reactos/apps/utils/pnpdump/pnpdump.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/portio.c Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h Modified: trunk/reactos/drivers/bus/acpi/include/platform/types.h Modified: trunk/reactos/drivers/bus/acpi/ospm/include/acpisys.h Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c Modified: trunk/reactos/drivers/bus/pci/pci.h Modified: trunk/reactos/drivers/dd/beep/beep.c Modified: trunk/reactos/drivers/dd/blue/blue.c Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c Modified: trunk/reactos/drivers/dd/debugout/debugout.c Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c Modified: trunk/reactos/drivers/dd/mpu401/portio.c Modified: trunk/reactos/drivers/dd/mpu401/settings.c Modified: trunk/reactos/drivers/dd/mpu401/test.c Modified: trunk/reactos/drivers/dd/parallel/parallel.c Modified: trunk/reactos/drivers/dd/sndblst/card.c Modified: trunk/reactos/drivers/dd/sndblst/dma.c Modified: trunk/reactos/drivers/dd/sndblst/irq.c Modified: trunk/reactos/drivers/dd/sndblst/portio.c Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c Modified: trunk/reactos/drivers/dd/sndblst/sndblst.h Modified: trunk/reactos/drivers/dd/sndblst/test/sb.c Modified: trunk/reactos/drivers/dd/sndblst/test.c Modified: trunk/reactos/drivers/dd/sound/sb16.c Modified: trunk/reactos/drivers/dd/sound/sound.c Modified: trunk/reactos/drivers/dd/sound/wave.c Modified: trunk/reactos/drivers/dd/test/test.c Modified: trunk/reactos/drivers/fs/cdfs/cdfs.h Modified: trunk/reactos/drivers/fs/ext2/attr.c Modified: trunk/reactos/drivers/fs/ext2/blockdev.c Modified: trunk/reactos/drivers/fs/ext2/dir.c Modified: trunk/reactos/drivers/fs/ext2/ext2fs.h Modified: trunk/reactos/drivers/fs/ext2/file.c Modified: trunk/reactos/drivers/fs/ext2/inode.c Modified: trunk/reactos/drivers/fs/ext2/quota.c Modified: trunk/reactos/drivers/fs/ext2/rw.c Modified: trunk/reactos/drivers/fs/ext2/security.c Modified: trunk/reactos/drivers/fs/ext2/super.c Modified: trunk/reactos/drivers/fs/minix/block.c Modified: trunk/reactos/drivers/fs/minix/blockdev.c Modified: trunk/reactos/drivers/fs/minix/cache.c Modified: trunk/reactos/drivers/fs/minix/dir.c Modified: trunk/reactos/drivers/fs/minix/inode.c Modified: trunk/reactos/drivers/fs/minix/minix.h Modified: trunk/reactos/drivers/fs/minix/mount.c Modified: trunk/reactos/drivers/fs/minix/rw.c Modified: trunk/reactos/drivers/fs/mup/mup.c Modified: trunk/reactos/drivers/fs/ntfs/ntfs.h Modified: trunk/reactos/drivers/fs/ntfs/rw.c Modified: trunk/reactos/drivers/fs/ntfs/volinfo.c Modified: trunk/reactos/drivers/fs/template/template.c Modified: trunk/reactos/drivers/lib/csq/csq.c Modified: trunk/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h Modified: trunk/reactos/drivers/lib/undis/include/ndissys.h Modified: trunk/reactos/drivers/multimedia/ks.h Modified: trunk/reactos/drivers/multimedia/portcls/portcls.h Modified: trunk/reactos/drivers/net/dd/ne2000/include/ne2000.h Modified: trunk/reactos/drivers/net/lan/include/precomp.h Modified: trunk/reactos/drivers/net/npf/dump.c Modified: trunk/reactos/drivers/net/npf/jitter.c Modified: trunk/reactos/drivers/net/npf/openclos.c Modified: trunk/reactos/drivers/net/npf/packet.c Modified: trunk/reactos/drivers/net/npf/read.c Modified: trunk/reactos/drivers/net/npf/write.c Modified: trunk/reactos/drivers/net/tcpip/include/linux.h Modified: trunk/reactos/drivers/net/tcpip/include/precomp.h Modified: trunk/reactos/drivers/net/tcpip/include/tcpip.h Modified: trunk/reactos/drivers/net/tcpip/recmutex/recmutex.c Modified: trunk/reactos/drivers/net/tdi/cte/string.c Modified: trunk/reactos/drivers/net/tdi/cte/stubs.c Modified: trunk/reactos/drivers/net/tdi/misc/main.c Modified: trunk/reactos/drivers/net/tdi/tdi/dereg.c Modified: trunk/reactos/drivers/net/tdi/tdi/handler.c Modified: trunk/reactos/drivers/net/tdi/tdi/obsolete.c Modified: trunk/reactos/drivers/net/tdi/tdi/stubs.c Modified: trunk/reactos/drivers/net/tditest/include/tditest.h Modified: trunk/reactos/drivers/storage/atapi/atapi.c Modified: trunk/reactos/drivers/storage/buslogic/BusLogic958.h Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c Modified: trunk/reactos/drivers/storage/class2/class2.c Modified: trunk/reactos/drivers/storage/disk/disk.c Modified: trunk/reactos/drivers/storage/diskdump/diskdump.c Modified: trunk/reactos/drivers/storage/floppy/csqrtns.h Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c Modified: trunk/reactos/drivers/test/csqtest/csqtest.c Modified: trunk/reactos/drivers/usb/miniport/usb_wrapper.h Modified: trunk/reactos/drivers/usb/usbd/test.c Modified: trunk/reactos/drivers/usb/usbd/usbd.c Modified: trunk/reactos/drivers/usb/usbhub/usbhub.h Modified: trunk/reactos/drivers/usb/usbport/usbcore.c Modified: trunk/reactos/drivers/usb/usbstor/usbstor.h [truncated at 100 lines; 52 more skipped] _____ Modified: trunk/reactos/apps/utils/nts2w32err/nts2w32err.c --- trunk/reactos/apps/utils/nts2w32err/nts2w32err.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/nts2w32err/nts2w32err.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -13,7 +13,7 @@ * */ #include <windows.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include <stdio.h> _____ Modified: trunk/reactos/apps/utils/objdir/objdir.c --- trunk/reactos/apps/utils/objdir/objdir.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/objdir/objdir.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -17,7 +17,7 @@ * Added -r option. */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <stdarg.h> #include <string.h> #include <stdio.h> _____ Modified: trunk/reactos/apps/utils/partinfo/partinfo.c --- trunk/reactos/apps/utils/partinfo/partinfo.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/partinfo/partinfo.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -8,7 +8,7 @@ #include <stdio.h> #include <stdlib.h> -#include <ddk/ntddk.h> +#include <ntddk.h> //#define DUMP_DATA #define DUMP_SIZE_INFO _____ Modified: trunk/reactos/apps/utils/pice/loader/stdinc.h --- trunk/reactos/apps/utils/pice/loader/stdinc.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pice/loader/stdinc.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -3,9 +3,9 @@ #include <malloc.h> #include <io.h> -//#include <ddk/winnt.h> +//#include <winnt.h> #include <windows.h> -#include <ddk/kefuncs.h> +#include <kefuncs.h> //#include <winnt.h> #include <sys/types.h> _____ Modified: trunk/reactos/apps/utils/pice/module/patch.c --- trunk/reactos/apps/utils/pice/module/patch.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pice/module/patch.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -39,8 +39,8 @@ //#include <asm/system.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> +#include <ntddkbd.h> +#include <ntdd8042.h> #include <rosrtl/string.h> //////////////////////////////////////////////////// _____ Modified: trunk/reactos/apps/utils/pice/module/precomp.h --- trunk/reactos/apps/utils/pice/module/precomp.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pice/module/precomp.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -31,10 +31,10 @@ #define FRAMEBUFFER_SIZE (0x8000) #define LINES_IN_BUFFER (2048) -#include <ddk/ntddk.h> +#include <ntddk.h> #include <ntos/types.h> -#include <ddk/types.h> -//#include <ddk/i386/tss.h> +#include <types.h> +//#include <i386/tss.h> #include <internal/ob.h> #include <internal/i386/segment.h> #include <defines.h> _____ Modified: trunk/reactos/apps/utils/pice/module/privateice.c --- trunk/reactos/apps/utils/pice/module/privateice.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pice/module/privateice.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -45,7 +45,7 @@ #include <linux/string.h> */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <debug.h> #include <rosrtl/string.h> _____ Modified: trunk/reactos/apps/utils/pice/shared/shared.h --- trunk/reactos/apps/utils/pice/shared/shared.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pice/shared/shared.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -35,7 +35,7 @@ --*/ -//#include <ddk/ntddk.h> +//#include <ntddk.h> //#include <winnt.h> //temporary _____ Modified: trunk/reactos/apps/utils/pnpdump/pnpdump.c --- trunk/reactos/apps/utils/pnpdump/pnpdump.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/apps/utils/pnpdump/pnpdump.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -8,7 +8,7 @@ #include <stdlib.h> #include <conio.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include <pshpack1.h> _____ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/portio.c --- trunk/reactos/boot/freeldr/freeldr/arch/i386/portio.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/portio.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ * Created 18/10/99 */ -//#include <ddk/ntddk.h> +//#include <ntddk.h> #include <freeldr.h> _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h --- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -24,7 +24,7 @@ #include <stdlib.h> #include <stdio.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include <ndk/ntndk.h> #include <arch.h> #include <rtl.h> _____ Modified: trunk/reactos/drivers/bus/acpi/include/platform/types.h --- trunk/reactos/drivers/bus/acpi/include/platform/types.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/bus/acpi/include/platform/types.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -13,7 +13,7 @@ #ifndef __INCLUDE_ACPI_TYPES_H #define __INCLUDE_ACPI_TYPES_H -#include <ddk/ntddk.h> +#include <ntddk.h> #include <stdio.h> typedef UCHAR UINT8; _____ Modified: trunk/reactos/drivers/bus/acpi/ospm/include/acpisys.h --- trunk/reactos/drivers/bus/acpi/ospm/include/acpisys.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/bus/acpi/ospm/include/acpisys.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -5,7 +5,7 @@ */ #define ACPI_DEBUG #include <acpi.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include <bm.h> typedef ACPI_STATUS (*ACPI_DRIVER_FUNCTION)(VOID); _____ Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c --- trunk/reactos/drivers/bus/isapnp/isapnp.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/bus/isapnp/isapnp.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -8,7 +8,7 @@ * UPDATE HISTORY: * 01-05-2001 CSH Created */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <isapnp.h> #define NDEBUG _____ Modified: trunk/reactos/drivers/bus/pci/pci.h --- trunk/reactos/drivers/bus/pci/pci.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/bus/pci/pci.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,8 +1,8 @@ #ifndef __PCI_H #define __PCI_H -#include <ddk/ntifs.h> -#include <ddk/wdmguid.h> +#include <ntifs.h> +#include <wdmguid.h> #include <stdio.h> typedef struct _PCI_DEVICE _____ Modified: trunk/reactos/drivers/dd/beep/beep.c --- trunk/reactos/drivers/dd/beep/beep.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/beep/beep.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,8 +12,8 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddbeep.h> +#include <ntddk.h> +#include <ntddbeep.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/dd/blue/blue.c --- trunk/reactos/drivers/dd/blue/blue.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/blue/blue.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -11,7 +11,7 @@ /* INCLUDES ******************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <wincon.h> #include <blue/ntddblue.h> #include <ndk/halfuncs.h> _____ Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c --- trunk/reactos/drivers/dd/bootvid/bootvid.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/bootvid/bootvid.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -23,7 +23,7 @@ /* INCLUDES ******************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <ndk/ldrfuncs.h> #include "bootvid.h" #include "ntbootvid.h" _____ Modified: trunk/reactos/drivers/dd/debugout/debugout.c --- trunk/reactos/drivers/dd/debugout/debugout.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/debugout/debugout.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -22,7 +22,7 @@ */ /* INCLUDES */ -#include <ddk/ntddk.h> +#include <ntddk.h> NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); _____ Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c --- trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,8 +12,8 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -//#include <ddk/ntddbeep.h> +#include <ntddk.h> +//#include <ntddbeep.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/dd/mpu401/portio.c --- trunk/reactos/drivers/dd/mpu401/portio.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/mpu401/portio.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ * Sept 26, 2003: Created */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "mpu401.h" _____ Modified: trunk/reactos/drivers/dd/mpu401/settings.c --- trunk/reactos/drivers/dd/mpu401/settings.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/mpu401/settings.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ * Sept 27, 2003: Created */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "mpu401.h" _____ Modified: trunk/reactos/drivers/dd/mpu401/test.c --- trunk/reactos/drivers/dd/mpu401/test.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/mpu401/test.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,6 +1,6 @@ #include <stdio.h> #include <windows.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include "mpu401.h" int main() _____ Modified: trunk/reactos/drivers/dd/parallel/parallel.c --- trunk/reactos/drivers/dd/parallel/parallel.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/parallel/parallel.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,7 +12,7 @@ /* FUNCTIONS **************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "parallel.h" _____ Modified: trunk/reactos/drivers/dd/sndblst/card.c --- trunk/reactos/drivers/dd/sndblst/card.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/card.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -4,7 +4,7 @@
http://www.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html
*/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "sndblst.h" VOID SetOutputSampleRate(UINT BasePort, UINT SampleRate) _____ Modified: trunk/reactos/drivers/dd/sndblst/dma.c --- trunk/reactos/drivers/dd/sndblst/dma.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/dma.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -2,7 +2,7 @@ Routines to simplify the use of DMA for Sound Blaster driver */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "sndblst.h" #if 0 _____ Modified: trunk/reactos/drivers/dd/sndblst/irq.c --- trunk/reactos/drivers/dd/sndblst/irq.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/irq.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,4 +1,4 @@ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "sndblst.h" #if 0 _____ Modified: trunk/reactos/drivers/dd/sndblst/portio.c --- trunk/reactos/drivers/dd/sndblst/portio.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/portio.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ * Sept 28, 2003: Created */ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "sndblst.h" BOOLEAN WaitToSend(UINT BasePort) _____ Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c --- trunk/reactos/drivers/dd/sndblst/sndblst.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/sndblst.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -11,7 +11,7 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include "sndblst.h" NTSTATUS STDCALL _____ Modified: trunk/reactos/drivers/dd/sndblst/sndblst.h --- trunk/reactos/drivers/dd/sndblst/sndblst.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/sndblst.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,7 +12,7 @@ #ifndef __INCLUDES_SNDBLST_H__ #define __INCLUDES_SNDBLST_H__ -#include <ddk/ntddk.h> +#include <ntddk.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/dd/sndblst/test/sb.c --- trunk/reactos/drivers/dd/sndblst/test/sb.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/test/sb.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,6 +1,6 @@ #include <stdio.h> #include <windows.h> -#include <ddk/ntddk.h> +#include <ntddk.h> int main() { _____ Modified: trunk/reactos/drivers/dd/sndblst/test.c --- trunk/reactos/drivers/dd/sndblst/test.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sndblst/test.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,6 +1,6 @@ #include <stdio.h> #include <windows.h> -#include <ddk/ntddk.h> +#include <ntddk.h> #include "mpu401.h" int main() _____ Modified: trunk/reactos/drivers/dd/sound/sb16.c --- trunk/reactos/drivers/dd/sound/sb16.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sound/sb16.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,7 +12,7 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, _____ Modified: trunk/reactos/drivers/dd/sound/sound.c --- trunk/reactos/drivers/dd/sound/sound.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sound/sound.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,7 +12,7 @@ /* FUNCTIONS **************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #include <devices.h> #include "sb16.h" _____ Modified: trunk/reactos/drivers/dd/sound/wave.c --- trunk/reactos/drivers/dd/sound/wave.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/sound/wave.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -12,7 +12,7 @@ /* FUNCTIONS **************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #include <devices.h> _____ Modified: trunk/reactos/drivers/dd/test/test.c --- trunk/reactos/drivers/dd/test/test.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/dd/test/test.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -11,7 +11,7 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> /* FUNCTIONS **************************************************************/ _____ Modified: trunk/reactos/drivers/fs/cdfs/cdfs.h --- trunk/reactos/drivers/fs/cdfs/cdfs.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/cdfs/cdfs.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,8 +1,8 @@ #ifndef CDFS_H #define CDFS_H -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> #include <ntddcdrm.h> #include <ccros.h> _____ Modified: trunk/reactos/drivers/fs/ext2/attr.c --- trunk/reactos/drivers/fs/ext2/attr.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/attr.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <wchar.h> #include <string.h> _____ Modified: trunk/reactos/drivers/fs/ext2/blockdev.c --- trunk/reactos/drivers/fs/ext2/blockdev.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/blockdev.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/ext2/dir.c --- trunk/reactos/drivers/fs/ext2/dir.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/dir.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <wchar.h> #include <string.h> _____ Modified: trunk/reactos/drivers/fs/ext2/ext2fs.h --- trunk/reactos/drivers/fs/ext2/ext2fs.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/ext2fs.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,5 +1,5 @@ -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> BOOLEAN Ext2ReadSectors(IN PDEVICE_OBJECT pDeviceObject, IN ULONG DiskSector, _____ Modified: trunk/reactos/drivers/fs/ext2/file.c --- trunk/reactos/drivers/fs/ext2/file.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/file.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/ext2/inode.c --- trunk/reactos/drivers/fs/ext2/inode.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/inode.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -10,7 +10,7 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/ext2/quota.c --- trunk/reactos/drivers/fs/ext2/quota.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/quota.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <wchar.h> #include <string.h> _____ Modified: trunk/reactos/drivers/fs/ext2/rw.c --- trunk/reactos/drivers/fs/ext2/rw.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/rw.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #define NDEBUG _____ Modified: trunk/reactos/drivers/fs/ext2/security.c --- trunk/reactos/drivers/fs/ext2/security.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/security.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <wchar.h> #include <string.h> _____ Modified: trunk/reactos/drivers/fs/ext2/super.c --- trunk/reactos/drivers/fs/ext2/super.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ext2/super.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/minix/block.c --- trunk/reactos/drivers/fs/minix/block.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/block.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/minix/blockdev.c --- trunk/reactos/drivers/fs/minix/blockdev.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/blockdev.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #define NDEBUG _____ Modified: trunk/reactos/drivers/fs/minix/cache.c --- trunk/reactos/drivers/fs/minix/cache.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/cache.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,8 +9,8 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/minix/dir.c --- trunk/reactos/drivers/fs/minix/dir.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/dir.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> //#define NDEBUG _____ Modified: trunk/reactos/drivers/fs/minix/inode.c --- trunk/reactos/drivers/fs/minix/inode.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/inode.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,10 +9,10 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #include "bitops.h" -#include <ddk/ntifs.h> +#include <ntifs.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/minix/minix.h --- trunk/reactos/drivers/fs/minix/minix.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/minix.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,5 +1,5 @@ -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> #define MINIX_ROOT_INO 1 _____ Modified: trunk/reactos/drivers/fs/minix/mount.c --- trunk/reactos/drivers/fs/minix/mount.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/mount.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -26,8 +26,8 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/minix/rw.c --- trunk/reactos/drivers/fs/minix/rw.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/minix/rw.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -9,7 +9,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #include <string.h> #include <ntos/minmax.h> _____ Modified: trunk/reactos/drivers/fs/mup/mup.c --- trunk/reactos/drivers/fs/mup/mup.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/mup/mup.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -27,7 +27,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> //#define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/ntfs/ntfs.h --- trunk/reactos/drivers/fs/ntfs/ntfs.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ntfs/ntfs.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,9 +1,9 @@ #ifndef NTFS_H #define NTFS_H -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> -#include <ddk/ntdddisk.h> +#include <ntddk.h> +#include <ntifs.h> +#include <ntdddisk.h> #include <ccros.h> #define USE_ROS_CC_AND_FS _____ Modified: trunk/reactos/drivers/fs/ntfs/rw.c --- trunk/reactos/drivers/fs/ntfs/rw.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ntfs/rw.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -28,7 +28,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/ntfs/volinfo.c --- trunk/reactos/drivers/fs/ntfs/volinfo.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/ntfs/volinfo.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -27,7 +27,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/fs/template/template.c --- trunk/reactos/drivers/fs/template/template.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/fs/template/template.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -28,7 +28,7 @@ /* INCLUDES *****************************************************************/ -#include <ddk/ntddk.h> +#include <ntddk.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/drivers/lib/csq/csq.c --- trunk/reactos/drivers/lib/csq/csq.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/lib/csq/csq.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -26,8 +26,8 @@ /* $Id$ */ #define __NTDRIVER__ -#include <ddk/ntddk.h> -#include <ddk/ntifs.h> +#include <ntddk.h> +#include <ntifs.h> static VOID NTAPI IopCsqCancelRoutine(PDEVICE_OBJECT DeviceObject, _____ Modified: trunk/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h --- trunk/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,7 +1,7 @@ #ifndef _OSKITFREEBSD_H #define _OSKITFREEBSD_H -#include <ddk/ntddk.h> +#include <ntddk.h> #ifdef linux #include <netinet/in.h> _____ Modified: trunk/reactos/drivers/lib/undis/include/ndissys.h --- trunk/reactos/drivers/lib/undis/include/ndissys.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/lib/undis/include/ndissys.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -13,7 +13,7 @@ #define NDIS50 1 /* Use NDIS 5.0 structures by default */ //#include <basetsd.h> -#include <ddk/ntddk.h> +#include <ntddk.h> //#include <windef.h> #include <ndisfake.h> _____ Modified: trunk/reactos/drivers/multimedia/ks.h --- trunk/reactos/drivers/multimedia/ks.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/multimedia/ks.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -16,7 +16,7 @@ #ifndef __INCLUDES_REACTOS_KS_H__ #define __INCLUDES_REACTOS_KS_H__ -#include <ddk/ntddk.h> +#include <ntddk.h> /* What's this meant to be?! */ #define KSDDKAPI _____ Modified: trunk/reactos/drivers/multimedia/portcls/portcls.h --- trunk/reactos/drivers/multimedia/portcls/portcls.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/multimedia/portcls/portcls.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -13,7 +13,7 @@ extern "C" { #endif -#include <ddk/ntddk.h> +#include <ntddk.h> #define PORTCLASSAPI extern _____ Modified: trunk/reactos/drivers/net/dd/ne2000/include/ne2000.h --- trunk/reactos/drivers/net/dd/ne2000/include/ne2000.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/dd/ne2000/include/ne2000.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -7,7 +7,7 @@ #ifndef __NE2000_H #define __NE2000_H -#include <ddk/ndis.h> +#include <ndis.h> #include <8390.h> #include <debug.h> _____ Modified: trunk/reactos/drivers/net/lan/include/precomp.h --- trunk/reactos/drivers/net/lan/include/precomp.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/lan/include/precomp.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -2,8 +2,8 @@ #define _LAN_PRECOMP_H #include <limits.h> -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #include <roscfg.h> #include <debug.h> #include <pseh.h> _____ Modified: trunk/reactos/drivers/net/npf/dump.c --- trunk/reactos/drivers/net/npf/dump.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/dump.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -25,8 +25,8 @@ #include "ntiologc.h" #include "ndis.h" #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> //#define PsGetCurrentProcess() IoGetCurrentProcess() #ifndef PsGetCurrentThread #define PsGetCurrentThread() ((PETHREAD) (KeGetCurrentThread())) _____ Modified: trunk/reactos/drivers/net/npf/jitter.c --- trunk/reactos/drivers/net/npf/jitter.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/jitter.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -25,8 +25,8 @@ #include "ntiologc.h" #include "ndis.h" #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #endif #include "packet.h" _____ Modified: trunk/reactos/drivers/net/npf/openclos.c --- trunk/reactos/drivers/net/npf/openclos.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/openclos.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -24,8 +24,8 @@ #include "ntiologc.h" #include "ndis.h" #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #endif #include "debug.h" #include "packet.h" _____ Modified: trunk/reactos/drivers/net/npf/packet.c --- trunk/reactos/drivers/net/npf/packet.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/packet.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -25,8 +25,8 @@ #include "ntiologc.h" #include "ndis.h" #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #endif #include "ntddpack.h" _____ Modified: trunk/reactos/drivers/net/npf/read.c --- trunk/reactos/drivers/net/npf/read.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/read.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -25,8 +25,8 @@ #include <ntiologc.h> #include <ndis.h> #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #define NdisReinitializePacket(Packet) \ { \ _____ Modified: trunk/reactos/drivers/net/npf/write.c --- trunk/reactos/drivers/net/npf/write.c 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/npf/write.c 2005-12-01 21:37:19 UTC (rev 19810) @@ -25,8 +25,8 @@ #include "ntiologc.h" #include "ndis.h" #else -#include <ddk/ntddk.h> -#include <ddk/ndis.h> +#include <ntddk.h> +#include <ndis.h> #define NdisReinitializePacket(Packet) \ { \ (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \ _____ Modified: trunk/reactos/drivers/net/tcpip/include/linux.h --- trunk/reactos/drivers/net/tcpip/include/linux.h 2005-12-01 21:35:44 UTC (rev 19809) +++ trunk/reactos/drivers/net/tcpip/include/linux.h 2005-12-01 21:37:19 UTC (rev 19810) @@ -1,7 +1,7 @@ #ifndef _LINUX_TYPES_H #define _LINUX_TYPES_H -#include <ddk/ntddk.h> +#include <ntddk.h> #ifndef NULL #define NULL (void*)0 [truncated at 1000 lines; 1151 more skipped]
19 years
1
0
0
0
[ion] 19811: - fix mp hal too
by ion@svn.reactos.com
- fix mp hal too Modified: trunk/reactos/hal/halx86/mp/processor_mp.c _____ Modified: trunk/reactos/hal/halx86/mp/processor_mp.c --- trunk/reactos/hal/halx86/mp/processor_mp.c 2005-12-01 21:37:19 UTC (rev 19810) +++ trunk/reactos/hal/halx86/mp/processor_mp.c 2005-12-01 21:38:13 UTC (rev 19811) @@ -22,7 +22,7 @@ VOID STDCALL HalInitializeProcessor(ULONG ProcessorNumber, - PVOID /*PLOADER_PARAMETER_BLOCK*/ LoaderBlock) + PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG CPU;
19 years
1
0
0
0
[ion] 19809: - Fix HAL build.
by ion@svn.reactos.com
- Fix HAL build. Modified: trunk/reactos/hal/hal/hal.c Modified: trunk/reactos/hal/halx86/generic/processor.c _____ Modified: trunk/reactos/hal/hal/hal.c --- trunk/reactos/hal/hal/hal.c 2005-12-01 21:23:06 UTC (rev 19808) +++ trunk/reactos/hal/hal/hal.c 2005-12-01 21:35:44 UTC (rev 19809) @@ -342,9 +342,8 @@ VOID NTAPI -HalInitializeProcessor( - ULONG ProcessorNumber, - PVOID ProcessorStack) +HalInitializeProcessor(ULONG ProcessorNumber, + PLOADER_PARAMETER_BLOCK LoaderBlock) { UNIMPLEMENTED; } _____ Modified: trunk/reactos/hal/halx86/generic/processor.c --- trunk/reactos/hal/halx86/generic/processor.c 2005-12-01 21:23:06 UTC (rev 19808) +++ trunk/reactos/hal/halx86/generic/processor.c 2005-12-01 21:35:44 UTC (rev 19809) @@ -22,7 +22,7 @@ VOID STDCALL HalInitializeProcessor(ULONG ProcessorNumber, - PVOID /*PLOADER_PARAMETER_BLOCK*/ LoaderBlock) + PLOADER_PARAMETER_BLOCK LoaderBlock) { DPRINT("HalInitializeProcessor(%x %x)\n", ProcessorNumber, LoaderBlock); }
19 years
1
0
0
0
[ion] 19808: - Add some more misc. public definitions and fix exfuncs.h so that it can be included independently (thanks to hpoussin for noticing the bug).
by ion@svn.reactos.com
- Add some more misc. public definitions and fix exfuncs.h so that it can be included independently (thanks to hpoussin for noticing the bug). Modified: trunk/reactos/include/ndk/asm.h Modified: trunk/reactos/include/ndk/exfuncs.h Modified: trunk/reactos/include/ndk/halfuncs.h Modified: trunk/reactos/include/ndk/i386/ketypes.h _____ Modified: trunk/reactos/include/ndk/asm.h --- trunk/reactos/include/ndk/asm.h 2005-12-01 21:17:25 UTC (rev 19807) +++ trunk/reactos/include/ndk/asm.h 2005-12-01 21:23:06 UTC (rev 19808) @@ -33,6 +33,7 @@ #define KGDT_R3_TEB (0x38) #define KGDT_LDT (0x48) #define KGDT_DF_TSS (0x50) +#define KGDT_NMI_TSS (0x58) // // KV86M_REGISTERS Offsets @@ -101,14 +102,31 @@ #define KPCR_EXCEPTION_LIST 0x0 #define KPCR_INITIAL_STACK 0x4 #define KPCR_STACK_LIMIT 0x8 +#define KPCR_SET_MEMBER_COPY 0x14 #define KPCR_TEB 0x18 #define KPCR_SELF 0x1C +#define KPCR_PRCB 0x20 +#define KPCR_KD_VERSION_BLOCK 0x34 #define KPCR_GDT 0x3C #define KPCR_TSS 0x40 +#define KPCR_SET_MEMBER 0x48 #define KPCR_CURRENT_THREAD 0x124 +#define KPCR_PROCESSOR_NUMBER 0x130 +#define KPCR_PRCB_SET_MEMBER 0x134 #define KPCR_NPX_THREAD 0x2F4 +#define KPCR_DR6 0x428 +#define KPCR_DR7 0x42C // +// KGDTENTRY Offsets +// +#define KGDT_BASE_LOW 0x2 +#define KGDT_BASE_MID 0x4 +#define KGDT_BASE_HI 0x7 +#define KGDT_LIMIT_HI 0x6 +#define KGDT_LIMIT_LOW 0x0 + +// // FPU Save Area Offsets // #define FN_CONTROL_WORD 0x0 @@ -117,6 +135,7 @@ #define FN_DATA_SELECTOR 0x18 #define FN_CR0_NPX_STATE 0x20C #define SIZEOF_FX_SAVE_AREA 528 +#define NPX_FRAME_LENGTH 0x210 // // Trap Frame Offsets @@ -166,6 +185,8 @@ #define KTRAP_FRAME_V86_GS 0x88 #define KTRAP_FRAME_RESERVED9 0x8A #define KTRAP_FRAME_SIZE 0x8C +#define KTRAP_FRAME_LENGTH 0x8C +#define KTRAP_FRAME_ALIGN 0x04 // // KUSER_SHARED_DATA Offsets @@ -257,5 +278,35 @@ #define FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_CONTROL_WORD #define FIBER_CONTEXT_FLOAT_SAVE_TAG_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_TAG_WORD +// +// EFLAGS +// +#define EFLAGS_TF 0x100 +#define EFLAGS_INTERRUPT_MASK 0x200 +#define EFLAGS_NESTED_TASK 0x4000 +#define EFLAGS_V86_MASK 0x20000 +#define EFLAGS_ALIGN_CHECK 0x40000 +#define EFLAGS_VIF 0x80000 +#define EFLAGS_VIP 0x100000 + +// +// CR0 +// +#define CR0_PE 0x1 +#define CR0_MP 0x2 +#define CR0_EM 0x4 +#define CR0_TS 0x8 +#define CR0_ET 0x10 +#define CR0_NE 0x20 +#define CR0_WP 0x10000 +#define CR0_AM 0x40000 +#define CR0_NW 0x20000000 +#define CR0_CD 0x40000000 +#define CR0_PG 0x80000000 + +// +// Generic Definitions +// +#define MAXIMUM_IDTVECTOR 0xFF #endif // !_ASM_H _____ Modified: trunk/reactos/include/ndk/exfuncs.h --- trunk/reactos/include/ndk/exfuncs.h 2005-12-01 21:17:25 UTC (rev 19807) +++ trunk/reactos/include/ndk/exfuncs.h 2005-12-01 21:23:06 UTC (rev 19808) @@ -23,6 +23,8 @@ // Dependencies // #include <umtypes.h> +#include <pstypes.h> +#include <extypes.h> // // Don't include WMI headers just for one define _____ Modified: trunk/reactos/include/ndk/halfuncs.h --- trunk/reactos/include/ndk/halfuncs.h 2005-12-01 21:17:25 UTC (rev 19807) +++ trunk/reactos/include/ndk/halfuncs.h 2005-12-01 21:23:06 UTC (rev 19808) @@ -73,7 +73,7 @@ NTAPI HalInitializeProcessor( ULONG ProcessorNumber, - PVOID ProcessorStack + PLOADER_PARAMETER_BLOCK LoaderBlock ); NTHALAPI @@ -166,6 +166,13 @@ ULONG Unknown ); +NTHALAPI +VOID +NTAPI +HalHandleNMI( + ULONG Unknown +); + // // I/O Functions // _____ Modified: trunk/reactos/include/ndk/i386/ketypes.h --- trunk/reactos/include/ndk/i386/ketypes.h 2005-12-01 21:17:25 UTC (rev 19807) +++ trunk/reactos/include/ndk/i386/ketypes.h 2005-12-01 21:23:06 UTC (rev 19808) @@ -26,6 +26,7 @@ // // X86 80386 Segment Types // +#define I386_TASK_GATE 0x5 #define I386_TSS 0x9 #define I386_ACTIVE_TSS 0xB #define I386_CALL_GATE 0xC @@ -439,8 +440,13 @@ ULONG IrrActive; /* 2C */ ULONG IDR; /* 30 */ PVOID KdVersionBlock; /* 34 */ +#ifdef _REACTOS_ PUSHORT IDT; /* 38 */ PUSHORT GDT; /* 3C */ +#else + PKIDTENTRY IDT; /* 38 */ + PKGDTENTRY GDT; /* 3C */ +#endif struct _KTSS *TSS; /* 40 */ USHORT MajorVersion; /* 44 */ USHORT MinorVersion; /* 46 */
19 years
1
0
0
0
[weiden] 19807: don't tell the user the device is working properly when the drivers aren't even installed
by weiden@svn.reactos.com
don't tell the user the device is working properly when the drivers aren't even installed Modified: trunk/reactos/lib/devmgr/En.rc Modified: trunk/reactos/lib/devmgr/advprop.c Modified: trunk/reactos/lib/devmgr/misc.c Modified: trunk/reactos/lib/devmgr/resource.h _____ Modified: trunk/reactos/lib/devmgr/En.rc --- trunk/reactos/lib/devmgr/En.rc 2005-12-01 21:17:13 UTC (rev 19806) +++ trunk/reactos/lib/devmgr/En.rc 2005-12-01 21:17:25 UTC (rev 19807) @@ -15,6 +15,7 @@ IDS_ENABLEDEVICE "Use this device (enable)" IDS_DISABLEDEVICE "Do not use this device (disable)" IDS_UNKNOWNDEVICE "Unknown device" + IDS_NODRIVERLOADED "No drivers are installed for this device." END STRINGTABLE _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-12-01 21:17:13 UTC (rev 19806) +++ trunk/reactos/lib/devmgr/advprop.c 2005-12-01 21:17:25 UTC (rev 19807) @@ -30,8 +30,6 @@ #define NDEBUG #include <debug.h> -#define DPN_DEVICEUPDATE (WM_USER + 0x1000) - typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW); typedef HPROPSHEETPAGE (WINAPI *PCREATEPROPERTYSHEETPAGEW)(LPCPROPSHEETPAGEW); typedef BOOL (WINAPI *PDESTROYPROPERTYSHEETPAGE)(HPROPSHEETPAGE); @@ -437,21 +435,18 @@ dap->CanDisable = FALSE; dap->DeviceEnabled = FALSE; - if (dap->DeviceInfoSet != INVALID_HANDLE_VALUE) + if (CanDisableDevice(dap->DeviceInfoData.DevInst, + dap->hMachine, + &bFlag)) { - if (CanDisableDevice(dap->DeviceInfoData.DevInst, - dap->hMachine, - &bFlag)) - { - dap->CanDisable = bFlag; - } + dap->CanDisable = bFlag; + } - if (IsDeviceEnabled(dap->DeviceInfoData.DevInst, - dap->hMachine, - &bFlag)) - { - dap->DeviceEnabled = bFlag; - } + if (IsDeviceEnabled(dap->DeviceInfoData.DevInst, + dap->hMachine, + &bFlag)) + { + dap->DeviceEnabled = bFlag; } /* enable/disable the device usage controls */ _____ Modified: trunk/reactos/lib/devmgr/misc.c --- trunk/reactos/lib/devmgr/misc.c 2005-12-01 21:17:13 UTC (rev 19806) +++ trunk/reactos/lib/devmgr/misc.c 2005-12-01 21:17:25 UTC (rev 19807) @@ -452,6 +452,11 @@ szBuffer[0] = L'\0'; if (ProblemNumber == 0) { + if (!(Status & DN_DRIVER_LOADED)) + { + MessageId = IDS_NODRIVERLOADED; + } + goto UnknownProblem; } else _____ Modified: trunk/reactos/lib/devmgr/resource.h --- trunk/reactos/lib/devmgr/resource.h 2005-12-01 21:17:13 UTC (rev 19806) +++ trunk/reactos/lib/devmgr/resource.h 2005-12-01 21:17:25 UTC (rev 19807) @@ -36,6 +36,7 @@ #define IDS_ENABLEDEVICE 0x108 #define IDS_DISABLEDEVICE 0x109 #define IDS_UNKNOWNDEVICE 0x10A +#define IDS_NODRIVERLOADED 0x10B #define IDS_DEV_NO_PROBLEM 0x200 #define IDS_DEV_NOT_CONFIGURED 0x201
19 years
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
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
Results per page:
10
25
50
100
200