From dba80b614bbe136156f97cbe9d29813b05cfcfba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 29 Dec 2012 20:57:10 +0000 Subject: [PATCH] Sync with trunk revision r58045 to bring the corrections on configure.cmd and on widl/wpp. svn path=/branches/ros-csrss/; revision=58046 --- base/applications/rapps/rapps/abiword28x.txt | 6 +- base/applications/rapps/rapps/bittorrent.txt | 6 +- base/applications/rapps/rapps/fap.txt | 4 +- base/applications/rapps/rapps/firefox5.txt | 24 ++-- base/applications/rapps/rapps/irfanview.txt | 4 +- .../rapps/rapps/irfanviewplugins.txt | 4 +- base/applications/rapps/rapps/libreoffice.txt | 4 +- base/applications/rapps/rapps/mirandaim.txt | 4 +- base/applications/rapps/rapps/mirc.txt | 4 +- base/applications/rapps/rapps/mpc.txt | 4 +- base/applications/rapps/rapps/openttd.txt | 4 +- base/applications/rapps/rapps/opera.txt | 4 +- base/applications/rapps/rapps/rosbe.txt | 6 +- base/applications/rapps/rapps/scite.txt | 4 +- base/applications/rapps/rapps/seamonkey.txt | 36 +++--- base/applications/rapps/rapps/smplayer.txt | 4 +- base/applications/rapps/rapps/sumatrapdf.txt | 6 +- .../applications/rapps/rapps/thunderbird5.txt | 20 +-- base/applications/rapps/rapps/ultravnc.txt | 4 +- base/applications/rapps/rapps/utorrent.txt | 6 +- base/applications/rapps/rapps/vlc.txt | 6 +- configure.cmd | 31 +++-- dll/win32/netapi32/apibuf.c | 15 +-- dll/win32/samsrv/database.c | 8 +- dll/win32/samsrv/samrpc.c | 115 +++++++++++++++++- dll/win32/samsrv/samsrv.h | 3 + include/ddk/ntsam.h | 57 +++++++++ include/reactos/idl/sam.idl | 4 +- win32ss/drivers/videoprt/child.c | 2 +- win32ss/gdi/ntgdi/cliprgn.h | 2 +- win32ss/include/ntuser.h | 51 ++++---- win32ss/user/ntuser/accelerator.c | 10 +- win32ss/user/ntuser/callproc.c | 6 +- win32ss/user/ntuser/class.c | 2 +- win32ss/user/ntuser/clipboard.c | 14 +-- win32ss/user/ntuser/cursoricon.c | 12 +- win32ss/user/ntuser/cursoricon_new.c | 10 +- win32ss/user/ntuser/event.c | 6 +- win32ss/user/ntuser/hook.c | 8 +- win32ss/user/ntuser/kbdlayout.c | 12 +- win32ss/user/ntuser/menu.c | 8 +- win32ss/user/ntuser/monitor.c | 6 +- win32ss/user/ntuser/object.c | 96 +++++++-------- win32ss/user/ntuser/object.h | 12 +- win32ss/user/ntuser/painting.c | 2 +- win32ss/user/ntuser/simplecall.c | 4 +- win32ss/user/ntuser/timer.c | 4 +- win32ss/user/ntuser/win32.h | 2 +- win32ss/user/ntuser/window.c | 10 +- win32ss/user/ntuser/winpos.c | 6 +- win32ss/user/user32/misc/misc.c | 62 +++++----- win32ss/user/user32/windows/menu.c | 4 +- 52 files changed, 466 insertions(+), 282 deletions(-) diff --git a/base/applications/rapps/rapps/abiword28x.txt b/base/applications/rapps/rapps/abiword28x.txt index d7e66b7ec9c..1f5952ce9fb 100644 --- a/base/applications/rapps/rapps/abiword28x.txt +++ b/base/applications/rapps/rapps/abiword28x.txt @@ -2,13 +2,13 @@ [Section] Name = AbiWord -Version = 2.9.2 +Version = 2.9.4 Licence = GPL Description = Word processor. -Size = 9.33MB +Size = 9.4MB Category = 6 URLSite = http://www.abisource.com/ -URLDownload = http://www.abisource.com/downloads/abiword/2.9.2/Windows/abiword-setup-2.9.2.exe +URLDownload = http://www.abisource.com/downloads/abiword/2.9.4/Windows/abiword-setup-2.9.4.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/bittorrent.txt b/base/applications/rapps/rapps/bittorrent.txt index a17000b4bfc..fa7e5f38cc6 100644 --- a/base/applications/rapps/rapps/bittorrent.txt +++ b/base/applications/rapps/rapps/bittorrent.txt @@ -2,13 +2,13 @@ [Section] Name = BitTorrent -Version = 7.7 +Version = 7.7.2 Licence = Freeware for non-commercial uses Description = The Original BitTorrent Client. -Size = 5.78MB +Size = 956KB Category = 5 URLSite = http://www.bittorrent.com/ -URLDownload = http://download.bittorrent.com/7.7/BitTorrent3.exe +URLDownload = http://download.bittorrent.com/7.7.2/BitTorrent.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/fap.txt b/base/applications/rapps/rapps/fap.txt index 46de57f9c3e..3fc27416923 100644 --- a/base/applications/rapps/rapps/fap.txt +++ b/base/applications/rapps/rapps/fap.txt @@ -2,13 +2,13 @@ [Section] Name = Fox Audio Player -Version = 0.9.1 +Version = 0.9.2 Licence = GPL Description = Simple and lightweight audio player. Size = 1.86MB Category = 1 URLSite = http://foxaudioplayer.sourceforge.net/ -URLDownload = http://svn.reactos.org/packages/fap-0.9.1-win32-bin.exe +URLDownload = http://svn.reactos.org/packages/fap-0.9.2-win32-bin.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/firefox5.txt b/base/applications/rapps/rapps/firefox5.txt index 5d235de8bb2..aef55463f0a 100644 --- a/base/applications/rapps/rapps/firefox5.txt +++ b/base/applications/rapps/rapps/firefox5.txt @@ -1,33 +1,33 @@ ; UTF-8 [Section] -Name = Mozilla Firefox 15 -Version = 15.0.1 +Name = Mozilla Firefox 17 +Version = 17.0.1 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 15.8MB Category = 5 URLSite = http://www.mozilla.com/en-US/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/en-US/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/en-US/Firefox%20Setup%2017.0.1.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Webbrowser. Size = 15.7MB URLSite = http://www.mozilla-europe.org/de/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/de/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/de/Firefox%20Setup%2017.0.1.exe [Section.040a] Description = El más popular y uno de los mejores navegadores web gratuitos que hay. Size = 15.6MB URLSite = http://www.mozilla-europe.org/es/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/es-ES/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/es-ES/Firefox%20Setup%2017.0.1.exe [Section.040c] Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs. Size = 15.9MB URLSite = http://www.mozilla-europe.org/fr/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/fr/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/fr/Firefox%20Setup%2017.0.1.exe [Section.0413] Description = De meest populaire en een van de beste gratis Web browsers. @@ -38,34 +38,34 @@ URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/14.0. Description = Mest populære og best også gratis nettleserene der ute. Size = 15.6MB URLSite = http://www.mozilla-europe.org/no/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/nb-NO/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/nb-NO/Firefox%20Setup%2017.0.1.exe [Section.0415] Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych. Size = 16.5MB URLSite = http://www.mozilla-europe.org/pl/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/pl/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/pl/Firefox%20Setup%2017.0.1.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente. Size = 16.1Mo URLSite = http://www.mozilla-europe.org/ro/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/ro/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ro/Firefox%20Setup%2017.0.1.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных браузеров. Size = 16.1MB URLSite = http://www.mozilla-europe.org/ru/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/ru/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ru/Firefox%20Setup%2017.0.1.exe [Section.041b] Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov. Size = 16.3MB URLSite = http://www.mozilla-europe.org/sk/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/sk/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/sk/Firefox%20Setup%2017.0.1.exe [Section.0422] Description = Найпопулярніший та один з кращих безплатних веб-браузерів. Size = 16.1MB URLSite = http://www.mozilla-europe.org/uk/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/15.0.1/win32/uk/Firefox%20Setup%2015.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/uk/Firefox%20Setup%2017.0.1.exe diff --git a/base/applications/rapps/rapps/irfanview.txt b/base/applications/rapps/rapps/irfanview.txt index b5ac214cb03..e19cf9f477c 100644 --- a/base/applications/rapps/rapps/irfanview.txt +++ b/base/applications/rapps/rapps/irfanview.txt @@ -2,13 +2,13 @@ [Section] Name = IrfanView -Version = 4.33 +Version = 4.35 Licence = Freeware (for personal use) Description = Viewer for all kinds of graphics/audio files/video files. Size = 1.46MB Category = 3 URLSite = http://www.irfanview.com/ -URLDownload = http://irfanview.tuwien.ac.at/iview433_setup.exe +URLDownload = http://irfanview.tuwien.ac.at/iview435_setup.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/irfanviewplugins.txt b/base/applications/rapps/rapps/irfanviewplugins.txt index f1071855767..0f84ba779f0 100644 --- a/base/applications/rapps/rapps/irfanviewplugins.txt +++ b/base/applications/rapps/rapps/irfanviewplugins.txt @@ -2,13 +2,13 @@ [Section] Name = IrfanView Plugins -Version = 4.33 +Version = 4.35 Licence = Freeware (for personal use) Description = Additional Plugins for supporting more file types. Size = 8.92MB Category = 3 URLSite = http://www.irfanview.com/ -URLDownload = http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_433_setup.exe +URLDownload = http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_435_setup.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/libreoffice.txt b/base/applications/rapps/rapps/libreoffice.txt index 0717dfd1051..5ee9a4c0710 100644 --- a/base/applications/rapps/rapps/libreoffice.txt +++ b/base/applications/rapps/rapps/libreoffice.txt @@ -2,13 +2,13 @@ [Section] Name = LibreOffice -Version = 3.6.1 +Version = 3.6.4 Licence = LGPL Description = Former called OpenOffice. Open Source Office Suite. Size = 200.0MB Category = 6 URLSite = http://www.documentfoundation.org/ -URLDownload = http://download.documentfoundation.org/libreoffice/stable/3.6.1/win/x86/LibO_3.6.1_Win_x86_install_multi.msi +URLDownload = http://download.documentfoundation.org/libreoffice/stable/3.6.4/win/x86/LibO_3.6.4_Win_x86_install_multi.msi CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mirandaim.txt b/base/applications/rapps/rapps/mirandaim.txt index e6b4733730f..f48489096af 100644 --- a/base/applications/rapps/rapps/mirandaim.txt +++ b/base/applications/rapps/rapps/mirandaim.txt @@ -2,13 +2,13 @@ [Section] Name = Miranda IM -Version = 0.10.2 +Version = 0.10.9 Licence = GPL Description = Open source multiprotocol instant messaging application - May not work completely. Size = 3.1MB Category = 5 URLSite = http://www.miranda-im.org/ -URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.2-unicode.exe +URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.9-unicode.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mirc.txt b/base/applications/rapps/rapps/mirc.txt index fdad9617028..e5a80706ec0 100644 --- a/base/applications/rapps/rapps/mirc.txt +++ b/base/applications/rapps/rapps/mirc.txt @@ -2,13 +2,13 @@ [Section] Name = mIRC 7 -Version = 7.25 +Version = 7.27 Licence = Shareware Description = The most popular client for the Internet Relay Chat (IRC). Size = 1.82MB Category = 5 URLSite = http://www.mirc.com/ -URLDownload = http://download.mirc.com/5/mirc725.exe +URLDownload = http://download.mirc.com/6/mirc727.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mpc.txt b/base/applications/rapps/rapps/mpc.txt index 0134630b561..22958be4be7 100644 --- a/base/applications/rapps/rapps/mpc.txt +++ b/base/applications/rapps/rapps/mpc.txt @@ -2,13 +2,13 @@ [Section] Name = Media Player Classic Home Cinema -Version = 1.6.3.5818 +Version = 1.6.5.6366 Licence = GPL Description = A media player. Size = 7.0MB Category = 1 URLSite = http://mpc-hc.sourceforge.net/ -URLDownload = http://heanet.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.6.3.5818_x86/MPC-HC.1.6.3.5818.x86.exe +URLDownload = http://heanet.dl.sourceforge.netproject/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.6.5.6366_x86/MPC-HC.1.6.5.6366.x86.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/openttd.txt b/base/applications/rapps/rapps/openttd.txt index 3e0b754d6d2..dc7bd11f948 100644 --- a/base/applications/rapps/rapps/openttd.txt +++ b/base/applications/rapps/rapps/openttd.txt @@ -2,13 +2,13 @@ [Section] Name = OpenTTD -Version = 1.2.2 +Version = 1.2.3 Licence = GPL v2 Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon. Size = 4.4MB Category = 4 URLSite = http://www.openttd.org/ -URLDownload = http://binaries.openttd.org/releases/1.2.2/openttd-1.2.2-windows-win32.exe +URLDownload = http://binaries.openttd.org/releases/1.2.3/openttd-1.2.3-windows-win32.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/opera.txt b/base/applications/rapps/rapps/opera.txt index 2a7609f0449..890e9c0956f 100644 --- a/base/applications/rapps/rapps/opera.txt +++ b/base/applications/rapps/rapps/opera.txt @@ -2,13 +2,13 @@ [Section] Name = Opera -Version = 12.02 +Version = 12.12 Licence = Freeware Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client. Size = 12.00MB Category = 5 URLSite = http://www.opera.com/ -URLDownload = http://ftp.opera.com/pub/opera/win/1202/int/Opera_1202_int_Setup.exe +URLDownload = http://ftp.opera.com/pub/opera/win/1212/int/Opera_1212_int_Setup.exe CDPath = none [Section.0405] diff --git a/base/applications/rapps/rapps/rosbe.txt b/base/applications/rapps/rapps/rosbe.txt index 9050c89e95e..f36b537ae3d 100644 --- a/base/applications/rapps/rapps/rosbe.txt +++ b/base/applications/rapps/rapps/rosbe.txt @@ -2,13 +2,13 @@ [Section] Name = ReactOS Build Environment -Version = 2.0 +Version = 2.1 Licence = GPL Description = Allows you to build the ReactOS Source. For more instructions see ReactOS wiki. -Size = 17.8MB +Size = 30.8MB Category = 7 URLSite = http://reactos.org/wiki/Build_Environment -URLDownload = http://heanet.dl.sourceforge.net/project/reactos/RosBE-Windows/i386/2.0/RosBE-2.0.exe +URLDownload = http://heanet.dl.sourceforge.net/project/reactos/RosBE-Windows/i386/2.1/RosBE-2.1.exe CDPath = none [Section.0405] diff --git a/base/applications/rapps/rapps/scite.txt b/base/applications/rapps/rapps/scite.txt index 33fb386caa8..df366ac0d4f 100644 --- a/base/applications/rapps/rapps/scite.txt +++ b/base/applications/rapps/rapps/scite.txt @@ -2,13 +2,13 @@ [Section] Name = SciTE -Version = 3.2.2 +Version = 3.2.3 Licence = Freeware Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. Size = 685kB Category = 7 URLSite = http://www.scintilla.org/ -URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.2/Sc322.exe +URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.3/Sc323.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/seamonkey.txt b/base/applications/rapps/rapps/seamonkey.txt index 08e3647f22a..b04482c4bdc 100644 --- a/base/applications/rapps/rapps/seamonkey.txt +++ b/base/applications/rapps/rapps/seamonkey.txt @@ -2,50 +2,50 @@ [Section] Name = Mozilla SeaMonkey -Version = 2.12 +Version = 2.14.1 Licence = MPL/GPL/LGPL Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need. -Size = 19.0MB +Size = 20.0MB Category = 5 URLSite = http://www.seamonkey-project.org/ -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/en-US/SeaMonkey%20Setup%202.12.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/en-US/SeaMonkey%20Setup%202.14.1.exe CDPath = none [Section.0407] Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen. -Size = 19.0MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/de/SeaMonkey%20Setup%202.12.exe +Size = 20.0MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/de/SeaMonkey%20Setup%202.14.1.exe [Section.040a] Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás. -Size = 18.9MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/es-ES/SeaMonkey%20Setup%202.12.exe +Size = 19.9MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/es-ES/SeaMonkey%20Setup%202.14.1.exe [Section.040c] Description = La suite Mozilla est en vie. Ceci est le seul et l'unique package navigateur, client mail, client chat et composer dont vous aurez besoin. -Size = 19.2MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/fr/SeaMonkey%20Setup%202.12.exe +Size = 20.2MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/fr/SeaMonkey%20Setup%202.14.1.exe [Section.0413] Description = Mozilla Suite bundelt alle applicaties voor het Web: Browser, Mail, Chat, Composer. -Size = 19.6MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.11/win32/nl/SeaMonkey%20Setup%202.11.exe +Size = 20.6MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/nl/SeaMonkey%20Setup%202.14.1.exe [Section.0415] Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz. -Size = 19.8MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/pl/SeaMonkey%20Setup%202.12.exe +Size = 20.8MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/pl/SeaMonkey%20Setup%202.14.1.exe [Section.0418] Description = Suita Mozilla. Acest pachet ce încorporează navigator, poștă electronică, client IRC și editor HTML, acoperind astfel o arie largă de necesități. -Size = 17.59Mo +Size = 20.59Mo [Section.0419] Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор. -Size = 19.5MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/ru/SeaMonkey%20Setup%202.12.exe +Size = 20.5MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe [Section.0422] Description = Продовження Mozilla Suite. Включає в себе браузер, поштовий клієнт, IRC-клієнт та HTML-редактор. -Size = 19.5MB -URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.12/win32/ru/SeaMonkey%20Setup%202.12.exe +Size = 20.5MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe diff --git a/base/applications/rapps/rapps/smplayer.txt b/base/applications/rapps/rapps/smplayer.txt index b25c37ed6a2..d7d8804ac50 100644 --- a/base/applications/rapps/rapps/smplayer.txt +++ b/base/applications/rapps/rapps/smplayer.txt @@ -2,13 +2,13 @@ [Section] Name = SMPlayer -Version = 0.8.0 +Version = 0.8.3 Licence = GPL Description = SMPlayer. Size = 15.7MB Category = 1 URLSite = http://smplayer.sourceforge.net/ -URLDownload = http://freefr.dl.sourceforge.net/project/smplayer/SMPlayer/0.8.0/smplayer-0.8.0-win32.exe +URLDownload = http://freefr.dl.sourceforge.net/project/smplayer/SMPlayer/0.8.3/smplayer-0.8.3-win32.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/sumatrapdf.txt b/base/applications/rapps/rapps/sumatrapdf.txt index 41939896916..597d37cd1e4 100644 --- a/base/applications/rapps/rapps/sumatrapdf.txt +++ b/base/applications/rapps/rapps/sumatrapdf.txt @@ -2,13 +2,13 @@ [Section] Name = SumatraPDF -Version = 2.1.1 +Version = 2.2 Licence = GPLv3 Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box. -Size = 4.2MB +Size = 4.8MB Category = 6 URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html -URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.1.1-install.exe +URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.2-install.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/thunderbird5.txt b/base/applications/rapps/rapps/thunderbird5.txt index 8f3f05fa88a..c3df57d03ec 100644 --- a/base/applications/rapps/rapps/thunderbird5.txt +++ b/base/applications/rapps/rapps/thunderbird5.txt @@ -1,33 +1,33 @@ ; UTF-8 [Section] -Name = Mozilla Thunderbird 15 -Version = 15.0 +Name = Mozilla Thunderbird 17 +Version = 17.0 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Mail Clients out there. Size = 17.6MB Category = 5 URLSite = http://www.mozilla-europe.org/en/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/en-US/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/en-US/Thunderbird%20Setup%2017.0.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Mail-Clients. Size = 17.5MB URLSite = http://www.mozilla-europe.org/de/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/de/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/de/Thunderbird%20Setup%2017.0.exe [Section.040a] Description = El más popular y uno de los mejores clientes mail que hay. Size = 17.4MB URLSite = http://www.mozilla-europe.org/es/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/es-ES/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/es-ES/Thunderbird%20Setup%2017.0.exe [Section.040c] Description = Le plus populaire et l'un des meilleurs clients mail gratuits disponible. Size = 17.8MB URLSite = http://www.mozilla-europe.org/fr/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/fr/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/fr/Thunderbird%20Setup%2017.0.exe [Section.0413] Description = De meest populaire en een van de beste gratis e-mail-programma's. @@ -39,22 +39,22 @@ URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/1 Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty. Size = 18.3MB URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/pl/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/pl/Thunderbird%20Setup%2017.0.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică. Size = 18.0Mo URLSite = http://www.mozilla-europe.org/ro/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/ro/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/ro/Thunderbird%20Setup%2017.0.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных почтовых клиентов. Size = 17.9MB URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/ru/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/ru/Thunderbird%20Setup%2017.0.exe [Section.0422] Description = Найпопулярніший та один з кращих поштових клієнтів. Size = 17.9MB URLSite = http://www.mozillamessaging.com/uk/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/15.0/win32/uk/Thunderbird%20Setup%2015.0.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/uk/Thunderbird%20Setup%2017.0.exe diff --git a/base/applications/rapps/rapps/ultravnc.txt b/base/applications/rapps/rapps/ultravnc.txt index 614cb177a47..9121c28ecb5 100644 --- a/base/applications/rapps/rapps/ultravnc.txt +++ b/base/applications/rapps/rapps/ultravnc.txt @@ -2,13 +2,13 @@ [Section] Name = UltraVNC -Version = 1.0.9.6.2 +Version = 1.1.8.0 Licence = GPL Description = Open-source VNC client/server. Size = 2.19MB Category = 5 URLSite = http://www.uvnc.com/ -URLDownload = http://www.uvnc.eu/download/10962/UltraVNC_1.0.9.6.2_Setup.exe +URLDownload = http://www.uvnc.eu/download/1180/UltraVNC_1_1_8_X86_Setup.exe CDPath = none [Section.040a] diff --git a/base/applications/rapps/rapps/utorrent.txt b/base/applications/rapps/rapps/utorrent.txt index 1ee74872678..2c40d85d54e 100644 --- a/base/applications/rapps/rapps/utorrent.txt +++ b/base/applications/rapps/rapps/utorrent.txt @@ -2,13 +2,13 @@ [Section] Name = µTorrent -Version = 3.2 +Version = 3.2.3 Licence = Freeware for non-commercial uses Description = Small and fast BitTorrent Client. -Size = 874.87kB +Size = 946.00kB Category = 5 URLSite = http://www.utorrent.com/ -URLDownload = http://download.utorrent.com/3.2/uTorrent.exe +URLDownload = http://download.utorrent.com/3.2.3/uTorrent.exe CDPath = none diff --git a/base/applications/rapps/rapps/vlc.txt b/base/applications/rapps/rapps/vlc.txt index 0331cc79b95..21cdb4e8e30 100644 --- a/base/applications/rapps/rapps/vlc.txt +++ b/base/applications/rapps/rapps/vlc.txt @@ -2,13 +2,13 @@ [Section] Name = VLC media player -Version = 2.0.3 +Version = 2.0.5 Licence = GPL Description = A media player. -Size = 21.6MB +Size = 21.9MB Category = 1 URLSite = http://www.videolan.org/vlc/ -URLDownload = http://garr.dl.sourceforge.net/project/vlc/2.0.3/win32/vlc-2.0.3-win32.exe +URLDownload = http://garr.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe CDPath = none [Section.0407] diff --git a/configure.cmd b/configure.cmd index c3fa0a6af13..b4b59087186 100755 --- a/configure.cmd +++ b/configure.cmd @@ -1,5 +1,12 @@ @echo off +:: This is needed so as to avoid static expansion of environment variables +:: inside if (...) conditionals. +:: See http://stackoverflow.com/questions/305605/weird-scope-issue-in-bat-file +:: for more explanation. +:: Precisely needed for configuring Visual Studio Environment. +setlocal enabledelayedexpansion + :: Special case %1 = arm_hosttools %2 = vcvarsall.bat %3 = %CMAKE_GENERATOR% if /I "%1" == "arm_hosttools" ( echo Configuring x86 host tools for ARM cross build @@ -46,7 +53,7 @@ if defined ROS_ARCH ( set USE_WDK_HEADERS=0 ) else if defined VCINSTALLDIR ( - :: VS command prompt does not put this in enviroment vars + :: VS command prompt does not put this in environment vars cl 2>&1 | find "x86" > NUL && set ARCH=i386 cl 2>&1 | find "x64" > NUL && set ARCH=amd64 cl 2>&1 | find "ARM" > NUL && set ARCH=arm @@ -59,30 +66,30 @@ if defined ROS_ARCH ( exit /b ) - echo Detected Visual Studio Environment %BUILD_ENVIRONMENT%-%ARCH% + echo Detected Visual Studio Environment !BUILD_ENVIRONMENT!-!ARCH! if /I "%1" == "VSSolution" ( - if "%BUILD_ENVIRONMENT%" == "VS8" ( - if "%ARCH%" == "amd64" ( + if "!BUILD_ENVIRONMENT!" == "VS8" ( + if "!ARCH!" == "amd64" ( set CMAKE_GENERATOR="Visual Studio 8 2005 Win64" ) else ( set CMAKE_GENERATOR="Visual Studio 8 2005" ) - ) else if "%BUILD_ENVIRONMENT%" == "VS9" ( - if "%ARCH%" == "amd64" ( + ) else if "!BUILD_ENVIRONMENT!" == "VS9" ( + if "!ARCH!" == "amd64" ( set CMAKE_GENERATOR="Visual Studio 9 2008 Win64" ) else ( set CMAKE_GENERATOR="Visual Studio 9 2008" ) - ) else if "%BUILD_ENVIRONMENT%" == "VS10" ( - if "%ARCH%" == "amd64" ( + ) else if "!BUILD_ENVIRONMENT!" == "VS10" ( + if "!ARCH!" == "amd64" ( set CMAKE_GENERATOR="Visual Studio 10 Win64" ) else ( set CMAKE_GENERATOR="Visual Studio 10" ) - ) else if "%BUILD_ENVIRONMENT%" == "VS11" ( - if "%ARCH%" == "amd64" ( + ) else if "!BUILD_ENVIRONMENT!" == "VS11" ( + if "!ARCH!" == "amd64" ( set CMAKE_GENERATOR="Visual Studio 11 Win64" - ) else if "%ARCH%" == "arm" ( + ) else if "!ARCH!" == "arm" ( set CMAKE_GENERATOR="Visual Studio 11 ARM" ) else ( set CMAKE_GENERATOR="Visual Studio 11" @@ -111,7 +118,7 @@ if defined ROS_ARCH ( :: Checkpoint if not defined ARCH ( - echo unknown build architecture + echo Unknown build architecture exit /b ) diff --git a/dll/win32/netapi32/apibuf.c b/dll/win32/netapi32/apibuf.c index 4a241e23a61..2e7ad5118ce 100644 --- a/dll/win32/netapi32/apibuf.c +++ b/dll/win32/netapi32/apibuf.c @@ -54,19 +54,20 @@ NET_API_STATUS WINAPI NetApiBufferReallocate(LPVOID OldBuffer, DWORD NewByteCoun LPVOID* NewBuffer) { TRACE("(%p, %d, %p)\n", OldBuffer, NewByteCount, NewBuffer); - if (NewByteCount) + if (NewByteCount) { if (OldBuffer) *NewBuffer = HeapReAlloc(GetProcessHeap(), 0, OldBuffer, NewByteCount); else *NewBuffer = HeapAlloc(GetProcessHeap(), 0, NewByteCount); - return *NewBuffer ? NERR_Success : GetLastError(); - } - else + return *NewBuffer ? NERR_Success : GetLastError(); + } + else { - if (!HeapFree(GetProcessHeap(), 0, OldBuffer)) return GetLastError(); - *NewBuffer = 0; - return NERR_Success; + if (!HeapFree(GetProcessHeap(), 0, OldBuffer)) + return GetLastError(); + *NewBuffer = 0; + return NERR_Success; } } diff --git a/dll/win32/samsrv/database.c b/dll/win32/samsrv/database.c index 95811fb14b9..59b99697dad 100644 --- a/dll/win32/samsrv/database.c +++ b/dll/win32/samsrv/database.c @@ -97,6 +97,7 @@ NTSTATUS SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, + IN ULONG RelativeId, IN SAM_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *DbObject) @@ -223,7 +224,7 @@ SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->Name = RtlAllocateHeap(RtlGetProcessHeap(), 0, (wcslen(ObjectName) + 1) * sizeof(WCHAR)); - if (NewObject == NULL) + if (NewObject->Name == NULL) { if (MembersKeyHandle != NULL) NtClose(MembersKeyHandle); @@ -240,6 +241,7 @@ SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->Access = DesiredAccess; NewObject->KeyHandle = ObjectKeyHandle; NewObject->MembersKeyHandle = MembersKeyHandle; + NewObject->RelativeId = RelativeId; NewObject->ParentObject = ParentObject; if (ParentObject != NULL) @@ -255,6 +257,7 @@ NTSTATUS SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, + IN ULONG RelativeId, IN SAM_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *DbObject) @@ -374,7 +377,7 @@ SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->Name = RtlAllocateHeap(RtlGetProcessHeap(), 0, (wcslen(ObjectName) + 1) * sizeof(WCHAR)); - if (NewObject == NULL) + if (NewObject->Name == NULL) { if (MembersKeyHandle != NULL) NtClose(MembersKeyHandle); @@ -390,6 +393,7 @@ SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->Access = DesiredAccess; NewObject->KeyHandle = ObjectKeyHandle; NewObject->MembersKeyHandle = MembersKeyHandle; + NewObject->RelativeId = RelativeId; NewObject->ParentObject = ParentObject; if (ParentObject != NULL) diff --git a/dll/win32/samsrv/samrpc.c b/dll/win32/samsrv/samrpc.c index 68b886a7e11..edb6dc2ce4f 100644 --- a/dll/win32/samsrv/samrpc.c +++ b/dll/win32/samsrv/samrpc.c @@ -88,6 +88,7 @@ SamrConnect(IN PSAMPR_SERVER_NAME ServerName, Status = SampOpenDbObject(NULL, NULL, L"SAM", + 0, SamDbServerObject, DesiredAccess, &ServerObject); @@ -469,6 +470,7 @@ done: return Status; } + /* Function 7 */ NTSTATUS NTAPI @@ -508,6 +510,7 @@ SamrOpenDomain(IN SAMPR_HANDLE ServerHandle, Status = SampOpenDbObject(ServerObject, L"Domains", L"Builtin", + 0, SamDbDomainObject, DesiredAccess, &DomainObject); @@ -523,6 +526,7 @@ SamrOpenDomain(IN SAMPR_HANDLE ServerHandle, Status = SampOpenDbObject(ServerObject, L"Domains", L"Account", + 0, SamDbDomainObject, DesiredAccess, &DomainObject); @@ -589,6 +593,45 @@ done: } +static NTSTATUS +SampGetNumberOfAccounts(PSAM_DB_OBJECT DomainObject, + LPCWSTR AccountType, + PULONG Count) +{ + HANDLE AccountKeyHandle = NULL; + HANDLE NamesKeyHandle = NULL; + NTSTATUS Status; + + *Count = 0; + + Status = SampRegOpenKey(DomainObject->KeyHandle, + AccountType, + KEY_READ, + &AccountKeyHandle); + if (!NT_SUCCESS(Status)) + return Status; + + Status = SampRegOpenKey(AccountKeyHandle, + L"Names", + KEY_READ, + &NamesKeyHandle); + if (!NT_SUCCESS(Status)) + goto done; + + Status = SampRegQueryKeyInfo(NamesKeyHandle, + NULL, + Count); +done: + if (NamesKeyHandle != NULL) + SampRegCloseKey(NamesKeyHandle); + + if (AccountKeyHandle != NULL) + SampRegCloseKey(AccountKeyHandle); + + return Status; +} + + static NTSTATUS SampQueryDomainGeneral(PSAM_DB_OBJECT DomainObject, PSAMPR_DOMAIN_INFO_BUFFER *Buffer) @@ -651,9 +694,35 @@ SampQueryDomainGeneral(PSAM_DB_OBJECT DomainObject, goto done; } - InfoBuffer->General.UserCount = 0; /* FIXME */ - InfoBuffer->General.GroupCount = 0; /* FIXME */ - InfoBuffer->General.AliasCount = 0; /* FIXME */ + /* Get the number of Users in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Users", + &InfoBuffer->General.UserCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + + /* Get the number of Groups in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Groups", + &InfoBuffer->General.GroupCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + + /* Get the number of Aliases in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Aliases", + &InfoBuffer->General.AliasCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } *Buffer = InfoBuffer; @@ -1036,9 +1105,35 @@ SampQueryDomainGeneral2(PSAM_DB_OBJECT DomainObject, goto done; } - InfoBuffer->General2.I1.UserCount = 0; /* FIXME */ - InfoBuffer->General2.I1.GroupCount = 0; /* FIXME */ - InfoBuffer->General2.I1.AliasCount = 0; /* FIXME */ + /* Get the number of Users in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Users", + &InfoBuffer->General2.I1.UserCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + + /* Get the number of Groups in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Groups", + &InfoBuffer->General2.I1.GroupCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + + /* Get the number of Aliases in the Domain */ + Status = SampGetNumberOfAccounts(DomainObject, + L"Aliases", + &InfoBuffer->General2.I1.AliasCount); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } *Buffer = InfoBuffer; @@ -1535,6 +1630,7 @@ SamrSetInformationDomain(IN SAMPR_HANDLE DomainHandle, return Status; } + /* Function 10 */ NTSTATUS NTAPI @@ -1616,6 +1712,7 @@ SamrCreateGroupInDomain(IN SAMPR_HANDLE DomainHandle, Status = SampCreateDbObject(DomainObject, L"Groups", szRid, + ulRid, SamDbGroupObject, DesiredAccess, &GroupObject); @@ -1981,6 +2078,7 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle, Status = SampCreateDbObject(DomainObject, L"Users", szRid, + ulRid, SamDbUserObject, DesiredAccess, &UserObject); @@ -2434,6 +2532,7 @@ SamrCreateAliasInDomain(IN SAMPR_HANDLE DomainHandle, Status = SampCreateDbObject(DomainObject, L"Aliases", szRid, + ulRid, SamDbAliasObject, DesiredAccess, &AliasObject); @@ -3371,6 +3470,7 @@ SamrOpenGroup(IN SAMPR_HANDLE DomainHandle, Status = SampOpenDbObject(DomainObject, L"Groups", szRid, + GroupId, SamDbGroupObject, DesiredAccess, &GroupObject); @@ -3818,6 +3918,7 @@ SamrOpenAlias(IN SAMPR_HANDLE DomainHandle, Status = SampOpenDbObject(DomainObject, L"Aliases", szRid, + AliasId, SamDbAliasObject, DesiredAccess, &AliasObject); @@ -4482,6 +4583,7 @@ SamrOpenUser(IN SAMPR_HANDLE DomainHandle, Status = SampOpenDbObject(DomainObject, L"Users", szRid, + UserId, SamDbUserObject, DesiredAccess, &UserObject); @@ -6242,6 +6344,7 @@ SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle, Status = SampCreateDbObject(DomainObject, L"Users", szRid, + ulRid, SamDbUserObject, DesiredAccess, &UserObject); diff --git a/dll/win32/samsrv/samsrv.h b/dll/win32/samsrv/samsrv.h index c7e54add732..609a4029bd7 100644 --- a/dll/win32/samsrv/samsrv.h +++ b/dll/win32/samsrv/samsrv.h @@ -46,6 +46,7 @@ typedef struct _SAM_DB_OBJECT LPWSTR Name; HANDLE KeyHandle; HANDLE MembersKeyHandle; // only used by Aliases and Groups + ULONG RelativeId; struct _SAM_DB_OBJECT *ParentObject; } SAM_DB_OBJECT, *PSAM_DB_OBJECT; @@ -117,6 +118,7 @@ NTSTATUS SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, + IN ULONG RelativeId, IN SAM_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *DbObject); @@ -125,6 +127,7 @@ NTSTATUS SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, + IN ULONG RelativeId, IN SAM_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *DbObject); diff --git a/include/ddk/ntsam.h b/include/ddk/ntsam.h index 9a8c3a185b2..ba0771ec9ff 100644 --- a/include/ddk/ntsam.h +++ b/include/ddk/ntsam.h @@ -262,11 +262,68 @@ typedef enum _DOMAIN_SERVER_ROLE DomainServerRolePrimary } DOMAIN_SERVER_ROLE, *PDOMAIN_SERVER_ROLE; +#include "pshpack4.h" +typedef struct _DOMAIN_GENERAL_INFORMATION +{ + LARGE_INTEGER ForceLogoff; + UNICODE_STRING OemInformation; + UNICODE_STRING DomainName; + UNICODE_STRING ReplicaSourceNodeName; + LARGE_INTEGER DomainModifiedCount; + DOMAIN_SERVER_ENABLE_STATE DomainServerState; + DOMAIN_SERVER_ROLE DomainServerRole; + BOOLEAN UasCompatibilityRequired; + ULONG UserCount; + ULONG GroupCount; + ULONG AliasCount; +} DOMAIN_GENERAL_INFORMATION, *PDOMAIN_GENERAL_INFORMATION; +#include "poppack.h" + +typedef struct _DOMAIN_LOGOFF_INFORMATION +{ + LARGE_INTEGER ForceLogoff; +} DOMAIN_LOGOFF_INFORMATION, *PDOMAIN_LOGOFF_INFORMATION; + +typedef struct _DOMAIN_OEM_INFORMATION +{ + UNICODE_STRING OemInformation; +} DOMAIN_OEM_INFORMATION, *PDOMAIN_OEM_INFORMATION; + typedef struct _DOMAIN_NAME_INFORMATION { UNICODE_STRING DomainName; } DOMAIN_NAME_INFORMATION, *PDOMAIN_NAME_INFORMATION; +typedef struct _DOMAIN_REPLICATION_INFORMATION +{ + UNICODE_STRING ReplicaSourceNodeName; +} DOMAIN_REPLICATION_INFORMATION, *PDOMAIN_REPLICATION_INFORMATION; + +typedef struct _DOMAIN_SERVER_ROLE_INFORMATION +{ + DOMAIN_SERVER_ROLE DomainServerRole; +} DOMAIN_SERVER_ROLE_INFORMATION, *PDOMAIN_SERVER_ROLE_INFORMATION; + +typedef struct _DOMAIN_STATE_INFORMATION +{ + DOMAIN_SERVER_ENABLE_STATE DomainServerState; +} DOMAIN_STATE_INFORMATION, *PDOMAIN_STATE_INFORMATION; + +typedef struct _DOMAIN_UAS_INFORMATION +{ + BOOLEAN UasCompatibilityRequired; +} DOMAIN_UAS_INFORMATION; + +#include "pshpack4.h" +typedef struct _DOMAIN_GENERAL_INFORMATION2 +{ + DOMAIN_GENERAL_INFORMATION I1; + LARGE_INTEGER LockoutDuration; + LARGE_INTEGER LockoutObservationWindow; + USHORT LockoutThreshold; +} DOMAIN_GENERAL_INFORMATION2, *PDOMAIN_GENERAL_INFORMATION2; +#include "poppack.h" + typedef enum _GROUP_INFORMATION_CLASS { GroupGeneralInformation = 1, diff --git a/include/reactos/idl/sam.idl b/include/reactos/idl/sam.idl index dbecb57ec2a..6bfdaa97f62 100644 --- a/include/reactos/idl/sam.idl +++ b/include/reactos/idl/sam.idl @@ -143,12 +143,12 @@ typedef enum _DOMAIN_SERVER_ENABLE_STATE DomainServerEnabled = 1, DomainServerDisabled } DOMAIN_SERVER_ENABLE_STATE, *PDOMAIN_SERVER_ENABLE_STATE; -cpp_quote("#endif") typedef struct _DOMAIN_STATE_INFORMATION { DOMAIN_SERVER_ENABLE_STATE DomainServerState; } DOMAIN_STATE_INFORMATION, *PDOMAIN_STATE_INFORMATION; +cpp_quote("#endif") cpp_quote("#ifndef _NTSAM_") typedef enum _DOMAIN_SERVER_ROLE @@ -169,6 +169,7 @@ typedef struct _DOMAIN_PASSWORD_INFORMATION } DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION; cpp_quote("#endif") +cpp_quote("#ifndef _NTSAM_") typedef struct _DOMAIN_LOGOFF_INFORMATION { OLD_LARGE_INTEGER ForceLogoff; @@ -178,6 +179,7 @@ typedef struct _DOMAIN_SERVER_ROLE_INFORMATION { DOMAIN_SERVER_ROLE DomainServerRole; } DOMAIN_SERVER_ROLE_INFORMATION, *PDOMAIN_SERVER_ROLE_INFORMATION; +cpp_quote("#endif") typedef struct _DOMAIN_MODIFIED_INFORMATION { diff --git a/win32ss/drivers/videoprt/child.c b/win32ss/drivers/videoprt/child.c index 4bdc34de1fb..e6a35e996ac 100644 --- a/win32ss/drivers/videoprt/child.c +++ b/win32ss/drivers/videoprt/child.c @@ -393,4 +393,4 @@ IntVideoPortDispatchPdoPnp( IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; -} \ No newline at end of file +} diff --git a/win32ss/gdi/ntgdi/cliprgn.h b/win32ss/gdi/ntgdi/cliprgn.h index 5ee4ba6a1d2..b16039292b4 100644 --- a/win32ss/gdi/ntgdi/cliprgn.h +++ b/win32ss/gdi/ntgdi/cliprgn.h @@ -3,4 +3,4 @@ INT FASTCALL GdiGetClipBox(HDC hDC, RECTL *rc); INT FASTCALL GdiSelectVisRgn(HDC hdc, HRGN hrgn); INT FASTCALL GdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode); -int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc); \ No newline at end of file +int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc); diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index 77dce0ed0eb..be749e2cc3f 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -33,32 +33,33 @@ typedef struct _USER_HANDLE_TABLE int allocated_handles; } USER_HANDLE_TABLE, * PUSER_HANDLE_TABLE; -typedef enum _USER_OBJECT_TYPE +typedef enum _HANDLE_TYPE { - otFree = 0, - otWindow, - otMenu, - otCursorIcon, - otSMWP, - otHook, - otClipBoardData, - otCallProc, - otAccel, - otDDEaccess, - otDDEconv, - otDDExact, - otMonitor, - otKBDlayout, - otKBDfile, - otEvent, - otTimer, - otInputContext, - otHidData, - otDeviceInfo, - otTouchInput, - otGestureInfo, - USER_HANDLE_TYPE_COUNT -} USER_OBJECT_TYPE; + TYPE_FREE = 0, + TYPE_WINDOW = 1, + TYPE_MENU = 2, + TYPE_CURSOR = 3, + TYPE_SETWINDOWPOS = 4, + TYPE_HOOK = 5, + TYPE_CLIPDATA = 6, + TYPE_CALLPROC = 7, + TYPE_ACCELTABLE = 8, + TYPE_DDEACCESS = 9, + TYPE_DDECONV = 10, + TYPE_DDEXACT = 11, + TYPE_MONITOR = 12, + TYPE_KBDLAYOUT = 13, + TYPE_KBDFILE = 14, + TYPE_WINEVENTHOOK = 15, + TYPE_TIMER = 16, + TYPE_INPUTCONTEXT = 17, + TYPE_HIDDATA = 18, + TYPE_DEVICEINFO = 19, + TYPE_TOUCHINPUTINFO = 20, + TYPE_GESTUREINFOOBJ = 21, + TYPE_CTYPES, + TYPE_GENERIC = 255 +} HANDLE_TYPE, *PHANDLE_TYPE; typedef enum _USERTHREADINFOCLASS { diff --git a/win32ss/user/ntuser/accelerator.c b/win32ss/user/ntuser/accelerator.c index 24d1b61400b..4c88bfab859 100644 --- a/win32ss/user/ntuser/accelerator.c +++ b/win32ss/user/ntuser/accelerator.c @@ -28,7 +28,7 @@ PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel) return NULL; } - Accel = UserGetObject(gHandleTable, hAccel, otAccel); + Accel = UserGetObject(gHandleTable, hAccel, TYPE_ACCELTABLE); if (!Accel) { EngSetLastError(ERROR_INVALID_ACCEL_HANDLE); @@ -257,7 +257,7 @@ NtUserCreateAcceleratorTable( RETURN( (HACCEL) NULL ); } - Accel = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&hAccel, otAccel, sizeof(ACCELERATOR_TABLE)); + Accel = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&hAccel, TYPE_ACCELTABLE, sizeof(ACCELERATOR_TABLE)); if (Accel == NULL) { @@ -270,7 +270,7 @@ NtUserCreateAcceleratorTable( if (Accel->Table == NULL) { UserDereferenceObject(Accel); - UserDeleteObject(hAccel, otAccel); + UserDeleteObject(hAccel, TYPE_ACCELTABLE); SetLastNtError(STATUS_NO_MEMORY); RETURN( (HACCEL) NULL); } @@ -308,7 +308,7 @@ NtUserCreateAcceleratorTable( { ExFreePoolWithTag(Accel->Table, USERTAG_ACCEL); UserDereferenceObject(Accel); - UserDeleteObject(hAccel, otAccel); + UserDeleteObject(hAccel, TYPE_ACCELTABLE); SetLastNtError(Status); RETURN( (HACCEL) NULL); } @@ -351,7 +351,7 @@ NtUserDestroyAcceleratorTable( Accel->Table = NULL; } - UserDeleteObject(hAccel, otAccel); + UserDeleteObject(hAccel, TYPE_ACCELTABLE); RETURN( TRUE); diff --git a/win32ss/user/ntuser/callproc.c b/win32ss/user/ntuser/callproc.c index 815cee50d81..a1b6356261b 100644 --- a/win32ss/user/ntuser/callproc.c +++ b/win32ss/user/ntuser/callproc.c @@ -21,7 +21,7 @@ VOID DestroyCallProc(IN PDESKTOPINFO Desktop, IN OUT PCALLPROCDATA CallProc) { - UserDeleteObject(UserHMGetHandle(CallProc), otCallProc); + UserDeleteObject(UserHMGetHandle(CallProc), TYPE_CALLPROC); } PCALLPROCDATA @@ -37,7 +37,7 @@ CreateCallProc(IN PDESKTOP Desktop, Desktop, NULL, &Handle, - otCallProc, + TYPE_CALLPROC, sizeof(CALLPROCDATA)); if (NewCallProc != NULL) { @@ -60,7 +60,7 @@ UserGetCallProcInfo(IN HANDLE hCallProc, CallProc = UserGetObject(gHandleTable, hCallProc, - otCallProc); + TYPE_CALLPROC); if (CallProc == NULL) { return FALSE; diff --git a/win32ss/user/ntuser/class.c b/win32ss/user/ntuser/class.c index a71b88982c2..9a980ce1107 100644 --- a/win32ss/user/ntuser/class.c +++ b/win32ss/user/ntuser/class.c @@ -462,7 +462,7 @@ IntSetClassWndProc(IN OUT PCLS Class, // Check if CallProc handle and retrieve previous call proc address and set. if (IsCallProcHandle(WndProc)) { - pcpd = UserGetObject(gHandleTable, WndProc, otCallProc); + pcpd = UserGetObject(gHandleTable, WndProc, TYPE_CALLPROC); if (pcpd) chWndProc = pcpd->pfnClientPrevious; } diff --git a/win32ss/user/ntuser/clipboard.c b/win32ss/user/ntuser/clipboard.c index 64b204e8eb3..28bb21325c2 100644 --- a/win32ss/user/ntuser/clipboard.c +++ b/win32ss/user/ntuser/clipboard.c @@ -58,7 +58,7 @@ IntFreeElementData(PCLIP pElement) !IS_DATA_SYNTHESIZED(pElement)) { if (pElement->fGlobalHandle) - UserDeleteObject(pElement->hData, otClipBoardData); + UserDeleteObject(pElement->hData, TYPE_CLIPDATA); else if (pElement->fmt == CF_BITMAP || pElement->fmt == CF_PALETTE || pElement->fmt == CF_DSPBITMAP) { @@ -184,7 +184,7 @@ IntSynthesizeDib( NULL, NULL, &hMem, - otClipBoardData, + TYPE_CLIPDATA, cjDataSize); if (!pClipboardData) { @@ -235,7 +235,7 @@ IntSynthesizeBitmap(PWINSTATION_OBJECT pWinStaObj, PCLIP pBmEl) if(!pDibEl->fGlobalHandle) return; - pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, pDibEl->hData, otClipBoardData); + pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, pDibEl->hData, TYPE_CLIPDATA); if (!pMemObj) return; @@ -297,7 +297,7 @@ IntAddSynthesizedFormats(PWINSTATION_OBJECT pWinStaObj) PCLIPBOARDDATA pMemObj; HANDLE hMem; - pMemObj = (PCLIPBOARDDATA)UserCreateObject(gHandleTable, NULL, NULL, &hMem, otClipBoardData, + pMemObj = (PCLIPBOARDDATA)UserCreateObject(gHandleTable, NULL, NULL, &hMem, TYPE_CLIPDATA, sizeof(CLIPBOARDDATA) + sizeof(LCID)); if (pMemObj) { @@ -1087,7 +1087,7 @@ NtUserConvertMemHandle( UserEnterExclusive(); /* Create Clipboard data object */ - pMemObj = UserCreateObject(gHandleTable, NULL, NULL, &hMem, otClipBoardData, sizeof(CLIPBOARDDATA) + cbData); + pMemObj = UserCreateObject(gHandleTable, NULL, NULL, &hMem, TYPE_CLIPDATA, sizeof(CLIPBOARDDATA) + cbData); if (!pMemObj) goto cleanup; @@ -1111,7 +1111,7 @@ NtUserConvertMemHandle( /* If we failed to copy data, remove handle */ if (!pMemObj) { - UserDeleteObject(hMem, otClipBoardData); + UserDeleteObject(hMem, TYPE_CLIPDATA); hMem = NULL; } @@ -1134,7 +1134,7 @@ NtUserCreateLocalMemHandle( UserEnterShared(); /* Get Clipboard data object */ - pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, hMem, otClipBoardData); + pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, hMem, TYPE_CLIPDATA); if (!pMemObj) { Status = STATUS_INVALID_HANDLE; diff --git a/win32ss/user/ntuser/cursoricon.c b/win32ss/user/ntuser/cursoricon.c index 04431d78635..a4dbce0f021 100644 --- a/win32ss/user/ntuser/cursoricon.c +++ b/win32ss/user/ntuser/cursoricon.c @@ -77,7 +77,7 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon) return NULL; } - CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, otCursorIcon); + CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, TYPE_CURSOR); if (!CurIcon) { /* We never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */ @@ -178,7 +178,7 @@ IntFindExistingCurIconObject(HMODULE hModule, LIST_FOR_EACH(CurIcon, &gCurIconList, CURICON_OBJECT, ListEntry) { - // if (NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon))) // <- huh???? + // if (NT_SUCCESS(UserReferenceObjectByPointer(Object, TYPE_CURSOR))) // <- huh???? // UserReferenceObject( CurIcon); // { if ((CurIcon->hModule == hModule) && (CurIcon->hRsrc == hRsrc)) @@ -209,7 +209,7 @@ IntCreateCurIconHandle(DWORD dwNumber) PCURICON_OBJECT CurIcon; HANDLE hCurIcon; - CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, otCursorIcon, sizeof(CURICON_OBJECT)); + CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, TYPE_CURSOR, sizeof(CURICON_OBJECT)); if (!CurIcon) { @@ -223,7 +223,7 @@ IntCreateCurIconHandle(DWORD dwNumber) if (! ReferenceCurIconByProcess(CurIcon)) { ERR("Failed to add process\n"); - UserDeleteObject(hCurIcon, otCursorIcon); + UserDeleteObject(hCurIcon, TYPE_CURSOR); UserDereferenceObject(CurIcon); return NULL; } @@ -273,7 +273,7 @@ IntDestroyCurIconObject(PCURICON_OBJECT CurIcon, PPROCESSINFO ppi) { /* Set the first process of the list as owner */ Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS, ListEntry); - UserSetObjectOwner(CurIcon, otCursorIcon, Current->Process); + UserSetObjectOwner(CurIcon, TYPE_CURSOR, Current->Process); } UserDereferenceObject(CurIcon); return TRUE; @@ -310,7 +310,7 @@ emptyList: /* We were given a pointer, no need to keep the reference anylonger! */ UserDereferenceObject(CurIcon); - Ret = UserDeleteObject(CurIcon->Self, otCursorIcon); + Ret = UserDeleteObject(CurIcon->Self, TYPE_CURSOR); return Ret; } diff --git a/win32ss/user/ntuser/cursoricon_new.c b/win32ss/user/ntuser/cursoricon_new.c index c80df050dd8..c481eb56653 100644 --- a/win32ss/user/ntuser/cursoricon_new.c +++ b/win32ss/user/ntuser/cursoricon_new.c @@ -84,7 +84,7 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon) return NULL; } - CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, otCursorIcon); + CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, TYPE_CURSOR); if (!CurIcon) { /* We never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */ @@ -229,7 +229,7 @@ IntCreateCurIconHandle(DWORD dwNumber) if(dwNumber == 0) dwNumber = 1; - CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, otCursorIcon, sizeof(CURICON_OBJECT)); + CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, TYPE_CURSOR, sizeof(CURICON_OBJECT)); if (!CurIcon) { @@ -244,7 +244,7 @@ IntCreateCurIconHandle(DWORD dwNumber) { ERR("Failed to add process\n"); UserDereferenceObject(CurIcon); - UserDeleteObject(hCurIcon, otCursorIcon); + UserDeleteObject(hCurIcon, TYPE_CURSOR); return NULL; } @@ -309,7 +309,7 @@ IntDestroyCurIconObject(PCURICON_OBJECT CurIcon, PPROCESSINFO ppi, BOOLEAN bForc { /* Set the first process of the list as owner */ Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS, ListEntry); - UserSetObjectOwner(CurIcon, otCursorIcon, Current->Process); + UserSetObjectOwner(CurIcon, TYPE_CURSOR, Current->Process); } UserDereferenceObject(CurIcon); return TRUE; @@ -350,7 +350,7 @@ emptyList: /* We were given a pointer, no need to keep the reference anylonger! */ UserDereferenceObject(CurIcon); - Ret = UserDeleteObject(CurIcon->Self, otCursorIcon); + Ret = UserDeleteObject(CurIcon->Self, TYPE_CURSOR); return Ret; } diff --git a/win32ss/user/ntuser/event.c b/win32ss/user/ntuser/event.c index 964119cb53d..6a8ed663892 100644 --- a/win32ss/user/ntuser/event.c +++ b/win32ss/user/ntuser/event.c @@ -141,7 +141,7 @@ IntRemoveEvent(PEVENTHOOK pEH) RemoveEntryList(&pEH->Chain); GlobalEvents->Counts--; if (!GlobalEvents->Counts) gpsi->dwInstalledEventHooks = 0; - UserDeleteObject(UserHMGetHandle(pEH), otEvent); + UserDeleteObject(UserHMGetHandle(pEH), TYPE_WINEVENTHOOK); KeLeaveCriticalRegion(); return TRUE; } @@ -378,7 +378,7 @@ NtUserSetWinEventHook( } } // Creator, pti is set here. - pEH = UserCreateObject(gHandleTable, NULL, NULL, &Handle, otEvent, sizeof(EVENTHOOK)); + pEH = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_WINEVENTHOOK, sizeof(EVENTHOOK)); if (pEH) { InsertTailList(&GlobalEvents->Events, &pEH->Chain); @@ -428,7 +428,7 @@ NtUserUnhookWinEvent( UserEnterExclusive(); - pEH = (PEVENTHOOK)UserGetObject(gHandleTable, hWinEventHook, otEvent); + pEH = (PEVENTHOOK)UserGetObject(gHandleTable, hWinEventHook, TYPE_WINEVENTHOOK); if (pEH) { Ret = IntRemoveEvent(pEH); diff --git a/win32ss/user/ntuser/hook.c b/win32ss/user/ntuser/hook.c index cc224003f78..a119c11743f 100644 --- a/win32ss/user/ntuser/hook.c +++ b/win32ss/user/ntuser/hook.c @@ -937,7 +937,7 @@ IntGetHookObject(HHOOK hHook) return NULL; } - Hook = (PHOOK)UserGetObject(gHandleTable, hHook, otHook); + Hook = (PHOOK)UserGetObject(gHandleTable, hHook, TYPE_HOOK); if (!Hook) { EngSetLastError(ERROR_INVALID_HOOK_HANDLE); @@ -1020,7 +1020,7 @@ IntFreeHook(PHOOK Hook) Hook->ModuleName.Buffer = NULL; } /* Close handle */ - UserDeleteObject(UserHMGetHandle(Hook), otHook); + UserDeleteObject(UserHMGetHandle(Hook), TYPE_HOOK); } /* Remove a hook, freeing it from the chain */ @@ -1270,7 +1270,7 @@ co_HOOK_CallHooks( INT HookId, */ for(i = 0; pHookHandles[i]; ++i) { - Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], otHook); + Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], TYPE_HOOK); if(!Hook) { ERR("Invalid hook!\n"); @@ -1571,7 +1571,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, } ObDereferenceObject(WinStaObj); - Hook = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&Handle, otHook, sizeof(HOOK)); + Hook = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&Handle, TYPE_HOOK, sizeof(HOOK)); if (!Hook) { diff --git a/win32ss/user/ntuser/kbdlayout.c b/win32ss/user/ntuser/kbdlayout.c index a04c9627f86..a6d20c555fd 100644 --- a/win32ss/user/ntuser/kbdlayout.c +++ b/win32ss/user/ntuser/kbdlayout.c @@ -131,7 +131,7 @@ UserLoadKbdFile(PUNICODE_STRING pwszKLID) L"Control\\Keyboard Layouts\\"; /* Create keyboard layout file object */ - pkf = UserCreateObject(gHandleTable, NULL, NULL, NULL, otKBDfile, sizeof(KBDFILE)); + pkf = UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_KBDFILE, sizeof(KBDFILE)); if (!pkf) { ERR("Failed to create object!\n"); @@ -187,7 +187,7 @@ cleanup: { /* We have failed - destroy created object */ if (pkf) - UserDeleteObject(pkf->head.h, otKBDfile); + UserDeleteObject(pkf->head.h, TYPE_KBDFILE); } return pRet; @@ -206,7 +206,7 @@ UserLoadKbdLayout(PUNICODE_STRING pwszKLID, HKL hKL) PKL pKl; /* Create keyboard layout object */ - pKl = UserCreateObject(gHandleTable, NULL, NULL, NULL, otKBDlayout, sizeof(KL)); + pKl = UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_KBDLAYOUT, sizeof(KL)); if (!pKl) { ERR("Failed to create object!\n"); @@ -223,7 +223,7 @@ UserLoadKbdLayout(PUNICODE_STRING pwszKLID, HKL hKL) if (!pKl->spkf) { ERR("UserLoadKbdFile(%wZ) failed!\n", pwszKLID); - UserDeleteObject(pKl->head.h, otKBDlayout); + UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT); return NULL; } @@ -272,7 +272,7 @@ UnloadKbdFile(_In_ PKBDFILE pkf) *ppkfLink = pkf->pkfNext; EngUnloadImage(pkf->hBase); - UserDeleteObject(pkf->head.h, otKBDfile); + UserDeleteObject(pkf->head.h, TYPE_KBDFILE); } /* @@ -308,7 +308,7 @@ UserUnloadKbl(PKL pKl) pKl->pklPrev->pklNext = pKl->pklNext; pKl->pklNext->pklPrev = pKl->pklPrev; UnloadKbdFile(pKl->spkf); - UserDeleteObject(pKl->head.h, otKBDlayout); + UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT); return TRUE; } diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 2db3ef781a0..bcec29d5e5f 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -63,7 +63,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu) return NULL; } - Menu = (PMENU_OBJECT)UserGetObject(gHandleTable, hMenu, otMenu); + Menu = (PMENU_OBJECT)UserGetObject(gHandleTable, hMenu, TYPE_MENU); if (!Menu) { EngSetLastError(ERROR_INVALID_MENU_HANDLE); @@ -234,7 +234,7 @@ IntDestroyMenuObject(PMENU_OBJECT Menu, } } // UserDereferenceObject(Menu); - ret = UserDeleteObject(Menu->MenuInfo.Self, otMenu); + ret = UserDeleteObject(Menu->MenuInfo.Self, TYPE_MENU); ObDereferenceObject(WindowStation); return ret; } @@ -252,7 +252,7 @@ IntCreateMenu(PHANDLE Handle, BOOL IsMenuBar) NULL, NULL, Handle, - otMenu, + TYPE_MENU, sizeof(MENU_OBJECT)); if(!Menu) { @@ -364,7 +364,7 @@ IntCloneMenu(PMENU_OBJECT Source) NULL, NULL, &hMenu, - otMenu, + TYPE_MENU, sizeof(MENU_OBJECT)); if(!Menu) return NULL; diff --git a/win32ss/user/ntuser/monitor.c b/win32ss/user/ntuser/monitor.c index aa5cedc19e8..b0e4aa6ec9f 100644 --- a/win32ss/user/ntuser/monitor.c +++ b/win32ss/user/ntuser/monitor.c @@ -32,7 +32,7 @@ static PMONITOR IntCreateMonitorObject() { - return UserCreateObject(gHandleTable, NULL, NULL, NULL, otMonitor, sizeof(MONITOR)); + return UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_MONITOR, sizeof(MONITOR)); } /* IntDestroyMonitorObject @@ -58,7 +58,7 @@ IntDestroyMonitorObject(IN PMONITOR pMonitor) /* Destroy monitor object */ UserDereferenceObject(pMonitor); - UserDeleteObject(UserHMGetHandle(pMonitor), otMonitor); + UserDeleteObject(UserHMGetHandle(pMonitor), TYPE_MONITOR); } /* UserGetMonitorObject @@ -81,7 +81,7 @@ UserGetMonitorObject(IN HMONITOR hMonitor) return NULL; } - pMonitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, otMonitor); + pMonitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, TYPE_MONITOR); if (!pMonitor) { EngSetLastError(ERROR_INVALID_MONITOR_HANDLE); diff --git a/win32ss/user/ntuser/object.c b/win32ss/user/ntuser/object.c index d7785754073..a341b5035bb 100644 --- a/win32ss/user/ntuser/object.c +++ b/win32ss/user/ntuser/object.c @@ -16,7 +16,7 @@ PUSER_HANDLE_TABLE gHandleTable = NULL; void DbgUserDumpHandleTable() { - int HandleCounts[USER_HANDLE_TYPE_COUNT]; + int HandleCounts[TYPE_CTYPES]; PPROCESSINFO ppiList; int i; PWCHAR TypeNames[] = {L"Free",L"Window",L"Menu", L"CursorIcon", L"SMWP", L"Hook", L"ClipBoardData", L"CallProc", @@ -33,7 +33,7 @@ void DbgUserDumpHandleTable() { ERR("Process %s (%d) handles count: %d\n\t", ppiList->peProcess->ImageFileName, ppiList->peProcess->UniqueProcessId, ppiList->UserHandleCount); - for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++) + for (i = 1 ;i < TYPE_CTYPES; i++) { HandleCounts[i] += ppiList->DbgHandleCount[i]; @@ -48,7 +48,7 @@ void DbgUserDumpHandleTable() /* Print total type counts */ ERR("Total handles of the running processes: \n\t"); - for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++) + for (i = 1 ;i < TYPE_CTYPES; i++) { DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]); if (i % 6 == 0) @@ -62,7 +62,7 @@ void DbgUserDumpHandleTable() HandleCounts[gHandleTable->handles[i].type]++; ERR("Total handles count allocated: \n\t"); - for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++) + for (i = 1 ;i < TYPE_CTYPES; i++) { DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]); if (i % 6 == 0) @@ -174,27 +174,27 @@ __inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY } static __inline PVOID -UserHandleOwnerByType(USER_OBJECT_TYPE type) +UserHandleOwnerByType(HANDLE_TYPE type) { PVOID pi; switch (type) { - case otWindow: - case otInputContext: + case TYPE_WINDOW: + case TYPE_INPUTCONTEXT: pi = GetW32ThreadInfo(); break; - case otMenu: - case otCursorIcon: - case otHook: - case otCallProc: - case otAccel: - case otSMWP: + case TYPE_MENU: + case TYPE_CURSOR: + case TYPE_HOOK: + case TYPE_CALLPROC: + case TYPE_ACCELTABLE: + case TYPE_SETWINDOWPOS: pi = GetW32ProcessInfo(); break; - case otMonitor: + case TYPE_MONITOR: pi = NULL; /* System */ break; @@ -207,7 +207,7 @@ UserHandleOwnerByType(USER_OBJECT_TYPE type) } /* allocate a user handle for a given object */ -HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type ) +HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, HANDLE_TYPE type ) { PUSER_HANDLE_ENTRY entry = alloc_user_entry(ht); if (!entry) @@ -226,7 +226,7 @@ HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE typ } /* return a pointer to a user object from its handle without setting an error */ -PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ) +PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type ) { PUSER_HANDLE_ENTRY entry; @@ -240,7 +240,7 @@ PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE } /* return a pointer to a user object from its handle */ -PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ) +PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type ) { PUSER_HANDLE_ENTRY entry; @@ -269,7 +269,7 @@ HANDLE get_user_full_handle(PUSER_HANDLE_TABLE ht, HANDLE handle ) /* Same as get_user_object plus set the handle to the full 32-bit value */ -void *get_user_object_handle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type ) +void *get_user_object_handle(PUSER_HANDLE_TABLE ht, HANDLE* handle, HANDLE_TYPE type ) { PUSER_HANDLE_ENTRY entry; @@ -317,7 +317,7 @@ UserCreateObject( PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE* h, - USER_OBJECT_TYPE type, + HANDLE_TYPE type, ULONG size) { HANDLE hi; @@ -336,11 +336,11 @@ UserCreateObject( PUSER_HANDLE_TABLE ht, switch (type) { - case otWindow: -// case otMenu: - case otHook: - case otCallProc: - case otInputContext: + case TYPE_WINDOW: +// case TYPE_MENU: + case TYPE_HOOK: + case TYPE_CALLPROC: + case TYPE_INPUTCONTEXT: Object = DesktopHeapAlloc(rpdesk, size); dt = TRUE; break; @@ -373,22 +373,22 @@ UserCreateObject( PUSER_HANDLE_TABLE ht, switch (type) { - case otWindow: - case otHook: - case otInputContext: + case TYPE_WINDOW: + case TYPE_HOOK: + case TYPE_INPUTCONTEXT: ((PTHRDESKHEAD)Object)->rpdesk = rpdesk; ((PTHRDESKHEAD)Object)->pSelf = Object; - case otEvent: + case TYPE_WINEVENTHOOK: ((PTHROBJHEAD)Object)->pti = pti; break; - case otMenu: - case otCallProc: + case TYPE_MENU: + case TYPE_CALLPROC: ((PPROCDESKHEAD)Object)->rpdesk = rpdesk; ((PPROCDESKHEAD)Object)->pSelf = Object; break; - case otCursorIcon: + case TYPE_CURSOR: ((PPROCMARKHEAD)Object)->ppi = ppi; break; @@ -410,7 +410,7 @@ FASTCALL UserDereferenceObject(PVOID object) { PUSER_HANDLE_ENTRY entry; - USER_OBJECT_TYPE type; + HANDLE_TYPE type; ASSERT(((PHEAD)object)->cLockObj >= 1); @@ -435,11 +435,11 @@ UserDereferenceObject(PVOID object) switch (type) { - case otWindow: -// case otMenu: - case otHook: - case otCallProc: - case otInputContext: + case TYPE_WINDOW: +// case TYPE_MENU: + case TYPE_HOOK: + case TYPE_CALLPROC: + case TYPE_INPUTCONTEXT: return DesktopHeapFree(((PTHRDESKHEAD)object)->rpdesk, object); default: @@ -482,7 +482,7 @@ UserObjectInDestroy(HANDLE h) BOOL FASTCALL -UserDeleteObject(HANDLE h, USER_OBJECT_TYPE type ) +UserDeleteObject(HANDLE h, HANDLE_TYPE type ) { PVOID body = UserGetObject(gHandleTable, h, type); @@ -504,7 +504,7 @@ UserReferenceObject(PVOID obj) PVOID FASTCALL -UserReferenceObjectByHandle(HANDLE handle, USER_OBJECT_TYPE type) +UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type) { PVOID object; @@ -518,7 +518,7 @@ UserReferenceObjectByHandle(HANDLE handle, USER_OBJECT_TYPE type) VOID FASTCALL -UserSetObjectOwner(PVOID obj, USER_OBJECT_TYPE type, PVOID owner) +UserSetObjectOwner(PVOID obj, HANDLE_TYPE type, PVOID owner) { PUSER_HANDLE_ENTRY entry = handle_to_entry(gHandleTable, ((PHEAD)obj)->h ); PPROCESSINFO ppi, oldppi; @@ -529,7 +529,7 @@ UserSetObjectOwner(PVOID obj, USER_OBJECT_TYPE type, PVOID owner) /* For now, only supported for CursorIcon object */ switch(type) { - case otCursorIcon: + case TYPE_CURSOR: ppi = (PPROCESSINFO)owner; entry->pi = ppi; oldppi = ((PPROCMARKHEAD)obj)->ppi; @@ -575,37 +575,37 @@ NtUserValidateHandleSecure( } switch (uType) { - case otWindow: + case TYPE_WINDOW: { if (UserGetWindowObject((HWND) handle)) return TRUE; return FALSE; } - case otMenu: + case TYPE_MENU: { if (UserGetMenuObject((HMENU) handle)) return TRUE; return FALSE; } - case otAccel: + case TYPE_ACCELTABLE: { if (UserGetAccelObject((HACCEL) handle)) return TRUE; return FALSE; } - case otCursorIcon: + case TYPE_CURSOR: { if (UserGetCurIconObject((HCURSOR) handle)) return TRUE; return FALSE; } - case otHook: + case TYPE_HOOK: { if (IntGetHookObject((HHOOK) handle)) return TRUE; return FALSE; } - case otMonitor: + case TYPE_MONITOR: { if (UserGetMonitorObject((HMONITOR) handle)) return TRUE; return FALSE; } - case otCallProc: + case TYPE_CALLPROC: { WNDPROC_INFO Proc; return UserGetCallProcInfo( handle, &Proc ); diff --git a/win32ss/user/ntuser/object.h b/win32ss/user/ntuser/object.h index 08ae96ebcb2..2ab5f36da05 100644 --- a/win32ss/user/ntuser/object.h +++ b/win32ss/user/ntuser/object.h @@ -31,16 +31,16 @@ UserAssertLastRef(PVOID obj, const char *file, int line) extern PUSER_HANDLE_TABLE gHandleTable; VOID FASTCALL UserReferenceObject(PVOID obj); -PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, USER_OBJECT_TYPE type); +PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type); BOOL FASTCALL UserDereferenceObject(PVOID obj); -PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, struct _DESKTOP* pDesktop, PTHREADINFO pti, HANDLE* h,USER_OBJECT_TYPE type , ULONG size); -BOOL FASTCALL UserDeleteObject(HANDLE h, USER_OBJECT_TYPE type ); -PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ); -PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, USER_OBJECT_TYPE); +PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, struct _DESKTOP* pDesktop, PTHREADINFO pti, HANDLE* h,HANDLE_TYPE type , ULONG size); +BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type ); +PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type ); +PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, HANDLE_TYPE); BOOL FASTCALL UserCreateHandleTable(VOID); BOOL FASTCALL UserObjectInDestroy(HANDLE); void DbgUserDumpHandleTable(); -VOID FASTCALL UserSetObjectOwner(PVOID obj, USER_OBJECT_TYPE type, PVOID owner); +VOID FASTCALL UserSetObjectOwner(PVOID obj, HANDLE_TYPE type, PVOID owner); static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry) diff --git a/win32ss/user/ntuser/painting.c b/win32ss/user/ntuser/painting.c index 5779fff20d2..e2916165a5a 100644 --- a/win32ss/user/ntuser/painting.c +++ b/win32ss/user/ntuser/painting.c @@ -1141,7 +1141,7 @@ NtUserFlashWindowEx(IN PFLASHWINFO pfwi) if (!Ret) goto Exit; - if (!( pWnd = (PWND)UserGetObject(gHandleTable, finfo.hwnd, otWindow)) || + if (!( pWnd = (PWND)UserGetObject(gHandleTable, finfo.hwnd, TYPE_WINDOW)) || finfo.cbSize != sizeof(FLASHWINFO) || finfo.dwFlags & ~(FLASHW_ALL|FLASHW_TIMER|FLASHW_TIMERNOFG) ) { diff --git a/win32ss/user/ntuser/simplecall.c b/win32ss/user/ntuser/simplecall.c index 3b65d98f358..6176c3d9c4e 100644 --- a/win32ss/user/ntuser/simplecall.c +++ b/win32ss/user/ntuser/simplecall.c @@ -174,13 +174,13 @@ NtUserCallOneParam( NULL, NULL, (PHANDLE)&hDwp, - otSMWP, + TYPE_SETWINDOWPOS, sizeof(SMWP)); if (!psmwp) RETURN(0); psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP); if (!psmwp->acvr) { - UserDeleteObject(hDwp, otSMWP); + UserDeleteObject(hDwp, TYPE_SETWINDOWPOS); RETURN(0); } RtlZeroMemory(psmwp->acvr, count * sizeof(CVR)); diff --git a/win32ss/user/ntuser/timer.c b/win32ss/user/ntuser/timer.c index 9271eddf1d7..f113be3400b 100644 --- a/win32ss/user/ntuser/timer.c +++ b/win32ss/user/ntuser/timer.c @@ -56,7 +56,7 @@ CreateTimer(VOID) HANDLE Handle; PTIMER Ret = NULL; - Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, otTimer, sizeof(TIMER)); + Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_TIMER, sizeof(TIMER)); if (Ret) { Ret->head.h = Handle; @@ -86,7 +86,7 @@ RemoveTimer(PTIMER pTmr) IntUnlockWindowlessTimerBitmap(); } UserDereferenceObject(pTmr); - Ret = UserDeleteObject( UserHMGetHandle(pTmr), otTimer); + Ret = UserDeleteObject( UserHMGetHandle(pTmr), TYPE_TIMER); } if (!Ret) ERR("Warning: Unable to delete timer\n"); diff --git a/win32ss/user/ntuser/win32.h b/win32ss/user/ntuser/win32.h index 4bec70a8772..5a7d2178e8f 100644 --- a/win32ss/user/ntuser/win32.h +++ b/win32ss/user/ntuser/win32.h @@ -225,7 +225,7 @@ typedef struct _PROCESSINFO #if DBG BYTE DbgChannelLevel[DbgChCount]; - DWORD DbgHandleCount[USER_HANDLE_TYPE_COUNT]; + DWORD DbgHandleCount[TYPE_CTYPES]; #endif } PROCESSINFO; diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index db4f50f9fa4..217d8af29f5 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -90,7 +90,7 @@ PWND FASTCALL VerifyWnd(PWND pWnd) PWND FASTCALL ValidateHwndNoErr(HWND hWnd) { - if (hWnd) return (PWND)UserGetObjectNoErr(gHandleTable, hWnd, otWindow); + if (hWnd) return (PWND)UserGetObjectNoErr(gHandleTable, hWnd, TYPE_WINDOW); return NULL; } @@ -105,7 +105,7 @@ PWND FASTCALL UserGetWindowObject(HWND hWnd) return NULL; } - Window = (PWND)UserGetObject(gHandleTable, hWnd, otWindow); + Window = (PWND)UserGetObject(gHandleTable, hWnd, TYPE_WINDOW); if (!Window || 0 != (Window->state & WNDS_DESTROYED)) { EngSetLastError(ERROR_INVALID_WINDOW_HANDLE); @@ -555,7 +555,7 @@ static LRESULT co_UserFreeWindow(PWND Window, IntUnlinkWindow(Window); UserReferenceObject(Window); - UserDeleteObject(Window->head.h, otWindow); + UserDeleteObject(Window->head.h, TYPE_WINDOW); IntDestroyScrollBars(Window); @@ -662,7 +662,7 @@ IntSetWindowProc(PWND pWnd, if (IsCallProcHandle(NewWndProc)) { - CallProc = UserGetObject(gHandleTable, NewWndProc, otCallProc); + CallProc = UserGetObject(gHandleTable, NewWndProc, TYPE_CALLPROC); if (CallProc) { // Reset new WndProc. NewWndProc = CallProc->pfnClientPrevious; @@ -1717,7 +1717,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs, pdeskCreated ? pdeskCreated : pti->rpdesk, pti, (PHANDLE)&hWnd, - otWindow, + TYPE_WINDOW, sizeof(WND) + Class->cbwndExtra); if (!pWnd) diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index 78f2ed52d20..f740ec188fd 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -2472,7 +2472,7 @@ IntDeferWindowPos( HDWP hdwp, return NULL; } - if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP))) + if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS))) { EngSetLastError(ERROR_INVALID_DWP_HANDLE); return NULL; @@ -2543,7 +2543,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp, BOOL sAsync ) TRACE("%p\n", hdwp); - if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP))) + if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS))) { EngSetLastError(ERROR_INVALID_DWP_HANDLE); return FALSE; @@ -2597,7 +2597,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp, BOOL sAsync ) } ExFreePoolWithTag(pDWP->acvr, USERTAG_SWP); UserDereferenceObject(pDWP); - UserDeleteObject(hdwp, otSMWP); + UserDeleteObject(hdwp, TYPE_SETWINDOWPOS); return res; } diff --git a/win32ss/user/user32/misc/misc.c b/win32ss/user/user32/misc/misc.c index a473e79e1ce..1d820df931c 100644 --- a/win32ss/user/user32/misc/misc.c +++ b/win32ss/user/user32/misc/misc.c @@ -325,24 +325,30 @@ GetUser32Handle(HANDLE handle) /* * Decide whether an object is located on the desktop or shared heap */ -static const BOOL g_ObjectHeapTypeShared[otEvent + 1] = +static const BOOL g_ObjectHeapTypeShared[TYPE_CTYPES] = { - FALSE, /* otFree (not used) */ - FALSE, /* otWindow */ - TRUE, /* otMenu FALSE */ - TRUE, /* otCursorIcon */ - TRUE, /* otSMWP */ - FALSE, /* otHook */ - FALSE, /* (not used) */ - FALSE, /* otCallProc */ - TRUE, /* otAccel */ - FALSE, /* (not used) */ - FALSE, /* (not used) */ - FALSE, /* (not used) */ - TRUE, /* otMonitor */ - FALSE, /* (not used) */ - FALSE, /* (not used) */ - TRUE /* otEvent */ + FALSE, /* TYPE_FREE (not used) */ + FALSE, /* TYPE_WINDOW */ + TRUE, /* TYPE_MENU FALSE */ + TRUE, /* TYPE_CURSOR */ + TRUE, /* TYPE_SETWINDOWPOS */ + FALSE, /* TYPE_HOOK */ + FALSE, /* TYPE_CLIPDATA */ + FALSE, /* TYPE_CALLPROC */ + TRUE, /* TYPE_ACCELTABLE */ + FALSE, /* TYPE_DDEACCESS */ + FALSE, /* TYPE_DDECONV */ + FALSE, /* TYPE_DDEXACT */ + TRUE, /* TYPE_MONITOR */ + FALSE, /* TYPE_KBDLAYOUT */ + FALSE, /* TYPE_KBDFILE */ + TRUE, /* TYPE_WINEVENTHOOK */ + FALSE, /* TYPE_TIMER */ + FALSE, /* TYPE_INPUTCONTEXT */ + FALSE, /* TYPE_HIDDATA */ + FALSE, /* TYPE_DEVICEINFO */ + FALSE, /* TYPE_TOUCHINPUTINFO */ + FALSE, /* TYPE_GESTUREINFOOBJ */ }; // @@ -355,7 +361,7 @@ ValidateHandle(HANDLE handle, UINT uType) PVOID ret; PUSER_HANDLE_ENTRY pEntry; - ASSERT(uType <= otEvent); + ASSERT(uType < TYPE_CTYPES); pEntry = GetUser32Handle(handle); @@ -370,22 +376,22 @@ ValidateHandle(HANDLE handle, UINT uType) { switch ( uType ) { // Test (with wine too) confirms these results! - case otWindow: + case TYPE_WINDOW: SetLastError(ERROR_INVALID_WINDOW_HANDLE); break; - case otMenu: + case TYPE_MENU: SetLastError(ERROR_INVALID_MENU_HANDLE); break; - case otCursorIcon: + case TYPE_CURSOR: SetLastError(ERROR_INVALID_CURSOR_HANDLE); break; - case otSMWP: + case TYPE_SETWINDOWPOS: SetLastError(ERROR_INVALID_DWP_HANDLE); break; - case otHook: + case TYPE_HOOK: SetLastError(ERROR_INVALID_HOOK_HANDLE); break; - case otAccel: + case TYPE_ACCELTABLE: SetLastError(ERROR_INVALID_ACCEL_HANDLE); break; default: @@ -413,7 +419,7 @@ ValidateHandleNoErr(HANDLE handle, UINT uType) PVOID ret; PUSER_HANDLE_ENTRY pEntry; - ASSERT(uType <= otEvent); + ASSERT(uType < TYPE_CTYPES); pEntry = GetUser32Handle(handle); @@ -441,7 +447,7 @@ ValidateCallProc(HANDLE hCallProc) { PUSER_HANDLE_ENTRY pEntry; - PCALLPROCDATA CallProc = ValidateHandle(hCallProc, otCallProc); + PCALLPROCDATA CallProc = ValidateHandle(hCallProc, TYPE_CALLPROC); pEntry = GetUser32Handle(hCallProc); @@ -466,7 +472,7 @@ ValidateHwnd(HWND hwnd) if (hwnd && hwnd == ClientInfo->CallbackWnd.hWnd) return ClientInfo->CallbackWnd.pWnd; - return ValidateHandle((HANDLE)hwnd, otWindow); + return ValidateHandle((HANDLE)hwnd, TYPE_WINDOW); } // @@ -484,7 +490,7 @@ ValidateHwndNoErr(HWND hwnd) if (hwnd == ClientInfo->CallbackWnd.hWnd) return ClientInfo->CallbackWnd.pWnd; - Wnd = ValidateHandleNoErr((HANDLE)hwnd, otWindow); + Wnd = ValidateHandleNoErr((HANDLE)hwnd, TYPE_WINDOW); if (Wnd != NULL) { return Wnd; diff --git a/win32ss/user/user32/windows/menu.c b/win32ss/user/user32/windows/menu.c index 2f544a7abed..c5a2766c631 100644 --- a/win32ss/user/user32/windows/menu.c +++ b/win32ss/user/user32/windows/menu.c @@ -3241,7 +3241,7 @@ static INT FASTCALL MenuTrackMenu(HMENU hmenu, UINT wFlags, INT x, INT y, while (! fEndMenu) { BOOL ErrorExit = FALSE; - PVOID menu = ValidateHandle(mt.CurrentMenu, otMenu); + PVOID menu = ValidateHandle(mt.CurrentMenu, TYPE_MENU); if (!menu) /* sometimes happens if I do a window manager close */ break; @@ -4767,7 +4767,7 @@ WINAPI IsMenu( HMENU Menu) { - if (ValidateHandle(Menu, otMenu)) return TRUE; + if (ValidateHandle(Menu, TYPE_MENU)) return TRUE; return FALSE; }