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
September 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
22 participants
582 discussions
Start a n
N
ew thread
[turner] 17611: Fixed a bug that crashed cmd when "cd /D" but no path. Bug reported by Harteex.
by turner@svn.reactos.com
Fixed a bug that crashed cmd when "cd /D" but no path. Bug reported by Harteex. Modified: trunk/reactos/subsys/system/cmd/internal.c _____ Modified: trunk/reactos/subsys/system/cmd/internal.c --- trunk/reactos/subsys/system/cmd/internal.c 2005-09-02 21:26:51 UTC (rev 17610) +++ trunk/reactos/subsys/system/cmd/internal.c 2005-09-02 22:41:40 UTC (rev 17611) @@ -296,9 +296,16 @@ { bChangeDrive = TRUE; tmpPath = _tcsstr(param,_T(" ")); + if(!tmpPath) + { + /* Didnt find an directories */ + LoadString(CMD_ModuleHandle, STRING_ERROR_PATH_NOT_FOUND, szMsg, RC_STRING_MAX_SIZE); + ConErrPrintf(szMsg); + nErrorLevel = 1; + return 1; + } tmpPath++; _tcscpy(szPath,tmpPath); - } else {
19 years, 3 months
1
0
0
0
[hpoussin] 17610: Remove warnings
by hpoussin@svn.reactos.com
Remove warnings Modified: trunk/rosapps/net/netreg/netreg.cpp Modified: trunk/rosapps/net/netreg/netreg.xml _____ Modified: trunk/rosapps/net/netreg/netreg.cpp --- trunk/rosapps/net/netreg/netreg.cpp 2005-09-02 21:13:10 UTC (rev 17609) +++ trunk/rosapps/net/netreg/netreg.cpp 2005-09-02 21:26:51 UTC (rev 17610) @@ -403,8 +403,8 @@ string full_input; string remaining_output; - RHState state; SOCKET socket; + RHState state; }; SOCKET make_listening_socket( int port ) { @@ -440,7 +440,7 @@ SOCKET listen_socket; int i; int port_to_listen = 80; - int active_fds = 0; + unsigned int active_fds = 0; for( i = 1; i < argc; i++ ) { if( string( "-p" ) == argv[i] ) { @@ -480,8 +480,6 @@ FD_SET(listen_socket,&pollin); - struct timeval tv; - active_fds = select( active_fds, &pollin, &pollout, &pollerr, NULL ); if( active_fds > 0 ) { _____ Modified: trunk/rosapps/net/netreg/netreg.xml --- trunk/rosapps/net/netreg/netreg.xml 2005-09-02 21:13:10 UTC (rev 17609) +++ trunk/rosapps/net/netreg/netreg.xml 2005-09-02 21:26:51 UTC (rev 17610) @@ -1,4 +1,4 @@ -<module name="netreg" type="win32cui" installbase="system32" installname="netreg.exe" warnings="true"> +<module name="netreg" type="win32cui" installbase="system32" installname="netreg.exe"> <include base="netreg">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define>
19 years, 3 months
1
0
0
0
[hpoussin] 17609: RmRemove warnings
by hpoussin@svn.reactos.com
RmRemove warnings Modified: trunk/rosapps/dflat32/dflat32.xml Modified: trunk/rosapps/dflat32/edit.c Modified: trunk/rosapps/dflat32/normal.c Modified: trunk/rosapps/net/niclist/niclist.c Modified: trunk/rosapps/net/niclist/niclist.xml Modified: trunk/rosapps/notevil/notevil.c Modified: trunk/rosapps/notevil/notevil.xml Modified: trunk/rosapps/templates/dialog/page1.c _____ Modified: trunk/rosapps/dflat32/dflat32.xml --- trunk/rosapps/dflat32/dflat32.xml 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/dflat32/dflat32.xml 2005-09-02 21:13:10 UTC (rev 17609) @@ -1,4 +1,4 @@ -<module name="dflat32" type="win32cui" installbase="system32" installname="edit.exe" warnings="true"> +<module name="dflat32" type="win32cui" installbase="system32" installname="edit.exe"> <include base="ReactOS">include/wine</include> <include base="dflat32">.</include> <define name="__USE_W32API" /> _____ Modified: trunk/rosapps/dflat32/edit.c --- trunk/rosapps/dflat32/edit.c 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/dflat32/edit.c 2005-09-02 21:13:10 UTC (rev 17609) @@ -260,7 +260,6 @@ DFWINDOW wwnd; struct stat sb; char *Fname = FileName; - char *Fnewname = NewFileName; char *ermsg; if (strcmp(FileName, Untitled)) _____ Modified: trunk/rosapps/dflat32/normal.c --- trunk/rosapps/dflat32/normal.c 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/dflat32/normal.c 2005-09-02 21:13:10 UTC (rev 17609) @@ -21,7 +21,7 @@ static int px = -1, py = -1; static int diff; static struct DfWindow dwnd = {DF_DUMMY, NULL, DfNormalProc, - {-1,-1,-1,-1}}; + {{-1},{-1},{-1},{-1}}}; static PCHAR_INFO Bsave; static int Bht, Bwd; BOOL DfWindowMoving; _____ Modified: trunk/rosapps/net/niclist/niclist.c --- trunk/rosapps/net/niclist/niclist.c 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/net/niclist/niclist.c 2005-09-02 21:13:10 UTC (rev 17609) @@ -82,7 +82,7 @@ strDesc = (LPSTR)++wstrName; if (!nAdapterCount) { - printf("No Packet Adaptors found (%d)\n", AdapterLength); + printf("No Packet Adaptors found (%lu)\n", AdapterLength); } else { printf("Adaptor count: %d\n", nAdapterCount); } _____ Modified: trunk/rosapps/net/niclist/niclist.xml --- trunk/rosapps/net/niclist/niclist.xml 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/net/niclist/niclist.xml 2005-09-02 21:13:10 UTC (rev 17609) @@ -1,4 +1,4 @@ -<module name="niclist" type="win32cui" installbase="system32" installname="niclist.exe" warnings="true"> +<module name="niclist" type="win32cui" installbase="system32" installname="niclist.exe"> <include base="niclist">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define> _____ Modified: trunk/rosapps/notevil/notevil.c --- trunk/rosapps/notevil/notevil.c 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/notevil/notevil.c 2005-09-02 21:13:10 UTC (rev 17609) @@ -254,7 +254,7 @@ lint.QuadPart = -2000000; if( SetWaitableTimer( WaitableTimer, &lint, 200, NULL, NULL, FALSE ) == FALSE ) { - printf( "SetWaitableTimer() failed: %x\n", GetLastError() ); + printf( "SetWaitableTimer() failed: 0x%lx\n", GetLastError() ); return 2; } SetConsoleActiveScreenBuffer(ScreenBuffer); _____ Modified: trunk/rosapps/notevil/notevil.xml --- trunk/rosapps/notevil/notevil.xml 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/notevil/notevil.xml 2005-09-02 21:13:10 UTC (rev 17609) @@ -1,4 +1,4 @@ -<module name="notevil" type="win32cui" installbase="system32" installname="notevil.exe" warnings="true"> +<module name="notevil" type="win32cui" installbase="system32" installname="notevil.exe"> <include base="notevil">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define> _____ Modified: trunk/rosapps/templates/dialog/page1.c --- trunk/rosapps/templates/dialog/page1.c 2005-09-02 21:11:17 UTC (rev 17608) +++ trunk/rosapps/templates/dialog/page1.c 2005-09-02 21:13:10 UTC (rev 17609) @@ -42,12 +42,6 @@ //////////////////////////////////////////////////////////////////////// //////// -static void AddItem(HWND hListBox, LPCTSTR lpstr, HBITMAP hbmp) -{ - int nItem = SendMessage(hListBox, LB_ADDSTRING, 0, (LPARAM)lpstr); - SendMessage(hListBox, LB_SETITEMDATA, nItem, (LPARAM)hbmp); -} - static TCHAR* items[] = { _T("services"), _T("event log"),
19 years, 3 months
1
0
0
0
[hpoussin] 17608: Remove DbgPrint statements as they were not executed + some of them were badly placed
by hpoussin@svn.reactos.com
Remove DbgPrint statements as they were not executed + some of them were badly placed Modified: trunk/rosapps/cmdutils/touch/touch.c Modified: trunk/rosapps/cmdutils/touch/touch.xml _____ Modified: trunk/rosapps/cmdutils/touch/touch.c --- trunk/rosapps/cmdutils/touch/touch.c 2005-09-02 20:45:56 UTC (rev 17607) +++ trunk/rosapps/cmdutils/touch/touch.c 2005-09-02 21:11:17 UTC (rev 17608) @@ -42,10 +42,6 @@ All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static char sccsid[] = "@(#)touch.c 5.5 (Berkeley) 3/7/93"; -#endif /* not lint */ - #include <sys/types.h> #include <sys/stat.h> #include <sys/time.h> @@ -95,35 +91,35 @@ while ((ch = getopt(argc, argv, "acfmr:t:")) != EOF) switch(ch) { case 'a': - aflag = 1; DbgPrint("[%s]", "[1]"); + aflag = 1; break; case 'c': - cflag = 1; DbgPrint("[%s]", "[2]"); + cflag = 1; break; case 'f': - fflag = 1; DbgPrint("[%s]", "[3]"); + fflag = 1; break; case 'm': - mflag = 1; DbgPrint("[%s]", "[4]"); + mflag = 1; break; case 'r': timeset = 1; - stime_file(optarg, tv); DbgPrint("[%s]", "[5]"); + stime_file(optarg, tv); break; case 't': timeset = 1; - stime_arg1(optarg, tv); DbgPrint("[%s]", "[6]"); + stime_arg1(optarg, tv); break; case '?': default: - usage(); DbgPrint("[%s]", "[7]"); + usage(); } argc -= optind; argv += optind; /* Default is both -a and -m. */ if (aflag == 0 && mflag == 0) - aflag = mflag = 1; DbgPrint("[%s]", "[8]"); + aflag = mflag = 1; /* * If no -r or -t flag, at least two operands, the first of which @@ -134,51 +130,52 @@ len = p - argv[0]; if (*p == '\0' && (len == 8 || len == 10)) { timeset = 1; - stime_arg2(argv[0], len == 10, tv); DbgPrint("[%s]", "[9]"); + stime_arg2(argv[0], len == 10, tv); } } /* Otherwise use the current time of day. */ if (!timeset) - tv[1] = tv[0]; DbgPrint("[%s]", "[10]"); + tv[1] = tv[0]; if (*argv == NULL) - usage(); DbgPrint("[%s]", "[11]"); + usage(); for (rval = 0; *argv; ++argv) { /* See if the file exists. */ - if (stat(*argv, &sb)) + if (stat(*argv, &sb)) { if (!cflag) { /* Create the file. */ fd = open(*argv, O_WRONLY | O_CREAT, DEFFILEMODE); if (fd == -1 || fstat(fd, &sb) || close(fd)) { rval = 1; - warn("%s", *argv); DbgPrint("[%s]", "[12]"); - continue; DbgPrint("[%s]", "[13]"); + warn("%s", *argv); + continue; } /* If using the current time, we're done. */ if (!timeset) - continue; DbgPrint("[%s]", "[14]"); + continue; } else - continue; DbgPrint("[%s]", "[15]"); + continue; + } if (!aflag) - tv[0] = sb.st_atime; DbgPrint("[%s]", "[16]"); + tv[0] = sb.st_atime; if (!mflag) - tv[1] = sb.st_mtime; DbgPrint("[%s]", "[17]"); + tv[1] = sb.st_mtime; /* Try utime. */ - utb.actime = tv[0]; DbgPrint("[%s]", "[18]"); - utb.modtime = tv[1]; DbgPrint("[%s]", "[19]"); + utb.actime = tv[0]; + utb.modtime = tv[1]; if (!utime(*argv, &utb)) - continue; DbgPrint("[%s]", "[20]"); + continue; /* If the user specified a time, nothing else we can do. */ if (timeset) { - rval = 1; DbgPrint("[%s]", "[21]"); - warn("%s", *argv); DbgPrint("[%s]", "[22]"); + rval = 1; + warn("%s", *argv); } /* @@ -188,13 +185,13 @@ * ability to write the file is sufficient. Take a shot. */ if (!utime(*argv, NULL)) - continue; DbgPrint("[%s]", "[23]"); + continue; /* Try reading/writing. */ if (rw(*argv, &sb, fflag)) - rval = 1; DbgPrint("[%s]", "[23]"); + rval = 1; } - return rval; DbgPrint("[%s]", "[23]"); + return rval; } #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; @@ -207,7 +204,7 @@ char *p; /* Start with the current time. */ if ((t = localtime(&tvp[0])) == NULL) - err(1, "localtime"); DbgPrint("[%s]", "[23]"); + err(1, "localtime"); /* [[CC]YY]MMDDhhmm[.SS] */ if ((p = strchr(arg, '.')) == NULL) t->tm_sec = 0; /* Seconds defaults to 0. */ @@ -282,12 +279,12 @@ void stime_file(char *fname, time_t *tvp) { - struct stat sb; DbgPrint("[%s]", "[stime_file1]"); + struct stat sb; if (stat(fname, &sb)) - err(1, "%s", fname); DbgPrint("[%s]", "[stime_file1]"); - tvp[0] = sb.st_atime; DbgPrint("[%s]", "[stime_file1]"); - tvp[1] = sb.st_mtime; DbgPrint("[%s]", "[stime_file1]"); + err(1, "%s", fname); + tvp[0] = sb.st_atime; + tvp[1] = sb.st_mtime; } int @@ -298,7 +295,7 @@ /* Try regular files and directories. */ if (!S_ISREG(sbp->st_mode) && !S_ISDIR(sbp->st_mode)) { - warnx("%s: %s", fname, strerror(0)); DbgPrint("[%s]", "[rw1]"); + warnx("%s: %s", fname, strerror(0)); return (1); } @@ -307,37 +304,37 @@ if (!force || chmod(fname, DEFFILEMODE)) goto err; if ((fd = open(fname, O_RDWR, 0)) == -1) - goto err; DbgPrint("[%s]", "[rw2]"); - needed_chmod = 1; DbgPrint("[%s]", "[rw3]"); + goto err; + needed_chmod = 1; } if (sbp->st_size != 0) { if (read(fd, &byte, sizeof(byte)) != sizeof(byte)) - goto err; DbgPrint("[%s]", "[rw4]"); + goto err; if (lseek(fd, (off_t)0, SEEK_SET) == -1) - goto err; DbgPrint("[%s]", "[rw5]"); + goto err; if (write(fd, &byte, sizeof(byte)) != sizeof(byte)) - goto err; DbgPrint("[%s]", "[rw6]"); + goto err; } else { if (write(fd, &byte, sizeof(byte)) != sizeof(byte)) { -err: rval = 1; DbgPrint("[%s]", "[rw7]"); +err: rval = 1; warn("%s", fname); /* } else if (ftruncate(fd, (off_t)0)) {*/ } else if (chsize(fd, (off_t)0)) { - rval = 1; DbgPrint("[%s]", "[rw8]"); - warn("%s: file modified", fname);DbgPrint("[%s]", "[rw9]"); + rval = 1; + warn("%s: file modified", fname); } } if (close(fd) && rval != 1) { - rval = 1; DbgPrint("[%s]", "[rw10]"); - warn("%s", fname); DbgPrint("[%s]", "[rw11]"); + rval = 1; + warn("%s", fname); } if (needed_chmod && chmod(fname, sbp->st_mode) && rval != 1) { rval = 1; - warn("%s: permissions modified", fname); DbgPrint("[%s]", "[rw12]"); + warn("%s: permissions modified", fname); } - return (rval); DbgPrint("[%s]", "[rw13]"); + return (rval); } /*__dead void*/ _____ Modified: trunk/rosapps/cmdutils/touch/touch.xml --- trunk/rosapps/cmdutils/touch/touch.xml 2005-09-02 20:45:56 UTC (rev 17607) +++ trunk/rosapps/cmdutils/touch/touch.xml 2005-09-02 21:11:17 UTC (rev 17608) @@ -1,4 +1,4 @@ -<module name="touch" type="win32cui" installbase="system32" installname="touch.exe" warnings="true"> +<module name="touch" type="win32cui" installbase="system32" installname="touch.exe"> <include base="touch">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define>
19 years, 3 months
1
0
0
0
[gdalsnes] 17607: mostly naming changes
by gdalsnes@svn.reactos.com
mostly naming changes Modified: branches/win32k rewrite attempt/win32k/eng/window.c Modified: branches/win32k rewrite attempt/win32k/include/accelerator.h Modified: branches/win32k rewrite attempt/win32k/include/cursoricon.h Modified: branches/win32k rewrite attempt/win32k/include/hook.h Modified: branches/win32k rewrite attempt/win32k/include/ntuser.h Modified: branches/win32k rewrite attempt/win32k/include/object.h Modified: branches/win32k rewrite attempt/win32k/include/userfuncs.h Modified: branches/win32k rewrite attempt/win32k/include/win32.h Modified: branches/win32k rewrite attempt/win32k/include/window.h Modified: branches/win32k rewrite attempt/win32k/include/winpos.h Modified: branches/win32k rewrite attempt/win32k/ntuser/accelerator.c Modified: branches/win32k rewrite attempt/win32k/ntuser/callback.c Modified: branches/win32k rewrite attempt/win32k/ntuser/caret.c Modified: branches/win32k rewrite attempt/win32k/ntuser/class.c Modified: branches/win32k rewrite attempt/win32k/ntuser/cursoricon.c Modified: branches/win32k rewrite attempt/win32k/ntuser/desktop.c Modified: branches/win32k rewrite attempt/win32k/ntuser/focus.c Modified: branches/win32k rewrite attempt/win32k/ntuser/hook.c Modified: branches/win32k rewrite attempt/win32k/ntuser/hotkey.c Modified: branches/win32k rewrite attempt/win32k/ntuser/input.c Modified: branches/win32k rewrite attempt/win32k/ntuser/menu.c Modified: branches/win32k rewrite attempt/win32k/ntuser/message.c Modified: branches/win32k rewrite attempt/win32k/ntuser/misc.c Modified: branches/win32k rewrite attempt/win32k/ntuser/monitor.c Modified: branches/win32k rewrite attempt/win32k/ntuser/msgqueue.c Modified: branches/win32k rewrite attempt/win32k/ntuser/ntuser.c Modified: branches/win32k rewrite attempt/win32k/ntuser/object.c Modified: branches/win32k rewrite attempt/win32k/ntuser/painting.c Modified: branches/win32k rewrite attempt/win32k/ntuser/prop.c Modified: branches/win32k rewrite attempt/win32k/ntuser/scrollbar.c Modified: branches/win32k rewrite attempt/win32k/ntuser/timer.c Modified: branches/win32k rewrite attempt/win32k/ntuser/vis.c Modified: branches/win32k rewrite attempt/win32k/ntuser/windc.c Modified: branches/win32k rewrite attempt/win32k/ntuser/window.c Modified: branches/win32k rewrite attempt/win32k/ntuser/winpos.c Modified: branches/win32k rewrite attempt/win32k/ntuser/winsta.c Modified: branches/win32k rewrite attempt/win32k/objects/color.c Modified: branches/win32k rewrite attempt/win32k/objects/dc.c _____ Modified: branches/win32k rewrite attempt/win32k/eng/window.c --- branches/win32k rewrite attempt/win32k/eng/window.c 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/eng/window.c 2005-09-02 20:45:56 UTC (rev 17607) @@ -210,7 +210,8 @@ pso, hwnd, pfn, fl, iPixelFormat); /* Get window object */ - Window = IntGetWindowObject(hwnd); + //FIXME: user lock????? + Window = UserGetWindowObject(hwnd); if (Window == NULL) { return NULL; @@ -262,11 +263,16 @@ { WNDGDI *WndObjInt = ObjToGDI(pwo, WND); PWINDOW_OBJECT Window; + BOOL inUser; DPRINT("EngDeleteWnd: pwo = 0x%x\n", pwo); /* Get window object */ - Window = IntGetWindowObject(WndObjInt->Hwnd); + inUser = UserIsEntered(); + if (!inUser){ + UserEnterShared(); + } + Window = UserGetWindowObject(WndObjInt->Hwnd); if (Window == NULL) { DPRINT1("Warning: Couldnt get window object for WndObjInt->Hwnd!!!\n"); @@ -277,6 +283,9 @@ /* Remove object from window */ RemoveEntryList(&WndObjInt->ListEntry); } + if (!inUser){ + UserLeave(); + } /* Free resources */ IntEngDeleteClipRegion(WndObjInt->ClientClipObj); _____ Modified: branches/win32k rewrite attempt/win32k/include/accelerator.h --- branches/win32k rewrite attempt/win32k/include/accelerator.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/accelerator.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -13,7 +13,6 @@ { /*---------- USER_OBJECT_HDR --------------*/ HACCEL hSelf; /* want typesafe handle */ - LONG refs_placeholder; BYTE flags_placeholder; /*---------- USER_OBJECT_HDR --------------*/ _____ Modified: branches/win32k rewrite attempt/win32k/include/cursoricon.h --- branches/win32k rewrite attempt/win32k/include/cursoricon.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/cursoricon.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -18,7 +18,6 @@ { /*---------- USER_OBJECT_HDR --------------*/ HCURSOR hSelf; /* want typesafe handle */ - LONG refs_placeholder; BYTE flags_placeholder; /*---------- USER_OBJECT_HDR --------------*/ _____ Modified: branches/win32k rewrite attempt/win32k/include/hook.h --- branches/win32k rewrite attempt/win32k/include/hook.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/hook.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -7,7 +7,6 @@ { /*---------- USER_OBJECT_HDR --------------*/ HHOOK hSelf; - LONG refs; BYTE hdrFlags; /*---------- USER_OBJECT_HDR --------------*/ _____ Modified: branches/win32k rewrite attempt/win32k/include/ntuser.h --- branches/win32k rewrite attempt/win32k/include/ntuser.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/ntuser.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -5,18 +5,25 @@ typedef struct _USER_OBJECT_HDR { HANDLE hSelf; - LONG refs; BYTE flags; + } USER_OBJECT_HDR, *PUSER_OBJECT_HDR; typedef struct _USER_REFERENCE_ENTRY { SINGLE_LIST_ENTRY Entry; - PUSER_OBJECT_HDR hdr; + PUSER_OBJECT_HDR* ppHdr; } USER_REFERENCE_ENTRY, *PUSER_REFERENCE_ENTRY; +/* ul = user lock */ +#define ulShared 1 +#define ulExclusive 2 +/* unused for now... */ +//#define ASSERT_LOCK(type) ASSERT(PsGetWin32Thread()->LockType >= type) +#define ASSERT_LOCK(type) + extern char* _file; extern DWORD _line; extern DWORD _locked; @@ -28,35 +35,14 @@ #define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_ #define END_CLEANUP return _ret_; -#if 0 -#define UserEnterShared() { \ - UUserEnterShared(); ASSERT(InterlockedIncrement(&_locked) > 0); \ - } - #define UserEnterExclusive() {\ - UUserEnterExclusive(); ASSERT(InterlockedIncrement(&_locked) > 0); \ - } - -#define UserLeave() { ASSERT(InterlockedDecrement(&_locked) >= 0); \ - UUserLeave(); } - -#endif - - VOID FASTCALL UserStackTrace(); -#define UserEnterShared() \ -{ \ - DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \ - ASSERT(UserLock.Owner != KeGetCurrentThread()); \ - UUserEnterShared(); \ - ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \ - DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \ -} +#define UserEnterShared() UserEnterExclusive() #define UserEnterExclusive() \ { \ - /* DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ + /* DPRINT1("try xlock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ if (UserLock.Owner == KeGetCurrentThread()){ \ DPRINT1("file %s, line %i\n",_file, _line); \ ASSERT(FALSE); \ @@ -83,27 +69,11 @@ -#define GetWnd(hwnd) IntGetWindowObject(hwnd) +#define GetWnd(hwnd) UserGetWindowObject(hwnd) -#if 0 -#define IntLockUserShared() {if(_locked){ DPRINT1("last %s, %i\n",_file,_line);} \ - IIntLockUserShared(); \ - _locked++; _file = __FILE__; _line = __LINE__; \ - } - - #define IntUserEnterExclusive() {if(_locked){ DPRINT1("last %s, %i\n",_file,_line);} \ - IIntUserEnterExclusive(); \ - _locked++; _file = __FILE__; _line = __LINE__; \ - } - - -#define IntUserLeave() { if(!_locked){ DPRINT1("not locked %s, %i\n",__FILE__,__LINE__);} \ - _locked--; IIntUserLeave(); } -#endif - NTSTATUS FASTCALL InitUserImpl(VOID); VOID FASTCALL UninitUser(VOID); VOID FASTCALL UUserEnterShared(VOID); _____ Modified: branches/win32k rewrite attempt/win32k/include/object.h --- branches/win32k rewrite attempt/win32k/include/object.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/object.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -6,6 +6,26 @@ #include <win32k/pen.h> +typedef struct _VOLATILE_OBJECT_ENTRY +{ + PUSER_OBJECT_HDR hdr; + PUSER_HANDLE_ENTRY handle_entry; + WORD recycle_count; + WORD objType; + SINGLE_LIST_ENTRY link; +} VOLATILE_OBJECT_ENTRY, *PVOLATILE_OBJECT_ENTRY; + + +typedef struct _OBJECT_ENTRY +{ + PUSER_OBJECT_HDR hdr; + PUSER_HANDLE_ENTRY handle_entry; + WORD generation; + WORD type; +} OBJECT_ENTRY, *POBJECT_ENTRY; + + + #define USER_OBJ_DESTROYING (0x1) #define USER_OBJ_DESTROYED (0x2) _____ Modified: branches/win32k rewrite attempt/win32k/include/userfuncs.h --- branches/win32k rewrite attempt/win32k/include/userfuncs.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/userfuncs.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -12,7 +12,7 @@ #define UserGetCurrentQueue() (&PsGetWin32Thread()->Queue) #define UserGetForegroundWThread() (QUEUE_2_WTHREAD(gInputDesktop->ActiveQueue)) -#define UserGetForegroundQueue() (gInputDesktop->ActiveQueue) +#define UserGetForegroundQueue() (gInputDesktop ? gInputDesktop->ActiveQueue : NULL) #define UserSetForegroundQueue(q) (gInputDesktop->ActiveQueue = (q)) @@ -33,44 +33,28 @@ /******************** OBJECT.C ***************/ -BOOLEAN FASTCALL UserSetCheckDestroy(PUSER_OBJECT_HDR hdr); - -VOID FASTCALL UserDestroyObject(PUSER_OBJECT_HDR obj); - /******************** HANDLE.C ***************/ extern USER_HANDLE_TABLE gHandleTable; PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle ); +#define VOLATILE_OBJECTS_LIST SINGLE_LIST_ENTRY __object_list__ = {NULL}; + + +#define UserLinkVolatileObject(obj) UserLinkVolatileObject2(&obj->hdr, &__object_list__, (PVOLATILE_OBJECT_ENTRY)_alloca(sizeof(VOLATILE_OBJECT_ENTRY))) +#define UserValidateVolatileObjects() UserValidateVolatileObjects2(&__object_list__) -#include <malloc.h> +VOID FASTCALL UserLinkVolatileObject2(PUSER_OBJECT_HDR hdr, PSINGLE_LIST_ENTRY list, PVOLATILE_OBJECT_ENTRY e); +BOOLEAN FASTCALL UserValidateVolatileObjects2(PSINGLE_LIST_ENTRY list); +#define UserGetEntry(obj) UserGetEntry2(&(obj)->hdr) +#define UserValidateEntry(obj) UserValidateEntry2(&(obj)) -#define UserReferenceObject(obj) (obj->hdr.refs++) -#define UserDereferenceObject(obj){ \ - if (--obj->hdr.refs == 0 && obj->hdr.flags & USER_OBJ_DESTROYING && !(obj->hdr.flags & USER_OBJ_DESTROYED)){ \ - UserDestroyObject(&obj->hdr); \ - } \ -} +inline OBJECT_ENTRY FASTCALL UserGetEntry2(PUSER_OBJECT_HDR hdr); +inline BOOLEAN FASTCALL UserValidateEntry2(POBJECT_ENTRY e); - -#define UserReferenceObjectCo(obj){ \ - PUSER_REFERENCE_ENTRY ref = (PUSER_REFERENCE_ENTRY)_alloca(sizeof(USER_REFERENCE_ENTRY)); \ - obj->hdr.refs++; \ - ref->hdr = &obj->hdr; \ - PushEntryList(&PsGetWin32Thread()->UserObjReferencesStack, &ref->Entry); \ -} - -#define UserDereferenceObjectCo(obj){ \ - PSINGLE_LIST_ENTRY entry = PopEntryList(&PsGetWin32Thread()->UserObjReferencesStack); \ - PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(entry, USER_REFERENCE_ENTRY, Entry); \ - ASSERT(&obj->hdr == ref->hdr); \ - if (--ref->hdr->refs == 0 && obj->hdr.flags & USER_OBJ_DESTROYING && !(obj->hdr.flags & USER_OBJ_DESTROYED)) { \ - UserDestroyObject(ref->hdr); \ - } \ -} VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes); HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type ); @@ -90,7 +74,7 @@ /************* CALLBACK.C *****************/ LRESULT STDCALL -coUserCallWindowProc(WNDPROC Proc, +co_UserCallWindowProc(WNDPROC Proc, BOOLEAN IsAnsiProc, HWND Wnd, UINT Message, @@ -99,7 +83,7 @@ INT lParamBufferSize); VOID STDCALL -coUserCallSentMessageCallback(SENDASYNCPROC CompletionCallback, +co_UserCallSentMessageCallback(SENDASYNCPROC CompletionCallback, HWND hWnd, UINT Msg, ULONG_PTR CompletionCallbackContext, @@ -107,13 +91,13 @@ HMENU STDCALL -coUserLoadSysMenuTemplate(); +co_UserLoadSysMenuTemplate(); BOOL STDCALL -coUserLoadDefaultCursors(VOID); +co_UserLoadDefaultCursors(VOID); LRESULT STDCALL -coUserCallHookProc(INT HookId, +co_UserCallHookProc(INT HookId, INT Code, WPARAM wParam, LPARAM lParam, @@ -176,7 +160,7 @@ UserGetActiveDesktop(VOID); NTSTATUS FASTCALL -coUserShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height); +co_UserShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height); NTSTATUS FASTCALL IntHideDesktop(PDESKTOP_OBJECT Desktop); @@ -203,7 +187,7 @@ BOOL IntRegisterShellHookWindow(HWND hWnd); BOOL IntDeRegisterShellHookWindow(HWND hWnd); -VOID IntShellHookNotify(WPARAM Message, LPARAM lParam); +VOID co_UserShellHookNotify(WPARAM Message, LPARAM lParam); #define IntIsActiveDesktop(Desktop) ((Desktop) == (gInputDesktop)) @@ -281,17 +265,17 @@ UserGetThreadFocusWindow(); BOOL FASTCALL -coUserMouseActivateWindow(PWINDOW_OBJECT Window); +co_UserMouseActivateWindow(PWINDOW_OBJECT Window); BOOL FASTCALL -coUserSetForegroundWindow(PWINDOW_OBJECT Window); +co_UserSetForegroundWindow(PWINDOW_OBJECT Window); PWINDOW_OBJECT FASTCALL -coUserSetActiveWindow(PWINDOW_OBJECT Window); +co_UserSetActiveWindow(PWINDOW_OBJECT Window); PWINDOW_OBJECT FASTCALL UserGetForegroundWindow(VOID); PWINDOW_OBJECT FASTCALL -coUserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL); +co_UserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL); /******************** PAINTING.C ********************************/ @@ -299,12 +283,12 @@ VOID FASTCALL IntValidateParent(PWINDOW_OBJECT Child, HRGN ValidRegion); BOOL FASTCALL -coUserRedrawWindow(PWINDOW_OBJECT Wnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG Flags); +co_UserRedrawWindow(PWINDOW_OBJECT Wnd, const RECT* UpdateRect, HRGN UpdateRgn, ULONG Flags); BOOL FASTCALL IntGetPaintMessage(HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, PW32THREAD Thread, MSG *Message, BOOL Remove); -BOOL FASTCALL coUserValidateRgn(PWINDOW_OBJECT hWnd, HRGN hRgn); +BOOL FASTCALL co_UserValidateRgn(PWINDOW_OBJECT hWnd, HRGN hRgn); #define IntLockWindowUpdate(Window) \ @@ -321,7 +305,7 @@ const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate); INT FASTCALL -coUserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase); +co_UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase); /******************** MESSAGE.C ********************************/ @@ -329,7 +313,7 @@ UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT FASTCALL -coUserSendMessage(HWND hWnd, +co_UserSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); @@ -337,7 +321,7 @@ LRESULT FASTCALL -coUserSendMessageTimeout(HWND hWnd, +co_UserSendMessageTimeout(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, @@ -352,12 +336,15 @@ /************************ WINDOW.C *****************************/ +PWINDOW_OBJECT FASTCALL UserGetWindowObject_UpdateHandle2(HWND* h); +#define UserGetWindowObject_UpdateHandle(handle) UserGetWindowObject_UpdateHandle2(&(handle)) + BOOL FASTCALL UserSetSystemMenu(PWINDOW_OBJECT WindowObject, PMENU_OBJECT MenuObject); inline VOID FASTCALL UserFreeWindowObject(PWINDOW_OBJECT Wnd); -PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd); +inline PWINDOW_OBJECT FASTCALL UserGetWindowObject(HWND hWnd); PWINDOW_OBJECT FASTCALL UserCreateWindowObject(ULONG bytes); @@ -368,14 +355,119 @@ UserGetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, BOOL Ansi); LONG FASTCALL -coUserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL Ansi); +co_UserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL Ansi); BOOLEAN FASTCALL -coUserDestroyWindow(PWINDOW_OBJECT Wnd); +co_UserDestroyWindow(PWINDOW_OBJECT Wnd); HWND FASTCALL -GetHwnd(PWINDOW_OBJECT Wnd); +GetHwndSafe(PWINDOW_OBJECT Wnd); +#define HAS_DLGFRAME(Style, ExStyle) \ + (((ExStyle) & WS_EX_DLGMODALFRAME) || \ + (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME)))) + +#define HAS_THICKFRAME(Style, ExStyle) \ + (((Style) & WS_THICKFRAME) && \ + (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME))) + +#define HAS_THINFRAME(Style, ExStyle) \ + (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP)))) + +#define IntIsDesktopWindow(WndObj) \ + (WndObj->ParentWnd == NULL) + +#define IntIsBroadcastHwnd(hWnd) \ + (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST) + +#if 0 +#define IntWndBelongsToThread(WndObj, W32Thread) \ + (((WndObj->W32Thread->Thread && WndObj->W32Thread->Thread->Tcb.Win32Thread)) && \ + (WndObj->W32Thread->Thread->Tcb.Win32Thread == W32Thread)) +#endif + +#define IntWndBelongsToThread(WndObj, _W32Thread) (QUEUE_2_WTHREAD((WndObj)->Queue) == (_W32Thread)) + + +#define IntGetWndThreadId(WndObj) \ + WndObj->WThread->Thread->Cid.UniqueThread + +#define IntGetWndProcessId(WndObj) \ + WndObj->WThread->Thread->ThreadsProcess->UniqueProcessId + +PWINDOW_OBJECT FASTCALL +IntGetProcessWindowObject(PW32THREAD Thread, HWND hWnd); + +BOOL FASTCALL +IntIsWindow(HWND hWnd); + +PWINDOW_OBJECT* FASTCALL +UserListChildWnd(PWINDOW_OBJECT Window); + +HWND* FASTCALL +IntWinListChildren(PWINDOW_OBJECT Window); + +NTSTATUS FASTCALL +InitWindowImpl (VOID); + +NTSTATUS FASTCALL +CleanupWindowImpl (VOID); + +VOID FASTCALL +IntGetClientRect (PWINDOW_OBJECT WindowObject, PRECT Rect); + +PWINDOW_OBJECT FASTCALL +UserGetActiveWindow(VOID); + +BOOL FASTCALL +UserIsWindowVisible (PWINDOW_OBJECT hWnd); + +BOOL FASTCALL +UserIsChildWindow (PWINDOW_OBJECT Parent, PWINDOW_OBJECT Child); + +VOID FASTCALL +IntUnlinkWindow(PWINDOW_OBJECT Wnd); + +VOID FASTCALL +IntLinkWindow(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndParent, PWINDOW_OBJECT WndPrevSibling); + +PWINDOW_OBJECT FASTCALL +UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type); + +PWINDOW_OBJECT FASTCALL +UserGetParent(PWINDOW_OBJECT Wnd); + +inline PWINDOW_OBJECT FASTCALL +UserGetOwner(PWINDOW_OBJECT Wnd); + +INT FASTCALL +IntGetWindowRgn(HWND hWnd, HRGN hRgn); + +INT FASTCALL +IntGetWindowRgnBox(HWND hWnd, RECT *Rect); + +PWINDOW_OBJECT FASTCALL +UserGetShellWindow(); + +BOOL FASTCALL +IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi); + +VOID FASTCALL +IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy); + +BOOL FASTCALL +IntAnyPopup(VOID); + +BOOL FASTCALL +IntIsWindowInDestroy(PWINDOW_OBJECT Window); + +DWORD IntRemoveWndProcHandle(WNDPROC Handle); +DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID); +DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode); + +BOOL FASTCALL +co_UserShowOwnedPopups( HWND owner, BOOL fShow ); + /************************* WINSTA.C ****************************/ inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta(); @@ -441,47 +533,16 @@ /************************* MENU.C ****************************/ PMENU_OBJECT FASTCALL -coUserGetSystemMenu(PWINDOW_OBJECT WindowObject, BOOL bRevert, BOOL RetMenu); +co_UserGetSystemMenu(PWINDOW_OBJECT WindowObject, BOOL bRevert, BOOL RetMenu); -PMENU_OBJECT FASTCALL UserAllocMenuObject(HMENU* h); - inline PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu); -PMENU_OBJECT FASTCALL -UserCreateMenu(BOOL PopupMenu); - - -BOOL FASTCALL -IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, - BOOL RemoveFromList, BOOL bRecurse); - -BOOL FASTCALL -IntRemoveMenuItem(PMENU_OBJECT MenuObject, UINT uPosition, UINT uFlags, - BOOL bRecurse); - -UINT FASTCALL -IntDeleteMenuItems(PMENU_OBJECT MenuObject, BOOL bRecurse); - VOID FASTCALL UserDestroyMenu(PMENU_OBJECT MenuObject, BOOL bRecurse); -PMENU_OBJECT FASTCALL -IntCloneMenu(PMENU_OBJECT Source); - BOOL FASTCALL -UserSetMenuFlagRtoL(PMENU_OBJECT MenuObject); - -BOOL FASTCALL -IntSetMenuContextHelpId(PMENU_OBJECT MenuObject, DWORD dwContextHelpId); - -BOOL FASTCALL -UserGetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); - -BOOL FASTCALL IntIsMenu(HMENU hMenu); -BOOL FASTCALL -UserSetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); BOOL FASTCALL UserMenuItemInfo( @@ -492,21 +553,8 @@ BOOL Set ); -int FASTCALL -UserGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT fFlag, - PMENU_ITEM *MenuItem, PMENU_ITEM *PrevMenuItem); -UINT FASTCALL -IntEnableMenuItem(PMENU_OBJECT MenuObject, UINT uIDEnableItem, UINT uEnable); - -DWORD FASTCALL -IntCheckMenuItem(PMENU_OBJECT MenuObject, UINT uIDCheckItem, UINT uCheck); - BOOL FASTCALL -IntSetMenuDefaultItem(PMENU_OBJECT MenuObject, UINT uItem, UINT fByPos); - - -BOOL FASTCALL UserSetMenu( PWINDOW_OBJECT WindowObject, HMENU Menu, @@ -518,11 +566,6 @@ BOOL FASTCALL IntCleanupMenus(PW32PROCESS Win32Process); -BOOL FASTCALL -IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition, - PROSMENUITEMINFO ItemInfo); - - NTSTATUS FASTCALL InitMenuImpl(VOID); @@ -532,19 +575,19 @@ /************************* CARET.C ****************************/ BOOL FASTCALL -coUserShowCaret(PWINDOW_OBJECT Wnd); +co_UserShowCaret(PWINDOW_OBJECT Wnd); BOOL FASTCALL -coUserSetCaretPos(int X, int Y); +co_UserSetCaretPos(int X, int Y); BOOL FASTCALL -coUserHideCaret(PWINDOW_OBJECT Wnd); +co_UserHideCaret(PWINDOW_OBJECT Wnd); BOOL FASTCALL UserSwitchCaretShowing(PTHRDCARETINFO Info); BOOL FASTCALL -coUserDestroyCaret(PW32THREAD Win32Thread); +co_UserDestroyCaret(PW32THREAD Win32Thread); BOOL FASTCALL UserSetCaretBlinkTime(UINT uMSeconds); @@ -554,14 +597,35 @@ /************************* WINPOS.C ****************************/ +UINT +FASTCALL co_WinPosArrangeIconicWindows(PWINDOW_OBJECT parent); +LRESULT FASTCALL +co_WinPosGetNonClientSize(PWINDOW_OBJECT Wnd, RECT* WindowRect, RECT* ClientRect); +UINT FASTCALL +co_WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos, + POINT* MinTrack, POINT* MaxTrack); +UINT FASTCALL +co_WinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos); +BOOLEAN FASTCALL +co_WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, + INT cy, UINT flags); +BOOLEAN FASTCALL +co_WinPosShowWindow(PWINDOW_OBJECT Wnd, INT Cmd); +USHORT FASTCALL +co_WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTests, POINT *WinPoint, + PWINDOW_OBJECT* Window); +VOID FASTCALL co_WinPosActivateOtherWindow(PWINDOW_OBJECT Window); +PINTERNALPOS FASTCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, + POINT *pt, PRECT RestoreRect); + BOOL FASTCALL UserGetClientOrigin(PWINDOW_OBJECT hWnd, LPPOINT Point); /************************* SCROLLBAR.C ****************************/ DWORD FASTCALL -coUserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow); +co_UserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow); #define IntGetScrollbarInfoFromWindow(Window, i) \ ((PSCROLLBARINFO)(&((Window)->Scroll + i)->ScrollBarInfo)) @@ -572,7 +636,7 @@ #define SBOBJ_TO_SBID(Obj) ((Obj) - OBJID_HSCROLL) #define SBID_IS_VALID(id) (id == SB_HORZ || id == SB_VERT || id == SB_CTL) -BOOL FASTCALL coIntCreateScrollBars(PWINDOW_OBJECT Window); +BOOL FASTCALL co_IntCreateScrollBars(PWINDOW_OBJECT Window); BOOL FASTCALL IntDestroyScrollBars(PWINDOW_OBJECT Window); @@ -603,7 +667,7 @@ PHOOK FASTCALL UserCreateHookObject(); PHOOK FASTCALL UserGetHookObject(HHOOK hHook); -LRESULT FASTCALL coHOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam); +LRESULT FASTCALL co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam); VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread); @@ -724,7 +788,7 @@ BOOL FASTCALL MsqIsHung(PUSER_MESSAGE_QUEUE MessageQueue); NTSTATUS FASTCALL -coMsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, +co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uTimeout, BOOL Block, BOOL HookMessage, ULONG_PTR *uResult); @@ -738,7 +802,7 @@ VOID FASTCALL MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode); BOOLEAN STDCALL -coMsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, +co_MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, IN BOOLEAN Hardware, IN BOOLEAN Remove, IN HWND Wnd, @@ -756,9 +820,9 @@ NTSTATUS FASTCALL MsqInitializeImpl(VOID); BOOLEAN FASTCALL -coMsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue); +co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue); NTSTATUS FASTCALL -coMsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue, HWND WndFilter, +co_MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue, HWND WndFilter, UINT MsgFilterMin, UINT MsgFilterMax); VOID FASTCALL MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue, @@ -774,7 +838,7 @@ VOID FASTCALL -coMsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam); +co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam); VOID FASTCALL MsqPostHotKeyMessage(PVOID Thread, HWND hWnd, WPARAM wParam, LPARAM lParam); VOID FASTCALL @@ -854,7 +918,7 @@ BOOLEAN ClipChildren, BOOLEAN ClipSiblings); VOID FASTCALL -coVIS_WindowLayoutChanged(PWINDOW_OBJECT Window, HRGN UncoveredRgn); +co_VIS_WindowLayoutChanged(PWINDOW_OBJECT Window, HRGN UncoveredRgn); /**************************** NTUSER.C ************************/ _____ Modified: branches/win32k rewrite attempt/win32k/include/win32.h --- branches/win32k rewrite attempt/win32k/include/win32.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/win32.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -28,11 +28,9 @@ typedef struct _W32PROCESS { -// FAST_MUTEX ClassListLock; PEPROCESS Process; LIST_ENTRY ClassListHead; LIST_ENTRY ExpiredTimersList; -// FAST_MUTEX MenuListLock; LIST_ENTRY MenuListHead; FAST_MUTEX PrivateFontListLock; LIST_ENTRY PrivateFontListHead; _____ Modified: branches/win32k rewrite attempt/win32k/include/window.h --- branches/win32k rewrite attempt/win32k/include/window.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/window.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -33,7 +33,6 @@ { /*---------- USER_OBJECT_HDR --------------*/ HWND hSelf; /* typesafe handle */ - LONG refs_placeholder; BYTE hdrFlags_placeholder; /*---------- USER_OBJECT_HDR --------------*/ @@ -82,8 +81,8 @@ LIST_ENTRY ThreadListEntry; /* Handle to the parent window. */ PWINDOW_OBJECT ParentWnd; - /* Handle to the owner window. */ - HWND hOwner; + /* the owner window. */ + HWND hOwnerWnd; /* DC Entries (DCE) */ PDCE Dce; @@ -103,7 +102,7 @@ PUSER_MESSAGE_QUEUE Queue; PW32THREAD WThread; }; - HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/ + HWND hLastActiveWnd; /* handle to last active popup window (wine doesn't use pointer, for unk. reason)*/ PINTERNALPOS InternalPos; // ULONG Status; /* counter for tiled child windows */ @@ -122,111 +121,8 @@ #define WINDOWOBJECT_RESTOREMAX (0x00000020) -#define HAS_DLGFRAME(Style, ExStyle) \ - (((ExStyle) & WS_EX_DLGMODALFRAME) || \ - (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME)))) -#define HAS_THICKFRAME(Style, ExStyle) \ - (((Style) & WS_THICKFRAME) && \ - (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME))) -#define HAS_THINFRAME(Style, ExStyle) \ - (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP)))) - -#define IntIsDesktopWindow(WndObj) \ - (WndObj->ParentWnd == NULL) - -#define IntIsBroadcastHwnd(hWnd) \ - (hWnd == HWND_BROADCAST || hWnd == HWND_TOPMOST) - -#if 0 -#define IntWndBelongsToThread(WndObj, W32Thread) \ - (((WndObj->W32Thread->Thread && WndObj->W32Thread->Thread->Tcb.Win32Thread)) && \ - (WndObj->W32Thread->Thread->Tcb.Win32Thread == W32Thread)) -#endif - -#define IntWndBelongsToThread(WndObj, _W32Thread) (QUEUE_2_WTHREAD((WndObj)->Queue) == (_W32Thread)) - - -#define IntGetWndThreadId(WndObj) \ - WndObj->WThread->Thread->Cid.UniqueThread - -#define IntGetWndProcessId(WndObj) \ - WndObj->WThread->Thread->ThreadsProcess->UniqueProcessId - -PWINDOW_OBJECT FASTCALL -IntGetProcessWindowObject(PW32THREAD Thread, HWND hWnd); - -BOOL FASTCALL -IntIsWindow(HWND hWnd); - -PWINDOW_OBJECT* FASTCALL -UserListChildWnd(PWINDOW_OBJECT Window); - -HWND* FASTCALL -IntWinListChildren(PWINDOW_OBJECT Window); - -NTSTATUS FASTCALL -InitWindowImpl (VOID); - -NTSTATUS FASTCALL -CleanupWindowImpl (VOID); - -VOID FASTCALL -IntGetClientRect (PWINDOW_OBJECT WindowObject, PRECT Rect); - -PWINDOW_OBJECT FASTCALL -UserGetActiveWindow(VOID); - -BOOL FASTCALL -UserIsWindowVisible (PWINDOW_OBJECT hWnd); - -BOOL FASTCALL -UserIsChildWindow (PWINDOW_OBJECT Parent, PWINDOW_OBJECT Child); - -VOID FASTCALL -IntUnlinkWindow(PWINDOW_OBJECT Wnd); - -VOID FASTCALL -IntLinkWindow(PWINDOW_OBJECT Wnd, PWINDOW_OBJECT WndParent, PWINDOW_OBJECT WndPrevSibling); - -PWINDOW_OBJECT FASTCALL -UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type); - -PWINDOW_OBJECT FASTCALL -UserGetParent(PWINDOW_OBJECT Wnd); - -PWINDOW_OBJECT FASTCALL -IntGetOwner(PWINDOW_OBJECT Wnd); - -INT FASTCALL -IntGetWindowRgn(HWND hWnd, HRGN hRgn); - -INT FASTCALL -IntGetWindowRgnBox(HWND hWnd, RECT *Rect); - -PWINDOW_OBJECT FASTCALL -UserGetShellWindow(); - -BOOL FASTCALL -IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi); - -VOID FASTCALL -IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy); - -BOOL FASTCALL -IntAnyPopup(VOID); - -BOOL FASTCALL -IntIsWindowInDestroy(PWINDOW_OBJECT Window); - -DWORD IntRemoveWndProcHandle(WNDPROC Handle); -DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID); -DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode); - -BOOL FASTCALL -coUserShowOwnedPopups( HWND owner, BOOL fShow ); - #endif /* _WIN32K_WINDOW_H */ /* EOF */ _____ Modified: branches/win32k rewrite attempt/win32k/include/winpos.h --- branches/win32k rewrite attempt/win32k/include/winpos.h 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/include/winpos.h 2005-09-02 20:45:56 UTC (rev 17607) @@ -14,26 +14,5 @@ NtGdiPtInRegion((WndObject)->WindowRegion, (INT)((x) - (WndObject)->WindowRect.left), \ (INT)((y) - (WndObject)->WindowRect.top)))) -UINT -FASTCALL coWinPosArrangeIconicWindows(PWINDOW_OBJECT parent); -LRESULT FASTCALL -coWinPosGetNonClientSize(PWINDOW_OBJECT Wnd, RECT* WindowRect, RECT* ClientRect); -UINT FASTCALL -coWinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos, - POINT* MinTrack, POINT* MaxTrack); -UINT FASTCALL -coWinPosMinMaximize(PWINDOW_OBJECT WindowObject, UINT ShowFlag, RECT* NewPos); -BOOLEAN FASTCALL -coWinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx, - INT cy, UINT flags); -BOOLEAN FASTCALL -coWinPosShowWindow(PWINDOW_OBJECT Wnd, INT Cmd); -USHORT FASTCALL -coWinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, PUSER_MESSAGE_QUEUE OnlyHitTests, POINT *WinPoint, - PWINDOW_OBJECT* Window); -VOID FASTCALL coWinPosActivateOtherWindow(PWINDOW_OBJECT Window); -PINTERNALPOS FASTCALL WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, - POINT *pt, PRECT RestoreRect); - #endif /* _WIN32K_WINPOS_H */ _____ Modified: branches/win32k rewrite attempt/win32k/ntuser/accelerator.c --- branches/win32k rewrite attempt/win32k/ntuser/accelerator.c 2005-09-02 19:05:01 UTC (rev 17606) +++ branches/win32k rewrite attempt/win32k/ntuser/accelerator.c 2005-09-02 20:45:56 UTC (rev 17607) @@ -54,6 +54,45 @@ #define NDEBUG #include <debug.h> + +/* USER OBJECT FUNCTIONS *******************************************************/ + +BOOLEAN FASTCALL UserDestroyAccel(PACCELERATOR_TABLE Accel) +{ + ASSERT_LOCK(ulExclusive); + + if (Accel->Table != NULL) + { + ExFreePool(Accel->Table); + } + + UserFreeHandle(&gHandleTable, Accel->hdr.hSelf); + UserFree(Accel); + + return TRUE; +} + + +PACCELERATOR_TABLE FASTCALL UserCreateAccelObject() +{ + PACCELERATOR_TABLE Accel; + HACCEL hAccel; + + ASSERT_LOCK(ulExclusive); + + Accel = (PACCELERATOR_TABLE)UserAllocZero(sizeof(ACCELERATOR_TABLE)); + if (!Accel) return NULL; + + hAccel = UserAllocHandle(&gHandleTable, Accel, otAccel); + if (!hAccel){ + UserFree(Accel); + return NULL; + } + Accel->hSelf=hAccel; + return Accel; +} + + /* FUNCTIONS *****************************************************************/ NTSTATUS FASTCALL @@ -71,21 +110,19 @@ int STDCALL NtUserCopyAcceleratorTable( - HACCEL Table, + HACCEL hAccel, LPACCEL Entries, int EntriesCount) { - PACCELERATOR_TABLE AcceleratorTable; + PACCELERATOR_TABLE Accel; NTSTATUS Status; int Ret; DECLARE_RETURN(int); [truncated at 1000 lines; 13185 more skipped]
19 years, 3 months
1
0
0
0
[hpoussin] 17606: Don't fill twice the output buffer. Bug spotted by Filip
by hpoussin@svn.reactos.com
Don't fill twice the output buffer. Bug spotted by Filip Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-09-02 18:51:32 UTC (rev 17605) +++ trunk/reactos/lib/setupapi/devinst.c 2005-09-02 19:05:01 UTC (rev 17606) @@ -3873,12 +3873,6 @@ if (deviceInfo) { /* good one found */ - if (DeviceInfoData) - { - memcpy(&DeviceInfoData->ClassGuid, &deviceInfo->ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = 0; /* FIXME */ - DeviceInfoData->Reserved = (ULONG_PTR)deviceInfo; - } ret = TRUE; } else
19 years, 3 months
1
0
0
0
[hpoussin] 17605: No need to allocate too much memory, as SetupDiGetDeviceRegistryPropertyW returns a size in bytes, not in characters. Bug spotted by Filip
by hpoussin@svn.reactos.com
No need to allocate too much memory, as SetupDiGetDeviceRegistryPropertyW returns a size in bytes, not in characters. Bug spotted by Filip Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-09-02 13:12:44 UTC (rev 17604) +++ trunk/reactos/lib/setupapi/devinst.c 2005-09-02 18:51:32 UTC (rev 17605) @@ -3466,7 +3466,7 @@ while (!Result && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { HeapFree(GetProcessHeap(), 0, HardwareIDs); - HardwareIDs = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); + HardwareIDs = HeapAlloc(GetProcessHeap(), 0, RequiredSize); if (!HardwareIDs) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -3491,7 +3491,7 @@ while (!Result && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { HeapFree(GetProcessHeap(), 0, CompatibleIDs); - CompatibleIDs = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); + CompatibleIDs = HeapAlloc(GetProcessHeap(), 0, RequiredSize); if (!CompatibleIDs) { SetLastError(ERROR_NOT_ENOUGH_MEMORY);
19 years, 3 months
1
0
0
0
[navaraf] 17604: Check for Request == NULL.
by navaraf@svn.reactos.com
Check for Request == NULL. Modified: trunk/reactos/ntoskrnl/lpc/reply.c _____ Modified: trunk/reactos/ntoskrnl/lpc/reply.c --- trunk/reactos/ntoskrnl/lpc/reply.c 2005-09-02 11:29:40 UTC (rev 17603) +++ trunk/reactos/ntoskrnl/lpc/reply.c 2005-09-02 13:12:44 UTC (rev 17604) @@ -263,6 +263,12 @@ Request = EiDequeueMessagePort(Port); KeReleaseSpinLock(&Port->Lock, oldIrql); + if (Request == NULL) + { + ObDereferenceObject(Port); + return STATUS_UNSUCCESSFUL; + } + if (Request->Message.u2.s2.Type == LPC_CONNECTION_REQUEST) { PORT_MESSAGE Header;
19 years, 3 months
1
0
0
0
[navaraf] 17603: Fix open mode passed to CreateFile in DoSaveFile function. Patch by Johannes Anderwald.
by navaraf@svn.reactos.com
Fix open mode passed to CreateFile in DoSaveFile function. Patch by Johannes Anderwald. Modified: trunk/reactos/subsys/system/notepad/dialog.c _____ Modified: trunk/reactos/subsys/system/notepad/dialog.c --- trunk/reactos/subsys/system/notepad/dialog.c 2005-09-01 23:32:59 UTC (rev 17602) +++ trunk/reactos/subsys/system/notepad/dialog.c 2005-09-02 11:29:40 UTC (rev 17603) @@ -143,7 +143,7 @@ DWORD size; hFile = CreateFile(Globals.szFileName, GENERIC_WRITE, FILE_SHARE_WRITE, - NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(hFile == INVALID_HANDLE_VALUE) { ShowLastError();
19 years, 3 months
1
0
0
0
[blight] 17602: Link against string.a instead of hal and ntoskrnl, otherwise Windows will not load the driver.
by blight@svn.reactos.com
Link against string.a instead of hal and ntoskrnl, otherwise Windows will not load the driver. Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.xml _____ Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.xml --- trunk/reactos/drivers/video/displays/framebuf/framebuf.xml 2005-09-01 21:09:07 UTC (rev 17601) +++ trunk/reactos/drivers/video/displays/framebuf/framebuf.xml 2005-09-01 23:32:59 UTC (rev 17602) @@ -2,9 +2,8 @@ <importlibrary definition="framebuf.def" /> <include base="framebuf">.</include> <define name="__USE_W32API" /> - <library>ntoskrnl</library> - <library>hal</library> <library>win32k</library> + <library>string</library> <file>enable.c</file> <file>palette.c</file> <file>pointer.c</file>
19 years, 3 months
1
0
0
0
← Newer
1
...
55
56
57
58
59
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
Results per page:
10
25
50
100
200