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
[chorns] 20236: Remove winmm from api status
by chorns@svn.reactos.com
Remove winmm from api status Modified: trunk/reactos/apistatus.lst _____ Modified: trunk/reactos/apistatus.lst --- trunk/reactos/apistatus.lst 2005-12-17 23:13:00 UTC (rev 20235) +++ trunk/reactos/apistatus.lst 2005-12-18 00:00:18 UTC (rev 20236) @@ -18,7 +18,6 @@ snmpapi.dll reactos/lib/snmpapi user32.dll reactos/lib/user32 version.dll reactos/lib/version -winmm.dll reactos/lib/winmm winspool.dll reactos/lib/winspool ws2_32.dll reactos/lib/ws2_32 wsock32.dll reactos/lib/wsock32
19 years
1
0
0
0
[chorns] 20235: Remove shell32 from api status
by chorns@svn.reactos.com
Remove shell32 from api status Modified: trunk/reactos/apistatus.lst _____ Modified: trunk/reactos/apistatus.lst --- trunk/reactos/apistatus.lst 2005-12-17 21:51:36 UTC (rev 20234) +++ trunk/reactos/apistatus.lst 2005-12-17 23:13:00 UTC (rev 20235) @@ -15,7 +15,6 @@ oleaut32.dll reactos/lib/oleaut32 rpcrt4.dll reactos/lib/rpcrt4 secur32.dll reactos/lib/secur32 -shell32.dll reactos/lib/shell32 snmpapi.dll reactos/lib/snmpapi user32.dll reactos/lib/user32 version.dll reactos/lib/version
19 years
1
0
0
0
[greatlrd] 20234: Alexander Wurzinger(Lohnegrim)' E-Mail 'Lohnegrim@gmx.net' fix follow bugs Commend "'type/p', 'dir/p', 'dir/s', 'dir/p/s' did not work with CTRL+C"\n"'pause' does not continie ones you Press Ctrl/Shift/Alt"
by greatlrd@svn.reactos.com
Alexander Wurzinger(Lohnegrim)' E-Mail 'Lohnegrim(a)gmx.net' fix follow bugs Commend "'type/p','dir/p','dir/s','dir/p/s' did not work with CTRL+C"\n"'pause' does not continie ones you Press Ctrl/Shift/Alt" Modified: trunk/reactos/subsys/system/cmd/cmd.h Modified: trunk/reactos/subsys/system/cmd/console.c Modified: trunk/reactos/subsys/system/cmd/dir.c Modified: trunk/reactos/subsys/system/cmd/misc.c Modified: trunk/reactos/subsys/system/cmd/type.c _____ Modified: trunk/reactos/subsys/system/cmd/cmd.h --- trunk/reactos/subsys/system/cmd/cmd.h 2005-12-17 21:41:15 UTC (rev 20233) +++ trunk/reactos/subsys/system/cmd/cmd.h 2005-12-17 21:51:36 UTC (rev 20234) @@ -144,7 +144,7 @@ VOID ConOutChar (TCHAR); VOID ConOutPuts (LPTSTR); VOID ConOutPrintf (LPTSTR, ...); -VOID ConOutPrintfPaging (BOOL NewPage, LPTSTR, ...); +INT ConOutPrintfPaging (BOOL NewPage, LPTSTR, ...); VOID ConErrChar (TCHAR); VOID ConErrPuts (LPTSTR); VOID ConErrPrintf (LPTSTR, ...); _____ Modified: trunk/reactos/subsys/system/cmd/console.c --- trunk/reactos/subsys/system/cmd/console.c 2005-12-17 21:41:15 UTC (rev 20233) +++ trunk/reactos/subsys/system/cmd/console.c 2005-12-17 21:51:36 UTC (rev 20234) @@ -13,71 +13,71 @@ * 01-Jul-2005 (Brandon Turner) <turnerb7(a)msu.edu>) * Added ConPrintfPaging and ConOutPrintfPaging */ - - - + + + #include <precomp.h> #include "resource.h" - - + + #define OUTPUT_BUFFER_SIZE 4096 - - + + UINT InputCodePage; UINT OutputCodePage; - - + + VOID ConInDisable (VOID) { HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); DWORD dwMode; - + GetConsoleMode (hInput, &dwMode); dwMode &= ~ENABLE_PROCESSED_INPUT; SetConsoleMode (hInput, dwMode); } - - + + VOID ConInEnable (VOID) { HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); DWORD dwMode; - + GetConsoleMode (hInput, &dwMode); dwMode |= ENABLE_PROCESSED_INPUT; SetConsoleMode (hInput, dwMode); } - - + + VOID ConInDummy (VOID) { HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); INPUT_RECORD dummy; DWORD dwRead; - + #ifdef _DEBUG if (hInput == INVALID_HANDLE_VALUE) DebugPrintf (_T("Invalid input handle!!!\n")); #endif /* _DEBUG */ ReadConsoleInput (hInput, &dummy, 1, &dwRead); } - + VOID ConInFlush (VOID) { FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); } - - + + VOID ConInKey (PINPUT_RECORD lpBuffer) { HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); DWORD dwRead; - + #ifdef _DEBUG if (hInput == INVALID_HANDLE_VALUE) DebugPrintf (_T("Invalid input handle!!!\n")); #endif /* _DEBUG */ - + do { ReadConsoleInput (hInput, lpBuffer, 1, &dwRead); @@ -87,19 +87,19 @@ } while (TRUE); } - - - + + + VOID ConInString (LPTSTR lpInput, DWORD dwLength) { DWORD dwOldMode; DWORD dwRead; HANDLE hFile; - + LPTSTR p; DWORD i; PCHAR pBuf; - + #ifdef _UNICODE pBuf = (PCHAR)malloc(dwLength); #else @@ -108,11 +108,11 @@ ZeroMemory (lpInput, dwLength * sizeof(TCHAR)); hFile = GetStdHandle (STD_INPUT_HANDLE); GetConsoleMode (hFile, &dwOldMode); - + SetConsoleMode (hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT); - + ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL); - + #ifdef _UNICODE MultiByteToWideChar( InputCodePage, 0, pBuf, dwLength + 1, lpInput, dwLength + 1); #endif @@ -125,14 +125,14 @@ break; } } - + #ifdef _UNICODE free(pBuf); #endif - + SetConsoleMode (hFile, dwOldMode); } - + static VOID ConChar(TCHAR c, DWORD nStdHandle) { DWORD dwWritten; @@ -153,18 +153,18 @@ &dwWritten, NULL); } - + VOID ConOutChar (TCHAR c) { ConChar(c, STD_OUTPUT_HANDLE); } - + VOID ConPuts(LPTSTR szText, DWORD nStdHandle) { DWORD dwWritten; PCHAR pBuf; INT len; - + len = _tcslen(szText); #ifdef _UNICODE pBuf = malloc(len + 1); @@ -186,35 +186,35 @@ free(pBuf); #endif } - + VOID ConOutResPaging(BOOL NewPage, UINT resID) { TCHAR szMsg[RC_STRING_MAX_SIZE]; LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE); ConOutPrintfPaging(NewPage, szMsg); } - + VOID ConOutResPuts (UINT resID) { TCHAR szMsg[RC_STRING_MAX_SIZE]; LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE); - + ConPuts(szMsg, STD_OUTPUT_HANDLE); } - + VOID ConOutPuts (LPTSTR szText) { ConPuts(szText, STD_OUTPUT_HANDLE); } - - + + VOID ConPrintf(LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle) { INT len; PCHAR pBuf; TCHAR szOut[OUTPUT_BUFFER_SIZE]; DWORD dwWritten; - + len = _vstprintf (szOut, szFormat, arg_ptr); #ifdef _UNICODE pBuf = malloc(len + 1); @@ -222,67 +222,67 @@ #else pBuf = szOut; #endif - + WriteFile (GetStdHandle (nStdHandle), pBuf, len, &dwWritten, NULL); - - + + #ifdef UNICODE free(pBuf); #endif } - -VOID ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle) + +INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle) { INT len; PCHAR pBuf; CONSOLE_SCREEN_BUFFER_INFO csbi; TCHAR szOut[OUTPUT_BUFFER_SIZE]; DWORD dwWritten; - + /* used to count number of lines since last pause */ static int LineCount = 0; - + /* used to see how big the screen is */ int ScreenLines = 0; - + /* the number of chars in a roow */ int ScreenCol = 0; - + /* chars since end of line */ int CharEL = 0; - + int i = 0; - + if(NewPage == TRUE) LineCount = 0; - + /* rest LineCount and return if no string have been given */ if (szFormat == NULL) - return; - - + return 0; + + //get the size of the visual screen that can be printed too if (!GetConsoleScreenBufferInfo(hConsole, &csbi)) { // we assuming its a file handle ConPrintf(szFormat, arg_ptr, nStdHandle); - return; + return 0; } //subtract 2 to account for "press any key..." and for the blank line at the end of PagePrompt() ScreenLines = (csbi.srWindow.Bottom - csbi.srWindow.Top) - 4; ScreenCol = (csbi.srWindow.Right - csbi.srWindow.Left) + 1; - + //make sure they didnt make the screen to small if(ScreenLines<4) { ConPrintf(szFormat, arg_ptr, nStdHandle); - return ; + return 0; } - + len = _vstprintf (szOut, szFormat, arg_ptr); #ifdef _UNICODE pBuf = malloc(len + 1); @@ -290,10 +290,10 @@ #else pBuf = szOut; #endif - + for(i = 0; i < len; i++) { - + if(pBuf[i] == _T('\n')) { LineCount++; @@ -311,37 +311,38 @@ CharEL=0; } } - + /* FIXME : write more that one char at time */ WriteFile (GetStdHandle (nStdHandle),&pBuf[i],sizeof(CHAR),&dwWritten,NULL); if(LineCount >= ScreenLines) { if(_tcsnicmp(&pBuf[i], _T("\n"), 2)!=0) WriteFile (GetStdHandle (nStdHandle),_T("\n"),sizeof(CHAR),&dwWritten,NULL); - + if(PagePrompt() != PROMPT_YES) { - return; + return 1; } //reset the number of lines being printed LineCount = 0; CharEL=0; } - + } - + #ifdef UNICODE free(pBuf); #endif + return 0; } - + VOID ConErrFormatMessage (DWORD MessageId, ...) { TCHAR szMsg[RC_STRING_MAX_SIZE]; DWORD ret; LPTSTR text; va_list arg_ptr; - + va_start (arg_ptr, MessageId); ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, @@ -350,7 +351,7 @@ (LPTSTR) &text, 0, &arg_ptr); - + va_end (arg_ptr); if(ret > 0) { @@ -363,14 +364,14 @@ ConErrPrintf(szMsg); } } - + VOID ConOutFormatMessage (DWORD MessageId, ...) { TCHAR szMsg[RC_STRING_MAX_SIZE]; DWORD ret; LPTSTR text; va_list arg_ptr; - + va_start (arg_ptr, MessageId); ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, @@ -379,7 +380,7 @@ (LPTSTR) &text, 0, &arg_ptr); - + va_end (arg_ptr); if(ret > 0) { @@ -392,58 +393,60 @@ ConErrPrintf(szMsg); } } - + VOID ConOutPrintf (LPTSTR szFormat, ...) { va_list arg_ptr; - + va_start (arg_ptr, szFormat); ConPrintf(szFormat, arg_ptr, STD_OUTPUT_HANDLE); va_end (arg_ptr); } - -VOID ConOutPrintfPaging (BOOL NewPage, LPTSTR szFormat, ...) + +INT ConOutPrintfPaging (BOOL NewPage, LPTSTR szFormat, ...) { + INT iReturn; va_list arg_ptr; - + va_start (arg_ptr, szFormat); - ConPrintfPaging(NewPage, szFormat, arg_ptr, STD_OUTPUT_HANDLE); + iReturn = ConPrintfPaging(NewPage, szFormat, arg_ptr, STD_OUTPUT_HANDLE); va_end (arg_ptr); + return iReturn; } - + VOID ConErrChar (TCHAR c) { ConChar(c, STD_ERROR_HANDLE); } - - + + VOID ConErrResPuts (UINT resID) { TCHAR szMsg[RC_STRING_MAX_SIZE]; LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE); ConPuts(szMsg, STD_ERROR_HANDLE); } - + VOID ConErrPuts (LPTSTR szText) { ConPuts(szText, STD_ERROR_HANDLE); } - - + + VOID ConErrPrintf (LPTSTR szFormat, ...) { va_list arg_ptr; - + va_start (arg_ptr, szFormat); ConPrintf(szFormat, arg_ptr, STD_ERROR_HANDLE); va_end (arg_ptr); } - + #ifdef _DEBUG VOID DebugPrintf (LPTSTR szFormat, ...) { va_list arg_ptr; - + va_start (arg_ptr, szFormat); ConPrintf(szFormat, arg_ptr, STD_ERROR_HANDLE); va_end (arg_ptr); @@ -456,69 +459,69 @@ #endif } #endif /* _DEBUG */ - + VOID SetCursorXY (SHORT x, SHORT y) { COORD coPos; - + coPos.X = x; coPos.Y = y; SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), coPos); } - - + + VOID GetCursorXY (PSHORT x, PSHORT y) { CONSOLE_SCREEN_BUFFER_INFO csbi; - + GetConsoleScreenBufferInfo (hConsole, &csbi); - + *x = csbi.dwCursorPosition.X; *y = csbi.dwCursorPosition.Y; } - - + + SHORT GetCursorX (VOID) { CONSOLE_SCREEN_BUFFER_INFO csbi; - + GetConsoleScreenBufferInfo (hConsole, &csbi); - + return csbi.dwCursorPosition.X; } - - + + SHORT GetCursorY (VOID) { CONSOLE_SCREEN_BUFFER_INFO csbi; - + GetConsoleScreenBufferInfo (hConsole, &csbi); - + return csbi.dwCursorPosition.Y; } - - + + VOID GetScreenSize (PSHORT maxx, PSHORT maxy) { CONSOLE_SCREEN_BUFFER_INFO csbi; - + GetConsoleScreenBufferInfo (hConsole, &csbi); - + if (maxx) *maxx = csbi.dwSize.X; if (maxy) *maxy = csbi.dwSize.Y; } - - + + VOID SetCursorType (BOOL bInsert, BOOL bVisible) { CONSOLE_CURSOR_INFO cci; - + cci.dwSize = bInsert ? 10 : 99; cci.bVisible = bVisible; - + SetConsoleCursorInfo (GetStdHandle (STD_OUTPUT_HANDLE), &cci); } - + /* EOF */ _____ Modified: trunk/reactos/subsys/system/cmd/dir.c --- trunk/reactos/subsys/system/cmd/dir.c 2005-12-17 21:41:15 UTC (rev 20233) +++ trunk/reactos/subsys/system/cmd/dir.c 2005-12-17 21:51:36 UTC (rev 20234) @@ -1270,13 +1270,16 @@ /* Print the line */ if(lpFlags->bPause) - ConOutPrintfPaging(FALSE,_T("%10s %-8s %*s%s %s\n"), + { + if (ConOutPrintfPaging(FALSE,_T("%10s %-8s %*s%s %s\n"), szDate, szTime, iSizeFormat, szSize, szShortName, - ptrFiles[i]->cFileName); + ptrFiles[i]->cFileName) == 1) + return ; + } else ConOutPrintf(_T("%10s %-8s %*s%s %s\n"), szDate, @@ -1463,13 +1466,18 @@ /* Print the line */ if(lpFlags->bPause) - ConOutPrintfPaging(FALSE,_T("%-8s %-3s %*s %s %s\n"), + { + if (ConOutPrintfPaging(FALSE,_T("%-8s %-3s %*s %s %s\n"), szName, /* The file's 8.3 name */ szExt, /* The file's 8.3 extension */ iSizeFormat, /* print format for size column */ szSize, /* The size of file or "<DIR>" for dirs */ szDate, /* The date of file/dir */ - szTime); /* The time of file/dir */ + szTime) == 1) /* The time of file/dir */ + { + return ; + } + } else ConOutPrintf(_T("%-8s %-3s %*s %s %s\n"), szName, /* The file's 8.3 name */ @@ -1509,7 +1517,12 @@ _tcscpy(szFullName, lpCurPath); _tcscat(szFullName, ptrFiles[i]->cFileName); if(lpFlags->bPause) - ConOutPrintfPaging(FALSE,_T("%s\n"), szFullName); + { + if (ConOutPrintfPaging(FALSE,_T("%s\n"), szFullName) == 1) + { + return ; + } + } else ConOutPrintf(_T("%s\n"), szFullName); } @@ -1517,7 +1530,12 @@ { /* if we are not in recursive mode we print the file names */ if(lpFlags->bPause) - ConOutPrintfPaging(FALSE,_T("%s\n"),ptrFiles[i]->cFileName); + { + if (ConOutPrintfPaging(FALSE,_T("%s\n"),ptrFiles[i]->cFileName) == 1) + { + return ; + } + } else ConOutPrintf(_T("%s\n"),ptrFiles[i]->cFileName); } @@ -1552,7 +1570,12 @@ { LoadString(CMD_ModuleHandle, STRING_DIR_HELP7, szMsg, RC_STRING_MAX_SIZE); if(lpFlags->bPause) - ConOutPrintfPaging(FALSE,szMsg, szTemp); + { + if (ConOutPrintfPaging(FALSE,szMsg, szTemp) == 1) + { + return ; + } + } else ConOutPrintf(szMsg, szTemp); } @@ -1896,7 +1919,10 @@ /* Free array */ free(ptrFileArray); + if (CheckCtrlBreak(BREAK_INPUT)) + return 1; + /* Add statistics to recursive statistics*/ recurse_dir_cnt += dwCountDirs; recurse_file_cnt += dwCountFiles; @@ -1924,7 +1950,10 @@ _tcscpy(szFullFileSpec, szFullPath); _tcscat(szFullFileSpec, wfdFileInfo.cFileName); /* We do the same for tha folder */ - DirList(szFullFileSpec, szFilespec, pLine,lpFlags); + if (DirList(szFullFileSpec, szFilespec, pLine,lpFlags) != 0) + { + return 1; + } } } }while(FindNextFile(hRecSearch,&wfdFileInfo)); _____ Modified: trunk/reactos/subsys/system/cmd/misc.c --- trunk/reactos/subsys/system/cmd/misc.c 2005-12-17 21:41:15 UTC (rev 20233) +++ trunk/reactos/subsys/system/cmd/misc.c 2005-12-17 21:51:36 UTC (rev 20234) @@ -44,7 +44,7 @@ HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE); INPUT_RECORD irBuffer; DWORD dwRead; - +/* do { ReadConsoleInput (hInput, &irBuffer, 1, &dwRead); @@ -60,6 +60,39 @@ } } while (TRUE); +*/ + do + { + ReadConsoleInput (hInput, &irBuffer, 1, &dwRead); + + if (irBuffer.EventType == KEY_EVENT) + { + if (irBuffer.Event.KeyEvent.dwControlKeyState & + (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + { + if (irBuffer.Event.KeyEvent.wVirtualKeyCode == 'C') + { +// if (irBuffer.Event.KeyEvent.bKeyDown == TRUE) +// { + bCtrlBreak = TRUE; + break; +// } + } + } + else if ((irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT) || + (irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_MENU) || + (irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL)) + { + ; + } + + else + { + break; + } + } + } + while (TRUE); #ifndef _UNICODE return irBuffer.Event.KeyEvent.uChar.AsciiChar; @@ -468,7 +501,10 @@ if ((ir.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) || ((ir.Event.KeyEvent.wVirtualKeyCode == _T('C')) && (ir.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)))) + { + bCtrlBreak = TRUE; return PROMPT_BREAK; + } return PROMPT_YES; } _____ Modified: trunk/reactos/subsys/system/cmd/type.c --- trunk/reactos/subsys/system/cmd/type.c 2005-12-17 21:41:15 UTC (rev 20233) +++ trunk/reactos/subsys/system/cmd/type.c 2005-12-17 21:51:36 UTC (rev 20234) @@ -108,7 +108,13 @@ if(bPaging) { if(bRet) - ConOutPrintfPaging(bFirstTime, buff); + { + if (ConOutPrintfPaging(bFirstTime, buff) == 1) + { + bCtrlBreak = FALSE; + return 0; + } + } } else {
19 years
1
0
0
0
[weiden] 20233: rename IsDeviceEnabled to IsDeviceStarted
by weiden@svn.reactos.com
rename IsDeviceEnabled to IsDeviceStarted Modified: trunk/reactos/lib/devmgr/advprop.c Modified: trunk/reactos/lib/devmgr/misc.c Modified: trunk/reactos/lib/devmgr/precomp.h _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-12-17 21:13:36 UTC (rev 20232) +++ trunk/reactos/lib/devmgr/advprop.c 2005-12-17 21:41:15 UTC (rev 20233) @@ -56,7 +56,7 @@ BOOL FreeDevPropSheets : 1; BOOL CanDisable : 1; - BOOL DeviceEnabled : 1; + BOOL DeviceStarted : 1; BOOL DeviceUsageChanged : 1; BOOL CloseDevInst : 1; BOOL IsAdmin : 1; @@ -106,7 +106,7 @@ switch (Actions[i]) { case IDS_ENABLEDEVICE: - if (dap->DeviceEnabled) + if (dap->DeviceStarted) { SendMessage(hComboBox, CB_SETCURSEL, @@ -116,7 +116,7 @@ break; case IDS_DISABLEDEVICE: - if (!dap->DeviceEnabled) + if (!dap->DeviceStarted) { SendMessage(hComboBox, CB_SETCURSEL, @@ -176,7 +176,7 @@ switch (SelectedUsageAction) { case IDS_ENABLEDEVICE: - if (!dap->DeviceEnabled) + if (!dap->DeviceStarted) { Ret = EnableDevice(dap->DeviceInfoSet, &dap->DeviceInfoData, @@ -187,7 +187,7 @@ break; case IDS_DISABLEDEVICE: - if (dap->DeviceEnabled) + if (dap->DeviceStarted) { Ret = EnableDevice(dap->DeviceInfoSet, &dap->DeviceInfoData, @@ -606,7 +606,7 @@ IDC_DEVUSAGE); dap->CanDisable = FALSE; - dap->DeviceEnabled = FALSE; + dap->DeviceStarted = FALSE; if (CanDisableDevice(DeviceInfoData->DevInst, dap->hMachine, @@ -615,11 +615,11 @@ dap->CanDisable = bFlag; } - if (IsDeviceEnabled(DeviceInfoData->DevInst, + if (IsDeviceStarted(DeviceInfoData->DevInst, dap->hMachine, &bFlag)) { - dap->DeviceEnabled = bFlag; + dap->DeviceStarted = bFlag; } /* enable/disable the device usage controls */ _____ Modified: trunk/reactos/lib/devmgr/misc.c --- trunk/reactos/lib/devmgr/misc.c 2005-12-17 21:13:36 UTC (rev 20232) +++ trunk/reactos/lib/devmgr/misc.c 2005-12-17 21:41:15 UTC (rev 20233) @@ -508,9 +508,9 @@ BOOL -IsDeviceEnabled(IN DEVINST DevInst, +IsDeviceStarted(IN DEVINST DevInst, IN HMACHINE hMachine, - OUT BOOL *IsEnabled) + OUT BOOL *IsStarted) { CONFIGRET cr; ULONG Status, ProblemNumber; @@ -523,7 +523,7 @@ hMachine); if (cr == CR_SUCCESS) { - *IsEnabled = ((Status & DN_STARTED) != 0); + *IsStarted = ((Status & DN_STARTED) != 0); Ret = TRUE; } _____ Modified: trunk/reactos/lib/devmgr/precomp.h --- trunk/reactos/lib/devmgr/precomp.h 2005-12-17 21:13:36 UTC (rev 20232) +++ trunk/reactos/lib/devmgr/precomp.h 2005-12-17 21:41:15 UTC (rev 20233) @@ -267,9 +267,9 @@ OUT BOOL *CanDisable); BOOL -IsDeviceEnabled(IN DEVINST DevInst, +IsDeviceStarted(IN DEVINST DevInst, IN HMACHINE hMachine, - OUT BOOL *IsEnabled); + OUT BOOL *IsStarted); BOOL EnableDevice(IN HDEVINFO DeviceInfoSet,
19 years
1
0
0
0
[weiden] 20232: fixed IsUserAdmin and enable the calls to it
by weiden@svn.reactos.com
fixed IsUserAdmin and enable the calls to it Modified: trunk/reactos/lib/newdev/newdev.c Modified: trunk/reactos/lib/setupapi/cfgmgr.c Modified: trunk/reactos/lib/setupapi/misc.c _____ Modified: trunk/reactos/lib/newdev/newdev.c --- trunk/reactos/lib/newdev/newdev.c 2005-12-17 20:59:51 UTC (rev 20231) +++ trunk/reactos/lib/newdev/newdev.c 2005-12-17 21:13:36 UTC (rev 20232) @@ -1018,16 +1018,12 @@ PROPSHEETPAGE psp; BOOL ret; DWORD config_flags; - /*TCHAR buf[128];*/ - /* FIXME: Nov 2005. umpnpmgr.exe is directly calling DevInstallW in - * SYSTEM context, which is not member of the Administrators group. - * So, just ignore the test at the moment... */ - //if (!IsUserAdmin()) - //{ - // /* XP kills the process... */ - // ExitProcess(ERROR_ACCESS_DENIED); - //} + if (!IsUserAdmin()) + { + /* XP kills the process... */ + ExitProcess(ERROR_ACCESS_DENIED); + } /* Clear devinst data */ ZeroMemory(&DevInstData, sizeof(DEVINSTDATA)); _____ Modified: trunk/reactos/lib/setupapi/cfgmgr.c --- trunk/reactos/lib/setupapi/cfgmgr.c 2005-12-17 20:59:51 UTC (rev 20231) +++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-12-17 21:13:36 UTC (rev 20232) @@ -104,7 +104,7 @@ if (!PnpGetLocalHandles(&BindingHandle, NULL)) return CR_FAILURE; - bAdmin = TRUE; //IsUserAdmin(); + bAdmin = IsUserAdmin(); for (i = 0; i < 30; i++) { @@ -256,8 +256,8 @@ FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine); -// if (!IsUserAdmin()) -// return CR_ACCESS_DENIED; + if (!IsUserAdmin()) + return CR_ACCESS_DENIED; if (dnDevInst == 0) return CR_INVALID_DEVINST; @@ -341,8 +341,8 @@ FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine); -// if (!IsUserAdmin()) -// return CR_ACCESS_DENIED; + if (!IsUserAdmin()) + return CR_ACCESS_DENIED; if (dnDevInst == 0) return CR_INVALID_DEVINST; @@ -1921,8 +1921,8 @@ FIXME("%lx %lx %lx %lx\n", dnFromDevInst, dnToDevInst, ulFlags, hMachine); -// if (!IsUserAdmin()) -// return CR_ACCESS_DENIED; + if (!IsUserAdmin()) + return CR_ACCESS_DENIED; if (dnFromDevInst == 0 || dnToDevInst == 0) return CR_INVALID_DEVNODE; @@ -2236,8 +2236,8 @@ TRACE("%lx %lx\n", ulFlags, hMachine); -// if (!IsUserAdmin()) -// return CR_ACCESS_DENIED; + if (!IsUserAdmin()) + return CR_ACCESS_DENIED; if (ulFlags & ~CM_DETECT_BITS) return CR_INVALID_FLAG; @@ -2616,8 +2616,8 @@ FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); -// if (!IsUserAdmin()) -// return CR_ACCESS_DENIED; + if (!IsUserAdmin()) + return CR_ACCESS_DENIED; if (dnDevInst == 0) return CR_INVALID_DEVNODE; _____ Modified: trunk/reactos/lib/setupapi/misc.c --- trunk/reactos/lib/setupapi/misc.c 2005-12-17 20:59:51 UTC (rev 20231) +++ trunk/reactos/lib/setupapi/misc.c 2005-12-17 21:13:36 UTC (rev 20232) @@ -234,7 +234,7 @@ for (i = 0; i < lpGroups->GroupCount; i++) { - if (EqualSid(lpSid, &lpGroups->Groups[i].Sid)) + if (EqualSid(lpSid, lpGroups->Groups[i].Sid)) { bResult = TRUE; break;
19 years
1
0
0
0
[weiden] 20231: use the captured link target string length in NtCreateSymbolicLinkObject. Spotted by zebasoftis.
by weiden@svn.reactos.com
use the captured link target string length in NtCreateSymbolicLinkObject. Spotted by zebasoftis. Modified: trunk/reactos/ntoskrnl/ob/symlink.c _____ Modified: trunk/reactos/ntoskrnl/ob/symlink.c --- trunk/reactos/ntoskrnl/ob/symlink.c 2005-12-17 20:59:44 UTC (rev 20230) +++ trunk/reactos/ntoskrnl/ob/symlink.c 2005-12-17 20:59:51 UTC (rev 20231) @@ -233,7 +233,7 @@ { SymbolicLink->TargetName.Length = 0; SymbolicLink->TargetName.MaximumLength = - ((wcslen(LinkTarget->Buffer) + 1) * sizeof(WCHAR)); + CapturedLinkTarget.Length + sizeof(WCHAR); SymbolicLink->TargetName.Buffer = ExAllocatePoolWithTag(NonPagedPool, SymbolicLink->TargetName.MaximumLength,
19 years
1
0
0
0
[greatlrd] 20230: add allowwarnings ="true" so ibrowser can be build with dgb=0 with gcc 3.4.4
by greatlrd@svn.reactos.com
add allowwarnings ="true" so ibrowser can be build with dgb=0 with gcc 3.4.4 Modified: trunk/reactos/subsys/system/ibrowser/ibrowser.xml _____ Modified: trunk/reactos/subsys/system/ibrowser/ibrowser.xml --- trunk/reactos/subsys/system/ibrowser/ibrowser.xml 2005-12-17 20:57:52 UTC (rev 20229) +++ trunk/reactos/subsys/system/ibrowser/ibrowser.xml 2005-12-17 20:59:44 UTC (rev 20230) @@ -1,4 +1,4 @@ -<module name="ibrowser" type="win32gui" installbase="system32" installname="ibrowser.exe"> +<module name="ibrowser" type="win32gui" installbase="system32" installname="ibrowser.exe" allowwarnings ="true"> <linkerflag>-fexceptions</linkerflag> <include base="ibrowser">.</include> <include base="ReactOS">include/expat</include>
19 years
1
0
0
0
[greatlrd] 20229: add allowwarnings ="true" so explore can be build with dgb=0 with gcc 3.4.4
by greatlrd@svn.reactos.com
add allowwarnings ="true" so explore can be build with dgb=0 with gcc 3.4.4 Modified: trunk/reactos/subsys/system/explorer/explorer.xml _____ Modified: trunk/reactos/subsys/system/explorer/explorer.xml --- trunk/reactos/subsys/system/explorer/explorer.xml 2005-12-17 19:58:23 UTC (rev 20228) +++ trunk/reactos/subsys/system/explorer/explorer.xml 2005-12-17 20:57:52 UTC (rev 20229) @@ -1,4 +1,5 @@ -<module name="explorer" type="win32gui" installname="explorer.exe"> +<module name="explorer" type="win32gui" installname="explorer.exe" allowwarnings ="true"> + <linkerflag>-luuid</linkerflag> <linkerflag>-lstdc++</linkerflag> <linkerflag>-fexceptions</linkerflag>
19 years
1
0
0
0
[ekohl] 20228: Implement CMP_Init_Detection, CMP_Report_LogOn, CM_Setup_DevNode[_Ex] and CM_Uninstall_DevNode[_Ex].
by ekohl@svn.reactos.com
Implement CMP_Init_Detection, CMP_Report_LogOn, CM_Setup_DevNode[_Ex] and CM_Uninstall_DevNode[_Ex]. Modified: trunk/reactos/include/idl/pnp.idl Modified: trunk/reactos/include/wine/cfgmgr32.h Modified: trunk/reactos/lib/setupapi/cfgmgr.c Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c _____ Modified: trunk/reactos/include/idl/pnp.idl --- trunk/reactos/include/idl/pnp.idl 2005-12-17 17:31:32 UTC (rev 20227) +++ trunk/reactos/include/idl/pnp.idl 2005-12-17 19:58:23 UTC (rev 20228) @@ -5,6 +5,7 @@ #define WORD unsigned short #define DWORD unsigned long #define CONFIGRET unsigned long +#define BOOL unsigned long #define PBOOL unsigned long * [ @@ -33,6 +34,11 @@ /* Function 4 */ CONFIGRET PNP_InitDetection(handle_t BindingHandle); + /* Function 5 */ + CONFIGRET PNP_ReportLogOn(handle_t BindingHandle, + [in] BOOL Admin, + [in] DWORD ProcessId); + /* Function 6 */ CONFIGRET PNP_ValidateDeviceInstance(handle_t BindingHandle, [in, string] wchar_t *DeviceInstance, @@ -103,6 +109,12 @@ [in] unsigned long Length, [in] unsigned long Flags); + /* Function 15 */ + CONFIGRET PNP_GetClassInstance(handle_t BindingHandle, + [in, string] wchar_t *DeviceId, + [out, string, size_is(Length)] wchar_t *Buffer, + [in] unsigned long Length); + /* Function 16 */ CONFIGRET PNP_CreateKey(handle_t BindingHandle, [in, string] wchar_t *SubKey, @@ -148,6 +160,11 @@ [in] unsigned long Problem, [in] DWORD Flags); + /* Function 33 */ + CONFIGRET PNP_UninstallDevInst(handle_t BindingHandle, + [in, string] wchar_t *DeviceInstance, + [in] DWORD Flags); + /* Function 38 */ CONFIGRET PNP_IsDockStationPresent(handle_t BindingHandle, [out]PBOOL Present); _____ Modified: trunk/reactos/include/wine/cfgmgr32.h --- trunk/reactos/include/wine/cfgmgr32.h 2005-12-17 17:31:32 UTC (rev 20227) +++ trunk/reactos/include/wine/cfgmgr32.h 2005-12-17 19:58:23 UTC (rev 20228) @@ -153,7 +153,22 @@ #define CM_DETECT_RUN 0x80000000 #define CM_DETECT_BITS 0x80000007 +/* ulFlags for CM_Setup_DevInst[_Ex] */ +#define CM_SETUP_DEVNODE_READY 0x00000000 +#define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY +#define CM_SETUP_DOWNLOAD 0x00000001 +#define CM_SETUP_WRITE_LOG_CONFS 0x00000002 +#define CM_SETUP_PROP_CHANGE 0x00000003 +#define CM_SETUP_DEVNODE_RESET 0x00000004 +#define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET +#define CM_SETUP_BITS 0x00000007 +#define CMP_MAGIC 0x01234567 + + +CONFIGRET WINAPI CMP_Init_Detection( DWORD ); +CONFIGRET WINAPI CMP_Report_LogOn( DWORD, DWORD ); + CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE ); CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE ); #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine) @@ -227,18 +242,21 @@ CONFIGRET WINAPI CM_Is_Dock_Station_Present( PBOOL ); CONFIGRET WINAPI CM_Is_Dock_Station_Present_Ex( PBOOL, HMACHINE ); -CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST, DEVINSTID_A, ULONG); -CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST, DEVINSTID_W, ULONG); +CONFIGRET WINAPI CM_Locate_DevNodeA( PDEVINST, DEVINSTID_A, ULONG ); +CONFIGRET WINAPI CM_Locate_DevNodeW( PDEVINST, DEVINSTID_W, ULONG ); #define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode) -CONFIGRET WINAPI CM_Locate_DevNode_ExA(PDEVINST, DEVINSTID_A, ULONG, HMACHINE); -CONFIGRET WINAPI CM_Locate_DevNode_ExW(PDEVINST, DEVINSTID_W, ULONG, HMACHINE); +CONFIGRET WINAPI CM_Locate_DevNode_ExA( PDEVINST, DEVINSTID_A, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Locate_DevNode_ExW( PDEVINST, DEVINSTID_W, ULONG, HMACHINE ); #define CM_Locate_DevNode_Ex WINELIB_NAME_AW(CM_Locate_DevNode_Ex) -CONFIGRET WINAPI CM_Open_Class_KeyA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG); -CONFIGRET WINAPI CM_Open_Class_KeyW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG); +CONFIGRET WINAPI CM_Move_DevNode( DEVINST, DEVINST, ULONG ); +CONFIGRET WINAPI CM_Move_DevNode_Ex( DEVINST, DEVINST, ULONG, HMACHINE ); + +CONFIGRET WINAPI CM_Open_Class_KeyA( LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG ); +CONFIGRET WINAPI CM_Open_Class_KeyW( LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG ); #define CM_Open_Class_Key WINELIB_NAME_AW(CM_Open_Class_Key) -CONFIGRET WINAPI CM_Open_Class_Key_ExA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE); -CONFIGRET WINAPI CM_Open_Class_Key_ExW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE); +CONFIGRET WINAPI CM_Open_Class_Key_ExA( LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Open_Class_Key_ExW( LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE ); #define CM_Open_Class_Key_Ex WINELIB_NAME_AW(CM_Open_Class_Key_Ex) CONFIGRET WINAPI CM_Reenumerate_DevNode( DEVINST, ULONG ); @@ -258,4 +276,10 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( DEVINST, ULONG, PCVOID, ULONG, ULONG, HMACHINE ); #define CM_Set_DevNode_Registry_Property_Ex WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property_Ex) +CONFIGRET WINAPI CM_Setup_DevNode( DEVINST, ULONG ); +CONFIGRET WINAPI CM_Setup_DevNode_Ex( DEVINST, ULONG, HMACHINE ); + +CONFIGRET WINAPI CM_Uninstall_DevNode( DEVINST, ULONG ); +CONFIGRET WINAPI CM_Uninstall_DevNode_Ex( DEVINST, ULONG, HMACHINE ); + #endif /* _CFGMGR32_H_ */ _____ Modified: trunk/reactos/lib/setupapi/cfgmgr.c --- trunk/reactos/lib/setupapi/cfgmgr.c 2005-12-17 17:31:32 UTC (rev 20227) +++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-12-17 19:58:23 UTC (rev 20228) @@ -65,9 +65,67 @@ /*********************************************************************** + * CMP_Init_Detection [SETUPAPI.@] + */ +CONFIGRET WINAPI CMP_Init_Detection( + DWORD dwMagic) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + + TRACE("%lu\n", dwMagic); + + if (dwMagic != CMP_MAGIC) + return CR_INVALID_DATA; + + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + + return PNP_InitDetection(BindingHandle); +} + + +/********************************************************************** * + * CMP_Report_LogOn [SETUPAPI.@] + */ +CONFIGRET WINAPI CMP_Report_LogOn( + DWORD dwMagic, + DWORD dwProcessId) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + CONFIGRET ret = CR_SUCCESS; + BOOL bAdmin; + DWORD i; + + TRACE("%lu\n", dwMagic); + + if (dwMagic != CMP_MAGIC) + return CR_INVALID_DATA; + + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + + bAdmin = TRUE; //IsUserAdmin(); + + for (i = 0; i < 30; i++) + { + ret = PNP_ReportLogOn(BindingHandle, + bAdmin, + dwProcessId); + if (ret == CR_SUCCESS) + break; + + Sleep(5000); + } + + return ret; +} + + +/********************************************************************** * * CM_Connect_MachineA [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Connect_MachineA(PCSTR UNCServerName, PHMACHINE phMachine) +CONFIGRET WINAPI CM_Connect_MachineA( + PCSTR UNCServerName, PHMACHINE phMachine) { PWSTR pServerNameW; CONFIGRET ret; @@ -91,7 +149,8 @@ /*********************************************************************** * CM_Connect_MachineW [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR UNCServerName, PHMACHINE phMachine) +CONFIGRET WINAPI CM_Connect_MachineW( + PCWSTR UNCServerName, PHMACHINE phMachine) { PMACHINE_INFO pMachine; @@ -128,7 +187,8 @@ /*********************************************************************** * CM_Delete_Class_Key [SETUPAPI.@] */ -CONFIGRET WINAPI CM_Delete_Class_Key(LPGUID ClassGuid, ULONG ulFlags) +CONFIGRET WINAPI CM_Delete_Class_Key( + LPGUID ClassGuid, ULONG ulFlags) { TRACE("%p %lx\n", ClassGuid, ulFlags); return CM_Delete_Class_Key_Ex(ClassGuid, ulFlags, NULL); @@ -1836,6 +1896,73 @@ /*********************************************************************** + * CM_Move_DevNode [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Move_DevNode( + DEVINST dnFromDevInst, DEVINST dnToDevInst, ULONG ulFlags) +{ + TRACE("%lx %lx %lx\n", dnFromDevInst, dnToDevInst, ulFlags); + return CM_Move_DevNode_Ex(dnFromDevInst, dnToDevInst, ulFlags, NULL); +} + + +/********************************************************************** * + * CM_Move_DevNode_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Move_DevNode_Ex( + DEVINST dnFromDevInst, DEVINST dnToDevInst, ULONG ulFlags, + HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + LPWSTR lpFromDevInst; + LPWSTR lpToDevInst; + + FIXME("%lx %lx %lx %lx\n", + dnFromDevInst, dnToDevInst, ulFlags, hMachine); + +// if (!IsUserAdmin()) +// return CR_ACCESS_DENIED; + + if (dnFromDevInst == 0 || dnToDevInst == 0) + return CR_INVALID_DEVNODE; + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + + StringTable = ((PMACHINE_INFO)hMachine)->StringTable; + if (StringTable == 0) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) + return CR_FAILURE; + } + + lpFromDevInst = StringTableStringFromId(StringTable, dnFromDevInst); + if (lpFromDevInst == NULL) + return CR_INVALID_DEVNODE; + + lpToDevInst = StringTableStringFromId(StringTable, dnToDevInst); + if (lpToDevInst == NULL) + return CR_INVALID_DEVNODE; + + return PNP_DeviceInstanceAction(BindingHandle, + 2, + ulFlags, + lpFromDevInst, + lpToDevInst); +} + + +/********************************************************************** * * CM_Open_Class_KeyA [SETUPAPI.@] */ CONFIGRET WINAPI CM_Open_Class_KeyA( @@ -2464,3 +2591,118 @@ ulLength, ulFlags); } + + +/********************************************************************** * + * CM_Setup_DevNode [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Setup_DevNode( + DEVINST dnDevInst, ULONG ulFlags) +{ + TRACE("%lx %lx\n", dnDevInst, ulFlags); + return CM_Setup_DevNode_Ex(dnDevInst, ulFlags, NULL); +} + + +/********************************************************************** * + * CM_Setup_DevNode_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Setup_DevNode_Ex( + DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + LPWSTR lpDevInst; + + FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); + +// if (!IsUserAdmin()) +// return CR_ACCESS_DENIED; + + if (dnDevInst == 0) + return CR_INVALID_DEVNODE; + + if (ulFlags & ~CM_SETUP_BITS) + return CR_INVALID_FLAG; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + + StringTable = ((PMACHINE_INFO)hMachine)->StringTable; + if (StringTable == 0) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) + return CR_FAILURE; + } + + lpDevInst = StringTableStringFromId(StringTable, dnDevInst); + if (lpDevInst == NULL) + return CR_INVALID_DEVNODE; + + return PNP_DeviceInstanceAction(BindingHandle, + 3, + ulFlags, + lpDevInst, + NULL); +} + + +/********************************************************************** * + * CM_Uninstall_DevNode [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Uninstall_DevNode( + DEVINST dnPhantom, ULONG ulFlags) +{ + TRACE("%lx %lx\n", dnPhantom, ulFlags); + return CM_Uninstall_DevNode_Ex(dnPhantom, ulFlags, NULL); +} + + +/********************************************************************** * + * CM_Uninstall_DevNode_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Uninstall_DevNode_Ex( + DEVINST dnPhantom, ULONG ulFlags, HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + LPWSTR lpDevInst; + + TRACE("%lx %lx %lx\n", dnPhantom, ulFlags, hMachine); + + if (dnPhantom == 0) + return CR_INVALID_DEVNODE; + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + + StringTable = ((PMACHINE_INFO)hMachine)->StringTable; + if (StringTable == 0) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) + return CR_FAILURE; + } + + lpDevInst = StringTableStringFromId(StringTable, dnPhantom); + if (lpDevInst == NULL) + return CR_INVALID_DEVNODE; + + return PNP_UninstallDevInst(BindingHandle, + lpDevInst, + ulFlags); +} _____ Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c --- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-12-17 17:31:32 UTC (rev 20227) +++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-12-17 19:58:23 UTC (rev 20228) @@ -58,6 +58,10 @@ static HKEY hEnumKey = NULL; static HKEY hClassKey = NULL; +static HANDLE hUserToken = NULL; +static HANDLE hInstallEvent = NULL; + + /* FUNCTIONS *****************************************************************/ static DWORD WINAPI @@ -159,6 +163,42 @@ } +/* Function 5 */ +CONFIGRET +PNP_ReportLogOn(handle_t BindingHandle, + unsigned long Admin, + unsigned long ProcessId) +{ + HANDLE hProcess; + + DPRINT1("PNP_ReportLogOn(%lu, %lu) called\n", Admin, ProcessId); + + /* Get the users token */ + hProcess = OpenProcess(PROCESS_ALL_ACCESS, + TRUE, + ProcessId); + if (hProcess != NULL) + { + if (hUserToken != NULL) + { + CloseHandle(hUserToken); + hUserToken = NULL; + } + + OpenProcessToken(hProcess, + TOKEN_ALL_ACCESS, + &hUserToken); + CloseHandle(hProcess); + } + + /* Trigger the installer thread */ + if (hInstallEvent != NULL) + SetEvent(hInstallEvent); + + return CR_SUCCESS; +} + + /* Function 6 */ CONFIGRET PNP_ValidateDeviceInstance(handle_t BindingHandle, @@ -684,6 +724,23 @@ } +/* Function 15 */ +CONFIGRET +PNP_GetClassInstance(handle_t BindingHandle, + wchar_t *DeviceId, /* in */ + wchar_t *Buffer, /* out */ + unsigned long Length) +{ + CONFIGRET ret = CR_SUCCESS; + + DPRINT("PNP_Get_Class_Instance() called\n"); + + DPRINT("PNP_Get_Class_Instance() done (returns %lx)\n", ret); + + return ret; +} + + /* Function 16 */ CONFIGRET PNP_CreateKey(handle_t BindingHandle, @@ -849,16 +906,34 @@ switch (MajorAction) { + case 2: + DPRINT("Move device instance\n"); + /* FIXME */ + ret = CR_CALL_NOT_IMPLEMENTED; + break; + + case 3: + DPRINT("Setup device instance\n"); + /* FIXME */ + ret = CR_CALL_NOT_IMPLEMENTED; + break; + case 4: DPRINT("Enable device instance\n"); + /* FIXME */ + ret = CR_CALL_NOT_IMPLEMENTED; break; case 5: DPRINT("Disable device instance\n"); + /* FIXME */ + ret = CR_CALL_NOT_IMPLEMENTED; break; case 7: DPRINT("Reenumerate device instance\n"); + /* FIXME */ + ret = CR_CALL_NOT_IMPLEMENTED; break; default: @@ -909,6 +984,7 @@ } +/* Function 31 */ CONFIGRET PNP_SetDeviceProblem(handle_t BindingHandle, wchar_t *DeviceInstance, @@ -927,6 +1003,24 @@ } +/* Function 33 */ +CONFIGRET +PNP_UninstallDevInst(handle_t BindingHandle, + wchar_t *DeviceInstance, + DWORD Flags) +{ + CONFIGRET ret = CR_SUCCESS; + + DPRINT1("PNP_UninstallDevInst() called\n"); + + /* FIXME */ + + DPRINT1("PNP_UninstallDevInst() done (returns %lx)\n", ret); + + return ret; +} + + /* Function 38 */ CONFIGRET PNP_IsDockStationPresent(handle_t BindingHandle, @@ -1184,6 +1278,14 @@ DPRINT("Umpnpmgr: main() started\n"); + hInstallEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + if (hInstallEvent == NULL) + { + dwError = GetLastError(); + DPRINT1("Could not create the Install Event! (Error %lu)\n", dwError); + return dwError; + } + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Enum", 0,
19 years
1
0
0
0
[mf] 20227: fix bug 1139: disable printer submenu folder in "settings" start menu
by mf@svn.reactos.com
fix bug 1139: disable printer submenu folder in "settings" start menu Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp --- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-12-17 17:14:50 UTC (rev 20226) +++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp 2005-12-17 17:31:32 UTC (rev 20227) @@ -1987,6 +1987,7 @@ #endif break;} +#if 0 ///@todo use printer start menu folder per default and allow opening "printers" cabinet window using the context menu case IDC_PRINTERS_MENU: CreateSubmenu(id, CSIDL_PRINTERS, CSIDL_PRINTHOOD, ResString(IDS_PRINTERS)); /* StartMenuFolders new_folders; @@ -1998,6 +1999,7 @@ CreateSubmenu(id, new_folders, ResString(IDS_PRINTERS));*/ break; +#endif case IDC_ADMIN: #ifndef ROSSHELL @@ -2146,10 +2148,10 @@ super::AddEntries(); #if defined(ROSSHELL) || defined(_ROS_) // _ROS_ to be removed when printer/network will be implemented - AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, false, IDC_PRINTERS_MENU); +//TODO AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, false, IDC_PRINTERS_MENU); AddButton(ResString(IDS_CONNECTIONS), ICID_NETWORK, false, IDC_CONNECTIONS); #else - AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, true, IDC_PRINTERS_MENU); +//TODO AddButton(ResString(IDS_PRINTERS), ICID_PRINTER, true, IDC_PRINTERS_MENU); AddButton(ResString(IDS_CONNECTIONS), ICID_NETWORK, true, IDC_CONNECTIONS); #endif AddButton(ResString(IDS_ADMIN), ICID_CONFIG, true, IDC_ADMIN);
19 years
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
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