/* Try to load last selected layout */
GetProfileString(TEXT("SciCalc"), TEXT("layout"), TEXT("0"), buf, SIZEOF(buf));
- if (_stscanf(buf, TEXT("%ld"), &calc.layout) != 1)
+ if (_stscanf(buf, TEXT("%lu"), &calc.layout) != 1)
calc.layout = CALC_LAYOUT_STANDARD;
/* Try to load last selected formatting option */
GetProfileString(TEXT("SciCalc"), TEXT("UseSep"), TEXT("0"), buf, SIZEOF(buf));
- if (_stscanf(buf, TEXT("%ld"), &tmp) != 1)
+ if (_stscanf(buf, TEXT("%lu"), &tmp) != 1)
calc.usesep = FALSE;
else
calc.usesep = (tmp == 1) ? TRUE : FALSE;
-/* $Id: dbgprint.c 24720 2006-11-11 16:07:35Z janderwald $
- *
+/*
* PROJECT: ReactOS DbgPrint Utility
* LICENSE: GPL - See COPYING in the top level directory
* FILE: tools/dbgprint/dbgprint.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT : See COPYING in the top level directory
* PROJECT : ReactOS/Win32 get host name
* FILE : subsys/system/hostname/hostname.c
printf ("%s\n", ComputerName);
return EXIT_SUCCESS;
}
- fprintf (stderr, "%s: Win32 error %ld.\n",
+ fprintf (stderr, "%s: Win32 error %lu.\n",
argv[0], GetLastError());
return EXIT_FAILURE;
}else{
p_board->IsMarkQ = TRUE;
for( i = 0; i < 3; i++ ) {
- wsprintf( key_name, "Name%d", i+1 );
+ wsprintf( key_name, "Name%u", i+1 );
size = sizeof( data );
if( RegQueryValueEx( hkey, key_name, NULL, &type,
(LPBYTE) data, &size ) == ERROR_SUCCESS )
}
for( i = 0; i < 3; i++ ) {
- wsprintf( key_name, "Time%d", i+1 );
+ wsprintf( key_name, "Time%u", i+1 );
size = sizeof( p_board->best_time[i] );
if( !RegQueryValueEx( hkey, key_name, NULL, &type,
(LPBYTE) &p_board->best_time[i], &size ) == ERROR_SUCCESS )
else
_snwprintf(szWindowTitle+i, dwMaxLength, L"%s", lpComputerName);
- swprintf(szStatusText, L"%s has %d event(s)", lpLogName, dwTotalRecords);
+ swprintf(szStatusText, L"%s has %lu event(s)", lpLogName, dwTotalRecords);
// Update the status bar
SendMessageW(hwndStatus, SB_SETTEXT, (WPARAM)0, (LPARAM)szStatusText);
[Section]
Name = BitTorrent
-Version = 7.7.2
+Version = 7.8
Licence = Freeware for non-commercial uses
Description = The Original BitTorrent Client.
-Size = 956KB
+Size = 1012KB
Category = 5
URLSite = http://www.bittorrent.com/
-URLDownload = http://download.bittorrent.com/7.7.2/BitTorrent.exe
+URLDownload = http://download.bittorrent.com/7.8/BitTorrent.exe
CDPath = none
[Section.0407]
; UTF-8
[Section]
-Name = Mozilla Firefox 17
-Version = 17.0.1
+Name = Mozilla Firefox 19
+Version = 19.0.2
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/17.0.1/win32/en-US/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/en-US/Firefox%20Setup%2019.0.2.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/17.0.1/win32/de/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/de/Firefox%20Setup%2019.0.2.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/17.0.1/win32/es-ES/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/es-ES/Firefox%20Setup%2019.0.2.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/17.0.1/win32/fr/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/fr/Firefox%20Setup%2019.0.2.exe
[Section.0413]
Description = De meest populaire en een van de beste gratis Web browsers.
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/17.0.1/win32/nb-NO/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/nb-NO/Firefox%20Setup%2019.0.2.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/17.0.1/win32/pl/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/pl/Firefox%20Setup%2019.0.2.exe
[Section.0418]
Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente.
Size = 16,1 Mo
URLSite = http://www.mozilla-europe.org/ro/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ro/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/ro/Firefox%20Setup%2019.0.2.exe
[Section.0419]
Description = Один из самых популярных и лучших бесплатных браузеров.
Size = 16.1MB
URLSite = http://www.mozilla-europe.org/ru/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ru/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/ru/Firefox%20Setup%2019.0.2.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/17.0.1/win32/sk/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/sk/Firefox%20Setup%2019.0.2.exe
[Section.0422]
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.
Size = 16.1MB
URLSite = http://www.mozilla-europe.org/uk/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/uk/Firefox%20Setup%2017.0.1.exe
+URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/uk/Firefox%20Setup%2019.0.2.exe
\r
[Section]\r
Name = K Desktop Environment\r
-Version = 0.9.9-7\r
+Version = 0.9.9-8\r
Licence = GPL\r
Description = KDE for Windows.\r
Size = 2.21MB\r
Category = 15\r
URLSite = http://www.winkde.org/\r
-URLDownload = http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-0.9.9-7.exe\r
+URLDownload = http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-0.9.9-8.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section]\r
Name = LibreOffice\r
-Version = 3.6.4\r
+Version = 4.0.1\r
Licence = LGPL\r
Description = Former called OpenOffice. Open Source Office Suite.\r
Size = 200.0MB\r
Category = 6\r
URLSite = http://www.documentfoundation.org/\r
-URLDownload = http://download.documentfoundation.org/libreoffice/stable/3.6.4/win/x86/LibO_3.6.4_Win_x86_install_multi.msi\r
+URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.0.1/win/x86/LibreOffice_4.0.1_Win_x86.msi\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section]\r
Name = Miranda IM\r
-Version = 0.10.9\r
+Version = 0.10.11\r
Licence = GPL\r
Description = Open source multiprotocol instant messaging application - May not work completely.\r
Size = 3.1MB\r
Category = 5\r
URLSite = http://www.miranda-im.org/\r
-URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.9-unicode.exe\r
+URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.11-unicode.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section]\r
Name = mIRC 7\r
-Version = 7.27\r
+Version = 7.29\r
Licence = Shareware\r
Description = The most popular client for the Internet Relay Chat (IRC).\r
Size = 1.82MB\r
Category = 5\r
URLSite = http://www.mirc.com/\r
-URLDownload = http://download.mirc.com/6/mirc727.exe\r
+URLDownload = http://download.mirc.com/7/mirc729.exe\r
CDPath = none\r
\r
[Section.0407]\r
Size = 91.9MB\r
Category = 14\r
URLSite = http://www.mono-project.com/Main_Page\r
-URLDownload = http://download.mono-project.com/archive/2.11.4/windows-installer/mono-2.11.4-gtksharp-2.12.11-win32-0.exe\r
+URLDownload = http://download.mono-project.com/archive/2.10.9/windows-installer/0/mono-2.10.9-gtksharp-2.12.11-win32-0.exe\r
CDPath = none\r
\r
[Section.040a]\r
\r
[Section]\r
Name = Opera\r
-Version = 12.12\r
+Version = 12.14\r
Licence = Freeware\r
Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.\r
Size = 12.00MB\r
Category = 5\r
URLSite = http://www.opera.com/\r
-URLDownload = http://ftp.opera.com/pub/opera/win/1212/int/Opera_1212_int_Setup.exe\r
+URLDownload = http://ftp.opera.com/pub/opera/win/1214/int/Opera_1214_int_Setup.exe\r
CDPath = none\r
\r
[Section.0405]\r
\r
[Section]\r
Name = SciTE\r
-Version = 3.2.3\r
+Version = 3.2.5\r
Licence = Freeware\r
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.\r
Size = 685kB\r
Category = 7\r
URLSite = http://www.scintilla.org/\r
-URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.3/Sc323.exe\r
+URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.5/Sc325.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section]\r
Name = Mozilla SeaMonkey\r
-Version = 2.14.1\r
+Version = 2.16.2\r
Licence = MPL/GPL/LGPL\r
Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.\r
Size = 20.0MB\r
Category = 5\r
URLSite = http://www.seamonkey-project.org/\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/en-US/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/en-US/SeaMonkey%20Setup%202.16.2.exe\r
CDPath = none\r
\r
[Section.0407]\r
Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen.\r
Size = 20.0MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/de/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/de/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.040a]\r
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.\r
Size = 19.9MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/es-ES/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/es-ES/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.040c]\r
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.\r
Size = 20.2MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/fr/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/fr/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.0413]\r
Description = Mozilla Suite bundelt alle applicaties voor het Web: Browser, Mail, Chat, Composer.\r
Size = 20.6MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/nl/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/nl/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.0415]\r
Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz.\r
Size = 20.8MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/pl/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/pl/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.0418]\r
Description = Suita Mozilla. Acest pachet ce încorporează navigator, poștă electronică, client IRC și editor HTML, acoperind astfel o arie largă de necesități.\r
[Section.0419]\r
Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.\r
Size = 20.5MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/ru/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section.0422]\r
Description = Продовження Mozilla Suite. Включає в себе браузер, поштовий клієнт, IRC-клієнт та HTML-редактор.\r
Size = 20.5MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/ru/SeaMonkey%20Setup%202.16.2.exe\r
\r
[Section]\r
Name = SumatraPDF\r
-Version = 2.2\r
+Version = 2.2.1\r
Licence = GPLv3\r
Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box.\r
Size = 4.8MB\r
Category = 6\r
URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html\r
-URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.2-install.exe\r
+URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.2.1-install.exe\r
CDPath = none\r
\r
[Section.0407]\r
[Section]
Name = Mozilla Thunderbird 17
-Version = 17.0
+Version = 17.0.4
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/17.0/win32/en-US/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/en-US/Thunderbird%20Setup%2017.0.4.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/17.0/win32/de/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/de/Thunderbird%20Setup%2017.0.4.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/17.0/win32/es-ES/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/es-ES/Thunderbird%20Setup%2017.0.4.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/17.0/win32/fr/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/fr/Thunderbird%20Setup%2017.0.4.exe
[Section.0413]
Description = De meest populaire en een van de beste gratis e-mail-programma's.
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/17.0/win32/pl/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/pl/Thunderbird%20Setup%2017.0.4.exe
[Section.0418]
Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică.
Size = 18,0 Mo
URLSite = http://www.mozilla-europe.org/ro/products/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/ro/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/ro/Thunderbird%20Setup%2017.0.4.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/17.0/win32/ru/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/ru/Thunderbird%20Setup%2017.0.4.exe
[Section.0422]
Description = Найпопулярніший та один з кращих поштових клієнтів.
Size = 17.9MB
URLSite = http://www.mozillamessaging.com/uk/thunderbird/
-URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/uk/Thunderbird%20Setup%2017.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/uk/Thunderbird%20Setup%2017.0.4.exe
\r
[Section]\r
Name = µTorrent\r
-Version = 3.2.3\r
+Version = 3.3\r
Licence = Freeware for non-commercial uses\r
Description = Small and fast BitTorrent Client.\r
Size = 946.00kB\r
Category = 5\r
URLSite = http://www.utorrent.com/\r
-URLDownload = http://download.utorrent.com/3.2.3/uTorrent.exe\r
+URLDownload = http://download.utorrent.com/3.3/uTorrent.exe\r
CDPath = none\r
\r
\r
_tprintf(_T(")\n"));
- _tprintf(_T("\tWIN32_EXIT_CODE : %d (0x%x)\n"),
+ _tprintf(_T("\tWIN32_EXIT_CODE : %u (0x%x)\n"),
(unsigned int)pStatus->dwWin32ExitCode,
(unsigned int)pStatus->dwWin32ExitCode);
- _tprintf(_T("\tSERVICE_EXIT_CODE : %d (0x%x)\n"),
+ _tprintf(_T("\tSERVICE_EXIT_CODE : %u (0x%x)\n"),
(unsigned int)pStatus->dwServiceSpecificExitCode,
(unsigned int)pStatus->dwServiceSpecificExitCode);
_tprintf(_T("\tCHECKPOINT : 0x%x\n"),
else
{
WCHAR szMsg[MAX_PATH];
- wsprintf(szMsg, L"Failed to load the installer. Error %d", GetLastError());
+ wsprintf(szMsg, L"Failed to load the installer. Error %lu", GetLastError());
MessageBoxW(0, szMsg, L"Error", MB_OK | MB_ICONERROR);
DeleteDirectory(szTempPath);
return 1;
/* Prints out the error message to the user */
fprintf(stderr, resMsg);
- fwprintf(stderr, L"Error code: %d\n", dwError);
+ fwprintf(stderr, L"Error code: %lu\n", dwError);
LocalFree(lpMsgBuf);
LocalFree(resMsg);
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Sound Volume Control
* FILE: subsys/system/sndvol32/misc.c
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Sound Volume Control
* FILE: subsys/system/sndvol32/mixer.c
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Sound Volume Control
* FILE: subsys/system/sndvol32/sndvol32.c
if (ColumnDataHints[ColumnIndex] == COLUMN_IMAGENAME)
PerfDataGetImageName(Index, lpText, nMaxCount);
if (ColumnDataHints[ColumnIndex] == COLUMN_PID)
- wsprintfW(lpText, L"%d", PerfDataGetProcessId(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME)
PerfDataGetUserName(Index, lpText, nMaxCount);
if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID)
- wsprintfW(lpText, L"%d", PerfDataGetSessionId(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE)
- wsprintfW(lpText, L"%02d", PerfDataGetCPUUsage(Index));
+ wsprintfW(lpText, L"%02lu", PerfDataGetCPUUsage(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_CPUTIME)
{
DWORD dwHours;
time = PerfDataGetCPUTime(Index);
gethmsfromlargeint(time, &dwHours, &dwMinutes, &dwSeconds);
- wsprintfW(lpText, L"%d:%02d:%02d", dwHours, dwMinutes, dwSeconds);
+ wsprintfW(lpText, L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGE)
{
- wsprintfW(lpText, L"%d", PerfDataGetWorkingSetSizeBytes(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeBytes(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PEAKMEMORYUSAGE)
{
- wsprintfW(lpText, L"%d", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGEDELTA)
{
- wsprintfW(lpText, L"%d", PerfDataGetWorkingSetSizeDelta(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeDelta(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTS)
{
- wsprintfW(lpText, L"%d", PerfDataGetPageFaultCount(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCount(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTSDELTA)
{
- wsprintfW(lpText, L"%d", PerfDataGetPageFaultCountDelta(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCountDelta(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_VIRTUALMEMORYSIZE)
{
- wsprintfW(lpText, L"%d", PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEDPOOL)
{
- wsprintfW(lpText, L"%d", PerfDataGetPagedPoolUsagePages(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetPagedPoolUsagePages(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_NONPAGEDPOOL)
{
- wsprintfW(lpText, L"%d", PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
+ wsprintfW(lpText, L"%lu", PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
CommaSeparateNumberString(lpText, nMaxCount);
wcscat(lpText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_BASEPRIORITY)
- wsprintfW(lpText, L"%d", PerfDataGetBasePriority(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetBasePriority(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_HANDLECOUNT)
{
- wsprintfW(lpText, L"%d", PerfDataGetHandleCount(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetHandleCount(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_THREADCOUNT)
{
- wsprintfW(lpText, L"%d", PerfDataGetThreadCount(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetThreadCount(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_USEROBJECTS)
{
- wsprintfW(lpText, L"%d", PerfDataGetUSERObjectCount(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetUSERObjectCount(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_GDIOBJECTS)
{
- wsprintfW(lpText, L"%d", PerfDataGetGDIObjectCount(Index));
+ wsprintfW(lpText, L"%lu", PerfDataGetGDIObjectCount(Index));
CommaSeparateNumberString(lpText, nMaxCount);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADS)
return;
}
- logmsg("* Service started");
+ logmsg("* Service started\n");
/* Tell SCM we are now running, and we may be stopped */
service_status.dwCurrentState = SERVICE_RUNNING;
service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
return ERROR_SUCCESS;
default :
- DPRINT1(" Control %lu received\n");
+ DPRINT1(" Control %lu received\n", dwControl);
return ERROR_CALL_NOT_IMPLEMENTED;
}
}
&ValueLen);
if (Result != ERROR_SUCCESS)
{
- DPRINT1("RegQueryValueEx failed: %d\n", GetLastError());
+ DPRINT1("RegQueryValueEx failed: %lu\n", GetLastError());
HeapFree(MyHeap, 0, Buf);
return NULL;
}
VOID PRINT_HEADER(PEVENTLOGHEADER header)
{
- DPRINT("HeaderSize = %d\n", header->HeaderSize);
+ DPRINT("HeaderSize = %lu\n", header->HeaderSize);
DPRINT("Signature = 0x%x\n", header->Signature);
- DPRINT("MajorVersion = %d\n", header->MajorVersion);
- DPRINT("MinorVersion = %d\n", header->MinorVersion);
- DPRINT("StartOffset = %d\n", header->StartOffset);
+ DPRINT("MajorVersion = %lu\n", header->MajorVersion);
+ DPRINT("MinorVersion = %lu\n", header->MinorVersion);
+ DPRINT("StartOffset = %lu\n", header->StartOffset);
DPRINT("EndOffset = 0x%x\n", header->EndOffset);
- DPRINT("CurrentRecordNumber = %d\n", header->CurrentRecordNumber);
- DPRINT("OldestRecordNumber = %d\n", header->OldestRecordNumber);
+ DPRINT("CurrentRecordNumber = %lu\n", header->CurrentRecordNumber);
+ DPRINT("OldestRecordNumber = %lu\n", header->OldestRecordNumber);
DPRINT("MaxSize = 0x%x\n", header->MaxSize);
DPRINT("Retention = 0x%x\n", header->Retention);
- DPRINT("EndHeaderSize = %d\n", header->EndHeaderSize);
+ DPRINT("EndHeaderSize = %lu\n", header->EndHeaderSize);
DPRINT("Flags: ");
if (header->Flags & ELF_LOGFILE_HEADER_DIRTY) DPRINT("ELF_LOGFILE_HEADER_DIRTY");
if (header->Flags & ELF_LOGFILE_HEADER_WRAP) DPRINT("| ELF_LOGFILE_HEADER_WRAP ");
WCHAR *str;
SYSTEMTIME time;
- DPRINT("Length = %d\n", pRec->Length);
+ DPRINT("Length = %lu\n", pRec->Length);
DPRINT("Reserved = 0x%x\n", pRec->Reserved);
- DPRINT("RecordNumber = %d\n", pRec->RecordNumber);
+ DPRINT("RecordNumber = %lu\n", pRec->RecordNumber);
EventTimeToSystemTime(pRec->TimeGenerated, &time);
- DPRINT("TimeGenerated = %d.%d.%d %d:%d:%d\n",
+ DPRINT("TimeGenerated = %hu.%hu.%hu %hu:%hu:%hu\n",
time.wDay, time.wMonth, time.wYear,
time.wHour, time.wMinute, time.wSecond);
EventTimeToSystemTime(pRec->TimeWritten, &time);
- DPRINT("TimeWritten = %d.%d.%d %d:%d:%d\n",
+ DPRINT("TimeWritten = %hu.%hu.%hu %hu:%hu:%hu\n",
time.wDay, time.wMonth, time.wYear,
time.wHour, time.wMinute, time.wSecond);
- DPRINT("EventID = %d\n", pRec->EventID);
+ DPRINT("EventID = %lu\n", pRec->EventID);
switch (pRec->EventType)
{
DPRINT("EventType = EVENTLOG_AUDIT_FAILURE\n");
break;
default:
- DPRINT("EventType = %d\n", pRec->EventType);
+ DPRINT("EventType = %hu\n", pRec->EventType);
}
- DPRINT("NumStrings = %d\n", pRec->NumStrings);
- DPRINT("EventCategory = %d\n", pRec->EventCategory);
+ DPRINT("NumStrings = %hu\n", pRec->NumStrings);
+ DPRINT("EventCategory = %hu\n", pRec->EventCategory);
DPRINT("ReservedFlags = 0x%x\n", pRec->ReservedFlags);
- DPRINT("ClosingRecordNumber = %d\n", pRec->ClosingRecordNumber);
- DPRINT("StringOffset = %d\n", pRec->StringOffset);
- DPRINT("UserSidLength = %d\n", pRec->UserSidLength);
- DPRINT("UserSidOffset = %d\n", pRec->UserSidOffset);
- DPRINT("DataLength = %d\n", pRec->DataLength);
- DPRINT("DataOffset = %d\n", pRec->DataOffset);
+ DPRINT("ClosingRecordNumber = %lu\n", pRec->ClosingRecordNumber);
+ DPRINT("StringOffset = %lu\n", pRec->StringOffset);
+ DPRINT("UserSidLength = %lu\n", pRec->UserSidLength);
+ DPRINT("UserSidOffset = %lu\n", pRec->UserSidOffset);
+ DPRINT("DataLength = %lu\n", pRec->DataLength);
+ DPRINT("DataOffset = %lu\n", pRec->DataOffset);
DPRINT("SourceName: %S\n", (WCHAR *) (((PBYTE) pRec) + sizeof(EVENTLOGRECORD)));
str = (WCHAR *) (((PBYTE) pRec) + pRec->StringOffset);
for (i = 0; i < pRec->NumStrings; i++)
{
- DPRINT("[%d] %S\n", i, str);
+ DPRINT("[%u] %S\n", i, str);
str = str + lstrlenW(str) + 1;
}
}
- DPRINT("Length2 = %d\n", *(PDWORD) (((PBYTE) pRec) + pRec->Length - 4));
+ DPRINT("Length2 = %lu\n", *(PDWORD) (((PBYTE) pRec) + pRec->Length - 4));
}
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS GUI first stage setup application
* FILE: base/setup/reactos/reactos.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/bootsup.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/drivesup.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/drivesup.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id: registry.h 21704 2006-04-22 13:55:01Z tretiakov $
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/errcode.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/filequeue.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/filesup.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/format.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/genlist.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/inicache.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/partlist.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/registry.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/settings.h
-/* $Id: En.rc 21257 2006-03-08 23:07:09Z audit $ */
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS welcome/autorun application
* FILE: subsys/system/welcome/welcome.c
-/* $Id$
- *
+/*
* WINDOW.C - activate & window internal commands.
*
* clone from 4nt activate command
if (lpService->Status.dwServiceType == SERVICE_KERNEL_DRIVER)
{
- RtlInitUnicodeString(&DirName,
- L"\\Driver");
+ RtlInitUnicodeString(&DirName, L"\\Driver");
}
- else
+ else // if (lpService->Status.dwServiceType == SERVICE_FILE_SYSTEM_DRIVER)
{
- RtlInitUnicodeString(&DirName,
- L"\\FileSystem");
+ RtlInitUnicodeString(&DirName, L"\\FileSystem");
}
InitializeObjectAttributes(&ObjectAttributes,
* PROJECT: ReactOS Service Control Manager
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/system/services/lock.c
- * PURPOSE: Service lock functions
+ * PURPOSE: User-side Services Start Serialization Lock functions
* COPYRIGHT: Copyright 2012 Hermès Bélusca
*/
/* GLOBALS *******************************************************************/
+/* The unique user service start lock of the SCM */
static PSTART_LOCK pServiceStartLock = NULL;
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS winlogon
* FILE: subsys/system/winlogon/setup.h
\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ConsoleShell",0x00020000,"%SystemRoot%\system32\cmd.exe"\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe"\r
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartServices",0x00010001,0x00000001\r
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartLsass",0x00010001,0x00000001\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe"\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,"1"\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,"Administrator"\r
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,"Secret"\r
\r
-;Time Zone Servers\r
+; Time Zone Servers\r
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","1",0x00000000,"pool.ntp.org"\r
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","2",0x00000000,"asia.pool.ntp.org"\r
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","3",0x00000000,"europe.pool.ntp.org"\r
// First check to make sure we're inside a [section]
if (CurrentSection == NULL)
{
- printf("Error: freeldr.ini:%ld: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
+ printf("Error: freeldr.ini:%lu: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
printf("Press any key to continue...\n");
MachConsGetCh();
CurrentLineNumber++;
-/* $Id: access.c 29112 2007-09-19 21:31:49Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/access.c
-/* $Id: display.c 29112 2007-09-19 21:31:49Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/display.c
-/* $Id: general.c 29112 2007-09-19 21:31:49Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/general.c
-/* $Id: keyboard.c 29170 2007-09-23 22:59:00Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/keyboard.c
-/* $Id: mouse.c 29112 2007-09-19 21:31:49Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/mouse.c
-/* $Id: sound.c 29112 2007-09-19 21:31:49Z ekohl $
- *
+/*
* PROJECT: ReactOS Accessibility Control Panel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/access/sound.c
-/* $Id: appwiz.c 29364 2007-10-02 23:34:00Z janderwald $
- *
- * PROJECT: ReactOS Software Control Panel
- * FILE: dll/cpl/appwiz/createlink.c
- * PURPOSE: ReactOS Software Control Panel
- * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
- * Dmitry Chapyshev (lentind@yandex.ru)
- * Johannes Anderwald
+/*
+ * PROJECT: ReactOS Software Control Panel
+ * FILE: dll/cpl/appwiz/createlink.c
+ * PURPOSE: ReactOS Software Control Panel
+ * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
+ * Dmitry Chapyshev (lentind@yandex.ru)
+ * Johannes Anderwald
* UPDATE HISTORY:
* 06-17-2004 Created
*/
-/* $Id: advappdlg.c 24836 2007-02-12 03:12:56Z tkreuzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: dll/cpl/desk/advappdlg.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: dll/cpl/desk/background.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: dll/cpl/desk/desk.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: dll/cpl/desk/dibitmap.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/currency.c
* PURPOSE: Currency property page
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/date.c
* PURPOSE: Date property page
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/generalp.c
* PURPOSE: General property page
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/inplocale.c
* PURPOSE: Input Locale property page
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/intl.c
* PURPOSE: Property sheet code
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/numbers.c
* PURPOSE: Numbers property page
-/* $Id$
- *
+/*
* PROJECT: ReactOS International Control Panel
* FILE: dll/cpl/intl/sort.c
* PURPOSE: Sorting property page
-/* $Id: appearance.c 13406 2005-02-04 20:39:10Z weiden $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS License Manager
* FILE: dll/cpl/liccpa/liccpa.c
-/* $Id: cplsample.rc 12852 2005-01-06 13:58:04Z mf $ */
#include <windows.h>
#include "resource.h"
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Main Control Panel
* FILE: dll/cpl/main/keyboard.c
* PURPOSE: Keyboard Control Panel
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Sample Control Panel
* FILE: dll/cpl/main/main.c
* PURPOSE: ReactOS Main Control Panel
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Main Control Panel
* FILE: dll/cpl/main/mouse.c
* PURPOSE: Mouse Control Panel
-/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $
- *
+/*
* PROJECT: ReactOS Multimedia Control Panel
* FILE: dll/cpl/mmsys/mmsys.c
* PURPOSE: ReactOS Multimedia Control Panel
-/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $
- *
+/*
* PROJECT: ReactOS Multimedia Control Panel
* FILE: dll/cpl/mmsys/mmsys.c
* PURPOSE: ReactOS Multimedia Control Panel
-/* $Id$
- *
+/*
* PROJECT: ReactOS ODBC Control Panel Applet
* FILE: dll/cpl/main/main.c
* PURPOSE: applet initialization
-/* $Id$
- *
+/*
* PROJECT: ReactOS Power Configuration Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/powercfg/advanced.c
-/* $Id$
- *
+/*
* PROJECT: ReactOS Power Configuration Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/powercfg/alarms.c
-/* $Id$
- *
+/*
* PROJECT: ReactOS Power Configuration Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/powercfg/hibernate.c
-/* $Id$
- *
+/*
* PROJECT: ReactOS Power Configuration Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/powercfg/powershemes.c
-/* $Id$
- *
+/*
* PROJECT: ReactOS Power Configuration Applet
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/cpl/powercfg/powershemes.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS User Manager Control Panel
* FILE: dll/cpl/usrmgr/extra.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS User Manager Control Panel
* FILE: dll/cpl/usrmgr/usrmgr.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Direct3D\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Direct3D\0"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/clipper/clipper_stubs.c
-/* $Id: clipper.c 24690 2006-11-05 21:19:53Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/clipper/clipper_stubs.c
-/* $Id: color.c 24690 2006-11-05 21:19:53Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/color/color.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/GetCaps.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/GetDeviceIdentifier.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/callbacks_dd_hel.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/ddraw_displaymode.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/ddraw_main.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/ddraw_main.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/ddraw/ddraw_stubs.c
-/* $Id: gamma.c 24690 2006-11-05 21:19:53Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/gamma/gamma_stubs.c
-/* $Id: kernel.c 24690 2006-11-05 21:19:53Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/kernel/kernel_stubs.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/surface/createsurface.c
-/* $Id: palette.c $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/Palette/palette.c
-/* $Id: palette.c 24690 2006-11-05 21:19:53Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/palette/palette_stubs.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/surface/callbacks_surf_hel.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/surface/createsurface.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/surface/surface_main.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/surface/surface_stubs.c
-/* $Id: videoport.c 22739 2006-07-01 12:08:35Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DirectX
* FILE: ddraw/videoport/videoport_stubs.c
-/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/ddraw/ddraw.c
-/* $Id$ */
#include "resource.h"
-
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/ddraw/ddraw.c
-/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/ddraw/ddraw.c
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Compatibility Layer Shell Extension
* FILE: lib/shellext/cplsample/cplsample.c
* PURPOSE: ReactOS Compatibility Layer Shell Extension
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/aclui.c
* PURPOSE: Access Control List Editor
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/checklist.c
* PURPOSE: Access Control List Editor
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/misc.c
* PURPOSE: Access Control List Editor
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: aclui.c 19715 2005-11-28 01:10:49Z weiden $
- *
+/*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/sidcache.c
* PURPOSE: Access Control List Editor
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/misc/dllmain.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/ac.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/audit.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/sec.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/sec/trustee.c
/* Try to open the existing event */
hEvent = OpenEventW(SYNCHRONIZE,
FALSE,
- L"SvcctrlStartEvent_A3752DX");
+ SCM_START_EVENT);
if (hEvent == NULL)
{
if (GetLastError() != ERROR_FILE_NOT_FOUND)
hEvent = CreateEventW(NULL,
TRUE,
FALSE,
- L"SvcctrlStartEvent_A3752DX");
+ SCM_START_EVENT);
if (hEvent == NULL)
{
/* Try to open the existing event again */
hEvent = OpenEventW(SYNCHRONIZE,
FALSE,
- L"SvcctrlStartEvent_A3752DX");
+ SCM_START_EVENT);
if (hEvent == NULL)
return;
}
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/advapi32/token/privilege.c
* MRU-Functions {COMCTL32}
*
* NOTES
- * The MRU-Api is a set of functions to manipulate lists of M.R.U. (Most Recently
- * Used) items. It is an undocumented Api that is used (at least) by the shell
+ * The MRU-API is a set of functions to manipulate lists of M.R.U. (Most Recently
+ * Used) items. It is an undocumented API that is used (at least) by the shell
* and explorer to implement their recent documents feature.
*
* Since these functions are undocumented, they are unsupported by MS and
systime->wHour, systime->wMinute, systime->wSecond);
if (flag == GDT_VALID) {
- if (systime->wYear == 0 ||
- systime->wMonth < 1 || systime->wMonth > 12 ||
- systime->wDay < 1 ||
- systime->wDay > MONTHCAL_MonthLength(systime->wMonth, systime->wYear) ||
- systime->wHour > 23 ||
- systime->wMinute > 59 ||
- systime->wSecond > 59 ||
- systime->wMilliseconds > 999
- )
- return FALSE;
+ if (systime->wYear == 0 ||
+ systime->wMonth < 1 || systime->wMonth > 12 ||
+ systime->wDay < 1 ||
+ systime->wDay > MONTHCAL_MonthLength(systime->wMonth, systime->wYear) ||
+ systime->wHour > 23 ||
+ systime->wMinute > 59 ||
+ systime->wSecond > 59 ||
+ systime->wMilliseconds > 999
+ )
+ return FALSE;
/* Windows returns true if the date is valid but outside the limits set */
if (DATETIME_IsDateInValidRange(infoPtr, systime) == FALSE)
/**************************************************************************
* DPA_Clone [COMCTL32.331]
*
- * Copies a pointer array to an other one or creates a copy
+ * Copies a pointer array to another one or creates a copy
*
* PARAMS
* hdpa [I] handle (pointer) to the existing (source) pointer array
{
HWND hwnd;
HIMAGELIST himl;
+ HIMAGELIST himlNoCursor;
/* position of the drag image relative to the window */
INT x;
INT y;
HBITMAP hbmBg;
} INTERNALDRAG;
-static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 };
+static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, 0, FALSE, 0 };
static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count);
static HRESULT ImageListImpl_CreateInstance(const IUnknown *pUnkOuter, REFIID iid, void** ppv);
cx = himlTrack->cx;
cy = himlTrack->cy;
- InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1);
+ InternalDrag.himlNoCursor = InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1);
if (InternalDrag.himl == NULL) {
WARN("Error creating drag image list!\n");
return FALSE;
{
/* cleanup the InternalDrag struct */
InternalDrag.hwnd = 0;
+ if (InternalDrag.himl != InternalDrag.himlNoCursor)
+ ImageList_Destroy (InternalDrag.himlNoCursor);
ImageList_Destroy (InternalDrag.himl);
- InternalDrag.himl = 0;
+ InternalDrag.himlNoCursor = InternalDrag.himl = 0;
InternalDrag.x= 0;
InternalDrag.y= 0;
InternalDrag.dxHotspot = 0;
INT cxDst, cyDst;
INT xOff1, yOff1, xOff2, yOff2;
POINT pt1, pt2;
+ INT newFlags;
TRACE("(himl1=%p i1=%d himl2=%p i2=%d dx=%d dy=%d)\n", himl1, i1, himl2,
i2, dx, dy);
yOff2 = 0;
}
- himlDst = ImageList_Create (cxDst, cyDst, ILC_MASK | ILC_COLOR, 1, 1);
+ newFlags = (himl1->flags > himl2->flags ? himl1->flags : himl2->flags) & ILC_COLORDDB;
+ if (newFlags == ILC_COLORDDB && (himl1->flags & ILC_COLORDDB) == ILC_COLOR16)
+ newFlags = ILC_COLOR16; /* this is what native (at least v5) does, don't know why */
+ himlDst = ImageList_Create (cxDst, cyDst, ILC_MASK | newFlags, 1, 1);
if (himlDst)
{
BitBlt (himlDst->hdcImage, xOff1, yOff1, himl1->cx, himl1->cy, himl1->hdcImage, pt1.x, pt1.y, SRCCOPY);
if (i2 >= 0 && i2 < himl2->cCurImage)
{
- BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND);
- BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT);
+ if (himl2->flags & ILC_MASK)
+ {
+ BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND);
+ BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT);
+ }
+ else
+ BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCCOPY);
}
/* copy mask */
void *image_bits, *mask_bits = NULL;
ILHEAD ilHead;
HIMAGELIST himl;
- int i;
+ unsigned int i;
TRACE("%p\n", pstm);
visible = InternalDrag.bShow;
- himlTemp = ImageList_Merge (InternalDrag.himl, 0, himlDrag, iDrag,
+ himlTemp = ImageList_Merge (InternalDrag.himlNoCursor, 0, himlDrag, iDrag,
dxHotspot, dyHotspot);
if (visible) {
InternalDrag.hbmBg = 0;
}
- ImageList_Destroy (InternalDrag.himl);
+ if (InternalDrag.himl != InternalDrag.himlNoCursor)
+ ImageList_Destroy (InternalDrag.himl);
InternalDrag.himl = himlTemp;
if (visible) {
* Copyright 2000 Jason Mawdsley
* Copyright 2001 CodeWeavers Inc.
* Copyright 2002 Dimitrie O. Paun
- * Copyright 2009-2012 Nikolay Sivov
+ * Copyright 2009-2013 Nikolay Sivov
* Copyright 2009 Owen Rudge for CodeWeavers
+ * Copyright 2012-2013 Daniel Jelinski
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* -- LVA_SNAPTOGRID not implemented
* -- LISTVIEW_ApproximateViewRect partially implemented
* -- LISTVIEW_SetColumnWidth ignores header images & bitmap
- * -- LISTVIEW_SetIconSpacing is incomplete
* -- LISTVIEW_StyleChanged doesn't handle some changes too well
*
* Speedups
* States
* -- LVIS_ACTIVATING (not currently supported by comctl32.dll version 6.0)
* -- LVIS_DROPHILITED
- * -- LVIS_OVERLAYMASK
*
* Styles
* -- LVS_NOLABELWRAP
* -- LVN_GETINFOTIP
* -- LVN_HOTTRACK
* -- LVN_SETDISPINFO
- * -- LVN_BEGINRDRAG
*
* Messages:
* -- LVM_ENABLEGROUPVIEW
HIMAGELIST himlSmall;
HIMAGELIST himlState;
SIZE iconSize;
+ BOOL autoSpacing;
SIZE iconSpacing;
SIZE iconStateSize;
POINT currIconPos; /* this is the position next icon will be placed */
/* mouse operation */
BOOL bLButtonDown;
- BOOL bRButtonDown;
BOOL bDragging;
POINT ptClickPos; /* point where the user clicked */
INT nLButtonDownItem; /* tracks item to reset multiselection on WM_LBUTTONUP */
DWORD dwHoverTime;
HCURSOR hHotCursor;
+ INT cWheelRemainder;
/* keyboard operation */
DWORD lastKeyPressTimestamp;
}
/* forwards header notifications to listview parent */
-static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADERW *lpnmh)
+static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, NMHEADERW *lpnmhW)
{
- NMHEADERA nmhA;
- HDITEMA hditema;
- HD_TEXTFILTERA textfilter;
- LPSTR text = NULL, filter = NULL;
+ LPCWSTR text = NULL, filter = NULL;
LRESULT ret;
+ NMHEADERA *lpnmh = (NMHEADERA*) lpnmhW;
/* on unicode format exit earlier */
if (infoPtr->notifyFormat == NFR_UNICODE)
/* header always supplies unicode notifications,
all we have to do is to convert strings to ANSI */
- nmhA = *(const NMHEADERA*)lpnmh;
if (lpnmh->pitem)
{
- hditema = *(HDITEMA*)lpnmh->pitem;
- nmhA.pitem = &hditema;
/* convert item text */
if (lpnmh->pitem->mask & HDI_TEXT)
{
- hditema.pszText = NULL;
- Str_SetPtrWtoA(&hditema.pszText, lpnmh->pitem->pszText);
- text = hditema.pszText;
+ text = (LPCWSTR)lpnmh->pitem->pszText;
+ Str_SetPtrWtoA(&lpnmh->pitem->pszText, text);
}
/* convert filter text */
if ((lpnmh->pitem->mask & HDI_FILTER) && (lpnmh->pitem->type == HDFT_ISSTRING) &&
lpnmh->pitem->pvFilter)
{
- hditema.pvFilter = &textfilter;
- textfilter = *(HD_TEXTFILTERA*)(lpnmh->pitem->pvFilter);
- textfilter.pszText = NULL;
- Str_SetPtrWtoA(&textfilter.pszText, ((HD_TEXTFILTERW*)lpnmh->pitem->pvFilter)->pszText);
- filter = textfilter.pszText;
+ filter = (LPCWSTR)((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText;
+ Str_SetPtrWtoA(&((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText, filter);
}
}
- nmhA.hdr.code = get_ansi_notification(lpnmh->hdr.code);
+ lpnmh->hdr.code = get_ansi_notification(lpnmh->hdr.code);
- ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhA.hdr.idFrom,
- (LPARAM)&nmhA);
+ ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmh->hdr.idFrom,
+ (LPARAM)lpnmh);
/* cleanup */
- Free(text);
- Free(filter);
+ if(text)
+ {
+ Free(lpnmh->pitem->pszText);
+ lpnmh->pitem->pszText = (LPSTR)text;
+ }
+ if(filter)
+ {
+ Free(((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText);
+ ((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText = (LPSTR)filter;
+ }
return ret;
}
return notify_hdr(infoPtr, code, (LPNMHDR)plvnm);
}
+/* Handles NM_DBLCLK, NM_CLICK, NM_RDBLCLK, NM_RCLICK. Only NM_RCLICK return value is used. */
static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTESTINFO *lvht)
{
NMITEMACTIVATE nmia;
LVITEMW item;
HWND hwnd = infoPtr->hwndSelf;
+ LRESULT ret;
TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht));
ZeroMemory(&nmia, sizeof(nmia));
item.iItem = lvht->iItem;
item.iSubItem = 0;
if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmia.lParam = item.lParam;
- notify_hdr(infoPtr, code, (LPNMHDR)&nmia);
- return IsWindow(hwnd);
+ ret = notify_hdr(infoPtr, code, (NMHDR*)&nmia);
+ return IsWindow(hwnd) && (code == NM_RCLICK ? !ret : TRUE);
}
static BOOL notify_deleteitem(const LISTVIEW_INFO *infoPtr, INT nItem)
/* set header font */
SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, TRUE);
+ /* set header image list */
+ if (infoPtr->himlSmall)
+ SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)infoPtr->himlSmall);
+
LISTVIEW_UpdateSize(infoPtr);
return 0;
static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, LPARAM keyData)
{
WCHAR buffer[MAX_PATH];
- INT endidx, startidx;
DWORD prevTime;
LVITEMW item;
+ int startidx;
INT nItem;
INT diff;
infoPtr->nSearchParamLength = 1;
}
- /* and search from the current position */
- nItem = -1;
- endidx = infoPtr->nItemCount;
-
/* should start from next after focused item, so next item that matches
will be selected, if there isn't any and focused matches it will be selected
on second search stage from beginning of the list */
if (infoPtr->nFocusedItem >= 0 && infoPtr->nItemCount > 1)
- startidx = infoPtr->nFocusedItem + 1;
+ {
+ /* with some accumulated search data available start with current focus, otherwise
+ it's excluded from search */
+ startidx = infoPtr->nSearchParamLength > 1 ? infoPtr->nFocusedItem : infoPtr->nFocusedItem + 1;
+ if (startidx == infoPtr->nItemCount) startidx = 0;
+ }
else
startidx = 0;
}
else
{
- INT i = startidx;
+ int i = startidx, endidx;
+
+ /* and search from the current position */
+ nItem = -1;
+ endidx = infoPtr->nItemCount;
/* first search in [startidx, endidx), on failure continue in [0, startidx) */
while (1)
item.cchTextMax = MAX_PATH;
if (!LISTVIEW_GetItemW(infoPtr, &item)) return 0;
- if (lstrncmpiW(item.pszText, infoPtr->szSearchParam, infoPtr->nSearchParamLength) == 0)
+ if (!lstrncmpiW(item.pszText, infoPtr->szSearchParam, infoPtr->nSearchParamLength))
{
nItem = i;
break;
}
- else if (nItem == -1 && lstrncmpiW(item.pszText, infoPtr->szSearchParam, 1) == 0)
+ /* this is used to find first char match when search string is not available yet,
+ otherwise every WM_CHAR will search to next item by first char, ignoring that we're
+ already waiting for user to complete a string */
+ else if (nItem == -1 && infoPtr->nSearchParamLength == 1 && !lstrncmpiW(item.pszText, infoPtr->szSearchParam, 1))
{
/* this would work but we must keep looking for a longer match */
nItem = i;
Icon.top = Box.top;
Icon.right = Icon.left;
if (infoPtr->himlSmall &&
- (!lpColumnInfo || lpLVItem->iSubItem == 0 || (lpColumnInfo->fmt & LVCFMT_IMAGE) ||
+ (!lpColumnInfo || lpLVItem->iSubItem == 0 ||
((infoPtr->dwLvExStyle & LVS_EX_SUBITEMIMAGES) && lpLVItem->iImage != I_IMAGECALLBACK)))
Icon.right += infoPtr->iconSize.cx;
Icon.bottom = Icon.top + infoPtr->iconSize.cy;
nItemHeight = infoPtr->iconSpacing.cy;
else
{
- nItemHeight = infoPtr->ntmHeight;
- if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
- nItemHeight++;
+ nItemHeight = infoPtr->ntmHeight;
if (infoPtr->himlState)
nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy);
if (infoPtr->himlSmall)
nItemHeight = max(nItemHeight, infoPtr->iconSize.cy);
- if (infoPtr->himlState || infoPtr->himlSmall)
- nItemHeight += HEIGHT_PADDING;
+ nItemHeight += HEIGHT_PADDING;
if (infoPtr->nMeasureItemHeight > 0)
nItemHeight = infoPtr->nMeasureItemHeight;
}
return oldFocus != infoPtr->nFocusedItem;
}
-/* Helper function for LISTVIEW_ShiftIndices *only* */
static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, INT direction)
{
if (nShiftItem < nItem) return nShiftItem;
return min(nShiftItem, infoPtr->nItemCount - 1);
}
+/* This function updates focus index.
+
+Parameters:
+ focus : current focus index
+ item : index of item to be added/removed
+ direction : add/remove flag
+*/
+static void LISTVIEW_ShiftFocus(LISTVIEW_INFO *infoPtr, INT focus, INT item, INT direction)
+{
+ BOOL old_change = infoPtr->bDoChangeNotify;
+
+ infoPtr->bDoChangeNotify = FALSE;
+ focus = shift_item(infoPtr, focus, item, direction);
+ if (focus != infoPtr->nFocusedItem)
+ LISTVIEW_SetItemFocus(infoPtr, focus);
+ infoPtr->bDoChangeNotify = old_change;
+}
+
/**
* DESCRIPTION:
* Updates the various indices after an item has been inserted or deleted.
*/
static void LISTVIEW_ShiftIndices(LISTVIEW_INFO *infoPtr, INT nItem, INT direction)
{
- INT nNewFocus;
- BOOL bOldChange;
-
- /* temporarily disable change notification while shifting items */
- bOldChange = infoPtr->bDoChangeNotify;
- infoPtr->bDoChangeNotify = FALSE;
-
- TRACE("Shifting %iu, %i steps\n", nItem, direction);
+ TRACE("Shifting %i, %i steps\n", nItem, direction);
ranges_shift(infoPtr->selectionRanges, nItem, direction, infoPtr->nItemCount);
-
assert(abs(direction) == 1);
-
infoPtr->nSelectionMark = shift_item(infoPtr, infoPtr->nSelectionMark, nItem, direction);
- nNewFocus = shift_item(infoPtr, infoPtr->nFocusedItem, nItem, direction);
- if (nNewFocus != infoPtr->nFocusedItem)
- LISTVIEW_SetItemFocus(infoPtr, nNewFocus);
-
/* But we are not supposed to modify nHotItem! */
-
- infoPtr->bDoChangeNotify = bOldChange;
}
-
/**
* DESCRIPTION:
* Adds a block of selections.
ZeroMemory(&nmlv, sizeof(nmlv));
nmlv.iFrom = nFirst;
nmlv.iTo = nLast;
- nmlv.uNewState = 0;
- nmlv.uOldState = item.state;
+ nmlv.uOldState = 0;
+ nmlv.uNewState = item.state;
notify_hdr(infoPtr, LVN_ODSTATECHANGED, (LPNMHDR)&nmlv);
if (!IsWindow(hwndSelf))
POINT ptItem;
rcItem.left = LVIR_BOUNDS;
- if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return;
+ if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) {
+ ranges_destroy (selection);
+ return;
+ }
rcSelMark.left = LVIR_BOUNDS;
- if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) return;
+ if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) {
+ ranges_destroy (selection);
+ return;
+ }
UnionRect(&rcSel, &rcItem, &rcSelMark);
iterator_frameditems(&i, infoPtr, &rcSel);
while(iterator_next(&i))
*/
static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y)
{
+ LVHITTESTINFO ht;
+ RECT rect;
+ POINT pt;
+
if (!(fwKeys & MK_LBUTTON))
infoPtr->bLButtonDown = FALSE;
if (infoPtr->bLButtonDown)
{
- POINT tmp;
- RECT rect;
- LVHITTESTINFO lvHitTestInfo;
- WORD wDragWidth = GetSystemMetrics(SM_CXDRAG);
- WORD wDragHeight= GetSystemMetrics(SM_CYDRAG);
+ rect.left = rect.right = infoPtr->ptClickPos.x;
+ rect.top = rect.bottom = infoPtr->ptClickPos.y;
+
+ InflateRect(&rect, GetSystemMetrics(SM_CXDRAG), GetSystemMetrics(SM_CYDRAG));
+ }
+ if (infoPtr->bLButtonDown)
+ {
if (infoPtr->bMarqueeSelect)
{
POINT coords_orig;
return 0;
}
- rect.left = infoPtr->ptClickPos.x - wDragWidth;
- rect.right = infoPtr->ptClickPos.x + wDragWidth;
- rect.top = infoPtr->ptClickPos.y - wDragHeight;
- rect.bottom = infoPtr->ptClickPos.y + wDragHeight;
-
- tmp.x = x;
- tmp.y = y;
+ pt.x = x;
+ pt.y = y;
- lvHitTestInfo.pt = tmp;
- LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
+ ht.pt = pt;
+ LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE);
/* reset item marker */
- if (infoPtr->nLButtonDownItem != lvHitTestInfo.iItem)
+ if (infoPtr->nLButtonDownItem != ht.iItem)
infoPtr->nLButtonDownItem = -1;
- if (!PtInRect(&rect, tmp))
+ if (!PtInRect(&rect, pt))
{
/* this path covers the following:
1. WM_LBUTTONDOWN over selected item (sets focus on it)
if (!infoPtr->bDragging)
{
- lvHitTestInfo.pt = infoPtr->ptClickPos;
- LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
+ ht.pt = infoPtr->ptClickPos;
+ LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE);
/* If the click is outside the range of an item, begin a
highlight. If not, begin an item drag. */
- if (lvHitTestInfo.iItem == -1)
+ if (ht.iItem == -1)
{
NMHDR hdr;
NMLISTVIEW nmlv;
ZeroMemory(&nmlv, sizeof(nmlv));
- nmlv.iItem = lvHitTestInfo.iItem;
+ nmlv.iItem = ht.iItem;
nmlv.ptAction = infoPtr->ptClickPos;
notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv);
/***
* DESCRIPTION:
- * Helper for LISTVIEW_SetItemT *only*: sets item attributes.
+ * Helper for LISTVIEW_SetItemT and LISTVIEW_InsertItemT: sets item attributes.
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
if ((lpLVItem->mask & LVIF_TEXT) && textcmpWT(lpItem->hdr.pszText, lpLVItem->pszText, isW))
uChanged |= LVIF_TEXT;
- TRACE("uChanged=0x%x\n", uChanged);
- if (!uChanged) return TRUE;
- *bChanged = TRUE;
+ TRACE("change mask=0x%x\n", uChanged);
- ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
+ memset(&nmlv, 0, sizeof(NMLISTVIEW));
nmlv.iItem = lpLVItem->iItem;
nmlv.uNewState = (item.state & ~stateMask) | (lpLVItem->state & stateMask);
nmlv.uOldState = item.state;
- nmlv.uChanged = uChanged;
+ nmlv.uChanged = uChanged ? uChanged : lpLVItem->mask;
nmlv.lParam = item.lParam;
-
- /* send LVN_ITEMCHANGING notification, if the item is not being inserted */
- /* and we are _NOT_ virtual (LVS_OWNERDATA), and change notifications */
- /* are enabled */
+
+ /* Send LVN_ITEMCHANGING notification, if the item is not being inserted
+ and we are _NOT_ virtual (LVS_OWNERDATA), and change notifications
+ are enabled. Even nothing really changed we still need to send this,
+ in this case uChanged mask is just set to passed item mask. */
if(lpItem && !isNew && infoPtr->bDoChangeNotify)
{
HWND hwndSelf = infoPtr->hwndSelf;
return FALSE;
}
+ /* When item is inserted we need to shift existing focus index if new item has lower index. */
+ if (isNew && (stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED) &&
+ /* this means we won't hit a focus change path later */
+ ((uChanged & LVIF_STATE) == 0 || (!(lpLVItem->state & LVIS_FOCUSED) && (infoPtr->nFocusedItem != lpLVItem->iItem))))
+ {
+ if (infoPtr->nFocusedItem != -1 && (lpLVItem->iItem <= infoPtr->nFocusedItem))
+ infoPtr->nFocusedItem++;
+ }
+
+ if (!uChanged) return TRUE;
+ *bChanged = TRUE;
+
/* copy information */
if (lpLVItem->mask & LVIF_TEXT)
textsetptrT(&lpItem->hdr.pszText, lpLVItem->pszText, isW);
{
ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem);
}
- /* if we are asked to change focus, and we manage it, do it */
+ /* If we are asked to change focus, and we manage it, do it.
+ It's important to have all new item data stored at this point,
+ because changing existing focus could result in a redrawing operation,
+ which in turn could ask for disp data, application should see all data
+ for inserted item when processing LVN_GETDISPINFO.
+
+ The way this works application will see nested item change notifications -
+ changed item notifications interrupted by ones from item losing focus. */
if (stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED)
{
if (lpLVItem->state & LVIS_FOCUSED)
/* if we're inserting the item, we're done */
if (isNew) return TRUE;
-
+
/* send LVN_ITEMCHANGED notification */
if (lpLVItem->mask & LVIF_PARAM) nmlv.lParam = lpLVItem->lParam;
if (infoPtr->bDoChangeNotify) notify_listview(infoPtr, LVN_ITEMCHANGED, &nmlv);
NMLVCUSTOMDRAW nmlvcd;
HIMAGELIST himl;
LVITEMW lvItem;
- HFONT hOldFont;
TRACE("(hdc=%p, nItem=%d, nSubItem=%d, pos=%s)\n", hdc, nItem, nSubItem, wine_dbgstr_point(&pos));
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
if (nSubItem == 0) lvItem.mask |= LVIF_STATE;
if (infoPtr->uView == LV_VIEW_DETAILS) lvItem.mask |= LVIF_INDENT;
- lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED | LVIS_STATEIMAGEMASK | LVIS_CUT;
+ lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED | LVIS_STATEIMAGEMASK | LVIS_CUT | LVIS_OVERLAYMASK;
lvItem.iItem = nItem;
lvItem.iSubItem = nSubItem;
lvItem.state = 0;
/* fill in the custom draw structure */
customdraw_fill(&nmlvcd, infoPtr, hdc, &rcBox, &lvItem);
- hOldFont = GetCurrentObject(hdc, OBJ_FONT);
if (nSubItem > 0) cdmode = infoPtr->cditemmode;
if (cdmode & CDRF_SKIPDEFAULT) goto postpaint;
if (cdmode & CDRF_NOTIFYITEMDRAW)
if (nSubItem == 0) infoPtr->cditemmode = cdsubitemmode;
if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint;
/* we have to send a CDDS_SUBITEM customdraw explicitly for subitem 0 */
- if (nSubItem == 0 && cdsubitemmode == CDRF_NOTIFYITEMDRAW)
+ if (nSubItem == 0 && (cdsubitemmode & CDRF_NOTIFYITEMDRAW) != 0)
{
cdsubitemmode = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd);
if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint;
else if ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) == FALSE)
prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE);
- /* in full row select, subitems, will just use main item's colors */
- if (nSubItem && infoPtr->uView == LV_VIEW_DETAILS && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
- nmlvcd.clrTextBk = CLR_NONE;
-
/* FIXME: temporary hack */
rcSelect.left = rcLabel.left;
- /* draw the selection background, if we're drawing the main item */
- if (nSubItem == 0)
- {
- /* in icon mode, the label rect is really what we want to draw the
- * background for */
- if (infoPtr->uView == LV_VIEW_ICON)
- rcSelect = rcLabel;
+ /* in icon mode, the label rect is really what we want to draw the
+ * background for */
+ /* in detail mode, we want to paint background for label rect when
+ * item is not selected or listview has full row select; otherwise paint
+ * background for text only */
+ if (infoPtr->uView == LV_VIEW_ICON ||
+ (infoPtr->uView == LV_VIEW_DETAILS &&
+ (!(lvItem.state & LVIS_SELECTED) ||
+ (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) != 0)))
+ rcSelect = rcLabel;
+
+ if (nmlvcd.clrTextBk != CLR_NONE)
+ ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, NULL, 0, NULL);
+ if(nSubItem == 0 && infoPtr->nFocusedItem == nItem)
+ {
if (infoPtr->uView == LV_VIEW_DETAILS && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
{
/* we have to update left focus bound too if item isn't in leftmost column
rcSelect.right = rcBox.right;
}
- if (nmlvcd.clrTextBk != CLR_NONE)
- ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, NULL, 0, NULL);
/* store new focus rectangle */
- if (infoPtr->nFocusedItem == nItem) infoPtr->rcFocus = rcSelect;
+ infoPtr->rcFocus = rcSelect;
}
/* state icons */
ImageList_DrawEx(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
rcIcon.right - rcIcon.left, rcIcon.bottom - rcIcon.top, infoPtr->clrBk,
lvItem.state & LVIS_CUT ? RGB(255, 255, 255) : CLR_DEFAULT,
- style);
+ style | (lvItem.state & LVIS_OVERLAYMASK));
}
/* Don't bother painting item being edited */
postpaint:
if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT)
notify_postpaint(infoPtr, &nmlvcd);
- if (cdsubitemmode & CDRF_NEWFONT)
- SelectObject(hdc, hOldFont);
return TRUE;
}
/* iterate through the invalidated rows */
while(iterator_next(i))
{
+ SelectObject(hdc, infoPtr->hFont);
LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position);
Position.y += Origin.y;
SelectObject( hdc, hOldPen );
DeleteObject( hPen );
}
+ else
+ ranges_destroy(colRanges);
}
/***
while(iterator_prev(i))
{
+ SelectObject(hdc, infoPtr->hFont);
LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position);
Position.x += Origin.x;
Position.y += Origin.y;
*/
static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcErase)
{
- COLORREF oldTextColor = 0, oldBkColor = 0, oldClrTextBk, oldClrText;
+ COLORREF oldTextColor = 0, oldBkColor = 0;
NMLVCUSTOMDRAW nmlvcd;
HFONT hOldFont = 0;
DWORD cdmode;
hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top, SRCCOPY);
}
- /* FIXME: Shouldn't need to do this */
- oldClrTextBk = infoPtr->clrTextBk;
- oldClrText = infoPtr->clrText;
-
infoPtr->cditemmode = CDRF_DODEFAULT;
GetClientRect(infoPtr->hwndSelf, &rcClient);
customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0);
cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd);
if (cdmode & CDRF_SKIPDEFAULT) goto enddraw;
- prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
-
- /* Use these colors to draw the items */
- infoPtr->clrTextBk = nmlvcd.clrTextBk;
- infoPtr->clrText = nmlvcd.clrText;
/* nothing to draw */
if(infoPtr->nItemCount == 0) goto enddraw;
if (cdmode & CDRF_NOTIFYPOSTPAINT)
notify_postpaint(infoPtr, &nmlvcd);
- infoPtr->clrTextBk = oldClrTextBk;
- infoPtr->clrText = oldClrText;
-
if(hbmp) {
BitBlt(hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top,
infoPtr->rcList.right - infoPtr->rcList.left,
POINT pos;
HDC hdc, hdcOrig;
HBITMAP hbmp, hOldbmp;
+ HFONT hOldFont;
HIMAGELIST dragList = 0;
TRACE("iItem=%d Count=%d\n", iItem, infoPtr->nItemCount);
hdc = CreateCompatibleDC(hdcOrig);
hbmp = CreateCompatibleBitmap(hdcOrig, size.cx, size.cy);
hOldbmp = SelectObject(hdc, hbmp);
+ hOldFont = SelectObject(hdc, infoPtr->hFont);
rcItem.left = rcItem.top = 0;
rcItem.right = size.cx;
else
SelectObject(hdc, hOldbmp);
+ SelectObject(hdc, hOldFont);
DeleteObject(hbmp);
DeleteDC(hdc);
ReleaseDC(infoPtr->hwndSelf, hdcOrig);
TRACE("rcScroll=%s, dx=%d\n", wine_dbgstr_rect(&rcScroll), dir * infoPtr->nItemHeight);
if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList))
{
- TRACE("Scrolling rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList));
- ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight,
- &rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE);
+ TRACE("Invalidating rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList));
+ InvalidateRect(infoPtr->hwndSelf, &rcScroll, TRUE);
}
/* report has only that column, so we're done */
rcScroll.bottom = nPerCol * infoPtr->nItemHeight;
OffsetRect(&rcScroll, Origin.x, Origin.y);
if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList))
- ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight,
- &rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE);
+ InvalidateRect(infoPtr->hwndSelf, &rcScroll, TRUE);
}
/***
{
LVITEMW item;
const BOOL is_icon = (infoPtr->uView == LV_VIEW_SMALLICON || infoPtr->uView == LV_VIEW_ICON);
+ INT focus = infoPtr->nFocusedItem;
TRACE("(nItem=%d)\n", nItem);
item.state = 0;
item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
LISTVIEW_SetItemState(infoPtr, nItem, &item);
-
+
/* send LVN_DELETEITEM notification. */
if (!notify_deleteitem(infoPtr, nItem)) return FALSE;
infoPtr->nItemCount--;
LISTVIEW_ShiftIndices(infoPtr, nItem, -1);
+ LISTVIEW_ShiftFocus(infoPtr, focus, nItem, -1);
/* now is the invalidation fun */
if (!is_icon)
HDPA hdpaSubItems;
INT isubitem;
- TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
+ TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
return FALSE;
*
* NOTE: for subItem = 0, we should return the bounds of the _entire_ item,
* not only those of the first column.
- * Fortunately, LISTVIEW_GetItemMetrics does the right thing.
*
* RETURN:
* TRUE: success
* FALSE: failure
*/
-static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lprc)
+static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT item, LPRECT lprc)
{
- POINT Position, Origin;
- LVITEMW lvItem;
- INT nColumn;
+ RECT rect = { 0, 0, 0, 0 };
+ POINT origin;
+ INT y;
if (!lprc) return FALSE;
- nColumn = lprc->top;
-
- TRACE("(nItem=%d, nSubItem=%d, type=%d)\n", nItem, lprc->top, lprc->left);
- /* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
+ TRACE("(item=%d, subitem=%d, type=%d)\n", item, lprc->top, lprc->left);
+ /* Subitem of '0' means item itself, and this works for all control view modes */
if (lprc->top == 0)
- return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
+ return LISTVIEW_GetItemRect(infoPtr, item, lprc);
if (infoPtr->uView != LV_VIEW_DETAILS) return FALSE;
- /* special case for header items */
- if (nItem == -1)
- {
- if (lprc->left != LVIR_BOUNDS)
- {
- FIXME("Only LVIR_BOUNDS is implemented for header, got %d\n", lprc->left);
- return FALSE;
- }
+ LISTVIEW_GetOrigin(infoPtr, &origin);
+ /* this works for any item index, no matter if it exists or not */
+ y = item * infoPtr->nItemHeight + origin.y;
- if (infoPtr->hwndHeader)
- return SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)lprc);
- else
- {
- memset(lprc, 0, sizeof(RECT));
- return TRUE;
- }
+ if (infoPtr->hwndHeader && SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)&rect))
+ {
+ rect.top = 0;
+ rect.bottom = infoPtr->nItemHeight;
+ }
+ else
+ {
+ /* Native implementation is broken for this case and garbage is left for left and right fields,
+ we zero them to get predictable output */
+ lprc->left = lprc->right = lprc->top = 0;
+ lprc->bottom = infoPtr->nItemHeight;
+ OffsetRect(lprc, origin.x, y);
+ TRACE("return rect %s\n", wine_dbgstr_rect(lprc));
+ return TRUE;
}
- if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
- LISTVIEW_GetOrigin(infoPtr, &Origin);
-
- if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE;
-
- lvItem.mask = 0;
- lvItem.iItem = nItem;
- lvItem.iSubItem = nColumn;
-
- switch(lprc->left)
+ switch (lprc->left)
{
case LVIR_ICON:
- LISTVIEW_GetItemMetrics(infoPtr, &lvItem, NULL, NULL, lprc, NULL, NULL);
- break;
+ {
+ /* it doesn't matter if main item actually has an icon, if imagelist is set icon width is returned */
+ if (infoPtr->himlSmall)
+ rect.right = rect.left + infoPtr->iconSize.cx;
+ else
+ rect.right = rect.left;
+ rect.bottom = rect.top + infoPtr->iconSize.cy;
+ break;
+ }
case LVIR_LABEL:
case LVIR_BOUNDS:
- LISTVIEW_GetItemMetrics(infoPtr, &lvItem, lprc, NULL, NULL, NULL, NULL);
break;
default:
return FALSE;
}
- OffsetRect(lprc, Origin.x, Position.y);
+ OffsetRect(&rect, origin.x, y);
+ *lprc = rect;
TRACE("return rect %s\n", wine_dbgstr_rect(lprc));
return TRUE;
LVITEMW item;
HWND hwndSelf = infoPtr->hwndSelf;
- TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
+ TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
if (infoPtr->dwStyle & LVS_OWNERDATA) return infoPtr->nItemCount++;
else
nItem = min(lpLVItem->iItem, infoPtr->nItemCount);
- TRACE(" inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem);
+ TRACE("inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem);
nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems );
if (nItem == -1) goto fail;
infoPtr->nItemCount++;
item.state &= ~LVIS_STATEIMAGEMASK;
item.state |= INDEXTOSTATEIMAGEMASK(1);
}
+
if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo;
/* make room for the position, if we are in the right mode */
goto undo;
}
}
-
+
/* send LVN_INSERTITEM notification */
- ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
+ memset(&nmlv, 0, sizeof(NMLISTVIEW));
nmlv.iItem = nItem;
nmlv.lParam = lpItem->lParam;
notify_listview(infoPtr, LVN_INSERTITEM, &nmlv);
undo:
LISTVIEW_ShiftIndices(infoPtr, nItem, -1);
+ LISTVIEW_ShiftFocus(infoPtr, infoPtr->nFocusedItem, nItem, -1);
DPA_DeletePtr(infoPtr->hdpaItems, nItem);
infoPtr->nItemCount--;
fail:
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 0;
lvItem.iSubItem = nColumn;
- lvItem.pszText = szDispText;
lvItem.cchTextMax = DISP_TEXT_SIZE;
for (; lvItem.iItem < infoPtr->nItemCount; lvItem.iItem++)
{
+ lvItem.pszText = szDispText;
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue;
nLabelWidth = LISTVIEW_GetStringWidthT(infoPtr, lvItem.pszText, TRUE);
if (max_cx < nLabelWidth) max_cx = nLabelWidth;
*/
static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy)
{
+ INT iconWidth = 0, iconHeight = 0;
DWORD oldspacing = MAKELONG(infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy);
TRACE("requested=(%d,%d)\n", cx, cy);
-
- /* this is supported only for LVS_ICON style */
- if (infoPtr->uView != LV_VIEW_ICON) return oldspacing;
-
- /* set to defaults, if instructed to */
- if (cx == -1) cx = GetSystemMetrics(SM_CXICONSPACING);
- if (cy == -1) cy = GetSystemMetrics(SM_CYICONSPACING);
- /* if 0 then compute width
- * FIXME: computed cx and cy is not matching native behaviour */
- if (cx == 0) {
- cx = GetSystemMetrics(SM_CXICONSPACING);
- if (infoPtr->iconSize.cx + ICON_LR_PADDING > cx)
- cx = infoPtr->iconSize.cx + ICON_LR_PADDING;
+ /* set to defaults, if instructed to */
+ if (cx == -1 && cy == -1)
+ {
+ infoPtr->autoSpacing = TRUE;
+ if (infoPtr->himlNormal)
+ ImageList_GetIconSize(infoPtr->himlNormal, &iconWidth, &iconHeight);
+ cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON) + iconWidth;
+ cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON) + iconHeight;
}
+ else
+ infoPtr->autoSpacing = FALSE;
- /* if 0 then compute height */
- if (cy == 0)
- cy = infoPtr->iconSize.cy + 2 * infoPtr->ntmHeight +
- ICON_BOTTOM_PADDING + ICON_TOP_PADDING + LABEL_VERT_PADDING;
-
+ /* if 0 then keep width */
+ if (cx != 0)
+ infoPtr->iconSpacing.cx = cx;
- infoPtr->iconSpacing.cx = cx;
- infoPtr->iconSpacing.cy = cy;
+ /* if 0 then keep height */
+ if (cy != 0)
+ infoPtr->iconSpacing.cy = cy;
TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n",
- LOWORD(oldspacing), HIWORD(oldspacing), cx, cy,
+ LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy,
infoPtr->iconSize.cx, infoPtr->iconSize.cy,
infoPtr->ntmHeight);
himlOld = infoPtr->himlNormal;
infoPtr->himlNormal = himl;
if (infoPtr->uView == LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, FALSE);
- LISTVIEW_SetIconSpacing(infoPtr, 0, 0);
+ if (infoPtr->autoSpacing)
+ LISTVIEW_SetIconSpacing(infoPtr, -1, -1);
break;
case LVSIL_SMALL:
himlOld = infoPtr->himlSmall;
infoPtr->himlSmall = himl;
if (infoPtr->uView != LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, TRUE);
+ if (infoPtr->hwndHeader)
+ SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)himl);
break;
case LVSIL_STATE:
UINT oldstate = 0;
BOOL notify;
+ /* special case optimization for recurring attempt to deselect all */
+ if (lvItem.state == 0 && lvItem.stateMask == LVIS_SELECTED && !LISTVIEW_GetSelectedCount(infoPtr))
+ return TRUE;
+
/* select all isn't allowed in LVS_SINGLESEL */
if ((lvItem.state & lvItem.stateMask & LVIS_SELECTED) && (infoPtr->dwStyle & LVS_SINGLESEL))
return FALSE;
*/
static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView)
{
- SIZE oldIconSize = infoPtr->iconSize;
HIMAGELIST himl;
if (infoPtr->uView == nView) return 1;
switch (nView)
{
case LV_VIEW_ICON:
- if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy))
- {
- TRACE("icon old size=(%d,%d), new size=(%d,%d)\n",
- oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy);
- LISTVIEW_SetIconSpacing(infoPtr, 0, 0);
- }
- LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
- break;
case LV_VIEW_SMALLICON:
LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
break;
infoPtr->bRedraw = TRUE;
infoPtr->bNoItemMetrics = TRUE;
infoPtr->bDoChangeNotify = TRUE;
- infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING);
- infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING);
+ infoPtr->autoSpacing = TRUE;
+ infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON);
+ infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON);
infoPtr->nEditLabelItem = -1;
infoPtr->nLButtonDownItem = -1;
infoPtr->dwHoverTime = HOVER_DEFAULT; /* default system hover time */
+ infoPtr->cWheelRemainder = 0;
infoPtr->nMeasureItemHeight = 0;
infoPtr->xTrackLine = -1; /* no track line */
infoPtr->itemEdit.fEnabled = FALSE;
static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta)
{
- INT gcWheelDelta = 0;
- INT pulScrollLines = 3;
+ UINT pulScrollLines = 3;
TRACE("(wheelDelta=%d)\n", wheelDelta);
- SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0);
- gcWheelDelta -= wheelDelta;
-
switch(infoPtr->uView)
{
case LV_VIEW_ICON:
* listview should be scrolled by a multiple of 37 dependently on its dimension or its visible item number
* should be fixed in the future.
*/
- LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (gcWheelDelta < 0) ?
+ LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (wheelDelta > 0) ?
-LISTVIEW_SCROLL_ICON_LINE_SIZE : LISTVIEW_SCROLL_ICON_LINE_SIZE);
break;
case LV_VIEW_DETAILS:
- if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines)
+ SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0);
+
+ /* if scrolling changes direction, ignore left overs */
+ if ((wheelDelta < 0 && infoPtr->cWheelRemainder < 0) ||
+ (wheelDelta > 0 && infoPtr->cWheelRemainder > 0))
+ infoPtr->cWheelRemainder += wheelDelta;
+ else
+ infoPtr->cWheelRemainder = wheelDelta;
+ if (infoPtr->cWheelRemainder && pulScrollLines)
{
- int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
- cLineScroll *= (gcWheelDelta / WHEEL_DELTA);
- LISTVIEW_VScroll(infoPtr, SB_INTERNAL, cLineScroll);
+ int cLineScroll;
+ pulScrollLines = min((UINT)LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
+ cLineScroll = pulScrollLines * (float)infoPtr->cWheelRemainder / WHEEL_DELTA;
+ infoPtr->cWheelRemainder -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines;
+ LISTVIEW_VScroll(infoPtr, SB_INTERNAL, -cLineScroll);
}
break;
case LV_VIEW_LIST:
- LISTVIEW_HScroll(infoPtr, (gcWheelDelta < 0) ? SB_LINELEFT : SB_LINERIGHT, 0);
+ LISTVIEW_HScroll(infoPtr, (wheelDelta > 0) ? SB_LINELEFT : SB_LINERIGHT, 0);
break;
}
return 0;
{
TRACE("()\n");
- /* if we did not have the focus, there's nothing to do */
+ /* drop any left over scroll amount */
+ infoPtr->cWheelRemainder = 0;
+
+ /* if we did not have the focus, there's nothing more to do */
if (!infoPtr->bFocus) return 0;
/* send NM_KILLFOCUS notification */
return 0;
}
+static LRESULT LISTVIEW_TrackMouse(const LISTVIEW_INFO *infoPtr, POINT pt)
+{
+ MSG msg;
+ RECT r;
+
+ r.top = r.bottom = pt.y;
+ r.left = r.right = pt.x;
+
+ InflateRect(&r, GetSystemMetrics(SM_CXDRAG), GetSystemMetrics(SM_CYDRAG));
+
+ SetCapture(infoPtr->hwndSelf);
+
+ while (1)
+ {
+ if (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD))
+ {
+ if (msg.message == WM_MOUSEMOVE)
+ {
+ pt.x = (short)LOWORD(msg.lParam);
+ pt.y = (short)HIWORD(msg.lParam);
+ if (PtInRect(&r, pt))
+ continue;
+ else
+ {
+ ReleaseCapture();
+ return 1;
+ }
+ }
+ else if (msg.message >= WM_LBUTTONDOWN &&
+ msg.message <= WM_RBUTTONDBLCLK)
+ {
+ break;
+ }
+
+ DispatchMessageW(&msg);
+ }
+
+ if (GetCapture() != infoPtr->hwndSelf)
+ return 0;
+ }
+
+ ReleaseCapture();
+ return 0;
+}
+
+
/***
* DESCRIPTION:
* Processes mouse down messages (left mouse button).
* RETURN:
* Zero
*/
-static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr)
+static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr)
{
- const NMHEADERW *lpnmh;
+ NMHEADERW *lpnmh;
TRACE("(lpnmhdr=%p)\n", lpnmhdr);
/* remember: HDN_LAST < HDN_FIRST */
if (lpnmhdr->code > HDN_FIRST || lpnmhdr->code < HDN_LAST) return 0;
- lpnmh = (const NMHEADERW *)lpnmhdr;
+ lpnmh = (NMHEADERW *)lpnmhdr;
if (lpnmh->iItem < 0 || lpnmh->iItem >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return 0;
LISTVIEW_GetOrigin(infoPtr, &ptOrigin);
infoPtr->xTrackLine = x + ptOrigin.x;
LISTVIEW_DrawTrackLine(infoPtr);
- break;
+ return notify_forward_header(infoPtr, lpnmh);
}
-
+
case HDN_ENDTRACKA:
case HDN_ENDTRACKW:
/* remove the track line (if any) */
LISTVIEW_DrawTrackLine(infoPtr);
infoPtr->xTrackLine = -1;
- break;
+ return notify_forward_header(infoPtr, lpnmh);
case HDN_BEGINDRAG:
- notify_forward_header(infoPtr, lpnmh);
- return (infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0;
+ if ((infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0) return 1;
+ return notify_forward_header(infoPtr, lpnmh);
case HDN_ENDDRAG:
infoPtr->colRectsDirty = TRUE;
LISTVIEW_InvalidateList(infoPtr);
- notify_forward_header(infoPtr, lpnmh);
- return FALSE;
-
+ return notify_forward_header(infoPtr, lpnmh);
+
case HDN_ITEMCHANGEDW:
case HDN_ITEMCHANGEDA:
{
LISTVIEW_InvalidateRect(infoPtr, &rcCol);
}
}
- }
- break;
+ break;
+ }
case HDN_ITEMCLICKW:
case HDN_ITEMCLICKA:
nmlv.iItem = -1;
nmlv.iSubItem = lpnmh->iItem;
notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv);
- notify_forward_header(infoPtr, lpnmh);
+ return notify_forward_header(infoPtr, lpnmh);
}
- break;
case HDN_DIVIDERDBLCLICKW:
case HDN_DIVIDERDBLCLICKA:
we should use LVSCW_AUTOSIZE_USEHEADER, helper rework or
split needed for that */
LISTVIEW_SetColumnWidth(infoPtr, lpnmh->iItem, LVSCW_AUTOSIZE);
- notify_forward_header(infoPtr, lpnmh);
- break;
+ return notify_forward_header(infoPtr, lpnmh);
}
-
return 0;
}
/***
* DESCRIPTION:
- * Processes mouse down messages (right mouse button).
+ * Processes WM_RBUTTONDOWN message and corresponding drag operation.
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
- * [I] x,y : mouse coordinate
+ * [I] x, y : mouse coordinate
*
* RETURN:
* Zero
*/
static LRESULT LISTVIEW_RButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y)
{
- LVHITTESTINFO lvHitTestInfo;
- INT nItem;
+ LVHITTESTINFO ht;
+ INT item;
- TRACE("(key=%hu,X=%u,Y=%u)\n", wKey, x, y);
+ TRACE("(key=%hu, x=%d, y=%d)\n", wKey, x, y);
/* send NM_RELEASEDCAPTURE notification */
if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0;
+ /* determine the index of the selected item */
+ ht.pt.x = x;
+ ht.pt.y = y;
+ item = LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE);
+
/* make sure the listview control window has the focus */
if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf);
- /* set right button down flag */
- infoPtr->bRButtonDown = TRUE;
-
- /* determine the index of the selected item */
- lvHitTestInfo.pt.x = x;
- lvHitTestInfo.pt.y = y;
- nItem = LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE);
-
- if ((nItem >= 0) && (nItem < infoPtr->nItemCount))
+ if ((item >= 0) && (item < infoPtr->nItemCount))
{
- LISTVIEW_SetItemFocus(infoPtr, nItem);
+ LISTVIEW_SetItemFocus(infoPtr, item);
if (!((wKey & MK_SHIFT) || (wKey & MK_CONTROL)) &&
- !LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED))
- LISTVIEW_SetSelection(infoPtr, nItem);
+ !LISTVIEW_GetItemState(infoPtr, item, LVIS_SELECTED))
+ LISTVIEW_SetSelection(infoPtr, item);
}
else
- {
LISTVIEW_DeselectAll(infoPtr);
- }
-
- return 0;
-}
-
-/***
- * DESCRIPTION:
- * Processes mouse up messages (right mouse button).
- *
- * PARAMETER(S):
- * [I] infoPtr : valid pointer to the listview structure
- * [I] wKey : key flag
- * [I] x,y : mouse coordinate
- *
- * RETURN:
- * Zero
- */
-static LRESULT LISTVIEW_RButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y)
-{
- LVHITTESTINFO lvHitTestInfo;
- POINT pt;
- TRACE("(key=%hu,X=%u,Y=%u)\n", wKey, x, y);
+ if (LISTVIEW_TrackMouse(infoPtr, ht.pt))
+ {
+ if (ht.iItem != -1)
+ {
+ NMLISTVIEW nmlv;
- if (!infoPtr->bRButtonDown) return 0;
-
- /* set button flag */
- infoPtr->bRButtonDown = FALSE;
+ memset(&nmlv, 0, sizeof(nmlv));
+ nmlv.iItem = ht.iItem;
+ nmlv.ptAction = ht.pt;
- /* Send NM_RCLICK notification */
- lvHitTestInfo.pt.x = x;
- lvHitTestInfo.pt.y = y;
- LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, FALSE);
- if (!notify_click(infoPtr, NM_RCLICK, &lvHitTestInfo)) return 0;
+ notify_listview(infoPtr, LVN_BEGINRDRAG, &nmlv);
+ }
+ }
+ else
+ {
+ SetFocus(infoPtr->hwndSelf);
- /* Change to screen coordinate for WM_CONTEXTMENU */
- pt = lvHitTestInfo.pt;
- ClientToScreen(infoPtr->hwndSelf, &pt);
+ ht.pt.x = x;
+ ht.pt.y = y;
+ LISTVIEW_HitTest(infoPtr, &ht, TRUE, FALSE);
- /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
- SendMessageW(infoPtr->hwndSelf, WM_CONTEXTMENU,
- (WPARAM)infoPtr->hwndSelf, MAKELPARAM(pt.x, pt.y));
+ if (notify_click(infoPtr, NM_RCLICK, &ht))
+ {
+ /* Send a WM_CONTEXTMENU message in response to the WM_RBUTTONUP */
+ SendMessageW(infoPtr->hwndSelf, WM_CONTEXTMENU,
+ (WPARAM)infoPtr->hwndSelf, (LPARAM)GetMessagePos());
+ }
+ }
return 0;
}
-
/***
* DESCRIPTION:
* Sets the cursor.
static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedraw)
{
HFONT oldFont = infoPtr->hFont;
+ INT oldHeight = infoPtr->nItemHeight;
TRACE("(hfont=%p,redraw=%hu)\n", hFont, fRedraw);
LISTVIEW_SaveTextMetrics(infoPtr);
+ infoPtr->nItemHeight = LISTVIEW_CalculateItemHeight(infoPtr);
+
if (infoPtr->uView == LV_VIEW_DETAILS)
{
SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(fRedraw, 0));
LISTVIEW_UpdateSize(infoPtr);
LISTVIEW_UpdateScroll(infoPtr);
}
+ else if (infoPtr->nItemHeight != oldHeight)
+ LISTVIEW_UpdateScroll(infoPtr);
if (fRedraw) LISTVIEW_InvalidateList(infoPtr);
if (uNewView != uOldView)
{
- SIZE oldIconSize = infoPtr->iconSize;
HIMAGELIST himl;
SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0);
himl = (uNewView == LVS_ICON ? infoPtr->himlNormal : infoPtr->himlSmall);
set_icon_size(&infoPtr->iconSize, himl, uNewView != LVS_ICON);
-
- if (uNewView == LVS_ICON)
- {
- if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy))
- {
- TRACE("icon old size=(%d,%d), new size=(%d,%d)\n",
- oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy);
- LISTVIEW_SetIconSpacing(infoPtr, 0, 0);
- }
- }
- else if (uNewView == LVS_REPORT)
+
+ if (uNewView == LVS_REPORT)
{
HDLAYOUT hl;
WINDOWPOS wp;
return LISTVIEW_SetHoverTime(infoPtr, (DWORD)lParam);
case LVM_SETICONSPACING:
- return LISTVIEW_SetIconSpacing(infoPtr, (short)LOWORD(lParam), (short)HIWORD(lParam));
+ if(lParam == -1)
+ return LISTVIEW_SetIconSpacing(infoPtr, -1, -1);
+ return LISTVIEW_SetIconSpacing(infoPtr, LOWORD(lParam), HIWORD(lParam));
case LVM_SETIMAGELIST:
return (LRESULT)LISTVIEW_SetImageList(infoPtr, (INT)wParam, (HIMAGELIST)lParam);
case WM_RBUTTONDOWN:
return LISTVIEW_RButtonDown(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam));
- case WM_RBUTTONUP:
- return LISTVIEW_RButtonUp(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam));
-
case WM_SETCURSOR:
return LISTVIEW_SetCursor(infoPtr, wParam, lParam);
/* months before first calendar month and after last calendar month */
static void MONTHCAL_PaintLeadTrailMonths(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps)
{
- INT mask, length, index;
+ INT mask, index;
+ UINT length;
SYSTEMTIME st_max, st;
if (infoPtr->dwStyle & MCS_NOTRAILINGDATES) return;
static void MONTHCAL_PaintCalendar(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps, INT calIdx)
{
const SYSTEMTIME *date = &infoPtr->calendars[calIdx].month;
- INT i, j, length;
+ INT i, j;
+ UINT length;
RECT r, fill_bk_rect;
SYSTEMTIME st;
WCHAR buf[80];
int index,
int skipdir,
HPROPSHEETPAGE hpage);
-static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo);
+static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo, int original_index);
static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo);
static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID);
static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage);
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
TRACE("index %d, skipdir %d, hpage %p\n", index, skipdir, hpage);
- /* hpage takes precedence over index */
- if (hpage != NULL)
- index = PROPSHEET_GetPageIndex(hpage, psInfo);
+
+ index = PROPSHEET_GetPageIndex(hpage, psInfo, index);
if (index < 0 || index >= psInfo->nPages)
{
if (!psInfo) {
return FALSE;
}
- /*
- * hpage takes precedence over index.
- */
- if (hpage != 0)
- {
- index = PROPSHEET_GetPageIndex(hpage, psInfo);
- }
+
+ index = PROPSHEET_GetPageIndex(hpage, psInfo, index);
/* Make sure that index is within range */
if (index < 0 || index >= psInfo->nPages)
*/
static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage)
{
- int index;
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
TRACE("(%p, %p)\n", hwndDlg, hPage);
- for (index = 0; index < psInfo->nPages; index++)
- if (psInfo->proppage[index].hpage == hPage)
- return index;
- WARN("%p not found\n", hPage);
- return -1;
+ return PROPSHEET_GetPageIndex(hPage, psInfo, -1);
}
/******************************************************************************
* PROPSHEET_GetPageIndex
*
* Given a HPROPSHEETPAGE, returns the index of the corresponding page from
- * the array of PropPageInfo.
+ * the array of PropPageInfo. If page is not found original index is used
+ * (page takes precedence over index).
*/
-static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo)
+static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE page, const PropSheetInfo* psInfo, int original_index)
{
- BOOL found = FALSE;
- int index = 0;
+ int index;
- TRACE("hpage %p\n", hpage);
- while ((index < psInfo->nPages) && (found == FALSE))
- {
- if (psInfo->proppage[index].hpage == hpage)
- found = TRUE;
- else
- index++;
- }
+ TRACE("page %p index %d\n", page, original_index);
- if (found == FALSE)
- index = -1;
+ for (index = 0; index < psInfo->nPages; index++)
+ if (psInfo->proppage[index].hpage == page)
+ return index;
- return index;
+ return original_index;
}
/******************************************************************************
* or infoPtr->uNumBands if none */
static int next_visible(const REBAR_INFO *infoPtr, int i)
{
- int n;
+ unsigned int n;
for (n = i + 1; n < infoPtr->uNumBands; n++)
if (!HIDDENBAND(REBAR_GetBand(infoPtr, n)))
break;
static LRESULT
STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)
{
- int i;
RECT rect;
HBRUSH hbrBk;
HFONT hOldFont;
if (infoPtr->simple) {
STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->part0, 0);
} else {
+ unsigned int i;
+
for (i = 0; i < infoPtr->numParts; i++) {
STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->parts[i], i);
}
static int
STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const POINT *pt)
{
- int i;
+ unsigned int i;
+
if (infoPtr->simple)
return 255;
{
STATUSWINDOWPART *part;
RECT rect, *r;
- int i;
+ UINT i;
/* get our window size */
GetClientRect (infoPtr->Self, &rect);
static LRESULT
STATUSBAR_WMDestroy (STATUS_INFO *infoPtr)
{
- int i;
+ unsigned int i;
TRACE("\n");
for (i = 0; i < infoPtr->numParts; i++) {
if (infoPtr->himlInt)
ImageList_Destroy (infoPtr->himlInt);
- TOOLBAR_DeleteImageList(&infoPtr->himlDef, &infoPtr->cimlDef);
- TOOLBAR_DeleteImageList(&infoPtr->himlDis, &infoPtr->cimlDis);
- TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot);
+ TOOLBAR_DeleteImageList(&infoPtr->himlDef, &infoPtr->cimlDef);
+ TOOLBAR_DeleteImageList(&infoPtr->himlDis, &infoPtr->cimlDis);
+ TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot);
/* delete default font */
DeleteObject (infoPtr->hDefaultFont);
if (nTool == -1)
return -1;
- if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) {
- if (!TOOLTIPS_IsWindowActive (GetWindow (infoPtr->hwndSelf, GW_OWNER)))
- return -1;
+ if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest)
+ {
+ TTTOOL_INFO *ti = &infoPtr->tools[nTool];
+ HWND hwnd = (ti->uFlags & TTF_IDISHWND) ? (HWND)ti->uId : ti->hwnd;
+
+ if (!TOOLTIPS_IsWindowActive(hwnd))
+ {
+ TRACE("not active: hwnd %p, parent %p, active %p\n",
+ hwnd, GetParent(hwnd), GetActiveWindow());
+ return -1;
+ }
}
TRACE("tool %d\n", nTool);
BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
HIMAGELIST dragList; /* Bitmap of dragged item */
LONG scrollX;
+ INT wheelRemainder;
COLORREF clrBk;
COLORREF clrText;
COLORREF clrLine;
HFONT hDefaultFont;
HFONT hBoldFont;
HFONT hUnderlineFont;
+ HFONT hBoldUnderlineFont;
HCURSOR hcurHand;
HWND hwndToolTip;
return CreateFontIndirectW(&font);
}
+static HFONT
+TREEVIEW_CreateBoldUnderlineFont(HFONT hfont)
+{
+ LOGFONTW font;
+
+ GetObjectW(hfont, sizeof(font), &font);
+ font.lfWeight = FW_BOLD;
+ font.lfUnderline = TRUE;
+ return CreateFontIndirectW(&font);
+}
+
static inline HFONT
TREEVIEW_FontForItem(const TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item)
{
if ((infoPtr->dwStyle & TVS_TRACKSELECT) && (item == infoPtr->hotItem))
- return infoPtr->hUnderlineFont;
+ return item->state & TVIS_BOLD ? infoPtr->hBoldUnderlineFont : infoPtr->hUnderlineFont;
if (item->state & TVIS_BOLD)
return infoPtr->hBoldFont;
return infoPtr->hFont;
newFirstVisible = item->prevSibling;
else if (item->parent != infoPtr->root)
newFirstVisible = item->parent;
- TREEVIEW_SetFirstVisible(infoPtr, NULL, TRUE);
+ TREEVIEW_SetFirstVisible(infoPtr, NULL, TRUE);
}
else
newFirstVisible = infoPtr->firstVisible;
DeleteObject(infoPtr->hBoldFont);
DeleteObject(infoPtr->hUnderlineFont);
+ DeleteObject(infoPtr->hBoldUnderlineFont);
infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont);
infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont);
+ infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont);
if (!infoPtr->bHeightSet)
infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr);
{
int visOrder = infoPtr->firstVisible->visibleOrder;
- if (parent == infoPtr->root)
- TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL);
- else
- TREEVIEW_RecalculateVisibleOrder(infoPtr, parent);
+ if (parent == infoPtr->root)
+ TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL);
+ else
+ TREEVIEW_RecalculateVisibleOrder(infoPtr, parent);
if (TREEVIEW_IsChildOf(parent, infoPtr->firstVisible))
{
static LRESULT
TREEVIEW_MouseWheel(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- short gcWheelDelta;
+ short wheelDelta;
UINT pulScrollLines = 3;
if (wParam & (MK_SHIFT | MK_CONTROL))
SystemParametersInfoW(SPI_GETWHEELSCROLLLINES, 0, &pulScrollLines, 0);
- gcWheelDelta = -(short)HIWORD(wParam);
- pulScrollLines *= (gcWheelDelta / WHEEL_DELTA);
+ wheelDelta = GET_WHEEL_DELTA_WPARAM(wParam);
+ /* if scrolling changes direction, ignore left overs */
+ if ((wheelDelta < 0 && infoPtr->wheelRemainder < 0) ||
+ (wheelDelta > 0 && infoPtr->wheelRemainder > 0))
+ infoPtr->wheelRemainder += wheelDelta;
+ else
+ infoPtr->wheelRemainder = wheelDelta;
- if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines)
+ if (infoPtr->wheelRemainder && pulScrollLines)
{
- int newDy = infoPtr->firstVisible->visibleOrder + pulScrollLines;
- int maxDy = infoPtr->maxVisibleOrder;
+ int newDy;
+ int maxDy;
+ int lineScroll;
+
+ lineScroll = pulScrollLines * (float)infoPtr->wheelRemainder / WHEEL_DELTA;
+ infoPtr->wheelRemainder -= WHEEL_DELTA * lineScroll / (int)pulScrollLines;
+
+ newDy = infoPtr->firstVisible->visibleOrder - lineScroll;
+ maxDy = infoPtr->maxVisibleOrder;
if (newDy > maxDy)
newDy = maxDy;
/* dragList */
infoPtr->scrollX = 0;
+ infoPtr->wheelRemainder = 0;
infoPtr->clrBk = CLR_NONE; /* use system color */
infoPtr->clrText = CLR_NONE; /* use system color */
infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectW(&lf);
infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont);
infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont);
+ infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont);
infoPtr->hcurHand = LoadCursorW(NULL, (LPWSTR)IDC_HAND);
infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr);
DeleteObject(infoPtr->hDefaultFont);
DeleteObject(infoPtr->hBoldFont);
DeleteObject(infoPtr->hUnderlineFont);
+ DeleteObject(infoPtr->hBoldUnderlineFont);
Free(infoPtr);
return 0;
if (TRACE_ON(updown))
{
- INT i;
+ UINT i;
for (i = 0; i < wParam; i++)
- TRACE("%d: nSec %u nInc %u\n", i,
+ TRACE("%u: nSec %u nInc %u\n", i,
infoPtr->AccelVect[i].nSec, infoPtr->AccelVect[i].nInc);
}
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: hwpage.c 19599 2005-11-26 02:12:58Z weiden $
- *
+/*
* PROJECT: ReactOS devmgr.dll
* FILE: lib/devmgr/devprblm.c
* PURPOSE: ReactOS Device Manager
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS devmgr.dll
* FILE: lib/devmgr/hwpage.c
* PURPOSE: ReactOS Device Manager
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: devmgr.c 12852 2005-01-06 13:58:04Z mf $
- *
+/*
* PROJECT: ReactOS devmgr.dll
* FILE: lib/devmgr/misc.c
* PURPOSE: ReactOS Device Manager
-/* $Id: $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: subsys/system/dhcp/api.c
-/* $Id: $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: subsys/system/dhcp/pipe.c
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS Hid User Library
* FILE: lib/hid/hid.c
* PURPOSE: ReactOS Hid User Library
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Hid User Library
* FILE: lib/hid/stubs.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS IP Route Priority API DLL\0"
-/* $Id: dosdev.c 54326 2011-11-07 00:18:13Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/dosdev.c
-/* $Id: environ.c 54459 2011-11-20 17:00:39Z pschweitzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/misc/env.c
-/* $Id: except.c 57269 2012-09-11 03:50:20Z mnordell $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/misc/except.c
-/* $Id: backup.c 48475 2010-08-07 05:02:58Z sir_richard $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/backup.c
-/* $Id: cnotify.c 55801 2012-02-21 23:27:45Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/find.c
-/* $Id: copy.c 55885 2012-02-27 17:10:44Z sir_richard $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/copy.c
-/* $Id: create.c 54326 2011-11-07 00:18:13Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/create.c
-/* $Id: delete.c 56650 2012-05-23 16:51:22Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/delete.c
-/* $Id: dir.c 55866 2012-02-25 21:09:28Z khornicek $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/client/file/dir.c
-/* $Id: fileinfo.c 54326 2011-11-07 00:18:13Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/file.c
-/* $Id: hardlink.c 55790 2012-02-21 19:18:57Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: dll/win32/kernel32/client/file/hardlink.c
-/* $Id: iocompl.c 55793 2012-02-21 21:31:01Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/iocompl.c
-/* $Id: lfile.c 48475 2010-08-07 05:02:58Z sir_richard $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/lfile.c
-/* $Id: lock.c 55795 2012-02-21 21:38:08Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: dll/win32/kernel32/file/lock.c
-/* $Id: mailslot.c 55791 2012-02-21 19:19:44Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/mailslot.c
-/* $Id: move.c 54326 2011-11-07 00:18:13Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/file.c
-/* $Id: rw.c 54326 2011-11-07 00:18:13Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/rw.c
-/* $Id: tape.c 54334 2011-11-07 07:41:52Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/tape.c
-/* $Id: volume.c 52819 2011-07-23 18:54:29Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/file/volume.c
-/* $Id: job.c 54306 2011-11-06 00:09:33Z pschweitzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/process/job.c
-/* $Id: time.c 52770 2011-07-22 02:13:57Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/misc/time.c
-/* $Id: toolhelp.c 54071 2011-10-10 12:14:12Z tfaber $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: dll/win32/kernel32/misc/toolhelp.c
-/* $Id: lzexpand.c 52854 2011-07-24 23:42:09Z ion $
- *
+/*
* LZ Decompression functions
*
* Copyright 1996 Marcus Meissner
-/* $Id: muldiv.c 37829 2008-12-03 17:33:13Z dgorbachev $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: dll/win32/kernel32/misc/muldiv.c
-/* $Id: timezone.c 52819 2011-07-23 18:54:29Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/misc/time.c
-/* $Id: nls.c 52854 2011-07-24 23:42:09Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: dll/win32/kernel32/misc/nls.c
if (!NT_SUCCESS(Status))
goto done;
- Status = LsapCreatePolicySd(&PolicySd,
- &PolicySdSize);
+ Status = LsapCreatePolicySd(&PolicySd, &PolicySdSize);
if (!NT_SUCCESS(Status))
goto done;
/* Set the audit events attribute */
LsapSetObjectAttribute(PolicyObject,
L"PolAdtEv",
- &AuditEventsInfo,
+ AuditEventsInfo,
AuditEventsSize);
/* Set the DNS Domain Name attribute */
NULL);
if (!NT_SUCCESS(Status))
{
-
+ ERR("NtCreateKey failed for '%S' with status 0x%lx\n",
+ AttributeName, Status);
return Status;
}
NtClose(AttributeKey);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("RtlpNtSetValueKey failed for '%S' with status 0x%lx\n",
+ AttributeName, Status);
+ }
+
return Status;
}
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS msgina.dll
* FILE: lib/msgina/stubs.c
# stub _snprintf_c
# stub _snprintf_c_l
# stub _snprintf_l
-# stub _snprintf_s
+@ varargs _snprintf_s(ptr long long ptr)
# stub _snprintf_s_l
# stub _snscanf
# stub _snscanf_l
# stub _snscanf_s_l
@ varargs _snwprintf(ptr long wstr)
# stub _snwprintf_l
-# stub _snwprintf_s
+@ varargs _snwprintf_s(ptr long long ptr)
# stub _snwprintf_s_l
# stub _snwscanf
# stub _snwscanf_l
@ cdecl _spawnvp(long str ptr)
@ cdecl _spawnvpe(long str ptr ptr)
@ cdecl _splitpath(str ptr ptr ptr ptr)
-# stub _splitpath_s
+@ cdecl _splitpath_s(str ptr long ptr long ptr long ptr long)
# stub _sprintf_l
# stub _sprintf_p_l
# stub _sprintf_s_l
@ cdecl _vsnprintf_c(ptr long str ptr) _vsnprintf
# @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) _vsnprintf_l
# @ cdecl _vsnprintf_l(ptr long str ptr ptr)
-# @ cdecl _vsnprintf_s(ptr long long str ptr)
+@ cdecl _vsnprintf_s(ptr long long str ptr)
# @ cdecl _vsnprintf_s_l(ptr long long str ptr ptr)
@ cdecl _vsnwprintf(ptr long wstr ptr)
# @ cdecl _vsnwprintf_l(ptr long wstr ptr ptr)
-# @ cdecl _vsnwprintf_s(ptr long long wstr ptr)
+@ cdecl _vsnwprintf_s(ptr long long wstr ptr)
# @ cdecl _vsnwprintf_s_l(ptr long long wstr ptr ptr)
# stub _vsprintf_l
@ cdecl _vsprintf_p(ptr long str ptr)
@ cdecl _wspawnvp(long wstr ptr)
@ cdecl _wspawnvpe(long wstr ptr ptr)
@ cdecl _wsplitpath(wstr ptr ptr ptr ptr)
-# @ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long)
+@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long)
@ cdecl _wstat(wstr ptr)
@ cdecl _wstati64(wstr ptr)
@ cdecl _wstat64(wstr ptr)
@ cdecl -arch=x86_64 sinf(long)
@ cdecl sinh(double)
@ varargs sprintf(ptr str)
-# @ varargs sprintf_s(ptr long str)
+@ varargs sprintf_s(ptr long str)
@ cdecl sqrt(double)
@ cdecl -arch=x86_64 sqrtf(long)
@ cdecl srand(long)
@ cdecl strtoul(str ptr long)
@ cdecl strxfrm(ptr str long)
@ varargs swprintf(ptr wstr)
-# @ varargs swprintf_s(ptr long wstr)
+@ varargs swprintf_s(ptr long wstr)
@ varargs swscanf(wstr wstr)
# @ varargs swscanf_s(wstr wstr)
@ cdecl system(str)
@ cdecl vprintf_s(str ptr)
# stub vsnprintf
@ cdecl vsprintf(ptr str ptr)
-# @ cdecl vsprintf_s(ptr long str ptr)
+@ cdecl vsprintf_s(ptr long str ptr)
@ cdecl vswprintf(ptr wstr ptr)
-# @ cdecl vswprintf_s(ptr long wstr ptr)
+@ cdecl vswprintf_s(ptr long wstr ptr)
@ cdecl vwprintf(wstr ptr)
@ cdecl vwprintf_s(wstr ptr)
# stub wcrtomb
-/* $Id: stubs.c 12852 2005-01-06 13:58:04Z mf $
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS WinSock DLL
- * FILE: stubs.c
- * PURPOSE: WSAIoctl wrappers for Microsoft extensions to Winsock
- * PROGRAMMERS: KJK::Hyperion <hackbunny@reactos.com>
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS WinSock DLL
+ * FILE: stubs.c
+ * PURPOSE: WSAIoctl wrappers for Microsoft extensions to Winsock
+ * PROGRAMMERS: KJK::Hyperion <hackbunny@reactos.com>
* REVISIONS:
*/
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS WinSock DLL
- * FILE: stubs.c
- * PURPOSE: Stub functions
- * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS WinSock DLL
+ * FILE: stubs.c
+ * PURPOSE: Stub functions
+ * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
* REVISIONS:
*/
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: ntmarta.c 31176 2007-12-12 07:04:12Z weiden $
- *
+/*
* PROJECT: ReactOS MARTA provider
* FILE: lib/ntmarta/ntmarta.c
* PURPOSE: ReactOS MARTA provider
-/* $Id$
-*/
/*
* epsapi.h
*
-/* $Id$
- */
/*
* COPYRIGHT: None
* LICENSE: Public domain
-/* $Id$
- */
/*
* COPYRIGHT: See COPYING in the top level directory
* LICENSE: See LGPL.txt in the top level directory
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: SAM interface library
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: SAM interface library
spec2def(samsrv.dll samsrv.spec ADD_IMPORTLIB)
list(APPEND SOURCE
+ alias.c
database.c
domain.c
group.c
--- /dev/null
+/*
+ * PROJECT: Local Security Authority Server DLL
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll/win32/samsrv/alias.c
+ * PURPOSE: Alias specific helper functions
+ * COPYRIGHT: Copyright 2013 Eric Kohl
+ */
+
+/* INCLUDES ****************************************************************/
+
+#include "samsrv.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
+
+
+/* FUNCTIONS ***************************************************************/
+
+NTSTATUS
+SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject,
+ IN ULONG AliasId,
+ IN ACCESS_MASK DesiredAccess,
+ OUT PSAM_DB_OBJECT *AliasObject)
+{
+ WCHAR szRid[9];
+
+ TRACE("(%p %lu %lx %p)\n",
+ DomainObject, AliasId, DesiredAccess, AliasObject);
+
+ /* Convert the RID into a string (hex) */
+ swprintf(szRid, L"%08lX", AliasId);
+
+ /* Create the user object */
+ return SampOpenDbObject(DomainObject,
+ L"Aliases",
+ szRid,
+ AliasId,
+ SamDbAliasObject,
+ DesiredAccess,
+ AliasObject);
+}
+
+/* EOF */
}
NewObject = RtlAllocateHeap(RtlGetProcessHeap(),
- 0,
+ HEAP_ZERO_MEMORY,
sizeof(SAM_DB_OBJECT));
if (NewObject == NULL)
{
NewObject->RelativeId = RelativeId;
NewObject->ParentObject = ParentObject;
+ if (ParentObject != NULL)
+ NewObject->Trusted = ParentObject->Trusted;
+
*DbObject = NewObject;
return STATUS_SUCCESS;
}
NewObject = RtlAllocateHeap(RtlGetProcessHeap(),
- 0,
+ HEAP_ZERO_MEMORY,
sizeof(SAM_DB_OBJECT));
if (NewObject == NULL)
{
NewObject->RelativeId = RelativeId;
NewObject->ParentObject = ParentObject;
+ if (ParentObject != NULL)
+ NewObject->Trusted = ParentObject->Trusted;
+
*DbObject = NewObject;
return STATUS_SUCCESS;
/* FUNCTIONS ***************************************************************/
+NTSTATUS
+SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject,
+ IN ULONG GroupId,
+ IN ACCESS_MASK DesiredAccess,
+ OUT PSAM_DB_OBJECT *GroupObject)
+{
+ WCHAR szRid[9];
+
+ TRACE("(%p %lu %lx %p)\n",
+ DomainObject, GroupId, DesiredAccess, GroupObject);
+
+ /* Convert the RID into a string (hex) */
+ swprintf(szRid, L"%08lX", GroupId);
+
+ /* Create the user object */
+ return SampOpenDbObject(DomainObject,
+ L"Groups",
+ szRid,
+ GroupId,
+ SamDbGroupObject,
+ DesiredAccess,
+ GroupObject);
+}
+
NTSTATUS
SampAddMemberToGroup(IN PSAM_DB_OBJECT GroupObject,
USER_ALL_ACCESS
};
+PGENERIC_MAPPING pServerMapping = &ServerMapping;
+
/* FUNCTIONS *****************************************************************/
NTAPI
SamrShutdownSamServer(IN SAMPR_HANDLE ServerHandle)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ PSAM_DB_OBJECT ServerObject;
+ NTSTATUS Status;
+
+ TRACE("(%p)\n", ServerHandle);
+
+ /* Validate the server handle */
+ Status = SampValidateDbObject(ServerHandle,
+ SamDbServerObject,
+ SAM_SERVER_SHUTDOWN,
+ &ServerObject);
+ if (!NT_SUCCESS(Status))
+ return Status;
+
+ /* Shut the server down */
+ RpcMgmtStopServerListening(0);
+
+ return STATUS_SUCCESS;
}
}
-static NTSTATUS
+static
+NTSTATUS
SampQueryUserInternal1(PSAM_DB_OBJECT UserObject,
- PSAMPR_USER_INFO_BUFFER *Buffer)
+ PSAMPR_USER_INFO_BUFFER *Buffer)
{
PSAMPR_USER_INFO_BUFFER InfoBuffer = NULL;
ULONG Length = 0;
NTSTATUS Status = STATUS_SUCCESS;
+ /* Fail, if the caller is not a trusted caller */
+ if (UserObject->Trusted == FALSE)
+ return STATUS_INVALID_INFO_CLASS;
+
*Buffer = NULL;
InfoBuffer = midl_user_allocate(sizeof(SAMPR_USER_INFO_BUFFER));
/* FUNCTIONS ****************************************************************/
+NTSTATUS
+NTAPI
+SamIConnect(IN PSAMPR_SERVER_NAME ServerName,
+ OUT SAMPR_HANDLE *ServerHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN BOOLEAN Trusted)
+{
+ PSAM_DB_OBJECT ServerObject;
+ NTSTATUS Status;
+
+ TRACE("SamIConnect(%p %p %lx %ld)\n",
+ ServerName, ServerHandle, DesiredAccess, Trusted);
+
+ /* Map generic access rights */
+ RtlMapGenericMask(&DesiredAccess,
+ pServerMapping);
+
+ /* Open the Server Object */
+ Status = SampOpenDbObject(NULL,
+ NULL,
+ L"SAM",
+ 0,
+ SamDbServerObject,
+ DesiredAccess,
+ &ServerObject);
+ if (NT_SUCCESS(Status))
+ {
+ ServerObject->Trusted = Trusted;
+ *ServerHandle = (SAMPR_HANDLE)ServerObject;
+ }
+
+ TRACE("SamIConnect done (Status 0x%08lx)\n", Status);
+
+ return Status;
+}
+
+
NTSTATUS
NTAPI
SamIInitialize(VOID)
}
+VOID
+NTAPI
+SamIFree_SAMPR_PSID_ARRAY(PSAMPR_PSID_ARRAY Ptr)
+{
+ if (Ptr != NULL)
+ {
+ if (Ptr->Sids !=0)
+ {
+ MIDL_user_free(Ptr->Sids);
+ }
+ }
+}
+
+
VOID
NTAPI
SamIFree_SAMPR_RETURNED_USTRING_ARRAY(PSAMPR_RETURNED_USTRING_ARRAY Ptr)
HANDLE KeyHandle;
HANDLE MembersKeyHandle; // only used by Aliases
ULONG RelativeId;
+ BOOLEAN Trusted;
struct _SAM_DB_OBJECT *ParentObject;
} SAM_DB_OBJECT, *PSAM_DB_OBJECT;
ULONG Reserved;
LARGE_INTEGER CreationTime;
LARGE_INTEGER DomainModifiedCount;
- LARGE_INTEGER MaxPasswordAge;
- LARGE_INTEGER MinPasswordAge;
- LARGE_INTEGER ForceLogoff;
- LARGE_INTEGER LockoutDuration;
- LARGE_INTEGER LockoutObservationWindow;
+ LARGE_INTEGER MaxPasswordAge; /* relative Time */
+ LARGE_INTEGER MinPasswordAge; /* relative Time */
+ LARGE_INTEGER ForceLogoff; /* relative Time */
+ LARGE_INTEGER LockoutDuration; /* relative Time */
+ LARGE_INTEGER LockoutObservationWindow; /* relative Time */
LARGE_INTEGER ModifiedCountAtLastPromotion;
ULONG NextRid;
ULONG PasswordProperties;
} SAM_USER_FIXED_DATA, *PSAM_USER_FIXED_DATA;
+extern PGENERIC_MAPPING pServerMapping;
+
+
+/* alias.c */
+
+NTSTATUS
+SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject,
+ IN ULONG AliasId,
+ IN ACCESS_MASK DesiredAccess,
+ OUT PSAM_DB_OBJECT *AliasObject);
+
+
/* database.c */
NTSTATUS
/* group.h */
+NTSTATUS
+SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject,
+ IN ULONG GroupId,
+ IN ACCESS_MASK DesiredAccess,
+ OUT PSAM_DB_OBJECT *GroupObject);
+
NTSTATUS
SampAddMemberToGroup(IN PSAM_DB_OBJECT GroupObject,
IN ULONG MemberId);
IN ULONG GroupId,
IN ULONG GroupAttributes);
+NTSTATUS
+SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject);
+
NTSTATUS
SampSetUserPassword(IN PSAM_DB_OBJECT UserObject,
IN PENCRYPTED_NT_OWF_PASSWORD NtPassword,
@ stub SamIAccountRestrictions
-@ stub SamIConnect
+@ stub SamIAddDSNameToAlias
+@ stub SamIAddDSNameToGroup
+@ stub SamIAmIGC
+@ stub SamIChangePasswordForeignUser
+@ stub SamIChangePasswordForeignUser2
+@ stdcall SamIConnect(ptr ptr long long)
@ stub SamICreateAccountByRid
+@ stub SamIDemote
+@ stub SamIDemoteUndo
+@ stub SamIDoFSMORoleChange
+@ stub SamIDsCreateObjectInDomain
+@ stub SamIDsSetObjectInformation
@ stub SamIEnumerateAccountRids
+@ stub SamIEnumerateInterdomainTrustAccountsForUpgrade
+@ stub SamIFloatingSingleMasterOpEx
+@ stub SamIFreeSidAndAttributesList
+@ stub SamIFreeSidArray
+@ stub SamIFreeVoid
@ stub SamIFree_SAMPR_ALIAS_INFO_BUFFER
@ stub SamIFree_SAMPR_DISPLAY_INFO_BUFFER
@ stub SamIFree_SAMPR_DOMAIN_INFO_BUFFER
@ stub SamIFree_SAMPR_GET_GROUPS_BUFFER
@ stub SamIFree_SAMPR_GET_MEMBERS_BUFFER
@ stub SamIFree_SAMPR_GROUP_INFO_BUFFER
-@ stub SamIFree_SAMPR_PSID_ARRAY
+@ stdcall SamIFree_SAMPR_PSID_ARRAY(ptr)
@ stdcall SamIFree_SAMPR_RETURNED_USTRING_ARRAY(ptr)
@ stub SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR
@ stdcall SamIFree_SAMPR_ULONG_ARRAY(ptr)
@ stub SamIFree_SAMPR_USER_INFO_BUFFER
+@ stub SamIFree_UserInternal6Information
+@ stub SamIGCLookupNames
+@ stub SamIGCLookupSids
+@ stub SamIGetAliasMembership
+@ stub SamIGetBootKeyInformation
+@ stub SamIGetDefaultAdministratorName
+@ stub SamIGetFixedAttributes
+@ stub SamIGetinterdomainTrustAccountPasswordsForUpgrade
@ stub SamIGetPrivateData
+@ stub SamIGetResourceGroupmembershipsTransitive
@ stub SamIGetSerialNumberDomain
+@ stub SamIGetuserLogonInformation
+@ stub SamIGetuserLogonInformation2
+@ stub SamIGetuserLogonInformationEx
+@ stub SamIImpersonateNullSession
+@ stub SamIIncrementPerformanceCounter
@ stdcall SamIInitialize()
+@ stub SamIIsDownlevelDcUpgrade
+@ stub SamIIsExtendedSidMode
+@ stub SamIIsRebootAfterPromotion
+@ stub SamIIsSetupInProgress
+@ stub SamILoadDownlevelDatabase
+@ stub SamILoopbackConnect
+@ stub SamIMixedDomain
+@ stub SamIMixedDomain2
+@ stub SamINT4UpgradeInProgress
+@ stub SamINetLogonPing
@ stub SamINotifyDelta
+@ stub SamINotifyRoleChange
+@ stub SamINotifyServerDelta
+@ stub SamIOpenAccount
+@ stub SamIOpenUserByAlternateId
+@ stub SamIPromote
+@ stub SamIPromoteUndo
+@ stub SamIQueryServerRole
+@ stub SamIQueryServerRole2
+@ stub SamIRemoveDSNameFromAlias
+@ stub SamIRemoveDSNameFromGroup
+@ stub SamIRelaceDownlevelDatabase
+@ stub SamIResetBadPwdCountOnPdc
+@ stub SamIRetrievePrimaryCredentials
+@ stub SamIRevertNullSession
+@ stub SamISameSite
@ stub SamISetAuditingInformation
+@ stub SamISetMixedDomainFlag
+@ stub SamISetPasswordForeignUser
+@ stub SamISetPasswordForeignUser2
+@ stub SamISetPasswordInfoOnPdc
@ stub SamISetPrivateData
@ stub SamISetSerialNumberDomain
+@ stub SamIStorePrimaryCredentials
+@ stub SamIUPNFromUserHandle
+@ stub SamIUnLoadDownlevelDatabase
+@ stub SamIUpdateLogonStatistics
+@ stub SampAbortSingleLoopbackTask
+@ stub SampAccountControlToFlags
+@ stub SampAcquireSamLockExclusive
+@ stub SampAcquireWriteLock
+@ stub SampCommitBufferedWrites
+@ stub SampConvertNt4SdToNt5Sd
+@ stub SampDsChangePasswordUser
+@ stub SampFlagsToAccountControl
+@ stub SampGetDefaultSecurityDescriptorForClass
+@ stub SampGetSerialNumberDomain2
@ stdcall SampInitializeRegistry()
+@ stub SampInitializeSdConversion
+@ stub SampInvalidateDomainCache
+@ stub SampInvalidateRidRange
+@ stub SampNetLogonNotificationRequired
+@ stub SampNotifyReplicatedInChange
+@ stub SampProcessSingleLoopbackTask
+@ stub SampReleaseSamLockExclusive
+@ stub SampReleaseWriteLock
@ stub SampRtlConvertUlongToUnicodeString
+@ stub SampSetSerialNumberDomain2
+@ stub SampUsingDsData
+@ stub SampWriteGroupType
@ stdcall SamrAddMemberToAlias(ptr ptr)
@ stdcall SamrAddMemberToGroup(ptr long long)
@ stdcall SamrAddMultipleMembersToAlias(ptr ptr)
@ stdcall SamrConnect(ptr ptr long)
@ stdcall SamrCreateAliasInDomain(ptr ptr long ptr ptr)
@ stdcall SamrCreateGroupInDomain(ptr ptr long ptr ptr)
+@ stdcall SamrCreateUser2InDomain(ptr ptr long long ptr ptr ptr)
@ stdcall SamrCreateUserInDomain(ptr ptr long ptr ptr)
@ stdcall SamrDeleteAlias(ptr)
@ stdcall SamrDeleteGroup(ptr)
@ stdcall SamrRemoveMemberFromForeignDomain(ptr ptr)
@ stdcall SamrRemoveMemberFromGroup(ptr long)
@ stdcall SamrRemoveMultipleMembersFromAlias(ptr ptr)
+@ stdcall SamrRidToSid(ptr long ptr)
@ stdcall SamrSetInformationAlias(ptr long ptr)
@ stdcall SamrSetInformationDomain(ptr long ptr)
@ stdcall SamrSetInformationGroup(ptr long ptr)
@ stdcall SamrShutdownSamServer(ptr)
@ stdcall SamrTestPrivateFunctionsDomain(ptr)
@ stdcall SamrTestPrivateFunctionsUser(ptr)
-; EOF
\ No newline at end of file
+@ stdcall SamrUnicodeChangePasswordUser2(ptr ptr ptr ptr ptr long ptr ptr)
+; EOF
WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
+
/* GLOBALS *****************************************************************/
+#define TICKS_PER_SECOND 10000000LL
+
SID_IDENTIFIER_AUTHORITY SecurityNtAuthority = {SECURITY_NT_AUTHORITY};
+
/* FUNCTIONS ***************************************************************/
BOOL
FixedData.Version = 1;
NtQuerySystemTime(&FixedData.CreationTime);
FixedData.DomainModifiedCount.QuadPart = 0;
-// FixedData.MaxPasswordAge // 6 Weeks
- FixedData.MinPasswordAge.QuadPart = 0; // Now
-// FixedData.ForceLogoff
-// FixedData.LockoutDuration // 30 minutes
-// FixedData.LockoutObservationWindow // 30 minutes
+ FixedData.MaxPasswordAge.QuadPart = -(6LL * 7LL * 24LL * 60LL * 60LL * TICKS_PER_SECOND); /* 6 weeks */
+ FixedData.MinPasswordAge.QuadPart = 0; /* right now */
+// FixedData.ForceLogoff.QuadPart = // very far in the future aka never
+ FixedData.LockoutDuration.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */
+ FixedData.LockoutObservationWindow.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */
FixedData.ModifiedCountAtLastPromotion.QuadPart = 0;
FixedData.NextRid = 1000;
FixedData.PasswordProperties = 0;
}
+NTSTATUS
+SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject)
+{
+ PGROUP_MEMBERSHIP GroupsBuffer = NULL;
+ PSAM_DB_OBJECT GroupObject;
+ ULONG Length = 0;
+ ULONG i;
+ NTSTATUS Status;
+
+ SampGetObjectAttribute(UserObject,
+ L"Groups",
+ NULL,
+ NULL,
+ &Length);
+
+ if (Length == 0)
+ return STATUS_SUCCESS;
+
+ GroupsBuffer = midl_user_allocate(Length);
+ if (GroupsBuffer == NULL)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ goto done;
+ }
+
+ Status = SampGetObjectAttribute(UserObject,
+ L"Groups",
+ NULL,
+ GroupsBuffer,
+ &Length);
+ if (!NT_SUCCESS(Status))
+ goto done;
+
+ for (i = 0; i < (Length / sizeof(GROUP_MEMBERSHIP)); i++)
+ {
+ Status = SampOpenGroupObject(UserObject->ParentObject,
+ GroupsBuffer[i].RelativeId,
+ 0,
+ &GroupObject);
+ if (!NT_SUCCESS(Status))
+ {
+ goto done;
+ }
+
+ Status = SampRemoveMemberFromGroup(GroupObject,
+ UserObject->RelativeId);
+
+ SampCloseDbObject(GroupObject);
+
+ if (!NT_SUCCESS(Status))
+ {
+ goto done;
+ }
+ }
+
+done:
+ if (GroupsBuffer != NULL)
+ midl_user_free(GroupsBuffer);
+
+ return Status;
+}
+
+
NTSTATUS
SampSetUserPassword(IN PSAM_DB_OBJECT UserObject,
IN PENCRYPTED_NT_OWF_PASSWORD NtPassword,
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/secur32/lsa.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS
* FILE: lib/smdll/dllmain.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/smdll/query.c
-$Id$
This is SMDLL: a helper library to talk to the ReactOS session manager (SM).
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Main file
bRet = TRUE;
cleanup:
- if (hSCManager != NULL)
- CloseServiceHandle(hSCManager);
if (hService != NULL)
CloseServiceHandle(hService);
+ if (hSCManager != NULL)
+ CloseServiceHandle(hSCManager);
return bRet;
}
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/desktop.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/directory.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/environment.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/internal.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/misc.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/registry.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/resource.h
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/setup.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/userenv/userenv.c
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS FAX API Support
* FILE: lib/winfax/winfax.c
* PURPOSE: ReactOS FAX API Support
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS SmartCard API
* FILE: lib/winscard/winscard.c
* PURPOSE: ReactOS SmartCard API
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SmartCard API\0"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS winspool DRV
* FILE: stubs.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock DLL
* FILE: stubs.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "PC Speaker Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "VGA Boot Driver\0"
-/* $Id: bootvid.rc 24464 2006-10-09 04:00:34Z ion $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS KDBG COM Library\0"
#define REACTOS_STR_INTERNAL_NAME "kdcom\0"
#define REACTOS_STR_ORIGINAL_FILENAME "kdcom.sys\0"
#include <reactos/version.rc>
-
-IDB_BOOTIMAGE BITMAP DISCARDABLE "bootimage.bmp"
-IDB_BAR BITMAP DISCARDABLE "bar.bmp"
-
-
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Null Device Driver\0"
-/* $Id: acpi.rc 21698 2006-04-22 05:55:17Z tretiakov $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS ACPI Driver\0"
-/* $Id: acpienum.c 21698 2006-04-22 05:55:17Z tretiakov $
- *
+/*
* PROJECT: ReactOS ACPI bus driver
* FILE: acpi/ospm/acpienum.c
* PURPOSE: ACPI namespace enumerator
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ISA Plug And Play Bus Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "PCI Bus Driver\0"
/*
- * $Id$
- *
* PCI defines and function prototypes
* Copyright 1994, Drew Eckhardt
* Copyright 1997--1999 Martin Mares <mj@suse.cz>
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2003 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: drivers/fs/cdfs/cdfs.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2003 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: drivers/fs/cdfs/cdfs.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ */
/* INCLUDES *****************************************************************/
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ISO9660 Driver\0"
/*
-* ReactOS kernel
-* Copyright (C) 2002 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/cleanup.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER:
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/cleanup.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER:
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/close.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/close.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2003 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: drivers/fs/cdfs/common.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2003 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: drivers/fs/cdfs/common.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2003, 2004 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/cdfs.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2003, 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/cdfs.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2004 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/dirctl.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/dirctl.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2004 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/fcb.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/fcb.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2004 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/finfo.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/finfo.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2004 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/cdfs/misc.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Eric Kohl
-* UPDATE HISTORY:
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/cdfs/misc.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Eric Kohl
+ * UPDATE HISTORY:
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2003 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: drivers/fs/cdfs/rw.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2003 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: drivers/fs/cdfs/rw.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ */
/* INCLUDES *****************************************************************/
/*
-* ReactOS kernel
-* Copyright (C) 2002, 2003 ReactOS Team
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-/* $Id$
-*
-* COPYRIGHT: See COPYING in the top level directory
-* PROJECT: ReactOS kernel
-* FILE: services/fs/vfat/volume.c
-* PURPOSE: CDROM (ISO 9660) filesystem driver
-* PROGRAMMER: Art Yerkes
-* Eric Kohl
-*/
+ * ReactOS kernel
+ * Copyright (C) 2002, 2003 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: services/fs/vfat/volume.c
+ * PURPOSE: CDROM (ISO 9660) filesystem driver
+ * PROGRAMMER: Art Yerkes
+ * Eric Kohl
+ */
/* INCLUDES *****************************************************************/
-/* $Id: ext2fs.rc 12852 2005-01-06 13:58:04Z mf $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Linux ext2 IFS Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Mailslot IFS Driver\0"
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/fs/mup/create.c
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/fs/mup/mup.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Multi UNC Provider\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Keyboard Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Mouse Class Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Serial mouse device driver\0"
-/* $Id: mpu401.rc 21285 2006-03-10 23:22:58Z jimtabor $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "MPU-401 MIDI Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "SoundBlaster Driver\0"
-/* $Id: sndblst.rc 39744 2009-02-25 09:10:46Z silverblade $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "SoundBlaster Driver\0"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/dd/sound/sb16.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "SB16 driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Socket Filesystem Driver\0"
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/bind.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/connect.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/context.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/info.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/listen.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/lock.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/main.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/read.c
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/tdiconn.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/include/afd.h
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Novell NE2000 network driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "PCNet Ethernet PCI Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "TCP/IP protocol driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "NDIS Library\0"
-/* $Id$
- *
- */
+
#include "precomp.h"
/*
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "TDI wrapper kernel module\0"
-/* $Id$
- *
+/*
* DESCRIPTION: Default TDI event handlers.
*/
#include "precomp.h"
-/* $Id$
- *
- */
#include "precomp.h"
-/* $Id$
- *
- */
#include "precomp.h"
/*
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/parallel/parallel.c
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Parallel Port Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Serial port enumerator\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Serial Port Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "HAL Console Device Driver\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "CD-ROM Class Driver\0"
-/* $Id: class2.rc 26227 2007-04-01 16:29:16Z fireball $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "SCSI Class Driver Helper\0"
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Disk Class Driver\0"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/storage/include/class2.h
-/* $Id$
- *
+/*
* ReactOS Floppy Driver
* Copyright (C) 2004, Vizzini (vizzini@plasmic.com)
*
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ATAPI IDE Miniport Driver\0"
-/* $Id: wmilib.rc 21844 2006-05-07 19:34:23Z fireball $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "WmiLib\0"
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id: display.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/display.c
-/* $Id: dma.c 24759 2006-11-14 20:59:48Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/dma.c
-/* $Id: enum.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/enum.c
-/* $Id: font.c 21840 2006-05-07 18:56:52Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: Xbox HAL
* FILE: hal/halx86/xbox/font.h
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/irql.c
-/* $Id: isa.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/isa.c
-/* $Id: portio.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/portio.c
-/* $Id: processor.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/generic/processor.c
-/* $Id: reboot.c 23907 2006-09-04 05:52:23Z arty $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/reboot.c
-/*
- * $Id: halirq.h 23669 2006-08-23 16:58:43Z ion $
- */
#pragma once
-/* $Id: halinit_up.c 24964 2006-11-29 08:28:20Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/halinit.c
-/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/halinit.c
-/*
- * $Id$
- */
#pragma once
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/apic.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/halinit_mp.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/ioapic.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/ipi_mp.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/mpconfig.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/mp/processor_mp.c
-/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/halinit.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/halinit.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/halinit.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: Xbox HAL
* FILE: hal/halx86/xbox/halxbox.h
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: hal/halx86/xbox/part_xbox.c
extern "C" {
#endif
- _CRTIMP char * __cdecl _cgets(char *_Buffer);
- _CRTIMP int __cdecl _cprintf(const char *_Format,...);
- _CRTIMP int __cdecl _cputs(const char *_Str);
- _CRT_INSECURE_DEPRECATE(_cscanf_s) _CRTIMP int __cdecl _cscanf(const char *_Format,...);
- _CRT_INSECURE_DEPRECATE(_cscanf_s_l) _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _getch(void);
- _CRTIMP int __cdecl _getche(void);
- _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
- _CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
- _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
- _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
- _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
- _CRTIMP int __cdecl _kbhit(void);
- _CRTIMP int __cdecl _putch(int _Ch);
- _CRTIMP int __cdecl _ungetch(int _Ch);
- _CRTIMP int __cdecl _getch_nolock(void);
- _CRTIMP int __cdecl _getche_nolock(void);
- _CRTIMP int __cdecl _putch_nolock(int _Ch);
- _CRTIMP int __cdecl _ungetch_nolock(int _Ch);
+ _CRTIMP
+ char*
+ __cdecl
+ _cgets(
+ _Pre_notnull_ _Post_z_ char *_Buffer);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cprintf(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cputs(
+ _In_z_ const char *_Str);
+
+ _Check_return_opt_
+ _CRT_INSECURE_DEPRECATE(_cscanf_s)
+ _CRTIMP
+ int
+ __cdecl
+ _cscanf(
+ _In_z_ _Scanf_format_string_ const char *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRT_INSECURE_DEPRECATE(_cscanf_s_l)
+ _CRTIMP
+ int
+ __cdecl
+ _cscanf_l(
+ _In_z_ _Scanf_format_string_ const char *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _getch(void);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _getche(void);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcprintf(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ va_list _ArgList);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cprintf_p(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcprintf_p(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ va_list _ArgList);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cprintf_l(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcprintf_l(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ _In_opt_ _locale_t _Locale,
+ va_list _ArgList);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cprintf_p_l(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcprintf_p_l(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ _In_opt_ _locale_t _Locale,
+ va_list _ArgList);
+
+ _CRTIMP
+ int
+ __cdecl
+ _kbhit(void);
+
+ _CRTIMP
+ int
+ __cdecl
+ _putch(
+ _In_ int _Ch);
+
+ _CRTIMP
+ int
+ __cdecl
+ _ungetch(
+ _In_ int _Ch);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _getch_nolock(void);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _getche_nolock(void);
+
+ _CRTIMP
+ int
+ __cdecl
+ _putch_nolock(
+ _In_ int _Ch);
+
+ _CRTIMP
+ int
+ __cdecl
+ _ungetch_nolock(
+ _In_ int _Ch);
#if defined(_X86_) && !defined(__x86_64)
int __cdecl _inp(unsigned short);
#define WEOF (wint_t)(0xFFFF)
#endif
- _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
- _CRTIMP wint_t __cdecl _getwch(void);
- _CRTIMP wint_t __cdecl _getwche(void);
- _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
- _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
- _CRTIMP int __cdecl _cputws(const wchar_t *_String);
- _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
- _CRT_INSECURE_DEPRECATE(_cwscanf_s) _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
- _CRT_INSECURE_DEPRECATE(_cwscanf_s_l) _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
- _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
- _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
- _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
- _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
- _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
- _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
- _CRTIMP wint_t __cdecl _getwch_nolock(void);
- _CRTIMP wint_t __cdecl _getwche_nolock(void);
- _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
+ _CRTIMP
+ wchar_t*
+ _cgetws(
+ _Pre_notnull_ _Post_z_ wchar_t *_Buffer);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _getwch(void);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _getwche(void);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _putwch(
+ wchar_t _WCh);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _ungetwch(
+ wint_t _WCh);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cputws(
+ _In_z_ const wchar_t *_String);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cwprintf(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRT_INSECURE_DEPRECATE(_cwscanf_s)
+ _CRTIMP
+ int
+ __cdecl
+ _cwscanf(
+ _In_z_ _Scanf_format_string_ const wchar_t *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRT_INSECURE_DEPRECATE(_cwscanf_s_l)
+ _CRTIMP
+ int
+ __cdecl
+ _cwscanf_l(
+ _In_z_ _Scanf_format_string_ const wchar_t *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcwprintf(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ va_list _ArgList);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _cwprintf_p(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _vcwprintf_p(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ va_list _ArgList);
+
+ _CRTIMP
+ int
+ __cdecl
+ _cwprintf_l(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _CRTIMP
+ int
+ __cdecl
+ _vcwprintf_l(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ _In_opt_ _locale_t _Locale,
+ va_list _ArgList);
+
+ _CRTIMP
+ int
+ __cdecl
+ _cwprintf_p_l(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ _In_opt_ _locale_t _Locale,
+ ...);
+
+ _CRTIMP
+ int
+ __cdecl
+ _vcwprintf_p_l(
+ _In_z_ _Printf_format_string_ const wchar_t *_Format,
+ _In_opt_ _locale_t _Locale,
+ va_list _ArgList);
+
+ _Check_return_opt_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _putwch_nolock(
+ wchar_t _WCh);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _getwch_nolock(void);
+
+ _Check_return_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _getwche_nolock(void);
+
+ _Check_return_opt_
+ _CRTIMP
+ wint_t
+ __cdecl
+ _ungetwch_nolock(
+ wint_t _WCh);
+
#endif /* _WCONIO_DEFINED */
#ifndef _MT
#define _ungetwch() _ungetwch_nolock()
#endif
-#ifndef NO_OLDNAMES
- _CRT_NONSTDC_DEPRECATE(_cgets) _CRT_INSECURE_DEPRECATE(_cgets_s) _CRTIMP char *__cdecl cgets(char *_Buffer);
- _CRT_NONSTDC_DEPRECATE(_cprintf) _CRTIMP int __cdecl cprintf(const char *_Format,...);
- _CRT_NONSTDC_DEPRECATE(_cputs) _CRTIMP int __cdecl cputs(const char *_Str);
- _CRT_NONSTDC_DEPRECATE(_cscanf) _CRTIMP int __cdecl cscanf(const char *_Format,...);
- _CRT_NONSTDC_DEPRECATE(_getch) _CRTIMP int __cdecl getch(void);
- _CRT_NONSTDC_DEPRECATE(_getche) _CRTIMP int __cdecl getche(void);
- _CRT_NONSTDC_DEPRECATE(_kbhit) _CRTIMP int __cdecl kbhit(void);
- _CRT_NONSTDC_DEPRECATE(_putch) _CRTIMP int __cdecl putch(int _Ch);
- _CRT_NONSTDC_DEPRECATE(_ungetch) _CRTIMP int __cdecl ungetch(int _Ch);
+#ifndef NO_OLDNAMES
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_cgets)
+ _CRT_INSECURE_DEPRECATE(_cgets_s)
+ _CRTIMP
+ char*
+ __cdecl
+ cgets(
+ _Out_writes_z_(_Inexpressible_(*_Buffer + 2)) char *_Buffer);
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_cprintf)
+ _CRTIMP
+ int
+ __cdecl
+ cprintf(
+ _In_z_ _Printf_format_string_ const char *_Format,
+ ...);
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_cputs)
+ _CRTIMP
+ int
+ __cdecl
+ cputs(
+ _In_z_ const char *_Str);
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_cscanf)
+ _CRTIMP
+ int
+ __cdecl
+ cscanf(
+ _In_z_ _Scanf_format_string_ const char *_Format,
+ ...);
+
+ _Check_return_
+ _CRT_NONSTDC_DEPRECATE(_getch)
+ _CRTIMP
+ int
+ __cdecl
+ getch(void);
+
+ _Check_return_
+ _CRT_NONSTDC_DEPRECATE(_getche)
+ _CRTIMP
+ int
+ __cdecl
+ getche(void);
+
+ _Check_return_
+ _CRT_NONSTDC_DEPRECATE(_kbhit)
+ _CRTIMP
+ int
+ __cdecl
+ kbhit(void);
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_putch)
+ _CRTIMP
+ int
+ __cdecl
+ putch(
+ int _Ch);
+
+ _Check_return_opt_
+ _CRT_NONSTDC_DEPRECATE(_ungetch)
+ _CRTIMP
+ int
+ __cdecl
+ ungetch(
+ int _Ch);
#if (defined(_X86_) && !defined(__x86_64))
_CRT_NONSTDC_DEPRECATE(_inp) _CRTIMP int __cdecl inp(unsigned short);
_CRT_NONSTDC_DEPRECATE(_outp) _CRTIMP int __cdecl outp(unsigned short,int);
_CRT_NONSTDC_DEPRECATE(_outpw) _CRTIMP unsigned short __cdecl outpw(unsigned short,unsigned short);
#endif
+
#endif /* !NO_OLDNAMES */
#ifdef __cplusplus
};
#endif
- _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
- _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
- char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
- _CRTIMP int __cdecl _chdir(const char *_Path);
- _CRTIMP int __cdecl _mkdir(const char *_Path);
- _CRTIMP int __cdecl _rmdir(const char *_Path);
- _CRTIMP int __cdecl _chdrive(int _Drive);
- _CRTIMP int __cdecl _getdrive(void);
- _CRTIMP unsigned long __cdecl _getdrives(void);
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ char*
+ __cdecl
+ _getcwd(
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ char*
+ __cdecl
+ _getdcwd(
+ _In_ int _Drive,
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
+ _Check_return_
+ _Ret_opt_z_
+ char*
+ __cdecl
+ _getdcwd_nolock(
+ _In_ int _Drive,
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _chdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _mkdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _rmdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _chdrive(
+ _In_ int _Drive);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _getdrive(void);
+
+ _Check_return_
+ _CRTIMP
+ unsigned long
+ __cdecl
+ _getdrives(void);
#ifndef _GETDISKFREE_DEFINED
#define _GETDISKFREE_DEFINED
- _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
+ _Check_return_
+ _CRTIMP
+ unsigned
+ __cdecl
+ _getdiskfree(
+ _In_ unsigned _Drive,
+ _Out_ struct _diskfree_t *_DiskFree);
#endif
#ifndef _WDIRECT_DEFINED
#define _WDIRECT_DEFINED
- _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
- _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
- wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
- _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
- _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
- _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
-#endif
-#ifndef NO_OLDNAMES
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ wchar_t*
+ __cdecl
+ _wgetcwd(
+ _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ int _SizeInWords);
+
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ wchar_t*
+ __cdecl
+ _wgetdcwd(
+ _In_ int _Drive,
+ _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ int _SizeInWords);
+
+ _Check_return_
+ _Ret_opt_z_
+ wchar_t*
+ __cdecl
+ _wgetdcwd_nolock(
+ _In_ int _Drive,
+ _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ int _SizeInWords);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wchdir(
+ _In_z_ const wchar_t *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wmkdir(
+ _In_z_ const wchar_t *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wrmdir(
+ _In_z_ const wchar_t *_Path);
+
+#endif /* _WDIRECT_DEFINED */
+
+#ifndef NO_OLDNAMES
#define diskfree_t _diskfree_t
- _CRTIMP char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes);
- _CRTIMP int __cdecl chdir(const char *_Path);
- _CRTIMP int __cdecl mkdir(const char *_Path);
- _CRTIMP int __cdecl rmdir(const char *_Path);
-#endif
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ char*
+ __cdecl
+ getcwd(
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ chdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ mkdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ rmdir(
+ _In_z_ const char *_Path);
+
+#endif /* NO_OLDNAMES */
#ifdef __cplusplus
}
_CRTIMP extern int *__cdecl _errno(void);
#define errno (*_errno())
- errno_t __cdecl _set_errno(int _Value);
- errno_t __cdecl _get_errno(int *_Value);
+ errno_t __cdecl _set_errno(_In_ int _Value);
+ errno_t __cdecl _get_errno(_Out_ int *_Value);
#endif
#define EPERM 1
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
* i.e. change the bits in unMask to have the values they have in unNew,
* leaving other bits unchanged. */
-__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _controlfp (unsigned int unNew, unsigned int unMask);
-__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _control87 (unsigned int unNew, unsigned int unMask);
+__MINGW_NOTHROW
+_CRTIMP
+unsigned int
+__cdecl
+_controlfp(
+ _In_ unsigned int unNew,
+ _In_ unsigned int unMask);
+
+__MINGW_NOTHROW
+_CRTIMP
+unsigned int
+__cdecl
+_control87(
+ _In_ unsigned int unNew,
+ _In_ unsigned int unMask);
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _clearfp (void); /* Clear the FPU status word */
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _statusfp (void); /* Report the FPU status word */
* but they really belong in math.h.
*/
-__MINGW_NOTHROW _CRTIMP double __cdecl _chgsign (double);
-__MINGW_NOTHROW _CRTIMP double __cdecl _copysign (double, double);
-__MINGW_NOTHROW _CRTIMP double __cdecl _logb (double);
-__MINGW_NOTHROW _CRTIMP double __cdecl _nextafter (double, double);
-__MINGW_NOTHROW _CRTIMP double __cdecl _scalb (double, long);
-
-__MINGW_NOTHROW _CRTIMP int __cdecl _finite (double);
-__MINGW_NOTHROW _CRTIMP int __cdecl _fpclass (double);
-__MINGW_NOTHROW _CRTIMP int __cdecl _isnan (double);
-
-#ifdef __cplusplus
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+double
+__cdecl
+_chgsign(
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+double
+__cdecl
+_copysign(
+ _In_ double,
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+double
+__cdecl
+_logb(
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+double
+__cdecl
+_nextafter(
+ _In_ double,
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+double
+__cdecl
+_scalb(
+ _In_ double,
+ _In_ long);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+int
+__cdecl
+_finite(
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+int
+__cdecl
+_fpclass(
+ _In_ double);
+
+_Check_return_
+__MINGW_NOTHROW
+_CRTIMP
+int
+__cdecl
+_isnan(
+ _In_ double);
+
+#ifdef __cplusplus
}
#endif
extern "C" {
#endif
-_CRTIMP char* __cdecl _getcwd (char*, int);
+_Check_return_
+_Ret_opt_z_
+_CRTIMP
+char*
+__cdecl
+_getcwd(
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */
- _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode);
- _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode);
- _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size);
- _CRTIMP int __cdecl _close(int _FileHandle);
- _CRTIMP int __cdecl _commit(int _FileHandle);
- _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode);
- _CRTIMP int __cdecl _dup(int _FileHandle);
- _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst);
- _CRTIMP int __cdecl _eof(int _FileHandle);
- _CRTIMP long __cdecl _filelength(int _FileHandle);
- _CRTIMP intptr_t __cdecl _findfirst(const char *_Filename, struct _finddata_t *_FindData);
- _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData);
- _CRTIMP int __cdecl _findnext(intptr_t _FindHandle,struct _finddata_t *_FindData);
- _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData);
- _CRTIMP int __cdecl _findclose(intptr_t _FindHandle);
- _CRTIMP int __cdecl _isatty(int _FileHandle);
- _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes);
- _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin);
- _CRTIMP char *__cdecl _mktemp(char *_TemplateName);
- _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode);
- _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _access(
+ _In_z_ const char *_Filename,
+ _In_ int _AccessMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _chmod(
+ _In_z_ const char *_Filename,
+ _In_ int _Mode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _chsize(
+ _In_ int _FileHandle,
+ _In_ long _Size);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _close(
+ _In_ int _FileHandle);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _commit(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _creat(
+ _In_z_ const char *_Filename,
+ _In_ int _PermissionMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _dup(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _dup2(
+ _In_ int _FileHandleSrc,
+ _In_ int _FileHandleDst);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _eof(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ long
+ __cdecl
+ _filelength(
+ _In_ int _FileHandle);
+
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _findfirst(
+ const char *_Filename,
+ struct _finddata_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _findfirst32(
+ _In_z_ const char *_Filename,
+ _Out_ struct _finddata32_t *_FindData);
+
+ _CRTIMP
+ int
+ __cdecl
+ _findnext(
+ intptr_t _FindHandle,
+ struct _finddata_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _findnext32(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _finddata32_t *_FindData);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ _findclose(
+ _In_ intptr_t _FindHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _isatty(
+ _In_ int _FileHandle);
+
+ _CRTIMP
+ int
+ __cdecl
+ _locking(
+ _In_ int _FileHandle,
+ _In_ int _LockMode,
+ _In_ long _NumOfBytes);
+
+ _Check_return_opt_
+ _CRTIMP
+ long
+ __cdecl
+ _lseek(
+ _In_ int _FileHandle,
+ _In_ long _Offset,
+ _In_ int _Origin);
+
+ _Check_return_
+ _CRTIMP
+ char*
+ __cdecl
+ _mktemp(
+ _Inout_z_ char *_TemplateName);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _pipe(
+ _Inout_updates_(2) int *_PtHandles,
+ _In_ unsigned int _PipeSize,
+ _In_ int _TextMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _read(
+ _In_ int _FileHandle,
+ _Out_writes_bytes_(_MaxCharCount) void *_DstBuf,
+ _In_ unsigned int _MaxCharCount);
#ifndef _CRT_DIRECTORY_DEFINED
#define _CRT_DIRECTORY_DEFINED
- int __cdecl remove(const char *_Filename);
- int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
- _CRTIMP int __cdecl _unlink(const char *_Filename);
-#ifndef NO_OLDNAMES
- _CRTIMP int __cdecl unlink(const char *_Filename);
-#endif
+
+ _Check_return_
+ int
+ __cdecl
+ remove(
+ _In_z_ const char *_Filename);
+
+ _Check_return_
+ int
+ __cdecl
+ rename(
+ _In_z_ const char *_OldFilename,
+ _In_z_ const char *_NewFilename);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _unlink(
+ _In_z_ const char *_Filename);
+
+#ifndef NO_OLDNAMES
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ unlink(
+ _In_z_ const char *_Filename);
#endif
- _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode);
- _CRTIMP long __cdecl _tell(int _FileHandle);
- _CRTIMP int __cdecl _umask(int _Mode);
- _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount);
+#endif /* _CRT_DIRECTORY_DEFINED */
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _setmode(
+ _In_ int _FileHandle,
+ _In_ int _Mode);
+
+ _Check_return_
+ _CRTIMP
+ long
+ __cdecl
+ _tell(
+ _In_ int _FileHandle);
+
+ _CRTIMP
+ int
+ __cdecl
+ _umask(
+ _In_ int _Mode);
+
+ _CRTIMP
+ int
+ __cdecl
+ _write(
+ _In_ int _FileHandle,
+ _In_reads_bytes_(_MaxCharCount) const void *_Buf,
+ _In_ unsigned int _MaxCharCount);
#if _INTEGRAL_MAX_BITS >= 64
- __MINGW_EXTENSION _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle);
- _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData);
- _CRTIMP intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
- _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
- _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
- _CRTIMP int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
- _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
- __MINGW_EXTENSION _CRTIMP __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
- __MINGW_EXTENSION _CRTIMP __int64 __cdecl _telli64(int _FileHandle);
+
+ _Check_return_
+ __MINGW_EXTENSION
+ _CRTIMP
+ __int64
+ __cdecl
+ _filelengthi64(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _findfirst32i64(
+ _In_z_ const char *_Filename,
+ _Out_ struct _finddata32i64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _findfirst64i32(
+ _In_z_ const char *_Filename,
+ _Out_ struct _finddata64i32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _findfirst64(
+ _In_z_ const char *_Filename,
+ _Out_ struct __finddata64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _findnext32i64(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _finddata32i64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _findnext64i32(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _finddata64i32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _findnext64(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct __finddata64_t *_FindData);
+
+ _Check_return_opt_
+ __MINGW_EXTENSION
+ _CRTIMP
+ __int64
+ __cdecl
+ _lseeki64(
+ _In_ int _FileHandle,
+ _In_ __int64 _Offset,
+ _In_ int _Origin);
+
+ _Check_return_
+ __MINGW_EXTENSION
+ _CRTIMP
+ __int64
+ __cdecl
+ _telli64(
+ _In_ int _FileHandle);
+
#ifdef __cplusplus
#include <string.h>
#endif
- __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
+
+ __CRT_INLINE
+ intptr_t
+ __cdecl
+ _findfirst64i32(
+ const char *_Filename,
+ struct _finddata64i32_t *_FindData)
{
struct __finddata64_t fd;
intptr_t ret = _findfirst64(_Filename,&fd);
strncpy(_FindData->name,fd.name,260);
return ret;
}
- __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
+
+ __CRT_INLINE
+ int
+ __cdecl
+ _findnext64i32(
+ intptr_t _FindHandle,
+ struct _finddata64i32_t *_FindData)
{
struct __finddata64_t fd;
int ret = _findnext64(_FindHandle,&fd);
strncpy(_FindData->name,fd.name,260);
return ret;
}
-#endif
+
+#endif /* _INTEGRAL_MAX_BITS >= 64 */
#ifndef NO_OLDNAMES
#ifndef _UWIN
- _CRTIMP int __cdecl chdir (const char *);
- _CRTIMP char *__cdecl getcwd (char *, int);
- _CRTIMP int __cdecl mkdir (const char *);
- _CRTIMP char *__cdecl mktemp(char *);
- _CRTIMP int __cdecl rmdir (const char*);
- _CRTIMP int __cdecl chmod (const char *, int);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ chdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _Ret_opt_z_
+ _CRTIMP
+ char*
+ __cdecl
+ getcwd(
+ _Out_writes_opt_(_SizeInBytes) char *_DstBuf,
+ _In_ int _SizeInBytes);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ mkdir(
+ _In_z_ const char *_Path);
+
+ _CRTIMP
+ char*
+ __cdecl
+ mktemp(
+ _Inout_z_ char *_TemplateName);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ rmdir(
+ _In_z_ const char *_Path);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ chmod(
+ _In_z_ const char *_Filename,
+ _In_ int _AccessMode);
+
#endif /* _UWIN */
#endif /* Not NO_OLDNAMES */
- _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _sopen_s(
+ _Out_ int *_FileHandle,
+ _In_z_ const char *_Filename,
+ _In_ int _OpenFlag,
+ _In_ int _ShareFlag,
+ _In_ int _PermissionMode);
#ifndef __cplusplus
_CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...);
#ifndef _WIO_DEFINED
#define _WIO_DEFINED
- _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
- _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
- _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
- _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
- _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
- _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
- _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
- _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _waccess(
+ _In_z_ const wchar_t *_Filename,
+ _In_ int _AccessMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wchmod(
+ _In_z_ const wchar_t *_Filename,
+ _In_ int _Mode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wcreat(
+ _In_z_ const wchar_t *_Filename,
+ _In_ int _PermissionMode);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _wfindfirst32(
+ _In_z_ const wchar_t *_Filename,
+ _Out_ struct _wfinddata32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wfindnext32(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _wfinddata32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wunlink(
+ _In_z_ const wchar_t *_Filename);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wrename(
+ _In_z_ const wchar_t *_NewFilename,
+ _In_z_ const wchar_t *_OldFilename);
+
+ _CRTIMP
+ wchar_t*
+ __cdecl
+ _wmktemp(
+ _Inout_z_ wchar_t *_TemplateName);
#if _INTEGRAL_MAX_BITS >= 64
- _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
- intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
- _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
- _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
- int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
- _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
-#endif
- _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _wfindfirst32i64(
+ _In_z_ const wchar_t *_Filename,
+ _Out_ struct _wfinddata32i64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _wfindfirst64i32(
+ _In_z_ const wchar_t *_Filename,
+ _Out_ struct _wfinddata64i32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _wfindfirst64(
+ _In_z_ const wchar_t *_Filename,
+ _Out_ struct _wfinddata64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wfindnext32i64(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _wfinddata32i64_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wfindnext64i32(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _wfinddata64i32_t *_FindData);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _wfindnext64(
+ _In_ intptr_t _FindHandle,
+ _Out_ struct _wfinddata64_t *_FindData);
+
+#endif /* _INTEGRAL_MAX_BITS >= 64 */
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wsopen_s(
+ _Out_ int *_FileHandle,
+ _In_z_ const wchar_t *_Filename,
+ _In_ int _OpenFlag,
+ _In_ int _ShareFlag,
+ _In_ int _PermissionFlag);
#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
_CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
#endif /* !_WIO_DEFINED */
- int __cdecl __lock_fhandle(int _Filehandle);
- void __cdecl _unlock_fhandle(int _Filehandle);
- _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle);
- _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags);
-
-#ifndef NO_OLDNAMES
- _CRTIMP int __cdecl access(const char *_Filename,int _AccessMode);
- _CRTIMP int __cdecl chmod(const char *_Filename,int _AccessMode);
- _CRTIMP int __cdecl chsize(int _FileHandle,long _Size);
- _CRTIMP int __cdecl close(int _FileHandle);
- _CRTIMP int __cdecl creat(const char *_Filename,int _PermissionMode);
- _CRTIMP int __cdecl dup(int _FileHandle);
- _CRTIMP int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst);
- _CRTIMP int __cdecl eof(int _FileHandle);
- _CRTIMP long __cdecl filelength(int _FileHandle);
- _CRTIMP int __cdecl isatty(int _FileHandle);
- _CRTIMP int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes);
- _CRTIMP long __cdecl lseek(int _FileHandle,long _Offset,int _Origin);
- _CRTIMP char *__cdecl mktemp(char *_TemplateName);
- _CRTIMP int __cdecl open(const char *_Filename,int _OpenFlag,...);
- _CRTIMP int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
- _CRTIMP int __cdecl setmode(int _FileHandle,int _Mode);
- _CRTIMP int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
- _CRTIMP long __cdecl tell(int _FileHandle);
- _CRTIMP int __cdecl umask(int _Mode);
- _CRTIMP int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount);
-#endif
+ int
+ __cdecl
+ __lock_fhandle(
+ _In_ int _Filehandle);
+
+ void
+ __cdecl
+ _unlock_fhandle(
+ _In_ int _Filehandle);
+
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _get_osfhandle(
+ _In_ int _FileHandle);
+
+ _CRTIMP
+ int
+ __cdecl
+ _open_osfhandle(
+ _In_ intptr_t _OSFileHandle,
+ _In_ int _Flags);
+
+#ifndef NO_OLDNAMES
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ access(
+ _In_z_ const char *_Filename,
+ _In_ int _AccessMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ chmod(
+ _In_z_ const char *_Filename,
+ _In_ int _AccessMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ chsize(
+ _In_ int _FileHandle,
+ _In_ long _Size);
+
+ _Check_return_opt_
+ _CRTIMP
+ int
+ __cdecl
+ close(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ creat(
+ _In_z_ const char *_Filename,
+ _In_ int _PermissionMode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ dup(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ dup2(
+ _In_ int _FileHandleSrc,
+ _In_ int _FileHandleDst);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ __cdecl eof(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ long
+ __cdecl
+ filelength(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ isatty(
+ _In_ int _FileHandle);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ locking(
+ _In_ int _FileHandle,
+ _In_ int _LockMode,
+ _In_ long _NumOfBytes);
+
+ _Check_return_opt_
+ _CRTIMP
+ long
+ __cdecl
+ lseek(
+ _In_ int _FileHandle,
+ _In_ long _Offset,
+ _In_ int _Origin);
+
+ _CRTIMP
+ char*
+ __cdecl
+ mktemp(
+ _Inout_z_ char *_TemplateName);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ open(
+ _In_z_ const char *_Filename,
+ _In_ int _OpenFlag,
+ ...);
+
+ _CRTIMP
+ int
+ __cdecl
+ read(
+ _In_ int _FileHandle,
+ _Out_writes_bytes_(_MaxCharCount) void *_DstBuf,
+ _In_ unsigned int _MaxCharCount);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ setmode(
+ _In_ int _FileHandle,
+ _In_ int _Mode);
+
+ _CRTIMP
+ int
+ __cdecl
+ sopen(
+ const char *_Filename,
+ int _OpenFlag,
+ int _ShareFlag,
+ ...);
+
+ _Check_return_
+ _CRTIMP
+ long
+ __cdecl
+ tell(
+ _In_ int _FileHandle);
+
+ _CRTIMP
+ int
+ __cdecl
+ umask(
+ _In_ int _Mode);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ write(
+ _In_ int _Filehandle,
+ _In_reads_bytes_(_MaxCharCount) const void *_Buf,
+ _In_ unsigned int _MaxCharCount);
+
+#endif /* NO_OLDNAMES */
#ifdef __cplusplus
}
#define access(__f,__m) __mingw_access (__f, __m)
#endif
-
#ifdef __cplusplus
}
#endif
-
#pragma pack(pop)
#include <sec_api/io_s.h>
#endif
- int __cdecl _configthreadlocale(int _Flag);
- char *__cdecl setlocale(int _Category,const char *_Locale);
- _CRTIMP struct lconv *__cdecl localeconv(void);
- _locale_t __cdecl _get_current_locale(void);
- _locale_t __cdecl _create_locale(int _Category,const char *_Locale);
- void __cdecl _free_locale(_locale_t _Locale);
- _locale_t __cdecl __get_current_locale(void);
- _locale_t __cdecl __create_locale(int _Category,const char *_Locale);
- void __cdecl __free_locale(_locale_t _Locale);
+ _Check_return_opt_
+ int
+ __cdecl
+ _configthreadlocale(
+ _In_ int _Flag);
+
+ _Check_return_opt_
+ char*
+ __cdecl
+ setlocale(
+ _In_ int _Category,
+ _In_opt_z_ const char *_Locale);
+
+ _Check_return_opt_
+ _CRTIMP
+ struct lconv*
+ __cdecl
+ localeconv(void);
+
+ _Check_return_opt_
+ _locale_t
+ __cdecl
+ _get_current_locale(void);
+
+ _Check_return_opt_
+ _locale_t
+ __cdecl
+ _create_locale(
+ _In_ int _Category,
+ _In_z_ const char *_Locale);
+
+ void
+ __cdecl
+ _free_locale(
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _locale_t
+ __cdecl
+ __get_current_locale(void);
+
+ _Check_return_
+ _locale_t
+ __cdecl
+ __create_locale(
+ _In_ int _Category,
+ _In_z_ const char *_Locale);
+
+ void
+ __cdecl
+ __free_locale(
+ _In_opt_ _locale_t _Locale);
#ifndef _WLOCALE_DEFINED
#define _WLOCALE_DEFINED
- _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
+ _Check_return_opt_
+ _CRTIMP
+ wchar_t*
+ __cdecl
+ _wsetlocale(
+ _In_ int _Category,
+ _In_opt_z_ const wchar_t *_Locale);
#endif
#ifdef __cplusplus
#ifndef _CRT_ALLOCATION_DEFINED
#define _CRT_ALLOCATION_DEFINED
- void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
- void __cdecl free(void *_Memory);
- void *__cdecl malloc(size_t _Size);
- void *__cdecl realloc(void *_Memory,size_t _NewSize);
- _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_NumOfElements * _SizeOfElements)
+ void*
+ __cdecl
+ calloc(
+ _In_ size_t _NumOfElements,
+ _In_ size_t _SizeOfElements);
+
+ void
+ __cdecl
+ free(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Size)
+ void*
+ __cdecl
+ malloc(
+ _In_ size_t _Size);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_NewSize)
+ void*
+ __cdecl
+ realloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _NewSize);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Count * _Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _recalloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _Count,
+ _In_ size_t _Size);
#ifdef __DO_ALIGN_DEFINES
- _CRTIMP void __cdecl _aligned_free(void *_Memory);
- _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
-#endif
- _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
- _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
- _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
- _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
- _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
-#endif
+ _CRTIMP
+ void
+ __cdecl
+ _aligned_free(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_malloc(
+ _In_ size_t _Size,
+ _In_ size_t _Alignment);
+
+#endif /* __DO_ALIGN_DEFINES */
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_offset_malloc(
+ _In_ size_t _Size,
+ _In_ size_t _Alignment,
+ _In_ size_t _Offset);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_realloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _Size,
+ _In_ size_t _Alignment);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Count * _Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_recalloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _Count,
+ _In_ size_t _Size,
+ _In_ size_t _Alignment);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_offset_realloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _Size,
+ _In_ size_t _Alignment,
+ _In_ size_t _Offset);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_Count * _Size)
+ _CRTIMP
+ void*
+ __cdecl
+ _aligned_offset_recalloc(
+ _Pre_maybenull_ _Post_invalid_ void *_Memory,
+ _In_ size_t _Count,
+ _In_ size_t _Size,
+ _In_ size_t _Alignment,
+ _In_ size_t _Offset);
+
+#endif /* _CRT_ALLOCATION_DEFINED */
#ifdef __DO_ALIGN_DEFINES
#undef __DO_ALIGN_DEFINES
#define _MAX_WAIT_MALLOC_CRT 60000
_CRTIMP int __cdecl _resetstkoflw (void);
- _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue);
- _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize);
- _CRTIMP size_t __cdecl _msize(void *_Memory);
+ _CRTIMP
+ unsigned long
+ __cdecl
+ _set_malloc_crt_max_wait(
+ _In_ unsigned long _NewValue);
+
+ _Check_return_
+ _Ret_maybenull_
+ _Post_writable_byte_size_(_NewSize)
+ _CRTIMP
+ void*
+ __cdecl
+ _expand(
+ _In_opt_ void *_Memory,
+ _In_ size_t _NewSize);
+
+ _Check_return_
+ _CRTIMP
+ size_t
+ __cdecl
+ _msize(
+ _In_ void *_Memory);
+
#ifdef __GNUC__
#undef _alloca
#define _alloca(x) __builtin_alloca((x))
#else
- void *__cdecl _alloca(size_t _Size);
-#endif
- _CRTIMP size_t __cdecl _get_sbh_threshold(void);
- _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);
- _CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value);
- _CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value);
- _CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size);
- _CRTIMP int __cdecl _heapchk(void);
- _CRTIMP int __cdecl _heapmin(void);
- _CRTIMP int __cdecl _heapset(unsigned int _Fill);
- _CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo);
- _CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit);
- _CRTIMP intptr_t __cdecl _get_heap_handle(void);
+ _Ret_notnull_
+ _Post_writable_byte_size_(_Size)
+ void*
+ __cdecl
+ _alloca(
+ _In_ size_t _Size);
+#endif
+
+ _Check_return_
+ _CRTIMP
+ size_t
+ __cdecl
+ _get_sbh_threshold(void);
+
+ _CRTIMP
+ int
+ __cdecl
+ _set_sbh_threshold(
+ _In_ size_t _NewValue);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _set_amblksiz(
+ _In_ size_t _Value);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _get_amblksiz(
+ _Out_ size_t *_Value);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _heapadd(
+ _In_ void *_Memory,
+ _In_ size_t _Size);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _heapchk(void);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _heapmin(void);
+
+ _CRTIMP
+ int
+ __cdecl
+ _heapset(
+ _In_ unsigned int _Fill);
+
+ _CRTIMP
+ int
+ __cdecl
+ _heapwalk(
+ _Inout_ _HEAPINFO *_EntryInfo);
+
+ _CRTIMP
+ size_t
+ __cdecl
+ _heapused(
+ size_t *_Used,
+ size_t *_Commit);
+
+ _CRTIMP
+ intptr_t
+ __cdecl
+ _get_heap_handle(void);
#define _ALLOCA_S_THRESHOLD 1024
#define _ALLOCA_S_STACK_MARKER 0xCCCC
typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **);
#endif
- _CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook);
+ _CRTIMP
+ _HEAPHOOK
+ __cdecl
+ _setheaphook(
+ _In_opt_ _HEAPHOOK _NewHook);
-#define _HEAP_MALLOC 1
-#define _HEAP_CALLOC 2
-#define _HEAP_FREE 3
+#define _HEAP_MALLOC 1
+#define _HEAP_CALLOC 2
+#define _HEAP_FREE 3
#define _HEAP_REALLOC 4
-#define _HEAP_MSIZE 5
-#define _HEAP_EXPAND 6
+#define _HEAP_MSIZE 5
+#define _HEAP_EXPAND 6
#endif
#ifdef __cplusplus
#ifndef _CRT_ABS_DEFINED
#define _CRT_ABS_DEFINED
- int __cdecl abs(int x);
- long __cdecl labs(long x);
+ int __cdecl abs(_In_ int x);
+ long __cdecl labs(_In_ long x);
#endif
- double __cdecl acos(double x);
- double __cdecl asin(double x);
- double __cdecl atan(double x);
- double __cdecl atan2(double y, double x);
- double __cdecl cos(double x);
- double __cdecl cosh(double x);
- double __cdecl exp(double x);
- double __cdecl fabs(double x);
- double __cdecl fmod(double x, double y);
- double __cdecl log(double x);
- double __cdecl log10(double x);
- double __cdecl pow(double x, double y);
- double __cdecl sin(double x);
- double __cdecl sinh(double x);
- double __cdecl sqrt(double x);
- double __cdecl tan(double x);
- double __cdecl tanh(double x);
+
+ double __cdecl acos(_In_ double x);
+ double __cdecl asin(_In_ double x);
+ double __cdecl atan(_In_ double x);
+ double __cdecl atan2(_In_ double y, _In_ double x);
+ double __cdecl cos(_In_ double x);
+ double __cdecl cosh(_In_ double x);
+ double __cdecl exp(_In_ double x);
+ double __cdecl fabs(_In_ double x);
+ double __cdecl fmod(_In_ double x, _In_ double y);
+ double __cdecl log(_In_ double x);
+ double __cdecl log10(_In_ double x);
+ double __cdecl pow(_In_ double x, double y);
+ double __cdecl sin(_In_ double x);
+ double __cdecl sinh(_In_ double x);
+ double __cdecl sqrt(_In_ double x);
+ double __cdecl tan(_In_ double x);
+ double __cdecl tanh(_In_ double x);
+
#ifndef _CRT_MATHERR_DEFINED
#define _CRT_MATHERR_DEFINED
- int __cdecl _matherr(struct _exception *except);
+ int __cdecl _matherr(_Inout_ struct _exception *except);
#endif
#ifndef _CRT_ATOF_DEFINED
#define _CRT_ATOF_DEFINED
- _CRTIMP double __cdecl atof(const char *str);
- _CRTIMP double __cdecl _atof_l(const char *str ,_locale_t locale);
-#endif
+
+ _Check_return_
+ _CRTIMP
+ double
+ __cdecl
+ atof(
+ _In_z_ const char *str);
+
+ _Check_return_
+ _CRTIMP
+ double
+ __cdecl
+ _atof_l(
+ _In_z_ const char *str,
+ _In_opt_ _locale_t locale);
+
+#endif /* _CRT_ATOF_DEFINED */
+
#ifndef _SIGN_DEFINED
#define _SIGN_DEFINED
- _CRTIMP double __cdecl _copysign(double x,double sgn);
- _CRTIMP double __cdecl _chgsign(double x);
+ _Check_return_ _CRTIMP double __cdecl _copysign(_In_ double x, _In_ double sgn);
+ _Check_return_ _CRTIMP double __cdecl _chgsign(_In_ double x);
#endif
- _CRTIMP double __cdecl _cabs(struct _complex a);
- _CRTIMP double __cdecl ceil(double x);
- _CRTIMP double __cdecl floor(double x);
- _CRTIMP double __cdecl frexp(double x, int *y);
- _CRTIMP double __cdecl _hypot(double x, double y);
- _CRTIMP double __cdecl _j0(double x);
- _CRTIMP double __cdecl _j1(double x);
- _CRTIMP double __cdecl _jn(int x, double y);
- _CRTIMP double __cdecl ldexp(double x, int y);
- _CRTIMP double __cdecl modf(double x, double *y);
- _CRTIMP double __cdecl _y0(double x);
- _CRTIMP double __cdecl _y1(double x);
- _CRTIMP double __cdecl _yn(int x, double y);
- _CRTIMP float __cdecl _hypotf(float x, float y);
+
+ _CRTIMP double __cdecl _cabs(_In_ struct _complex a);
+ _CRTIMP double __cdecl ceil(_In_ double x);
+ _CRTIMP double __cdecl floor(_In_ double x);
+ _CRTIMP double __cdecl frexp(_In_ double x, _Out_ int *y);
+ _CRTIMP double __cdecl _hypot(_In_ double x, _In_ double y);
+ _CRTIMP double __cdecl _j0(_In_ double x);
+ _CRTIMP double __cdecl _j1(_In_ double x);
+ _CRTIMP double __cdecl _jn(_In_ int x, _In_ double y);
+ _CRTIMP double __cdecl ldexp(_In_ double x, _In_ int y);
+ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y);
+ _CRTIMP double __cdecl _y0(_In_ double x);
+ _CRTIMP double __cdecl _y1(_In_ double x);
+ _CRTIMP double __cdecl _yn(_In_ int x, _In_ double y);
+ _CRTIMP float __cdecl _hypotf(_In_ float x, _In_ float y);
#if defined(__i386__) || defined(_M_IX86)
- _CRTIMP int __cdecl _set_SSE2_enable(int flag);
+ _CRTIMP int __cdecl _set_SSE2_enable(_In_ int flag);
#endif
#if defined(__x86_64) || defined(_M_AMD64)
- _CRTIMP float __cdecl _copysignf(float x, float sgn);
- _CRTIMP float __cdecl _chgsignf(float x);
- _CRTIMP float __cdecl _logbf(float x);
- _CRTIMP float __cdecl _nextafterf(float x,float y);
- _CRTIMP int __cdecl _finitef(float x);
- _CRTIMP int __cdecl _isnanf(float x);
- _CRTIMP int __cdecl _fpclassf(float x);
+ _CRTIMP float __cdecl _copysignf(_In_ float x, _In_ float sgn);
+ _CRTIMP float __cdecl _chgsignf(_In_ float x);
+ _CRTIMP float __cdecl _logbf(_In_ float x);
+ _CRTIMP float __cdecl _nextafterf(_In_ float x, _In_ float y);
+ _CRTIMP int __cdecl _finitef(_In_ float x);
+ _CRTIMP int __cdecl _isnanf(_In_ float x);
+ _CRTIMP int __cdecl _fpclassf(_In_ float x);
#endif
#if defined(__ia64__) || defined (_M_IA64)
- _CRTIMP float __cdecl fabsf(float x);
- _CRTIMP float __cdecl ldexpf(float x, int y);
- _CRTIMP long double __cdecl tanl(long double x);
+ _CRTIMP float __cdecl fabsf(_In_ float x);
+ _CRTIMP float __cdecl ldexpf(_In_ float x, _In_ int y);
+ _CRTIMP long double __cdecl tanl(_In_ long double x);
#else
- __CRT_INLINE float __cdecl fabsf(float x) { return ((float)fabs((double)x)); }
- __CRT_INLINE float __cdecl ldexpf(float x, int expn) { return (float)ldexp (x, expn); }
- __CRT_INLINE long double tanl(long double x) { return (tan((double)x)); }
+ __CRT_INLINE float __cdecl fabsf(_In_ float x) { return ((float)fabs((double)x)); }
+ __CRT_INLINE float __cdecl ldexpf(_In_ float x, _In_ int expn) { return (float)ldexp(x, expn); }
+ __CRT_INLINE long double tanl(_In_ long double x) { return (tan((double)x)); }
#endif
-#if (_WIN32_WINNT >= 0x600) && \
+#if (_WIN32_WINNT >= 0x600) && \
(defined(__x86_64) || defined(_M_AMD64) || \
defined (__ia64__) || defined (_M_IA64))
- _CRTIMP float __cdecl acosf(float x);
- _CRTIMP float __cdecl asinf(float x);
- _CRTIMP float __cdecl atanf(float x);
- _CRTIMP float __cdecl atan2f(float x, float y);
- _CRTIMP float __cdecl ceilf(float x);
- _CRTIMP float __cdecl cosf(float x);
- _CRTIMP float __cdecl coshf(float x);
- _CRTIMP float __cdecl expf(float x);
- _CRTIMP float __cdecl floorf(float x);
- _CRTIMP float __cdecl fmodf(float x, float y);
- _CRTIMP float __cdecl logf(float x);
- _CRTIMP float __cdecl log10f(float x);
- _CRTIMP float __cdecl modff(float x, float *y);
- _CRTIMP float __cdecl powf(float b, float e);
- _CRTIMP float __cdecl sinf(float x);
- _CRTIMP float __cdecl sinhf(float x);
- _CRTIMP float __cdecl sqrtf(float x);
- _CRTIMP float __cdecl tanf(float x);
- _CRTIMP float __cdecl tanhf(float x);
+
+ _CRTIMP float __cdecl acosf(_In_ float x);
+ _CRTIMP float __cdecl asinf(_In_ float x);
+ _CRTIMP float __cdecl atanf(_In_ float x);
+ _CRTIMP float __cdecl atan2f(_In_ float x, _In_ float y);
+ _CRTIMP float __cdecl ceilf(_In_ float x);
+ _CRTIMP float __cdecl cosf(_In_ float x);
+ _CRTIMP float __cdecl coshf(_In_ float x);
+ _CRTIMP float __cdecl expf(_In_ float x);
+ _CRTIMP float __cdecl floorf(_In_ float x);
+ _CRTIMP float __cdecl fmodf(_In_ float x, _In_ float y);
+ _CRTIMP float __cdecl logf(_In_ float x);
+ _CRTIMP float __cdecl log10f(_In_ float x);
+ _CRTIMP float __cdecl modff(_In_ float x, _Out_ float *y);
+ _CRTIMP float __cdecl powf(_In_ float b, _In_ float e);
+ _CRTIMP float __cdecl sinf(_In_ float x);
+ _CRTIMP float __cdecl sinhf(_In_ float x);
+ _CRTIMP float __cdecl sqrtf(_In_ float x);
+ _CRTIMP float __cdecl tanf(_In_ float x);
+ _CRTIMP float __cdecl tanhf(_In_ float x);
+
#else
- __CRT_INLINE float acosf(float x) { return ((float)acos((double)x)); }
- __CRT_INLINE float asinf(float x) { return ((float)asin((double)x)); }
- __CRT_INLINE float atanf(float x) { return ((float)atan((double)x)); }
- __CRT_INLINE float atan2f(float x,float y) { return ((float)atan2((double)x,(double)y)); }
- __CRT_INLINE float ceilf(float x) { return ((float)ceil((double)x)); }
- __CRT_INLINE float cosf(float x) { return ((float)cos((double)x)); }
- __CRT_INLINE float coshf(float x) { return ((float)cosh((double)x)); }
- __CRT_INLINE float expf(float x) { return ((float)exp((double)x)); }
- __CRT_INLINE float floorf(float x) { return ((float)floor((double)x)); }
- __CRT_INLINE float fmodf(float x,float y) { return ((float)fmod((double)x,(double)y)); }
- __CRT_INLINE float logf(float x) { return ((float)log((double)x)); }
- __CRT_INLINE float log10f(float x) { return ((float)log10((double)x)); }
- __CRT_INLINE float modff(float x,float *y) {
+
+ __CRT_INLINE float acosf(_In_ float x) { return ((float)acos((double)x)); }
+ __CRT_INLINE float asinf(_In_ float x) { return ((float)asin((double)x)); }
+ __CRT_INLINE float atanf(_In_ float x) { return ((float)atan((double)x)); }
+ __CRT_INLINE float atan2f(_In_ float x, _In_ float y) { return ((float)atan2((double)x,(double)y)); }
+ __CRT_INLINE float ceilf(_In_ float x) { return ((float)ceil((double)x)); }
+ __CRT_INLINE float cosf(_In_ float x) { return ((float)cos((double)x)); }
+ __CRT_INLINE float coshf(_In_ float x) { return ((float)cosh((double)x)); }
+ __CRT_INLINE float expf(_In_ float x) { return ((float)exp((double)x)); }
+ __CRT_INLINE float floorf(_In_ float x) { return ((float)floor((double)x)); }
+ __CRT_INLINE float fmodf(_In_ float x, _In_ float y) { return ((float)fmod((double)x,(double)y)); }
+ __CRT_INLINE float logf(_In_ float x) { return ((float)log((double)x)); }
+ __CRT_INLINE float log10f(_In_ float x) { return ((float)log10((double)x)); }
+ __CRT_INLINE float modff(_In_ float x, _Out_ float *y) {
double _Di,_Df = modf((double)x,&_Di);
*y = (float)_Di;
return ((float)_Df);
}
- __CRT_INLINE float powf(float x,float y) { return ((float)pow((double)x,(double)y)); }
- __CRT_INLINE float sinf(float x) { return ((float)sin((double)x)); }
- __CRT_INLINE float sinhf(float x) { return ((float)sinh((double)x)); }
- __CRT_INLINE float sqrtf(float x) { return ((float)sqrt((double)x)); }
- __CRT_INLINE float tanf(float x) { return ((float)tan((double)x)); }
- __CRT_INLINE float tanhf(float x) { return ((float)tanh((double)x)); }
+ __CRT_INLINE float powf(_In_ float x, _In_ float y) { return ((float)pow((double)x,(double)y)); }
+ __CRT_INLINE float sinf(_In_ float x) { return ((float)sin((double)x)); }
+ __CRT_INLINE float sinhf(_In_ float x) { return ((float)sinh((double)x)); }
+ __CRT_INLINE float sqrtf(_In_ float x) { return ((float)sqrt((double)x)); }
+ __CRT_INLINE float tanf(_In_ float x) { return ((float)tan((double)x)); }
+ __CRT_INLINE float tanhf(_In_ float x) { return ((float)tanh((double)x)); }
+
#endif
- __CRT_INLINE long double acosl(long double x) { return (acos((double)x)); }
- __CRT_INLINE long double asinl(long double x) { return (asin((double)x)); }
- __CRT_INLINE long double atanl(long double x) { return (atan((double)x)); }
- __CRT_INLINE long double atan2l(long double y, long double x) { return (atan2((double)y, (double)x)); }
- __CRT_INLINE long double ceill(long double x) { return (ceil((double)x)); }
- __CRT_INLINE long double cosl(long double x) { return (cos((double)x)); }
- __CRT_INLINE long double coshl(long double x) { return (cosh((double)x)); }
- __CRT_INLINE long double expl(long double x) { return (exp((double)x)); }
- __CRT_INLINE long double floorl(long double x) { return (floor((double)x)); }
- __CRT_INLINE long double fmodl(long double x, long double y) { return (fmod((double)x, (double)y)); }
- __CRT_INLINE long double frexpl(long double x, int *y) { return (frexp((double)x, y)); }
- __CRT_INLINE long double logl(long double x) { return (log((double)x)); }
- __CRT_INLINE long double log10l(long double x) { return (log10((double)x)); }
- __CRT_INLINE long double powl(long double x, long double y) { return (pow((double)x, (double)y)); }
- __CRT_INLINE long double sinl(long double x) { return (sin((double)x)); }
- __CRT_INLINE long double sinhl(long double x) { return (sinh((double)x)); }
- __CRT_INLINE long double sqrtl(long double x) { return (sqrt((double)x)); }
- __CRT_INLINE long double tanhl(long double x) {return (tanh((double)x)); }
- __CRT_INLINE long double __cdecl fabsl(long double x) { return fabs((double)x); }
- __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); }
- __CRT_INLINE long double _copysignl(long double _Number, long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
- __CRT_INLINE long double _hypotl(long double x,long double y) { return _hypot((double)(x),(double)(y)); }
- __CRT_INLINE float frexpf(float x, int *y) { return ((float)frexp((double)x,y)); }
- __CRT_INLINE long double ldexpl(long double x, int y) { return ldexp((double)x, y); }
- __CRT_INLINE long double modfl(long double x,long double *y) {
+ __CRT_INLINE long double acosl(_In_ long double x) { return (acos((double)x)); }
+ __CRT_INLINE long double asinl(_In_ long double x) { return (asin((double)x)); }
+ __CRT_INLINE long double atanl(_In_ long double x) { return (atan((double)x)); }
+ __CRT_INLINE long double atan2l(_In_ long double y, _In_ long double x) { return (atan2((double)y, (double)x)); }
+ __CRT_INLINE long double ceill(_In_ long double x) { return (ceil((double)x)); }
+ __CRT_INLINE long double cosl(_In_ long double x) { return (cos((double)x)); }
+ __CRT_INLINE long double coshl(_In_ long double x) { return (cosh((double)x)); }
+ __CRT_INLINE long double expl(_In_ long double x) { return (exp((double)x)); }
+ __CRT_INLINE long double floorl(_In_ long double x) { return (floor((double)x)); }
+ __CRT_INLINE long double fmodl(_In_ long double x, _In_ long double y) { return (fmod((double)x, (double)y)); }
+ __CRT_INLINE long double frexpl(_In_ long double x, _Out_ int *y) { return (frexp((double)x, y)); }
+ __CRT_INLINE long double logl(_In_ long double x) { return (log((double)x)); }
+ __CRT_INLINE long double log10l(_In_ long double x) { return (log10((double)x)); }
+ __CRT_INLINE long double powl(_In_ long double x, _In_ long double y) { return (pow((double)x, (double)y)); }
+ __CRT_INLINE long double sinl(_In_ long double x) { return (sin((double)x)); }
+ __CRT_INLINE long double sinhl(_In_ long double x) { return (sinh((double)x)); }
+ __CRT_INLINE long double sqrtl(_In_ long double x) { return (sqrt((double)x)); }
+ __CRT_INLINE long double tanhl(_In_ long double x) {return (tanh((double)x)); }
+ __CRT_INLINE long double __cdecl fabsl(_In_ long double x) { return fabs((double)x); }
+ __CRT_INLINE long double _chgsignl(_In_ long double _Number) { return _chgsign((double)(_Number)); }
+ __CRT_INLINE long double _copysignl(_In_ long double _Number, _In_ long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
+ __CRT_INLINE long double _hypotl(_In_ long double x, _In_ long double y) { return _hypot((double)(x),(double)(y)); }
+ __CRT_INLINE float frexpf(_In_ float x, _Out_ int *y) { return ((float)frexp((double)x,y)); }
+ __CRT_INLINE long double ldexpl(_In_ long double x, _In_ int y) { return ldexp((double)x, y); }
+ __CRT_INLINE long double modfl(_In_ long double x, _Out_ long double *y) {
double _Di,_Df = modf((double)x,&_Di);
*y = (long double)_Di;
return (_Df);
}
-#ifndef NO_OLDNAMES
+#ifndef NO_OLDNAMES
+
#define DOMAIN _DOMAIN
#define SING _SING
#define OVERFLOW _OVERFLOW
#define HUGE _HUGE
// _CRTIMP double __cdecl cabs(struct _complex x);
#define cabs _cabs
- _CRTIMP double __cdecl hypot(double x,double y);
- _CRTIMP double __cdecl j0(double x);
- _CRTIMP double __cdecl j1(double x);
- _CRTIMP double __cdecl jn(int x,double y);
- _CRTIMP double __cdecl y0(double x);
- _CRTIMP double __cdecl y1(double x);
- _CRTIMP double __cdecl yn(int x,double y);
- __CRT_INLINE float __cdecl hypotf(float x, float y) { return (float) hypot (x, y); }
-#endif
+
+ _CRTIMP double __cdecl hypot(_In_ double x, _In_ double y);
+ _CRTIMP double __cdecl j0(_In_ double x);
+ _CRTIMP double __cdecl j1(_In_ double x);
+ _CRTIMP double __cdecl jn(_In_ int x, _In_ double y);
+ _CRTIMP double __cdecl y0(_In_ double x);
+ _CRTIMP double __cdecl y1(_In_ double x);
+ _CRTIMP double __cdecl yn(_In_ int x, _In_ double y);
+ __CRT_INLINE float __cdecl hypotf(_In_ float x, _In_ float y) { return (float) hypot(x, y); }
+
+#endif /* NO_OLDNAMES */
#ifdef __cplusplus
}
#if 1
#if defined (_DLL) && defined (_M_IX86)
/* Retained for compatibility with VC++ 5.0 and earlier versions */
- _CRTIMP unsigned char * __cdecl __p__mbctype(void);
- _CRTIMP unsigned char * __cdecl __p__mbcasemap(void);
+ _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbctype(void);
+ _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbcasemap(void);
#endif /* defined (_DLL) && defined (_M_IX86) */
#endif
#ifndef _mbctype
#ifndef _MBCTYPE_DEFINED
#define _MBCTYPE_DEFINED
- _CRTIMP int __cdecl _setmbcp(int _CodePage);
- _CRTIMP int __cdecl _getmbcp(void);
- _CRTIMP int __cdecl _ismbbkalnum(unsigned int _C);
- _CRTIMP int __cdecl _ismbbkalnum_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbkana(unsigned int _C);
- _CRTIMP int __cdecl _ismbbkana_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbkpunct(unsigned int _C);
- _CRTIMP int __cdecl _ismbbkpunct_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbkprint(unsigned int _C);
- _CRTIMP int __cdecl _ismbbkprint_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbalpha(unsigned int _C);
- _CRTIMP int __cdecl _ismbbalpha_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbpunct(unsigned int _C);
- _CRTIMP int __cdecl _ismbbpunct_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbalnum(unsigned int _C);
- _CRTIMP int __cdecl _ismbbalnum_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbprint(unsigned int _C);
- _CRTIMP int __cdecl _ismbbprint_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbgraph(unsigned int _C);
- _CRTIMP int __cdecl _ismbbgraph_l(unsigned int _C,_locale_t _Locale);
+ _CRTIMP
+ int
+ __cdecl
+ _setmbcp(
+ _In_ int _CodePage);
+
+ _CRTIMP
+ int
+ __cdecl
+ _getmbcp(void);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkalnum(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkalnum_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkana(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkana_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkpunct(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkpunct_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkprint(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbkprint_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbalpha(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbalpha_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbpunct(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbpunct_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbalnum(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbalnum_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbprint(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbprint_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbgraph(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbgraph_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
#ifndef _MBLEADTRAIL_DEFINED
#define _MBLEADTRAIL_DEFINED
- _CRTIMP int __cdecl _ismbblead(unsigned int _C);
- _CRTIMP int __cdecl _ismbblead_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbbtrail(unsigned int _C);
- _CRTIMP int __cdecl _ismbbtrail_l(unsigned int _C,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbslead(const unsigned char *_Str,const unsigned char *_Pos);
- _CRTIMP int __cdecl _ismbslead_l(const unsigned char *_Str,const unsigned char *_Pos,_locale_t _Locale);
- _CRTIMP int __cdecl _ismbstrail(const unsigned char *_Str,const unsigned char *_Pos);
- _CRTIMP int __cdecl _ismbstrail_l(const unsigned char *_Str,const unsigned char *_Pos,_locale_t _Locale);
-#endif
-#endif
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbblead(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbblead_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbtrail(
+ _In_ unsigned int _C);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbbtrail_l(
+ _In_ unsigned int _C,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbslead(
+ _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
+ _In_z_ const unsigned char *_Pos);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbslead_l(
+ _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
+ _In_z_ const unsigned char *_Pos,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbstrail(
+ _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
+ _In_z_ const unsigned char *_Pos);
+
+ _Check_return_
+ _CRTIMP
+ int
+ __cdecl
+ _ismbstrail_l(
+ _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
+ _In_z_ const unsigned char *_Pos,
+ _In_opt_ _locale_t _Locale);
+
+#endif /* _MBLEADTRAIL_DEFINED */
+
+#endif /* _MBCTYPE_DEFINED */
#ifdef __cplusplus
}
#endif
-#endif
+
+#endif /* _INC_MBCTYPE */
extern "C" {
#endif
- _CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName);
- _CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix);
- _CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
- _CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
- _CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix);
- _CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale);
- _CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix);
- _CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale);
- _CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes);
- _CRTIMP errno_t __cdecl _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale);
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _dupenv_s(
+ _Outptr_result_buffer_maybenull_(*_PBufferSizeInBytes) _Outptr_result_z_ char **_PBuffer,
+ _Out_opt_ size_t *_PBufferSizeInBytes,
+ _In_z_ const char *_VarName);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _itoa_s(
+ _In_ int _Value,
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ int _Radix);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _i64toa_s(
+ _In_ __int64 _Val,
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ int _Radix);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ui64toa_s(
+ _In_ unsigned __int64 _Val,
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ int _Radix);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ltoa_s(
+ _In_ long _Val,
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ int _Radix);
+
+ _Success_(return!=EINVAL)
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ mbstowcs_s(
+ _Out_opt_ size_t *pcchConverted,
+ _Out_writes_to_opt_(sizeInWords, *pcchConverted) wchar_t *pwcstr,
+ _In_ size_t sizeInWords,
+ _In_reads_or_z_(count) const char *pmbstr,
+ _In_ size_t count);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _mbstowcs_s_l(
+ _Out_opt_ size_t *_PtNumOfCharConverted,
+ _Out_writes_to_opt_(_SizeInWords, *_PtNumOfCharConverted) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_reads_or_z_(_MaxCount) const char *_SrcBuf,
+ _In_ size_t _MaxCount,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_opt_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ultoa_s(
+ _In_ unsigned long _Val,
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ int _Radix);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wctomb_s_l(
+ _Out_opt_ int *_SizeConverted,
+ _Out_writes_opt_z_(_SizeInBytes) char *_MbCh,
+ _In_ size_t _SizeInBytes,
+ _In_ wchar_t _WCh,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ wcstombs_s(
+ _Out_opt_ size_t *_PtNumOfCharConverted,
+ _Out_writes_bytes_to_opt_(_DstSizeInBytes, *_PtNumOfCharConverted) char *_Dst,
+ _In_ size_t _DstSizeInBytes,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCountInBytes);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcstombs_s_l(
+ _Out_opt_ size_t *_PtNumOfCharConverted,
+ _Out_writes_bytes_to_opt_(_DstSizeInBytes, *_PtNumOfCharConverted) char *_Dst,
+ _In_ size_t _DstSizeInBytes,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCountInBytes,
+ _In_opt_ _locale_t _Locale);
#ifndef _WSTDLIB_S_DEFINED
#define _WSTDLIB_S_DEFINED
- _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
- _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
- _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
- _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
- _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
- _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
- _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
-#endif
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _itow_s(
+ _In_ int _Val,
+ _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_ int _Radix);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ltow_s(
+ _In_ long _Val,
+ _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_ int _Radix);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ultow_s(
+ _In_ unsigned long _Val,
+ _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_ int _Radix);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wgetenv_s(
+ _Out_ size_t *_ReturnSize,
+ _Out_writes_opt_z_(_DstSizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _DstSizeInWords,
+ _In_z_ const wchar_t *_VarName);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wdupenv_s(
+ _Outptr_result_buffer_maybenull_(*_BufferSizeInWords) _Outptr_result_z_ wchar_t **_Buffer,
+ _Out_opt_ size_t *_BufferSizeInWords,
+ _In_z_ const wchar_t *_VarName);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _i64tow_s(
+ _In_ __int64 _Val,
+ _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_ int _Radix);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ui64tow_s(
+ _In_ unsigned __int64 _Val,
+ _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
+ _In_ size_t _SizeInWords,
+ _In_ int _Radix);
+
+#endif /* _WSTDLIB_S_DEFINED */
#ifndef _POSIX_
- _CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign);
- _CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
- _CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits);
- _CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
- _CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value);
- _CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes);
- _CRTIMP errno_t __cdecl _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _ecvt_s(
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ double _Val,
+ _In_ int _NumOfDights,
+ _Out_ int *_PtDec,
+ _Out_ int *_PtSign);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _fcvt_s(
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ double _Val,
+ _In_ int _NumOfDec,
+ _Out_ int *_PtDec,
+ _Out_ int *_PtSign);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _gcvt_s(
+ _Out_writes_z_(_Size) char *_DstBuf,
+ _In_ size_t _Size,
+ _In_ double _Val,
+ _In_ int _NumOfDigits);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _makepath_s(
+ _Out_writes_z_(_Size) char *_PathResult,
+ _In_ size_t _Size,
+ _In_opt_z_ const char *_Drive,
+ _In_opt_z_ const char *_Dir,
+ _In_opt_z_ const char *_Filename,
+ _In_opt_z_ const char *_Ext);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _putenv_s(
+ _In_z_ const char *_Name,
+ _In_z_ const char *_Value);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _searchenv_s(
+ _In_z_ const char *_Filename,
+ _In_z_ const char *_EnvVar,
+ _Out_writes_z_(_SizeInBytes) char *_ResultPath,
+ _In_ size_t _SizeInBytes);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _splitpath_s(
+ _In_z_ const char *_FullPath,
+ _Out_writes_opt_z_(_DriveSize) char *_Drive,
+ _In_ size_t _DriveSize,
+ _Out_writes_opt_z_(_DirSize) char *_Dir,
+ _In_ size_t _DirSize,
+ _Out_writes_opt_z_(_FilenameSize) char *_Filename,
+ _In_ size_t _FilenameSize,
+ _Out_writes_opt_z_(_ExtSize) char *_Ext,
+ _In_ size_t _ExtSize);
#ifndef _WSTDLIBP_S_DEFINED
#define _WSTDLIBP_S_DEFINED
- _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
- _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
- _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
- _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
-#endif
-#endif
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wmakepath_s(
+ _Out_writes_z_(_SizeInWords) wchar_t *_PathResult,
+ _In_ size_t _SizeInWords,
+ _In_opt_z_ const wchar_t *_Drive,
+ _In_opt_z_ const wchar_t *_Dir,
+ _In_opt_z_ const wchar_t *_Filename,
+ _In_opt_z_ const wchar_t *_Ext);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wputenv_s(
+ _In_z_ const wchar_t *_Name,
+ _In_z_ const wchar_t *_Value);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wsearchenv_s(
+ _In_z_ const wchar_t *_Filename,
+ _In_z_ const wchar_t *_EnvVar,
+ _Out_writes_z_(_SizeInWords) wchar_t *_ResultPath,
+ _In_ size_t _SizeInWords);
+
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wsplitpath_s(
+ _In_z_ const wchar_t *_FullPath,
+ _Out_writes_opt_z_(_DriveSizeInWords) wchar_t *_Drive,
+ _In_ size_t _DriveSizeInWords,
+ _Out_writes_opt_z_(_DirSizeInWords) wchar_t *_Dir,
+ _In_ size_t _DirSizeInWords,
+ _Out_writes_opt_z_(_FilenameSizeInWords) wchar_t *_Filename,
+ _In_ size_t _FilenameSizeInWords,
+ _Out_writes_opt_z_(_ExtSizeInWords) wchar_t *_Ext,
+ _In_ size_t _ExtSizeInWords);
+
+#endif /* _WSTDLIBP_S_DEFINED */
+
+#endif /* _POSIX_ */
#ifdef __cplusplus
}
#endif
-#endif
-#endif
+#endif /* defined(MINGW_HAS_SECURE_API) */
+
+#endif /* _INC_STDLIB_S */
typedef void (__cdecl *_purecall_handler)(void);
- _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
+ _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_In_opt_ _purecall_handler _Handler);
_CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
- _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
+ _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_In_opt_ _invalid_parameter_handler _Handler);
_invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
#include <errno.h>
_CRTIMP errno_t __cdecl _get_environ(_Out_ char***);
_CRTIMP errno_t __cdecl _get_wenviron(_Out_ wchar_t***);
- _CRTIMP errno_t __cdecl _get_pgmptr(_Deref_out_z_ char **_Value);
- _CRTIMP errno_t __cdecl _get_wpgmptr(_Deref_out_z_ wchar_t **_Value);
+ _CRTIMP errno_t __cdecl _get_pgmptr(_Outptr_result_z_ char **_Value);
+ _CRTIMP errno_t __cdecl _get_wpgmptr(_Outptr_result_z_ wchar_t **_Value);
#ifdef _M_CEE_PURE
_CRTIMP int* __cdecl __p__fmode();
void
__cdecl
qsort(
- _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void *_Base,
+ _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) _Post_readable_byte_size_(_NumOfElements * _SizeOfElements) void *_Base,
_In_ size_t _NumOfElements,
_In_ size_t _SizeOfElements,
_In_ int (__cdecl *_PtFuncCompare)(const void *,const void *));
#endif /* _INTEGRAL_MAX_BITS >= 64 */
+ _Check_return_
ldiv_t
__cdecl
ldiv(
malloc(
_In_ size_t _Size);
+ _Success_(return != 0)
_Check_return_
_Ret_maybenull_
_Post_writable_byte_size_(_NewSize)
_Pre_maybenull_ _Post_invalid_ void *_Memory,
_In_ size_t _NewSize);
+ _Success_(return != 0)
_Check_return_
_Ret_maybenull_
_Post_writable_byte_size_(_Count * _Size)
_In_ size_t _Alignment,
_In_ size_t _Offset);
+ _Success_(return != 0)
_Check_return_
_Ret_maybenull_
_Post_writable_byte_size_(_Size)
_In_ size_t _Size,
_In_ size_t _Alignment);
+ _Success_(return != 0)
_Check_return_
_Ret_maybenull_
_Post_writable_byte_size_(_Count * _Size)
_In_ size_t _Size,
_In_ size_t _Alignment);
+ _Success_(return != 0)
_Check_return_
_Ret_maybenull_
_Post_writable_byte_size_(_Size)
_In_z_ char *_Str,
_In_opt_ _locale_t _Locale);
+ _Check_return_
unsigned long
__cdecl
_lrotl(
_In_ unsigned long _Val,
_In_ int _Shift);
+ _Check_return_
unsigned long
__cdecl
_lrotr(
__MINGW_EXTENSION typedef struct { long long quot, rem; } lldiv_t;
- __MINGW_EXTENSION lldiv_t __cdecl lldiv(long long, long long);
+ _Check_return_ __MINGW_EXTENSION lldiv_t __cdecl lldiv(_In_ long long, _In_ long long);
#ifndef _MSC_VER
- __MINGW_EXTENSION __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
+ __MINGW_EXTENSION __CRT_INLINE long long __cdecl llabs(_In_ long long _j) { return (_j >= 0 ? _j : -_j); }
#endif
__MINGW_EXTENSION long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
ULONG IdleHandlerReserved[4];
} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
-typedef BOOLEAN
-(FASTCALL*PPROCESSOR_IDLE_HANDLER)(
- IN OUT PPROCESSOR_IDLE_TIMES IdleTimes);
+_Function_class_(PROCESSOR_IDLE_HANDLER)
+typedef NTSTATUS
+(FASTCALL *PPROCESSOR_IDLE_HANDLER)(
+ _In_ ULONG_PTR Context,
+ _Inout_ PPROCESSOR_IDLE_TIMES IdleTimes);
typedef struct _PROCESSOR_IDLE_HANDLER_INFO {
ULONG HardwareLatency;
PowerStateMaximum
} POWER_STATE_HANDLER_TYPE, *PPOWER_STATE_HANDLER_TYPE;
+_Function_class_(ENTER_STATE_SYSTEM_HANDLER)
+_IRQL_requires_same_
typedef NTSTATUS
-(NTAPI*PENTER_STATE_SYSTEM_HANDLER)(
- IN PVOID SystemContext);
+(NTAPI *PENTER_STATE_SYSTEM_HANDLER)(
+ _In_ PVOID SystemContext);
+_Function_class_(ENTER_STATE_HANDLER)
+_IRQL_requires_same_
typedef NTSTATUS
-(NTAPI*PENTER_STATE_HANDLER)(
- IN PVOID Context,
- IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
- IN PVOID SystemContext,
- IN LONG NumberProcessors,
- IN LONG volatile *Number);
+(NTAPI *PENTER_STATE_HANDLER)(
+ _In_opt_ PVOID Context,
+ _In_opt_ PENTER_STATE_SYSTEM_HANDLER SystemHandler,
+ _In_opt_ PVOID SystemContext,
+ _In_ LONG NumberProcessors,
+ _In_opt_ LONG volatile *Number);
typedef struct _POWER_STATE_HANDLER {
POWER_STATE_HANDLER_TYPE Type;
PVOID Context;
} POWER_STATE_HANDLER, *PPOWER_STATE_HANDLER;
+_Function_class_(ENTER_STATE_NOTIFY_HANDLER)
+_IRQL_requires_same_
typedef NTSTATUS
-(NTAPI*PENTER_STATE_NOTIFY_HANDLER)(
- IN POWER_STATE_HANDLER_TYPE State,
- IN PVOID Context,
- IN BOOLEAN Entering);
+(NTAPI *PENTER_STATE_NOTIFY_HANDLER)(
+ _In_ POWER_STATE_HANDLER_TYPE State,
+ _In_ PVOID Context,
+ _In_ BOOLEAN Entering);
typedef struct _POWER_STATE_NOTIFY_HANDLER {
PENTER_STATE_NOTIFY_HANDLER Handler;
PVOID Context;
} POWER_STATE_NOTIFY_HANDLER, *PPOWER_STATE_NOTIFY_HANDLER;
+_IRQL_requires_max_(APC_LEVEL)
+__kernel_entry
NTSYSCALLAPI
NTSTATUS
NTAPI
NtPowerInformation(
- IN POWER_INFORMATION_LEVEL InformationLevel,
- IN PVOID InputBuffer OPTIONAL,
- IN ULONG InputBufferLength,
- OUT PVOID OutputBuffer OPTIONAL,
- IN ULONG OutputBufferLength);
+ _In_ POWER_INFORMATION_LEVEL InformationLevel,
+ _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
+ _In_ ULONG InputBufferLength,
+ _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
+ _In_ ULONG OutputBufferLength);
#define PROCESSOR_STATE_TYPE_PERFORMANCE 1
#define PROCESSOR_STATE_TYPE_THROTTLE 2
PROCESSOR_PERF_LEVEL PerfLevel[1];
} PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2;
+_IRQL_requires_max_(PASSIVE_LEVEL)
+__kernel_entry
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetThreadExecutionState(
- IN EXECUTION_STATE esFlags,
- OUT EXECUTION_STATE *PreviousFlags);
+ _In_ EXECUTION_STATE esFlags,
+ _Out_ EXECUTION_STATE *PreviousFlags);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRequestWakeupLatency(
- IN LATENCY_TIME latency);
+ _In_ LATENCY_TIME latency);
+_IRQL_requires_max_(APC_LEVEL)
+__kernel_entry
NTSYSCALLAPI
NTSTATUS
NTAPI
NtInitiatePowerAction(
- IN POWER_ACTION SystemAction,
- IN SYSTEM_POWER_STATE MinSystemState,
- IN ULONG Flags,
- IN BOOLEAN Asynchronous);
+ _In_ POWER_ACTION SystemAction,
+ _In_ SYSTEM_POWER_STATE MinSystemState,
+ _In_ ULONG Flags,
+ _In_ BOOLEAN Asynchronous);
+_IRQL_requires_max_(APC_LEVEL)
+__kernel_entry
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemPowerState(
- IN POWER_ACTION SystemAction,
- IN SYSTEM_POWER_STATE MinSystemState,
- IN ULONG Flags);
+ _In_ POWER_ACTION SystemAction,
+ _In_ SYSTEM_POWER_STATE MinSystemState,
+ _In_ ULONG Flags);
+_IRQL_requires_max_(APC_LEVEL)
+__kernel_entry
NTSYSCALLAPI
NTSTATUS
NTAPI
NtGetDevicePowerState(
- IN HANDLE Device,
- OUT DEVICE_POWER_STATE *State);
+ _In_ HANDLE Device,
+ _Out_ DEVICE_POWER_STATE *State);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCancelDeviceWakeupRequest(
- IN HANDLE Device);
+ _In_ HANDLE Device);
+_IRQL_requires_max_(APC_LEVEL)
+__kernel_entry
NTSYSCALLAPI
BOOLEAN
NTAPI
NTSTATUS
NTAPI
NtRequestDeviceWakeup(
- IN HANDLE Device);
+ _In_ HANDLE Device);
#define WINLOGON_LOCK_ON_SLEEP 0x00000001
#define BATTERY_CLASS_MAJOR_VERSION 0x0001
#define BATTERY_CLASS_MINOR_VERSION 0x0000
+_Function_class_(BCLASS_QUERY_TAG_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_QUERY_TAG_CALLBACK)(
- IN PVOID Context,
- OUT PULONG BatteryTag);
+ _In_ PVOID Context,
+ _Out_ PULONG BatteryTag);
typedef BCLASS_QUERY_TAG_CALLBACK *PBCLASS_QUERY_TAG_CALLBACK;
+_Function_class_(BCLASS_QUERY_INFORMATION_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_QUERY_INFORMATION_CALLBACK)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN BATTERY_QUERY_INFORMATION_LEVEL Level,
- IN LONG AtRate,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- OUT PULONG ReturnedLength);
+ _In_ PVOID Context,
+ _In_ ULONG BatteryTag,
+ _In_ BATTERY_QUERY_INFORMATION_LEVEL Level,
+ _In_ LONG AtRate,
+ _Out_writes_bytes_to_(BufferLength, *ReturnedLength) PVOID Buffer,
+ _In_ ULONG BufferLength,
+ _Out_ PULONG ReturnedLength);
typedef BCLASS_QUERY_INFORMATION_CALLBACK *PBCLASS_QUERY_INFORMATION_CALLBACK;
+_Function_class_(BCLASS_QUERY_STATUS_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_QUERY_STATUS_CALLBACK)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- OUT PBATTERY_STATUS BatteryStatus);
+ _In_ PVOID Context,
+ _In_ ULONG BatteryTag,
+ _Out_ PBATTERY_STATUS BatteryStatus);
typedef BCLASS_QUERY_STATUS_CALLBACK *PBCLASS_QUERY_STATUS_CALLBACK;
typedef struct _BATTERY_NOTIFY {
ULONG HighCapacity;
} BATTERY_NOTIFY, *PBATTERY_NOTIFY;
+_Function_class_(BCLASS_SET_STATUS_NOTIFY_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_SET_STATUS_NOTIFY_CALLBACK)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN PBATTERY_NOTIFY BatteryNotify);
+ _In_ PVOID Context,
+ _In_ ULONG BatteryTag,
+ _In_ PBATTERY_NOTIFY BatteryNotify);
typedef BCLASS_SET_STATUS_NOTIFY_CALLBACK *PBCLASS_SET_STATUS_NOTIFY_CALLBACK;
+_Function_class_(BCLASS_SET_INFORMATION_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_SET_INFORMATION_CALLBACK)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN BATTERY_SET_INFORMATION_LEVEL Level,
- IN PVOID Buffer OPTIONAL);
+ _In_ PVOID Context,
+ _In_ ULONG BatteryTag,
+ _In_ BATTERY_SET_INFORMATION_LEVEL Level,
+ _In_opt_ PVOID Buffer);
typedef BCLASS_SET_INFORMATION_CALLBACK *PBCLASS_SET_INFORMATION_CALLBACK;
+_Function_class_(BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)
+_IRQL_requires_same_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
typedef NTSTATUS
(NTAPI BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)(
- IN PVOID Context);
+ _In_ PVOID Context);
typedef BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK *PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK;
typedef PBCLASS_QUERY_TAG_CALLBACK BCLASS_QUERY_TAG;
#define BCLASSAPI DECLSPEC_IMPORT
#endif
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassInitializeDevice(
- IN PBATTERY_MINIPORT_INFO MiniportInfo,
- IN PVOID *ClassData);
+ _In_ PBATTERY_MINIPORT_INFO MiniportInfo,
+ _Out_ PVOID *ClassData);
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassIoctl(
- IN PVOID ClassData,
- IN OUT PIRP Irp);
+ _In_ PVOID ClassData,
+ _Inout_ PIRP Irp);
+_IRQL_requires_max_(DISPATCH_LEVEL)
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassStatusNotify(
- IN PVOID ClassData);
+ _In_ PVOID ClassData);
#if (NTDDI_VERSION >= NTDDI_WINXP)
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassQueryWmiDataBlock(
- IN PVOID ClassData,
- IN OUT PDEVICE_OBJECT DeviceObject,
- IN OUT PIRP Irp,
- IN ULONG GuidIndex,
- OUT PULONG InstanceLengthArray,
- IN ULONG OutBufferSize,
- OUT PUCHAR Buffer OPTIONAL);
-
+ _In_ PVOID ClassData,
+ _Inout_ PDEVICE_OBJECT DeviceObject,
+ _Inout_ PIRP Irp,
+ _In_ ULONG GuidIndex,
+ _Out_writes_(1) PULONG InstanceLengthArray,
+ _In_ ULONG OutBufferSize,
+ _Out_writes_bytes_opt_(OutBufferSize) PUCHAR Buffer);
+
+_IRQL_requires_max_(PASSIVE_LEVEL)
+_Check_return_
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassSystemControl(
- IN PVOID ClassData,
- IN PVOID WmiLibContext, /* PWMILIB_CONTEXT */
- IN PDEVICE_OBJECT DeviceObject,
- IN OUT PIRP Irp,
- OUT PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */
+ _In_ PVOID ClassData,
+ _In_ PVOID WmiLibContext, /* PWMILIB_CONTEXT */
+ _In_ PDEVICE_OBJECT DeviceObject,
+ _Inout_ PIRP Irp,
+ _Out_ PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
+_IRQL_requires_max_(PASSIVE_LEVEL)
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassUnload(
- IN PVOID ClassData);
+ _In_ PVOID ClassData);
#endif /* _WINDOWS_H */
#define HDN_ENDDRAG (HDN_FIRST-11)
#define HDN_FILTERCHANGE (HDN_FIRST-12)
#define HDN_FILTERBTNCLICK (HDN_FIRST-13)
+#define HDN_BEGINFILTEREDIT (HDN_FIRST-14)
+#define HDN_ENDFILTEREDIT (HDN_FIRST-15)
+#define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16)
+#define HDN_ITEMKEYDOWN (HDN_FIRST-17)
#define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING)
#define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED)
-/* $Id$
- *
+/*
* COPYRIGHT: This file is in the public domain.
* PROJECT: ReactOS kernel
* FILE:
-
-/* $Id: $
- *
+/*
* COPYRIGHT: This file is in the public domain.
* PROJECT: ReactOS kernel
* FILE:
-
-/* $Id$
- *
+/*
* COPYRIGHT: This file is in the public domain.
* PROJECT: ReactOS kernel
* FILE:
typedef VOID
(NTAPI *PENABLECALLBACK)(
- IN LPCGUID SourceId,
- IN ULONG IsEnabled,
- IN UCHAR Level,
- IN ULONGLONG MatchAnyKeyword,
- IN ULONGLONG MatchAllKeyword,
- IN PEVENT_FILTER_DESCRIPTOR FilterData OPTIONAL,
- IN OUT PVOID CallbackContext OPTIONAL);
+ _In_ LPCGUID SourceId,
+ _In_ ULONG IsEnabled,
+ _In_ UCHAR Level,
+ _In_ ULONGLONG MatchAnyKeyword,
+ _In_ ULONGLONG MatchAllKeyword,
+ _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData,
+ _Inout_opt_ PVOID CallbackContext);
#if (WINVER >= _WIN32_WINNT_VISTA)
ULONG
EVNTAPI
EventRegister(
- IN LPCGUID ProviderId,
- IN PENABLECALLBACK EnableCallback OPTIONAL,
- IN PVOID CallbackContext OPTIONAL,
- OUT PREGHANDLE RegHandle);
+ _In_ LPCGUID ProviderId,
+ _In_opt_ PENABLECALLBACK EnableCallback,
+ _In_opt_ PVOID CallbackContext,
+ _Out_ PREGHANDLE RegHandle);
ULONG
EVNTAPI
EventUnregister(
- IN REGHANDLE RegHandle);
+ _In_ REGHANDLE RegHandle);
BOOLEAN
EVNTAPI
EventEnabled(
- IN REGHANDLE RegHandle,
- IN PCEVENT_DESCRIPTOR EventDescriptor);
+ _In_ REGHANDLE RegHandle,
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor);
BOOLEAN
EVNTAPI
EventProviderEnabled(
- IN REGHANDLE RegHandle,
- IN UCHAR Level,
- IN ULONGLONG Keyword);
+ _In_ REGHANDLE RegHandle,
+ _In_ UCHAR Level,
+ _In_ ULONGLONG Keyword);
ULONG
EVNTAPI
EventWrite(
- IN REGHANDLE RegHandle,
- IN PCEVENT_DESCRIPTOR EventDescriptor,
- IN ULONG UserDataCount,
- IN PEVENT_DATA_DESCRIPTOR UserData);
+ _In_ REGHANDLE RegHandle,
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor,
+ _In_ ULONG UserDataCount,
+ _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData);
ULONG
EVNTAPI
EventWriteTransfer(
- IN REGHANDLE RegHandle,
- IN PCEVENT_DESCRIPTOR EventDescriptor,
- IN LPCGUID ActivityId OPTIONAL,
- IN LPCGUID RelatedActivityId OPTIONAL,
- IN ULONG UserDataCount,
- IN PEVENT_DATA_DESCRIPTOR UserData OPTIONAL);
+ _In_ REGHANDLE RegHandle,
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor,
+ _In_opt_ LPCGUID ActivityId,
+ _In_opt_ LPCGUID RelatedActivityId,
+ _In_ ULONG UserDataCount,
+ _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData);
ULONG
EVNTAPI
EventWriteString(
- IN REGHANDLE RegHandle,
- IN UCHAR Level,
- IN ULONGLONG Keyword,
- IN PCWSTR String);
+ _In_ REGHANDLE RegHandle,
+ _In_ UCHAR Level,
+ _In_ ULONGLONG Keyword,
+ _In_ PCWSTR String);
ULONG
EVNTAPI
EventActivityIdControl(
- IN ULONG ControlCode,
- IN OUT LPGUID ActivityId);
+ _In_ ULONG ControlCode,
+ _Inout_ LPGUID ActivityId);
#endif /* (WINVER >= _WIN32_WINNT_VISTA) */
ULONG
EVNTAPI
EventWriteEx(
- IN REGHANDLE RegHandle,
- IN PCEVENT_DESCRIPTOR EventDescriptor,
- IN ULONG64 Filter,
- IN ULONG Flags,
- IN LPCGUID ActivityId OPTIONAL,
- IN LPCGUID RelatedActivityId OPTIONAL,
- IN ULONG UserDataCount,
- IN PEVENT_DATA_DESCRIPTOR UserData OPTIONAL);
+ _In_ REGHANDLE RegHandle,
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor,
+ _In_ ULONG64 Filter,
+ _In_ ULONG Flags,
+ _In_opt_ LPCGUID ActivityId,
+ _In_opt_ LPCGUID RelatedActivityId,
+ _In_ ULONG UserDataCount,
+ _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData);
#endif
#endif // _ETW_KM_
FORCEINLINE
VOID
EventDataDescCreate(
- OUT PEVENT_DATA_DESCRIPTOR EventDataDescriptor,
- IN const VOID* DataPtr,
- IN ULONG DataSize)
+ _Out_ PEVENT_DATA_DESCRIPTOR EventDataDescriptor,
+ _In_reads_bytes_(DataSize) const VOID* DataPtr,
+ _In_ ULONG DataSize)
{
EventDataDescriptor->Ptr = (ULONGLONG)(ULONG_PTR)DataPtr;
EventDataDescriptor->Size = DataSize;
FORCEINLINE
VOID
EventDescCreate(
- OUT PEVENT_DESCRIPTOR EventDescriptor,
- IN USHORT Id,
- IN UCHAR Version,
- IN UCHAR Channel,
- IN UCHAR Level,
- IN USHORT Task,
- IN UCHAR Opcode,
- IN ULONGLONG Keyword)
+ _Out_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ USHORT Id,
+ _In_ UCHAR Version,
+ _In_ UCHAR Channel,
+ _In_ UCHAR Level,
+ _In_ USHORT Task,
+ _In_ UCHAR Opcode,
+ _In_ ULONGLONG Keyword)
{
EventDescriptor->Id = Id;
EventDescriptor->Version = Version;
FORCEINLINE
VOID
EventDescZero(
- OUT PEVENT_DESCRIPTOR EventDescriptor)
+ _Out_ PEVENT_DESCRIPTOR EventDescriptor)
{
memset(EventDescriptor, 0, sizeof(EVENT_DESCRIPTOR));
}
FORCEINLINE
USHORT
EventDescGetId(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Id);
}
FORCEINLINE
UCHAR
EventDescGetVersion(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Version);
}
FORCEINLINE
USHORT
EventDescGetTask(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Task);
}
FORCEINLINE
UCHAR
EventDescGetOpcode(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Opcode);
}
FORCEINLINE
UCHAR
EventDescGetChannel(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Channel);
}
FORCEINLINE
UCHAR
EventDescGetLevel(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Level);
}
FORCEINLINE
ULONGLONG
EventDescGetKeyword(
- IN PCEVENT_DESCRIPTOR EventDescriptor)
+ _In_ PCEVENT_DESCRIPTOR EventDescriptor)
{
return (EventDescriptor->Keyword);
}
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetId(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN USHORT Id)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ USHORT Id)
{
EventDescriptor->Id = Id;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetVersion(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN UCHAR Version)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ UCHAR Version)
{
EventDescriptor->Version = Version;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetTask(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN USHORT Task)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ USHORT Task)
{
EventDescriptor->Task = Task;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetOpcode(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN UCHAR Opcode)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ UCHAR Opcode)
{
EventDescriptor->Opcode = Opcode;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetLevel(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN UCHAR Level)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ UCHAR Level)
{
EventDescriptor->Level = Level;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetChannel(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN UCHAR Channel)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ UCHAR Channel)
{
EventDescriptor->Channel = Channel;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescSetKeyword(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN ULONGLONG Keyword)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ ULONGLONG Keyword)
{
EventDescriptor->Keyword = Keyword;
return (EventDescriptor);
FORCEINLINE
PEVENT_DESCRIPTOR
EventDescOrKeyword(
- IN PEVENT_DESCRIPTOR EventDescriptor,
- IN ULONGLONG Keyword)
+ _In_ PEVENT_DESCRIPTOR EventDescriptor,
+ _In_ ULONGLONG Keyword)
{
EventDescriptor->Keyword |= Keyword;
return (EventDescriptor);
#ifdef __cplusplus
}
#endif
-
UCHAR AdditionalParameters[1];
} STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
-typedef struct _STORAGE_DESCRIPTOR_HEADER {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_DESCRIPTOR_HEADER {
ULONG Version;
ULONG Size;
} STORAGE_DESCRIPTOR_HEADER, *PSTORAGE_DESCRIPTOR_HEADER;
-typedef struct _STORAGE_DEVICE_DESCRIPTOR {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_DEVICE_DESCRIPTOR {
ULONG Version;
ULONG Size;
UCHAR DeviceType;
UCHAR RawDeviceProperties[1];
} STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR;
-typedef struct _STORAGE_ADAPTER_DESCRIPTOR {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_ADAPTER_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG MaximumTransferLength;
USHORT BusMinorVersion;
} STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR;
-typedef struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG BytesPerCacheLine;
UCHAR Identifier[1];
} STORAGE_IDENTIFIER, *PSTORAGE_IDENTIFIER;
-typedef struct _STORAGE_DEVICE_ID_DESCRIPTOR {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_DEVICE_ID_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG NumberOfIdentifiers;
#endif /* defined(_MSC_EXTENSIONS) */
-typedef struct _STORAGE_READ_CAPACITY {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_READ_CAPACITY {
ULONG Version;
ULONG Size;
ULONG BlockLength;
WriteThroughSupported
} WRITE_THROUGH;
-typedef struct _STORAGE_WRITE_CACHE_PROPERTY {
+typedef _Struct_size_bytes_(Size) struct _STORAGE_WRITE_CACHE_PROPERTY {
ULONG Version;
ULONG Size;
WRITE_CACHE_TYPE WriteCacheType;
-
-/* $Id$
- *
+/*
* COPYRIGHT: This file is in the public domain.
* PROJECT: ReactOS kernel
* FILE:
*/
#include <winerror.h>
-
-/* $Id$
- *
+/*
* COPYRIGHT: This file is in the public domain.
* PROJECT: ReactOS kernel
* FILE:
//#define _Out_z_capcount_(capcount)
#define _Outptr_ _SAL2_NAME(_Outptr_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,ValidElements="\n""1")])
#define _Outptr_opt_ _SAL2_NAME(_Outptr_opt_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,ValidElements="\n""1")])
-//#define _Outptr_opt_result_buffer_(size)
+#define _Outptr_opt_result_buffer_(size) _SAL2_NAME(_Outptr_opt_result_buffer_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,WritableElements="\n" _SA_SPECSTRIZE(size))])
//#define _Outptr_opt_result_buffer_all_(size)
//#define _Outptr_opt_result_buffer_all_maybenull_(size)
//#define _Outptr_opt_result_buffer_maybenull_(size)
//#define _Outptr_opt_result_buffer_to_(size, count)
//#define _Outptr_opt_result_buffer_to_maybenull_(size, count)
-//#define _Outptr_opt_result_bytebuffer_(size)
+#define _Outptr_opt_result_bytebuffer_(size) _SAL2_NAME(_Outptr_opt_result_bytebuffer_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,WritableBytes="\n" _SA_SPECSTRIZE(size))])
//#define _Outptr_opt_result_bytebuffer_all_(size)
#define _Outptr_opt_result_bytebuffer_all_maybenull_(size) _SAL2_NAME(_Outptr_opt_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_Maybe,Notref=1,ValidBytes="\n" _SA_SPECSTRIZE(size))])
//#define _Outptr_opt_result_bytebuffer_maybenull_(size)
#define _Outptr_result_maybenull_ _SAL2_NAME(_Outptr_result_maybenull_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_Maybe,Notref=1,ValidElements="\n""1")] )
//#define _Outptr_result_maybenull_z_
#define _Outptr_result_nullonfailure_ _SAL2_NAME(_Outptr_result_nullonfailure_) _Group_(_Outptr_ [SAL_context(p1="SAL_failed")] _Group_([SAL_post] _Deref_post_null_) )
-//#define _Outptr_result_z_
+#define _Outptr_result_z_ _SAL2_NAME(_Outptr_result_z_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] _Deref_post_z_)
//#define _Outref_
//#define _Outref_result_buffer_(size)
//#define _Outref_result_buffer_all_(size)
#define IS_LOW_SURROGATE(ch) ((ch) >= LOW_SURROGATE_START && (ch) <= LOW_SURROGATE_END)
#define IS_SURROGATE_PAIR(high,low) (IS_HIGH_SURROGATE(high) && IS_LOW_SURROGATE(low))
-int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int);
-int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int);
-LCID WINAPI ConvertDefaultLocale(LCID);
-BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA,LCID,DWORD);
-BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD);
-BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD);
-BOOL WINAPI EnumSystemGeoID(GEOCLASS,GEOID,GEO_ENUMPROC);
-BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
-BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD);
-BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD);
-int WINAPI FoldStringA(DWORD,LPCSTR,int,LPSTR,int);
-int WINAPI FoldStringW(DWORD,LPCWSTR,int,LPWSTR,int);
+int
+WINAPI
+CompareStringA(
+ _In_ LCID Locale,
+ _In_ DWORD dwCmpFlags,
+ _In_reads_(cchCount1) LPCSTR lpString1,
+ _In_ int cchCount1,
+ _In_reads_(cchCount2) LPCSTR lpString2,
+ _In_ int cchCount2);
+
+int
+WINAPI
+CompareStringW(
+ _In_ LCID Locale,
+ _In_ DWORD dwCmpFlags,
+ _In_reads_(cchCount1) LPCWSTR lpString1,
+ _In_ int cchCount1,
+ _In_reads_(cchCount2) LPCWSTR lpString2,
+ _In_ int cchCount2);
+
+LCID WINAPI ConvertDefaultLocale(_In_ LCID);
+BOOL WINAPI EnumCalendarInfoA(_In_ CALINFO_ENUMPROCA, _In_ LCID, _In_ CALID, _In_ CALTYPE);
+BOOL WINAPI EnumCalendarInfoW(_In_ CALINFO_ENUMPROCW, _In_ LCID, _In_ CALID, _In_ CALTYPE);
+BOOL WINAPI EnumDateFormatsA(_In_ DATEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD);
+BOOL WINAPI EnumDateFormatsW(_In_ DATEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD);
+BOOL WINAPI EnumSystemCodePagesA(_In_ CODEPAGE_ENUMPROCA, _In_ DWORD);
+BOOL WINAPI EnumSystemCodePagesW(_In_ CODEPAGE_ENUMPROCW, _In_ DWORD);
+BOOL WINAPI EnumSystemGeoID(_In_ GEOCLASS, _In_ GEOID, _In_ GEO_ENUMPROC);
+BOOL WINAPI EnumSystemLocalesA(_In_ LOCALE_ENUMPROCA, _In_ DWORD);
+BOOL WINAPI EnumSystemLocalesW(_In_ LOCALE_ENUMPROCW, _In_ DWORD);
+BOOL WINAPI EnumTimeFormatsA(_In_ TIMEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD);
+BOOL WINAPI EnumTimeFormatsW(_In_ TIMEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD);
+
+int
+WINAPI
+FoldStringA(
+ _In_ DWORD dwMapFlags,
+ _In_reads_(cchSrc) LPCSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_opt_(cchDest) LPSTR lpDestStr,
+ _In_ int cchDest);
+
+int
+WINAPI
+FoldStringW(
+ _In_ DWORD dwMapFlags,
+ _In_reads_(cchSrc) LPCWSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_opt_(cchDest) LPWSTR lpDestStr,
+ _In_ int cchDest);
+
UINT WINAPI GetACP(void);
-int WINAPI GetCalendarInfoA(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD);
-int WINAPI GetCalendarInfoW(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD);
-BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
-BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
-BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
-int WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,int);
-int WINAPI GetCurrencyFormatW(LCID,DWORD,LPCWSTR,const CURRENCYFMTW*,LPWSTR,int);
+
+int
+WINAPI
+GetCalendarInfoA(
+ _In_ LCID Locale,
+ _In_ CALID Calendar,
+ _In_ CALTYPE CalType,
+ _Out_writes_opt_(cchData) LPSTR lpCalData,
+ _In_ int cchData,
+ _Out_opt_ LPDWORD lpValue);
+
+int
+WINAPI
+GetCalendarInfoW(
+ _In_ LCID Locale,
+ _In_ CALID Calendar,
+ _In_ CALTYPE CalType,
+ _Out_writes_opt_(cchData) LPWSTR lpCalData,
+ _In_ int cchData,
+ _Out_opt_ LPDWORD lpValue);
+
+BOOL WINAPI GetCPInfo(_In_ UINT, _Out_ LPCPINFO);
+BOOL WINAPI GetCPInfoExA(_In_ UINT, _In_ DWORD, _Out_ LPCPINFOEXA);
+BOOL WINAPI GetCPInfoExW(_In_ UINT, _In_ DWORD, _Out_ LPCPINFOEXW);
+
+int
+WINAPI
+GetCurrencyFormatA(
+ _In_ LCID Locale,
+ _In_ DWORD dwFlags,
+ _In_ LPCSTR lpValue,
+ _In_opt_ const CURRENCYFMTA *lpFormat,
+ _Out_writes_opt_(cchCurrency) LPSTR lpCurrencyStr,
+ _In_ int cchCurrency);
+
+int
+WINAPI
+GetCurrencyFormatW(
+ _In_ LCID Locale,
+ _In_ DWORD dwFlags,
+ _In_ LPCWSTR lpValue,
+ _In_opt_ const CURRENCYFMTW *lpFormat,
+ _Out_writes_opt_(cchCurrency) LPWSTR lpCurrencyStr,
+ _In_ int cchCurrency);
+
int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
int WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
-int WINAPI GetGeoInfoA(GEOID,GEOTYPE,LPSTR,int,LANGID);
-int WINAPI GetGeoInfoW(GEOID,GEOTYPE,LPWSTR,int,LANGID);
-int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int);
-int WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,int);
-BOOL WINAPI GetNLSVersion(NLS_FUNCTION,LCID,LPNLSVERSIONINFO);
-int WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int);
-int WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int);
+
+int
+WINAPI
+GetGeoInfoA(
+ _In_ GEOID Location,
+ _In_ GEOTYPE GeoType,
+ _Out_writes_opt_(cchData) LPSTR lpGeoData,
+ _In_ int cchData,
+ _In_ LANGID LangId);
+
+int
+WINAPI
+GetGeoInfoW(
+ _In_ GEOID Location,
+ _In_ GEOTYPE GeoType,
+ _Out_writes_opt_(cchData) LPWSTR lpGeoData,
+ _In_ int cchData,
+ _In_ LANGID LangId);
+
+int
+WINAPI
+GetLocaleInfoA(
+ _In_ LCID Locale,
+ _In_ LCTYPE LCType,
+ _Out_writes_opt_(cchData) LPSTR lpLCData,
+ _In_ int cchData);
+
+int
+WINAPI
+GetLocaleInfoW(
+ _In_ LCID Locale,
+ _In_ LCTYPE LCType,
+ _Out_writes_opt_(cchData) LPWSTR lpLCData,
+ _In_ int cchData);
+
+BOOL WINAPI GetNLSVersion(_In_ NLS_FUNCTION, _In_ LCID, _Inout_ LPNLSVERSIONINFO);
+
+int
+WINAPI
+GetNumberFormatA(
+ _In_ LCID Locale,
+ _In_ DWORD dwFlags,
+ _In_ LPCSTR lpValue,
+ _In_opt_ const NUMBERFMTA *lpFormat,
+ _Out_writes_opt_(cchNumber) LPSTR lpNumberStr,
+ _In_ int cchNumber);
+
+int
+WINAPI
+GetNumberFormatW(
+ _In_ LCID Locale,
+ _In_ DWORD dwFlags,
+ _In_ LPCWSTR lpValue,
+ _In_opt_ const NUMBERFMTW *lpFormat,
+ _Out_writes_opt_(cchNumber) LPWSTR lpNumberStr,
+ _In_ int cchNumber);
+
UINT WINAPI GetOEMCP(void);
-BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,int,LPWORD);
+
+BOOL
+WINAPI
+GetStringTypeA(
+ _In_ LCID Locale,
+ _In_ DWORD dwInfoType,
+ _In_reads_(cchSrc) LPCSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_ LPWORD lpCharType);
+
+BOOL
+WINAPI
+GetStringTypeW(
+ _In_ DWORD dwInfoType,
+ _In_reads_(cchSrc) LPCWSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_ LPWORD lpCharType);
+
+BOOL
+WINAPI
+GetStringTypeExA(
+ _In_ LCID Locale,
+ _In_ DWORD dwInfoType,
+ _In_reads_(cchSrc) LPCSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_(cchSrc) LPWORD lpCharType);
+
+BOOL
+WINAPI
+GetStringTypeExW(
+ _In_ LCID Locale,
+ _In_ DWORD dwInfoType,
+ _In_reads_(cchSrc) LPCWSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_(cchSrc) LPWORD lpCharType);
+
LANGID WINAPI GetSystemDefaultLangID(void);
LCID WINAPI GetSystemDefaultLCID(void);
LCID WINAPI GetThreadLocale(void);
LANGID WINAPI GetUserDefaultLangID(void);
LCID WINAPI GetUserDefaultLCID(void);
LANGID WINAPI GetUserDefaultUILanguage(void);
-GEOID WINAPI GetUserGeoID(GEOCLASS);
-BOOL WINAPI IsDBCSLeadByte(BYTE);
-BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE);
-BOOL WINAPI IsNLSDefinedString(NLS_FUNCTION,DWORD,LPNLSVERSIONINFO,LPCWSTR,int);
-BOOL WINAPI IsValidCodePage(UINT);
-BOOL WINAPI IsValidLocale(LCID,DWORD);
-int WINAPI LCMapStringA(LCID,DWORD,LPCSTR,int,LPSTR,int);
-int WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,int,LPWSTR,int);
+GEOID WINAPI GetUserGeoID(_In_ GEOCLASS);
+BOOL WINAPI IsDBCSLeadByte(_In_ BYTE);
+BOOL WINAPI IsDBCSLeadByteEx(_In_ UINT, _In_ BYTE);
+
+BOOL
+WINAPI
+IsNLSDefinedString(
+ _In_ NLS_FUNCTION Function,
+ _In_ DWORD dwFlags,
+ _In_ LPNLSVERSIONINFO lpVersionInformation,
+ _In_reads_(cchStr) LPCWSTR lpString,
+ _In_ int cchStr);
+
+BOOL WINAPI IsValidCodePage(_In_ UINT);
+BOOL WINAPI IsValidLocale(_In_ LCID, _In_ DWORD);
+
+int
+WINAPI
+LCMapStringA(
+ _In_ LCID Locale,
+ _In_ DWORD dwMapFlags,
+ _In_reads_(cchSrc) LPCSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_opt_(_Inexpressible_(cchDest)) LPSTR lpDestStr,
+ _In_ int cchDest);
+
+int
+WINAPI
+LCMapStringW(
+ _In_ LCID Locale,
+ _In_ DWORD dwMapFlags,
+ _In_reads_(cchSrc) LPCWSTR lpSrcStr,
+ _In_ int cchSrc,
+ _Out_writes_opt_(_Inexpressible_(cchDest)) LPWSTR lpDestStr,
+ _In_ int cchDest);
+
int WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,int,LPWSTR,int);
-int WINAPI SetCalendarInfoA(LCID,CALID,CALTYPE,LPCSTR);
-int WINAPI SetCalendarInfoW(LCID,CALID,CALTYPE,LPCWSTR);
-BOOL WINAPI SetLocaleInfoA(LCID,LCTYPE,LPCSTR);
-BOOL WINAPI SetLocaleInfoW(LCID,LCTYPE,LPCWSTR);
-BOOL WINAPI SetThreadLocale(LCID);
-LANGID WINAPI SetThreadUILanguage(LANGID);
+int WINAPI SetCalendarInfoA(_In_ LCID, _In_ CALID, _In_ CALTYPE, _In_ LPCSTR);
+int WINAPI SetCalendarInfoW(_In_ LCID, _In_ CALID, _In_ CALTYPE, _In_ LPCWSTR);
+BOOL WINAPI SetLocaleInfoA(_In_ LCID, _In_ LCTYPE, _In_ LPCSTR);
+BOOL WINAPI SetLocaleInfoW(_In_ LCID, _In_ LCTYPE, _In_ LPCWSTR);
+BOOL WINAPI SetThreadLocale(_In_ LCID);
+LANGID WINAPI SetThreadUILanguage(_In_ LANGID);
BOOL WINAPI SetUserDefaultLCID(LCID);
BOOL WINAPI SetUserDefaultUILanguage(LANGID);
-BOOL WINAPI SetUserGeoID(GEOID);
+BOOL WINAPI SetUserGeoID(_In_ GEOID);
int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL);
#if (WINVER >= 0x0500)
-BOOL WINAPI EnumCalendarInfoExA(CALINFO_ENUMPROCEXA,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumCalendarInfoExW(CALINFO_ENUMPROCEXW,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA,LCID,DWORD);
-BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW,LCID,DWORD);
-BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA,DWORD,LONG_PTR);
-BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW,DWORD,LONG_PTR);
-BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR);
-BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW,LGRPID,DWORD,LONG_PTR);
-BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA,DWORD,LONG_PTR);
-BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW,DWORD,LONG_PTR);
+BOOL WINAPI EnumCalendarInfoExA(_In_ CALINFO_ENUMPROCEXA, _In_ LCID, _In_ CALID, _In_ CALTYPE);
+BOOL WINAPI EnumCalendarInfoExW(_In_ CALINFO_ENUMPROCEXW, _In_ LCID, _In_ CALID, _In_ CALTYPE);
+BOOL WINAPI EnumDateFormatsExA(_In_ DATEFMT_ENUMPROCEXA, _In_ LCID, _In_ DWORD);
+BOOL WINAPI EnumDateFormatsExW(_In_ DATEFMT_ENUMPROCEXW, _In_ LCID, _In_ DWORD);
+BOOL WINAPI EnumSystemLanguageGroupsA(_In_ LANGUAGEGROUP_ENUMPROCA, _In_ DWORD, _In_ LONG_PTR);
+BOOL WINAPI EnumSystemLanguageGroupsW(_In_ LANGUAGEGROUP_ENUMPROCW, _In_ DWORD, _In_ LONG_PTR);
+BOOL WINAPI EnumLanguageGroupLocalesA(_In_ LANGGROUPLOCALE_ENUMPROCA, _In_ LGRPID, _In_ DWORD, _In_ LONG_PTR);
+BOOL WINAPI EnumLanguageGroupLocalesW(_In_ LANGGROUPLOCALE_ENUMPROCW, _In_ LGRPID, _In_ DWORD, _In_ LONG_PTR);
+BOOL WINAPI EnumUILanguagesA(_In_ UILANGUAGE_ENUMPROCA, _In_ DWORD, _In_ LONG_PTR);
+BOOL WINAPI EnumUILanguagesW(_In_ UILANGUAGE_ENUMPROCW, _In_ DWORD, _In_ LONG_PTR);
LANGID WINAPI GetSystemDefaultUILanguage(void);
LANGID WINAPI GetUserDefaultUILanguage(void);
-BOOL WINAPI IsValidLanguageGroup(LGRPID,DWORD);
+BOOL WINAPI IsValidLanguageGroup(_In_ LGRPID, _In_ DWORD);
#endif /* (WINVER >= 0x0500) */
+
#if (WINVER >= 0x0600)
-BOOL WINAPI GetFileMUIInfo(DWORD,PCWSTR,PFILEMUIINFO,DWORD*);
-BOOL WINAPI GetFileMUIPath(DWORD,PCWSTR,PWSTR,PULONG,PWSTR,PULONG,PULONGLONG);
+
+_Success_(return != FALSE)
+BOOL
+WINAPI
+GetFileMUIInfo(
+ _In_ DWORD dwFlags,
+ _In_ PCWSTR pcwszFilePath,
+ _Inout_updates_bytes_to_opt_(*pcbFileMUIInfo, *pcbFileMUIInfo) PFILEMUIINFO pFileMUIInfo,
+ _Inout_ DWORD *pcbFileMUIInfo);
+
+BOOL
+WINAPI
+GetFileMUIPath(
+ _In_ DWORD dwFlags,
+ _In_ PCWSTR pcwszFilePath,
+ _Inout_updates_opt_(*pcchLanguage) PWSTR pwszLanguage,
+ _Inout_ PULONG pcchLanguage,
+ _Out_writes_opt_(*pcchFileMUIPath) PWSTR pwszFileMUIPath,
+ _Inout_ PULONG pcchFileMUIPath,
+ _Inout_ PULONGLONG pululEnumerator);
+
WINBASEAPI
-int WINAPI GetLocaleInfoEx(LPCWSTR,LCTYPE,LPWSTR,int);
-BOOL WINAPI GetProcessPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG);
-BOOL WINAPI GetSystemPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG);
-BOOL WINAPI GetThreadPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG);
+int
+WINAPI
+GetLocaleInfoEx(
+ _In_opt_ LPCWSTR lpLocaleName,
+ _In_ LCTYPE LCType,
+ _Out_writes_opt_(cchData) LPWSTR lpLCData,
+ _In_ int cchData);
+
+BOOL
+WINAPI
+GetProcessPreferredUILanguages(
+ _In_ DWORD dwFlags,
+ _Out_ PULONG pulNumLanguages,
+ _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
+ _Inout_ PULONG pcchLanguagesBuffer);
+
+BOOL
+WINAPI
+GetSystemPreferredUILanguages(
+ _In_ DWORD dwFlags,
+ _Out_ PULONG pulNumLanguages,
+ _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
+ _Inout_ PULONG pcchLanguagesBuffer);
+
+BOOL
+WINAPI
+GetThreadPreferredUILanguages(
+ _In_ DWORD dwFlags,
+ _Out_ PULONG pulNumLanguages,
+ _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
+ _Inout_ PULONG pcchLanguagesBuffer);
+
LANGID WINAPI GetThreadUILanguage(void);
-BOOL WINAPI GetUILanguageInfo(DWORD,PCZZWSTR,PZZWSTR,PDWORD,PDWORD);
-BOOL WINAPI GetUserPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG);
-int WINAPI IdnToAscii(DWORD,LPCWSTR,int,LPWSTR,int);
-int WINAPI IdnToNameprepUnicode(DWORD,LPCWSTR,int,LPWSTR,int);
-int WINAPI IdnToUnicode(DWORD,LPCWSTR,int,LPWSTR,int);
-BOOL WINAPI IsNormalizedString(NORM_FORM,LPCWSTR,int);
-int WINAPI NormalizeString(NORM_FORM,LPCWSTR,int,LPWSTR,int);
-int WINAPI GetStringScripts(DWORD,LPCWSTR,int,LPWSTR,int);
-BOOL WINAPI SetProcessPreferredUILanguages(DWORD,PCZZWSTR,PULONG);
-BOOL WINAPI SetThreadPreferredUILanguages(DWORD,PCZZWSTR,PULONG);
-BOOL WINAPI VerifyScripts(DWORD,LPCWSTR,int,LPCWSTR,int);
+
+BOOL
+WINAPI
+GetUILanguageInfo(
+ _In_ DWORD dwFlags,
+ _In_ PCZZWSTR pwmszLanguage,
+ _Out_writes_opt_(*pcchFallbackLanguages) PZZWSTR pwszFallbackLanguages,
+ _Inout_opt_ PDWORD pcchFallbackLanguages,
+ _Out_ PDWORD pAttributes);
+
+BOOL
+WINAPI
+GetUserPreferredUILanguages(
+ _In_ DWORD dwFlags,
+ _Out_ PULONG pulNumLanguages,
+ _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer,
+ _Inout_ PULONG pcchLanguagesBuffer);
+
+int
+WINAPI
+IdnToAscii(
+ _In_ DWORD dwFlags,
+ _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr,
+ _In_ int cchUnicodeChar,
+ _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr,
+ _In_ int cchASCIIChar);
+
+int
+WINAPI
+IdnToNameprepUnicode(
+ _In_ DWORD dwFlags,
+ _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr,
+ _In_ int cchUnicodeChar,
+ _Out_writes_opt_(cchNameprepChar) LPWSTR lpNameprepCharStr,
+ _In_ int cchNameprepChar);
+
+int
+WINAPI
+IdnToUnicode(
+ _In_ DWORD dwFlags,
+ _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr,
+ _In_ int cchASCIIChar,
+ _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr,
+ _In_ int cchUnicodeChar);
+
+BOOL
+WINAPI
+IsNormalizedString(
+ _In_ NORM_FORM NormForm,
+ _In_reads_(cwLength) LPCWSTR lpString,
+ _In_ int cwLength);
+
+int
+WINAPI
+NormalizeString(
+ _In_ NORM_FORM NormForm,
+ _In_reads_(cwSrcLength) LPCWSTR lpSrcString,
+ _In_ int cwSrcLength,
+ _Out_writes_opt_(cwDstLength) LPWSTR lpDstString,
+ _In_ int cwDstLength);
+
+int
+WINAPI
+GetStringScripts(
+ _In_ DWORD dwFlags,
+ _In_ LPCWSTR lpString,
+ _In_ int cchString,
+ _Out_writes_opt_(cchScripts) LPWSTR lpScripts,
+ _In_ int cchScripts);
+
+BOOL WINAPI SetProcessPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG);
+BOOL WINAPI SetThreadPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG);
+BOOL WINAPI VerifyScripts(_In_ DWORD, _In_ LPCWSTR, _In_ int, _In_ LPCWSTR, _In_ int);
+
#endif /* (WINVER >= 0x0600) */
#ifdef UNICODE
-/* $Id$
-*/
/*
* epsapi.h
*
-/* $Id$
-*/
/*
* syssetup.h
*
/* Start a service that runs in its own process */
#define SERVICE_CONTROL_START_OWN 81
+/*
+ * Start event name used by OpenSCManager
+ * to know whether the SCM is initialized.
+ */
+#define SCM_START_EVENT L"SvcctrlStartEvent_A3752DX"
+
typedef struct _SCM_CONTROL_PACKET
{
DWORD dwSize;
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: include/lsass/lsass.h
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: include/reactos/winlogon.h
<!-- Please ensure that all links continine to be correct -->
<!-- both for www.gnu.org and chiark. -->
<!-- -->
-<!-- $Id$ -->
+<!-- $Id: README.html 21334 2006-03-18 18:25:48Z peterw $ -->
<p>
After testing, you can commit the new/changed files to CVS. ALthough files
config.mk and freetype.def are generated, they should be included in CVS.
-$Id$
+$Id: README.ROS 25663 2007-01-31 06:11:48Z greatlrd $
-/* $Id$
-*/
/*
* COPYRIGHT: See COPYING in the top level directory
* LICENSE: See LGPL.txt in the top level directory
-/* $Id$
-*/
/*
* COPYRIGHT: See COPYING in the top level directory
* LICENSE: See LGPL.txt in the top level directory
-/* $Id$
-*/
/*
* COPYRIGHT: See COPYING in the top level directory
* LICENSE: See LGPL.txt in the top level directory
-/* $Id: vfat.h 16656 2005-07-20 02:52:52Z ion $ */
#include <ddk/ntifs.h>
#include <ddk/ntdddisk.h>
printf/_cprintf.c
printf/_cwprintf.c
printf/_snprintf.c
+ printf/_snprintf_s.c
printf/_snwprintf.c
+ printf/_snwprintf_s.c
printf/_vcprintf.c
printf/_vcwprintf.c
printf/_vscprintf.c
printf/_vscwprintf.c
printf/_vsnprintf.c
+ printf/_vsnprintf_s.c
printf/_vsnwprintf.c
+ printf/_vsnwprintf_s.c
printf/_vsprintf_p.c
printf/fprintf.c
printf/fprintf_s.c
printf/printf.c
printf/printf_s.c
printf/sprintf.c
+ printf/sprintf_s.c
printf/streamout.c
printf/swprintf.c
+ printf/swprintf_s.c
printf/vfprintf.c
printf/vfprintf_s.c
printf/vfwprintf.c
printf/vprintf.c
printf/vprintf_s.c
printf/vsprintf.c
+ printf/vsprintf_s.c
printf/vswprintf.c
+ printf/vswprintf_s.c
printf/vwprintf.c
printf/vwprintf_s.c
printf/wprintf.c
stdlib/wmakpath_s.c
string/_mbsnlen.c
string/_mbstrnlen.c
+ string/_splitpath.c
+ string/_splitpath_s.c
+ string/_wsplitpath.c
+ string/_wsplitpath_s.c
string/atof.c
string/atoi.c
string/atoi64.c
string/itow.c
string/mbstowcs_s.c
string/scanf.c
- string/splitp.c
string/strcoll.c
string/strcspn.c
string/strdup.c
string/wcstombs_s.c
string/wcstoul.c
string/wctype.c
- string/wsplitp.c
string/wtoi.c
string/wtoi64.c
string/wtol.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Stack checker
-/* $Id: chkstk_asm.s 26099 2007-03-14 20:30:32Z ion $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Stack checker
search/bsearch.c
search/lfind.c
stdlib/qsort.c
+ string/_splitpath.c
+ string/_wsplitpath.c
string/ctype.c
string/iswctype.c
string/is_wctype.c
string/itoa.c
string/itow.c
string/mbstowcs_nt.c
- string/splitp.c
string/strtol.c
string/strtoul.c
string/strtoull.c
string/wcstombs_nt.c
string/wcstoul.c
string/wctype.c
- string/wsplitp.c
string/wtoi64.c
string/wtoi.c
string/wtol.c
-/* $Id$
- *
- */
int _adjust_fdiv = 0;
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/sdk/crt/mem/i386/memchr.s
-/*
- * $Id$
- */
#include <asm.inc>
#include <ks386.inc>
-/*
- * $Id$
- */
#include <string.h>
void *
_memccpy (void *to, const void *from,int c,size_t count)
{
- char t;
- size_t i;
- char *dst=(char*)to;
- const char *src=(const char*)from;
+ char t;
+ size_t i;
+ char *dst=(char*)to;
+ const char *src=(const char*)from;
- for ( i = 0; i < count; i++ )
- {
- dst[i] = t = src[i];
- if ( t == '\0' )
- break;
- if ( t == c )
- return &dst[i+1];
- }
- return NULL; /* didn't copy c */
+ for ( i = 0; i < count; i++ )
+ {
+ dst[i] = t = src[i];
+ if ( t == '\0' )
+ break;
+ if ( t == c )
+ return &dst[i+1];
+ }
+ return NULL; /* didn't copy c */
}
-/*
- * $Id$
- */
#include <string.h>
void* memchr(const void *s, int c, size_t n)
{
- if (n)
- {
- const char *p = s;
- do {
- if (*p++ == c)
- return (void *)(p-1);
- } while (--n != 0);
- }
- return 0;
+ if (n)
+ {
+ const char *p = s;
+ do {
+ if (*p++ == c)
+ return (void *)(p-1);
+ } while (--n != 0);
+ }
+ return 0;
}
-/*
- * $Id$
- */
#include <string.h>
const unsigned char *p1 = s1, *p2 = s2;
do {
if (*p1++ != *p2++)
- return (*--p1 - *--p2);
+ return (*--p1 - *--p2);
} while (--n != 0);
}
return 0;
-/*
- * $Id$
- */
#include <string.h>
void* memset(void* src, int val, size_t count)
{
- char *char_src = (char *)src;
+ char *char_src = (char *)src;
- while(count>0) {
- *char_src = val;
- char_src++;
- count--;
- }
- return src;
+ while(count>0) {
+ *char_src = val;
+ char_src++;
+ count--;
+ }
+ return src;
}
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/_snprintf_s.c
+ * PURPOSE: Implementation of _snprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf _snprintf_s
+#define USE_COUNT 1
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/_snwprintf_s.c
+ * PURPOSE: Implementation of _snwprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf _snwprintf_s
+#define USE_COUNT 1
+#define _UNICODE
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
#include <stdarg.h>
#include <limits.h>
#include <tchar.h>
+#if IS_SECAPI
+#include <internal/safecrt.h>
+#endif
#ifdef _UNICODE
#define _tstreamout wstreamout
#define _tstreamout streamout
#endif
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+
int _cdecl _tstreamout(FILE *stream, const TCHAR *format, va_list argptr);
int
#endif
_sxprintf(
TCHAR *buffer,
+#if IS_SECAPI
+ size_t sizeOfBuffer,
+#endif
#if USE_COUNT
size_t count,
#endif
...)
#endif
{
+#if !USE_COUNT
+ const size_t count = INT_MAX;
+#endif
+#if !IS_SECAPI
+ const size_t sizeOfBuffer = count;
+#endif
#if !USE_VARARGS
va_list argptr;
#endif
int result;
FILE stream;
+ /* Check trivial case */
+ if ((buffer == NULL) && (count == 0) && (sizeOfBuffer == 0))
+ {
+ return 0;
+ }
+
+#if IS_SECAPI
+ /* Validate parameters */
+ if (MSVCRT_CHECK_PMT(((buffer == NULL) || (format == NULL) || (sizeOfBuffer <= 0))))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* Limit output to count + 1 characters */
+ if (count != -1)
+ sizeOfBuffer = min(sizeOfBuffer, count + 1);
+#endif
+
+ /* Setup the FILE structure */
stream._base = (char*)buffer;
stream._ptr = stream._base;
stream._charbuf = 0;
-#if USE_COUNT
- stream._cnt = (int)(count * sizeof(TCHAR));
-#else
- stream._cnt = INT_MAX;
-#endif
+ stream._cnt = (int)(sizeOfBuffer * sizeof(TCHAR));
stream._bufsiz = 0;
stream._flag = _IOSTRG | _IOWRT;
stream._tmpfname = 0;
va_end(argptr);
#endif
+#if IS_SECAPI
+ /* Check for failure or unterminated string */
+ if ((result < 0) || (result == sizeOfBuffer))
+ {
+ /* Null-terminate the buffer at the end */
+ buffer[sizeOfBuffer-1] = _T('\0');
+
+ /* Check if we can truncate */
+ if (count != _TRUNCATE)
+ {
+ /* We can't, invoke invalid parameter handler */
+ MSVCRT_INVALID_PMT("Buffer is too small");
+
+ /* If we came back, set the buffer to an empty string */
+ *buffer = 0;
+ }
+
+ /* Return failure */
+ return -1;
+ }
+
+ /* Null-terminate the buffer after the string */
+ buffer[result] = _T('\0');
+#else
/* Only zero terminate if there is enough space left */
if (stream._cnt >= sizeof(TCHAR)) *(TCHAR*)stream._ptr = _T('\0');
+#endif
return result;
}
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/_vsnprintf_s.c
+ * PURPOSE: Implementation of _vsnprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf _vsnprintf_s
+#define USE_COUNT 1
+#define USE_VARARGS 1
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/_vsnwprintf_s.c
+ * PURPOSE: Implementation of _vsnwprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf _vsnwprintf_s
+#define USE_COUNT 1
+#define USE_VARARGS 1
+#define _UNICODE
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/sprintf_s.c
+ * PURPOSE: Implementation of sprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf sprintf_s
+#define USE_COUNT 0
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/swprintf_s.c
+ * PURPOSE: Implementation of swprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf swprintf_s
+#define USE_COUNT 0
+#define USE_VARARGS 0
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/vsprintf_s.c
+ * PURPOSE: Implementation of vsprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf vsprintf_s
+#define USE_COUNT 0
+#define USE_VARARGS 1
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/printf/vswprintf_s.c
+ * PURPOSE: Implementation of vswprintf_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _sxprintf vswprintf_s
+#define USE_COUNT 0
+#define USE_VARARGS 1
+#define _UNICODE
+#define IS_SECAPI 1
+
+#include "_sxprintf.c"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Implementation of _setjmp/longjmp
*
*/
-/* $Id$
- */
#include <precomp.h>
#include <stdlib.h>
#include <string.h>
*
*/
-/* $Id$
- */
#include <precomp.h>
/*
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/string/_splitpath.c
+ * PURPOSE: Implementation of _splitpath
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _tsplitpath_x _splitpath
+
+#include "_tsplitpath_x.h"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/string/_splitpath_s.c
+ * PURPOSE: Implementation of _splitpath_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _tsplitpath_x _splitpath_s
+#define IS_SECAPI 1
+
+#include "_tsplitpath_x.h"
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * PURPOSE: CRT: implementation of __[w]splitpath[_s]
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <precomp.h>
+#include <tchar.h>
+
+#if IS_SECAPI
+#define _FAILURE -1
+#define _SUCCESS 0
+
+_Check_return_wat_
+_CRTIMP_ALTERNATIVE
+errno_t
+__cdecl
+_tsplitpath_x(
+ _In_z_ const _TCHAR* path,
+ _Out_writes_opt_z_(drive_size) _TCHAR* drive,
+ _In_ size_t drive_size,
+ _Out_writes_opt_z_(dir_size) _TCHAR* dir,
+ _In_ size_t dir_size,
+ _Out_writes_opt_z_(fname_size) _TCHAR* fname,
+ _In_ size_t fname_size,
+ _Out_writes_opt_z_(ext_size) _TCHAR* ext,
+ _In_ size_t ext_size)
+#else
+#define _FAILURE
+#define _SUCCESS
+
+_CRT_INSECURE_DEPRECATE(_splitpath_s)
+_CRTIMP
+void
+__cdecl
+_tsplitpath_x(
+ _In_z_ const _TCHAR* path,
+ _Pre_maybenull_ _Post_z_ _TCHAR* drive,
+ _Pre_maybenull_ _Post_z_ _TCHAR* dir,
+ _Pre_maybenull_ _Post_z_ _TCHAR* fname,
+ _Pre_maybenull_ _Post_z_ _TCHAR* ext)
+#endif
+{
+ const _TCHAR *src, *dir_start, *file_start = 0, *ext_start = 0;
+ size_t count;
+#if !IS_SECAPI
+ const size_t drive_size = INT_MAX, dir_size = INT_MAX,
+ fname_size = INT_MAX, ext_size = INT_MAX;
+#endif
+
+#if IS_SECAPI
+ /* Validate parameters */
+ if (MSVCRT_CHECK_PMT((path == NULL) ||
+ ((drive != NULL) && (drive_size == 0)) ||
+ ((dir != NULL) && (dir_size == 0)) ||
+ ((fname != NULL) && (fname_size == 0)) ||
+ ((ext != NULL) && (ext_size == 0))))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+#endif
+
+ /* Truncate all output strings */
+ if (drive) drive[0] = '\0';
+ if (dir) dir[0] = '\0';
+ if (fname) fname[0] = '\0';
+ if (ext) ext[0] = '\0';
+
+#if WINVER >= 0x600
+ /* Check parameter */
+ if (!path)
+ {
+#ifndef _LIBCNT_
+ _set_errno(EINVAL);
+#endif
+ return _FAILURE;
+ }
+#endif
+
+ _Analysis_assume_(path != 0);
+
+#if WINVER == 0x600
+ /* Skip '\\?\' prefix */
+ if ((path[0] == '\\') && (path[1] == '\\') &&
+ (path[2] == '?') && (path[3] == '\\')) path += 4;
+#endif
+
+ if (path[0] == '\0') return _FAILURE;
+
+ /* Check if we have a drive letter (only 1 char supported) */
+ if (path[1] == ':')
+ {
+ if (drive && (drive_size >= 3))
+ {
+ drive[0] = path[0];
+ drive[1] = ':';
+ drive[2] = '\0';
+ }
+ path += 2;
+ }
+
+ /* Scan the rest of the string */
+ dir_start = path;
+ while (*path != '\0')
+ {
+ /* Remember last path separator and last dot */
+ if ((*path == '\\') || (*path == '/')) file_start = path + 1;
+ if (*path == '.') ext_start = path;
+ path++;
+ }
+
+ /* Check if we got a file name / extension */
+ if (!file_start)
+ file_start = dir_start;
+ if (!ext_start || ext_start < file_start)
+ ext_start = path;
+
+ if (dir)
+ {
+ src = dir_start;
+ count = dir_size - 1;
+ while (src < file_start && count--) *dir++ = *src++;
+ *dir = '\0';
+ }
+
+ if (fname)
+ {
+ src = file_start;
+ count = fname_size - 1;
+ while (src < ext_start && count--) *fname++ = *src++;
+ *fname = '\0';
+ }
+
+ if (ext)
+ {
+ src = ext_start;
+ count = ext_size - 1;
+ while (*src != '\0' && count--) *ext++ = *src++;
+ *ext = '\0';
+ }
+
+ return _SUCCESS;
+}
+
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/string/_wsplitpath.c
+ * PURPOSE: Implementation of _wsplitpath
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _tsplitpath_x _wsplitpath
+#define _UNICODE
+
+#include "_tsplitpath_x.h"
--- /dev/null
+/*
+ * COPYRIGHT: GNU GPL, see COPYING in the top level directory
+ * PROJECT: ReactOS crt library
+ * FILE: lib/sdk/crt/string/_wsplitpath_s.c
+ * PURPOSE: Implementation of _wsplitpath_s
+ * PROGRAMMER: Timo Kreuzer
+ */
+
+#define _tsplitpath_x _wsplitpath_s
+#define _UNICODE
+#define IS_SECAPI 1
+
+#include "_tsplitpath_x.h"
-/* $Id$
- */
#include "tcscat.inc"
-/* $Id$
- */
#include "tcschr.inc"
-/* $Id$
- */
#include "tcscmp.inc"
-/* $Id$
- */
#include "tcscpy.inc"
-/* $Id$
- */
#include "tcslen.inc"
-/* $Id$
- */
#include "tcsncat.inc"
-/* $Id$
- */
#include "tcsncmp.inc"
-/* $Id$
- */
#include "tcsncpy.inc"
-/* $Id$
- */
#include "tcsnlen.inc"
-/* $Id$
- */
#include "tcsrchr.inc"
-/* $Id$
- */
#ifndef __TCHAR_INC_S__
#define __TCHAR_INC_S__
-/* $Id: tcscat.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcschr.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcscmp.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcscpy.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcslen.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
-*/\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcsncat.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcsncmp.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcsncpy.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcsnlen.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
-*/\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id: tcsrchr.inc 49591 2010-11-15 01:29:12Z tkreuzer $\r
- */\r
\r
#include "tchar.h"\r
#include <asm.inc>\r
-/* $Id$
- */
#define _UNICODE
#include "tcscat.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcschr.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcscmp.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcscpy.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcslen.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcsncat.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcsncmp.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcsncpy.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcsnlen.inc"
-/* $Id$
- */
#define _UNICODE
#include "tcsrchr.inc"
+++ /dev/null
-/*
- * PROJECT: ReactOS Kernel
- * LICENSE: BSD - See COPYING.ARM in the top level directory
- * PURPOSE: CRT: implementation of _splitpath / _wsplitpath
- * PROGRAMMERS: Timo Kreuzer
- */
-
-#include <precomp.h>
-#include <tchar.h>
-
-/*
- * @implemented
- */
-void _tsplitpath(const _TCHAR* path, _TCHAR* drive, _TCHAR* dir, _TCHAR* fname, _TCHAR* ext)
-{
- const _TCHAR *src, *dir_start, *file_start = 0, *ext_start = 0;
-
- /* Truncate all output strings */
- if (drive) drive[0] = '\0';
- if (dir) dir[0] = '\0';
- if (fname) fname[0] = '\0';
- if (ext) ext[0] = '\0';
-
-#if WINVER >= 0x600
- /* Check parameter */
- if (!path)
- {
-#ifndef _LIBCNT_
- _set_errno(EINVAL);
-#endif
- return;
- }
-#endif
-
- _Analysis_assume_(path != 0);
-
-#if WINVER == 0x600
- /* Skip '\\?\' prefix */
- if ((path[0] == '\\') && (path[1] == '\\') &&
- (path[2] == '?') && (path[3] == '\\')) path += 4;
-#endif
-
- if (path[0] == '\0') return;
-
- /* Check if we have a drive letter (only 1 char supported) */
- if (path[1] == ':')
- {
- if (drive)
- {
- drive[0] = path[0];
- drive[1] = ':';
- drive[2] = '\0';
- }
- path += 2;
- }
-
- /* Scan the rest of the string */
- dir_start = path;
- while (*path != '\0')
- {
- /* Remember last path seperator and last dot */
- if ((*path == '\\') || (*path == '/')) file_start = path + 1;
- if (*path == '.') ext_start = path;
- path++;
- }
-
- /* Check if we got a file name / extension */
- if (!file_start)
- file_start = dir_start;
- if (!ext_start || ext_start < file_start)
- ext_start = path;
-
- if (dir)
- {
- src = dir_start;
- while (src < file_start) *dir++ = *src++;
- *dir = '\0';
- }
-
- if (fname)
- {
- src = file_start;
- while (src < ext_start) *fname++ = *src++;
- *fname = '\0';
- }
-
- if (ext)
- {
- src = ext_start;
- while (*src != '\0') *ext++ = *src++;
- *ext = '\0';
- }
-}
-
-/* $Id$
- */
#include <string.h>
#include "tcscat.h"
-/* $Id$
- */
#define _XINT int
#include <string.h>
-/* $Id$
- */
#include <string.h>
#include "tcscmp.h"
-/* $Id$
- */
#include <string.h>
#include "tcscpy.h"
-/* $Id$
- */
#define _x(_X_) (_X_)
#define _strxspn strcspn
-/* $Id$
- */
#include <string.h>
#include "tcslen.h"
-/* $Id$
- */
#include <string.h>
#include "tcsncat.h"
-/* $Id$
- */
#include <string.h>
#include "tcsncmp.h"
-/* $Id$
- */
+
#include <string.h>
#include "tcsncpy.h"
-/* $Id$
- */
#include <string.h>
#include "tcsnlen.h"
-/*
- * $Id$
- */
+
#include <limits.h>
#include <string.h>
-/* $Id$
- */
#define _XINT int
#include <string.h>
-/* $Id$
- */
#define _x(_X_) (!(_X_))
#define _strxspn strspn
-/* $Id$
- */
#include <limits.h>
#include <string.h>
-/* $Id$
- */
#include <tchar.h>
-/* $Id$
- */
#include <tchar.h>
-/* $Id$
- */
#include <tchar.h>
-/* $Id$
- */
#include <tchar.h>
-/* $Id$
- */
#include <stddef.h>
#include <tchar.h>
-/* $Id$
- */
#include <stddef.h>
#include <tchar.h>
-/* $Id$
- */
#include <stddef.h>
#include <tchar.h>
-/* $Id$
- */
#include <stddef.h>
#include <tchar.h>
-/* $Id$
- */
#include <stddef.h>
#include <tchar.h>
-/* $Id$
- */
#include <tchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#define _XINT wchar_t
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#include <wchar.h>
-/* $Id$
- */
#define _UNICODE
#define _XINT wchar_t
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/msvcrt/stdlib/itow.c
+++ /dev/null
-
-#define _UNICODE
-#define UNICODE
-
-#include <tchar.h>
-
-#include "splitp.c"
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/smlib/compses.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: reactos/lib/smlib/connect.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/smlib/execpgm.c
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/smlib/lookupss.c
reactos/dll/win32/cabinet # Synced to Wine-1.5.19
reactos/dll/win32/clusapi # Synced to Wine-1.5.19
reactos/dll/win32/comcat # Synced to Wine-1.5.4
-reactos/dll/win32/comctl32 # Synced to Wine 1.5.19
+reactos/dll/win32/comctl32 # Synced to Wine 1.5.26
reactos/dll/win32/comdlg32 # Synced to Wine 1.3.37
reactos/dll/win32/compstui # Synced to Wine-1.5.19
reactos/dll/win32/credui # Synced to Wine-1.5.4
#endif
}
+FORCEINLINE
+VOID
+Ke386SetGdtEntryBase(PKGDTENTRY GdtEntry, PVOID BaseAddress)
+{
+ GdtEntry->BaseLow = (USHORT)((ULONG_PTR)BaseAddress & 0xFFFF);
+ GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)BaseAddress >> 16);
+ GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)BaseAddress >> 24);
+}
+
+FORCEINLINE
+VOID
+KiSetTebBase(PKPCR Pcr, PVOID TebAddress)
+{
+ Pcr->NtTib.Self = TebAddress;
+ Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress);
+}
+
VOID
FASTCALL
Ki386InitializeTss(
ULONG Protect;
ULONG Flags;
BOOLEAN DeleteInProgress;
- ULONG PageOpCount;
+ ULONG Magic;
PVOID Vad;
union
{
ULONG Consumer,
ULONG Protection);
+VOID
+NTAPI
+MiRosCheckMemoryAreas(
+ PMMSUPPORT AddressSpace);
+
+VOID
+NTAPI
+MiCheckAllProcessMemoryAreas(VOID);
+
/* npool.c *******************************************************************/
VOID
{
return MmKernelAddressSpace;
}
+
+
+/* expool.c ******************************************************************/
+
+VOID
+NTAPI
+ExpCheckPoolAllocation(
+ PVOID P,
+ POOL_TYPE PoolType,
+ ULONG Tag);
IN PCHAR Format,
IN ... OPTIONAL);
+BOOLEAN
+NTAPI
+KdbpGetHexNumber(
+ IN PCHAR pszNum,
+ OUT ULONG_PTR *pulValue);
+
/* from kdb_expr.c */
BOOLEAN
static BOOLEAN KdbpCmdHelp(ULONG Argc, PCHAR Argv[]);
static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]);
+BOOLEAN ExpKdbgExtPool(ULONG Argc, PCHAR Argv[]);
+
#ifdef __ROS_DWARF__
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
#endif
{ "set", "set [var] [value]", "Sets var to value or displays value of var.", KdbpCmdSet },
{ "dmesg", "dmesg", "Display debug messages on screen, with navigation on pages.", KdbpCmdDmesg },
{ "kmsg", "kmsg", "Kernel dmesg. Alias for dmesg.", KdbpCmdDmesg },
- { "help", "help", "Display help screen.", KdbpCmdHelp }
+ { "help", "help", "Display help screen.", KdbpCmdHelp },
+ { "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool }
};
/* FUNCTIONS *****************************************************************/
return Ok;
}
+BOOLEAN
+NTAPI
+KdbpGetHexNumber(
+ IN PCHAR pszNum,
+ OUT ULONG_PTR *pulValue)
+{
+ char *endptr;
+
+ /* Skip optional '0x' prefix */
+ if ((pszNum[0] == '0') && ((pszNum[1] == 'x') || (pszNum[1] == 'X')))
+ pszNum += 2;
+
+ /* Make a number from the string (hex) */
+ *pulValue = strtoul(pszNum, &endptr, 16);
+
+ return (*endptr == '\0');
+}
+
/*!\brief Evaluates an expression and displays the result.
*/
static BOOLEAN
{
PKIPCR Pcr = (PKIPCR)KeGetPcr();
PKPROCESS OldProcess, NewProcess;
- PKGDTENTRY GdtEntry;
PKTHREAD NewThread;
/* We are on the new thread stack now */
if (*(PULONGLONG)&OldProcess->LdtDescriptor != *(PULONGLONG)&NewProcess->LdtDescriptor)
{
DPRINT1("LDT switch not implemented\n");
- ASSERT(FALSE);
+ ASSERT(FALSE);
}
/* Switch address space and flush TLB */
Ke386SetGs(0);
/* Set the TEB */
- Pcr->NtTib.Self = (PVOID)NewThread->Teb;
- GdtEntry = &Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];
- GdtEntry->BaseLow = (USHORT)((ULONG_PTR)NewThread->Teb & 0xFFFF);
- GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)NewThread->Teb >> 16);
- GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)NewThread->Teb >> 24);
+ KiSetTebBase((PKPCR)Pcr, NewThread->Teb);
/* Set new TSS fields */
Pcr->TSS->Esp0 = (ULONG_PTR)NewThread->InitialStack;
KiQuantumEnd();
}
else if (Prcb->NextThread)
- {
+ {
/* Capture current thread data */
OldThread = Prcb->CurrentThread;
NewThread = Prcb->NextThread;
KiVdmUnhandledOpcode(INV);
/* OPCODE HANDLERS ************************************************************/
-
+
BOOLEAN
FASTCALL
KiVdmOpcodePUSHF(IN PKTRAP_FRAME TrapFrame,
IN ULONG Flags)
{
ULONG Esp, V86EFlags, TrapEFlags;
-
+
/* Check for VME support */
ASSERT(KeI386VirtualIntExtensions == FALSE);
/* Add in those flags if they exist, and add in the IOPL flag */
V86EFlags |= TrapEFlags;
V86EFlags |= EFLAGS_IOPL;
-
+
/* Build flat ESP */
Esp = (TrapFrame->HardwareSegSs << 4) + (USHORT)TrapFrame->HardwareEsp;
-
+
/* Check for OPER32 */
if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32)
{
Esp -= 2;
*(PUSHORT)Esp = (USHORT)V86EFlags;
}
-
+
/* Set new ESP and EIP */
TrapFrame->HardwareEsp = Esp - (TrapFrame->HardwareSegSs << 4);
TrapFrame->Eip += KiVdmGetInstructionSize(Flags);
-
+
/* We're done */
return TRUE;
}
IN ULONG Flags)
{
ULONG Esp, V86EFlags, EFlags, TrapEFlags;
-
+
/* Build flat ESP */
Esp = (TrapFrame->HardwareSegSs << 4) + (USHORT)TrapFrame->HardwareEsp;
-
+
/* Check for OPER32 */
if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32)
{
EFlags = *(PUSHORT)Esp;
Esp += 2;
}
-
+
/* Set new ESP */
TrapFrame->HardwareEsp = Esp - (TrapFrame->HardwareSegSs << 4);
-
+
/* Mask out IOPL from the flags */
EFlags &= ~EFLAGS_IOPL;
-
+
/* Save the V86 flags, but mask out the nested task flag */
V86EFlags = EFlags & ~EFLAGS_NESTED_TASK;
-
+
/* Now leave only alignment, nested task and interrupt flag */
EFlags &= (EFLAGS_ALIGN_CHECK | EFLAGS_NESTED_TASK | EFLAGS_INTERRUPT_MASK);
-
+
/* Get trap EFlags */
TrapEFlags = TrapFrame->EFlags;
-
+
/* Check for VME support */
ASSERT(KeI386VirtualIntExtensions == FALSE);
/* Check if ESP0 needs to be fixed up */
if (TrapEFlags & EFLAGS_V86_MASK) Ki386AdjustEsp0(TrapFrame);
-
+
/* Update the V8086 EFlags state */
KiVdmClearVdmEFlags(EFLAGS_ALIGN_CHECK | EFLAGS_NESTED_TASK | EFLAGS_INTERRUPT_MASK);
KiVdmSetVdmEFlags(EFlags);
-
+
/* FIXME: Check for VDM interrupts */
-
+
/* Update EIP */
TrapFrame->Eip += KiVdmGetInstructionSize(Flags);
-
+
/* We're done */
return TRUE;
}
IN ULONG Flags)
{
ULONG Esp, V86EFlags, TrapEFlags, Eip, Interrupt;
-
+
/* Read trap frame EFlags */
TrapEFlags = TrapFrame->EFlags;
-
+
/* Remove interrupt flag from V8086 EFlags */
V86EFlags = *KiNtVdmState;
KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK);
-
+
/* Keep only alignment and interrupt flag from the V8086 state */
V86EFlags &= (EFLAGS_ALIGN_CHECK | EFLAGS_INTERRUPT_MASK);
-
+
/* Check for VME support */
ASSERT(KeI386VirtualIntExtensions == FALSE);
-
+
/* Mask in the relevant V86 EFlags into the trap flags */
V86EFlags |= (TrapEFlags & ~EFLAGS_INTERRUPT_MASK);
-
+
/* And mask out the VIF, nested task and TF flag from the trap flags */
TrapFrame->EFlags = TrapEFlags &~ (EFLAGS_VIF | EFLAGS_NESTED_TASK | EFLAGS_TF);
-
+
/* Add the IOPL flag to the local trap flags */
V86EFlags |= EFLAGS_IOPL;
-
+
/* Build flat ESP */
Esp = (TrapFrame->HardwareSegSs << 4) + TrapFrame->HardwareEsp;
-
+
/* Push EFlags */
Esp -= 2;
*(PUSHORT)(Esp) = (USHORT)V86EFlags;
-
+
/* Push CS */
Esp -= 2;
*(PUSHORT)(Esp) = (USHORT)TrapFrame->SegCs;
-
+
/* Push IP */
Esp -= 2;
*(PUSHORT)(Esp) = (USHORT)TrapFrame->Eip + KiVdmGetInstructionSize(Flags) + 1;
-
+
/* Update ESP */
TrapFrame->HardwareEsp = (USHORT)Esp;
-
+
/* Get flat EIP */
Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip;
-
+
/* Now get the *next* EIP address (current is original + the count - 1) */
Eip += KiVdmGetInstructionSize(Flags);
-
+
/* Now read the interrupt number */
Interrupt = *(PUCHAR)Eip;
-
+
/* Read the EIP from its IVT entry */
Interrupt = *(PULONG)(Interrupt * 4);
TrapFrame->Eip = (USHORT)Interrupt;
-
+
/* Now get the CS segment */
Interrupt = (USHORT)(Interrupt >> 16);
-
+
/* Check if the trap was not V8086 trap */
if (!(TrapFrame->EFlags & EFLAGS_V86_MASK))
{
/* Set IVT CS */
TrapFrame->SegCs = Interrupt;
}
-
+
/* We're done */
return TRUE;
}
/* Build flat ESP */
Esp = (TrapFrame->HardwareSegSs << 4) + TrapFrame->HardwareEsp;
-
+
/* Check for OPER32 */
if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32)
{
/* Build segmented EIP */
TrapFrame->Eip = *(PULONG)Esp;
TrapFrame->SegCs = *(PUSHORT)(Esp + 4);
-
+
/* Set new ESP */
TrapFrame->HardwareEsp += 12;
-
+
/* Get EFLAGS */
EFlags = *(PULONG)(Esp + 8);
}
/* Get EFLAGS */
EFlags = *(PUSHORT)(Esp + 4);
}
-
+
/* Mask out EFlags */
EFlags &= ~(EFLAGS_IOPL + EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_VIP);
V86EFlags = EFlags;
-
+
/* Check for VME support */
ASSERT(KeI386VirtualIntExtensions == FALSE);
-
+
/* Add V86 and Interrupt flag */
EFlags |= EFLAGS_V86_MASK | EFLAGS_INTERRUPT_MASK;
-
+
/* Update EFlags in trap frame */
TrapEFlags = TrapFrame->EFlags;
TrapFrame->EFlags = (TrapFrame->EFlags & EFLAGS_VIP) | EFlags;
-
+
/* Check if ESP0 needs to be fixed up */
if (!(TrapEFlags & EFLAGS_V86_MASK)) Ki386AdjustEsp0(TrapFrame);
-
+
/* Update the V8086 EFlags state */
KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK);
KiVdmSetVdmEFlags(V86EFlags);
-
+
/* Build flat EIP and check if this is the BOP instruction */
Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip;
if (*(PUSHORT)Eip == 0xC4C4)
/* FIXME: Check for VDM interrupts */
DPRINT("FIXME: Check for VDM interrupts\n");
}
-
+
/* We're done */
return TRUE;
}
FASTCALL
KiVdmOpcodeCLI(IN PKTRAP_FRAME TrapFrame,
IN ULONG Flags)
-{
+{
/* Check for VME support */
ASSERT(KeI386VirtualIntExtensions == FALSE);
/* Disable interrupts */
KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK);
-
+
/* Skip instruction */
TrapFrame->Eip += KiVdmGetInstructionSize(Flags);
-
+
/* Done */
return TRUE;
}
/* Enable interrupts */
KiVdmSetVdmEFlags(EFLAGS_INTERRUPT_MASK);
-
+
/* Skip instruction */
TrapFrame->Eip += KiVdmGetInstructionSize(Flags);
-
+
/* Done */
return TRUE;
}
IN ULONG Flags)
{
ULONG Eip;
-
+
/* Get flat EIP of the *current* instruction (not the original EIP) */
Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip;
Eip += KiVdmGetInstructionSize(Flags) - 1;
-
+
/* Read the opcode entry */
switch (*(PUCHAR)Eip)
{
case 0x9D: return KiCallVdmHandler(POPF);
case 0xCD: return KiCallVdmHandler(INTnn);
case 0xCE: return KiCallVdmHandler(INTO);
- case 0xCF: return KiCallVdmHandler(IRET);
- case 0xE4: return KiCallVdmHandler(INBimm);
+ case 0xCF: return KiCallVdmHandler(IRET);
+ case 0xE4: return KiCallVdmHandler(INBimm);
case 0xE5: return KiCallVdmHandler(INWimm);
case 0xE6: return KiCallVdmHandler(OUTBimm);
- case 0xE7: return KiCallVdmHandler(OUTWimm);
+ case 0xE7: return KiCallVdmHandler(OUTWimm);
case 0xEC: return KiCallVdmHandler(INB);
case 0xED: return KiCallVdmHandler(INW);
case 0xEE: return KiCallVdmHandler(OUTB);
case 0xFA: return KiCallVdmHandler(CLI);
case 0xFB: return KiCallVdmHandler(STI);
default: return KiCallVdmHandler(INV);
- }
+ }
}
/* PREFIX HANDLER *************************************************************/
{
/* Increase instruction size */
Flags++;
-
+
/* Handle the next opcode */
return KiVdmHandleOpcode(TrapFrame, Flags);
}
KiExitV86Mode(IN PKTRAP_FRAME TrapFrame)
{
PKV8086_STACK_FRAME StackFrame;
- PKGDTENTRY GdtEntry;
PKTHREAD Thread;
PKTRAP_FRAME PmTrapFrame;
PKV86_FRAME V86Frame;
PFX_SAVE_AREA NpxFrame;
-
+
/* Get the stack frame back */
StackFrame = CONTAINING_RECORD(TrapFrame->Esi, KV8086_STACK_FRAME, V86Frame);
PmTrapFrame = &StackFrame->TrapFrame;
V86Frame = &StackFrame->V86Frame;
NpxFrame = &StackFrame->NpxArea;
-
+
/* Copy the FPU frame back */
Thread = KeGetCurrentThread();
RtlCopyMemory(KiGetThreadNpxArea(Thread), NpxFrame, sizeof(FX_SAVE_AREA));
/* Set initial stack back */
Thread->InitialStack = (PVOID)((ULONG_PTR)V86Frame->ThreadStack + sizeof(FX_SAVE_AREA));
-
+
/* Set ESP0 back in the KTSS */
KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&PmTrapFrame->V86Es;
/* Restore TEB addresses */
Thread->Teb = V86Frame->ThreadTeb;
- KeGetPcr()->NtTib.Self = V86Frame->PcrTeb;
-
- /* Setup real TEB descriptor */
- GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];
- GdtEntry->BaseLow = (USHORT)((ULONG_PTR)Thread->Teb & 0xFFFF);
- GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Thread->Teb >> 16);
- GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Thread->Teb >> 24);
+ KiSetTebBase(KeGetPcr(), V86Frame->ThreadTeb);
/* Enable interrupts and return a pointer to the trap frame */
_enable();
KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame)
{
PKTHREAD Thread;
- PKGDTENTRY GdtEntry;
PKTRAP_FRAME TrapFrame = &StackFrame->TrapFrame;
PKV86_FRAME V86Frame = &StackFrame->V86Frame;
PFX_SAVE_AREA NpxFrame = &StackFrame->NpxArea;
TrapFrame->SegCs = KGDT_R0_CODE | RPL_MASK;
TrapFrame->SegEs = TrapFrame->SegDs = TrapFrame->SegFs = TrapFrame->SegGs = 0;
TrapFrame->ErrCode = 0;
-
+
/* Get the current thread's initial stack */
Thread = KeGetCurrentThread();
V86Frame->ThreadStack = KiGetThreadNpxArea(Thread);
-
+
/* Save TEB addresses */
V86Frame->ThreadTeb = Thread->Teb;
V86Frame->PcrTeb = KeGetPcr()->NtTib.Self;
-
+
/* Save return EIP */
TrapFrame->Eip = (ULONG_PTR)Ki386BiosCallReturnAddress;
-
+
/* Save our stack (after the frames) */
TrapFrame->Esi = (ULONG_PTR)V86Frame;
TrapFrame->Edi = (ULONG_PTR)_AddressOfReturnAddress() + 4;
-
+
/* Sanitize EFlags and enable interrupts */
TrapFrame->EFlags = __readeflags() & 0x60DD7;
TrapFrame->EFlags |= EFLAGS_INTERRUPT_MASK;
-
+
/* Fill out the rest of the frame */
TrapFrame->HardwareSegSs = KGDT_R3_DATA | RPL_MASK;
TrapFrame->HardwareEsp = 0x11FFE;
/* Set some debug fields if trap debugging is enabled */
KiFillTrapFrameDebug(TrapFrame);
-
+
/* Disable interrupts */
_disable();
-
+
/* Copy the thread's NPX frame */
RtlCopyMemory(NpxFrame, V86Frame->ThreadStack, sizeof(FX_SAVE_AREA));
-
+
/* Clear exception list */
KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
-
+
/* Set new ESP0 */
KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&TrapFrame->V86Es;
-
+
/* Set new initial stack */
Thread->InitialStack = V86Frame;
-
+
/* Set VDM TEB */
Thread->Teb = (PTEB)TRAMPOLINE_TEB;
- KeGetPcr()->NtTib.Self = (PVOID)TRAMPOLINE_TEB;
-
- /* Setup VDM TEB descriptor */
- GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)];
- GdtEntry->BaseLow = (USHORT)((ULONG_PTR)TRAMPOLINE_TEB & 0xFFFF);
- GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)TRAMPOLINE_TEB >> 16);
- GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)TRAMPOLINE_TEB >> 24);
-
+ KiSetTebBase(KeGetPcr(), (PVOID)TRAMPOLINE_TEB);
+
/* Enable interrupts */
_enable();
-
+
/* Start VDM execution */
NtVdmControl(VdmStartExecution, NULL);
-
+
/* Exit to V86 mode */
KiEoiHelper(TrapFrame);
}
/* Convert to a context */
Context.ContextFlags = CONTEXT_CONTROL;
KeTrapFrameToContext(TrapFrame, NULL, &Context);
-
+
/* Set the IOPL flag */
Context.EFlags |= EFLAGS_IOPL;
-
+
/* Convert back to a trap frame */
KeContextToTrapFrame(&Context, NULL, TrapFrame, CONTEXT_CONTROL, UserMode);
}
-
+
/* PUBLIC FUNCTIONS ***********************************************************/
/*
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/i386/irq.c
}
}
+VOID
+NTAPI
+ExpCheckPoolAllocation(
+ PVOID P,
+ POOL_TYPE PoolType,
+ ULONG Tag)
+{
+ PPOOL_HEADER Entry;
+ ULONG i;
+ KIRQL OldIrql;
+ POOL_TYPE RealPoolType;
+
+ /* Get the pool header */
+ Entry = ((PPOOL_HEADER)P) - 1;
+
+ /* Check if this is a large allocation */
+ if (PAGE_ALIGN(P) == P)
+ {
+ /* Lock the pool table */
+ KeAcquireSpinLock(&ExpLargePoolTableLock, &OldIrql);
+
+ /* Find the pool tag */
+ for (i = 0; i < PoolBigPageTableSize; i++)
+ {
+ /* Check if this is our allocation */
+ if (PoolBigPageTable[i].Va == P)
+ {
+ /* Make sure the tag is ok */
+ if (PoolBigPageTable[i].Key != Tag)
+ {
+ KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, PoolBigPageTable[i].Key, Tag);
+ }
+
+ break;
+ }
+ }
+
+ /* Release the lock */
+ KeReleaseSpinLock(&ExpLargePoolTableLock, OldIrql);
+
+ if (i == PoolBigPageTableSize)
+ {
+ /* Did not find the allocation */
+ //ASSERT(FALSE);
+ }
+
+ /* Get Pool type by address */
+ RealPoolType = MmDeterminePoolType(P);
+ }
+ else
+ {
+ /* Verify the tag */
+ if (Entry->PoolTag != Tag)
+ {
+ DPRINT1("Allocation has wrong pool tag! Expected '%.4s', got '%.4s' (0x%08lx)\n",
+ &Tag, &Entry->PoolTag, Entry->PoolTag);
+ KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Entry->PoolTag, Tag);
+ }
+
+ /* Check the rest of the header */
+ ExpCheckPoolHeader(Entry);
+
+ /* Get Pool type from entry */
+ RealPoolType = (Entry->PoolType - 1);
+ }
+
+ /* Should we check the pool type? */
+ if (PoolType != -1)
+ {
+ /* Verify the pool type */
+ if (RealPoolType != PoolType)
+ {
+ DPRINT1("Wrong pool type! Expected %s, got %s\n",
+ PoolType & BASE_POOL_TYPE_MASK ? "PagedPool" : "NonPagedPool",
+ (Entry->PoolType - 1) & BASE_POOL_TYPE_MASK ? "PagedPool" : "NonPagedPool");
+ KeBugCheckEx(BAD_POOL_CALLER, 0xCC, (ULONG_PTR)P, Entry->PoolTag, Tag);
+ }
+ }
+}
+
VOID
NTAPI
ExpCheckPoolBlocks(IN PVOID Block)
return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
}
+#if DBG && KDBG
+
+BOOLEAN
+ExpKdbgExtPool(
+ ULONG Argc,
+ PCHAR Argv[])
+{
+ ULONG_PTR Address = 0, Flags = 0;
+ PVOID PoolPage;
+ PPOOL_HEADER Entry;
+ BOOLEAN ThisOne;
+ PULONG Data;
+
+ if (Argc > 1)
+ {
+ /* Get address */
+ if (!KdbpGetHexNumber(Argv[1], &Address))
+ {
+ KdbpPrint("Invalid parameter: %s\n", Argv[0]);
+ return TRUE;
+ }
+ }
+
+ if (Argc > 2)
+ {
+ /* Get address */
+ if (!KdbpGetHexNumber(Argv[1], &Flags))
+ {
+ KdbpPrint("Invalid parameter: %s\n", Argv[0]);
+ return TRUE;
+ }
+ }
+
+ /* Check if we got an address */
+ if (Address != 0)
+ {
+ /* Get the base page */
+ PoolPage = PAGE_ALIGN(Address);
+ }
+ else
+ {
+ KdbpPrint("Heap is unimplemented\n");
+ return TRUE;
+ }
+
+ /* No paging support! */
+ if (!MmIsAddressValid(PoolPage))
+ {
+ KdbpPrint("Address not accessible!\n");
+ return TRUE;
+ }
+
+ /* Get pool type */
+ if ((Address >= (ULONG_PTR)MmPagedPoolStart) && (Address <= (ULONG_PTR)MmPagedPoolEnd))
+ KdbpPrint("Allocation is from PagedPool region\n");
+ else if ((Address >= (ULONG_PTR)MmNonPagedPoolStart) && (Address <= (ULONG_PTR)MmNonPagedPoolEnd))
+ KdbpPrint("Allocation is from NonPagedPool region\n");
+ else
+ {
+ KdbpPrint("Address 0x%p is not within any pool!\n", (PVOID)Address);
+ return TRUE;
+ }
+
+ /* Loop all entries of that page */
+ Entry = PoolPage;
+ do
+ {
+ /* Check if the address is within that entry */
+ ThisOne = ((Address >= (ULONG_PTR)Entry) &&
+ (Address < (ULONG_PTR)(Entry + Entry->BlockSize)));
+
+ if (!(Flags & 1) || ThisOne)
+ {
+ /* Print the line */
+ KdbpPrint("%c%p size: %4d previous size: %4d %s %.4s\n",
+ ThisOne ? '*' : ' ', Entry, Entry->BlockSize, Entry->PreviousSize,
+ (Flags & 0x80000000) ? "" : (Entry->PoolType ? "(Allocated)" : "(Free) "),
+ (Flags & 0x80000000) ? "" : (PCHAR)&Entry->PoolTag);
+ }
+
+ if (Flags & 1)
+ {
+ Data = (PULONG)(Entry + 1);
+ KdbpPrint(" %p %08lx %08lx %08lx %08lx\n"
+ " %p %08lx %08lx %08lx %08lx\n",
+ &Data[0], Data[0], Data[1], Data[2], Data[3],
+ &Data[4], Data[4], Data[5], Data[6], Data[7]);
+ }
+
+ /* Go to next entry */
+ Entry = POOL_BLOCK(Entry, Entry->BlockSize);
+ }
+ while ((Entry->BlockSize != 0) && ((ULONG_PTR)Entry < (ULONG_PTR)PoolPage + PAGE_SIZE));
+
+ return TRUE;
+}
+
+#endif // DBG && KDBG
+
/* EOF */
ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
/* Remove the process from the list ,and dereference the session */
- RemoveEntryList(&CurrentProcess->SessionProcessLinks);
+ // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!!
+ //RemoveEntryList(&CurrentProcess->SessionProcessLinks);
//MiDereferenceSession();
}
NewProcess->Session = SessionGlobal;
/* Insert it into the process list */
- InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks);
+ // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!!
+ //InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks);
/* Set the flag */
PspSetProcessFlag(NewProcess, PSF_PROCESS_IN_SESSION_BIT);
Vad->u.VadFlags.Spare = 1;
Vad->u.VadFlags.PrivateMemory = 1;
Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect);
-
+
/* Insert the VAD */
MiInsertVad(Vad, Process);
marea->Vad = Vad;
MiRemoveNode(IN PMMADDRESS_NODE Node,
IN PMM_AVL_TABLE Table);
+#if DBG
+
+static
+VOID
+MiRosCheckMemoryAreasRecursive(
+ PMEMORY_AREA Node)
+{
+ /* Check if the allocation is ok */
+ ExpCheckPoolAllocation(Node, NonPagedPool, 'ERAM');
+
+ /* Check some fields */
+ ASSERT(Node->Magic == 'erAM');
+ ASSERT(PAGE_ALIGN(Node->StartingAddress) == Node->StartingAddress);
+ ASSERT(Node->EndingAddress != NULL);
+ ASSERT(PAGE_ALIGN(Node->EndingAddress) == Node->EndingAddress);
+ ASSERT((ULONG_PTR)Node->StartingAddress < (ULONG_PTR)Node->EndingAddress);
+ ASSERT((Node->Type == 0) ||
+ (Node->Type == MEMORY_AREA_CACHE) ||
+ // (Node->Type == MEMORY_AREA_CACHE_SEGMENT) ||
+ (Node->Type == MEMORY_AREA_SECTION_VIEW) ||
+ (Node->Type == MEMORY_AREA_OWNED_BY_ARM3) ||
+ (Node->Type == (MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC)));
+
+ /* Recursively check children */
+ if (Node->LeftChild != NULL)
+ MiRosCheckMemoryAreasRecursive(Node->LeftChild);
+ if (Node->RightChild != NULL)
+ MiRosCheckMemoryAreasRecursive(Node->RightChild);
+}
+
+VOID
+NTAPI
+MiRosCheckMemoryAreas(
+ PMMSUPPORT AddressSpace)
+{
+ PMEMORY_AREA RootNode;
+ PEPROCESS AddressSpaceOwner;
+ BOOLEAN NeedReleaseLock;
+
+ NeedReleaseLock = FALSE;
+
+ /* Get the address space owner */
+ AddressSpaceOwner = CONTAINING_RECORD(AddressSpace, EPROCESS, Vm);
+
+ /* Check if we already own the address space lock */
+ if (AddressSpaceOwner->AddressCreationLock.Owner != KeGetCurrentThread())
+ {
+ /* We must own it! */
+ MmLockAddressSpace(AddressSpace);
+ NeedReleaseLock = TRUE;
+ }
+
+ /* Check all memory areas */
+ RootNode = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink;
+ MiRosCheckMemoryAreasRecursive(RootNode);
+
+ /* Release the lock, if we acquired it */
+ if (NeedReleaseLock)
+ {
+ MmUnlockAddressSpace(AddressSpace);
+ }
+}
+
+extern KGUARDED_MUTEX PspActiveProcessMutex;
+
+VOID
+NTAPI
+MiCheckAllProcessMemoryAreas(VOID)
+{
+ PEPROCESS Process;
+ PLIST_ENTRY Entry;
+
+ /* Acquire the Active Process Lock */
+ KeAcquireGuardedMutex(&PspActiveProcessMutex);
+
+ /* Loop the process list */
+ Entry = PsActiveProcessHead.Flink;
+ while (Entry != &PsActiveProcessHead)
+ {
+ /* Get the process */
+ Process = CONTAINING_RECORD(Entry, EPROCESS, ActiveProcessLinks);
+
+ /* Check memory areas */
+ MiRosCheckMemoryAreas(&Process->Vm);
+
+ Entry = Entry->Flink;
+ }
+
+ /* Release the lock */
+ KeReleaseGuardedMutex(&PspActiveProcessMutex);
+}
+
+#endif
+
/**
* @name MmFreeMemoryArea
*
ULONG_PTR Address;
PVOID EndAddress;
+ /* Make sure we own the address space lock! */
+ ASSERT(CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock.Owner == KeGetCurrentThread());
+
+ /* Check magic */
+ ASSERT(MemoryArea->Magic == 'erAM');
+
if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
{
PEPROCESS CurrentProcess = PsGetCurrentProcess();
BOOLEAN Dirty = FALSE;
SWAPENTRY SwapEntry = 0;
PFN_NUMBER Page = 0;
-
+
if (MmIsPageSwapEntry(Process, (PVOID)Address))
{
MmDeletePageFileMapping(Process, (PVOID)Address, &SwapEntry);
}
}
- /* There must be no page ops in progress */
- ASSERT(MemoryArea->PageOpCount == 0);
-
/* Remove the tree item. */
{
if (MemoryArea->Parent != NULL)
MemoryArea->Protect = Protect;
MemoryArea->Flags = AllocationFlags;
//MemoryArea->LockCount = 0;
- MemoryArea->PageOpCount = 0;
+ MemoryArea->Magic = 'erAM';
MemoryArea->DeleteInProgress = FALSE;
MmInsertMemoryArea(AddressSpace, MemoryArea);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
-
+
#if (_MI_PAGING_LEVELS == 2)
{
KIRQL OldIrql;
PMMPDE pointerPde;
/* Attach to Process */
KeAttachProcess(&Process->Pcb);
-
+
/* Acquire PFN lock */
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
-
+
for(Address = MI_LOWEST_VAD_ADDRESS;
Address < MM_HIGHEST_VAD_ADDRESS;
Address =(PVOID)((ULONG_PTR)Address + (PAGE_SIZE * PTE_COUNT)))
}
/* Release lock */
KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
-
+
/* Detach */
KeDetachProcess();
}
(PVOID)1) != (PVOID)1);
}
+#if DBG
+VOID
+NTAPI
+PspCheckProcessList()
+{
+ PLIST_ENTRY Entry;
+
+ KeAcquireGuardedMutex(&PspActiveProcessMutex);
+ DbgPrint("# checking PsActiveProcessHead @ %p\n", &PsActiveProcessHead);
+ for (Entry = PsActiveProcessHead.Flink;
+ Entry != &PsActiveProcessHead;
+ Entry = Entry->Flink)
+ {
+ PEPROCESS Process = CONTAINING_RECORD(Entry, EPROCESS, ActiveProcessLinks);
+ POBJECT_HEADER Header;
+ PVOID Info, HeaderLocation;
+
+ /* Get the header and assume this is what we'll free */
+ Header = OBJECT_TO_OBJECT_HEADER(Process);
+ HeaderLocation = Header;
+
+ /* To find the header, walk backwards from how we allocated */
+ if ((Info = OBJECT_HEADER_TO_CREATOR_INFO(Header)))
+ {
+ HeaderLocation = Info;
+ }
+ if ((Info = OBJECT_HEADER_TO_NAME_INFO(Header)))
+ {
+ HeaderLocation = Info;
+ }
+ if ((Info = OBJECT_HEADER_TO_HANDLE_INFO(Header)))
+ {
+ HeaderLocation = Info;
+ }
+ if ((Info = OBJECT_HEADER_TO_QUOTA_INFO(Header)))
+ {
+ HeaderLocation = Info;
+ }
+
+ ExpCheckPoolAllocation(HeaderLocation, NonPagedPool, 'corP');
+ }
+
+ KeReleaseGuardedMutex(&PspActiveProcessMutex);
+}
+#endif
+
VOID
NTAPI
PspDeleteProcess(IN PVOID ObjectBody)
/* Remove it from the Active List */
KeAcquireGuardedMutex(&PspActiveProcessMutex);
RemoveEntryList(&Process->ActiveProcessLinks);
+ Process->ActiveProcessLinks.Flink = NULL;
+ Process->ActiveProcessLinks.Blink = NULL;
KeReleaseGuardedMutex(&PspActiveProcessMutex);
}
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: subsys/ntvdm/ntvdm->c
-/* $Id$ */
#include <windows.h>
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Virtual DOS Machine\0"
-/* $Id: rosglue.c 39928 2009-03-10 02:49:45Z tkreuzer $
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: FreeType implementation for ReactOS
* PURPOSE: Glue functions between FreeType
* dllmain.c
*
* $Revision: 1.11 $
- * $Author$
- * $Date$
+ * $Author: hbelusca $
+ * $Date: 2013-01-28 23:45:53 +0100 (lun. 28 janv. 2013) $
*
*/
#include "precomp.h"
-/* $Id: stubs.c 28709 2007-08-31 15:09:51Z greatlrd $
- *
+/*
* reactos/lib/gdi32/misc/hacks.c
*
* GDI32.DLL hacks
*
- * Api that are hacked but we can not do correct implemtions yetm but using own syscall
+ * Apis that are hacked but we cannot write correct implementations yet but we are using our own syscall
*
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
- * $Id:
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS GDI32
* PURPOSE:
-/* $Id: stubs.c 28709 2007-08-31 15:09:51Z greatlrd $
- *
+/*
* reactos/lib/gdi32/misc/historic.c
*
* GDI32.DLL Stubs
*
- * Api that does basic nothing, but is here for backwords compatible with older windows
+ * Apis that do basically nothing, but are here for backwards compatibility with older Windows
*
*/
-/* $Id: stubs.c 28533 2007-08-24 22:44:36Z greatlrd $
- *
+/*
* reactos/lib/gdi32/misc/eng.c
*
* GDI32.DLL eng part
-/* $Id: stubs.c 18897 2005-12-08 23:10:33Z cwittich $
- *
+/*
* reactos/lib/gdi32/objects/path.c
*
* GDI32.DLL Path
-/* $Id: vbemp.rc 21844 2006-05-07 19:34:23Z ion $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "DXG DirectX interface Device Driver\0"
-/* $Id: vbemp.rc 21844 2006-05-07 19:34:23Z ion $ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "DirectX Graphics Driver Thunk\0"
RETURN(FALSE);
}
+ if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId)
+ {
+ ERR("NtUserSwitchDesktop called for a desktop of a different session\n");
+ RETURN(FALSE);
+ }
+
if(pdesk == gpdeskInputDesktop)
{
WARN("NtUserSwitchDesktop called for active desktop\n");
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Win32k subsystem
* PURPOSE: Visibility computations interface definition
if ((Cmd == SW_HIDE) || (Cmd == SW_MINIMIZE))
{
- if ( ( Wnd->spwndParent == UserGetDesktopWindow() && !ActivateOtherWindowMin(Wnd) ) ||
- // and Rule #1.
- ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) )
+ if ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() )
{
- co_WinPosActivateOtherWindow(Wnd);
+ if ( Wnd->spwndParent == UserGetDesktopWindow())
+ {
+ if(!ActivateOtherWindowMin(Wnd))
+ co_WinPosActivateOtherWindow(Wnd);
+ }
+ else
+ co_WinPosActivateOtherWindow(Wnd);
}
/* Revert focus to parent */
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
WindowStationObject->SystemMenuTemplate = (HANDLE)0;
WindowStationObject->Name = WindowStationName;
+ WindowStationObject->dwSessionId = NtCurrentPeb()->SessionId;
if (InputWindowStation == NULL)
{
typedef struct _WINSTATION_OBJECT
{
+ DWORD dwSessionId;
+
KSPIN_LOCK Lock;
UNICODE_STRING Name;
LIST_ENTRY DesktopListHead;
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS User32
* PURPOSE: Built-in control registration
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/desktop.c
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/dde.c
* PURPOSE: DDE
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/dde.c
* PURPOSE: DDE
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/winsta.c
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* PURPOSE: Accelerator tables
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/caret.c
* PURPOSE: Caret
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/clipboard.c
* PURPOSE: Input
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* PURPOSE: Input
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* PURPOSE: Input
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* PURPOSE: Input
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
* PURPOSE: Input
/*
- *Spanish Language resource file
+ * Spanish Language resource file
* Traducido por: Javier Remacha 2008-26-01
*/
WPARAM wParam;
LPARAM lParam;
HDESK Desktop;
+ HDESK OldDesktop;
DWORD StartTime;
DWORD QueryResult;
HWND Dlg;
return FALSE;
}
+ Context->OldDesktop = GetThreadDesktop(GetCurrentThreadId());
+ SwitchDesktop(Context->Desktop);
+
EnumDesktopWindows(Context->Desktop, NotifyTopLevelEnum, lParam);
+ SwitchDesktop(Context->OldDesktop);
+
CloseDesktop(Context->Desktop);
return QUERY_RESULT_CONTINUE == Context->QueryResult;
-/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "W32 GDI KM subsystem\0"