diff --git a/base/applications/calc/CMakeLists.txt b/base/applications/calc/CMakeLists.txt index 870e6f10fa2..85332bd76ea 100644 --- a/base/applications/calc/CMakeLists.txt +++ b/base/applications/calc/CMakeLists.txt @@ -13,8 +13,12 @@ list(APPEND SOURCE add_executable(calc ${SOURCE} resource.rc) set_module_type(calc win32gui UNICODE) add_importlibs(calc advapi32 user32 gdi32 msvcrt kernel32) -if(MSVC) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(calc mingwex) +elseif(MSVC) add_importlibs(calc ntdll) endif() + add_pch(calc calc.h SOURCE) add_cd_file(TARGET calc DESTINATION reactos/system32 FOR all) diff --git a/base/applications/calc/lang/tr-TR.rc b/base/applications/calc/lang/tr-TR.rc index c8e0250c5a0..ccfcf0276c6 100644 --- a/base/applications/calc/lang/tr-TR.rc +++ b/base/applications/calc/lang/tr-TR.rc @@ -415,7 +415,7 @@ END STRINGTABLE BEGIN - IDS_STRING_LICENSE "Hesap Makinesi, GNU GPL ruhsatıyla yayımlanan bir özgür yazılımdır.\r\n\r\nGNU GPL ruhsatının bir kopyasını buradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nBir de GNU GPL ruhsatının bir çevirisini buradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "Hesap Makinesi, GNU GPL ruhsatıyla yayımlanan bir özgür yazılımdır.\r\n\r\nGNU GPL ruhsatının bir kopyasını şuradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nBir de GNU GPL ruhsatının bir çevirisini şuradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Yanlışlık" IDS_QUICKHELP "Hızlı Yardım" END diff --git a/base/applications/cmdutils/doskey/doskey.rc b/base/applications/cmdutils/doskey/doskey.rc index 52e969bfdc3..a3e9be18c8f 100644 --- a/base/applications/cmdutils/doskey/doskey.rc +++ b/base/applications/cmdutils/doskey/doskey.rc @@ -34,6 +34,9 @@ #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif diff --git a/base/applications/cmdutils/doskey/lang/ru-RU.rc b/base/applications/cmdutils/doskey/lang/ru-RU.rc new file mode 100644 index 00000000000..2b0dbfc0f89 --- /dev/null +++ b/base/applications/cmdutils/doskey/lang/ru-RU.rc @@ -0,0 +1,26 @@ +/* Russian translation by Kudratov Olimjon (olim98@bk.ru) */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_HELP "Редактирование и повторный вызов команд ReactOS; создание макросов DOSKey.\n\ +\n\ +DOSKEY [/REINSTALL] [/LISTSIZE=размер] [/MACROS[:ALL | :модуль]]\n\ + [/HISTORY] [/INSERT | /OVERSTRIKE] [/EXENAME=модуль] [/MACROFILE=файл]\n\ + [макрос=[текст]]\n\n\ + /REINSTALL Установка новой копии DOSKey.\n\ + /LISTSIZE=размер Размер буфера журнала команд.\n\ + /MACROS Вывод всех макросов DOSKey.\n\ + /MACROS:ALL Вывод всех макросов DOSKey для всех исполняемых\n\ + модулей, содержащих макросы DOSKey.\n\ + /MACROS:модуль Вывод всех макросов DOSKey для указанного модуля.\n\ + /HISTORY Вывод всех команд, хранящихся в памяти.\n\ + /INSERT Включение режима вставки.\n\ + /OVERSTRIKE Включение режима замены.\n\ + /EXENAME=модуль Исполняемый модуль.\n\ + /MACROFILE=файл Файл макросов, который следует установить.\n\ + макрос Имя нового макроса.\n\ + текст Команды, которые следует включить в макрос." + IDS_INVALID_MACRO_DEF "Неверный макрос: %s\n" +END diff --git a/base/applications/cmdutils/find/lang/ru-RU.rc b/base/applications/cmdutils/find/lang/ru-RU.rc index dbaf2b6643a..347e3d1387c 100644 --- a/base/applications/cmdutils/find/lang/ru-RU.rc +++ b/base/applications/cmdutils/find/lang/ru-RU.rc @@ -2,12 +2,15 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_USAGE "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] ""строка"" [ файл... ]\n\ - /C Вывод только общего числа строк, содержащих заданную строку.\n\ - /I Поиск без учета регистра символов.\n\ - /N Вывод номеров отображаемых строк (начиная с 1).\n\ - /V Вывод всех строк, НЕ содержащих заданную строку." + IDS_USAGE "Поиск текстовой строки в одном или нескольких файлах.\n\n\ +FIND [/V] [/C] [/N] [/I] ""строка"" [[диск:][путь]имя_файла[ ...]]\n\ + /V Вывод всех строк, НЕ содержащих заданную строку.\n\ + /C Вывод только общего числа строк, содержащих заданную строку.\n\ + /N Вывод номеров отображаемых строк.\n\ + /I Поиск без учета регистра символов.\n\ + ""строка"" Искомая строка.\n\ + [диск:][путь]имя_файла\n\ + Один или несколько файлов, в которых выполняется поиск." IDS_NO_SUCH_FILE "FIND: %s: Файл не существует.\n" IDS_CANNOT_OPEN "FIND: %s: Невозможно открыть файл.\n" END diff --git a/base/applications/cmdutils/help/lang/ru-RU.rc b/base/applications/cmdutils/help/lang/ru-RU.rc index 83ec216cba4..a29115f7eaa 100644 --- a/base/applications/cmdutils/help/lang/ru-RU.rc +++ b/base/applications/cmdutils/help/lang/ru-RU.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_NO_ENTRY "This command is not supported by the help utility.\nTry ""%s /?""\n." + IDS_NO_ENTRY "Данная команда не поддерживается. Воспользуйтесь параметром ""%s /?""\n." END STRINGTABLE @@ -20,55 +20,53 @@ HELP [command]\n\n\ команда /? Выводит подробную информацию о команде\n\n\ ? Список всех доступных команд без описания.\n\ ALIAS Вывод, установка или удаление псевдонимов.\n\ -ATTRIB Вывод и изменение атрибутов файлов.\n\ +ATTRIB Отображение и изменение атрибутов файлов.\n\ BEEP Звуковой сигнал.\n\ CALL Вызов одного пакетного файла из другого.\n\ -CD Вывод имени либо смена текущего каталога.\n\ -CHCP Вывод или смена текущего номера кодовой страницы.\n\ +CD Вывод имени либо смена текущей папки.\n\ +CHCP Вывод либо установка активной кодовой страницы.\n\ CHOICE Ждет, пока пользователь не выберет один из указанных в списке символов.\n\ CLS Очистка экрана.\n\ -CMD Запуск новой копии интерпретатора команд.\n\ -COLOR Установка цветов по умолчанию для текста и фона.\n\ +CMD Запуск еще одного интерпретатора командных строк ReactOS.\n\ +COLOR Установка цветов переднего плана и фона, используемых по умолчанию.\n\ COPY Копирование одного или нескольких файлов в другое место.\n\ -DATE Вывод или изменение даты.\n\ +DATE Вывод либо установка текущей даты.\n\ DELETE Удаление одного или нескольких файлов.\n\ -DIR Вывод списка файлов и подкаталогов каталога.\n\ +DIR Вывод списка файлов и подпапок из указанной папки.\n\ ECHO Вывод сообщений и переключение режима отображения команд на экране.\n\ ERASE Удаление одного или нескольких файлов.\n\ -EXIT Завершает интерпретатор команд.\n\ -FOR Запускает указанную команду для каждого файла из набора файлов.\n\ +EXIT Завершение работы программы CMD.EXE (интерпретатора командных строк).\n\ +FOR Запуск указанной команды для каждого из файлов в наборе.\n\ FREE (Свободное) дисковое пространство.\n\ -GOTO Передача управления содержащей метку строке пакетного файла\n\ -HELP Предоставляет справочную информацию о командах ReactOS.\n\ +GOTO Передача управления в отмеченную строку пакетного файла.\n\ +HELP Выводит справочную информацию о командах ReactOS.\n\ HISTORY Список запущенных команд\n\ IF Оператор условного выполнения команд в пакетном файле.\n\ -LABEL Создание, изменение и удаление меток тома.\n\ -MD Создание каталога.\n\ -MKDIR Создание каталога.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Перемещение файлов и переименование файлов и каталогов\n\ -PATH Вывод или задание пути поиска исполняемых файлов.\n\ -PAUSE Приостановка выполнения пакетного файла.\n\ -POPD Восттанавливает предыдущее значение текущей директории сохраненное командой\n\ - PUSHD.\n\ -PROMPT Изменение приглашения командной строки.\n\ -PUSHD Сохраняет текущую директорию, а потом меняет ее.\n\ -RD Удаление каталога.\n\ -REM Записывает комментарии (замечения) в пакетных файлах.\n\ -REN Переименование одного или нескольких файлов или каталогов.\n\ -RENAME Переименование одного или нескольких файлов или каталогов.\n\ -RMDIR Удаление каталога.\n\ +LABEL Создание, изменение и удаление меток тома для дисков.\n\ +MD Создание папки.\n\ +MKDIR Создание папки.\n\ +MKLINK Cоздание символических и жестких ссылок.\n\ +MOVE Перемещение одного или нескольких файлов из одной папки в другую.\n\ +PATH Отображает или устанавливает путь поиска исполняемых файлов.\n\ +PAUSE Приостанавливает выполнение пакетного файла и выводит сообщение.\n\ +POPD Восстанавливает предыдущее значение активной папки,\n\ + сохраненное с помощью команды PUSHD.\n\ +PROMPT Изменяет приглашение в командной строке ReactOS.\n\ +PUSHD Сохраняет значение активной папки и переходит к другой папке.\n\ +RD Удаляет папку.\n\ +REM Помещает комментарии в пакетные файлы.\n\ +REN Переименовывает файлы или папки.\n\ +RENAME Переименовывает файлы или папки.\n\ +RMDIR Удаление папки.\n\ SCREEN Перемещение курсора и вывод текста.\n\ -SET Вывод, задание и удаление переменных среды.\n\ -SHIFT Изменение содержимого (сдвиг) подставляемых параметров для пакетного файла\n" - IDS_HELP2 "START Открывает отдельное окно для запуска указанных команд или программ.\n\ - Выполняет команду.\n\ -TIME Вывод или изменение времени.\n\ +SET Показывает, устанавливает и удаляет переменные среды ReactOS.\n\ +SHIFT Изменение положения (сдвиг) подставляемых параметров для пакетного файла.\n" + IDS_HELP2 "START Выполнение программы или команды в отдельном окне.\n\ +TIME Вывод и установка системного времени.\n\ TIMER Секундомер.\n\ -TITLE Изменение заголовка окна командной строки.\n\ -TYPE Вывод содержимого одного или нескольких текстовых файлов.\n\ -VER Вывод версии ОС.\n\ -VERIFY Включение или отключение режима проверки правильности записи файлов\n\ - на диск.\n\ -VOL Выводит метку тома и серийный номер.\n" +TITLE Назначение заголовка окна для текущего сеанса интерпретатора\n\командных строк CMD.EXE.\n\ +TYPE Вывод на экран содержимого текстовых файлов.\n\ +VER Вывод сведений о версии ReactOS.\n\ +VERIFY ВУстановка режима проверки правильности записи файлов на диск.\n\ +VOL Вывод метки и серийного номера тома для диска.\n" END diff --git a/base/applications/cmdutils/hostname/hostname.rc b/base/applications/cmdutils/hostname/hostname.rc index f5612248850..5919604de2a 100644 --- a/base/applications/cmdutils/hostname/hostname.rc +++ b/base/applications/cmdutils/hostname/hostname.rc @@ -33,6 +33,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif diff --git a/base/applications/cmdutils/hostname/lang/ru-RU.rc b/base/applications/cmdutils/hostname/lang/ru-RU.rc new file mode 100644 index 00000000000..669b93ae73e --- /dev/null +++ b/base/applications/cmdutils/hostname/lang/ru-RU.rc @@ -0,0 +1,8 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_USAGE "Печать имени текущего узла.\n\nhostname" + IDS_NOSET "hostname -s не поддерживается." + IDS_ERROR "Ошибка Win32" +END diff --git a/base/applications/cmdutils/more/lang/ru-RU.rc b/base/applications/cmdutils/more/lang/ru-RU.rc index ae6f059e6c9..86c188ab0e1 100644 --- a/base/applications/cmdutils/more/lang/ru-RU.rc +++ b/base/applications/cmdutils/more/lang/ru-RU.rc @@ -11,11 +11,11 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN IDS_USAGE "Показывать данные постранично заполняя экран.\n\n\ - MORE < [Том:][Путь]Имя файла\n\ - Command | MORE \n\ - MORE [Том:][Путь]Имя файла\n\n\ - [Том:][Путь]Имя Файла Имя файла содержимое которого будет отображено.\n\ - Command\t\t Команда, результат работы которой требуется выводить на экран.\n\n\ + MORE < [диск:][путь]имя_файла\n\ + имя_команды | MORE \n\ + MORE [диск:][путь]имя_файла\n\n\ + [диск:][путь]имя_файла Файл, отображаемый по фрагментам.\n\ + имя_команды Команда, вывод которой отображается на экране.\n\n\ При запросе ""-- Продолжить --"" вы можете нажать любую клавишу для отображения следующего экрана.\n" IDS_CONTINUE " -- Продолжить (100%) -- " IDS_FILE_ACCESS "Нет доступа к файлу %s." diff --git a/base/applications/cmdutils/reg/lang/ru-RU.rc b/base/applications/cmdutils/reg/lang/ru-RU.rc index 40994fe21ec..0982b5acc9d 100644 --- a/base/applications/cmdutils/reg/lang/ru-RU.rc +++ b/base/applications/cmdutils/reg/lang/ru-RU.rc @@ -3,9 +3,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN STRING_USAGE "Использование программы:\n\nREG [ ADD | DELETE | QUERY ]\nREG <команда> /?\n" - STRING_ADD_USAGE "REG ADD <ключ> [/v <параметр> | /ve] [/t <тип>] [/s <разделитель>] [/d данные] [/f]\n" - STRING_DELETE_USAGE "REG DELETE <ключ> [/v <параметр> | /ve | /va] [/f]\n" - STRING_QUERY_USAGE "REG QUERY <ключ> [/v <параметр> | /ve] [/s]\n" + STRING_ADD_USAGE "REG ADD <имя_раздела> [/v <имя_параметра> | /ve] [/t <тип>] [/s <разделитель>] [/d <данные>] [/f]\n" + STRING_DELETE_USAGE "REG DELETE <имя_раздела> [/v <имя_параметра> | /ve | /va] [/f]\n" + STRING_QUERY_USAGE "REG QUERY <имя_раздела> [/v [имя_параметра] | /ve] [/s]\n" STRING_SUCCESS "Операция успешно завершена\n" STRING_INVALID_KEY "Ошибка: неправильное имя ключа\n" STRING_INVALID_CMDLINE "Ошибка: неправильные параметры командной строки\n" diff --git a/base/applications/cmdutils/taskkill/lang/ru-RU.rc b/base/applications/cmdutils/taskkill/lang/ru-RU.rc new file mode 100644 index 00000000000..f6e54e339bb --- /dev/null +++ b/base/applications/cmdutils/taskkill/lang/ru-RU.rc @@ -0,0 +1,19 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + STRING_USAGE "TASKKILL [/F] [/IM <образ> | /PID <процесс>]\n" + STRING_INVALID_OPTION "Error: Unknown or invalid command line option specified.\n" + STRING_INVALID_PARAM "Error: Invalid command line parameter specified.\n" + STRING_MISSING_OPTION "Error: One of options /im or /pid must be specified.\n" + STRING_MISSING_PARAM "Error: Option %1 expects a command line parameter.\n" + STRING_MUTUAL_EXCLUSIVE "Error: Options /im and /pid are mutually exclusive.\n" + STRING_CLOSE_PID_SEARCH "Close message sent to top-level windows of process with PID %1!u!.\n" + STRING_CLOSE_PROC_SRCH "Close message sent to top-level windows of process ""%1"" with PID %2!u!.\n" + STRING_TERM_PID_SEARCH "Process with PID %1!u! was forcibly terminated.\n" + STRING_TERM_PROC_SEARCH "Process ""%1"" with PID %2!u! was forcibly terminated.\n" + STRING_SEARCH_FAILED "Error: Could not find process ""%1"".\n" + STRING_ENUM_FAILED "Error: Unable to enumerate the process list.\n" + STRING_TERMINATE_FAILED "Error: Unable to terminate process ""%1"".\n" + STRING_SELF_TERMINATION "Error: Process self-termination is not permitted.\n" +END diff --git a/base/applications/cmdutils/taskkill/taskkill.rc b/base/applications/cmdutils/taskkill/taskkill.rc index 7b4de57d80c..cae8f15ed0d 100644 --- a/base/applications/cmdutils/taskkill/taskkill.rc +++ b/base/applications/cmdutils/taskkill/taskkill.rc @@ -39,6 +39,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGAUGE_SQ_AL #include "lang/sq-AL.rc" #endif diff --git a/base/applications/cmdutils/wmic/lang/ru-RU.rc b/base/applications/cmdutils/wmic/lang/ru-RU.rc new file mode 100644 index 00000000000..c85d0597191 --- /dev/null +++ b/base/applications/cmdutils/wmic/lang/ru-RU.rc @@ -0,0 +1,8 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + STRING_CMDLINE_NOT_SUPPORTED "Ошибка: коммандная строка не поддерживается\n" + STRING_ALIAS_NOT_FOUND "Ошибка: псевдоним не найден\n" + STRING_INVALID_QUERY "Ошибка: неврный запрос\n" +END diff --git a/base/applications/cmdutils/wmic/wmic.rc b/base/applications/cmdutils/wmic/wmic.rc index 0f54d11e54f..cb5804db370 100644 --- a/base/applications/cmdutils/wmic/wmic.rc +++ b/base/applications/cmdutils/wmic/wmic.rc @@ -37,6 +37,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif diff --git a/base/applications/cmdutils/xcopy/lang/Ru.rc b/base/applications/cmdutils/xcopy/lang/Ru.rc index 4e31390d173..cf5f315ac95 100644 --- a/base/applications/cmdutils/xcopy/lang/Ru.rc +++ b/base/applications/cmdutils/xcopy/lang/Ru.rc @@ -6,7 +6,7 @@ BEGIN подробного описания.\n" STRING_INVPARM "Недопустимый параметр '%1' - попробуйте 'xcopy /?' для получения подробного\n\ описания.\n" - STRING_PAUSE "Нажмите клавишу , чтобы начать копирование.\n" + STRING_PAUSE "Нажмите на клавишу , чтобы начать копирование.\n" STRING_SIMCOPY "%1!d! файл(ов) было бы скопировано.\n" STRING_COPY "%1!d! файл(ов) скопировано.\n" STRING_QISDIR "'%1' является файлом или папкой?\n\ @@ -22,35 +22,36 @@ BEGIN STRING_FILE_CHAR "F" STRING_DIR_CHAR "D" STRING_HELP -"XCOPY - Копирует файлы и деревья папок\n\ +"Копирование файлов и структур каталогов.\n\ \n\ Синтаксис:\n\ -XCOPY source [dest] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\ +XCOPY источник [целевой_объект] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\ \t [/R] [/H] [/C] [/P] [/A] [/M] [/E] [/D] [/Y] [/-Y]\n\ \n\ -Где:\n\ \n\ -[/I] Если конечная папка отсутствует и копируется более одного файла,\n\ - то предполагается папка в качестве места назначения.\n\ -[/S] Копирует папки и подпапки.\n\ -[/E] Копирует папки и подпапки, включая пустые.\n\ -[/Q] Не отображает имена копируемых файлов.\n\ -[/F] Отображает полные имена исходных и конечных файлов.\n\ -[/L] Выводит список файлов, которые будут скопированы.\n\ -[/W] Запрашивает подтверждение перед началом копирования.\n\ -[/T] Создает структуру папок, но не копирует файлы.\n\ -[/Y] Подавляет запрос на подтверждение перезаписи файлов.\n\ -[/-Y] Запрашивает подтверждение на перезапись файлов.\n\ -[/P] Запрашивает подтверждение для каждого копируемого файла.\n\ -[/N] Использует короткие имена файлов при копировании.\n\ -[/U] Копирует только те файлы, которые уже существуют в конечной папке.\n\ -[/R] Перезаписывает файлы, доступные только для чтения.\n\ -[/H] Копирует скрытые и системные файлы.\n\ -[/C] Продолжает работу, даже если произошла ошибка.\n\ -[/A] Копирует только те файлы, для которых установлен атрибут ""архивный"".\n\ -[/M] Копирует только те файлы, для которых установлен атрибут ""архивный"",\n\ + источник Копируемые файлы.\n\ + целевой_объект Расположение или имена новых файлов.\n\ +/I Если целевой объект не существует и копируется несколько\n\ + файлов, считается, что целевой объект задает каталог.\n\ +/S Копирование только не пустых каталогов с подкаталогами.\n\ +/E Копирование каталогов с подкаталогами, включая пустые.\n\ +/Q Запрет вывода имен копируемых файлов.\n\ +/F Вывод полных имен исходных и целевых файлов.\n\ +/L Вывод имен копируемых файлов.\n\ +/W Вывод запроса на нажатие клавиши перед копированием.\n\ +/T Создание структуры каталогов без копирования файлов.\n\ +/Y Подавление запроса подтверждения на перезапись существующего целевого файла.\n\ +/-Y Запрос подтверждения на перезапись существующего целевого файла.\n\ +/P Вывод запросов перед созданием каждого нового файла.\n\ +/N Использование коротких имен при копировании.\n\ +/U Копирование только файлов, уже имеющихся в целевом каталоге.\n\ +/R Перезапись файлов, предназначенных только для чтения.\n\ +/H Копирование, среди прочих, скрытых и системных файлов.\n\ +/C Продолжение копирования вне зависимости от наличия ошибок.\n\ +/A Копирует только те файлы, для которых установлен атрибут ""архивный"".\n\ +/M Копирует только те файлы, для которых установлен атрибут ""архивный"",\n\ при этом атрибут удаляется.\n\ -[/D | /D:m-d-y] Копирует только новые файлы или те, которые были изменены\n\ - после указанной даты. Если дата не указана, копирует только\n\ - те файлы, которые новее в исходной папке.\n" +/D | /D:m-d-y Копирование файлов, измененных не ранее указанной даты.\n\ + Если дата не указана, заменяются только конечные файлы,\n\ + более старые, чем исходные.\n" END diff --git a/base/applications/dxdiag/lang/tr-TR.rc b/base/applications/dxdiag/lang/tr-TR.rc index 9b34a0a4188..dd76fcd5ec9 100644 --- a/base/applications/dxdiag/lang/tr-TR.rc +++ b/base/applications/dxdiag/lang/tr-TR.rc @@ -20,7 +20,7 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bu araç, dizgenizdeki yüklü ReactX bileşenleri ve sürücüleri üzerine ayrıntılı bilgi raporlar.", -1, 10, 10, 443, 17 - LTEXT "Soruna neden olan bölümü biliyorsanız yukarıdaki uygun sekmeyi tıklayınız. Yoksa sırayla tüm bölümlere gitmek için aşağıdaki ""Sonraki Bölüm"" düğmesini kullanabilirsiniz.", -1, 10, 30, 443, 25 + LTEXT "Soruna neden olan bölümü biliyorsanız yukarıdaki uygun sekmeyi tıklayınız. Yoksa diziyle tüm bölümlere gitmek için aşağıdaki ""Sonraki Bölüm"" düğmesini kullanabilirsiniz.", -1, 10, 30, 443, 25 GROUPBOX "Dizge Bilgisi", -1, 10, 55, 443, 130, SS_RIGHT LTEXT "Geçerli Zaman:", -1, 70, 70, 80, 10, SS_RIGHT LTEXT "Bilgisayar Adı:", -1, 70, 80, 80, 10, SS_RIGHT diff --git a/base/applications/findstr/lang/ru-RU.rc b/base/applications/findstr/lang/ru-RU.rc index dbaf2b6643a..d0f169d8e0f 100644 --- a/base/applications/findstr/lang/ru-RU.rc +++ b/base/applications/findstr/lang/ru-RU.rc @@ -2,12 +2,12 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_USAGE "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] ""строка"" [ файл... ]\n\ + IDS_USAGE "FINDSTR: Поиск строк в файлах.\n\n\ + FINDSTR [/V] [/C] [/N] [/I] ""строка"" [[диск:][путь]имя_файла[ ...]]\n\ + /V Вывод всех строк, НЕ содержащих заданную строку.\n\ /C Вывод только общего числа строк, содержащих заданную строку.\n\ - /I Поиск без учета регистра символов.\n\ - /N Вывод номеров отображаемых строк (начиная с 1).\n\ - /V Вывод всех строк, НЕ содержащих заданную строку." - IDS_NO_SUCH_FILE "FIND: %s: Файл не существует.\n" - IDS_CANNOT_OPEN "FIND: %s: Невозможно открыть файл.\n" + /N Вывод номеров отображаемых строк.\n\ + /I Поиск без учета регистра символов." + IDS_NO_SUCH_FILE "FINDSTR: %s: Файл не существует.\n" + IDS_CANNOT_OPEN "FINDSTR: %s: Невозможно открыть файл.\n" END diff --git a/base/applications/games/winmine/lang/ru-RU.rc b/base/applications/games/winmine/lang/ru-RU.rc index 5154473fa17..2c41c7a5908 100644 --- a/base/applications/games/winmine/lang/ru-RU.rc +++ b/base/applications/games/winmine/lang/ru-RU.rc @@ -16,9 +16,9 @@ BEGIN MENUITEM "&Вопросительные знаки", IDM_MARKQ MENUITEM SEPARATOR MENUITEM "Нови&чок", IDM_BEGINNER - MENUITEM "&Мастер", IDM_ADVANCED + MENUITEM "&Любитель", IDM_ADVANCED MENUITEM "&Эксперт", IDM_EXPERT - MENUITEM "Нестандартные &параметры", IDM_CUSTOM + MENUITEM "Особые...", IDM_CUSTOM MENUITEM SEPARATOR MENUITEM "&Закрыть\tAlt+X", IDM_EXIT END @@ -36,7 +36,7 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Лучшее время", -1, 10, 10, 140, 45 LTEXT "Новичок", -1, 20, 20, 40, 8 - LTEXT "Мастер", -1, 20, 30, 40, 8 + LTEXT "Любитель", -1, 20, 30, 40, 8 LTEXT "Эксперт", -1, 20, 40, 40, 8 LTEXT "999", IDC_TIME1, 70, 20, 15, 8 LTEXT "999", IDC_TIME2, 70, 30, 15, 8 @@ -57,17 +57,17 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 60, 40, 40, 15 END -DLG_CUSTOM DIALOGEX 0, 0, 140, 100 +DLG_CUSTOM DIALOGEX 0, 0, 130, 85 STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHELLFONT CAPTION "Нестандартные параметры" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "По вертикали", -1, 5, 5, 70, 10 - LTEXT "По горизонтали", -1, 5, 35, 70, 10 - LTEXT "Число мин", -1, 5, 65, 70, 10 - EDITTEXT IDC_EDITROWS, 5, 15, 20, 12, ES_NUMBER - EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER - EDITTEXT IDC_EDITMINES, 5, 75, 20, 12, ES_NUMBER - DEFPUSHBUTTON "OK", IDOK, 40, 30, 50, 15 - PUSHBUTTON "Отмена", IDCANCEL, 80, 50, 50, 15 + LTEXT "Высота:", -1, 8, 22, 28, 10 + LTEXT "Ширина:", -1, 8, 37, 29, 10 + LTEXT "Число мин:", -1, 8, 52, 40, 10 + EDITTEXT IDC_EDITROWS, 50, 20, 25, 12, ES_NUMBER + EDITTEXT IDC_EDITCOLS, 50, 35, 25, 12, ES_NUMBER + EDITTEXT IDC_EDITMINES, 50, 50, 25, 12, ES_NUMBER + DEFPUSHBUTTON "OK", IDOK, 84, 20, 40, 16 + PUSHBUTTON "Отмена", IDCANCEL, 84, 46, 40, 16 END diff --git a/base/applications/mplay32/lang/bg-BG.rc b/base/applications/mplay32/lang/bg-BG.rc index 71ad20bb529..df8b8f9f8d9 100644 --- a/base/applications/mplay32/lang/bg-BG.rc +++ b/base/applications/mplay32/lang/bg-BG.rc @@ -8,11 +8,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Файл" BEGIN - MENUITEM "&Отваряне...", IDM_OPEN_FILE - MENUITEM "&Затваряне", IDM_CLOSE_FILE + MENUITEM "&Отваряне...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Затваряне\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "Из&ход", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -25,6 +36,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Всички поддържани (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -37,6 +57,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Търсене напред" IDS_APPTITLE "Мултимедийният възпроизводител на РеактОС" IDS_PLAY "Възпроизвеждане" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/cs-CZ.rc b/base/applications/mplay32/lang/cs-CZ.rc index 05e0528bb53..f07af4bd6b6 100644 --- a/base/applications/mplay32/lang/cs-CZ.rc +++ b/base/applications/mplay32/lang/cs-CZ.rc @@ -1,6 +1,6 @@ /* FILE: base/applications/mplay32/lang/cs-CZ.rc * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) - * UPDATED: 2009-08-03 + * UPDATED: 2014-08-31 */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT @@ -9,16 +9,27 @@ IDR_MAINMENU MENU BEGIN POPUP "&Soubor" BEGIN - MENUITEM "&Otevřít...", IDM_OPEN_FILE - MENUITEM "&Zavřít", IDM_CLOSE_FILE + MENUITEM "&Otevřít...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Zavřít\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Ukončit", IDM_EXIT END - POPUP "&Device" + POPUP "&Přehrát" BEGIN - MENUITEM "&Properties", IDM_DEVPROPS + MENUITEM "Přehrát/&Pozastavit\tCtrl+P", IDC_PLAY + MENUITEM "Za&stavit\tCtrl+S", IDC_STOP MENUITEM SEPARATOR - MENUITEM "&Volume Control", IDM_VOLUMECTL + MENUITEM "Opakova&t\tCtrl+T", IDM_REPEAT + END + POPUP "&Zobrazit" + BEGIN + MENUITEM "Reži&m s jedním oknem", IDM_SWITCHVIEW + END + POPUP "&Zařízení" + BEGIN + MENUITEM "&Vlastnosti", IDM_DEVPROPS + MENUITEM SEPARATOR + MENUITEM "Ovládání &hlasitosti", IDM_VOLUMECTL END POPUP "&Nápověda" BEGIN @@ -26,6 +37,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Všechny podporované (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -38,6 +58,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Přeskočit vpřed" IDS_APPTITLE "ReactOS Přehrávač multimédií" IDS_PLAY "Přehrát" - IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." + IDS_DEFAULTMCIERRMSG "Pro tuto chybu není dostupný žádný popis." + IDS_UNKNOWNFILEEXT "Nelze určit typ zařízení z dané přípony souboru." END diff --git a/base/applications/mplay32/lang/de-DE.rc b/base/applications/mplay32/lang/de-DE.rc index 10dfb85d4cc..21a33124f88 100644 --- a/base/applications/mplay32/lang/de-DE.rc +++ b/base/applications/mplay32/lang/de-DE.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Datei" BEGIN - MENUITEM "Ö&ffnen...", IDM_OPEN_FILE - MENUITEM "Sch&ließen", IDM_CLOSE_FILE + MENUITEM "Ö&ffnen...\tStrg+O", IDM_OPEN_FILE + MENUITEM "Sch&ließen\tStrg+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Beenden", IDM_EXIT END + POPUP "&Wiedergabe" + BEGIN + MENUITEM "Wiedergabe/&Pause\tStrg+P", IDC_PLAY + MENUITEM "St&opp\tStrg+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "W&iederholen\tStrg+T", IDM_REPEAT + END + POPUP "&Ansicht" + BEGIN + MENUITEM "Einzelfenster-&Modus", IDM_SWITCHVIEW + END POPUP "&Gerät" BEGIN MENUITEM "&Eigenschaften", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alle unterstützten (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Weiter" IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Abspielen" - IDS_DEFAULTMCIERRMSG "Für diesen Fehler steht keine Beschreibung zur Verfügung" + IDS_DEFAULTMCIERRMSG "Für diesen Fehler steht keine Beschreibung zur Verfügung." IDS_UNKNOWNFILEEXT "Kann keinen Gerätetyp aus der angegebenen Dateinamenerweiterung ermitteln." END diff --git a/base/applications/mplay32/lang/en-US.rc b/base/applications/mplay32/lang/en-US.rc index ce326d352f1..714f235e53b 100644 --- a/base/applications/mplay32/lang/en-US.rc +++ b/base/applications/mplay32/lang/en-US.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&File" BEGIN - MENUITEM "&Open...", IDM_OPEN_FILE - MENUITEM "&Close", IDM_CLOSE_FILE + MENUITEM "&Open...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Close\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Exit", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "All Supported (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Skip Forward" IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Play" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/es-ES.rc b/base/applications/mplay32/lang/es-ES.rc index dbf0f6eb350..82e8e89061c 100644 --- a/base/applications/mplay32/lang/es-ES.rc +++ b/base/applications/mplay32/lang/es-ES.rc @@ -4,16 +4,27 @@ IDR_MAINMENU MENU BEGIN POPUP "&Archivo" BEGIN - MENUITEM "&Abrir...", IDM_OPEN_FILE - MENUITEM "&Cerrar", IDM_CLOSE_FILE + MENUITEM "&Abrir...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Cerrar\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Salir", IDM_EXIT END - POPUP "&Device" + POPUP "&Reproducir" BEGIN - MENUITEM "&Properties", IDM_DEVPROPS + MENUITEM "Reproducir/&Pausa\tCtrl+P", IDC_PLAY + MENUITEM "&Detener\tCtrl+S", IDC_STOP MENUITEM SEPARATOR - MENUITEM "&Volume Control", IDM_VOLUMECTL + MENUITEM "Repe&tir\tCtrl+T", IDM_REPEAT + END + POPUP "&Vista" + BEGIN + MENUITEM "&Modo Ventana Única", IDM_SWITCHVIEW + END + POPUP "&Dispositivo" + BEGIN + MENUITEM "&Propiedades", IDM_DEVPROPS + MENUITEM SEPARATOR + MENUITEM "Control de &Volumen", IDM_VOLUMECTL END POPUP "Ay&uda" BEGIN @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Todos los ficheros soportados (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Marca siguiente" IDS_APPTITLE "Reproductor Multimedia de ReactOS" IDS_PLAY "Reproducir" - IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." + IDS_DEFAULTMCIERRMSG "No hay una descripción disponible para este error." + IDS_UNKNOWNFILEEXT "No se puede determinar el tipo de dispositivo a partir de la extensión del fichero." END diff --git a/base/applications/mplay32/lang/fr-FR.rc b/base/applications/mplay32/lang/fr-FR.rc index db3b38daa26..3bfd61dca10 100644 --- a/base/applications/mplay32/lang/fr-FR.rc +++ b/base/applications/mplay32/lang/fr-FR.rc @@ -4,16 +4,27 @@ IDR_MAINMENU MENU BEGIN POPUP "&Fichier" BEGIN - MENUITEM "&Ouvrir...", IDM_OPEN_FILE - MENUITEM "&Fermer", IDM_CLOSE_FILE + MENUITEM "&Ouvrir...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Fermer\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Quitter", IDM_EXIT END - POPUP "&Device" + POPUP "&Lecture" BEGIN - MENUITEM "&Properties", IDM_DEVPROPS + MENUITEM "Lecture/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP MENUITEM SEPARATOR - MENUITEM "&Volume Control", IDM_VOLUMECTL + MENUITEM "Répé&ter\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END + POPUP "Périp&hérique" + BEGIN + MENUITEM "&Propriétés", IDM_DEVPROPS + MENUITEM SEPARATOR + MENUITEM "Contrôle du &volume", IDM_VOLUMECTL END POPUP "&Aide" BEGIN @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Tous les types supportés (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Suivant" IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Lire" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/he-IL.rc b/base/applications/mplay32/lang/he-IL.rc index 56c18d82449..37339dc1515 100644 --- a/base/applications/mplay32/lang/he-IL.rc +++ b/base/applications/mplay32/lang/he-IL.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&קובץ" BEGIN - MENUITEM "&פתח...", IDM_OPEN_FILE - MENUITEM "&סגור", IDM_CLOSE_FILE + MENUITEM "&פתח...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&סגור\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&יציאה", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "כל הקבצים הנתמכים (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "דלג קדימה" IDS_APPTITLE "נגן המולטימדיה של ReactOS" IDS_PLAY "נגן" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/it-IT.rc b/base/applications/mplay32/lang/it-IT.rc index c45d241caf2..a1aba1d5ef5 100644 --- a/base/applications/mplay32/lang/it-IT.rc +++ b/base/applications/mplay32/lang/it-IT.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&File" BEGIN - MENUITEM "&Apri...", IDM_OPEN_FILE - MENUITEM "&Chiudi", IDM_CLOSE_FILE + MENUITEM "&Apri...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Chiudi\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Esci", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Tutti i tipi supportati (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Successivo" IDS_APPTITLE "Riproduttore multimediale ReactOS" IDS_PLAY "Riproduci" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/ja-JP.rc b/base/applications/mplay32/lang/ja-JP.rc index f8856aad263..9e3b2487311 100644 --- a/base/applications/mplay32/lang/ja-JP.rc +++ b/base/applications/mplay32/lang/ja-JP.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "ファイル(&F)" BEGIN - MENUITEM "開く(&O)...", IDM_OPEN_FILE - MENUITEM "閉じる(&C)", IDM_CLOSE_FILE + MENUITEM "開く(&O)...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "閉じる(&C)\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "終了(&E)", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "すべてのサポートされたファイル (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "前へスキップ" IDS_APPTITLE "ReactOS マルチメディア プレーヤー" IDS_PLAY "再生" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/nl-NL.rc b/base/applications/mplay32/lang/nl-NL.rc index bf8dc6a317f..4f9056fc6a0 100644 --- a/base/applications/mplay32/lang/nl-NL.rc +++ b/base/applications/mplay32/lang/nl-NL.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Bestand" BEGIN - MENUITEM "&Openen...", IDM_OPEN_FILE - MENUITEM "&Sluiten", IDM_CLOSE_FILE + MENUITEM "&Openen...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Sluiten\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Afsluiten", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Mediabestanden (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Volgende" IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Play" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/no-NO.rc b/base/applications/mplay32/lang/no-NO.rc index ccc77a535c2..ff5f317e098 100644 --- a/base/applications/mplay32/lang/no-NO.rc +++ b/base/applications/mplay32/lang/no-NO.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Fil" BEGIN - MENUITEM "&Åpne...", IDM_OPEN_FILE - MENUITEM "&Lukk", IDM_CLOSE_FILE + MENUITEM "&Åpne...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Lukk\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Avslutt", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alle kompaktible filer (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -33,6 +53,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Spole fremover" IDS_APPTITLE "ReactOS Multimedia avspiller" IDS_PLAY "Spill" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/pl-PL.rc b/base/applications/mplay32/lang/pl-PL.rc index fdcb893c289..797877b8dfa 100644 --- a/base/applications/mplay32/lang/pl-PL.rc +++ b/base/applications/mplay32/lang/pl-PL.rc @@ -10,25 +10,45 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&Plik" + POPUP "Pli&k" BEGIN - MENUITEM "&Otwórz...", IDM_OPEN_FILE - MENUITEM "&Zamknij", IDM_CLOSE_FILE + MENUITEM "&Otwórz...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Zamknij\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR - MENUITEM "&Wyjdź", IDM_EXIT + MENUITEM "Za&kończ", IDM_EXIT + END + POPUP "&Graj" + BEGIN + MENUITEM "Play/&Pauza\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Pow&tarzaj\tCtrl+T", IDM_REPEAT + END + POPUP "&Widok" + BEGIN + MENUITEM "Tryb po&jedynczego okna", IDM_SWITCHVIEW END POPUP "&Urządzenie" BEGIN - MENUITEM "&Właściwości", IDM_DEVPROPS + MENUITEM "Właś&ciwości", IDM_DEVPROPS MENUITEM SEPARATOR MENUITEM "&Regulacja głośności", IDM_VOLUMECTL END - POPUP "&Pomoc" + POPUP "Pomo&c" BEGIN MENUITEM "&O programie...", IDM_ABOUT END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Wszystkie formaty (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -41,6 +61,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Przeskocz do przodu" IDS_APPTITLE "Odtwarzacz multimedialny ReactOS" IDS_PLAY "Odtwórz" - IDS_DEFAULTMCIERRMSG "Brak dostępnego opisu dla tego błędu" + IDS_DEFAULTMCIERRMSG "Brak dostępnego opisu dla tego błędu." IDS_UNKNOWNFILEEXT "Nie można określić typu urządzenia z podanego rozszerzenia pliku." END diff --git a/base/applications/mplay32/lang/pt-BR.rc b/base/applications/mplay32/lang/pt-BR.rc index e1bf6e24caf..c53668ad2bb 100644 --- a/base/applications/mplay32/lang/pt-BR.rc +++ b/base/applications/mplay32/lang/pt-BR.rc @@ -6,11 +6,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Arquivo" BEGIN - MENUITEM "&Abrir...", IDM_OPEN_FILE - MENUITEM "&Fechar", IDM_CLOSE_FILE + MENUITEM "&Abrir...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Fechar\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Sair", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -23,6 +34,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Todos os formatos (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -35,6 +55,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Pular Próxima" IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Executar" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/ro-RO.rc b/base/applications/mplay32/lang/ro-RO.rc index b2c224c8174..fc217178e5a 100644 --- a/base/applications/mplay32/lang/ro-RO.rc +++ b/base/applications/mplay32/lang/ro-RO.rc @@ -10,11 +10,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Fișier" BEGIN - MENUITEM "&Deschidere…", IDM_OPEN_FILE - MENUITEM "Î&nchide", IDM_CLOSE_FILE + MENUITEM "&Deschidere…\tCtrl+O", IDM_OPEN_FILE + MENUITEM "Î&nchide\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "I&eșire", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Dispozitiv" BEGIN MENUITEM "&Proprietăți…", IDM_DEVPROPS @@ -27,6 +38,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Toate admisibile (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -39,6 +59,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Salt la următor" IDS_APPTITLE "Lector multimedia" IDS_PLAY "Lecturare" - IDS_DEFAULTMCIERRMSG "Nu există descriere pentru această eroare" + IDS_DEFAULTMCIERRMSG "Nu există descriere pentru această eroare." IDS_UNKNOWNFILEEXT "Nu se poate determina tipul dispozitivului din extensia fișierului." END diff --git a/base/applications/mplay32/lang/ru-RU.rc b/base/applications/mplay32/lang/ru-RU.rc index b30e8ad8b4a..ab746afd19d 100644 --- a/base/applications/mplay32/lang/ru-RU.rc +++ b/base/applications/mplay32/lang/ru-RU.rc @@ -4,11 +4,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Файл" BEGIN - MENUITEM "&Открыть...", IDM_OPEN_FILE - MENUITEM "&Закрыть", IDM_CLOSE_FILE + MENUITEM "&Открыть...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Закрыть\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Выход", IDM_EXIT END + POPUP "&Воспроизведение" + BEGIN + MENUITEM "Воспроизведение/&Пауза\tCtrl+P", IDC_PLAY + MENUITEM "&Остановить\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "&Повтор\tCtrl+T", IDM_REPEAT + END + POPUP "&Отображение" + BEGIN + MENUITEM "Одно-оконный &режим", IDM_SWITCHVIEW + END POPUP "&Устройство" BEGIN MENUITEM "&Свойства", IDM_DEVPROPS @@ -21,6 +32,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Все поддерживаемые (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" diff --git a/base/applications/mplay32/lang/sk-SK.rc b/base/applications/mplay32/lang/sk-SK.rc index 9f52f4f0f71..90c391ac977 100644 --- a/base/applications/mplay32/lang/sk-SK.rc +++ b/base/applications/mplay32/lang/sk-SK.rc @@ -9,11 +9,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Súbor" BEGIN - MENUITEM "&Otvoriť...", IDM_OPEN_FILE - MENUITEM "&Zavrieť", IDM_CLOSE_FILE + MENUITEM "&Otvoriť...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Zavrieť\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "S&končiť", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -26,6 +37,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Všetky podporované (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -38,6 +58,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Preskočiť dopredu" IDS_APPTITLE "Multimediálny prehrávač systému ReactOS" IDS_PLAY "Prehrať" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/sq-AL.rc b/base/applications/mplay32/lang/sq-AL.rc index 20d2af13b21..b3a827eceab 100644 --- a/base/applications/mplay32/lang/sq-AL.rc +++ b/base/applications/mplay32/lang/sq-AL.rc @@ -8,11 +8,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Skeda" BEGIN - MENUITEM "&Hape...", IDM_OPEN_FILE - MENUITEM "&Mbylle", IDM_CLOSE_FILE + MENUITEM "&Hape...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Mbylle\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Dil", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -25,6 +36,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Të gjith suportimet (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -37,6 +57,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Kalo para" IDS_APPTITLE "Programi muzikor i ReactOS" IDS_PLAY "Fillo" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/sv-SE.rc b/base/applications/mplay32/lang/sv-SE.rc index dec23858ef3..d7e58aaf248 100644 --- a/base/applications/mplay32/lang/sv-SE.rc +++ b/base/applications/mplay32/lang/sv-SE.rc @@ -11,11 +11,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Arkiv" BEGIN - MENUITEM "&Öppna...", IDM_OPEN_FILE - MENUITEM "&Stäng", IDM_CLOSE_FILE + MENUITEM "&Öppna...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Stäng\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Avsluta", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -28,6 +39,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alla kompaktibla filer (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -40,6 +60,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Spola fremåt" IDS_APPTITLE "ReactOS Multimediaspelare" IDS_PLAY "Play" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/tr-TR.rc b/base/applications/mplay32/lang/tr-TR.rc index e28558a62cd..71b2eb91d66 100644 --- a/base/applications/mplay32/lang/tr-TR.rc +++ b/base/applications/mplay32/lang/tr-TR.rc @@ -6,11 +6,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Kütük" BEGIN - MENUITEM "&Aç...", IDM_OPEN_FILE - MENUITEM "&Kapat", IDM_CLOSE_FILE + MENUITEM "&Aç...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Kapat\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Çıkış", IDM_EXIT END + POPUP "&Oynat" + BEGIN + MENUITEM "&Oynat ya da Duraklat\tCtrl+P", IDC_PLAY + MENUITEM "&Durdur\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "&Yinele\tCtrl+T", IDM_REPEAT + END + POPUP "&Görünüm" + BEGIN + MENUITEM "&Ayrı Pencere Kipi", IDM_SWITCHVIEW + END POPUP "&Aygıt" BEGIN MENUITEM "&Husûsiyetler", IDM_DEVPROPS @@ -23,12 +34,21 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Desteklenen Kütükler (*.wav, *.cda, *.mid, *.midi, *.avi)\0*.wav;*.cda;*.mid;*.midi;*.avi\0" IDS_TOOLTIP_PLAY "Çal" IDS_TOOLTIP_STOP "Durdur" - IDS_TOOLTIP_EJECT "Çıkar" + IDS_TOOLTIP_EJECT "Çıkart" IDS_TOOLTIP_BACKWARD "Bir Öncekine Geç" IDS_TOOLTIP_SEEKBACK "Geri Sar" IDS_TOOLTIP_SEEKFORW "İleri Sar" diff --git a/base/applications/mplay32/lang/uk-UA.rc b/base/applications/mplay32/lang/uk-UA.rc index 724bf0f4faf..54cddbdb12f 100644 --- a/base/applications/mplay32/lang/uk-UA.rc +++ b/base/applications/mplay32/lang/uk-UA.rc @@ -12,11 +12,22 @@ IDR_MAINMENU MENU BEGIN POPUP "&Файл" BEGIN - MENUITEM "&Відкрити...", IDM_OPEN_FILE - MENUITEM "&Закрити", IDM_CLOSE_FILE + MENUITEM "&Відкрити...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "&Закрити\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "&Вихід", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -29,6 +40,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Всі підтримувані (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -41,6 +61,6 @@ BEGIN IDS_TOOLTIP_FORWARD "Вперед" IDS_APPTITLE "Програвач ReactOS" IDS_PLAY "Відтворити" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/zh-CN.rc b/base/applications/mplay32/lang/zh-CN.rc index 3106fc6db1a..ea807241430 100644 --- a/base/applications/mplay32/lang/zh-CN.rc +++ b/base/applications/mplay32/lang/zh-CN.rc @@ -6,11 +6,22 @@ IDR_MAINMENU MENU BEGIN POPUP "文件(&F)" BEGIN - MENUITEM "打开... (&O)", IDM_OPEN_FILE - MENUITEM "关闭(&C)", IDM_CLOSE_FILE + MENUITEM "打开... (&O)\tCtrl+O", IDM_OPEN_FILE + MENUITEM "关闭(&C)\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "退出(&E)", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -23,6 +34,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "所有支持的格式 (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -35,6 +55,6 @@ BEGIN IDS_TOOLTIP_FORWARD "向前跳过" IDS_APPTITLE "ReactOS 多媒体播放器" IDS_PLAY "播放" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/lang/zh-TW.rc b/base/applications/mplay32/lang/zh-TW.rc index 63689ebf776..0a118d88e7d 100644 --- a/base/applications/mplay32/lang/zh-TW.rc +++ b/base/applications/mplay32/lang/zh-TW.rc @@ -12,11 +12,22 @@ IDR_MAINMENU MENU BEGIN POPUP "檔案(&F)" BEGIN - MENUITEM "開啟(&O)...", IDM_OPEN_FILE - MENUITEM "關閉(&C)", IDM_CLOSE_FILE + MENUITEM "開啟(&O)...\tCtrl+O", IDM_OPEN_FILE + MENUITEM "關閉(&C)\tCtrl+W", IDM_CLOSE_FILE MENUITEM SEPARATOR MENUITEM "結束(&E)", IDM_EXIT END + POPUP "&Play" + BEGIN + MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY + MENUITEM "St&op\tCtrl+S", IDC_STOP + MENUITEM SEPARATOR + MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT + END + POPUP "&View" + BEGIN + MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW + END POPUP "&Device" BEGIN MENUITEM "&Properties", IDM_DEVPROPS @@ -29,6 +40,15 @@ BEGIN END END +ID_ACCELERATORS ACCELERATORS +BEGIN + "^O", IDM_OPEN_FILE + "^W", IDM_CLOSE_FILE + "^P", IDC_PLAY + "^S", IDC_STOP + "^T", IDM_REPEAT +END + STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "所有支援格式 (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" @@ -41,6 +61,6 @@ BEGIN IDS_TOOLTIP_FORWARD "快轉" IDS_APPTITLE "ReactOS 多媒體播放器" IDS_PLAY "播放" - IDS_DEFAULTMCIERRMSG "No description is available for this error" + IDS_DEFAULTMCIERRMSG "No description is available for this error." IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END diff --git a/base/applications/mplay32/mplay32.c b/base/applications/mplay32/mplay32.c index 2dbec3ceace..4340686768d 100644 --- a/base/applications/mplay32/mplay32.c +++ b/base/applications/mplay32/mplay32.c @@ -18,7 +18,10 @@ TCHAR szPrevFile[MAX_PATH] = _T("\0"); WORD wDeviceId; BOOL bIsOpened = FALSE; BOOL bIsPaused = FALSE; +BOOL bRepeat = FALSE; +BOOL bIsSingleWindow = FALSE; UINT MaxFilePos = 0; +RECT PrevWindowPos; /* ToolBar Buttons */ @@ -34,9 +37,11 @@ static const TBBUTTON Buttons[] = {TBICON_FORWARD, IDC_FORWARD, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0} }; -void EnableMenuItems(void) +void EnableMenuItems(HWND hwnd) { MCI_GENERIC_PARMS mciGeneric; + MCI_DGV_RECT_PARMS mciVideoRect; + MCI_DGV_WINDOW_PARMSW mciVideoWindow; DWORD dwError; EnableMenuItem(hMainMenu, IDM_CLOSE_FILE, MF_BYCOMMAND | MF_ENABLED); @@ -46,12 +51,56 @@ void EnableMenuItems(void) { EnableMenuItem(hMainMenu, IDM_DEVPROPS, MF_BYCOMMAND | MF_ENABLED); } + + mciVideoWindow.hWnd = hwnd; + + dwError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND | MCI_TEST, (DWORD)(LPSTR)&mciVideoWindow); + if (!dwError) + { + dwError = mciSendCommand(wDeviceId, MCI_WHERE, MCI_DGV_WHERE_SOURCE | MCI_TEST, (DWORD)(LPSTR)&mciVideoRect); + if (!dwError) + { + EnableMenuItem(hMainMenu, IDM_SWITCHVIEW, MF_BYCOMMAND | MF_ENABLED); + } + } } void DisableMenuItems(void) { EnableMenuItem(hMainMenu, IDM_CLOSE_FILE, MF_BYCOMMAND | MF_GRAYED); EnableMenuItem(hMainMenu, IDM_DEVPROPS, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hMainMenu, IDM_SWITCHVIEW, MF_BYCOMMAND | MF_GRAYED); +} + +void ResizeClientArea(HWND hwnd, int nWidth, int nHeight) +{ + RECT rcClientRect; + RECT rcWindowRect; + POINT ptDifference; + + GetClientRect(hwnd, &rcClientRect); + GetWindowRect(hwnd, &rcWindowRect); + ptDifference.x = (rcWindowRect.right - rcWindowRect.left) - rcClientRect.right; + ptDifference.y = (rcWindowRect.bottom - rcWindowRect.top) - rcClientRect.bottom; + MoveWindow(hwnd, rcWindowRect.left, rcWindowRect.top, nWidth + ptDifference.x, nHeight + ptDifference.y, TRUE); +} + +static VOID +ShowLastWin32Error(HWND hwnd) +{ + LPTSTR lpMessageBuffer; + DWORD dwError = GetLastError(); + + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + dwError, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&lpMessageBuffer, + 0, NULL) != 0) + { + MessageBox(hwnd, lpMessageBuffer, szAppTitle, MB_OK | MB_ICONERROR); + if (lpMessageBuffer) LocalFree(lpMessageBuffer); + } } static VOID @@ -60,10 +109,9 @@ SetImageList(HWND hwnd) HIMAGELIST hImageList; hImageList = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR24, 1, 1); - if (!hImageList) { - MessageBox(hwnd, _T("ImageList it is not created!"), NULL, MB_OK); + ShowLastWin32Error(hwnd); return; } @@ -106,7 +154,7 @@ ShowMCIError(HWND hwnd, DWORD dwError) { TCHAR szErrorMessage[256]; TCHAR szTempMessage[300]; - + if (mciGetErrorString(dwError, szErrorMessage, sizeof(szErrorMessage) / sizeof(TCHAR)) == FALSE) { LoadString(hInstance, IDS_DEFAULTMCIERRMSG, szErrorMessage, sizeof(szErrorMessage) / sizeof(TCHAR)); @@ -138,7 +186,7 @@ InitControls(HWND hwnd) NULL); if (!hTrackBar) { - MessageBox(hwnd, _T("TrackBar it is not created!"), NULL, MB_OK); + ShowLastWin32Error(hwnd); return; } @@ -158,7 +206,7 @@ InitControls(HWND hwnd) NULL); if (!hToolBar) { - MessageBox(hwnd, _T("ToolBar it is not created!"), NULL, MB_OK); + ShowLastWin32Error(hwnd); return; } @@ -194,13 +242,84 @@ IsSupportedFileExtension(LPTSTR lpFileName, LPTSTR lpDeviceName, LPDWORD dwSize) return TRUE; } - + RegCloseKey(hKey); } return FALSE; } +static VOID +SwitchViewMode(HWND hwnd) +{ + MCIERROR mciError; + MCI_DGV_RECT_PARMS mciVideoRect; + MCI_DGV_WINDOW_PARMSW mciVideoWindow; + RECT rcToolbarRect; + RECT rcTempRect; + + mciVideoWindow.hWnd = hwnd; + + mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND | MCI_TEST, (DWORD)(LPSTR)&mciVideoWindow); + if (mciError) + { + return; + } + + mciError = mciSendCommand(wDeviceId, MCI_WHERE, MCI_DGV_WHERE_SOURCE | MCI_TEST, (DWORD)(LPSTR)&mciVideoRect); + if (mciError) + { + return; + } + + if (!bIsSingleWindow) + { + GetWindowRect(hwnd, &PrevWindowPos); + + SetParent(hTrackBar, hToolBar); + + mciError = mciSendCommand(wDeviceId, MCI_WHERE, MCI_DGV_WHERE_SOURCE, (DWORD)(LPSTR)&mciVideoRect); + if (mciError) + { + ShowMCIError(hwnd, mciError); + return; + } + + GetWindowRect(hToolBar, &rcToolbarRect); + ResizeClientArea(hwnd, mciVideoRect.rc.right, mciVideoRect.rc.bottom + (rcToolbarRect.bottom - rcToolbarRect.top)); + + mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD)(LPSTR)&mciVideoWindow); + if (mciError) + { + ShowMCIError(hwnd, mciError); + return; + } + + GetWindowRect(hToolBar, &rcTempRect); + MoveWindow(hTrackBar, 180, 0, rcTempRect.right - rcTempRect.left - 180, 25, TRUE); + + CheckMenuItem(hMainMenu, IDM_SWITCHVIEW, MF_BYCOMMAND | MF_CHECKED); + bIsSingleWindow = TRUE; + } + else + { + bIsSingleWindow = FALSE; + CheckMenuItem(hMainMenu, IDM_SWITCHVIEW, MF_BYCOMMAND | MF_UNCHECKED); + + mciVideoWindow.hWnd = MCI_DGV_WINDOW_DEFAULT; + mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD)(LPSTR)&mciVideoWindow); + if (mciError) + { + ShowMCIError(hwnd, mciError); + return; + } + + SetParent(hTrackBar, hwnd); + + MoveWindow(hwnd, PrevWindowPos.left, PrevWindowPos.top, PrevWindowPos.right - PrevWindowPos.left, PrevWindowPos.bottom - PrevWindowPos.top, TRUE); + } +} + static DWORD CloseMciDevice(VOID) { @@ -283,7 +402,7 @@ OpenMciDevice(HWND hwnd, LPTSTR lpType, LPTSTR lpFileName) bIsOpened = TRUE; _tcscpy(szPrevFile, lpFileName); - EnableMenuItems(); + EnableMenuItems(hwnd); return 0; } @@ -295,6 +414,12 @@ StopPlayback(HWND hwnd) { SendMessage(hTrackBar, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) 1); KillTimer(hwnd, IDT_PLAYTIMER); + + if (bIsSingleWindow) + { + SwitchViewMode(hwnd); + } + CloseMciDevice(); } } @@ -421,6 +546,7 @@ VOID CALLBACK PlayTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { MCI_STATUS_PARMS mciStatus; + MCI_PLAY_PARMS mciPlay; DWORD dwPos; if (!bIsOpened) KillTimer(hwnd, IDT_PLAYTIMER); @@ -431,7 +557,16 @@ PlayTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) if((UINT)dwPos >= MaxFilePos) { - StopPlayback(hwnd); + if (!bRepeat) + { + StopPlayback(hwnd); + } + else + { + mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); + mciPlay.dwCallback = (DWORD_PTR)hwnd; + mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY, (DWORD_PTR)&mciPlay); + } } else { @@ -477,6 +612,11 @@ PlayFile(HWND hwnd, LPTSTR lpFileName) return; } + if (bIsOpened) + { + StopPlayback(hwnd); + } + mciError = OpenMciDevice(hwnd, szDeviceName, szLocalFileName); if (mciError != 0) { @@ -537,15 +677,17 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) switch (Message) { case WM_CREATE: + { InitControls(hwnd); hMainMenu = GetMenu(hwnd); break; + } case WM_DROPFILES: { HDROP drophandle; TCHAR droppedfile[MAX_PATH]; - + drophandle = (HDROP)wParam; DragQueryFile(drophandle, 0, droppedfile, sizeof(droppedfile) / sizeof(TCHAR)); DragFinish(drophandle); @@ -568,25 +710,25 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { case IDC_PLAY: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PLAY); - break; + break; case IDC_STOP: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_STOP); - break; + break; case IDC_EJECT: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_EJECT); - break; + break; case IDC_BACKWARD: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_BACKWARD); - break; + break; case IDC_SEEKBACK: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_SEEKBACK); - break; + break; case IDC_SEEKFORW: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_SEEKFORW); - break; + break; case IDC_FORWARD: lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_FORWARD); - break; + break; } break; } @@ -598,12 +740,14 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { LPRECT pRect = (LPRECT)lParam; - if (pRect->right - pRect->left < MAIN_WINDOW_MIN_WIDTH) - pRect->right = pRect->left + MAIN_WINDOW_MIN_WIDTH; - - if (pRect->bottom - pRect->top != MAIN_WINDOW_HEIGHT) - pRect->bottom = pRect->top + MAIN_WINDOW_HEIGHT; + if (!bIsSingleWindow) + { + if (pRect->right - pRect->left < MAIN_WINDOW_MIN_WIDTH) + pRect->right = pRect->left + MAIN_WINDOW_MIN_WIDTH; + if (pRect->bottom - pRect->top != MAIN_WINDOW_HEIGHT) + pRect->bottom = pRect->top + MAIN_WINDOW_HEIGHT; + } return TRUE; } @@ -611,14 +755,33 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { RECT Rect; UINT Size; + RECT ToolbarRect; + MCI_DGV_PUT_PARMS mciPut; if (hToolBar && hTrackBar) { SendMessage(hToolBar, TB_AUTOSIZE, 0, 0); SendMessage(hToolBar, TB_GETITEMRECT, 1, (LPARAM)&Rect); - Size = GetSystemMetrics(SM_CYMENU) + Rect.bottom; - MoveWindow(hTrackBar, 0, 0, LOWORD(lParam), HIWORD(lParam) - Size, TRUE); + if (!bIsSingleWindow) + { + Size = GetSystemMetrics(SM_CYMENU) + Rect.bottom; + MoveWindow(hTrackBar, 0, 0, LOWORD(lParam), HIWORD(lParam) - Size, TRUE); + } + else + { + MoveWindow(hTrackBar, 180, 0, LOWORD(lParam) - 180, 25, TRUE); + + GetClientRect(hwnd, &Rect); + GetClientRect(hToolBar, &ToolbarRect); + + mciPut.rc.top = 0; + mciPut.rc.left = 0; + mciPut.rc.right = Rect.right; + mciPut.rc.bottom = Rect.bottom - (ToolbarRect.bottom - ToolbarRect.top) - 2; + + mciSendCommand(wDeviceId, MCI_PUT, MCI_DGV_PUT_DESTINATION | MCI_DGV_RECT | MCI_WAIT, (DWORD)&mciPut); + } } return 0L; } @@ -640,10 +803,21 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) } break; + case WM_NCLBUTTONDBLCLK: + { + if (wParam == HTCAPTION) + { + SwitchViewMode(hwnd); + } + } + break; + case WM_COMMAND: + { switch (LOWORD(wParam)) { case IDC_PLAY: + { if (bIsOpened) { if (bIsPaused) @@ -659,6 +833,7 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) PlayFile(hwnd, NULL); } break; + } case IDC_STOP: StopPlayback(hwnd); @@ -690,26 +865,47 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) _tcscpy(szPrevFile, _T("\0")); break; + case IDM_REPEAT: + { + if (!bRepeat) + { + CheckMenuItem(hMainMenu, IDM_REPEAT, MF_BYCOMMAND | MF_CHECKED); + bRepeat = TRUE; + } + else + { + CheckMenuItem(hMainMenu, IDM_REPEAT, MF_BYCOMMAND | MF_UNCHECKED); + bRepeat = FALSE; + } + break; + } + + case IDM_SWITCHVIEW: + SwitchViewMode(hwnd); + break; + case IDM_DEVPROPS: ShowDeviceProperties(hwnd); break; - + case IDM_VOLUMECTL: ShellExecute(hwnd, NULL, _T("SNDVOL32.EXE"), NULL, NULL, SW_SHOWNORMAL); break; case IDM_ABOUT: - { + { HICON mplayIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN)); ShellAbout(hwnd, szAppTitle, 0, mplayIcon); - DeleteObject(mplayIcon); + DeleteObject(mplayIcon); break; - } + } + case IDM_EXIT: PostMessage(hwnd, WM_CLOSE, 0, 0); return 0; } break; + } case WM_DESTROY: StopPlayback(hwnd); @@ -728,6 +924,7 @@ _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow) HWND hwnd; MSG msg; DWORD dwError; + HANDLE hAccel; hInstance = hInst; @@ -743,7 +940,11 @@ _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow) WndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); WndClass.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU); - RegisterClassEx(&WndClass); + if (!RegisterClassEx(&WndClass)) + { + ShowLastWin32Error(NULL); + return 0; + } hwnd = CreateWindow(szClassName, szAppTitle, @@ -756,6 +957,13 @@ _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow) NULL, hInstance, NULL); + if (!hwnd) + { + ShowLastWin32Error(NULL); + return 0; + } + + hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(ID_ACCELERATORS)); DragAcceptFiles(hwnd, TRUE); @@ -776,9 +984,14 @@ _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow) /* Message Loop */ while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); + if (!TranslateAccelerator(hwnd, hAccel, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } } - return 0; + DestroyAcceleratorTable(hAccel); + + return (INT)msg.wParam; } diff --git a/base/applications/mplay32/resource.h b/base/applications/mplay32/resource.h index 19c6d3eac3f..8daa16a4b5e 100644 --- a/base/applications/mplay32/resource.h +++ b/base/applications/mplay32/resource.h @@ -30,6 +30,9 @@ /* Menu */ #define IDR_MAINMENU 500 +/* Accelerators */ +#define ID_ACCELERATORS 800 + /* Menu items */ #define IDM_OPEN_FILE 1000 #define IDM_CLOSE_FILE 1001 @@ -37,6 +40,8 @@ #define IDM_ABOUT 1003 #define IDM_VOLUMECTL 1004 #define IDM_DEVPROPS 1005 +#define IDM_REPEAT 1006 +#define IDM_SWITCHVIEW 1007 /* ToolBar Icons */ #define TBICON_PLAY 0 diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index e44b35357c2..18fa1485435 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "resource.h" @@ -202,7 +203,7 @@ BOOL GetEventMessageFileDLL(IN LPCWSTR lpLogName, IN LPCWSTR SourceName, IN LPCWSTR EntryName, - OUT LPWSTR ExpandedName) + OUT PWCHAR ExpandedName) { DWORD dwSize; BYTE szModuleName[MAX_PATH]; @@ -211,8 +212,8 @@ GetEventMessageFileDLL(IN LPCWSTR lpLogName, HKEY hSourceKey = NULL; BOOL bReturn = FALSE; - wcscpy(szKeyName, L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\"); - wcscat(szKeyName, lpLogName); + StringCbCopyW(szKeyName, sizeof(szKeyName), L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\"); + StringCbCatW(szKeyName, sizeof(szKeyName), lpLogName); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szKeyName, @@ -261,7 +262,7 @@ BOOL GetEventCategory(IN LPCWSTR KeyName, IN LPCWSTR SourceName, IN EVENTLOGRECORD *pevlr, - OUT LPWSTR CategoryName) + OUT PWCHAR CategoryName) { HANDLE hLibrary = NULL; WCHAR szMessageDLL[MAX_PATH]; @@ -287,7 +288,7 @@ GetEventCategory(IN LPCWSTR KeyName, TrimNulls(lpMsgBuf); /* Copy the category name */ - wcscpy(CategoryName, lpMsgBuf); + StringCchCopyW(CategoryName, MAX_PATH, lpMsgBuf); } else { @@ -315,7 +316,7 @@ BOOL GetEventMessage(IN LPCWSTR KeyName, IN LPCWSTR SourceName, IN EVENTLOGRECORD *pevlr, - OUT LPWSTR EventText) + OUT PWCHAR EventText) { DWORD i; HANDLE hLibrary = NULL; @@ -394,7 +395,7 @@ GetEventMessage(IN LPCWSTR KeyName, TrimNulls((LPWSTR)lpMsgBuf); /* Copy the event text */ - wcscpy(EventText ,lpMsgBuf); + StringCchCopyW(EventText, EVENT_MESSAGE_EVENTTEXT_BUFFER, lpMsgBuf); } } @@ -405,7 +406,7 @@ GetEventMessage(IN LPCWSTR KeyName, if (!bDone) { LoadStringW(hInst, IDS_EVENTSTRINGIDNOTFOUND, szStringIDNotFound, MAX_LOADSTRING); - swprintf(EventText, szStringIDNotFound, (pevlr->EventID & 0xFFFF), SourceName); + StringCchPrintfW(EventText, EVENT_MESSAGE_EVENTTEXT_BUFFER, szStringIDNotFound, (pevlr->EventID & 0xFFFF), SourceName); } free(szArguments); @@ -415,7 +416,7 @@ GetEventMessage(IN LPCWSTR KeyName, } LoadStringW(hInst, IDS_EVENTSTRINGIDNOTFOUND, szStringIDNotFound, MAX_LOADSTRING); - swprintf(EventText, szStringIDNotFound, (pevlr->EventID & 0xFFFF), SourceName); + StringCchPrintfW(EventText, EVENT_MESSAGE_EVENTTEXT_BUFFER, szStringIDNotFound, (pevlr->EventID & 0xFFFF), SourceName); return FALSE; } @@ -423,7 +424,7 @@ GetEventMessage(IN LPCWSTR KeyName, VOID GetEventType(IN WORD dwEventType, - OUT LPWSTR eventTypeText) + OUT PWCHAR eventTypeText) { switch (dwEventType) { @@ -453,7 +454,7 @@ GetEventType(IN WORD dwEventType, BOOL GetEventUserName(EVENTLOGRECORD *pelr, - OUT LPWSTR pszUser) + OUT PWCHAR pszUser) { PSID lpSid; WCHAR szName[1024]; @@ -476,7 +477,7 @@ GetEventUserName(EVENTLOGRECORD *pelr, &cbDomain, &peUse)) { - wcscpy(pszUser, szName); + StringCchCopyW(pszUser, MAX_PATH, szName); return TRUE; } } @@ -523,23 +524,24 @@ QueryEventMessages(LPWSTR lpMachineName, HANDLE hEventLog; EVENTLOGRECORD *pevlr; DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 0, dwRecordsToRead = 0, dwFlags, dwMaxLength; + size_t cchRemaining; LPWSTR lpSourceName; LPWSTR lpComputerName; LPSTR lpData; BOOL bResult = TRUE; /* Read succeeded. */ - int i; WCHAR szWindowTitle[MAX_PATH]; WCHAR szStatusText[MAX_PATH]; WCHAR szLocalDate[MAX_PATH]; WCHAR szLocalTime[MAX_PATH]; WCHAR szEventID[MAX_PATH]; - WCHAR szEventTypeText[MAX_PATH]; + WCHAR szEventTypeText[MAX_LOADSTRING]; WCHAR szCategoryID[MAX_PATH]; WCHAR szUsername[MAX_PATH]; WCHAR szEventText[EVENT_MESSAGE_FILE_BUFFER]; WCHAR szCategory[MAX_PATH]; WCHAR szData[MAX_PATH]; + PWCHAR lpTitleTemplateEnd; SYSTEMTIME time; LVITEMW lviEventItem; @@ -649,8 +651,8 @@ QueryEventMessages(LPWSTR lpMachineName, GetEventType(pevlr->EventType, szEventTypeText); GetEventCategory(lpLogName, lpSourceName, pevlr, szCategory); - swprintf(szEventID, L"%u", (pevlr->EventID & 0xFFFF)); - swprintf(szCategoryID, L"%u", pevlr->EventCategory); + StringCbPrintfW(szEventID, sizeof(szEventID), L"%u", (pevlr->EventID & 0xFFFF)); + StringCbPrintfW(szCategoryID, sizeof(szCategoryID), L"%u", pevlr->EventCategory); lviEventItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM; lviEventItem.iItem = 0; @@ -713,16 +715,20 @@ QueryEventMessages(LPWSTR lpMachineName, // All events loaded EndDialog(hwndDlg, 0); - - i = swprintf(szWindowTitle, szTitleTemplate, szTitle, lpLogName); /* i = number of characters written */ + StringCchPrintfExW(szWindowTitle, + sizeof(szWindowTitle) / sizeof(WCHAR), + &lpTitleTemplateEnd, + &cchRemaining, + 0, + szTitleTemplate, szTitle, lpLogName); /* i = number of characters written */ /* lpComputerName can be NULL here if no records was read */ - dwMaxLength = sizeof(szWindowTitle) / sizeof(WCHAR) - i; - if(!lpComputerName) - GetComputerNameW(szWindowTitle+i, &dwMaxLength); + dwMaxLength = cchRemaining; + if (!lpComputerName) + GetComputerNameW(lpTitleTemplateEnd, &dwMaxLength); else - _snwprintf(szWindowTitle+i, dwMaxLength, L"%s", lpComputerName); + StringCchCopyW(lpTitleTemplateEnd, dwMaxLength, lpComputerName); - swprintf(szStatusText, szStatusBarTemplate, lpLogName, dwTotalRecords); + StringCbPrintfW(szStatusText, sizeof(szStatusText), szStatusBarTemplate, lpLogName, dwTotalRecords); // Update the status bar SendMessageW(hwndStatus, SB_SETTEXT, (WPARAM)0, (LPARAM)szStatusText); @@ -863,22 +869,24 @@ MyRegisterClass(HINSTANCE hInstance) VOID -GetDisplayNameFile(LPCWSTR lpLogName, LPWSTR lpModuleName) +GetDisplayNameFile(IN LPCWSTR lpLogName, + OUT PWCHAR lpModuleName) { HKEY hKey; WCHAR *KeyPath; WCHAR szModuleName[MAX_PATH]; - DWORD dwData; + DWORD cbData; + DWORD cbKeyPath; - - KeyPath = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR)); + cbKeyPath = (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR); + KeyPath = HeapAlloc(GetProcessHeap(), 0, cbKeyPath); if (!KeyPath) { return; } - wcscpy(KeyPath, EVENTLOG_BASE_KEY); - wcscat(KeyPath, lpLogName); + StringCbCopyW(KeyPath, cbKeyPath, EVENTLOG_BASE_KEY); + StringCbCatW(KeyPath, cbKeyPath, lpLogName); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS) { @@ -886,9 +894,8 @@ GetDisplayNameFile(LPCWSTR lpLogName, LPWSTR lpModuleName) return; } - dwData = MAX_PATH; - - if (RegQueryValueExW(hKey, L"DisplayNameFile", NULL, NULL, (LPBYTE)szModuleName, &dwData) == ERROR_SUCCESS) + cbData = sizeof(szModuleName); + if (RegQueryValueExW(hKey, L"DisplayNameFile", NULL, NULL, (LPBYTE)szModuleName, &cbData) == ERROR_SUCCESS) { ExpandEnvironmentStringsW(szModuleName, lpModuleName, MAX_PATH); } @@ -899,21 +906,23 @@ GetDisplayNameFile(LPCWSTR lpLogName, LPWSTR lpModuleName) DWORD -GetDisplayNameID(LPCWSTR lpLogName) +GetDisplayNameID(IN LPCWSTR lpLogName) { HKEY hKey; WCHAR *KeyPath; DWORD dwMessageID = 0; - DWORD dwData; + DWORD cbData; + DWORD cbKeyPath; - KeyPath = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR)); + cbKeyPath = (wcslen(EVENTLOG_BASE_KEY) + wcslen(lpLogName) + 1) * sizeof(WCHAR); + KeyPath = HeapAlloc(GetProcessHeap(), 0, cbKeyPath); if (!KeyPath) { return 0; } - wcscpy(KeyPath, EVENTLOG_BASE_KEY); - wcscat(KeyPath, lpLogName); + StringCbCopyW(KeyPath, cbKeyPath, EVENTLOG_BASE_KEY); + StringCbCatW(KeyPath, cbKeyPath, lpLogName); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS) { @@ -921,9 +930,8 @@ GetDisplayNameID(LPCWSTR lpLogName) return 0; } - dwData = sizeof(dwMessageID); - - RegQueryValueExW(hKey, L"DisplayNameID", NULL, NULL, (LPBYTE)&dwMessageID, &dwData); + cbData = sizeof(dwMessageID); + RegQueryValueExW(hKey, L"DisplayNameID", NULL, NULL, (LPBYTE)&dwMessageID, &cbData); RegCloseKey(hKey); HeapFree(GetProcessHeap(), 0, KeyPath); @@ -961,7 +969,7 @@ BuildLogList(void) return; } - LogNames = (WCHAR**)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (dwNumLogs + 1) * sizeof(WCHAR*)); + LogNames = HeapAlloc(GetProcessHeap(), 0, (dwNumLogs + 1) * sizeof(WCHAR*)); if (!LogNames) { diff --git a/base/applications/mscutils/servman/lang/tr-TR.rc b/base/applications/mscutils/servman/lang/tr-TR.rc index 5b290d925f5..2735a12be22 100644 --- a/base/applications/mscutils/servman/lang/tr-TR.rc +++ b/base/applications/mscutils/servman/lang/tr-TR.rc @@ -114,7 +114,7 @@ BEGIN CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 - LTEXT "Birtakım hizmetler, başka hizmetlere, dizge sürücülerine ve yükleme sıra öbeklerine bağımlıdır. Eğer bir dizge bileşeni, durdurulmuşsa ya da düzgün çalışmıyorsa bağımlı hizmetler etkilenebilir.", IDC_STATIC, 8, 7, 238, 26 + LTEXT "Birtakım hizmetler, başka hizmetlere, dizge sürücülerine ve yükleme dizisi öbeklerine bağımlıdır. Eğer bir dizge bileşeni, durdurulmuşsa ya da düzgün çalışmıyorsa bağımlı hizmetler etkilenebilir.", IDC_STATIC, 8, 7, 238, 26 LTEXT "Bu hizmet aşağıdaki bileşenlere bağımlıdır:", IDC_STATIC, 8, 57, 236, 9 LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13 END @@ -241,7 +241,7 @@ END STRINGTABLE BEGIN - IDS_HELP_OPTIONS "OLUŞTURMA SEÇENEKLERİ:\r\nÖNEMLİ: Seçenek adı, eşittir imini kapsar.\r\n type= \r\n (Ön tanımlı = own)\r\n start= \r\n (Ön tanımlı = demand) \r\n error= \r\n (Ön tanımlı = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (Ön tanımlı = LocalSystem)\r\n password= <Şifre>\r\n" + IDS_HELP_OPTIONS "OLUŞTURMA SEÇENEKLERİ:\r\nÖNEMLİ: Seçenek adı, eşittir imini kapsar.\r\n type= \r\n (Ön tanımlı = own)\r\n start= \r\n (Ön tanımlı = demand) \r\n error= \r\n (Ön tanımlı = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (Ön tanımlı = LocalSystem)\r\n password= <Şifre>\r\n" END /* Hints */ diff --git a/base/applications/network/ping/lang/ru-RU.rc b/base/applications/network/ping/lang/ru-RU.rc new file mode 100644 index 00000000000..82e050999d5 --- /dev/null +++ b/base/applications/network/ping/lang/ru-RU.rc @@ -0,0 +1,35 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_USAGE "\nИспользование: ping [-t] [-n <число>] [-l <размер>] [-w <тайм-аут>] конечный_узел\n\n\ +Параметры:\n\ + -t Проверка связи с указанным узлом до прекращения.\n\ + Для прекращения нажмите CTRL+C.\n\ + -n <число> Число отправляемых запросов эха.\n\ + -l <размер> Размер буфера отправки.\n\ + -w <тайм-аут> Тайм-аут для каждого ответа (в миллисекундах)\n\n\0" + + IDS_PING_WITH_BYTES "\nPinging %1 [%2] with %3!d! bytes of data:\n\n\0" + IDS_PING_STATISTICS "\nСтатистика Ping для %1:\n\0" + IDS_PACKETS_SENT_RECEIVED_LOST " Пакетов: отправлено = %1!d!, получено = %2!d!, потеряно = %3!d! (%4!d!%% потерь),\n\0" + IDS_APPROXIMATE_ROUND_TRIP "Приблизительное время приема-передачи в мс:\n\0" + IDS_MIN_MAX_AVERAGE " Минимальное = %1, Максимальное = %2, Среднее = %3\n\0" + IDS_NOT_ENOUGH_RESOURCES "Not enough free resources available.\n\0" + IDS_UNKNOWN_HOST "Unknown host %1.\n\0" + IDS_SETSOCKOPT_FAILED "setsockopt failed (%1!d!).\n\0" + IDS_COULD_NOT_CREATE_SOCKET "Could not create socket (#%1!d!).\n\0" + IDS_COULD_NOT_INIT_WINSOCK "Could not initialize winsock dll.\n\0" + IDS_DEST_MUST_BE_SPECIFIED "Необходимо указать адрес IP.\n\0" + IDS_BAD_PARAMETER "Bad parameter %1.\n\0" + IDS_BAD_OPTION_FORMAT "Bad option format %1.\n\0" + IDS_BAD_OPTION "Bad option %1.\n\0" + IDS_BAD_VALUE_OPTION_L "Недопустимое значение параметра -l, допустимый диапазон с 0 по %1!d!.\n\0" + IDS_REPLY_FROM "Ответ от %1: число байт=%2!d! время%3%4 TTL=%5!d!\n\0" + IDS_DEST_UNREACHABLE "Destination host unreachable.\n\0" + IDS_COULD_NOT_TRANSMIT "Could not transmit data (%1!d!).\n\0" + IDS_COULD_NOT_RECV "Could not receive data (%1!d!).\n\0" + IDS_REQUEST_TIMEOUT "Превышен интервал ожидания для запроса.\n\0" + IDS_MS "мсек\0" + IDS_1MS "1мсек\0" +END diff --git a/base/applications/network/ping/ping.rc b/base/applications/network/ping/ping.rc index 03db47d392e..6f3a9353cc9 100644 --- a/base/applications/network/ping/ping.rc +++ b/base/applications/network/ping/ping.rc @@ -35,6 +35,9 @@ #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif diff --git a/base/applications/rapps/lang/ru-RU.rc b/base/applications/rapps/lang/ru-RU.rc index 339599a8b14..afd0cb3500b 100644 --- a/base/applications/rapps/lang/ru-RU.rc +++ b/base/applications/rapps/lang/ru-RU.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Обновить", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Update Da&tabase", ID_RESETDB + MENUITEM "Обновить &базу данных", ID_RESETDB END POPUP "Справка" BEGIN @@ -48,7 +48,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Обновить", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "Update Da&tabase", ID_RESETDB + MENUITEM "Обновить &базу данных", ID_RESETDB END END diff --git a/base/applications/rapps/rapps/abyss.txt b/base/applications/rapps/rapps/abyss.txt index 83c92f68a24..5085c32717a 100644 --- a/base/applications/rapps/rapps/abyss.txt +++ b/base/applications/rapps/rapps/abyss.txt @@ -41,7 +41,7 @@ Size = 2,1 Mo [Section.041f] Name = Abyss Umûmî Ağ Sunucusu X1 Licence = Ücretsiz -Description = Abyss Umûmî Ağ Sunucusu, bilgisayarınızda Umûmî Ağ sitelerinizin barındırılmasına olanak sağlar. Umûmî Ağ uygulayım biliminin bir geniş yelpâzesinin yanı sıra güvenli SSL/TLS bağlantılarını (HTTPS) destekler. Ayrıca MySQL, SQLite, MS SQL Server, MS Access, ve Oracle gibi veri tabanlarıyla desteklenebilen gelişmiş PHP, Perl, Python, ASP, ASP.NET ve Rails üzerinde Ruby Umûmî Ağ uygulamalarını çalıştırabilir. +Description = Abyss Umûmî Ağ Sunucusu, bilgisayarınızda Umûmî Ağ sitelerinizin barındırılmasına olanak sağlar. Umûmî Ağ uygulayım biliminin bir geniş yelpâzesiyle birlikte güvenli SSL/TLS bağlantılarını (HTTPS) destekler. Ayrıca MySQL, SQLite, MS SQL Server, MS Access, ve Oracle gibi veri tabanlarıyla desteklenebilen gelişmiş PHP, Perl, Python, ASP, ASP.NET ve Rails üzerinde Ruby Umûmî Ağ uygulamalarını çalıştırabilir. Size = 2,1 MB [Section.0422] diff --git a/base/applications/rapps/rapps/ants.txt b/base/applications/rapps/rapps/ants.txt index c39378a108f..dad3be18ecd 100644 --- a/base/applications/rapps/rapps/ants.txt +++ b/base/applications/rapps/rapps/ants.txt @@ -30,5 +30,5 @@ Size = 632 ko [Section.041f] Version = Yok Licence = Ücretsiz -Description = Bir kartlarla izlem oyunu. Kendi kurganınızı yapınız ve rakip kaleyi yıkmaya çalışınız. Kurmak için bir ZIP çıkarma izlencesi gerekir. +Description = Bir kartlarla izlem oyunu. Kendi kurganınızı yapınız ve rakip kaleyi yıkmaya çalışınız. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 632 KB diff --git a/base/applications/rapps/rapps/dvdwritenow.txt b/base/applications/rapps/rapps/dvdwritenow.txt index daf15f10e4a..da913472a05 100644 --- a/base/applications/rapps/rapps/dvdwritenow.txt +++ b/base/applications/rapps/rapps/dvdwritenow.txt @@ -33,5 +33,5 @@ URLSite = http://dwn.alter.org.ua/ru/ [Section.041f] Licence = Ücretsiz -Description = Ücretsiz bir doğrudan CD/DVD kaydedici yazılımı. Kurulduktan sonra CD/DVD RW'lerinizi, USB Flash veyâ çıkarılabilir sâbit disk sürücüleri olarak kullanabilirsiniz. Bununla birlikte UDF kütük dizgesiyle kaydedilmiş CD/DVD RW'lere yazabilirsiniz. Ayrıca Microsoft DVD−ROM'ları, Ahead InCD ile kaydedilmiş RW diskleri gibi başka yazılımlarla oluşturulmuş UDF diskleri okuyabilirsiniz. Kurmak için bir ZIP çıkarma izlencesi gerekir. +Description = Ücretsiz bir doğrudan CD/DVD kaydedici yazılımı. Kurulduktan sonra CD/DVD RW'lerinizi, USB Flash veyâ çıkarılabilir sâbit disk sürücüleri olarak kullanabilirsiniz. Bununla birlikte UDF kütük dizgesiyle kaydedilmiş CD/DVD RW'lere yazabilirsiniz. Ayrıca Microsoft DVD−ROM'ları, Ahead InCD ile kaydedilmiş RW diskleri gibi başka yazılımlarla oluşturulmuş UDF diskleri okuyabilirsiniz. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 1,2 MB diff --git a/base/applications/rapps/rapps/libreoffice.txt b/base/applications/rapps/rapps/libreoffice.txt index be2d68556c9..30af6b1aa78 100644 --- a/base/applications/rapps/rapps/libreoffice.txt +++ b/base/applications/rapps/rapps/libreoffice.txt @@ -36,7 +36,7 @@ Description = O suită office completă, cu surse deschise. Reprezintă o bifurc Size = 209,36 Mo [Section.041f] -Description = Güçlü ve açık kaynak bir büro takımı. OpenOffice'ten çatallanılmıştır. +Description = Güçlü ve açık kaynak bir ofis paketi. OpenOffice'ten çatallanılmıştır. Size = 209,36 MB [Section.0422] diff --git a/base/applications/rapps/rapps/openoffice.txt b/base/applications/rapps/rapps/openoffice.txt index 8f253bcdd64..7a8b9661a0f 100644 --- a/base/applications/rapps/rapps/openoffice.txt +++ b/base/applications/rapps/rapps/openoffice.txt @@ -54,7 +54,7 @@ Size = 136,79 Mo URLSite = http://www.openoffice.org/ro/ [Section.041f] -Description = Bir açık kaynak büro takımı. +Description = Bir açık kaynak ofis paketi. Size = 124,36 MB URLSite = http://www.openoffice.org/tr/ URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/tr/Apache_OpenOffice_4.1.0_Win_x86_install_tr.exe diff --git a/base/applications/rapps/rapps/openoffice2.4.txt b/base/applications/rapps/rapps/openoffice2.4.txt index 6a05f637898..a84fd1ae4aa 100644 --- a/base/applications/rapps/rapps/openoffice2.4.txt +++ b/base/applications/rapps/rapps/openoffice2.4.txt @@ -57,7 +57,7 @@ Size = 113 Mo URLSite = http://www.openoffice.org/ro/ [Section.041f] -Description = Bir açık kaynak büro takımı. +Description = Bir açık kaynak ofis paketi. URLSite = http://www.openoffice.org/tr/ [Section.0422] diff --git a/base/applications/rapps/rapps/reshack.txt b/base/applications/rapps/rapps/reshack.txt index 694d289fb32..c461c41d3fd 100644 --- a/base/applications/rapps/rapps/reshack.txt +++ b/base/applications/rapps/rapps/reshack.txt @@ -29,5 +29,5 @@ Size = 730 ko [Section.041f] Licence = Ücretsiz -Description = Resoure Hacker, 32 ve 64 bitlik Windows çaılştırılabilirlerindeki ve kaynak kütüklerindeki (*.res) kaynakları görüntülemek, değiştirmek, yeniden adlandırmak, eklemek, silmek ve çıkarmak için ücretsiz bir araçtır. +Description = Resoure Hacker, 32 ve 64 bitlik Windows çaılştırılabilirlerindeki ve kaynak kütüklerindeki (*.res) kaynakları görüntülemek, değiştirmek, yeniden adlandırmak, eklemek, silmek ve çıkartmak için ücretsiz bir araçtır. Size = 730 KB diff --git a/base/applications/rapps/rapps/rocks.txt b/base/applications/rapps/rapps/rocks.txt index 6a1416aee0f..e2f09273001 100644 --- a/base/applications/rapps/rapps/rocks.txt +++ b/base/applications/rapps/rapps/rocks.txt @@ -28,5 +28,5 @@ Size = 2,42 Mo [Section.041f] Licence = GPL 2. sürüm -Description = "Boulder Dash" (C64), "Emerald Mine" (Amiga), "Supaplex" (Amiga/PC), "Sokoban" (PC) gelenekleri içinde; UNIX, Mac OS X, Windows ve DOS için atari oyun salonu türünde oyun. Kurmak için bir ZIP çıkarma izlencesi gerekir. +Description = "Boulder Dash" (C64), "Emerald Mine" (Amiga), "Supaplex" (Amiga/PC), "Sokoban" (PC) gelenekleri içinde; UNIX, Mac OS X, Windows ve DOS için atari oyun salonu türünde oyun. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 2,42 MB diff --git a/base/applications/rapps/rapps/rosbe.txt b/base/applications/rapps/rapps/rosbe.txt index acb5093f961..1488f648ccc 100644 --- a/base/applications/rapps/rapps/rosbe.txt +++ b/base/applications/rapps/rapps/rosbe.txt @@ -39,7 +39,7 @@ Description = Permite compilarea surselor ReactOS. Pentru instrucțiuni, consult Size = 28,3 Mo [Section.041f] -Name = ReactOS Derleme Ortamı +Name = ReactOS Yapma Ortamı Description = ReactOS Kaynak Kodları'nı derlemenize olanak sağlar. Daha çok açıklama için ReactOS Wiki'ye bakınız. Size = 28,3 MB diff --git a/base/applications/rapps/rapps/rosbeamd64.txt b/base/applications/rapps/rapps/rosbeamd64.txt index 7666ac51dcd..5b0ee4559d3 100644 --- a/base/applications/rapps/rapps/rosbeamd64.txt +++ b/base/applications/rapps/rapps/rosbeamd64.txt @@ -39,7 +39,7 @@ Description = Permite compilarea surselor ReactOS pentru AMD64. Pentru instrucț Size = 15,83 Mo [Section.041f] -Name = ReactOS Derleme Ortamı AMD64 Eklentisi +Name = ReactOS Yapma Ortamı AMD64 Eklentisi Description = ReactOS AMD64 Kaynak Kodları'nı derlemenize olanak sağlar. Daha çok açıklama için ReactOS Wiki'ye bakınız. Size = 15,83 MB diff --git a/base/applications/rapps/rapps/rosbearm.txt b/base/applications/rapps/rapps/rosbearm.txt index d6dc1acb59e..ca14ebac609 100644 --- a/base/applications/rapps/rapps/rosbearm.txt +++ b/base/applications/rapps/rapps/rosbearm.txt @@ -39,7 +39,7 @@ Description = Permite compilarea surselor ReactOS pentru ARM. Pentru instrucțiu Size = 11,15 Mo [Section.041f] -Name = ReactOS Derleme Ortamı ARM Eklentisi +Name = ReactOS Yapma Ortamı ARM Eklentisi Description = ReactOS ARM Kaynak Kodları'nı derlemenize olanak sağlar. Daha çok açıklama için ReactOS Wiki'ye bakınız. Size = 11,15 MB diff --git a/base/applications/regedit/clb/lang/tr-TR.rc b/base/applications/regedit/clb/lang/tr-TR.rc index 5007bd09564..d2fdd97b8f1 100644 --- a/base/applications/regedit/clb/lang/tr-TR.rc +++ b/base/applications/regedit/clb/lang/tr-TR.rc @@ -10,18 +10,18 @@ BEGIN GROUPBOX "Dikeçli Dizelge Kutusu Biçimleri", -1, 6, 7, 158, 71 CHECKBOX "&Ölçünlü", 1710, 10, 20, 42, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "&Hudut", 1713, 10, 30, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "&Sırala", 1705, 10, 40, 26, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "&Diz", 1705, 10, 40, 26, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "&Bildir", 1706, 10, 50, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "&Dikey Kaydırma Çubuğu", 1707, 10, 60, 64, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "D&ikey Kaydırma Çubuğu", 1707, 10, 60, 64, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "&Çoklu Seçim", -1, 79, 20, 72, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED CHECKBOX "&Genişletilmiş Seçim", -1, 79, 30, 77, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED CHECKBOX "&Açılan Başlıklar", 1714, 79, 40, 68, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "&Esnek Dikeçler", 1715, 79, 50, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP GROUPBOX "Başlıca Biçimler", -1, 6, 80, 158, 34 CHECKBOX "Gö&rünür", 1701, 10, 92, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Ed&ilgin", 1702, 10, 102, 41, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Edi&lgin", 1702, 10, 102, 41, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "Öbe&kleme", 1703, 79, 92, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Sek&me Durağı", 1704, 79, 102, 44, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "&Sekme Durağı", 1704, 79, 102, 44, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "Tamam", IDOK, 37, 125, 40, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "İptal", IDCANCEL, 93, 125, 40, 14, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP CHECKBOX "Ka&ydırmayı Etkinleştir", 1708, 79, 60, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP diff --git a/base/applications/regedit/lang/tr-TR.rc b/base/applications/regedit/lang/tr-TR.rc index d7f12761ab4..e8dbcd76d5f 100644 --- a/base/applications/regedit/lang/tr-TR.rc +++ b/base/applications/regedit/lang/tr-TR.rc @@ -317,7 +317,7 @@ BEGIN IDS_WARNING "Uyarı" IDS_BAD_KEY "Dizin sorgulanamıyor: %s" IDS_BAD_VALUE "Değer sorgulanamıyor: %s" - IDS_UNSUPPORTED_TYPE "Bu türdeki dizinler değiştirilemiyor: %ld" + IDS_UNSUPPORTED_TYPE "Şu türdeki dizinler değiştirilemiyor: %ld" IDS_TOO_BIG_VALUE "Değer çok büyük: %ld" IDS_MULTI_SZ_EMPTY_STRING "REG_MULTI_SZ veri türü boş dizgi içeremez.\nBoş dizgiler dizelgeden silinmiştir." IDS_QUERY_DELETE_KEY_ONE "Bu dizini silmek istediğinizden emin misiniz?" @@ -406,7 +406,7 @@ STRINGTABLE BEGIN IDS_BUSNUMBER "Veri Yolu Numarası" IDS_INTERFACE "Arayüz" - IDS_DMA_CHANNEL "Kanal" + IDS_DMA_CHANNEL "Yol" IDS_DMA_PORT "Giriş" IDS_INTERRUPT_VECTOR "Yöney" IDS_INTERRUPT_LEVEL "Düzey" @@ -440,8 +440,8 @@ BEGIN IDS_BUS_INTERNAL "İç" IDS_BUS_ISA "ISA" IDS_BUS_EISA "EISA" - IDS_BUS_MICROCHANNEL "MikroKanal" - IDS_BUS_TURBOCHANNEL "TurboKanal" + IDS_BUS_MICROCHANNEL "Micro Channel" + IDS_BUS_TURBOCHANNEL "TURBOChannel" IDS_BUS_PCIBUS "PCI" IDS_BUS_VMEBUS "VME" IDS_BUS_NUBUS "Nu Veri Yolu" diff --git a/base/applications/shutdown/lang/ru-RU.rc b/base/applications/shutdown/lang/ru-RU.rc index 2ec5dbc05e2..0851d59de47 100644 --- a/base/applications/shutdown/lang/ru-RU.rc +++ b/base/applications/shutdown/lang/ru-RU.rc @@ -35,38 +35,39 @@ BEGIN Использование: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ [/m \\\\<компьютер>][/t xxx][/d [p|u:]xx:yy [/c ""комментарий""]]\n\ \n\ - Без аргументов или /? Показывает эту справку.\n\ - /i Показать диалог удаленного выключения. Этот параметр должен\n\ - указываться первым.\n\ - /l Выход из системы. (не совместим с параметрами /m или /d.\n\ - /s Выключить комьпьютер.\n\ - /r Перезагрузить компьютер.\n\ - /g Перезагрузить компьютер и перезапустить все зарегистрированные\n\ - приложения.\ - /a Отменить отложенное выключение. Может использоваться только в\n\ + Без аргументов или /? Отображение справки.\n\ + /i Отображение графического интерфейса пользователя.\n\ + Этот параметр должен указываться первым.\n\ + /l Завершение сеанса. Этот параметр нельзя использовать с\n\ + параметрами /m или /d.\n\ + /s Завершение работы компьютера.\n\ + /r Завершение работы и перезагрузка компьютера.\n\ + /g Завершение работы и перезагрузка компьютера. После перезапуска\n\ + системы, запуск всех зарегистрированных приложений..\ + /a Отмена завершения работы системы. Может использоваться только в\n\ течение периода ожидания выключения.\ - /p Выключить локальный компьютер без всяких задержек или \n\ - предупреждений. Может использоваться с параметрами /d или /f.\n\ - /h Перевести локальный компьютер в режим гибернации (""спящий \n\ - режим""). Может использоваться с параметром /f.\n\ - /e Задокументировать причину неожиданного выключения компьютера.\n\ - /m \\\\<компьютер> Удаленный компьютер, на котором выполняется действие.\n\ + /p Немедленное отключение локального компьютера без предупреждения.\n\ + Можно использовать с параметрами /d и /f.\n\ + /h Переключение локального компьютера в режим гибернации.\n\ + Можно использовать с параметром /f.\n\ + /e Указание причины непредвиденного завершения работы компьютера.\n\ + /m \\\\<компьютер> Указание конечного компьютера.\n\ (UNC/IP адрес).\n\ - /t xxx Устанавливает время ожидания до xxx сек. до завершения работы.\n\ - Допустимые значения лежат в отрезке от 0 до 315360000 (10 лет),\n\ + /t xxx Задание задержки в xxx секунд перед завершением работы\n\ + компьютера. Допустимые значения от 0 сек. до 315360000 сек.\n\ По умолчанию значение равно 30.\n\ - /c ""комментарий"" Описание причины выключения или перезагрузки.\n\ - Не более 512 знаков.\n\ - /f Принудительное завершение открытых приложений без предварительного\n\ - уведомления. Если не указаны дополнительные параметры, то этот\n\ + /c ""комментарий"" Комментарий с причиной перезапуска или завершения работы.\n\ + Наибольшая длина - 512 знаков.\n\ + /f Принудительное закрытие запущенных приложений без предупреждения\n\ + пользователей. Если не указаны дополнительные параметры, то этот\n\ параметр также приведет к выходу из системы.\n\ - /d [p|u:]xx:yy Задает код причины выключения или перезагрузки.\n\ - p - показывает, что выключение или перезагрузка запланирована.\n\ - u - показывает, что причина определена пользователем.\n\ - Если не указаны p или u, то выключение или перезагрузка системы не\n\ - запланирована.\ - xx - основной код причины (1 - 255).\n\ - yy - дополнительный код причины (1 - 65535).\n" + /d [p|u:]xx:yy Необходимо указать причину для перезагрузки или выключения.\n\ + ""p"" означает запланированную перезагрузку или завершение работы.\n\ + ""u"" означает, что причина определяется пользователем.\n\ + Если не задано ни ""p"", ни ""u"", перезагрузка или завершение работы\n\ + запланирована.\n\ + xx является основным номером причины (1 - 255).\n\ + yy является вспомогательным номером причины (1 - 65535).\n" IDS_ERROR_SHUTDOWN_REBOOT "ОШИБКА: Нельзя одновременно выключить и перезагрузить компьютер.\n" IDS_ERROR_TIMEOUT "ОШИБКА: Время ожидания %u находится за границами диапазона (0-315360000).\n" @@ -74,7 +75,7 @@ BEGIN IDS_ERROR_LOGOFF "ОШИБКА: Невозможно совершить выход из системы.\n" IDS_ERROR_SHUTDOWN "ОШИБКА: Невозможно выключить систему.\n" IDS_ERROR_RESTART "ОШИБКА: Невозможно перезагрузить систему.\n" - IDS_ERROR_MAX_COMMENT_LENGTH "ОШИБКА: Длина коментария превысила максимальную длину сообщения.\n" + IDS_ERROR_MAX_COMMENT_LENGTH "ОШИБКА: Длина комментария превысила максимальную длину сообщения.\n" IDS_ERROR_HIBERNATE "ОШИБКА: Невозможно отправить систему в режим гибернации (""спящий режим"").\n" IDS_ERROR_HIBERNATE_LOCAL "ОШИБКА: Спящий режим нельзя запустить на удаленном компьютере.\n" IDS_ERROR_HIBERNATE_ENABLED "ОШИБКА: Спящий режим не включен.\n" diff --git a/base/applications/sndrec32/lang/tr-TR.rc b/base/applications/sndrec32/lang/tr-TR.rc index 6d701a28d0a..60782629234 100644 --- a/base/applications/sndrec32/lang/tr-TR.rc +++ b/base/applications/sndrec32/lang/tr-TR.rc @@ -27,7 +27,7 @@ BEGIN MENUITEM "&Aç...", ID_FILE_OPEN MENUITEM "&Kaydet", ID_FILE_SAVE, GRAYED MENUITEM "Ay&rı Kaydet...", ID_FILE_SAVEAS, GRAYED - MENUITEM "&Eski Durumuna Döndür...", ID_FILE_RESTORE, GRAYED + MENUITEM "Y&eniden Yükle...", ID_FILE_RESTORE, GRAYED MENUITEM "&Husûsiyetler", ID_FILE_PROPERTIES MENUITEM SEPARATOR MENUITEM "&Çıkış", ID_FILE_EXIT diff --git a/base/applications/taskmgr/CMakeLists.txt b/base/applications/taskmgr/CMakeLists.txt index f028b0a2ae6..959a1aa6ed8 100644 --- a/base/applications/taskmgr/CMakeLists.txt +++ b/base/applications/taskmgr/CMakeLists.txt @@ -8,16 +8,17 @@ list(APPEND SOURCE debug.c endproc.c graph.c + graphctl.c optnmenu.c perfdata.c perfpage.c priority.c - procpage.c proclist.c + procpage.c run.c - trayicon.c + shutdown.c taskmgr.c - graphctl.c + trayicon.c precomp.h) add_executable(taskmgr ${SOURCE} taskmgr.rc) diff --git a/base/applications/taskmgr/applpage.c b/base/applications/taskmgr/applpage.c index 5eabd19eeb6..ae1927725e3 100644 --- a/base/applications/taskmgr/applpage.c +++ b/base/applications/taskmgr/applpage.c @@ -184,21 +184,21 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) InvalidateRect(hApplicationPageListCtrl, NULL, TRUE); GetClientRect(hApplicationPageEndTaskButton, &rc); - MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); + MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); cx = rc.left + nXDifference; cy = rc.top + nYDifference; SetWindowPos(hApplicationPageEndTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); InvalidateRect(hApplicationPageEndTaskButton, NULL, TRUE); GetClientRect(hApplicationPageSwitchToButton, &rc); - MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); + MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); cx = rc.left + nXDifference; cy = rc.top + nYDifference; SetWindowPos(hApplicationPageSwitchToButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); InvalidateRect(hApplicationPageSwitchToButton, NULL, TRUE); GetClientRect(hApplicationPageNewTaskButton, &rc); - MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); + MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); cx = rc.left + nXDifference; cy = rc.top + nYDifference; SetWindowPos(hApplicationPageNewTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); @@ -332,12 +332,10 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) WCHAR szText[260]; BOOL bLargeIcon; BOOL bHung = FALSE; - HICON* xhIcon = (HICON*)&hIcon; typedef int (FAR __stdcall *IsHungAppWindowProc)(HWND); IsHungAppWindowProc IsHungAppWindow; - /* Skip our window */ if (hWnd == hMainWnd) return TRUE; @@ -357,20 +355,21 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) } noApps = FALSE; + /* Get the icon for this window */ hIcon = NULL; - SendMessageTimeoutW(hWnd, WM_GETICON,bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/, 0, 0, 1000, (PDWORD_PTR)xhIcon); - + SendMessageTimeoutW(hWnd, WM_GETICON, bLargeIcon ? ICON_BIG : ICON_SMALL, 0, 0, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) { + /* We failed, try to retrieve other icons... */ hIcon = (HICON)(LONG_PTR)GetClassLongPtrW(hWnd, bLargeIcon ? GCL_HICON : GCL_HICONSM); if (!hIcon) hIcon = (HICON)(LONG_PTR)GetClassLongPtrW(hWnd, bLargeIcon ? GCL_HICONSM : GCL_HICON); - if (!hIcon) SendMessageTimeoutW(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)xhIcon); - if (!hIcon) SendMessageTimeoutW(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)xhIcon); - } + if (!hIcon) SendMessageTimeoutW(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon); + if (!hIcon) SendMessageTimeoutW(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL : ICON_BIG, 0, 0, 1000, (PDWORD_PTR)&hIcon); - if (!hIcon) - hIcon = LoadIconW(hInst, bLargeIcon ? MAKEINTRESOURCEW(IDI_WINDOW) : MAKEINTRESOURCEW(IDI_WINDOWSM)); + /* If we still do not have any icon, load the default one */ + if (!hIcon) hIcon = LoadIconW(hInst, bLargeIcon ? MAKEINTRESOURCEW(IDI_WINDOW) : MAKEINTRESOURCEW(IDI_WINDOWSM)); + } bHung = FALSE; @@ -555,11 +554,11 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam) { if (pAPLI->bHung) { - LoadStringW( GetModuleHandleW(NULL), IDS_Not_Responding , szMsg, sizeof(szMsg) / sizeof(szMsg[0])); + LoadStringW( GetModuleHandleW(NULL), IDS_NOT_RESPONDING , szMsg, sizeof(szMsg) / sizeof(szMsg[0])); } else { - LoadStringW( GetModuleHandleW(NULL), IDS_Running, (LPWSTR) szMsg, sizeof(szMsg) / sizeof(szMsg[0])); + LoadStringW( GetModuleHandleW(NULL), IDS_RUNNING, (LPWSTR) szMsg, sizeof(szMsg) / sizeof(szMsg[0])); } wcsncpy(pnmdi->item.pszText, szMsg, pnmdi->item.cchTextMax); } diff --git a/base/applications/taskmgr/lang/bg-BG.rc b/base/applications/taskmgr/lang/bg-BG.rc index 236cebee756..0c5377e4b0c 100644 --- a/base/applications/taskmgr/lang/bg-BG.rc +++ b/base/applications/taskmgr/lang/bg-BG.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "На&дипляне", ID_WINDOWS_CASCADE MENUITEM "Изваждане &отпред ", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "Помо&щ" BEGIN MENUITEM "Съдържание на помо&щта за задачния управител", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Заета памет: %dK / %dK" IDS_STATUS_CPUUSAGE "Заетост на ЦПУ: %3d%%" IDS_STATUS_PROCESSES "Действия: %d" - IDS_Not_Responding "Не отговаря" - IDS_Running "Работи" + IDS_NOT_RESPONDING "Не отговаря" + IDS_RUNNING "Работи" END diff --git a/base/applications/taskmgr/lang/cs-CZ.rc b/base/applications/taskmgr/lang/cs-CZ.rc index bf483bce679..518b9fe851e 100644 --- a/base/applications/taskmgr/lang/cs-CZ.rc +++ b/base/applications/taskmgr/lang/cs-CZ.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE MENUITEM "&Přenést do popředí", ID_WINDOWS_BRINGTOFRONT END + POPUP "Vy&pnout" + BEGIN + MENUITEM "Režim &spánku", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernace", ID_SHUTDOWN_HIBERNATE + MENUITEM "&Vypnout", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restartovat", ID_SHUTDOWN_REBOOT + MENUITEM "&Odhlásit uživatele %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Přepnout uživatele\tWin+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "&Zamknout počítač\tWin+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "O&dpojit se", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "Vy&jmout počítač", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Nápověda" BEGIN MENUITEM "&Nápověda pro správce úloh", ID_HELP_TOPICS @@ -160,7 +172,7 @@ BEGIN LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 7, 7, 233, 177 PUSHBUTTON "&Ukončit proces", IDC_ENDPROCESS, 171, 189, 69, 14 CONTROL "&Zobrazit procesy všech uživatelů", IDC_SHOWALLPROCESSES, "Button", - BS_AUTOCHECKBOX | WS_TABSTOP, 7, 191, 120, 10 + BS_AUTOCHECKBOX | WS_TABSTOP, 7, 191, 153, 10 END /* IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 */ @@ -194,7 +206,7 @@ BEGIN ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Celkem", IDS_PHYSICAL_MEMORY_TOTAL, 137, 131, 27, 8 LTEXT "Dostupná", IDS_PHYSICAL_MEMORY_AVAILABLE, 137, 140, 30, 8 - LTEXT "Mezipaměť", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 46, 8 + LTEXT "Mezipaměť", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 80, 8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL, 185, 131, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE, 185, 140, 48, 8, ES_RIGHT | ES_READONLY | @@ -202,8 +214,8 @@ BEGIN EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE, 185, 149, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Celkem", IDS_KERNEL_MEMORY_TOTAL, 137, 174, 27, 8 - LTEXT "Stránkováno", IDS_KERNEL_MEMORY_PAGED, 137, 184, 42, 8 - LTEXT "Nestránkováno", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 50, 8 + LTEXT "Stránkováno", IDS_KERNEL_MEMORY_PAGED, 137, 184, 80, 8 + LTEXT "Nestránkováno", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 80, 8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL, 185, 174, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED, 185, 184, 48, 8, ES_RIGHT | ES_READONLY | @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Využití paměti: %dK / %dK" IDS_STATUS_CPUUSAGE "Využití CPU: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" - IDS_Not_Responding "Neodpovídá" - IDS_Running "Běží" + IDS_NOT_RESPONDING "Neodpovídá" + IDS_RUNNING "Běží" END diff --git a/base/applications/taskmgr/lang/da-DK.rc b/base/applications/taskmgr/lang/da-DK.rc index b10b2efc552..e3ef07a3e32 100644 --- a/base/applications/taskmgr/lang/da-DK.rc +++ b/base/applications/taskmgr/lang/da-DK.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring til front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Hjælp" BEGIN MENUITEM "Opgavestyring &Hjælpe Emner", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" - IDS_Not_Responding "Not Responding" - IDS_Running "Running" + IDS_NOT_RESPONDING "Not Responding" + IDS_RUNNING "Running" END diff --git a/base/applications/taskmgr/lang/de-DE.rc b/base/applications/taskmgr/lang/de-DE.rc index 448e4720179..8365434242a 100644 --- a/base/applications/taskmgr/lang/de-DE.rc +++ b/base/applications/taskmgr/lang/de-DE.rc @@ -8,14 +8,14 @@ BEGIN BEGIN MENUITEM "&Neuer Task (Ausführen...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Beenden", ID_FILE_EXIT + MENUITEM "&Beenden", ID_FILE_EXIT END POPUP "&Optionen" BEGIN MENUITEM "&Immer im Vordergrund", ID_OPTIONS_ALWAYSONTOP, CHECKED MENUITEM "&Nach Programmstart minimieren", ID_OPTIONS_MINIMIZEONUSE, CHECKED MENUITEM "&Ausblenden, wenn minimiert", ID_OPTIONS_HIDEWHENMINIMIZED, CHECKED - MENUITEM "&16-bit Tasks anzeigen", ID_OPTIONS_SHOW16BITTASKS, CHECKED + MENUITEM "&16-Bit-Tasks anzeigen", ID_OPTIONS_SHOW16BITTASKS, CHECKED END POPUP "&Ansicht" BEGIN @@ -39,7 +39,7 @@ BEGIN END MENUITEM "K&ernel-Zeiten anzeigen", ID_VIEW_SHOWKERNELTIMES END - POPUP "F&enster" + POPUP "&Fenster" BEGIN MENUITEM "&Untereinander", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Nebeneinander", ID_WINDOWS_TILEVERTICALLY @@ -48,9 +48,21 @@ BEGIN MENUITEM "Übe&rlappend", ID_WINDOWS_CASCADE MENUITEM "&In Vordergrund", ID_WINDOWS_BRINGTOFRONT END + POPUP "&Herunterfahren" + BEGIN + MENUITEM "&Standby", ID_SHUTDOWN_STANDBY + MENUITEM "&Ruhezustand", ID_SHUTDOWN_HIBERNATE + MENUITEM "&Ausschalten", ID_SHUTDOWN_POWEROFF + MENUITEM "&Neu starten", ID_SHUTDOWN_REBOOT + MENUITEM "%s ab&melden", ID_SHUTDOWN_LOGOFF + MENUITEM "&Benutzer wechseln\tWindows-Taste+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "&Computer sperren\tWindows-Taste+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Trennen", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "C&omputer abdocken", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&?" BEGIN - MENUITEM "&Hilfethemen", ID_HELP_TOPICS + MENUITEM "&Hilfethemen\tF1", ID_HELP_TOPICS MENUITEM SEPARATOR MENUITEM "Inf&o", ID_HELP_ABOUT END @@ -73,7 +85,7 @@ BEGIN MENUITEM "&Neuer Task (Ausführen...)", ID_FILE_NEW MENUITEM SEPARATOR MENUITEM "&Große Symbole", ID_VIEW_LARGE - MENUITEM "K&leine Symbole", ID_VIEW_SMALL + MENUITEM "&Kleine Symbole", ID_VIEW_SMALL MENUITEM "&Details", ID_VIEW_DETAILS, CHECKED END END @@ -89,7 +101,7 @@ BEGIN MENUITEM "&Nebeneinander", ID_WINDOWS_TILEVERTICALLY MENUITEM "&Minimieren", ID_WINDOWS_MINIMIZE MENUITEM "Ma&ximieren", ID_WINDOWS_MAXIMIZE - MENUITEM "Übe&rlappend", ID_WINDOWS_CASCADE + MENUITEM "Ü&berlappend", ID_WINDOWS_CASCADE MENUITEM SEPARATOR MENUITEM "&Task beenden", ID_APPLICATION_PAGE_ENDTASK MENUITEM "&Zu Prozess wechseln", ID_APPLICATION_PAGE_GOTOPROCESS @@ -101,9 +113,9 @@ BEGIN POPUP "DUMMY" BEGIN MENUITEM "&Wiederherstellen", ID_RESTORE - MENUITEM "&Schließen", ID_FILE_EXIT + MENUITEM "S&chließen", ID_FILE_EXIT MENUITEM SEPARATOR - MENUITEM "&Immer im Vordergrund", ID_OPTIONS_ALWAYSONTOP + MENUITEM "Immer im &Vordergrund", ID_OPTIONS_ALWAYSONTOP END END @@ -115,7 +127,7 @@ BEGIN MENUITEM "Pr&ozessstruktur beenden", ID_PROCESS_PAGE_ENDPROCESSTREE MENUITEM "&Debuggen", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR - POPUP "Pr&iorität festlegen" + POPUP "P&riorität festlegen" BEGIN MENUITEM "&Echtzeit", ID_PROCESS_PAGE_SETPRIORITY_REALTIME MENUITEM "&Hoch", ID_PROCESS_PAGE_SETPRIORITY_HIGH @@ -387,9 +399,9 @@ BEGIN IDS_TAB_PAGEFAULT "Seitenfehler" IDS_TAB_PFDELTA "Maximale Seitenfehler" IDS_TAB_VMSIZE "Virtuelle Arbeitsspeichergröße" - IDS_TAB_PAGEDPOOL "Paged Pool" - IDS_TAB_NPPOOL "NP Pool" - IDS_TAB_BASEPRI "Basispri" + IDS_TAB_PAGEDPOOL "Ausgelagerter Pool" + IDS_TAB_NPPOOL "Nichtausgelagerter Pool" + IDS_TAB_BASEPRI "Basispriorität" IDS_TAB_HANDLES "Handleanzahl" IDS_TAB_THREADS "Threadanzahl" IDS_TAB_USERPBJECTS "Benutzer-Objekte" @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "zugesicherter Speicher: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU-Auslastung: %3d%%" IDS_STATUS_PROCESSES "Prozesse: %d" - IDS_Not_Responding "Keine Rückmeldung" - IDS_Running "Wird ausgeführt" + IDS_NOT_RESPONDING "Keine Rückmeldung" + IDS_RUNNING "Wird ausgeführt" END diff --git a/base/applications/taskmgr/lang/el-GR.rc b/base/applications/taskmgr/lang/el-GR.rc index c145bd1e432..0f4d87ea3ba 100644 --- a/base/applications/taskmgr/lang/el-GR.rc +++ b/base/applications/taskmgr/lang/el-GR.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Βοήθεια" BEGIN MENUITEM "Θέματα &Βοήθειας του Διαχειριστή Διεργασιών", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" - IDS_Not_Responding "Not Responding" - IDS_Running "Running" + IDS_NOT_RESPONDING "Not Responding" + IDS_RUNNING "Running" END diff --git a/base/applications/taskmgr/lang/en-US.rc b/base/applications/taskmgr/lang/en-US.rc index 0eb7ff3fb74..920992df94c 100644 --- a/base/applications/taskmgr/lang/en-US.rc +++ b/base/applications/taskmgr/lang/en-US.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Help" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS @@ -422,6 +434,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" - IDS_Not_Responding "Not Responding" - IDS_Running "Running" + IDS_NOT_RESPONDING "Not Responding" + IDS_RUNNING "Running" END diff --git a/base/applications/taskmgr/lang/es-ES.rc b/base/applications/taskmgr/lang/es-ES.rc index 4d20d945b0f..06114b28f2f 100644 --- a/base/applications/taskmgr/lang/es-ES.rc +++ b/base/applications/taskmgr/lang/es-ES.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Cascada", ID_WINDOWS_CASCADE MENUITEM "&Traer al Frente", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "A&yuda" BEGIN MENUITEM "&Temas de Ayuda del Administrador de Tareas", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Uso Memoria: %dK / %dK" IDS_STATUS_CPUUSAGE "Uso CPU: %3d%%" IDS_STATUS_PROCESSES "Procesos: %d" - IDS_Not_Responding "No Responde" - IDS_Running "Funcionando" + IDS_NOT_RESPONDING "No Responde" + IDS_RUNNING "Funcionando" END diff --git a/base/applications/taskmgr/lang/fr-FR.rc b/base/applications/taskmgr/lang/fr-FR.rc index f1d582cb4e0..aa453bd5439 100644 --- a/base/applications/taskmgr/lang/fr-FR.rc +++ b/base/applications/taskmgr/lang/fr-FR.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "Mettre au &premier plan", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Aide" BEGIN MENUITEM "&Rubriques d'aide du Gestionnaire des tâches", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Fichier d'échange utilisé : %dK / %dK" IDS_STATUS_CPUUSAGE "UC utilisée : %3d%%" IDS_STATUS_PROCESSES "Processus : %d" - IDS_Not_Responding "Ne répond pas" - IDS_Running "En cours d'exécution" + IDS_NOT_RESPONDING "Ne répond pas" + IDS_RUNNING "En cours d'exécution" END diff --git a/base/applications/taskmgr/lang/he-IL.rc b/base/applications/taskmgr/lang/he-IL.rc index 27e3febd619..2a706d12a91 100644 --- a/base/applications/taskmgr/lang/he-IL.rc +++ b/base/applications/taskmgr/lang/he-IL.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "מדורג", ID_WINDOWS_CASCADE MENUITEM "ה&בא לפנים", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&עזרה" BEGIN MENUITEM "&נושאי עזרה של מנהל המשימות", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" - IDS_Not_Responding "Not Responding" - IDS_Running "Running" + IDS_NOT_RESPONDING "Not Responding" + IDS_RUNNING "Running" END diff --git a/base/applications/taskmgr/lang/hu-HU.rc b/base/applications/taskmgr/lang/hu-HU.rc index a59a07e2fef..896f2d51464 100644 --- a/base/applications/taskmgr/lang/hu-HU.rc +++ b/base/applications/taskmgr/lang/hu-HU.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Lépcsõzetes rendezés", ID_WINDOWS_CASCADE MENUITEM "&Elõtérbe helyezés", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Súgó" BEGIN MENUITEM "&Témakörök", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Mem használat: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU használat: %3d%%" IDS_STATUS_PROCESSES "Folyamatok: %d" - IDS_Not_Responding "Nem válaszol" - IDS_Running "Fut" + IDS_NOT_RESPONDING "Nem válaszol" + IDS_RUNNING "Fut" END diff --git a/base/applications/taskmgr/lang/id-ID.rc b/base/applications/taskmgr/lang/id-ID.rc index f362405c815..2c7f9740f6e 100644 --- a/base/applications/taskmgr/lang/id-ID.rc +++ b/base/applications/taskmgr/lang/id-ID.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Cascade", ID_WINDOWS_CASCADE MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Help" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Pemakaian Mem: %dK / %dK" IDS_STATUS_CPUUSAGE "Pemakaian CPU: %3d%%" IDS_STATUS_PROCESSES "Proses: %d" - IDS_Not_Responding "Tidak Merespon" - IDS_Running "Berjalan" + IDS_NOT_RESPONDING "Tidak Merespon" + IDS_RUNNING "Berjalan" END diff --git a/base/applications/taskmgr/lang/it-IT.rc b/base/applications/taskmgr/lang/it-IT.rc index 54d0334c381..421ac702d6b 100644 --- a/base/applications/taskmgr/lang/it-IT.rc +++ b/base/applications/taskmgr/lang/it-IT.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Sovrapponi", ID_WINDOWS_CASCADE MENUITEM "&Porta in primo piano", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Aiuto" BEGIN MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Uso Mem: %dK / %dK" IDS_STATUS_CPUUSAGE "Uso CPU: %3d%%" IDS_STATUS_PROCESSES "Processi: %d" - IDS_Not_Responding "Non risponde" - IDS_Running "In esecuzione" + IDS_NOT_RESPONDING "Non risponde" + IDS_RUNNING "In esecuzione" END diff --git a/base/applications/taskmgr/lang/ja-JP.rc b/base/applications/taskmgr/lang/ja-JP.rc index 9e6bc38d9e1..c4ce74573a2 100644 --- a/base/applications/taskmgr/lang/ja-JP.rc +++ b/base/applications/taskmgr/lang/ja-JP.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "重ねて表示(&C)", ID_WINDOWS_CASCADE MENUITEM "手前に表示(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "ヘルプ(&H)" BEGIN MENUITEM "トピックの検索(&H)", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "メモリ使用量: %dKB / %dKB" IDS_STATUS_CPUUSAGE "CPU 使用率: %3d%%" IDS_STATUS_PROCESSES "プロセス: %d" - IDS_Not_Responding "応答なし" - IDS_Running "実行中" + IDS_NOT_RESPONDING "応答なし" + IDS_RUNNING "実行中" END diff --git a/base/applications/taskmgr/lang/ko-KR.rc b/base/applications/taskmgr/lang/ko-KR.rc index a6a68bd6fc0..de3236b5959 100644 --- a/base/applications/taskmgr/lang/ko-KR.rc +++ b/base/applications/taskmgr/lang/ko-KR.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "계단식 창 배열(&C)", ID_WINDOWS_CASCADE MENUITEM "맨 앞으로 가져오기(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "도움말(&H)" BEGIN MENUITEM "작업 관리자 도움말 항목(&H)", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "메모리 사용: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU 사용: %3d%%" IDS_STATUS_PROCESSES "프로세스: %d" - IDS_Not_Responding "응답 없음" - IDS_Running "실행 중" + IDS_NOT_RESPONDING "응답 없음" + IDS_RUNNING "실행 중" END diff --git a/base/applications/taskmgr/lang/nl-NL.rc b/base/applications/taskmgr/lang/nl-NL.rc index 186190af194..fcc775e1b94 100644 --- a/base/applications/taskmgr/lang/nl-NL.rc +++ b/base/applications/taskmgr/lang/nl-NL.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Trapsgewijs", ID_WINDOWS_CASCADE MENUITEM "Naar &voorgrond", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Help" BEGIN MENUITEM "&Help-onderwerpen", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Geheugengebruik: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU-gebruik: %3d%%" IDS_STATUS_PROCESSES "Processen: %d" - IDS_Not_Responding "Reageert niet" - IDS_Running "Geactiveerd" + IDS_NOT_RESPONDING "Reageert niet" + IDS_RUNNING "Geactiveerd" END diff --git a/base/applications/taskmgr/lang/no-NO.rc b/base/applications/taskmgr/lang/no-NO.rc index 4be336c8e40..f5c48ec4bbe 100644 --- a/base/applications/taskmgr/lang/no-NO.rc +++ b/base/applications/taskmgr/lang/no-NO.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Overlappet", ID_WINDOWS_CASCADE MENUITEM "&Plasser lengst frem", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Hjelp" BEGIN MENUITEM "Emner i &hjelp for Oppgavebehandling", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Tildelt minne: %dK / %dK" IDS_STATUS_CPUUSAGE "Prosessorbruk: %3d%%" IDS_STATUS_PROCESSES "Prosesser: %d" - IDS_Not_Responding "Ingen reaksjon" - IDS_Running "Kjører" + IDS_NOT_RESPONDING "Ingen reaksjon" + IDS_RUNNING "Kjører" END diff --git a/base/applications/taskmgr/lang/pl-PL.rc b/base/applications/taskmgr/lang/pl-PL.rc index e1e4c575110..7205b00e207 100644 --- a/base/applications/taskmgr/lang/pl-PL.rc +++ b/base/applications/taskmgr/lang/pl-PL.rc @@ -3,6 +3,7 @@ * xxrogers@users.sourceforge.net * https://sourceforge.net/projects/reactospl * UTF-8 conversion by Caemyr (May, 2011) + * Updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (August, 2014) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -25,11 +26,11 @@ BEGIN POPUP "&Widok" BEGIN MENUITEM "&Odśwież teraz", ID_VIEW_REFRESH - POPUP "&Częstotliwość aktualizacji" + POPUP "Szy&bkość aktualizacji" BEGIN - MENUITEM "&Wysoka", ID_VIEW_UPDATESPEED_HIGH + MENUITEM "&Duża", ID_VIEW_UPDATESPEED_HIGH MENUITEM "&Normalna", ID_VIEW_UPDATESPEED_NORMAL, CHECKED - MENUITEM "&Niska", ID_VIEW_UPDATESPEED_LOW + MENUITEM "&Mała", ID_VIEW_UPDATESPEED_LOW MENUITEM "&Wstrzymana", ID_VIEW_UPDATESPEED_PAUSED END MENUITEM SEPARATOR @@ -53,6 +54,18 @@ BEGIN MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT END + POPUP "&Zamknij" + BEGIN + MENUITEM "Przejdź w &stan gotowości", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernuj", ID_SHUTDOWN_HIBERNATE + MENUITEM "Wyłą&cz", ID_SHUTDOWN_POWEROFF + MENUITEM "&Uruchom ponownie", ID_SHUTDOWN_REBOOT + MENUITEM "&Wyloguj: %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Przełącz użytkownika\tLogo Win+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "&Zablokuj komputer\tLogo Win+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Rozłącz", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Wysuń komputer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED //FIXME ? + END POPUP "Pomo&c" BEGIN MENUITEM "Menedżer zadań - tematy &pomocy", ID_HELP_TOPICS @@ -167,7 +180,7 @@ BEGIN LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 7, 7, 233, 177 PUSHBUTTON "&Zakończ proces", IDC_ENDPROCESS, 171, 189, 69, 14 CONTROL "Po&każ procesy wszystkich użytkowników", IDC_SHOWALLPROCESSES, "Button", - BS_AUTOCHECKBOX | WS_TABSTOP, 7, 191, 111, 10 + BS_AUTOCHECKBOX | WS_TABSTOP, 7, 191, 153, 10 END /* IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 */ @@ -201,7 +214,7 @@ BEGIN ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Razem", IDS_PHYSICAL_MEMORY_TOTAL, 137, 131, 27, 8 LTEXT "Dostępne", IDS_PHYSICAL_MEMORY_AVAILABLE, 137, 140, 30, 8 - LTEXT "Bufor systemu", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 46, 8 + LTEXT "Bufor systemu", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 80, 8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL, 185, 131, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE, 185, 140, 48, 8, ES_RIGHT | ES_READONLY | @@ -209,8 +222,8 @@ BEGIN EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE, 185, 149, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Razem", IDS_KERNEL_MEMORY_TOTAL, 137, 174, 27, 8 - LTEXT "Stronicowana", IDS_KERNEL_MEMORY_PAGED, 137, 184, 21, 8 - LTEXT "Niestronicowana", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 34, 8 + LTEXT "Stronicowana", IDS_KERNEL_MEMORY_PAGED, 137, 184, 70, 8 + LTEXT "Niestronicowana", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 80, 8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL, 185, 174, 48, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED, 185, 184, 48, 8, ES_RIGHT | ES_READONLY | @@ -407,7 +420,7 @@ BEGIN IDS_TAB_IOOTHERBYTES "Inne We/Wy w bajtach" IDS_MENU_SELECTCOLUMNS "Wybierz &kolumny..." IDS_MENU_16BITTASK "Pokaż 16-&bitowe zadania" - IDS_MENU_WINDOWS "&Okna" + IDS_MENU_WINDOWS "O&kna" IDS_MENU_LARGEICONS "Duże ikony" IDS_MENU_SMALLICONS "Małe ikony" IDS_MENU_DETAILS "Szczegóły" @@ -431,6 +444,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Pam. zadeklar.: %dK / %dK" IDS_STATUS_CPUUSAGE "Użycie procesora: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" - IDS_Not_Responding "Nie odpowiada" - IDS_Running "Uruchomiony" + IDS_NOT_RESPONDING "Nie odpowiada" + IDS_RUNNING "Uruchomiony" END diff --git a/base/applications/taskmgr/lang/pt-BR.rc b/base/applications/taskmgr/lang/pt-BR.rc index 34a19807d1e..7c123d7d9d1 100644 --- a/base/applications/taskmgr/lang/pt-BR.rc +++ b/base/applications/taskmgr/lang/pt-BR.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "Em &cascata", ID_WINDOWS_CASCADE MENUITEM "&Trazer para a frente", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "Aj&uda" BEGIN MENUITEM "&Tópicos da Ajuda do Gerenciador de tarefas", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Uso de Memória: %dK / %dK" IDS_STATUS_CPUUSAGE "Uso de CPU: %3d%%" IDS_STATUS_PROCESSES "Processo: %d" - IDS_Not_Responding "Não respondendo" - IDS_Running "Execuando" + IDS_NOT_RESPONDING "Não respondendo" + IDS_RUNNING "Execuando" END diff --git a/base/applications/taskmgr/lang/ro-RO.rc b/base/applications/taskmgr/lang/ro-RO.rc index 91c7de10491..3e4514eb3b6 100644 --- a/base/applications/taskmgr/lang/ro-RO.rc +++ b/base/applications/taskmgr/lang/ro-RO.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "Aranjări în casca&dă", ID_WINDOWS_CASCADE MENUITEM "&Aduce în prim plan", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&?" BEGIN MENUITEM "&Manual…", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Utilizare memorie: %dko/%dko" IDS_STATUS_CPUUSAGE "Utilizare procesor: %3d%%" IDS_STATUS_PROCESSES "Procese: %d" - IDS_Not_Responding "EXECUȚIE ANORMALĂ" - IDS_Running "execuție normală" + IDS_NOT_RESPONDING "EXECUȚIE ANORMALĂ" + IDS_RUNNING "execuție normală" END diff --git a/base/applications/taskmgr/lang/ru-RU.rc b/base/applications/taskmgr/lang/ru-RU.rc index 476189cf438..6f1cb8f7697 100644 --- a/base/applications/taskmgr/lang/ru-RU.rc +++ b/base/applications/taskmgr/lang/ru-RU.rc @@ -23,7 +23,7 @@ BEGIN POPUP "&Скорость обновления" BEGIN MENUITEM "&Высокая", ID_VIEW_UPDATESPEED_HIGH - MENUITEM "О&бычная", ID_VIEW_UPDATESPEED_NORMAL, CHECKED + MENUITEM "&Обычная", ID_VIEW_UPDATESPEED_NORMAL, CHECKED MENUITEM "&Низкая", ID_VIEW_UPDATESPEED_LOW MENUITEM "&Приостановить", ID_VIEW_UPDATESPEED_PAUSED END @@ -31,7 +31,7 @@ BEGIN MENUITEM "&Крупные значки", ID_VIEW_LARGE MENUITEM "&Мелкие значки", ID_VIEW_SMALL MENUITEM "&Таблица", ID_VIEW_DETAILS, CHECKED - MENUITEM "&Выбрать столбцы...", ID_VIEW_SELECTCOLUMNS + MENUITEM "В&ыбрать столбцы...", ID_VIEW_SELECTCOLUMNS POPUP "&Загрузка ЦП" BEGIN MENUITEM "&Один график на все ЦП", ID_VIEW_CPUHISTORY_ONEGRAPHALL @@ -41,13 +41,25 @@ BEGIN END POPUP "&Окна" BEGIN - MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "С&лева направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "&Свернуть", ID_WINDOWS_MINIMIZE MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT END + POPUP "Завер&шение работы" + BEGIN + MENUITEM "Переход в &ждущий режим", ID_SHUTDOWN_STANDBY + MENUITEM "Переход в &спящий режим", ID_SHUTDOWN_HIBERNATE + MENUITEM "В&ыключение", ID_SHUTDOWN_POWEROFF + MENUITEM "&Перезагрузка", ID_SHUTDOWN_REBOOT + MENUITEM "&Завершение сеанса %s", ID_SHUTDOWN_LOGOFF + MENUITEM "С&мена пользователя\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Заб&локировать компьютер\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "С&нять компьютер с док-станции", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Справка" BEGIN MENUITEM "&Вызов справки", ID_HELP_TOPICS @@ -58,9 +70,9 @@ END IDR_WINDOWSMENU MENU BEGIN - MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "С&лева направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "&Свернуть", ID_WINDOWS_MINIMIZE MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT @@ -85,14 +97,14 @@ BEGIN MENUITEM "&Переключиться", ID_APPLICATION_PAGE_SWITCHTO MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT MENUITEM SEPARATOR - MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "&Свернуть", ID_WINDOWS_MINIMIZE MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE MENUITEM "&Каскадом", ID_WINDOWS_CASCADE + MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY + MENUITEM "С&лева направо", ID_WINDOWS_TILEHORIZONTALLY MENUITEM SEPARATOR - MENUITEM "Сня&ть задачу", ID_APPLICATION_PAGE_ENDTASK - MENUITEM "Перейти к процесса&м", ID_APPLICATION_PAGE_GOTOPROCESS + MENUITEM "Снять &задачу", ID_APPLICATION_PAGE_ENDTASK + MENUITEM "&Перейти к процессу", ID_APPLICATION_PAGE_GOTOPROCESS END END @@ -103,7 +115,7 @@ BEGIN MENUITEM "&Востановить", ID_RESTORE MENUITEM "&Закрыть", ID_FILE_EXIT MENUITEM SEPARATOR - MENUITEM "&Поверх остальных окон", ID_OPTIONS_ALWAYSONTOP + MENUITEM "Пове&рх остальных окон", ID_OPTIONS_ALWAYSONTOP END END @@ -112,7 +124,7 @@ BEGIN POPUP "DUMMY" BEGIN MENUITEM "&Завершить процесс", ID_PROCESS_PAGE_ENDPROCESS - MENUITEM "З&авершить дерево процессов", ID_PROCESS_PAGE_ENDPROCESSTREE + MENUITEM "Завершить &дерево процессов", ID_PROCESS_PAGE_ENDPROCESSTREE MENUITEM "&Отладка", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR POPUP "&Приоритет" @@ -121,10 +133,10 @@ BEGIN MENUITEM "&Высокий", ID_PROCESS_PAGE_SETPRIORITY_HIGH MENUITEM "В&ыше среднего", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL MENUITEM "&Средний", ID_PROCESS_PAGE_SETPRIORITY_NORMAL - MENUITEM "&Ниже среднего", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - MENUITEM "Н&изкий", ID_PROCESS_PAGE_SETPRIORITY_LOW + MENUITEM "Н&иже среднего", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL + MENUITEM "&Низкий", ID_PROCESS_PAGE_SETPRIORITY_LOW END - MENUITEM "&Задать соответствие...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM "Задать &соответствие...", ID_PROCESS_PAGE_SETAFFINITY MENUITEM "Редактировать отладку &потоков...", ID_PROCESS_PAGE_DEBUGCHANNELS END END @@ -151,7 +163,7 @@ BEGIN WS_BORDER | WS_TABSTOP, 7, 7, 233, 177 PUSHBUTTON "&Новая задача...", IDC_NEWTASK, 167, 189, 73, 14 PUSHBUTTON "&Переключиться", IDC_SWITCHTO, 89, 189, 73, 14, WS_DISABLED - PUSHBUTTON "&Завершить задачу", IDC_ENDTASK, 12, 189, 73, 14, WS_DISABLED + PUSHBUTTON "Завершить &задачу", IDC_ENDTASK, 12, 189, 73, 14, WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 @@ -161,7 +173,7 @@ BEGIN CONTROL "List2", IDC_PROCESSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 7, 7, 233, 177 PUSHBUTTON "&Завершить процесс", IDC_ENDPROCESS, 162, 189, 79, 14 - CONTROL "&Процессы всех пользователей", IDC_SHOWALLPROCESSES, "Button", + CONTROL "&Отображать процессы всех пользователей", IDC_SHOWALLPROCESSES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 191, 153, 10 END @@ -173,9 +185,9 @@ BEGIN GROUPBOX "Загрузка ЦП", IDC_CPU_USAGE_FRAME, 5, 5, 60, 54, 0, WS_EX_TRANSPARENT GROUPBOX "Файл подкачки", IDC_MEM_USAGE_FRAME, 5, 63, 60, 54, BS_LEFTTEXT, WS_EX_TRANSPARENT GROUPBOX "Всего", IDC_TOTALS_FRAME, 5, 122, 111, 39, 0, WS_EX_TRANSPARENT - GROUPBOX "Выделение памяти (K)", IDC_COMMIT_CHARGE_FRAME, 5, 166, 111, 39, 0, WS_EX_TRANSPARENT - GROUPBOX "Физическая память (K)", IDC_PHYSICAL_MEMORY_FRAME, 131, 122, 111, 39, 0, WS_EX_TRANSPARENT - GROUPBOX "Память ядра (K)", IDC_KERNEL_MEMORY_FRAME, 131, 166, 111, 39, 0, WS_EX_TRANSPARENT + GROUPBOX "Выделение памяти (КБ)", IDC_COMMIT_CHARGE_FRAME, 5, 166, 111, 39, 0, WS_EX_TRANSPARENT + GROUPBOX "Физическая память (КБ)", IDC_PHYSICAL_MEMORY_FRAME, 131, 122, 111, 39, 0, WS_EX_TRANSPARENT + GROUPBOX "Память ядра (КБ)", IDC_KERNEL_MEMORY_FRAME, 131, 166, 111, 39, 0, WS_EX_TRANSPARENT LTEXT "Дескрипторов", IDS_TOTALS_HANDLE_COUNT, 12, 131, 57, 8 LTEXT "Потоков", IDS_TOTALS_THREAD_COUNT, 12, 140, 30, 8 LTEXT "Процессов", IDS_TOTALS_PROCESS_COUNT, 12, 149, 34, 8 @@ -196,7 +208,7 @@ BEGIN ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Всего", IDS_PHYSICAL_MEMORY_TOTAL, 137, 131, 27, 8 LTEXT "Доступно", IDS_PHYSICAL_MEMORY_AVAILABLE, 137, 140, 33, 8 - LTEXT "Системный кеш", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 62, 8 + LTEXT "Системный кэш", IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, 137, 149, 80, 8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL, 192, 131, 41, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE, 185, 140, 48, 8, ES_RIGHT | ES_READONLY | @@ -205,7 +217,7 @@ BEGIN ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Всего", IDS_KERNEL_MEMORY_TOTAL, 137, 174, 27, 8 LTEXT "Выгружаемая", IDS_KERNEL_MEMORY_PAGED, 137, 184, 50, 8 - LTEXT "Невыгружаемая", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 62, 8 + LTEXT "Невыгружаемая", IDS_KERNEL_MEMORY_NONPAGED, 137, 193, 80, 8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL, 192, 174, 41, 8, ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED, 185, 184, 48, 8, ES_RIGHT | ES_READONLY | @@ -279,7 +291,7 @@ FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", IDOK, 113, 178, 50, 14 PUSHBUTTON "Отмена", IDCANCEL, 167, 178, 50, 14 - LTEXT "Выбор столбцов, отображаемых в списке диспетчера задач.", IDC_STATIC, 7, 7, 220, 17 + LTEXT "Выберите столбцы, которые появятся на странице процессов диспетчера задач.", IDC_STATIC, 7, 7, 220, 17 CONTROL "&Имя образа", IDC_IMAGENAME, "Button", BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP, 7, 28, 56, 10 CONTROL "PID (иденти&ф. процесса)", IDC_PID, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 39, 95, 10 CONTROL "&Загрузка ЦП", IDC_CPUUSAGE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 50, 55, 10 @@ -294,7 +306,7 @@ BEGIN CONTROL "Код се&анса", IDC_SESSIONID, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 149, 50, 10 CONTROL "Им&я пользователя", IDC_USERNAME, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 160, 80, 10 CONTROL "Ошибок &страницы - изменение", IDC_PAGEFAULTSDELTA, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 28, 120, 10 - CONTROL "Объем вирт&уальной памяти", IDC_VIRTUALMEMORYSIZE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 39, 110, 10 + CONTROL "Объем виртуал&ьной памяти", IDC_VIRTUALMEMORYSIZE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 39, 110, 10 CONTROL "Вы&гружаемый пул", IDC_PAGEDPOOL, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 50, 90, 10 CONTROL "Невыгр&ужаемый пул", IDC_NONPAGEDPOOL, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 61, 90, 10 CONTROL "&Базовый приоритет", IDC_BASEPRIORITY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 72, 90, 10 @@ -319,35 +331,35 @@ END STRINGTABLE BEGIN ID_FILE_NEW "Создать новую задачу" - ID_OPTIONS_ALWAYSONTOP "Менеджер задач остается поверх всех окон, если не свернут" - ID_OPTIONS_MINIMIZEONUSE "Менеджер задач сворачивается после выполения команды Переключиться" - ID_OPTIONS_HIDEWHENMINIMIZED "Скрытие Менеждера задач при свертывании" - ID_VIEW_REFRESH "Обновление Менеджера задач вне зависимости от установленной скорости обновления" - ID_VIEW_LARGE "Отображать задачи использую большие значки" - ID_VIEW_SMALL "Отображать задачи использую маленькие значки" - ID_VIEW_DETAILS "Показывать информацию о каждой задаче" - ID_VIEW_UPDATESPEED_HIGH "Обновлять каждую секунду" - ID_VIEW_UPDATESPEED_NORMAL "Обновлять каждые две секунды" - ID_VIEW_UPDATESPEED_LOW "Обновлять каждые четыре секунды" + ID_OPTIONS_ALWAYSONTOP "Окно Диспетчера задач отображается поверх других окон, если не свернуто" + ID_OPTIONS_MINIMIZEONUSE "Окно Диспетчера задач свертывается при выполнении переключения" + ID_OPTIONS_HIDEWHENMINIMIZED "Скрывает свернутое окно Диспетчера задач" + ID_VIEW_REFRESH "Вызывает немедленное обновление окна Диспетчера задач" + ID_VIEW_LARGE "Отображает задачи в виде крупных значков" + ID_VIEW_SMALL "Отображает задачи в виде мелких значков" + ID_VIEW_DETAILS "Отображает дополнительную информацию о задачах" + ID_VIEW_UPDATESPEED_HIGH "Обновляет изображение один раз в секунду" + ID_VIEW_UPDATESPEED_NORMAL "Обновляет изображение один раз в две секунды" + ID_VIEW_UPDATESPEED_LOW "Обновляет изображение один раз в четыре секунды" END STRINGTABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED "Не обновлять автоматически" - ID_WINDOWS_TILEHORIZONTALLY "Окна располагаются горизонтально на рабочем столе" - ID_WINDOWS_TILEVERTICALLY "Окна располагаются вертикально на рабочем столе" - ID_WINDOWS_MINIMIZE "Свернуть окна" - ID_WINDOWS_MAXIMIZE "Развернуть окна" - ID_WINDOWS_CASCADE "Окна каскадом по диагонали на рабочем столе" - ID_WINDOWS_BRINGTOFRONT "Переносит осно на передний план, но не переключается на него" - ID_HELP_TOPICS "Показать помощь для диспетчера задач" - ID_HELP_ABOUT "Показать информацию о программе, версии и авторе" - ID_FILE_EXIT "Выход из Диспетчера задач" - ID_OPTIONS_SHOW16BITTASKS "Показывать 16-разрядные процессы связанные с ntvdm.exe" - ID_VIEW_SELECTCOLUMNS "Выбирите какие из столбцов будут видны на вкладке процессов" - ID_VIEW_SHOWKERNELTIMES "Показывать график времени ядра" - ID_VIEW_CPUHISTORY_ONEGRAPHALL "Один график показывает хронологию загрузки ЦП" - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Каждый процессор имеет свой график загрузки" + ID_VIEW_UPDATESPEED_PAUSED "Изображение не обновляется автоматически" + ID_WINDOWS_TILEHORIZONTALLY "Располагает окна сверху вниз на рабочем столе" + ID_WINDOWS_TILEVERTICALLY "Располагает окна слева направо на рабочем столе" + ID_WINDOWS_MINIMIZE "Свертывает окна" + ID_WINDOWS_MAXIMIZE "Развертывает окна" + ID_WINDOWS_CASCADE "Размещает окна каскадом на рабочем столе" + ID_WINDOWS_BRINGTOFRONT "Перемещает окно на передний план, но не активизирует его" + ID_HELP_TOPICS "Открывает окно встроенной справки диспетчера задач" + ID_HELP_ABOUT "Вывод сведений о программе, ее версии и авторских правах" + ID_FILE_EXIT "Завершает Диспетчер задач" + ID_OPTIONS_SHOW16BITTASKS "Отображает 16-разрядные задачи, обрабатываемые ntvdm.exe" + ID_VIEW_SELECTCOLUMNS "Определяет список столбцов, отображаемых на вкладке Процессы" + ID_VIEW_SHOWKERNELTIMES "Отображает время ядра на графиках загруженности" + ID_VIEW_CPUHISTORY_ONEGRAPHALL "Один график общей загрузки ЦП" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Каждому ЦП соответствует свой график" ID_APPLICATION_PAGE_SWITCHTO "Перенести задачу на передний план и переключиться к ней" END @@ -400,16 +412,16 @@ BEGIN IDS_TAB_IOREADBYTES "Прочитано байт" IDS_TAB_IOWRITESBYTES "Записано байт" IDS_TAB_IOOTHERBYTES "Прочих байт при вводе-выводе" - IDS_MENU_SELECTCOLUMNS "&Выбрать столбцы..." - IDS_MENU_16BITTASK "&Показывать 16-разрядные задачи" + IDS_MENU_SELECTCOLUMNS "В&ыбрать столбцы..." + IDS_MENU_16BITTASK "&Отображать 16-разрядные задачи" IDS_MENU_WINDOWS "&Окна" IDS_MENU_LARGEICONS "&Крупные значки" IDS_MENU_SMALLICONS "&Мелкие значки" IDS_MENU_DETAILS "&Таблица" - IDS_MENU_ONEGRAPHALLCPUS "&Один график для всех процессоров" - IDS_MENU_ONEGRAPHPERCPU "О&тдельный график для каждого процессора" + IDS_MENU_ONEGRAPHALLCPUS "&По графику на каждый ЦП" + IDS_MENU_ONEGRAPHPERCPU "&Один график на все ЦП" IDS_MENU_CPUHISTORY "&История ЦП" - IDS_MENU_SHOWKERNELTIMES "&Показать время ядра" + IDS_MENU_SHOWKERNELTIMES "&Вывод времени ядра" IDS_CREATENEWTASK "Создать новую задачу" IDS_CREATENEWTASK_DESC "Вывести название программы, папки или документа для открытия в Менеджере задач." IDS_MSG_ACCESSPROCESSAFF "Не удается получить доступ или установить приоритет процесса" @@ -421,11 +433,11 @@ BEGIN IDS_MSG_WARNINGTERMINATING "ВНИМАНИЕ: Завершение процесса может повлечь неустойчивую работу системы и потерю данных\nСохраните важные данные перед продолжением.\nПродолжить завершение процесса?" IDS_MSG_UNABLETERMINATEPRO "Не удалось завершить процесс" IDS_MSG_UNABLECHANGEPRIORITY "Не удалось изменить приоритет" - IDS_MSG_WARNINGCHANGEPRIORITY "ВНИМАНИЕ: Изменение приоритета может повлечь неустойчивую работу и потерю данных.\nВы уверены, что можно продолжать?" + IDS_MSG_WARNINGCHANGEPRIORITY "ВНИМАНИЕ: Изменение приоритета этого процесса может привести к нежелательным результатам, в том числе к нестабильной работе системы.\nВы действительно хотите изменить класс приоритета?" IDS_MSG_TRAYICONCPUUSAGE "Загрузка ЦП: %d%%" IDS_STATUS_MEMUSAGE "Выделение памяти: %dK / %dK" IDS_STATUS_CPUUSAGE "Загрузка ЦП: %3d%%" IDS_STATUS_PROCESSES "Процессов: %d" - IDS_Not_Responding "Не отвечает" - IDS_Running "Работает" + IDS_NOT_RESPONDING "Не отвечает" + IDS_RUNNING "Работает" END diff --git a/base/applications/taskmgr/lang/sk-SK.rc b/base/applications/taskmgr/lang/sk-SK.rc index 8eb70d88af6..c7d3268882e 100644 --- a/base/applications/taskmgr/lang/sk-SK.rc +++ b/base/applications/taskmgr/lang/sk-SK.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE MENUITEM "Presunúť dopred&u", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Pomocník" BEGIN MENUITEM "Témy &Pomocníka pre Správcu úloh", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Využitá pamäť: %dK / %dK" IDS_STATUS_CPUUSAGE "Využitie procesora: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" - IDS_Not_Responding "Neodpovedá" - IDS_Running "Spustené" + IDS_NOT_RESPONDING "Neodpovedá" + IDS_RUNNING "Spustené" END diff --git a/base/applications/taskmgr/lang/sq-AL.rc b/base/applications/taskmgr/lang/sq-AL.rc index 7a6e9e626ed..5c1c812b896 100644 --- a/base/applications/taskmgr/lang/sq-AL.rc +++ b/base/applications/taskmgr/lang/sq-AL.rc @@ -50,6 +50,18 @@ BEGIN MENUITEM "Ujevare", ID_WINDOWS_CASCADE MENUITEM "Sjelle para", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "Ndihme" BEGIN MENUITEM "Task Manager &Ndihme me teme", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Perdorimi i Mem: %dK / %dK" IDS_STATUS_CPUUSAGE "Perdorimi i CPU: %3d%%" IDS_STATUS_PROCESSES "Proceset: %d" - IDS_Not_Responding "Nuk pergjigjet" - IDS_Running "Ne pune" + IDS_NOT_RESPONDING "Nuk pergjigjet" + IDS_RUNNING "Ne pune" END diff --git a/base/applications/taskmgr/lang/sv-SE.rc b/base/applications/taskmgr/lang/sv-SE.rc index 37e4817a0be..6d4ed2c758c 100644 --- a/base/applications/taskmgr/lang/sv-SE.rc +++ b/base/applications/taskmgr/lang/sv-SE.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "&Överlappande", ID_WINDOWS_CASCADE MENUITEM "&För till förgrunden", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Hjälp" BEGIN MENUITEM "Aktivitetshanteraren &hjälpavsnitt", ID_HELP_TOPICS @@ -426,6 +438,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Minnesanv: %dK / %dK" IDS_STATUS_CPUUSAGE "Processoranv: %3d%%" IDS_STATUS_PROCESSES "Processer: %d" - IDS_Not_Responding "Svarar inte" - IDS_Running "Igång" + IDS_NOT_RESPONDING "Svarar inte" + IDS_RUNNING "Igång" END diff --git a/base/applications/taskmgr/lang/tr-TR.rc b/base/applications/taskmgr/lang/tr-TR.rc index e83d6990362..7078a49d48d 100644 --- a/base/applications/taskmgr/lang/tr-TR.rc +++ b/base/applications/taskmgr/lang/tr-TR.rc @@ -48,6 +48,18 @@ BEGIN MENUITEM "B&asamaklandır", ID_WINDOWS_CASCADE MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT END + POPUP "&Bilgisayarı Kapat" + BEGIN + MENUITEM "&Uykuya Geçir", ID_SHUTDOWN_STANDBY + MENUITEM "&Anıkta Beklet", ID_SHUTDOWN_HIBERNATE + MENUITEM "&Kapat", ID_SHUTDOWN_POWEROFF + MENUITEM "&Yeniden Başlat", ID_SHUTDOWN_REBOOT + MENUITEM """%s"" &Oturumunu Kapat", ID_SHUTDOWN_LOGOFF + MENUITEM "Ku&llanıcı Değiştir\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "&Bilgisayarı Kilitle\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "Ba&ğlantıyı Kes", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "B&ilgisayarı Çıkar", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Yardım" BEGIN MENUITEM "&Yardım Konuları", ID_HELP_TOPICS @@ -125,7 +137,7 @@ BEGIN MENUITEM "Dü&şük", ID_PROCESS_PAGE_SETPRIORITY_LOW END MENUITEM "İ&lişkiyi Ayarla...", ID_PROCESS_PAGE_SETAFFINITY - MENUITEM "Y&anlışlık Ayıklama Kanallarını Düzenle...", ID_PROCESS_PAGE_DEBUGCHANNELS + MENUITEM "Y&anlışlık Ayıklama Yollarını Düzenle...", ID_PROCESS_PAGE_DEBUGCHANNELS END END @@ -220,7 +232,7 @@ END IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Yanlışlık Ayıklama Kanalları" +CAPTION "Yanlışlık Ayıklama Yolları" FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2", IDC_DEBUG_CHANNELS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Bellek Kullanımı: %d KB / %d KB" IDS_STATUS_CPUUSAGE "CPU Kullanımı: %%%3d" IDS_STATUS_PROCESSES "İşlem: %d" - IDS_Not_Responding "Yanıt Vermiyor" - IDS_Running "Çalışıyor" + IDS_NOT_RESPONDING "Yanıt Vermiyor" + IDS_RUNNING "Çalışıyor" END diff --git a/base/applications/taskmgr/lang/uk-UA.rc b/base/applications/taskmgr/lang/uk-UA.rc index b481729cac1..cb6febe53ca 100644 --- a/base/applications/taskmgr/lang/uk-UA.rc +++ b/base/applications/taskmgr/lang/uk-UA.rc @@ -46,6 +46,18 @@ BEGIN MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "&Довідка" BEGIN MENUITEM "&Зміст", ID_HELP_TOPICS @@ -424,6 +436,6 @@ BEGIN IDS_STATUS_MEMUSAGE "Пам'ять: %dK / %dK" IDS_STATUS_CPUUSAGE "Використання ЦП: %3d%%" IDS_STATUS_PROCESSES "Процесів: %d" - IDS_Not_Responding "Не відповідає" - IDS_Running "Виконується" + IDS_NOT_RESPONDING "Не відповідає" + IDS_RUNNING "Виконується" END diff --git a/base/applications/taskmgr/lang/zh-CN.rc b/base/applications/taskmgr/lang/zh-CN.rc index 09e078c0d7b..54ba7e466b9 100644 --- a/base/applications/taskmgr/lang/zh-CN.rc +++ b/base/applications/taskmgr/lang/zh-CN.rc @@ -52,6 +52,18 @@ BEGIN MENUITEM "层叠(&C)", ID_WINDOWS_CASCADE MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "帮助(&H)" BEGIN MENUITEM "任务管理器帮助主题(&H)", ID_HELP_TOPICS @@ -430,6 +442,6 @@ BEGIN IDS_STATUS_MEMUSAGE "内存使用情况: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU 使用情况: %3d%%" IDS_STATUS_PROCESSES "處理程序: %d" - IDS_Not_Responding "没有回应" - IDS_Running "正在运行" + IDS_NOT_RESPONDING "没有回应" + IDS_RUNNING "正在运行" END diff --git a/base/applications/taskmgr/lang/zh-TW.rc b/base/applications/taskmgr/lang/zh-TW.rc index c1a62309343..51c54f82601 100644 --- a/base/applications/taskmgr/lang/zh-TW.rc +++ b/base/applications/taskmgr/lang/zh-TW.rc @@ -54,6 +54,18 @@ BEGIN MENUITEM "層疊(&C)", ID_WINDOWS_CASCADE MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END + POPUP "Sh&ut Down" + BEGIN + MENUITEM "Stand &By", ID_SHUTDOWN_STANDBY + MENUITEM "&Hibernate", ID_SHUTDOWN_HIBERNATE + MENUITEM "T&urn Off", ID_SHUTDOWN_POWEROFF + MENUITEM "&Restart", ID_SHUTDOWN_REBOOT + MENUITEM "&Log Off %s", ID_SHUTDOWN_LOGOFF + MENUITEM "&Switch User\tWinKey+L", ID_SHUTDOWN_SWITCHUSER, GRAYED + MENUITEM "Loc&k Computer\tWinKey+L", ID_SHUTDOWN_LOCKCOMPUTER + MENUITEM "&Disconnect", ID_SHUTDOWN_DISCONNECT, GRAYED + MENUITEM "&Eject Computer", ID_SHUTDOWN_EJECT_COMPUTER, GRAYED + END POPUP "說明(&H)" BEGIN MENUITEM "工作管理員說明主题(&H)", ID_HELP_TOPICS @@ -432,6 +444,6 @@ BEGIN IDS_STATUS_MEMUSAGE "記憶體使用情況: %dK / %dK" IDS_STATUS_CPUUSAGE "CPU 使用情況: %3d%%" IDS_STATUS_PROCESSES "處理程序: %d" - IDS_Not_Responding "沒有回應" - IDS_Running "正在運行" + IDS_NOT_RESPONDING "沒有回應" + IDS_RUNNING "正在運行" END diff --git a/base/applications/taskmgr/perfpage.c b/base/applications/taskmgr/perfpage.c index 3359c2e56d3..5aaba2bc5eb 100644 --- a/base/applications/taskmgr/perfpage.c +++ b/base/applications/taskmgr/perfpage.c @@ -67,7 +67,7 @@ void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int cx, cy, sx, sy; GetClientRect(hCntrl, &rc); - MapWindowPoints(hCntrl, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT))); + MapWindowPoints(hCntrl, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); if (pos) { cx = rc.left; cy = rc.top; diff --git a/base/applications/taskmgr/precomp.h b/base/applications/taskmgr/precomp.h index d99e58fc2b8..e70ffa3fd36 100644 --- a/base/applications/taskmgr/precomp.h +++ b/base/applications/taskmgr/precomp.h @@ -30,5 +30,6 @@ #include "optnmenu.h" #include "run.h" #include "trayicon.h" +#include "shutdown.h" #endif /* __PRECOMP_H */ diff --git a/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c index 007e678532d..830f83e3cfe 100644 --- a/base/applications/taskmgr/procpage.c +++ b/base/applications/taskmgr/procpage.c @@ -186,14 +186,14 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) InvalidateRect(hProcessPageListCtrl, NULL, TRUE); GetClientRect(hProcessPageEndProcessButton, &rc); - MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); + MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); cx = rc.left + nXDifference; cy = rc.top + nYDifference; SetWindowPos(hProcessPageEndProcessButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); InvalidateRect(hProcessPageEndProcessButton, NULL, TRUE); GetClientRect(hProcessPageShowAllProcessesButton, &rc); - MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); + MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT)); cx = rc.left; cy = rc.top + nYDifference; SetWindowPos(hProcessPageShowAllProcessesButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); diff --git a/base/applications/taskmgr/resource.h b/base/applications/taskmgr/resource.h index a4517130d8d..785193b62ab 100644 --- a/base/applications/taskmgr/resource.h +++ b/base/applications/taskmgr/resource.h @@ -180,6 +180,16 @@ #define ID_PROCESS_PAGE_SETPRIORITY_LOW 32814 #define ID_PROCESS_PAGE_DEBUGCHANNELS 32815 +#define ID_SHUTDOWN_STANDBY 32816 +#define ID_SHUTDOWN_HIBERNATE 32817 +#define ID_SHUTDOWN_POWEROFF 32818 +#define ID_SHUTDOWN_REBOOT 32819 +#define ID_SHUTDOWN_LOGOFF 32820 +#define ID_SHUTDOWN_SWITCHUSER 32821 +#define ID_SHUTDOWN_LOCKCOMPUTER 32822 +#define ID_SHUTDOWN_DISCONNECT 32823 +#define ID_SHUTDOWN_EJECT_COMPUTER 32824 + #define IDC_STATIC -1 #define IDS_TAB_APPS 310 @@ -241,5 +251,5 @@ #define IDS_STATUS_MEMUSAGE 363 #define IDS_STATUS_CPUUSAGE 364 #define IDS_STATUS_PROCESSES 365 -#define IDS_Not_Responding 366 -#define IDS_Running 367 +#define IDS_NOT_RESPONDING 366 +#define IDS_RUNNING 367 diff --git a/base/applications/taskmgr/shutdown.c b/base/applications/taskmgr/shutdown.c new file mode 100644 index 00000000000..4c3ca645747 --- /dev/null +++ b/base/applications/taskmgr/shutdown.c @@ -0,0 +1,196 @@ +/* + * ReactOS Task Manager + * + * shutdown.c + * + * Copyright (C) 1999 - 2001 Brian Palmer + * 2011 Mrio Kacmr /Mario Kacmar/ aka Kario (kario@szm.sk) + * 2014 Robert Naumann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "precomp.h" +#include +#include +#include + +// Uncomment when NtInitiatePowerAction() is implemented +// #define NT_INITIATE_POWERACTION_IMPLEMENTED + +static BOOL +EnablePrivilege(LPCWSTR lpszPrivilegeName, BOOL bEnablePrivilege) +{ + BOOL Success; + HANDLE hToken; + TOKEN_PRIVILEGES tp; + + Success = OpenProcessToken(GetCurrentProcess(), + TOKEN_ADJUST_PRIVILEGES, + &hToken); + if (!Success) return Success; + + Success = LookupPrivilegeValueW(NULL, + lpszPrivilegeName, + &tp.Privileges[0].Luid); + if (!Success) goto Quit; + + tp.PrivilegeCount = 1; + tp.Privileges[0].Attributes = (bEnablePrivilege ? SE_PRIVILEGE_ENABLED : 0); + + Success = AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL); + +Quit: + CloseHandle(hToken); + return Success; +} + +VOID +ShutDown_StandBy(VOID) +{ + NTSTATUS Status; + + if (!EnablePrivilege(SE_SHUTDOWN_NAME, TRUE)) + { + ShowWin32Error(GetLastError()); + return; + } + +#ifdef NT_INITIATE_POWERACTION_IMPLEMENTED + Status = NtInitiatePowerAction(PowerActionSleep, + PowerSystemSleeping1, + 0, FALSE); +#else + Status = NtSetSystemPowerState(PowerActionSleep, + PowerSystemSleeping1, + 0); +#endif + + if (!NT_SUCCESS(Status)) + ShowWin32Error(RtlNtStatusToDosError(Status)); + + EnablePrivilege(SE_SHUTDOWN_NAME, FALSE); +} + +VOID +ShutDown_Hibernate(VOID) +{ + NTSTATUS Status; + + if (!EnablePrivilege(SE_SHUTDOWN_NAME, TRUE)) + { + ShowWin32Error(GetLastError()); + return; + } + +#ifdef NT_INITIATE_POWERACTION_IMPLEMENTED + Status = NtInitiatePowerAction(PowerActionHibernate, + PowerSystemHibernate, + 0, FALSE); +#else + Status = NtSetSystemPowerState(PowerActionHibernate, + PowerSystemHibernate, + 0); +#endif + + if (!NT_SUCCESS(Status)) + ShowWin32Error(RtlNtStatusToDosError(Status)); + + EnablePrivilege(SE_SHUTDOWN_NAME, FALSE); +} + +VOID +ShutDown_PowerOff(VOID) +{ + /* Trick: on Windows, pressing the CTRL key forces shutdown via NT API */ + BOOL ForceShutdown = !!(GetKeyState(VK_CONTROL) & 0x8000); + + if (!EnablePrivilege(SE_SHUTDOWN_NAME, TRUE)) + { + ShowWin32Error(GetLastError()); + return; + } + + if (ForceShutdown) + { + NTSTATUS Status = NtShutdownSystem(ShutdownPowerOff); + if (!NT_SUCCESS(Status)) + ShowWin32Error(RtlNtStatusToDosError(Status)); + } + else + { + // The choice of EWX_SHUTDOWN or EWX_POWEROFF may be done with NtPowerInformation + if (!ExitWindowsEx(EWX_POWEROFF /* EWX_SHUTDOWN */, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)) + ShowWin32Error(GetLastError()); + } + + EnablePrivilege(SE_SHUTDOWN_NAME, FALSE); +} + +VOID +ShutDown_Reboot(VOID) +{ + /* Trick: on Windows, pressing the CTRL key forces reboot via NT API */ + BOOL ForceReboot = !!(GetKeyState(VK_CONTROL) & 0x8000); + + if (!EnablePrivilege(SE_SHUTDOWN_NAME, TRUE)) + { + ShowWin32Error(GetLastError()); + return; + } + + if (ForceReboot) + { + NTSTATUS Status = NtShutdownSystem(ShutdownReboot); + if (!NT_SUCCESS(Status)) + ShowWin32Error(RtlNtStatusToDosError(Status)); + } + else + { + if (!ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)) + ShowWin32Error(GetLastError()); + } + + EnablePrivilege(SE_SHUTDOWN_NAME, FALSE); +} + +VOID +ShutDown_LogOffUser(VOID) +{ + if (!ExitWindowsEx(EWX_LOGOFF, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)) + ShowWin32Error(GetLastError()); +} + +VOID +ShutDown_SwitchUser(VOID) +{ +} + +VOID +ShutDown_LockComputer(VOID) +{ + if (!LockWorkStation()) + ShowWin32Error(GetLastError()); +} + +VOID +ShutDown_Disconnect(VOID) +{ +} + +VOID +ShutDown_EjectComputer(VOID) +{ +} diff --git a/base/applications/taskmgr/shutdown.h b/base/applications/taskmgr/shutdown.h new file mode 100644 index 00000000000..3358c5562b3 --- /dev/null +++ b/base/applications/taskmgr/shutdown.h @@ -0,0 +1,52 @@ +/* + * ReactOS Task Manager + * + * shutdown.h + * + * Copyright (C) 1999 - 2001 Brian Palmer + * 2011 Mrio Kacmr /Mario Kacmar/ aka Kario (kario@szm.sk) + * 2014 Robert Naumann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once + +VOID +ShutDown_StandBy(VOID); + +VOID +ShutDown_Hibernate(VOID); + +VOID +ShutDown_PowerOff(VOID); + +VOID +ShutDown_Reboot(VOID); + +VOID +ShutDown_LogOffUser(VOID); + +VOID +ShutDown_SwitchUser(VOID); + +VOID +ShutDown_LockComputer(VOID); + +VOID +ShutDown_Disconnect(VOID); + +VOID +ShutDown_EjectComputer(VOID); diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c index cf94146762c..36192dcfe37 100644 --- a/base/applications/taskmgr/taskmgr.c +++ b/base/applications/taskmgr/taskmgr.c @@ -317,6 +317,36 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case ID_PROCESS_PAGE_DEBUGCHANNELS: ProcessPage_OnDebugChannels(); break; + +/* ShutDown items */ + case ID_SHUTDOWN_STANDBY: + ShutDown_StandBy(); + break; + case ID_SHUTDOWN_HIBERNATE: + ShutDown_Hibernate(); + break; + case ID_SHUTDOWN_POWEROFF: + ShutDown_PowerOff(); + break; + case ID_SHUTDOWN_REBOOT: + ShutDown_Reboot(); + break; + case ID_SHUTDOWN_LOGOFF: + ShutDown_LogOffUser(); + break; + case ID_SHUTDOWN_SWITCHUSER: + ShutDown_SwitchUser(); + break; + case ID_SHUTDOWN_LOCKCOMPUTER: + ShutDown_LockComputer(); + break; + case ID_SHUTDOWN_DISCONNECT: + ShutDown_Disconnect(); + break; + case ID_SHUTDOWN_EJECT_COMPUTER: + ShutDown_EjectComputer(); + break; + case ID_HELP_ABOUT: OnAbout(); break; @@ -957,7 +987,7 @@ void TaskManager_OnTabWndSelChange(void) LoadStringW(hInst, IDS_MENU_DETAILS, szTemp, 256); AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_DETAILS, szTemp); - if (GetMenuItemCount(hMenu) <= 4) { + if (GetMenuItemCount(hMenu) <= 5) { hSubMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_WINDOWSMENU)); LoadStringW(hInst, IDS_MENU_WINDOWS, szTemp, 256); @@ -987,7 +1017,7 @@ void TaskManager_OnTabWndSelChange(void) if (TaskManagerSettings.Show16BitTasks) CheckMenuItem(hOptionsMenu, ID_OPTIONS_SHOW16BITTASKS, MF_BYCOMMAND|MF_CHECKED); - if (GetMenuItemCount(hMenu) > 4) + if (GetMenuItemCount(hMenu) > 5) { DeleteMenu(hMenu, 3, MF_BYPOSITION); DrawMenuBar(hMainWnd); @@ -1003,7 +1033,7 @@ void TaskManager_OnTabWndSelChange(void) ShowWindow(hProcessPage, SW_HIDE); ShowWindow(hPerformancePage, SW_SHOW); BringWindowToTop(hPerformancePage); - if (GetMenuItemCount(hMenu) > 4) { + if (GetMenuItemCount(hMenu) > 5) { DeleteMenu(hMenu, 3, MF_BYPOSITION); DrawMenuBar(hMainWnd); } @@ -1046,6 +1076,22 @@ void TaskManager_OnTabWndSelChange(void) } } +VOID ShowWin32Error(DWORD dwError) +{ + LPWSTR lpMessageBuffer; + + if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + dwError, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPWSTR)&lpMessageBuffer, + 0, NULL) != 0) + { + MessageBoxW(hMainWnd, lpMessageBuffer, NULL, MB_OK | MB_ICONERROR); + if (lpMessageBuffer) LocalFree(lpMessageBuffer); + } +} + LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize) { DWORD dwRet; diff --git a/base/applications/taskmgr/taskmgr.h b/base/applications/taskmgr/taskmgr.h index e0a8de842d9..b82f9705e96 100644 --- a/base/applications/taskmgr/taskmgr.h +++ b/base/applications/taskmgr/taskmgr.h @@ -117,6 +117,7 @@ void TaskManager_OnExitMenuLoop(HWND hWnd); void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu); void TaskManager_OnViewUpdateSpeed(DWORD); void TaskManager_OnTabWndSelChange(void); +VOID ShowWin32Error(DWORD dwError); LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize ); DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread); diff --git a/base/services/eventlog/eventlog.h b/base/services/eventlog/eventlog.h index 3f4afa249f4..7b5f40457e0 100644 --- a/base/services/eventlog/eventlog.h +++ b/base/services/eventlog/eventlog.h @@ -18,6 +18,7 @@ #include #include #include +#include typedef struct _IO_ERROR_LPC { diff --git a/base/services/eventlog/file.c b/base/services/eventlog/file.c index 31793a055b4..4781e823c14 100644 --- a/base/services/eventlog/file.c +++ b/base/services/eventlog/file.c @@ -355,7 +355,8 @@ LogfCreate(PLOGFILE *LogFile, goto fail; } - lstrcpyW(pLogFile->LogName, LogName); + if(LogName) + StringCchCopy(pLogFile->LogName,lstrlenW(LogName) + 1, LogName); pLogFile->FileName = (WCHAR *) HeapAlloc(MyHeap, @@ -368,7 +369,7 @@ LogfCreate(PLOGFILE *LogFile, goto fail; } - lstrcpyW(pLogFile->FileName, FileName->Buffer); + StringCchCopy(pLogFile->FileName, lstrlenW(FileName->Buffer) + 1, FileName->Buffer); pLogFile->OffsetInfo = (PEVENT_OFFSET_INFO) HeapAlloc(MyHeap, @@ -1233,7 +1234,7 @@ LogfBackupFile(PLOGFILE LogFile, goto Done; } - if (!ReadFile(LogFile->hFile, &Buffer, dwRecSize, &dwRead, NULL)) + if (!ReadFile(LogFile->hFile, Buffer, dwRecSize, &dwRead, NULL)) { DPRINT1("ReadFile() failed!\n"); goto Done; @@ -1251,7 +1252,7 @@ LogfBackupFile(PLOGFILE LogFile, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("NtWriteFile() failed!\n"); + DPRINT1("NtWriteFile() failed! (Status: 0x%08lx)\n", Status); goto Done; } @@ -1310,7 +1311,7 @@ LogfBackupFile(PLOGFILE LogFile, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("NtWriteFile() failed!\n"); + DPRINT1("NtWriteFile() failed! (Status: 0x%08lx)\n", Status); } Done: diff --git a/base/services/eventlog/rpc.c b/base/services/eventlog/rpc.c index b33a119c5e5..1154f01b744 100644 --- a/base/services/eventlog/rpc.c +++ b/base/services/eventlog/rpc.c @@ -215,9 +215,9 @@ ElfDeleteEventLogHandle(IELF_HANDLE EventLogHandle) if (!ElfGetLogHandleEntryByHandle(lpLogHandle)) return STATUS_INVALID_HANDLE; + RemoveEntryList(&lpLogHandle->LogHandleListEntry); LogfClose(lpLogHandle->LogFile, FALSE); - RemoveEntryList(&lpLogHandle->LogHandleListEntry); HeapFree(GetProcessHeap(),0,lpLogHandle); return STATUS_SUCCESS; @@ -291,7 +291,7 @@ NTSTATUS ElfrNumberOfRecords( PLOGHANDLE lpLogHandle; PLOGFILE lpLogFile; - DPRINT("ElfrNumberOfRecords()"); + DPRINT("ElfrNumberOfRecords()\n"); lpLogHandle = ElfGetLogHandleEntryByHandle(LogHandle); if (!lpLogHandle) diff --git a/base/setup/usetup/interface/usetup.c b/base/setup/usetup/interface/usetup.c index 502e6cf286c..0d7373d7eb5 100644 --- a/base/setup/usetup/interface/usetup.c +++ b/base/setup/usetup/interface/usetup.c @@ -4095,6 +4095,7 @@ RunUSetup(VOID) PAGE_NUMBER Page; LARGE_INTEGER Time; NTSTATUS Status; + BOOLEAN Old; NtQuerySystemTime(&Time); @@ -4296,7 +4297,9 @@ RunUSetup(VOID) NtDelayExecution(FALSE, &Time); /* Reboot */ + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, &Old); NtShutdownSystem(ShutdownReboot); + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, Old, FALSE, &Old); NtTerminateProcess(NtCurrentProcess(), 0); } diff --git a/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h index 9e8071e465c..2f77d54881d 100644 --- a/base/setup/usetup/lang/cs-CZ.h +++ b/base/setup/usetup/lang/cs-CZ.h @@ -1,7 +1,7 @@ /* FILE: setup/usetup/lang/cs-CZ.rc * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) * THANKS TO: preston for bugfix advice at line 842 - * UPDATED: 2011-03-31 + * UPDATED: 2014-08-31 */ #pragma once @@ -827,14 +827,13 @@ static MUI_ENTRY csCZSelectPartitionEntries[] = { 8, 15, - "\x07 Press P to create a primary partition.", -// "\x07 Stisknutm C umonte vytvoen novho oddlu.", + "\x07 Stistknutm P vytvote primrn oddl.", TEXT_STYLE_NORMAL }, { 8, 17, - "\x07 Press E to create an extended partition.", + "\x07 Stistknutm E vytvote rozen oddl.", TEXT_STYLE_NORMAL }, { @@ -1509,29 +1508,29 @@ MUI_ERROR csCZErrorEntries[] = }, { //ERROR_PARTITION_TABLE_FULL, - "You can not create a new primary or extended partition in the\n" - "partition table of this disk because the partition table is full.\n" + "Nepodailo se vytvoit nov primrn nebo rozen oddl\n" + "v tabulce oddl na zvolenm disku, protoe tabulka oddl je pln.\n" "\n" - " * Press any key to continue." + " * Pokraujte stisknutm libovoln klvesy." }, { //ERROR_ONLY_ONE_EXTENDED, - "You can not create more than one extended partition per disk.\n" + "Nen mon vytvoit vce ne jeden rozen oddl na disk.\n" "\n" - " * Press any key to continue." + " * Pokraujte stisknutm libovoln klvesy." }, { //ERROR_NOT_BEHIND_EXTENDED, - "You can not create a partition behind an extended partition.\n" + "Nen mon vytvoit oddl za rozenm oddlem.\n" "\n" - " * Press any key to continue." + " * Pokraujte stisknutm libovoln klvesy." }, { //ERROR_EXTENDED_NOT_LAST, - "An extended partition must always be the last\n" - "partition in a partition table.\n" + "Rozen oddl mus bt vdy posledn oddl\n" + "v tabulce oddl.\n" "\n" - " * Press any key to continue." + " * Pokraujte stisknutm libovoln klvesy." }, { NULL, @@ -1645,23 +1644,21 @@ MUI_STRING csCZStrings[] = {STRING_PLEASEWAIT, " ekejte, prosm..."}, {STRING_INSTALLCREATEPARTITION, - " ENTER = Install P = Create Primary E = Create Extended F3 = Quit"}, -// " ENTER = Instalovat C = Vytvoit oddl F3 = Ukonit"}, + " ENTER = Instalovat P = Nov primrn E = Nov rozen F3 = Ukonit"}, {STRING_INSTALLCREATELOGICAL, - " ENTER = Install L = Create Logical Partition F3 = Quit"}, + " ENTER = Instalovat L = Vytvoit logick oddl F3 = Ukonit"}, {STRING_INSTALLDELETEPARTITION, " ENTER = Instalovat D = Odstranit oddl F3 = Ukonit"}, {STRING_DELETEPARTITION, - " D = Delete Partition F3 = Quit"}, + " D = Odstranit oddl F3 = Ukonit"}, {STRING_PARTITIONSIZE, "Velikost novho oddlu:"}, {STRING_CHOOSENEWPARTITION, - "You have chosen to create a primary partition on"}, -// "Zvolili jste vytvoen novho oddlu na"}, + "Zvolili jste vytvoen novho primrnho oddlu na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, - "You have chosen to create an extended partition on"}, + "Zvolili jste vytvoen novho rozenho oddlu na"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, - "You have chosen to create a logical partition on"}, + "Zvolili jste vytvoen novho logickho oddlu na"}, {STRING_HDDSIZE, "Zadejte velikost novho oddlu v megabajtech."}, {STRING_CREATEPARTITION, @@ -1745,7 +1742,7 @@ MUI_STRING csCZStrings[] = {STRING_MAXSIZE, "MB (max. %lu MB)"}, {STRING_EXTENDED_PARTITION, - "Extended Partition"}, + "Rozen oddl"}, {STRING_UNFORMATTED, "Nov (Nenaformtovan)"}, {STRING_FORMATUNUSED, diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 3d700c44004..7cecd01647f 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -3,6 +3,7 @@ * Use ReactOS forum PM or IRC to contact me * http://www.reactos.org * IRC: irc.freenode.net #reactos-pl; + * Updated by Saibamen and Wojo664 (July, 2014) */ #pragma once @@ -828,14 +829,13 @@ static MUI_ENTRY plPLSelectPartitionEntries[] = { 8, 15, - "\x07 Press P to create a primary partition.", -// "\x07 Nacinij C, by stworzy now partycj.", + "\x07 Nacinij P, by stworzy partycj podstawow.", TEXT_STYLE_NORMAL }, { 8, 17, - "\x07 Press E to create an extended partition.", + "\x07 Nacinij E, by stworzy partycj rozszerzon.", TEXT_STYLE_NORMAL }, { @@ -1296,7 +1296,7 @@ MUI_ERROR plPLErrorEntries[] = { { // NOT_AN_ERROR - "Success\n" + "Sukces\n" }, { //ERROR_NOT_INSTALLED @@ -1510,29 +1510,29 @@ MUI_ERROR plPLErrorEntries[] = }, { //ERROR_PARTITION_TABLE_FULL, - "You can not create a new primary or extended partition in the\n" - "partition table of this disk because the partition table is full.\n" + "Nie mona utworzy na tym dysku partycji podstawowej lub\n" // FIXME + "rozszerzonej, poniewa tabela partycji jest pena.\n" "\n" - " * Press any key to continue." + " * Nacinij dowolny klawisz, aby kontynuowa." }, { //ERROR_ONLY_ONE_EXTENDED, - "You can not create more than one extended partition per disk.\n" + "Nie moesz utworzy wicej ni jednej partycji rozszerzonej na dysku.\n" "\n" - " * Press any key to continue." + " * Nacinij dowolny klawisz, aby kontynuowa." }, { //ERROR_NOT_BEHIND_EXTENDED, - "You can not create a partition behind an extended partition.\n" + "Nie moesz utworzy partycji za partycj rozszerzon.\n" "\n" - " * Press any key to continue." + " * Nacinij dowolny klawisz, aby kontynuowa." }, { //ERROR_EXTENDED_NOT_LAST, - "An extended partition must always be the last\n" - "partition in a partition table.\n" + "Partycja rozszerzona musi by zawsze ostatni\n" + "partycj w tabeli partycji.\n" "\n" - " * Press any key to continue." + " * Nacinij dowolny klawisz, aby kontynuowa." }, { NULL, @@ -1646,23 +1646,21 @@ MUI_STRING plPLStrings[] = {STRING_PLEASEWAIT, " Prosz czeka..."}, {STRING_INSTALLCREATEPARTITION, - " ENTER = Install P = Create Primary E = Create Extended F3 = Quit"}, -// " ENTER = Instalacja C = Utworzenie Partycji F3 = Wyjcie"}, + " ENTER = Instalacja P = Partycja Podstawowa E = Rozszerzona F3 = Wyjcie"}, {STRING_INSTALLCREATELOGICAL, - " ENTER = Install L = Create Logical Partition F3 = Quit"}, + " ENTER = Instalacja L = Utworzenie Partycji Logicznej F3 = Wyjcie"}, {STRING_INSTALLDELETEPARTITION, " ENTER = Instalacja D = Skasowanie Partycji F3 = Wyjcie"}, {STRING_DELETEPARTITION, - " D = Delete Partition F3 = Quit"}, + " D = Skasowanie Partycji F3 = Wyjcie"}, {STRING_PARTITIONSIZE, "Rozmiar nowej partycji:"}, {STRING_CHOOSENEWPARTITION, - "You have chosen to create a primary partition on"}, -// "Wybrane: utworzenie nowej partycji na"}, + "Wybrane: utworzenie nowej partycji podstawowej na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, - "You have chosen to create an extended partition on"}, + "Wybrane: utworzenie nowej partycji rozszerzonej na"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, - "You have chosen to create a logical partition on"}, + "Wybrane: utworzenie nowej partycji logicznej na"}, {STRING_HDDSIZE, "Prosz wprowadzi rozmiar nowej partycji w megabajtach."}, {STRING_CREATEPARTITION, diff --git a/base/setup/usetup/lang/tr-TR.h b/base/setup/usetup/lang/tr-TR.h index ecd2d9344da..5488f830a15 100644 --- a/base/setup/usetup/lang/tr-TR.h +++ b/base/setup/usetup/lang/tr-TR.h @@ -617,7 +617,7 @@ static MUI_ENTRY trTRQuitPageEntries[] = { 10, 9, - "CD-ROM'lar karnz.", + "CD-ROM'lar kartnz.", TEXT_STYLE_NORMAL }, { @@ -714,7 +714,7 @@ static MUI_ENTRY trTRSuccessPageEntries[] = { 10, 9, - "CD-ROM'lar karnz.", + "CD-ROM'lar kartnz.", TEXT_STYLE_NORMAL }, { @@ -1639,7 +1639,7 @@ MUI_STRING trTRStrings[] = {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "zerinde bir mantklk blm oluturmay setiniz:"}, {STRING_HDDSIZE, - "Ltfen yeni blmn bykln megabayt olarak giriniz."}, + "Ltfen yeni blmn bykln megaoklu olarak giriniz."}, {STRING_CREATEPARTITION, " Giri = Blm Olutur k = ptal F3 = k"}, {STRING_PARTFORMAT, diff --git a/base/setup/usetup/usetup.h b/base/setup/usetup/usetup.h index 48914d16bad..66964122351 100644 --- a/base/setup/usetup/usetup.h +++ b/base/setup/usetup/usetup.h @@ -48,6 +48,7 @@ #include #include #include +#include /* Filesystem headers */ #include diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc index 6d7925996e0..3acd352ff67 100644 --- a/base/shell/cmd/lang/ru-RU.rc +++ b/base/shell/cmd/lang/ru-RU.rc @@ -122,7 +122,7 @@ DEL [/N /P /T /Q /S /W /Y /Z /A[[:]атрибуты]] имена_файлов .. DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]атрибуты]] имена_файлов ...\n\ ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]атрибуты]] имена_файлов ...\n\n\ имена_файлов Имена одного или нескольких файлов.\n\n\ - /N Невыполнять непосредственно операцию удаления файла.\n\ + /N Не выполнять непосредственно операцию удаления файла.\n\ /P Запрос на подтверждение перед удалением каждого файла.\n\ /T Показывает количество удаленных файлов и освободившегося\n\ дискового пространства.\n\ @@ -250,11 +250,14 @@ DEFINED переменная Это условие является истин STRING_LOCALE_HELP1 "Текущее время: " STRING_MKDIR_HELP "Создание каталога.\n\n\ MKDIR [диск:]путь\nMD [диск:]путь" - STRING_MKLINK_HELP "Creates a filesystem link object.\n\n\ -MKLINK [/D | /H | /J] linkname target\n\n\ - /D Indicates that the symbolic link target is a directory.\n\ - /H Create a hard link.\n\ - /J Create a directory junction.\n\n\ + STRING_MKLINK_HELP "Создание символической ссылки.\n\n\ +MKLINK [[/D] | [/H] | [/J]] Ссылка Назначение\n\n\ + /D Создание символической ссылки на каталог.\n\ + /H Создание жесткой связи вместо символической ссылки.\n\ + /J Создание соединения для каталога.\n\ + Ссылка Имя новой символической ссылки.\n\ + Назначение Путь (относительный или абсолютный), на который ссылается\n\ + новая ссылка.\n\n\ If neither /H or /J is specified, a symbolic link is created." STRING_MEMMORY_HELP1 "Вывод объема системной памяти.\n\nMEMORY" STRING_MEMMORY_HELP2 "\n %12s%% memory load.\n\n\ @@ -331,33 +334,33 @@ REN [/E /N /P /Q /S /T] старое_имя ... новое_имя\n\n\ /N Nothing.\n\ /P Запрос подтверждения перед переименованием.\n\ (Не реализовано в данный момент!)\n\ - /Q Quiet.\n\ + /Q Тихий режим.\n\ /S Переименовывать подкаталоги.\n\ /T Вывод количества переименованных файлов.\n\n\ Для конечного файла нельзя указать другой диск или каталог.\n\ Для этой цели следует использовать команду MOVE.\n" STRING_REN_HELP2 " %lu файл переименован\n" STRING_REN_HELP3 " %lu файлов переименовано\n" - STRING_REPLACE_HELP1 "Replaces files.\n\n\ -REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\ -REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\ - [drive1:][path1]filename Specifies the source file or files.\n\ - [drive2:][path2] Specifies the directory where files are to be\n\ - replaced.\n\ - /A Adds new files to destination directory. Cannot\n\ - use with /S or /U switches.\n\ - /P Prompts for confirmation before replacing a file or\n\ - adding a source file.\n\ - /R Replaces read-only files as well as unprotected\n\ - files.\n\ - /S Replaces files in all subdirectories of the\n\ - destination directory. Cannot use with the /A\n\ - switch.\n\ - /W Waits for you to insert a disk before beginning.\n\ - /U Replaces (updates) only files that are older than\n\ - source files. Cannot use with the /A switch.\n" - STRING_REPLACE_HELP2 "Source path required\n" - STRING_REPLACE_HELP3 "No files replaced\n" + STRING_REPLACE_HELP1 "Замена файлов.\n\n\ +REPLACE [диск1:][путь1]имя_файла [диск2:][путь2] [/A] [/P] [/R] [/W]\n\ +REPLACE [диск1:][путь1]имя_файла [диск2:][путь2] [/P] [/R] [/S] [/W] [/U]\n\n\ + [диск1:][путь1]имя_файла Один или несколько исходных файлов.\n\ + [диск2:][путь2] Каталог, в котором следует заменить\n\ + файлы.\n\ + /A Добавление новых файлов в конечный каталог.\n\ + Этот ключ несовместим с ключами /S и /U.\n\ + /P Вывод запроса перед заменой или\n\ + добавлением файла.\n\ + /R Разрешение замены файлов, предназначенных\n\ + только для чтения (среди прочих).\n\ + /S Замена файлов во всех подкаталогах\n\ + конечного каталога.\n\ + Этот ключ несовместим с ключом /A.\n\ + /W Ожидание вставки диска перед началом выполнения.\n\ + /U Замена только файлов, более старых, чем исходные.\n\ + Этот ключ несовместим с ключом /A.\n" + STRING_REPLACE_HELP2 "Необходимо указать путь к исходным файлам.\n" + STRING_REPLACE_HELP3 "Ни один файл не заменен\n" STRING_REPLACE_HELP4 "%lu file(s) replaced\n" STRING_REPLACE_HELP5 "Replacing %s\n" STRING_REPLACE_HELP6 "Replace %s\n" @@ -380,7 +383,7 @@ SET без параметров выводит текущие значения STRING_START_HELP1 "Запуск указанной программы или команды.\n\n\ START команда\n\n\ команда Команда или программа для запуска.\n\n\ -At the moment all commands are started asynchronously.\n" +В данный момент все команды запускаются асинхронно.\n" STRING_TITLE_HELP "Изменение заголовка окна командной строки.\n\n\ TITLE [строка]\n\n\ строка Будущий заголовок окна командной строки.\n" @@ -408,8 +411,8 @@ TIMER [ON|OFF] [/S] [/n] [/Fn]\n\n\ Если ни один из параметров не указан, команда\n\ переключает состояние секундомера\n\n" STRING_TYPE_HELP1 "Вывод содержимого одного или нескольких текстовых файлов.\n\nTYPE [диск:][путь]имя файла \n\ - /P Поэкранный вывод.\n" - STRING_VERIFY_HELP1 "This command is just a dummy!!\n\ + /P Полноэкранный вывод.\n" + STRING_VERIFY_HELP1 "Эта команда пустышка!!!\n\ Включение или отключение режима проверки правильности записи файлов a\n\ на диск.\n\n\ VERIFY [ON | OFF]\n\n\ @@ -417,8 +420,8 @@ VERIFY без параметра выводит текущее значение STRING_VERIFY_HELP2 "VERIFY %s.\n" STRING_VERIFY_HELP3 "Необходимо указать ON или OFF." STRING_VERSION_HELP1 "Вывод версии\n\n\ -VER [/C][/R][/W]\n\n\ - /C Displays credits.\n\ +VER [/C] [/R] [/W]\n\n\ + /C Отображает авторов.\n\ /R Displays redistribution information.\n\ /W Displays warranty information." STRING_VERSION_HELP2 " comes with ABSOLUTELY NO WARRANTY; for details\n\ @@ -460,7 +463,7 @@ RESTORE восстанавливает окно\n\ STRING_CHOICE_OPTION "YN" STRING_COPY_OPTION "YNA" STRING_ALIAS_ERROR "Командная строка слишком длинная после развертывания псевдонимов!\n" - STRING_ASSOC_ERROR "File association not found for extension %s\n" + STRING_ASSOC_ERROR "Не найдено файловых ассоциаций для расширения %s\n" STRING_BATCH_ERROR "Ошибка открытия командного файла\n" STRING_CHCP_ERROR1 "Текущая кодовая страница: %u\n" STRING_CHCP_ERROR4 "Ошибочная кодовая страница\n" @@ -487,18 +490,18 @@ RESTORE восстанавливает окно\n\ STRING_ERROR_ERROR1 "Неизвестная ошибка! Код ошибки: 0x%lx\n" STRING_ERROR_ERROR2 "Синтаксическая ошибка" STRING_FOR_ERROR1 "'in' отсутствует в команде for." - STRING_FOR_ERROR2 "скобок необнаружено." - STRING_FOR_ERROR3 "'do' отсутсвует." + STRING_FOR_ERROR2 "скобок не обнаружено." + STRING_FOR_ERROR3 "'do' отсутствует." STRING_FOR_ERROR4 "нет команды после 'do'." STRING_FREE_ERROR1 "Неправильное имя диска" - STRING_FREE_ERROR2 "неотмечено" + STRING_FREE_ERROR2 "не отмечено" STRING_GOTO_ERROR1 "Не определена метка для GOTO" STRING_GOTO_ERROR2 "Метка '%s' не найдена\n" STRING_MD_ERROR "Подкаталог или файл уже существует.\n" STRING_MD_ERROR2 "Путь к новому каталогу не существует.\n" STRING_MOVE_ERROR1 "[OK]\n" STRING_MOVE_ERROR2 "[Ошибка]\n" - STRING_REN_ERROR1 "Выполнение MoveFile() было неуспешным. Ошибка: %lu\n" + STRING_REN_ERROR1 "Выполнение MoveFile() было не успешным. Ошибка: %lu\n" STRING_START_ERROR1 "На данный момент нет поддержки пакетных файлов!" STRING_TIME_ERROR1 "Неправильное время." STRING_TYPE_ERROR1 "Неправильный параметр '/%s'\n" @@ -518,26 +521,26 @@ RESTORE восстанавливает окно\n\ STRING_ERROR_DRIVER_NOT_READY "Устройство не готово" STRING_PATH_ERROR "CMD: Не в среде окружения '%s'\n" STRING_REPLACE_ERROR1 "Invalid switch - %s\n"//FIXME - STRING_REPLACE_ERROR2 "Path not found - %s\n" - STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n" - STRING_REPLACE_ERROR4 "Invalid parameter combination\n" - STRING_REPLACE_ERROR5 "Access denied - %s\n" - STRING_REPLACE_ERROR6 "No files found - %s\n" + STRING_REPLACE_ERROR2 "Путь не найден - %s\n" + STRING_REPLACE_ERROR3 "Имя файла, папки или метка диска неверная.\n" + STRING_REPLACE_ERROR4 "Неверная комбинация параметров\n" + STRING_REPLACE_ERROR5 "Доступ запрещен - %s\n" + STRING_REPLACE_ERROR6 "Не найдено файлов - %s\n" STRING_REPLACE_ERROR7 "Extended Error 32\n" - STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n" - STRING_CMD_SHELLINFO "\nИнтерпретатор командной строки ReactOS\nVersion %s %s" + STRING_REACTOS_VERSION "Операционная система ReactOS [Версия %s-%s]\n" + STRING_CMD_SHELLINFO "\nИнтерпретатор командной строки ReactOS\nВерсия %s %s" STRING_VERSION_RUNVER " запущен на %s" STRING_COPY_FILE " %d файл(ов) скопировано\n" - STRING_DELETE_WIPE "wiped" + STRING_DELETE_WIPE "очищено" STRING_FOR_ERROR "неправильное задание переменной." - STRING_SCREEN_COL "неправильное значение для кол" - STRING_SCREEN_ROW "неправильное значение для стр" + STRING_SCREEN_COL "неправильное значение для колонок" + STRING_SCREEN_ROW "неправильное значение для строк" STRING_TIMER_TIME "Timer %d is %s: " - STRING_MKLINK_CREATED_SYMBOLIC "Symbolic link created for %s <<===>> %s\n" - STRING_MKLINK_CREATED_HARD "Hard link created for %s <<===>> %s\n" + STRING_MKLINK_CREATED_SYMBOLIC "Символическая ссылка создана для %s <<===>> %s\n" + STRING_MKLINK_CREATED_HARD "Жесткая связь создана для %s <<===>> %s\n" STRING_MKLINK_CREATED_JUNCTION "Junction created for %s <<===>> %s\n" - STRING_MORE "More? " - STRING_CANCEL_BATCH_FILE "\r\nCtrl-Break pressed. Cancel batch file? (Yes/No/All) " + STRING_MORE "Еще? " + STRING_CANCEL_BATCH_FILE "\r\nЗавершить выполнение пакетного файла [Y(да)/N(нет)]? " STRING_INVALID_OPERAND "Неверный операнд." STRING_EXPECTED_CLOSE_PAREN "Ожидается ')'." STRING_EXPECTED_NUMBER_OR_VARIABLE "Ожидается число или название переменной." diff --git a/base/system/smss/smss.h b/base/system/smss/smss.h index 213fe347ce5..831aeeaecb0 100644 --- a/base/system/smss/smss.h +++ b/base/system/smss/smss.h @@ -18,13 +18,6 @@ #include #include -#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) -#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) -#ifdef ENABLE_RTL_NUMBER_OF_V2 -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) -#else -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) -#endif #define NTOS_MODE_USER #include #include diff --git a/base/system/winlogon/lang/tr-TR.rc b/base/system/winlogon/lang/tr-TR.rc index b919dcb19c5..bbf0432a707 100644 --- a/base/system/winlogon/lang/tr-TR.rc +++ b/base/system/winlogon/lang/tr-TR.rc @@ -34,7 +34,7 @@ BEGIN IDS_LOADINGYOURPERSONALSETTINGS "Şahsî Ayarlarınız Yükleniyor..." IDS_CLOSINGNETWORKCONNECTIONS "Ağ Bağlantıları Kapatılıyor..." IDS_REACTOSISSHUTTINGDOWN "ReactOS Kapatılıyor..." - IDS_PREPARETOSTANDBY "Beklemeye Anıklanıyor..." + IDS_PREPARETOSTANDBY "Uykuya Anıklanıyor..." IDS_PREPARETOHIBERNATE "Anıkta Beklemeye Anıklanıyor..." IDS_SAVEYOURSETTINGS "Ayarlarınız Kaydediliyor..." IDS_REACTOSISSTARTINGUP "ReactOS Başlatılıyor..." diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c index f61ee6e66d6..4baa56cfa7b 100644 --- a/base/system/winlogon/sas.c +++ b/base/system/winlogon/sas.c @@ -776,6 +776,7 @@ HandleShutdown( PLOGOFF_SHUTDOWN_DATA LSData; HANDLE hThread; DWORD exitCode; + BOOLEAN Old; DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_REACTOSISSHUTTINGDOWN); @@ -821,6 +822,7 @@ HandleShutdown( UninitializeSAS(Session); FIXME("FIXME: Call SMSS API #1\n"); + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, &Old); if (wlxAction == WLX_SAS_ACTION_SHUTDOWN_REBOOT) NtShutdownSystem(ShutdownReboot); else @@ -832,6 +834,7 @@ HandleShutdown( } NtShutdownSystem(ShutdownNoReboot); } + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, Old, FALSE, &Old); return STATUS_SUCCESS; } diff --git a/boot/bootdata/hivedef.inf b/boot/bootdata/hivedef.inf index 856ad776f5a..4e3c512c070 100644 --- a/boot/bootdata/hivedef.inf +++ b/boot/bootdata/hivedef.inf @@ -1918,40 +1918,41 @@ TEMP_DIR="%USERPROFILE%\Local Settings\Temp" ; LANG_CZECH SUBLANG_NEUTRAL [Strings.0005] -POWERCFG_NAME_0="Home/Office Desk" -POWERCFG_DESC_0="This scheme is suited to most home or desktop computers that are left plugged in all the time." -POWERCFG_NAME_1="Portable/Laptop" -POWERCFG_DESC_1="This scheme is designed for extended battery life for portable computers on the road." -POWERCFG_NAME_2="Presentation" -POWERCFG_DESC_2="This scheme keeps the monitor on for doing presentations." -POWERCFG_NAME_3="Always On" -POWERCFG_DESC_3="This scheme keeps the computer running so that it can be accessed from the network. Use this scheme if you do not have network wakeup hardware." -POWERCFG_NAME_4="Minimal Power Management" -POWERCFG_DESC_4="This scheme keeps the computer on and optimizes it for high performance." -POWERCFG_NAME_5="Max Battery" -POWERCFG_DESC_5="This scheme is extremely aggressive for saving power." +POWERCFG_NAME_0="Doma/V kanceláři" +POWERCFG_DESC_0="Toto schéma je vhodné pro většinu domácích či pracovních počítačů, které jsou stále zapojené." +POWERCFG_NAME_1="Notebook" +POWERCFG_DESC_1="Toto schéma je navrženo pro prodlouženou výdrž na baterii pro přenosné počítače na cestách." +POWERCFG_NAME_2="Prezentace" +POWERCFG_DESC_2="Toto schéma udržuje zapnutý monitor během prezentace." +POWERCFG_NAME_3="Pořád zapnuto" +POWERCFG_DESC_3="Toto schéma udržuje počítač zapnutý, aby byl dostupný přes síť. Zvolte toto schéma, pokud Váš hardware nepodporuje síťové probouzení." +POWERCFG_NAME_4="Maximální výkon" +POWERCFG_DESC_4="Toto schéma udržuje počítač zapnutý a umožní nejvyšší výkon." +POWERCFG_NAME_5="Maximální baterie" +POWERCFG_DESC_5="Toto schéma extrémně spoří energii." DESKTOP_SCHEME_0="ReactOS Standard" -DESKTOP_SCHEME_1="Brick" -DESKTOP_SCHEME_2="Eggplant" -DESKTOP_SCHEME_3="Green Olive" -DESKTOP_SCHEME_4="High Contrast 1" -DESKTOP_SCHEME_5="High Contrast 2" -DESKTOP_SCHEME_6="High Contrast Black" -DESKTOP_SCHEME_7="High Contrast White" -DESKTOP_SCHEME_8="Lilac" -DESKTOP_SCHEME_9="Maple" -DESKTOP_SCHEME_10="Marine" -DESKTOP_SCHEME_11="Plum" -DESKTOP_SCHEME_12="Pumpkin" -DESKTOP_SCHEME_13="Rainy Day" +DESKTOP_SCHEME_1="Cihla" +DESKTOP_SCHEME_2="Lilek" +DESKTOP_SCHEME_3="Zelená oliva" +DESKTOP_SCHEME_4="Vysoký kontrast 1" +DESKTOP_SCHEME_5="Vysoký kontrast 2" +DESKTOP_SCHEME_6="Vysoký kontrast černá" +DESKTOP_SCHEME_7="Vysoký kontrast bílá" +DESKTOP_SCHEME_8="Šeřík" +DESKTOP_SCHEME_9="Javor" +DESKTOP_SCHEME_10="Námořní" +DESKTOP_SCHEME_11="Švestka" +DESKTOP_SCHEME_12="Dýně" +DESKTOP_SCHEME_13="Deštivý den" DESKTOP_SCHEME_14="ReactOS Classic" -DESKTOP_SCHEME_15="Rose" -DESKTOP_SCHEME_16="Sand" -DESKTOP_SCHEME_17="Sky" -DESKTOP_SCHEME_18="Slate" -DESKTOP_SCHEME_19="Storm" -DESKTOP_SCHEME_20="Teal" -DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_15="Růže" +DESKTOP_SCHEME_16="Písek" +DESKTOP_SCHEME_17="Nebe" +DESKTOP_SCHEME_18="Břidlice" +DESKTOP_SCHEME_19="Bouře" +DESKTOP_SCHEME_20="Modrozelená" +DESKTOP_SCHEME_21="Pšenice" +DESKTOP_SCHEME_SIZE_0="Výchozí velikost" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -1991,6 +1992,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Lokale Indstillinger\Temp" @@ -2030,6 +2032,7 @@ DESKTOP_SCHEME_18="Schiefer" DESKTOP_SCHEME_19="Sturm" DESKTOP_SCHEME_20="Türkis" DESKTOP_SCHEME_21="Gelbbraun" +DESKTOP_SCHEME_SIZE_0="Standardgröße" TEMP_DIR="%USERPROFILE%\Lokale Einstellungen\Temp" @@ -2069,6 +2072,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2108,6 +2112,7 @@ DESKTOP_SCHEME_18="Gris" DESKTOP_SCHEME_19="Tormenta" DESKTOP_SCHEME_20="Verde agua" DESKTOP_SCHEME_21="Tabaco" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Configuración Local\Temp" @@ -2147,6 +2152,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Paikalliset Asetukset\Temp" @@ -2186,6 +2192,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2225,6 +2232,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2264,6 +2272,7 @@ DESKTOP_SCHEME_18="Lavagna" DESKTOP_SCHEME_19="Tempesta" DESKTOP_SCHEME_20="Verde acqua" DESKTOP_SCHEME_21="Tabacco" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Impostazioni locali\Temp" @@ -2303,6 +2312,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2342,6 +2352,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2381,6 +2392,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Lokale innstillinger\Midlertidig" @@ -2420,6 +2432,7 @@ DESKTOP_SCHEME_18="Łupek" DESKTOP_SCHEME_19="Burza" DESKTOP_SCHEME_20="Morska Zieleń" DESKTOP_SCHEME_21="Pszenica" +DESKTOP_SCHEME_SIZE_0="Domyślny rozmiar" TEMP_DIR="%USERPROFILE%\Ustawienia lokalne\Temp" @@ -2464,6 +2477,7 @@ DESKTOP_SCHEME_18="Ardezie" DESKTOP_SCHEME_19="Furtună" DESKTOP_SCHEME_20="Turcoaz" DESKTOP_SCHEME_21="Grâu" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Preferințe locale\Temp" @@ -2503,6 +2517,7 @@ DESKTOP_SCHEME_18="Шифер" DESKTOP_SCHEME_19="Шторм" DESKTOP_SCHEME_20="Зеленовато-голубая" DESKTOP_SCHEME_21="Пшеница" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2542,6 +2557,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2591,6 +2607,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2630,6 +2647,7 @@ DESKTOP_SCHEME_18="Шифер" DESKTOP_SCHEME_19="Шторм" DESKTOP_SCHEME_20="Зеленовато-блакитна" DESKTOP_SCHEME_21="Пшениця" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" @@ -2669,6 +2687,7 @@ DESKTOP_SCHEME_18="Slate" DESKTOP_SCHEME_19="Storm" DESKTOP_SCHEME_20="Teal" DESKTOP_SCHEME_21="Wheat" +DESKTOP_SCHEME_SIZE_0="Default size" TEMP_DIR="%USERPROFILE%\Local Settings\Temp" ; EOF diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index 3e1fa3638f2..aa367164c6e 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -248,6 +248,186 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","OEMFONT.FON" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","DisableRemoteFontBootCache",0x00010001,0x00000000 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","LastBootTimeFontCacheState",0x00010001,0x00000002 +; Certificates +; RapidSSL CA +HKLM,"SOFTWARE\Microsoft\SystemCertificates\CA\Certificates\C039A3269EE4B8E82D00C53FA797B5A19E836F47","Blob",0x00000001,\ + 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xD9,0x03,0x00,0x00,0x30,0x82,0x03,0xD5,\ + 0x30,0x82,0x02,0xBD,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x02,0x36,0xD1,0x30,0x0D,\ + 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x42,0x31,\ + 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,\ + 0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,\ + 0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,\ + 0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,\ + 0x41,0x30,0x1E,0x17,0x0D,0x31,0x30,0x30,0x32,0x31,0x39,0x32,0x32,0x34,0x35,0x30,\ + 0x35,0x5A,0x17,0x0D,0x32,0x30,0x30,0x32,0x31,0x38,0x32,0x32,0x34,0x35,0x30,0x35,\ + 0x5A,0x30,0x3C,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,\ + 0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x47,0x65,0x6F,0x54,0x72,\ + 0x75,0x73,0x74,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x14,0x30,0x12,0x06,0x03,0x55,\ + 0x04,0x03,0x13,0x0B,0x52,0x61,0x70,0x69,0x64,0x53,0x53,0x4C,0x20,0x43,0x41,0x30,\ + 0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,\ + 0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,\ + 0xC7,0x71,0xF8,0x56,0xC7,0x1E,0xD9,0xCC,0xB5,0xAD,0xF6,0xB4,0x97,0xA3,0xFB,0xA1,\ + 0xE6,0x0B,0x50,0x5F,0x50,0xAA,0x3A,0xDA,0x0F,0xFC,0x3D,0x29,0x24,0x43,0xC6,0x10,\ + 0x29,0xC1,0xFC,0x55,0x40,0x72,0xEE,0xBD,0xEA,0xDF,0x9F,0xB6,0x41,0xF4,0x48,0x4B,\ + 0xC8,0x6E,0xFE,0x4F,0x57,0x12,0x8B,0x5B,0xFA,0x92,0xDD,0x5E,0xE8,0xAD,0xF3,0xF0,\ + 0x1B,0xB1,0x7B,0x4D,0xFB,0xCF,0xFD,0xD1,0xE5,0xF8,0xE3,0xDC,0xE7,0xF5,0x73,0x7F,\ + 0xDF,0x01,0x49,0xCF,0x8C,0x56,0xC1,0xBD,0x37,0xE3,0x5B,0xBE,0xB5,0x4F,0x8B,0x8B,\ + 0xF0,0xDA,0x4F,0xC7,0xE3,0xDD,0x55,0x47,0x69,0xDF,0xF2,0x5B,0x7B,0x07,0x4F,0x3D,\ + 0xE5,0xAC,0x21,0xC1,0xC8,0x1D,0x7A,0xE8,0xE7,0xF6,0x0F,0xA1,0xAA,0xF5,0x6F,0xDE,\ + 0xA8,0x65,0x4F,0x10,0x89,0x9C,0x03,0xF3,0x89,0x7A,0xA5,0x5E,0x01,0x72,0x33,0xED,\ + 0xA9,0xE9,0x5A,0x1E,0x79,0xF3,0x87,0xC8,0xDF,0xC8,0xC5,0xFC,0x37,0xC8,0x9A,0x9A,\ + 0xD7,0xB8,0x76,0xCC,0xB0,0x3E,0xE7,0xFD,0xE6,0x54,0xEA,0xDF,0x5F,0x52,0x41,0x78,\ + 0x59,0x57,0xAD,0xF1,0x12,0xD6,0x7F,0xBC,0xD5,0x9F,0x70,0xD3,0x05,0x6C,0xFA,0xA3,\ + 0x7D,0x67,0x58,0xDD,0x26,0x62,0x1D,0x31,0x92,0x0C,0x79,0x79,0x1C,0x8E,0xCF,0xCA,\ + 0x7B,0xC1,0x66,0xAF,0xA8,0x74,0x48,0xFB,0x8E,0x82,0xC2,0x9E,0x2C,0x99,0x5C,0x7B,\ + 0x2D,0x5D,0x9B,0xBC,0x5B,0x57,0x9E,0x7C,0x3A,0x7A,0x13,0xAD,0xF2,0xA3,0x18,0x5B,\ + 0x2B,0x59,0x0F,0xCD,0x5C,0x3A,0xEB,0x68,0x33,0xC6,0x28,0x1D,0x82,0xD1,0x50,0x8B,\ + 0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0xD9,0x30,0x81,0xD6,0x30,0x0E,0x06,0x03,0x55,\ + 0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x1D,0x06,0x03,0x55,\ + 0x1D,0x0E,0x04,0x16,0x04,0x14,0x6B,0x69,0x3D,0x6A,0x18,0x42,0x4A,0xDD,0x8F,0x02,\ + 0x65,0x39,0xFD,0x35,0x24,0x86,0x78,0x91,0x16,0x30,0x30,0x1F,0x06,0x03,0x55,0x1D,\ + 0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xC0,0x7A,0x98,0x68,0x8D,0x89,0xFB,0xAB,0x05,\ + 0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65,0xB8,0xCA,0xCC,0x4E,0x30,0x12,0x06,0x03,0x55,\ + 0x1D,0x13,0x01,0x01,0xFF,0x04,0x08,0x30,0x06,0x01,0x01,0xFF,0x02,0x01,0x00,0x30,\ + 0x3A,0x06,0x03,0x55,0x1D,0x1F,0x04,0x33,0x30,0x31,0x30,0x2F,0xA0,0x2D,0xA0,0x2B,\ + 0x86,0x29,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x67,0x65,0x6F,\ + 0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x72,0x6C,0x73,0x2F,0x67,\ + 0x74,0x67,0x6C,0x6F,0x62,0x61,0x6C,0x2E,0x63,0x72,0x6C,0x30,0x34,0x06,0x08,0x2B,\ + 0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x28,0x30,0x26,0x30,0x24,0x06,0x08,0x2B,\ + 0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,\ + 0x6F,0x63,0x73,0x70,0x2E,0x67,0x65,0x6F,0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,\ + 0x6D,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,\ + 0x03,0x82,0x01,0x01,0x00,0xAB,0xBC,0xBC,0x0A,0x5D,0x18,0x94,0xE3,0xC1,0xB1,0xC3,\ + 0xA8,0x4C,0x55,0xD6,0xBE,0xB4,0x98,0xF1,0xEE,0x3C,0x1C,0xCD,0xCF,0xF3,0x24,0x24,\ + 0x5C,0x96,0x03,0x27,0x58,0xFC,0x36,0xAE,0xA2,0x2F,0x8F,0xF1,0xFE,0xDA,0x2B,0x02,\ + 0xC3,0x33,0xBD,0xC8,0xDD,0x48,0x22,0x2B,0x60,0x0F,0xA5,0x03,0x10,0xFD,0x77,0xF8,\ + 0xD0,0xED,0x96,0x67,0x4F,0xFD,0xEA,0x47,0x20,0x70,0x54,0xDC,0xA9,0x0C,0x55,0x7E,\ + 0xE1,0x96,0x25,0x8A,0xD9,0xB5,0xDA,0x57,0x4A,0xBE,0x8D,0x8E,0x49,0x43,0x63,0xA5,\ + 0x6C,0x4E,0x27,0x87,0x25,0xEB,0x5B,0x6D,0xFE,0xA2,0x7F,0x38,0x28,0xE0,0x36,0xAB,\ + 0xAD,0x39,0xA5,0xA5,0x62,0xC4,0xB7,0x5C,0x58,0x2C,0xAA,0x5D,0x01,0x60,0xA6,0x62,\ + 0x67,0xA3,0xC0,0xC7,0x62,0x23,0xF4,0xE7,0x6C,0x46,0xEE,0xB5,0xD3,0x80,0x6A,0x22,\ + 0x13,0xD2,0x2D,0x3F,0x74,0x4F,0xEA,0xAF,0x8C,0x5F,0xB4,0x38,0x9C,0xDB,0xAE,0xCE,\ + 0xAF,0x84,0x1E,0xA6,0xF6,0x34,0x51,0x59,0x79,0xD3,0xE3,0x75,0xDC,0xBC,0xD7,0xF3,\ + 0x73,0xDF,0x92,0xEC,0xD2,0x20,0x59,0x6F,0x9C,0xFB,0x95,0xF8,0x92,0x76,0x18,0x0A,\ + 0x7C,0x0F,0x2C,0xA6,0xCA,0xDE,0x8A,0x62,0x7B,0xD8,0xF3,0xCE,0x5F,0x68,0xBD,0x8F,\ + 0x3E,0xC1,0x74,0xBB,0x15,0x72,0x3A,0x16,0x83,0xA9,0x0B,0xE6,0x4D,0x99,0x9C,0xD8,\ + 0x57,0xEC,0xA8,0x01,0x51,0xC7,0x6F,0x57,0x34,0x5E,0xAB,0x4A,0x2C,0x42,0xF6,0x4F,\ + 0x1C,0x89,0x78,0xDE,0x26,0x4E,0xF5,0x6F,0x93,0x4C,0x15,0x6B,0x27,0x56,0x4D,0x00,\ + 0x54,0x6C,0x7A,0xB7,0xB7 +; GeoTrustGlobal CA +HKLM,"SOFTWARE\Microsoft\SystemCertificates\CA\Certificates\7359755C6DF9A0ABC3060BCE369564C8EC4542A3","Blob",0x00000001,\ + 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x81,0x03,0x00,0x00,0x30,0x82,0x03,0x7D,\ + 0x30,0x82,0x02,0xE6,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x12,0xBB,0xE6,0x30,0x0D,\ + 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x4E,0x31,\ + 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,0x0E,\ + 0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,0x2D,\ + 0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,\ + 0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,\ + 0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,\ + 0x0D,0x30,0x32,0x30,0x35,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,\ + 0x31,0x38,0x30,0x38,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x30,0x42,0x31,\ + 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,\ + 0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,\ + 0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,\ + 0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,\ + 0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,\ + 0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,\ + 0x01,0x00,0xDA,0xCC,0x18,0x63,0x30,0xFD,0xF4,0x17,0x23,0x1A,0x56,0x7E,0x5B,0xDF,\ + 0x3C,0x6C,0x38,0xE4,0x71,0xB7,0x78,0x91,0xD4,0xBC,0xA1,0xD8,0x4C,0xF8,0xA8,0x43,\ + 0xB6,0x03,0xE9,0x4D,0x21,0x07,0x08,0x88,0xDA,0x58,0x2F,0x66,0x39,0x29,0xBD,0x05,\ + 0x78,0x8B,0x9D,0x38,0xE8,0x05,0xB7,0x6A,0x7E,0x71,0xA4,0xE6,0xC4,0x60,0xA6,0xB0,\ + 0xEF,0x80,0xE4,0x89,0x28,0x0F,0x9E,0x25,0xD6,0xED,0x83,0xF3,0xAD,0xA6,0x91,0xC7,\ + 0x98,0xC9,0x42,0x18,0x35,0x14,0x9D,0xAD,0x98,0x46,0x92,0x2E,0x4F,0xCA,0xF1,0x87,\ + 0x43,0xC1,0x16,0x95,0x57,0x2D,0x50,0xEF,0x89,0x2D,0x80,0x7A,0x57,0xAD,0xF2,0xEE,\ + 0x5F,0x6B,0xD2,0x00,0x8D,0xB9,0x14,0xF8,0x14,0x15,0x35,0xD9,0xC0,0x46,0xA3,0x7B,\ + 0x72,0xC8,0x91,0xBF,0xC9,0x55,0x2B,0xCD,0xD0,0x97,0x3E,0x9C,0x26,0x64,0xCC,0xDF,\ + 0xCE,0x83,0x19,0x71,0xCA,0x4E,0xE6,0xD4,0xD5,0x7B,0xA9,0x19,0xCD,0x55,0xDE,0xC8,\ + 0xEC,0xD2,0x5E,0x38,0x53,0xE5,0x5C,0x4F,0x8C,0x2D,0xFE,0x50,0x23,0x36,0xFC,0x66,\ + 0xE6,0xCB,0x8E,0xA4,0x39,0x19,0x00,0xB7,0x95,0x02,0x39,0x91,0x0B,0x0E,0xFE,0x38,\ + 0x2E,0xD1,0x1D,0x05,0x9A,0xF6,0x4D,0x3E,0x6F,0x0F,0x07,0x1D,0xAF,0x2C,0x1E,0x8F,\ + 0x60,0x39,0xE2,0xFA,0x36,0x53,0x13,0x39,0xD4,0x5E,0x26,0x2B,0xDB,0x3D,0xA8,0x14,\ + 0xBD,0x32,0xEB,0x18,0x03,0x28,0x52,0x04,0x71,0xE5,0xAB,0x33,0x3D,0xE1,0x38,0xBB,\ + 0x07,0x36,0x84,0x62,0x9C,0x79,0xEA,0x16,0x30,0xF4,0x5F,0xC0,0x2B,0xE8,0x71,0x6B,\ + 0xE4,0xF9,0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0xF0,0x30,0x81,0xED,0x30,0x1F,0x06,\ + 0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x48,0xE6,0x68,0xF9,0x2B,0xD2,\ + 0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,0x98,0x90,0x9F,0xD4,0x30,0x1D,\ + 0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xC0,0x7A,0x98,0x68,0x8D,0x89,0xFB,\ + 0xAB,0x05,0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65,0xB8,0xCA,0xCC,0x4E,0x30,0x0F,0x06,\ + 0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x0E,\ + 0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x3A,\ + 0x06,0x03,0x55,0x1D,0x1F,0x04,0x33,0x30,0x31,0x30,0x2F,0xA0,0x2D,0xA0,0x2B,0x86,\ + 0x29,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x67,0x65,0x6F,0x74,\ + 0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x72,0x6C,0x73,0x2F,0x73,0x65,\ + 0x63,0x75,0x72,0x65,0x63,0x61,0x2E,0x63,0x72,0x6C,0x30,0x4E,0x06,0x03,0x55,0x1D,\ + 0x20,0x04,0x47,0x30,0x45,0x30,0x43,0x06,0x04,0x55,0x1D,0x20,0x00,0x30,0x3B,0x30,\ + 0x39,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x2D,0x68,0x74,0x74,\ + 0x70,0x73,0x3A,0x2F,0x2F,0x77,0x77,0x77,0x2E,0x67,0x65,0x6F,0x74,0x72,0x75,0x73,\ + 0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x72,0x65,0x73,0x6F,0x75,0x72,0x63,0x65,0x73,0x2F,\ + 0x72,0x65,0x70,0x6F,0x73,0x69,0x74,0x6F,0x72,0x79,0x30,0x0D,0x06,0x09,0x2A,0x86,\ + 0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x76,0xE1,0x12,\ + 0x6E,0x4E,0x4B,0x16,0x12,0x86,0x30,0x06,0xB2,0x81,0x08,0xCF,0xF0,0x08,0xC7,0xC7,\ + 0x71,0x7E,0x66,0xEE,0xC2,0xED,0xD4,0x3B,0x1F,0xFF,0xF0,0xF0,0xC8,0x4E,0xD6,0x43,\ + 0x38,0xB0,0xB9,0x30,0x7D,0x18,0xD0,0x55,0x83,0xA2,0x6A,0xCB,0x36,0x11,0x9C,0xE8,\ + 0x48,0x66,0xA3,0x6D,0x7F,0xB8,0x13,0xD4,0x47,0xFE,0x8B,0x5A,0x5C,0x73,0xFC,0xAE,\ + 0xD9,0x1B,0x32,0x19,0x38,0xAB,0x97,0x34,0x14,0xAA,0x96,0xD2,0xEB,0xA3,0x1C,0x14,\ + 0x08,0x49,0xB6,0xBB,0xE5,0x91,0xEF,0x83,0x36,0xEB,0x1D,0x56,0x6F,0xCA,0xDA,0xBC,\ + 0x73,0x63,0x90,0xE4,0x7F,0x7B,0x3E,0x22,0xCB,0x3D,0x07,0xED,0x5F,0x38,0x74,0x9C,\ + 0xE3,0x03,0x50,0x4E,0xA1,0xAF,0x98,0xEE,0x61,0xF2,0x84,0x3F,0x12 +; Equifax Secure CA (root) +HKLM,"SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates\D23209AD23D314232174E40D7F9D62139786633A","Blob",0x00000001,\ + 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x24,0x03,0x00,0x00,0x30,0x82,0x03,0x20,\ + 0x30,0x82,0x02,0x89,0xA0,0x03,0x02,0x01,0x02,0x02,0x04,0x35,0xDE,0xF4,0xCF,0x30,\ + 0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x4E,\ + 0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,\ + 0x0E,0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,\ + 0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,\ + 0x78,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,\ + 0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,\ + 0x17,0x0D,0x39,0x38,0x30,0x38,0x32,0x32,0x31,0x36,0x34,0x31,0x35,0x31,0x5A,0x17,\ + 0x0D,0x31,0x38,0x30,0x38,0x32,0x32,0x31,0x36,0x34,0x31,0x35,0x31,0x5A,0x30,0x4E,\ + 0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,\ + 0x0E,0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,\ + 0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,\ + 0x78,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,\ + 0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x81,\ + 0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,\ + 0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xC1,0x5D,0xB1,0x58,0x67,\ + 0x08,0x62,0xEE,0xA0,0x9A,0x2D,0x1F,0x08,0x6D,0x91,0x14,0x68,0x98,0x0A,0x1E,0xFE,\ + 0xDA,0x04,0x6F,0x13,0x84,0x62,0x21,0xC3,0xD1,0x7C,0xCE,0x9F,0x05,0xE0,0xB8,0x01,\ + 0xF0,0x4E,0x34,0xEC,0xE2,0x8A,0x95,0x04,0x64,0xAC,0xF1,0x6B,0x53,0x5F,0x05,0xB3,\ + 0xCB,0x67,0x80,0xBF,0x42,0x02,0x8E,0xFE,0xDD,0x01,0x09,0xEC,0xE1,0x00,0x14,0x4F,\ + 0xFC,0xFB,0xF0,0x0C,0xDD,0x43,0xBA,0x5B,0x2B,0xE1,0x1F,0x80,0x70,0x99,0x15,0x57,\ + 0x93,0x16,0xF1,0x0F,0x97,0x6A,0xB7,0xC2,0x68,0x23,0x1C,0xCC,0x4D,0x59,0x30,0xAC,\ + 0x51,0x1E,0x3B,0xAF,0x2B,0xD6,0xEE,0x63,0x45,0x7B,0xC5,0xD9,0x5F,0x50,0xD2,0xE3,\ + 0x50,0x0F,0x3A,0x88,0xE7,0xBF,0x14,0xFD,0xE0,0xC7,0xB9,0x02,0x03,0x01,0x00,0x01,\ + 0xA3,0x82,0x01,0x09,0x30,0x82,0x01,0x05,0x30,0x70,0x06,0x03,0x55,0x1D,0x1F,0x04,\ + 0x69,0x30,0x67,0x30,0x65,0xA0,0x63,0xA0,0x61,0xA4,0x5F,0x30,0x5D,0x31,0x0B,0x30,\ + 0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,0x0E,0x06,0x03,\ + 0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,0x2D,0x30,0x2B,\ + 0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x20,0x53,\ + 0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,\ + 0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x31,0x0D,0x30,0x0B,0x06,\ + 0x03,0x55,0x04,0x03,0x13,0x04,0x43,0x52,0x4C,0x31,0x30,0x1A,0x06,0x03,0x55,0x1D,\ + 0x10,0x04,0x13,0x30,0x11,0x81,0x0F,0x32,0x30,0x31,0x38,0x30,0x38,0x32,0x32,0x31,\ + 0x36,0x34,0x31,0x35,0x31,0x5A,0x30,0x0B,0x06,0x03,0x55,0x1D,0x0F,0x04,0x04,0x03,\ + 0x02,0x01,0x06,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,\ + 0x48,0xE6,0x68,0xF9,0x2B,0xD2,0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,\ + 0x98,0x90,0x9F,0xD4,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x48,\ + 0xE6,0x68,0xF9,0x2B,0xD2,0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,0x98,\ + 0x90,0x9F,0xD4,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x04,0x05,0x30,0x03,0x01,0x01,\ + 0xFF,0x30,0x1A,0x06,0x09,0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x41,0x00,0x04,0x0D,\ + 0x30,0x0B,0x1B,0x05,0x56,0x33,0x2E,0x30,0x63,0x03,0x02,0x06,0xC0,0x30,0x0D,0x06,\ + 0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,\ + 0x58,0xCE,0x29,0xEA,0xFC,0xF7,0xDE,0xB5,0xCE,0x02,0xB9,0x17,0xB5,0x85,0xD1,0xB9,\ + 0xE3,0xE0,0x95,0xCC,0x25,0x31,0x0D,0x00,0xA6,0x92,0x6E,0x7F,0xB6,0x92,0x63,0x9E,\ + 0x50,0x95,0xD1,0x9A,0x6F,0xE4,0x11,0xDE,0x63,0x85,0x6E,0x98,0xEE,0xA8,0xFF,0x5A,\ + 0xC8,0xD3,0x55,0xB2,0x66,0x71,0x57,0xDE,0xC0,0x21,0xEB,0x3D,0x2A,0xA7,0x23,0x49,\ + 0x01,0x04,0x86,0x42,0x7B,0xFC,0xEE,0x7F,0xA2,0x16,0x52,0xB5,0x67,0x67,0xD3,0x40,\ + 0xDB,0x3B,0x26,0x58,0xB2,0x28,0x77,0x3D,0xAE,0x14,0x77,0x61,0xD6,0xFA,0x2A,0x66,\ + 0x27,0xA0,0x0D,0xFA,0xA7,0x73,0x5C,0xEA,0x70,0xF1,0x94,0x21,0x65,0x44,0x5F,0xFA,\ + 0xFC,0xEF,0x29,0x68,0xA9,0xA2,0x87,0x79,0xEF,0x79,0xEF,0x4F,0xAC,0x07,0x77,0x38 + + ; Time zone settings HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x00010000,\ diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf index 527c077e2ec..111e22fbb4a 100644 --- a/boot/bootdata/hivesys.inf +++ b/boot/bootdata/hivesys.inf @@ -1270,11 +1270,11 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x0000 ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROMPT",0x00000000,"$P$G$I" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemRoot%\TEMP" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemRoot%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" diff --git a/boot/bootdata/packages/reactos.dff.in b/boot/bootdata/packages/reactos.dff.in index 5a7ff4898b1..0a86c5fe31f 100644 --- a/boot/bootdata/packages/reactos.dff.in +++ b/boot/bootdata/packages/reactos.dff.in @@ -66,6 +66,7 @@ Signature = "$ReactOS$" 50 = security\templates 51 = system32\CatRoot 52 = system32\CatRoot2 +53 = system32\gnutls .InfEnd @@ -100,3 +101,11 @@ Signature = "$ReactOS$" "modules/optional/vmx_svga.sys" 2 optional "modules/optional/wine_gecko-2.24-x86.msi" 4 optional "boot/bootdata/bootcdregtest/AHKAppTests.cmd" 7 optional +"modules/optional/gnutls/libgcc_s_sjlj-1.dll" 53 optional +"modules/optional/gnutls/libgmp-10.dll" 53 optional +"modules/optional/gnutls/libgnutls-28.dll" 53 optional +"modules/optional/gnutls/libhogweed-2-5.dll" 53 optional +"modules/optional/gnutls/libp11-kit-0.dll" 53 optional +"modules/optional/gnutls/libnettle-4-7.dll" 53 optional +"modules/optional/gnutls/libwinpthread-1.dll" 53 optional +"modules/optional/gnutls/zlib1.dll" 53 optional diff --git a/boot/freeldr/freeldr/arch/i386/hwpci.c b/boot/freeldr/freeldr/arch/i386/hwpci.c index 09a9e8bb060..4154951c9fc 100644 --- a/boot/freeldr/freeldr/arch/i386/hwpci.c +++ b/boot/freeldr/freeldr/arch/i386/hwpci.c @@ -41,6 +41,14 @@ GetPciIrqRoutingTable(VOID) { TRACE("Found signature\n"); + if (Table->TableSize < FIELD_OFFSET(PCI_IRQ_ROUTING_TABLE, Slot) || + Table->TableSize % 16 != 0) + { + ERR("Invalid routing table size (%u) at %p. Continue searching...\n", Table->TableSize, Table); + Table = (PPCI_IRQ_ROUTING_TABLE)((ULONG_PTR)Table + 0x10); + continue; + } + Ptr = (PUCHAR)Table; Sum = 0; for (i = 0; i < Table->TableSize; i++) @@ -50,18 +58,20 @@ GetPciIrqRoutingTable(VOID) if ((Sum & 0xFF) != 0) { - ERR("Invalid routing table\n"); - return NULL; + ERR("Invalid routing table checksum (%#lx) at %p. Continue searching...\n", Sum & 0xFF, Table); + } + else + { + TRACE("Valid checksum\n"); + return Table; } - - TRACE("Valid checksum\n"); - - return Table; } Table = (PPCI_IRQ_ROUTING_TABLE)((ULONG_PTR)Table + 0x10); } + ERR("No valid routing table found!\n"); + return NULL; } diff --git a/cmake/gcc.cmake b/cmake/gcc.cmake index 2dc7d484dc1..f27d80a0bb1 100644 --- a/cmake/gcc.cmake +++ b/cmake/gcc.cmake @@ -32,13 +32,26 @@ if(GCC_VERSION VERSION_GREATER 4.7) endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - add_compile_flags_language("-std=gnu89" "C") - add_compile_flags("-Wno-microsoft") + add_compile_flags_language("-std=gnu89 -Wno-microsoft" "C") + set(CMAKE_LINK_DEF_FILE_FLAG "") + set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") + set(CMAKE_LINK_LIBRARY_SUFFIX "") + set(CMAKE_CREATE_WIN32_EXE "") + set(CMAKE_C_COMPILE_OPTIONS_PIC "") + set(CMAKE_CXX_COMPILE_OPTIONS_PIC "") + set(CMAKE_C_COMPILE_OPTIONS_PIE "") + set(CMAKE_CXX_COMPILE_OPTIONS_PIE "") + set(CMAKE_SHARED_LIBRARY_C_FLAGS "") + set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") endif() if(DBG) - add_compile_flags_language("-Wold-style-declaration -Wdeclaration-after-statement" "C") + if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_compile_flags_language("-Wold-style-declaration" "C") + endif() + add_compile_flags_language("-Wdeclaration-after-statement" "C") endif() + add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX") #bug @@ -49,13 +62,13 @@ set(REACTOS_SOURCE_DIR_NATIVE ${REACTOS_SOURCE_DIR}) string(REPLACE "/" "\\" REACTOS_SOURCE_DIR_NATIVE ${REACTOS_SOURCE_DIR}) endif() -if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") +if((NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") AND (NOT SEPARATE_DBG)) add_compile_flags("-fdebug-prefix-map=\"${REACTOS_SOURCE_DIR_NATIVE}\"=ReactOS") endif() # Debugging if(SEPARATE_DBG) - add_compile_flags("-gdwarf-2 -g2") + add_compile_flags("-gdwarf-4 -fvar-tracking-assignments") else() add_compile_flags("-gdwarf-2 -gstrict-dwarf") if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index fe2ec991c8c..7b3b2726e20 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -36,10 +36,10 @@ endif () # Disable overly sensitive warnings as well as those that generally aren't # useful to us. # - TODO: C4018: signed/unsigned mismatch -# - TODO: C4244: integer truncation +# - C4244: implicit integer truncation # - C4290: C++ exception specification ignored #add_compile_flags("/wd4018 /wd4244 /wd4290") -add_compile_flags("/wd4290") +add_compile_flags("/wd4290 /wd4244") # The following warnings are treated as errors: # - C4013: implicit function declaration diff --git a/dll/3rdparty/libtiff/CMakeLists.txt b/dll/3rdparty/libtiff/CMakeLists.txt index 27ec6ad2bb5..6ea7bb06e29 100644 --- a/dll/3rdparty/libtiff/CMakeLists.txt +++ b/dll/3rdparty/libtiff/CMakeLists.txt @@ -61,5 +61,7 @@ add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all) if(NOT MSVC) allow_warnings(libtiff) - add_target_compile_flags(libtiff "-Wno-unused-but-set-variable") + if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_target_compile_flags(libtiff "-Wno-unused-but-set-variable") + endif() endif() diff --git a/dll/3rdparty/libxslt/CMakeLists.txt b/dll/3rdparty/libxslt/CMakeLists.txt index 988a7ca3c29..648ca8d4a62 100644 --- a/dll/3rdparty/libxslt/CMakeLists.txt +++ b/dll/3rdparty/libxslt/CMakeLists.txt @@ -48,5 +48,8 @@ add_pch(libxslt precomp.h SOURCE) add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all) if(NOT MSVC) - add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-but-set-variable -Wno-unused-function") + add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-function") + if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_target_compile_flags(libxslt "-Wno-unused-but-set-variable") + endif() endif() diff --git a/dll/cpl/access/lang/tr-TR.rc b/dll/cpl/access/lang/tr-TR.rc index 12488327328..09f8bde2d4d 100644 --- a/dll/cpl/access/lang/tr-TR.rc +++ b/dll/cpl/access/lang/tr-TR.rc @@ -148,7 +148,7 @@ BEGIN PROPSHEETPADDING(2), LABELLINE(11) + 5, PROPSHEETPADDING(20), LABELLINE(2), BS_TOP | BS_MULTILINE PUSHBUTTON "&Ayarlar", IDC_FILTER_BOUNCE_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(9) + 5, PROPSHEETPADDING(15), 14, WS_GROUP PUSHBUTTON "Aya&rlar", IDC_FILTER_REPEAT_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(11) + 5, PROPSHEETPADDING(15), 14, WS_GROUP - LTEXT "Ayar&ları sınamak için buraya tıklayınız ve birşeyler yazınız:", -1, PROPSHEETPADDING(2), LABELLINE(14) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + LTEXT "Ayar&ları sınamak için şuraya tıklayınız ve birşeyler yazınız:", -1, PROPSHEETPADDING(2), LABELLINE(14) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) EDITTEXT IDC_FILTER_TEST_EDIT, PROPSHEETPADDING(2), LABELLINE(15) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14, WS_GROUP | ES_AUTOHSCROLL GROUPBOX "Bildirimler", -1, PROPSHEETPADDING(1), LABELLINE(17) + 6, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + 3 AUTOCHECKBOX "&Düğmelere Basıldığında veyâ Doğrulandığında Ses Çıkar", IDC_FILTER_SOUND_CHECK, diff --git a/dll/cpl/console/font.c b/dll/cpl/console/font.c index d714e63fa13..aa57201c9b0 100644 --- a/dll/cpl/console/font.c +++ b/dll/cpl/console/font.c @@ -72,7 +72,7 @@ GuiData->CharWidth = Metrics.tmMaxCharWidth; GuiData->CharHeight = Metrics.tmHeight + Metrics.tmExternalLeading; - /* Measure real char width more precisely if possible. */ + /* Measure real char width more precisely if possible */ if (GetTextExtentPoint32W(drawItem->hDC, L"R", 1, &CharSize)) GuiData->CharWidth = CharSize.cx; } @@ -102,12 +102,9 @@ EnumFontNamesProc(PLOGFONTW lplf, HWND hwndCombo = (HWND)lParam; LPWSTR pszName = lplf->lfFaceName; - BOOL fFixed; - BOOL fTrueType; - /* Record the font's attributes (Fixedwidth and Truetype) */ - fFixed = ((lplf->lfPitchAndFamily & 0x03) == FIXED_PITCH); - fTrueType = (lplf->lfOutPrecision == OUT_STROKE_PRECIS) ? TRUE : FALSE; + // BOOL fFixed = ((lplf->lfPitchAndFamily & 0x03) == FIXED_PITCH); + // BOOL fTrueType = (lplf->lfOutPrecision == OUT_STROKE_PRECIS); /* * According to: http://support.microsoft.com/kb/247815 @@ -158,7 +155,8 @@ EnumFontNamesProc(PLOGFONTW lplf, /* Reject TrueType fonts that are not FF_MODERN */ if ((FontType == TRUETYPE_FONTTYPE) && ((lplf->lfPitchAndFamily & 0xF0) != FF_MODERN)) { - DPRINT1("TrueType font '%S' rejected because it's not FF_MODERN (lfPitchAndFamily = %d)\n", pszName, lplf->lfPitchAndFamily); + DPRINT1("TrueType font '%S' rejected because it's not FF_MODERN (lfPitchAndFamily = %d)\n", + pszName, lplf->lfPitchAndFamily); return TRUE; } @@ -166,14 +164,16 @@ EnumFontNamesProc(PLOGFONTW lplf, #if 0 if ((FontType != TRUETYPE_FONTTYPE) && (lplf->lfCharSet != OEM_CHARSET)) { - DPRINT1("Non-TrueType font '%S' rejected because it's not OEM_CHARSET %d\n", pszName, lplf->lfCharSet); + DPRINT1("Non-TrueType font '%S' rejected because it's not OEM_CHARSET %d\n", + pszName, lplf->lfCharSet); return TRUE; } #else // Improved criterium if ((FontType != TRUETYPE_FONTTYPE) && ((lplf->lfCharSet != ANSI_CHARSET) && (lplf->lfCharSet != DEFAULT_CHARSET) && (lplf->lfCharSet != OEM_CHARSET))) { - DPRINT1("Non-TrueType font '%S' rejected because it's not ANSI_CHARSET or DEFAULT_CHARSET or OEM_CHARSET (lfCharSet = %d)\n", pszName, lplf->lfCharSet); + DPRINT1("Non-TrueType font '%S' rejected because it's not ANSI_CHARSET or DEFAULT_CHARSET or OEM_CHARSET (lfCharSet = %d)\n", + pszName, lplf->lfCharSet); return TRUE; } #endif @@ -205,7 +205,8 @@ EnumFontNamesProc(PLOGFONTW lplf, DPRINT1("Add font '%S' (lfPitchAndFamily = %d)\n", pszName, lplf->lfPitchAndFamily); /* Store this information in the list-item's userdata area */ - SendMessageW(hwndCombo, LB_SETITEMDATA, idx, MAKEWPARAM(fFixed, fTrueType)); + // SendMessageW(hwndCombo, LB_SETITEMDATA, idx, MAKEWPARAM(fFixed, fTrueType)); + SendMessageW(hwndCombo, LB_SETITEMDATA, idx, (WPARAM)FontType); } return TRUE; @@ -247,7 +248,7 @@ EnumFontSizesProc(PLOGFONTW lplf, } else { - int i; + ULONG i; for (i = 0; i < sizeof(TrueTypePoints) / sizeof(TrueTypePoints[0]); ++i) { swprintf(FontSize, L"%2d", TrueTypePoints[i]); @@ -273,7 +274,6 @@ EnumFontSizesProc(PLOGFONTW lplf, } - static VOID FontSizeChange(HWND hwndDlg, PGUI_CONSOLE_INFO GuiInfo); diff --git a/dll/cpl/console/lang/bg-BG.rc b/dll/cpl/console/lang/bg-BG.rc index e6f62b7530b..4b19a1c893c 100644 --- a/dll/cpl/console/lang/bg-BG.rc +++ b/dll/cpl/console/lang/bg-BG.rc @@ -35,10 +35,10 @@ BEGIN LTEXT "Прозоречен преглед:", -1, 10, 10, 94, 10 LTEXT "Размер:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Шрифт:", -1, 10, 105, 33, 10 CHECKBOX "&Получери шрифтове", IDC_CHECK_BOLD_FONTS, 38, 105, 85, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Всеки знак е:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/cs-CZ.rc b/dll/cpl/console/lang/cs-CZ.rc index afda11d7d58..b7cac0e052d 100644 --- a/dll/cpl/console/lang/cs-CZ.rc +++ b/dll/cpl/console/lang/cs-CZ.rc @@ -41,10 +41,10 @@ BEGIN LTEXT "Náhled okna:", -1, 10, 10, 94, 10 LTEXT "Velikost:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Písmo:", -1, 10, 105, 33, 10 CHECKBOX "&Tučná písma", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Každý znak je:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/de-DE.rc b/dll/cpl/console/lang/de-DE.rc index 5ea5d53f846..9309217167b 100644 --- a/dll/cpl/console/lang/de-DE.rc +++ b/dll/cpl/console/lang/de-DE.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Fenstervorschau", -1, 10, 7, 65, 10 LTEXT "Größe", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 - LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Schrift", -1, 10, 105, 35, 10 CHECKBOX "&Fette Schriften", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Jedes Zeichen ist:", -1, 130, 165, 75, 10 diff --git a/dll/cpl/console/lang/en-US.rc b/dll/cpl/console/lang/en-US.rc index d4d9e576f2b..07d23e5ae62 100644 --- a/dll/cpl/console/lang/en-US.rc +++ b/dll/cpl/console/lang/en-US.rc @@ -35,10 +35,10 @@ BEGIN LTEXT "Window Preview:", -1, 10, 10, 94, 10 LTEXT "Size:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Font:", -1, 10, 105, 33, 10 CHECKBOX "&Bold fonts", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Each character is:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/es-ES.rc b/dll/cpl/console/lang/es-ES.rc index 4cb83e117ee..7c4efda92a4 100644 --- a/dll/cpl/console/lang/es-ES.rc +++ b/dll/cpl/console/lang/es-ES.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Ventana de Previsualización", -1, 10, 7, 65, 10 LTEXT "Tamaño", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 - LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Fuente", -1, 10, 105, 35, 10 CHECKBOX "&Negrita", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Cada caracter es:", -1, 130, 165, 75, 10 diff --git a/dll/cpl/console/lang/fr-FR.rc b/dll/cpl/console/lang/fr-FR.rc index 4e57984b2fb..f0ab9fdcd3f 100644 --- a/dll/cpl/console/lang/fr-FR.rc +++ b/dll/cpl/console/lang/fr-FR.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Fenêtre de Prévisualisation :", -1, 10, 10, 94, 10 LTEXT "Taille :", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Police :", -1, 10, 105, 33, 10 CHECKBOX "&Gras", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Chaque caractère utilise :", -1, 124, 166, 85, 10 diff --git a/dll/cpl/console/lang/he-IL.rc b/dll/cpl/console/lang/he-IL.rc index a68475013f4..0a29198e2fd 100644 --- a/dll/cpl/console/lang/he-IL.rc +++ b/dll/cpl/console/lang/he-IL.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "תצוגה מקדימה:", -1, 10, 10, 94, 10 LTEXT "גודל:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "גופן:", -1, 10, 105, 33, 10 CHECKBOX "גופנים מודגשים", IDC_CHECK_BOLD_FONTS, 41, 105, 33, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Each character is:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/id-ID.rc b/dll/cpl/console/lang/id-ID.rc index e84bcbfe107..48ef1dab638 100644 --- a/dll/cpl/console/lang/id-ID.rc +++ b/dll/cpl/console/lang/id-ID.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Tinjauan Jendela", -1, 10, 7, 65, 10 LTEXT "Ukuran", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 - LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Font", -1, 10, 105, 35, 10 CHECKBOX "Font &tebal", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Setiap karakter adalah:", -1, 130, 165, 75, 10 diff --git a/dll/cpl/console/lang/it-IT.rc b/dll/cpl/console/lang/it-IT.rc index cfc0bd31e9b..f0d3c6c341e 100644 --- a/dll/cpl/console/lang/it-IT.rc +++ b/dll/cpl/console/lang/it-IT.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Anteprima", -1, 10, 7, 65, 10 LTEXT "Dimansione", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 - LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Font", -1, 10, 105, 35, 10 CHECKBOX "&Grassetto fonts", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Ogni carattere è:", -1, 130, 165, 75, 10 diff --git a/dll/cpl/console/lang/no-NO.rc b/dll/cpl/console/lang/no-NO.rc index 634812113d8..aba111646b2 100644 --- a/dll/cpl/console/lang/no-NO.rc +++ b/dll/cpl/console/lang/no-NO.rc @@ -35,10 +35,10 @@ BEGIN LTEXT "Vindu forhåndsvisning:", -1, 10, 10, 94, 10 LTEXT "Størrelse:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Skrift:", -1, 10, 105, 33, 10 CHECKBOX "&Fet skrift", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Hver tegn er:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/pl-PL.rc b/dll/cpl/console/lang/pl-PL.rc index bcee44f7b5c..72384009036 100644 --- a/dll/cpl/console/lang/pl-PL.rc +++ b/dll/cpl/console/lang/pl-PL.rc @@ -42,10 +42,10 @@ BEGIN LTEXT "Okno podglądu", -1, 10, 7, 65, 10 LTEXT "Rozmiar", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 - LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Czcionka", -1, 10, 105, 35, 10 CHECKBOX "&Pogrubiona czcionka", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 50, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Pogrubiona czcionka:", -1, 130, 165, 75, 10 diff --git a/dll/cpl/console/lang/ro-RO.rc b/dll/cpl/console/lang/ro-RO.rc index 7c33e3a6fbe..fda9e11e1e9 100644 --- a/dll/cpl/console/lang/ro-RO.rc +++ b/dll/cpl/console/lang/ro-RO.rc @@ -44,10 +44,10 @@ BEGIN LTEXT "Previzionare:", -1, 10, 10, 94, 10 LTEXT "&Mărime:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "F&ont:", -1, 10, 105, 33, 10 CHECKBOX "&Aldin", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Fiecare caracter are:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/ru-RU.rc b/dll/cpl/console/lang/ru-RU.rc index 7a71960c3c0..6abf4279b9f 100644 --- a/dll/cpl/console/lang/ru-RU.rc +++ b/dll/cpl/console/lang/ru-RU.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Окно предпросмотра:", -1, 10, 10, 94, 10 LTEXT "Размер:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Шрифт:", -1, 10, 105, 33, 10 CHECKBOX "&Жирный", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Каждый символ:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/sk-SK.rc b/dll/cpl/console/lang/sk-SK.rc index 6392d83271b..67ab2a28315 100644 --- a/dll/cpl/console/lang/sk-SK.rc +++ b/dll/cpl/console/lang/sk-SK.rc @@ -39,10 +39,10 @@ BEGIN LTEXT "Ukážka okna:", -1, 10, 10, 94, 10 LTEXT "Veľkosť:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Písmo:", -1, 10, 105, 33, 10 CHECKBOX "&Tučné písma", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Každý znak je:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/sq-AL.rc b/dll/cpl/console/lang/sq-AL.rc index 8a2364e66d7..185759d3aea 100644 --- a/dll/cpl/console/lang/sq-AL.rc +++ b/dll/cpl/console/lang/sq-AL.rc @@ -39,10 +39,10 @@ BEGIN LTEXT "Dritare Preview:", -1, 10, 10, 94, 10 LTEXT "Masë:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Font:", -1, 10, 105, 33, 10 CHECKBOX "&Bold fonts", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Çdo krarakter është:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/tr-TR.rc b/dll/cpl/console/lang/tr-TR.rc index 7521b5bcce9..ead07ea068e 100644 --- a/dll/cpl/console/lang/tr-TR.rc +++ b/dll/cpl/console/lang/tr-TR.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Pencere Ön İzlemesi:", -1, 10, 10, 94, 10 LTEXT "&Boyutlar:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Yazı Tipi:", -1, 10, 105, 33, 10 CHECKBOX "&Kalın Yazı Tipleri", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Tüm damgalar:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/uk-UA.rc b/dll/cpl/console/lang/uk-UA.rc index dbe92ecf144..f275427ebc2 100644 --- a/dll/cpl/console/lang/uk-UA.rc +++ b/dll/cpl/console/lang/uk-UA.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "Зразок вікна", -1, 10, 10, 94, 10 LTEXT "Size:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&Шрифт:", -1, 10, 105, 33, 10 CHECKBOX "&Жирні", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "Кожен символ:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/lang/zh-CN.rc b/dll/cpl/console/lang/zh-CN.rc index fa8d9bd0390..c36cea883ec 100644 --- a/dll/cpl/console/lang/zh-CN.rc +++ b/dll/cpl/console/lang/zh-CN.rc @@ -37,10 +37,10 @@ BEGIN LTEXT "窗口预览:", -1, 10, 10, 94, 10 LTEXT "大小:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 - LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL LTEXT "&字体(&F):", -1, 10, 105, 33, 10 CHECKBOX "粗体(&B)", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 - LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 LTEXT "每个字符为:", -1, 124, 166, 75, 10 diff --git a/dll/cpl/console/layout.c b/dll/cpl/console/layout.c index 90926c821c2..1b99e400b9c 100644 --- a/dll/cpl/console/layout.c +++ b/dll/cpl/console/layout.c @@ -107,6 +107,8 @@ PaintText(LPDRAWITEMSTRUCT drawItem, HBRUSH hBrush; HFONT Font, OldFont; + COORD FontSize = GuiInfo->FontSize; + if (TextMode == Screen) CurrentAttrib = pConInfo->ci.ScreenAttrib; else if (TextMode == Popup) @@ -120,8 +122,11 @@ PaintText(LPDRAWITEMSTRUCT drawItem, hBrush = CreateSolidBrush(nbkColor); if (!hBrush) return FALSE; - Font = CreateFontW(GuiInfo->FontSize.Y, - GuiInfo->FontSize.X, + FontSize.Y = FontSize.Y > 0 ? -MulDiv(FontSize.Y, GetDeviceCaps(drawItem->hDC, LOGPIXELSY), 72) + : FontSize.Y; + + Font = CreateFontW(FontSize.Y, + FontSize.X, 0, TA_BASELINE, GuiInfo->FontWeight, @@ -131,7 +136,7 @@ PaintText(LPDRAWITEMSTRUCT drawItem, OEM_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, // NONANTIALIASED_QUALITY ; ANTIALIASED_QUALITY + DEFAULT_QUALITY, FIXED_PITCH | GuiInfo->FontFamily, GuiInfo->FaceName); if (Font == NULL) @@ -154,7 +159,7 @@ PaintText(LPDRAWITEMSTRUCT drawItem, DrawTextW(drawItem->hDC, szPreviewText, wcslen(szPreviewText), &drawItem->rcItem, 0); SetTextColor(drawItem->hDC, ptColor); SetBkColor(drawItem->hDC, pbkColor); - DeleteObject((HGDIOBJ)hBrush); + DeleteObject(hBrush); SelectObject(drawItem->hDC, OldFont); DeleteObject(Font); diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c index 9a8f9bde92a..3fd562e2d1e 100644 --- a/dll/cpl/desk/screensaver.c +++ b/dll/cpl/desk/screensaver.c @@ -123,9 +123,9 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData) if (pData->Selection > 0) { _stprintf(szCmdline, - _T("%s /p %u"), + _T("%s /p %Iu"), pData->ScreenSaverItems[pData->Selection].szFilename, - hPreview); + (ULONG_PTR)hPreview); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); @@ -188,8 +188,8 @@ static VOID ScreensaverConfig(HWND hwndDlg, PDATA pData) { /* - /c: Run configuration, hwnd is handle of calling window - */ + * /c: Run configuration, hwnd is handle of calling window + */ TCHAR szCmdline[2048]; STARTUPINFO si; @@ -199,9 +199,9 @@ ScreensaverConfig(HWND hwndDlg, PDATA pData) return; _stprintf(szCmdline, - _T("%s /c:%u"), + _T("%s /c:%Iu"), pData->ScreenSaverItems[pData->Selection].szFilename, - hwndDlg); + (ULONG_PTR)hwndDlg); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); diff --git a/dll/cpl/input/lang/tr-TR.rc b/dll/cpl/input/lang/tr-TR.rc index f6900f2508b..2518f713420 100644 --- a/dll/cpl/input/lang/tr-TR.rc +++ b/dll/cpl/input/lang/tr-TR.rc @@ -116,8 +116,8 @@ BEGIN IDS_ARABIC_101_LAYOUT "Arapça (101)" IDS_ARABIC_102_LAYOUT "Arapça (102)" IDS_ARABIC_102_AZERTY_LAYOUT "Arapça (102) AZERTY" - IDS_ARMENIAN_EASTERN_LAYOUT "Doğu Ermenîce" - IDS_ARMENIAN_WESTERN_LAYOUT "Batı Ermenîce" + IDS_ARMENIAN_EASTERN_LAYOUT "Doğu Ermenice" + IDS_ARMENIAN_WESTERN_LAYOUT "Batı Ermenice" IDS_ASSAMESE_LAYOUT "Assamca" IDS_AZERI_CYRILLIC_LAYOUT "Âzerî Türkçesi (Kiril)" IDS_AZERI_LATIN_LAYOUT "Âzerî Türkçesi (Latin)" @@ -161,7 +161,7 @@ BEGIN IDS_DEVANAGARI_INSCRIPT_LAYOUT "Devanagari Harfliği - INSCRIPT" IDS_DIVEHI_PHONETIC_LAYOUT "Divehi Tüm Seslik" IDS_DIVEHI_TYPEWRITER_LAYOUT "Divehi Yazı Makinesi" - IDS_DUTCH_LAYOUT "Flemenkçe" + IDS_DUTCH_LAYOUT "Hollandaca" IDS_ESTONIAN_LAYOUT "Estçe" IDS_FAEROESE_LAYOUT "Faroece" IDS_FARSI_LAYOUT "Farsça" diff --git a/dll/cpl/intl/lang/tr-TR.rc b/dll/cpl/intl/lang/tr-TR.rc index d3588a47b20..4282061e21d 100644 --- a/dll/cpl/intl/lang/tr-TR.rc +++ b/dll/cpl/intl/lang/tr-TR.rc @@ -171,12 +171,12 @@ END IDD_SORTPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Sıralama" +CAPTION "Dizme" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Sıralama", -1, 7, 7, 230, 74 - LTEXT "Sıralama yöntemleri; damgaların, sözcüklerin, kütüklerin ve dizinlerin sıralama düzenini tanımlar.", -1, 14, 17, 220, 25 - LTEXT "Diliniz için bir sıralama yöntemi seçiniz:", -1, 14, 37, 220, 22 + GROUPBOX "Dizme", -1, 7, 7, 230, 74 + LTEXT "Dizme yöntemleri; damgaların, sözcüklerin, kütüklerin ve dizinlerin dizme düzenini tanımlar.", -1, 14, 17, 220, 25 + LTEXT "Diliniz için bir dizme yöntemi seçiniz:", -1, 14, 37, 220, 22 COMBOBOX IDC_SORTLIST_COMBO, 14, 56, 217, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END diff --git a/dll/cpl/liccpa/lang/tr-TR.rc b/dll/cpl/liccpa/lang/tr-TR.rc index d46a4d96c8e..6468a60eb50 100644 --- a/dll/cpl/liccpa/lang/tr-TR.rc +++ b/dll/cpl/liccpa/lang/tr-TR.rc @@ -9,7 +9,7 @@ FONT 8, "Helv" BEGIN CONTROL "&İstemci Ruhsatlama Kipi", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 CONTROL "&Aygıt Başına veyâ Kullanıcı Başına", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 - CONTROL "&Sunucu Başına. Eş zamanlı bağlantı sayısı:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 + CONTROL "&Sunucu Başına. Eş Zamanlı Bağlantı Sayısı:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 CONTROL "&Ürün:", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 CONTROL "", 106, "COMBOBOX", CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 1 CONTROL "Tamam", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 7, 46, 14 diff --git a/dll/cpl/main/lang/tr-TR.rc b/dll/cpl/main/lang/tr-TR.rc index a7bf412461d..f34745b03f2 100644 --- a/dll/cpl/main/lang/tr-TR.rc +++ b/dll/cpl/main/lang/tr-TR.rc @@ -18,7 +18,7 @@ BEGIN LTEXT "Yavaş", -1, 40, 85, 20, 10 LTEXT "Hızlı", -1, 200, 85, 20, 10 CONTROL "", IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 85, 130, 17 - LTEXT "Yi&nelenme hızını sınamak için buraya tıklayınız ve bir düğmeyi basılı tutunuz:", -1, 15, 105, 216, 10 + LTEXT "Yi&nelenme hızını sınamak için şuraya tıklayınız ve bir düğmeyi basılı tutunuz:", -1, 15, 105, 216, 10 EDITTEXT IDC_EDIT_REPEAT_RATE, 15, 116, 216, 14, WS_CHILD | WS_VISIBLE | WS_GROUP GROUPBOX "İ&mleç Yanıp Sönme Hızı", -1, 5, 145, 236, 50 LTEXT "", IDC_TEXT_CURSOR_BLINK, 20, 165, 1, 8 diff --git a/dll/cpl/mmsys/lang/tr-TR.rc b/dll/cpl/mmsys/lang/tr-TR.rc index 65a41003337..30cb2f6011d 100644 --- a/dll/cpl/mmsys/lang/tr-TR.rc +++ b/dll/cpl/mmsys/lang/tr-TR.rc @@ -132,7 +132,7 @@ BEGIN CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 54, 62, 18 LTEXT "&Örnekleme Hızı Dönüştürme Niteliği:", 8496, 13, 123, 103, 14 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 121, 62, 18 - PUSHBUTTON "Ö&ntanımlılara Geri Dön", 5400, 7, 191, 110, 14 + PUSHBUTTON "Ö&n Tanımlıları Geri Getir", 5400, 7, 191, 110, 14 LTEXT "Yok", 8497, 128, 56, 21, 10 LTEXT "Tüm", 8498, 214, 56, 21, 9 LTEXT "İyi", 8499, 128, 123, 21, 10 @@ -153,7 +153,7 @@ BEGIN CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 43, 62, 18 LTEXT "&Örnekleme Hızı Dönüştürme Niteliği:", 8496, 13, 103, 103, 9 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 101, 62, 18 - PUSHBUTTON "Ö&ntanımlılara Geri Dön", 5400, 9, 158, 110, 14 + PUSHBUTTON "Ö&n Tanımlıları Geri Getir", 5400, 9, 158, 110, 14 LTEXT "Yok", 8497, 125, 46, 24, 10 LTEXT "Tüm", 8498, 217, 46, 19, 9 LTEXT "İyi", 8499, 125, 103, 24, 10 @@ -178,7 +178,7 @@ END IDD_MULTICHANNEL DIALOG 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Çoklu Kanal" +CAPTION "Çoklu Yol" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Buraya tanım gelecek.", 9506, 8, 4, 212, 24 @@ -215,7 +215,7 @@ BEGIN CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 162, 108, 17 LTEXT "Yüksek", 9502, 202, 164, 17, 8 AUTOCHECKBOX "&Tüm sürgüleri aynı anda devindir.", 9504, 5, 185, 216, 9 - PUSHBUTTON "&Ön Tanımlılara Geri Dön", 9505, 110, 199, 110, 14 + PUSHBUTTON "&Ön Tanımlıları Geri Getir", 9505, 110, 199, 110, 14 END IDD_SETUP2 DIALOG 0, 0, 227, 206 diff --git a/dll/cpl/sysdm/lang/tr-TR.rc b/dll/cpl/sysdm/lang/tr-TR.rc index 3ed06f49a1d..477058e9bbc 100644 --- a/dll/cpl/sysdm/lang/tr-TR.rc +++ b/dll/cpl/sysdm/lang/tr-TR.rc @@ -69,7 +69,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "Sürüm Bilgisi",IDC_STATIC, 6, 3, 210, 73 CONTROL "İş İstasyonu Olarak Bildir", IDC_REPORTASWORKSTATION, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 16, 57, 190, 10 - LTEXT "ReactOS, bir sunucu işletim dizgesi olarak yapılmıştır ve öyle bildirilir. Yalnızca uygulamalar için, bunu değiştirmek için bu kutucuğu imleyiniz", IDC_STATIC, 15, 15, 183, 41 + LTEXT "ReactOS, bir sunucu işletim dizgesi olarak yapılmıştır ve öyle bildirilir. Yalnızca uygulamalar için, bunu değiştirmek için bu kutucuğu imleyiniz.", IDC_STATIC, 15, 15, 183, 41 PUSHBUTTON "Tamam", IDOK, 166, 83, 50, 14 END diff --git a/dll/directx/wine/d3dx9_36/CMakeLists.txt b/dll/directx/wine/d3dx9_36/CMakeLists.txt index b20029e0510..d366786d560 100644 --- a/dll/directx/wine/d3dx9_36/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_36/CMakeLists.txt @@ -33,6 +33,11 @@ add_library(d3dx9_36 SHARED set_module_type(d3dx9_36 win32dll) add_dependencies(d3dx9_36 d3d_idl_headers) target_link_libraries(d3dx9_36 dxguid wine) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(d3dx9_36 mingwex) +endif() + add_importlibs(d3dx9_36 d3dcompiler_43 d3dxof user32 ole32 gdi32 msvcrt kernel32 ntdll) add_pch(d3dx9_36 d3dx9_36_private.h SOURCE) add_cd_file(TARGET d3dx9_36 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/dplay/CMakeLists.txt b/dll/directx/wine/dplay/CMakeLists.txt index fca39c38090..6a851a9af62 100644 --- a/dll/directx/wine/dplay/CMakeLists.txt +++ b/dll/directx/wine/dplay/CMakeLists.txt @@ -4,8 +4,9 @@ spec2def(dplay.dll dplay.spec) add_library(dplay SHARED version.rc + ${CMAKE_CURRENT_BINARY_DIR}/dplay_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/dplay.def) set_module_type(dplay win32dll) -add_importlibs(dplay dplayx msvcrt kernel32 ntdll) +add_importlibs(dplay dplayx msvcrt kernel32) add_cd_file(TARGET dplay DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/dsound/CMakeLists.txt b/dll/directx/wine/dsound/CMakeLists.txt index 9d81dc6c6c7..f5363688bcb 100644 --- a/dll/directx/wine/dsound/CMakeLists.txt +++ b/dll/directx/wine/dsound/CMakeLists.txt @@ -25,5 +25,10 @@ add_library(dsound SHARED set_module_type(dsound win32dll) target_link_libraries(dsound dxguid uuid wine) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(dsound mingwex) +endif() + add_importlibs(dsound winmm ole32 advapi32 user32 msvcrt kernel32 ntdll) add_cd_file(TARGET dsound DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/quartz/filtermapper.c b/dll/directx/wine/quartz/filtermapper.c index 704ea5a0aed..0d7e873b383 100644 --- a/dll/directx/wine/quartz/filtermapper.c +++ b/dll/directx/wine/quartz/filtermapper.c @@ -24,6 +24,7 @@ #include #include +#undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) typedef struct FilterMapper3Impl @@ -1164,7 +1165,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( if (FAILED(hr)) return hr; - + while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK) { IMoniker_Release(IMon); @@ -1184,7 +1185,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( return E_OUTOFMEMORY; } ZeroMemory(regfilters, nb_mon * sizeof(REGFILTER)); /* will prevent bad free of Name in case of error. */ - + IEnumMoniker_Reset(ppEnumMoniker); while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK) { @@ -1238,7 +1239,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( CoTaskMemFree(regfilters[idx].Name); CoTaskMemFree(regfilters); IEnumMoniker_Release(ppEnumMoniker); - + return hr; } @@ -1259,7 +1260,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c { strcpyW(wszKeyName, wszFilterSlash); strcatW(wszKeyName, wszClsid); - + lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); hr = HRESULT_FROM_WIN32(lRet); } @@ -1275,7 +1276,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c { strcpyW(wszKeyName, wszClsidSlash); strcatW(wszKeyName, wszClsid); - + lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); hr = HRESULT_FROM_WIN32(lRet); } @@ -1286,7 +1287,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c hr = HRESULT_FROM_WIN32(lRet); RegCloseKey(hKey); } - + CoTaskMemFree(wszClsid); return hr; @@ -1346,7 +1347,7 @@ static HRESULT WINAPI FilterMapper_RegisterPin( strcpyW(wszPinsKeyName, wszPins); strcatW(wszPinsKeyName, wszSlash); strcatW(wszPinsKeyName, szName); - + lRet = RegCreateKeyExW(hKey, wszPinsKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hPinsKey, NULL); hr = HRESULT_FROM_WIN32(lRet); CoTaskMemFree(wszPinsKeyName); diff --git a/dll/directx/wine/wined3d/CMakeLists.txt b/dll/directx/wine/wined3d/CMakeLists.txt index 99810a6ff4d..ade664ab1cd 100644 --- a/dll/directx/wine/wined3d/CMakeLists.txt +++ b/dll/directx/wine/wined3d/CMakeLists.txt @@ -46,6 +46,11 @@ add_library(wined3d SHARED set_module_type(wined3d win32dll) target_link_libraries(wined3d wine) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(wined3d mingwex) +endif() + add_importlibs(wined3d user32 opengl32 gdi32 advapi32 msvcrt kernel32 ntdll) add_pch(wined3d wined3d_private.h SOURCE) add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all) diff --git a/dll/opengl/glu32/CMakeLists.txt b/dll/opengl/glu32/CMakeLists.txt index bb874f69134..34471408c8f 100644 --- a/dll/opengl/glu32/CMakeLists.txt +++ b/dll/opengl/glu32/CMakeLists.txt @@ -113,7 +113,14 @@ add_library(glu32 SHARED ${SOURCE} glu32.rc) set_module_type(glu32 win32dll) if(NOT MSVC) - add_target_compile_flags(glu32 "-Wno-write-strings -Wno-unused-but-set-variable") + add_target_compile_flags(glu32 "-Wno-write-strings") + if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(glu32 mingwex) + #FIXME: longjmp exists in both our msvcrt and mingwex + add_target_link_flags(glu32 "-Wl,--allow-multiple-definition") + else() + add_target_compile_flags(glu32 "-Wno-unused-but-set-variable") + endif() endif() add_importlibs(glu32 opengl32 gdi32 msvcrt kernel32 ntdll) diff --git a/dll/opengl/mesa/main/format_unpack.c b/dll/opengl/mesa/main/format_unpack.c index bca514d9c10..73e40c18f13 100644 --- a/dll/opengl/mesa/main/format_unpack.c +++ b/dll/opengl/mesa/main/format_unpack.c @@ -37,35 +37,6 @@ #define EXPAND_6_8(X) ( ((X) << 2) | ((X) >> 4) ) - -/** - * Convert an 8-bit sRGB value from non-linear space to a - * linear RGB value in [0, 1]. - * Implemented with a 256-entry lookup table. - */ -static inline GLfloat -nonlinear_to_linear(GLubyte cs8) -{ - static GLfloat table[256]; - static GLboolean tableReady = GL_FALSE; - if (!tableReady) { - /* compute lookup table now */ - GLuint i; - for (i = 0; i < 256; i++) { - const GLfloat cs = UBYTE_TO_FLOAT(i); - if (cs <= 0.04045) { - table[i] = cs / 12.92f; - } - else { - table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4); - } - } - tableReady = GL_TRUE; - } - return table[cs8]; -} - - /**********************************************************************/ /* Unpack, returning GLfloat colors */ /**********************************************************************/ diff --git a/dll/opengl/mesa/main/get.c b/dll/opengl/mesa/main/get.c index 08d25ccfdc8..19f63d50dac 100644 --- a/dll/opengl/mesa/main/get.c +++ b/dll/opengl/mesa/main/get.c @@ -235,12 +235,6 @@ static const int extra_flush_current[] = { EXTRA_END }; -static const int extra_EXT_secondary_color_flush_current[] = { - EXT(EXT_secondary_color), - EXTRA_FLUSH_CURRENT, - EXTRA_END -}; - static const int extra_EXT_fog_coord_flush_current[] = { EXT(EXT_fog_coord), EXTRA_FLUSH_CURRENT, @@ -254,7 +248,6 @@ static const int extra_EXT_texture_integer[] = { EXTRA_EXT(ARB_texture_cube_map); -EXTRA_EXT(EXT_secondary_color); EXTRA_EXT(EXT_fog_coord); EXTRA_EXT(NV_fog_distance); EXTRA_EXT(EXT_texture_filter_anisotropic); diff --git a/dll/opengl/mesa/swrast/s_aatriangle.c b/dll/opengl/mesa/swrast/s_aatriangle.c index ad27fa62c79..b597b575ad1 100644 --- a/dll/opengl/mesa/swrast/s_aatriangle.c +++ b/dll/opengl/mesa/swrast/s_aatriangle.c @@ -100,21 +100,6 @@ solve_plane(GLfloat x, GLfloat y, const GLfloat plane[4]) #define SOLVE_PLANE(X, Y, PLANE) \ ((PLANE[3] + PLANE[0] * (X) + PLANE[1] * (Y)) / -PLANE[2]) - -/* - * Return 1 / solve_plane(). - */ -static inline GLfloat -solve_plane_recip(GLfloat x, GLfloat y, const GLfloat plane[4]) -{ - const GLfloat denom = plane[3] + plane[0] * x + plane[1] * y; - if (denom == 0.0F) - return 0.0F; - else - return -plane[2] / denom; -} - - /* * Solve plane and return clamped GLchan value. */ diff --git a/dll/opengl/mesa/swrast/s_span.c b/dll/opengl/mesa/swrast/s_span.c index ce296074ad1..b7ab51e93a4 100644 --- a/dll/opengl/mesa/swrast/s_span.c +++ b/dll/opengl/mesa/swrast/s_span.c @@ -273,68 +273,6 @@ interpolate_int_colors(struct gl_context *ctx, SWspan *span) span->arrayMask |= SPAN_RGBA; } - -/** - * Populate the FRAG_ATTRIB_COL array. - */ -static inline void -interpolate_float_colors(SWspan *span) -{ - GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL]; - const GLuint n = span->end; - GLuint i; - - assert(!(span->arrayAttribs & FRAG_BIT_COL0)); - - if (span->arrayMask & SPAN_RGBA) { - /* convert array of int colors */ - for (i = 0; i < n; i++) { - col0[i][0] = UBYTE_TO_FLOAT(span->array->rgba8[i][0]); - col0[i][1] = UBYTE_TO_FLOAT(span->array->rgba8[i][1]); - col0[i][2] = UBYTE_TO_FLOAT(span->array->rgba8[i][2]); - col0[i][3] = UBYTE_TO_FLOAT(span->array->rgba8[i][3]); - } - } - else { - /* interpolate red/green/blue/alpha to get float colors */ - ASSERT(span->interpMask & SPAN_RGBA); - if (span->interpMask & SPAN_FLAT) { - GLfloat r = FixedToFloat(span->red); - GLfloat g = FixedToFloat(span->green); - GLfloat b = FixedToFloat(span->blue); - GLfloat a = FixedToFloat(span->alpha); - for (i = 0; i < n; i++) { - ASSIGN_4V(col0[i], r, g, b, a); - } - } - else { - GLfloat r = FixedToFloat(span->red); - GLfloat g = FixedToFloat(span->green); - GLfloat b = FixedToFloat(span->blue); - GLfloat a = FixedToFloat(span->alpha); - GLfloat dr = FixedToFloat(span->redStep); - GLfloat dg = FixedToFloat(span->greenStep); - GLfloat db = FixedToFloat(span->blueStep); - GLfloat da = FixedToFloat(span->alphaStep); - for (i = 0; i < n; i++) { - col0[i][0] = r; - col0[i][1] = g; - col0[i][2] = b; - col0[i][3] = a; - r += dr; - g += dg; - b += db; - a += da; - } - } - } - - span->arrayAttribs |= FRAG_BIT_COL; - span->array->ChanType = GL_FLOAT; -} - - - /** * Fill in the span.zArray array from the span->z, zStep values. */ @@ -525,41 +463,6 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span) } /* if */ } - -/** - * Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array. - */ -static inline void -interpolate_wpos(struct gl_context *ctx, SWspan *span) -{ - GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS]; - GLuint i; - const GLfloat zScale = 1.0F / ctx->DrawBuffer->_DepthMaxF; - GLfloat w, dw; - - if (span->arrayMask & SPAN_XY) { - for (i = 0; i < span->end; i++) { - wpos[i][0] = (GLfloat) span->array->x[i]; - wpos[i][1] = (GLfloat) span->array->y[i]; - } - } - else { - for (i = 0; i < span->end; i++) { - wpos[i][0] = (GLfloat) span->x + i; - wpos[i][1] = (GLfloat) span->y; - } - } - - dw = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dw; - for (i = 0; i < span->end; i++) { - wpos[i][2] = (GLfloat) span->array->z[i] * zScale; - wpos[i][3] = w; - w += dw; - } -} - - /** * Apply the current polygon stipple pattern to a span of pixels. */ @@ -764,25 +667,6 @@ apply_aa_coverage(SWspan *span) } } - -/** - * Clamp span's float colors to [0,1] - */ -static inline void -clamp_colors(SWspan *span) -{ - GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL]; - GLuint i; - ASSERT(span->array->ChanType == GL_FLOAT); - for (i = 0; i < span->end; i++) { - rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); - rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); - rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); - rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); - } -} - - /** * Convert the span's color arrays to the given type. * The only way 'output' can be greater than zero is when we have a fragment diff --git a/dll/opengl/mesa/swrast/s_texfetch.c b/dll/opengl/mesa/swrast/s_texfetch.c index e8025fa869d..58a2759204d 100644 --- a/dll/opengl/mesa/swrast/s_texfetch.c +++ b/dll/opengl/mesa/swrast/s_texfetch.c @@ -33,35 +33,6 @@ #include -/** - * Convert an 8-bit sRGB value from non-linear space to a - * linear RGB value in [0, 1]. - * Implemented with a 256-entry lookup table. - */ -static inline GLfloat -nonlinear_to_linear(GLubyte cs8) -{ - static GLfloat table[256]; - static GLboolean tableReady = GL_FALSE; - if (!tableReady) { - /* compute lookup table now */ - GLuint i; - for (i = 0; i < 256; i++) { - const GLfloat cs = UBYTE_TO_FLOAT(i); - if (cs <= 0.04045) { - table[i] = cs / 12.92f; - } - else { - table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4); - } - } - tableReady = GL_TRUE; - } - return table[cs8]; -} - - - /* Texel fetch routines for all supported formats */ #define DIM 1 diff --git a/dll/opengl/mesa/swrast/s_texfilter.c b/dll/opengl/mesa/swrast/s_texfilter.c index f84396b53ca..80686cb76ca 100644 --- a/dll/opengl/mesa/swrast/s_texfilter.c +++ b/dll/opengl/mesa/swrast/s_texfilter.c @@ -58,26 +58,6 @@ lerp_2d(GLfloat a, GLfloat b, return LERP(b, temp0, temp1); } - -/** - * Do 3D/trilinear interpolation of float values. - * \sa lerp_2d - */ -static inline GLfloat -lerp_3d(GLfloat a, GLfloat b, GLfloat c, - GLfloat v000, GLfloat v100, GLfloat v010, GLfloat v110, - GLfloat v001, GLfloat v101, GLfloat v011, GLfloat v111) -{ - const GLfloat temp00 = LERP(a, v000, v100); - const GLfloat temp10 = LERP(a, v010, v110); - const GLfloat temp01 = LERP(a, v001, v101); - const GLfloat temp11 = LERP(a, v011, v111); - const GLfloat temp0 = LERP(b, temp00, temp10); - const GLfloat temp1 = LERP(b, temp01, temp11); - return LERP(c, temp0, temp1); -} - - /** * Do linear interpolation of colors. */ @@ -105,26 +85,6 @@ lerp_rgba_2d(GLfloat result[4], GLfloat a, GLfloat b, result[3] = lerp_2d(a, b, t00[3], t10[3], t01[3], t11[3]); } - -/** - * Do trilinear interpolation of colors. - */ -static inline void -lerp_rgba_3d(GLfloat result[4], GLfloat a, GLfloat b, GLfloat c, - const GLfloat t000[4], const GLfloat t100[4], - const GLfloat t010[4], const GLfloat t110[4], - const GLfloat t001[4], const GLfloat t101[4], - const GLfloat t011[4], const GLfloat t111[4]) -{ - GLuint k; - /* compiler should unroll these short loops */ - for (k = 0; k < 4; k++) { - result[k] = lerp_3d(a, b, c, t000[k], t100[k], t010[k], t110[k], - t001[k], t101[k], t011[k], t111[k]); - } -} - - /** * Used for GL_REPEAT wrap mode. Using A % B doesn't produce the * right results for A<0. Casting to A to be unsigned only works if B @@ -256,7 +216,6 @@ nearest_texel_location(GLenum wrapMode, } } - /* Power of two image sizes only */ static inline void linear_repeat_texel_location(GLuint size, GLfloat s, @@ -268,110 +227,6 @@ linear_repeat_texel_location(GLuint size, GLfloat s, *weight = FRAC(u); } - -/** - * Do clamp/wrap for a texture rectangle coord, GL_NEAREST filter mode. - */ -static inline GLint -clamp_rect_coord_nearest(GLenum wrapMode, GLfloat coord, GLint max) -{ - return IFLOOR( CLAMP(coord, 0.0F, max - 1) ); -} - - -/** - * As above, but GL_LINEAR filtering. - */ -static inline void -clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, - GLint *i0out, GLint *i1out, GLfloat *weight) -{ - GLfloat fcol; - /* Not exactly what the spec says, but it matches NVIDIA output */ - fcol = CLAMP(coord - 0.5F, 0.0F, max - 1); - *weight = FRAC(fcol); - *i0out = IFLOOR(fcol); - *i1out = *i0out + 1; -} - - -/** - * Compute slice/image to use for 1D or 2D array texture. - */ -static inline GLint -tex_array_slice(GLfloat coord, GLsizei size) -{ - GLint slice = IFLOOR(coord + 0.5f); - slice = CLAMP(slice, 0, size - 1); - return slice; -} - - -/** - * Compute nearest integer texcoords for given texobj and coordinate. - * NOTE: only used for depth texture sampling. - */ -static inline void -nearest_texcoord(const struct gl_texture_object *texObj, - GLuint level, - const GLfloat texcoord[4], - GLint *i, GLint *j, GLint *k) -{ - const struct gl_texture_image *img = texObj->Image[0][level]; - const GLint width = img->Width; - const GLint height = img->Height; - - switch (texObj->Target) { - case GL_TEXTURE_1D: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = 0; - *k = 0; - break; - case GL_TEXTURE_2D: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = nearest_texel_location(texObj->Sampler.WrapT, img, height, texcoord[1]); - *k = 0; - break; - default: - *i = *j = *k = 0; - break; - } -} - - -/** - * Compute linear integer texcoords for given texobj and coordinate. - * NOTE: only used for depth texture sampling. - */ -static inline void -linear_texcoord(const struct gl_texture_object *texObj, - GLuint level, - const GLfloat texcoord[4], - GLint *i0, GLint *i1, GLint *j0, GLint *j1, GLint *slice, - GLfloat *wi, GLfloat *wj) -{ - const struct gl_texture_image *img = texObj->Image[0][level]; - const GLint width = img->Width; - const GLint height = img->Height; - - switch (texObj->Target) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - linear_texel_locations(texObj->Sampler.WrapS, img, width, - texcoord[0], i0, i1, wi); - linear_texel_locations(texObj->Sampler.WrapT, img, height, - texcoord[1], j0, j1, wj); - *slice = 0; - break; - - default: - *slice = 0; - break; - } -} - - - /** * For linear interpolation between mipmap levels N and N+1, this function * computes N. @@ -1962,101 +1817,6 @@ sample_lambda_cube(struct gl_context *ctx, } } -/** - * Compare texcoord against depth sample. Return 1.0 or the ambient value. - */ -static inline GLfloat -shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample, - GLfloat ambient) -{ - switch (function) { - case GL_LEQUAL: - return (coord <= depthSample) ? 1.0F : ambient; - case GL_GEQUAL: - return (coord >= depthSample) ? 1.0F : ambient; - case GL_LESS: - return (coord < depthSample) ? 1.0F : ambient; - case GL_GREATER: - return (coord > depthSample) ? 1.0F : ambient; - case GL_EQUAL: - return (coord == depthSample) ? 1.0F : ambient; - case GL_NOTEQUAL: - return (coord != depthSample) ? 1.0F : ambient; - case GL_ALWAYS: - return 1.0F; - case GL_NEVER: - return ambient; - case GL_NONE: - return depthSample; - default: - _mesa_problem(NULL, "Bad compare func in shadow_compare"); - return ambient; - } -} - - -/** - * Compare texcoord against four depth samples. - */ -static inline GLfloat -shadow_compare4(GLenum function, GLfloat coord, - GLfloat depth00, GLfloat depth01, - GLfloat depth10, GLfloat depth11, - GLfloat ambient, GLfloat wi, GLfloat wj) -{ - const GLfloat d = (1.0F - (GLfloat) ambient) * 0.25F; - GLfloat luminance = 1.0F; - - switch (function) { - case GL_LEQUAL: - if (coord > depth00) luminance -= d; - if (coord > depth01) luminance -= d; - if (coord > depth10) luminance -= d; - if (coord > depth11) luminance -= d; - return luminance; - case GL_GEQUAL: - if (coord < depth00) luminance -= d; - if (coord < depth01) luminance -= d; - if (coord < depth10) luminance -= d; - if (coord < depth11) luminance -= d; - return luminance; - case GL_LESS: - if (coord >= depth00) luminance -= d; - if (coord >= depth01) luminance -= d; - if (coord >= depth10) luminance -= d; - if (coord >= depth11) luminance -= d; - return luminance; - case GL_GREATER: - if (coord <= depth00) luminance -= d; - if (coord <= depth01) luminance -= d; - if (coord <= depth10) luminance -= d; - if (coord <= depth11) luminance -= d; - return luminance; - case GL_EQUAL: - if (coord != depth00) luminance -= d; - if (coord != depth01) luminance -= d; - if (coord != depth10) luminance -= d; - if (coord != depth11) luminance -= d; - return luminance; - case GL_NOTEQUAL: - if (coord == depth00) luminance -= d; - if (coord == depth01) luminance -= d; - if (coord == depth10) luminance -= d; - if (coord == depth11) luminance -= d; - return luminance; - case GL_ALWAYS: - return 1.0F; - case GL_NEVER: - return ambient; - case GL_NONE: - /* ordinary bilinear filtering */ - return lerp_2d(wi, wj, depth00, depth10, depth01, depth11); - default: - _mesa_problem(NULL, "Bad compare func in sample_compare4"); - return ambient; - } -} - /** * We use this function when a texture object is in an "incomplete" state. * When a fragment program attempts to sample an incomplete texture we diff --git a/dll/opengl/mesa/tnl/t_draw.c b/dll/opengl/mesa/tnl/t_draw.c index c8916e7e8ed..404bfe3ec2e 100644 --- a/dll/opengl/mesa/tnl/t_draw.c +++ b/dll/opengl/mesa/tnl/t_draw.c @@ -199,9 +199,6 @@ static GLboolean *_tnl_import_edgeflag( struct gl_context *ctx, return space; } -static const GLfloat zero_floats[4] = {0.0, 0.0, 0.0, 0.0}; - - static void bind_inputs( struct gl_context *ctx, const struct gl_client_array *inputs[], GLint count, diff --git a/dll/opengl/opengl32/CMakeLists.txt b/dll/opengl/opengl32/CMakeLists.txt index 9a14f68ee0e..7dbaa0e8744 100644 --- a/dll/opengl/opengl32/CMakeLists.txt +++ b/dll/opengl/opengl32/CMakeLists.txt @@ -53,6 +53,10 @@ if((ARCH STREQUAL "i386") AND (NOT MSVC)) target_link_libraries(opengl32 mesa_x86) endif() +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(opengl32 mingwex) +endif() + set_module_type(opengl32 win32dll HOTPATCHABLE) add_importlibs(opengl32 gdi32 user32 advapi32 msvcrt kernel32 ntdll) diff --git a/dll/win32/beepmidi/CMakeLists.txt b/dll/win32/beepmidi/CMakeLists.txt index c8d0dbb603d..fac6040b173 100644 --- a/dll/win32/beepmidi/CMakeLists.txt +++ b/dll/win32/beepmidi/CMakeLists.txt @@ -7,6 +7,10 @@ list(APPEND SOURCE add_library(beepmidi SHARED ${SOURCE}) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(beepmidi mingwex) +endif() + set_module_type(beepmidi win32dll UNICODE) add_importlibs(beepmidi winmm msvcrt kernel32 ntdll) diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt index fe0dbe2dd47..7c9877f5fbf 100644 --- a/dll/win32/browseui/CMakeLists.txt +++ b/dll/win32/browseui/CMakeLists.txt @@ -62,7 +62,9 @@ add_pch(browseui precomp.h SOURCE) add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all) if(NOT MSVC) - add_target_compile_flags(browseui "-Wno-unused-but-set-variable") + if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_target_compile_flags(browseui "-Wno-unused-but-set-variable") + endif() # Binutils linker bug if(LTCG) diff --git a/dll/win32/browseui/lang/ru-RU.rc b/dll/win32/browseui/lang/ru-RU.rc index a798508c673..f0eb27639ad 100644 --- a/dll/win32/browseui/lang/ru-RU.rc +++ b/dll/win32/browseui/lang/ru-RU.rc @@ -1,21 +1,3 @@ -/* -* Copyright 2009 Andrew Hill -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 of the License, or (at your option) any later version. -* -* This library 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 -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -*/ - LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Menus */ @@ -67,7 +49,7 @@ BEGIN BEGIN MENUITEM "&Назад\tAlt+Стрелка влево", IDM_GOTO_BACK MENUITEM "&Вперед\tAlt+Стрелка вправо", IDM_GOTO_FORWARD - MENUITEM "&На один уровень вверх", IDM_GOTO_UPONELEVEL + MENUITEM "&Вверх", IDM_GOTO_UPONELEVEL MENUITEM "", -1, MFT_SEPARATOR MENUITEM "&Домой\tAlt+Home", IDM_GOTO_HOMEPAGE END @@ -119,6 +101,7 @@ BEGIN "B", IDM_FAVORITES_ORGANIZEFAVORITES, VIRTKEY, CONTROL, NOINVERT VK_LEFT, IDM_GOTO_BACK, VIRTKEY, ALT VK_RIGHT, IDM_GOTO_FORWARD, VIRTKEY, ALT + VK_BACK, 41010, NOINVERT, VIRTKEY "W", IDM_FILE_CLOSE, VIRTKEY, CONTROL, NOINVERT "E", IDM_EXPLORERBAR_SEARCH, VIRTKEY, CONTROL, NOINVERT "I", IDM_EXPLORERBAR_FAVORITES, VIRTKEY, CONTROL, NOINVERT @@ -155,7 +138,7 @@ END STRINGTABLE BEGIN 9025 "Закрыть окно." - 9026 "Goes up one level." + 9026 "Вверх." END STRINGTABLE diff --git a/dll/win32/comdlg32/lang/cdlg_Ru.rc b/dll/win32/comdlg32/lang/cdlg_Ru.rc index be030b51994..ec399515a03 100644 --- a/dll/win32/comdlg32/lang/cdlg_Ru.rc +++ b/dll/win32/comdlg32/lang/cdlg_Ru.rc @@ -64,7 +64,7 @@ STRINGTABLE PD32_OUT_OF_MEMORY "Мало памяти." PD32_GENERIC_ERROR "Произошла ошибка." PD32_DRIVER_UNKNOWN "Неизвестный драйвер принтера." - PD32_NO_DEVICES "Перед тем как настраивать страницу печати или печатать документ нужноустановить принтеры. Пожалуйста установите его и попробуйте еще раз." + PD32_NO_DEVICES "Перед тем как настраивать страницу печати или печатать документ нужно установить принтеры. Пожалуйста установите его и попробуйте еще раз." PD32_DEFAULT_PRINTER "Принтер по умолчанию; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Документов в очереди: %d" diff --git a/dll/win32/crypt32/lang/crypt32_Tr.rc b/dll/win32/crypt32/lang/crypt32_Tr.rc index 7aeb43bee74..3a9cef893a4 100644 --- a/dll/win32/crypt32/lang/crypt32_Tr.rc +++ b/dll/win32/crypt32/lang/crypt32_Tr.rc @@ -113,7 +113,7 @@ STRINGTABLE IDS_CA_EXCHANGE "CA Şifreleme Onay Belgesi" IDS_KEY_RECOVERY_AGENT "Anahtar Kurtarma Yardımcısı" IDS_CERTIFICATE_TEMPLATE "Onay Belgesi Kalıp Bilgisi" - IDS_ENTERPRISE_ROOT_OID "Kuruluş Kök OID'si" + IDS_ENTERPRISE_ROOT_OID "İşletme Kök OID'si" IDS_RDN_DUMMY_SIGNER "Kukla İmzâlayıcısı" IDS_ARCHIVED_KEY_ATTR "Şifrelenmiş Husûsî Anahtarı" IDS_CRL_SELF_CDP "Yayımlanan CRL Konumları" diff --git a/dll/win32/crypt32/rootstore.c b/dll/win32/crypt32/rootstore.c index 414b0d81d2f..f3c8bbac178 100644 --- a/dll/win32/crypt32/rootstore.c +++ b/dll/win32/crypt32/rootstore.c @@ -800,6 +800,18 @@ static HCERTSTORE create_root_store(void) read_trusted_roots_from_known_locations(memStore); add_ms_root_certs(memStore); root = CRYPT_ProvCreateStore(0, memStore, &provInfo); +#ifdef __REACTOS__ + { + HCERTSTORE regStore = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"AuthRoot"); + if (regStore) + { + HCERTSTORE collStore = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + CertAddStoreToCollection(collStore, regStore, 0, 0); + root = collStore; + } + } +#endif } TRACE("returning %p\n", root); return root; diff --git a/dll/win32/cryptui/cryptui.rc b/dll/win32/cryptui/cryptui.rc index de1478a9a68..5d1c96b3937 100644 --- a/dll/win32/cryptui/cryptui.rc +++ b/dll/win32/cryptui/cryptui.rc @@ -82,6 +82,9 @@ IDB_CERT_HEADER BITMAP "res/certheader.bmp" #ifdef LANGUAGE_RO_RO #include "lang/cryptui_Ro.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/cryptui_Ru.rc" +#endif #ifdef LANGAUGE_SQ_AL #include "lang/cryptui_Sq.rc" #endif diff --git a/dll/win32/cryptui/lang/cryptui_Ru.rc b/dll/win32/cryptui/lang/cryptui_Ru.rc new file mode 100644 index 00000000000..63f0da89d80 --- /dev/null +++ b/dll/win32/cryptui/lang/cryptui_Ru.rc @@ -0,0 +1,462 @@ +/* + * cryptui dll resources + * + * Copyright 2008 Juan Lang + * + * Russian translation by Kudratov Olimjon (olim98@bk.ru) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "cryptuires.h" + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_CERTIFICATE "Certificate" + IDS_CERTIFICATEINFORMATION "Certificate Information" + IDS_CERT_INFO_BAD_SIG "This certificate has an invalid signature. The certificate may have been altered or corrupted." + IDS_CERT_INFO_UNTRUSTED_CA "This root certificate is not trusted. To trust it, add it to your system's trusted root certificate store." + IDS_CERT_INFO_UNTRUSTED_ROOT "This certificate could not be validated to a trusted root certificate." + IDS_CERT_INFO_PARTIAL_CHAIN "This certificate's issuer could not be found." + IDS_CERT_INFO_BAD_PURPOSES "All the intended purposes of this certificate could not be verified." + IDS_CERT_INFO_PURPOSES "This certificate is intended for the following purposes:" + IDS_SUBJECT_HEADING "Issued to: " + IDS_ISSUER_HEADING "Issued by: " + IDS_VALID_FROM "Valid from " + IDS_VALID_TO " to " + IDS_CERTIFICATE_BAD_SIGNATURE "This certificate has an invalid signature." + IDS_CERTIFICATE_BAD_TIME "This certificate has expired or is not yet valid." + IDS_CERTIFICATE_BAD_TIMENEST "This certificate's validity period exceeds that of its issuer." + IDS_CERTIFICATE_REVOKED "This certificate was revoked by its issuer." + IDS_CERTIFICATE_VALID "This certificate is OK." + IDS_FIELD "Field" + IDS_VALUE "Value" + IDS_FIELDS_ALL "" + IDS_FIELDS_V1 "Version 1 Fields Only" + IDS_FIELDS_EXTENSIONS "Extensions Only" + IDS_FIELDS_CRITICAL_EXTENSIONS "Critical Extensions Only" + IDS_FIELDS_PROPERTIES "Properties Only" + IDS_FIELD_VERSION "Version" + IDS_FIELD_SERIAL_NUMBER "Serial number" + IDS_FIELD_ISSUER "Issuer" + IDS_FIELD_VALID_FROM "Valid from" + IDS_FIELD_VALID_TO "Valid to" + IDS_FIELD_SUBJECT "Subject" + IDS_FIELD_PUBLIC_KEY "Public key" + IDS_FIELD_PUBLIC_KEY_FORMAT "%1 (%2!d! bits)" + IDS_PROP_HASH "SHA1 hash" + IDS_PROP_ENHKEY_USAGE "Enhanced key usage (property)" + IDS_PROP_FRIENDLY_NAME "Friendly name" + IDS_PROP_DESCRIPTION "Description" + IDS_CERTIFICATE_PROPERTIES "Certificate Properties" + IDS_CERTIFICATE_PURPOSE_ERROR "Please enter an OID in the form 1.2.3.4" + IDS_CERTIFICATE_PURPOSE_EXISTS "The OID you entered already exists." + IDS_SELECT_STORE_TITLE "Select Certificate Store" + IDS_SELECT_STORE "Please select a certificate store." + IDS_IMPORT_WIZARD "Certificate Import Wizard" + IDS_IMPORT_TYPE_MISMATCH "The file contains objects that do not match the given criteria. Please select another file." + IDS_IMPORT_FILE_TITLE "File to Import" + IDS_IMPORT_FILE_SUBTITLE "Specify the file you want to import." + IDS_IMPORT_STORE_TITLE "Certificate Store" + IDS_IMPORT_STORE_SUBTITLE "Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists." + IDS_IMPORT_FILTER_CERT "X.509 Certificate (*.cer; *.crt)" + IDS_IMPORT_FILTER_PFX "Personal Information Exchange (*.pfx; *.p12)" + IDS_IMPORT_FILTER_CRL "Certificate Revocation List (*.crl)" + IDS_IMPORT_FILTER_CTL "Certificate Trust List (*.stl)" + IDS_IMPORT_FILTER_SERIALIZED_STORE "Microsoft Serialized Certificate Store (*.sst)" + IDS_IMPORT_FILTER_CMS "CMS/PKCS #7 Messages (*.spc; *.p7b)" + IDS_IMPORT_FILTER_ALL "All files (*.*)" + IDS_IMPORT_EMPTY_FILE "Please select a file." + IDS_IMPORT_BAD_FORMAT "The file format is not recognized. Please select another file." + IDS_IMPORT_OPEN_FAILED "Could not open " + IDS_IMPORT_DEST_DETERMINED "Determined by the program" + IDS_IMPORT_SELECT_STORE "Please select a store" + IDS_IMPORT_STORE_SELECTION "Certificate Store Selected" + IDS_IMPORT_DEST_AUTOMATIC "Automatically determined by the program" + IDS_IMPORT_FILE "File" + IDS_IMPORT_CONTENT "Content" + IDS_IMPORT_CONTENT_CERT "Certificate" + IDS_IMPORT_CONTENT_CRL "Certificate Revocation List" + IDS_IMPORT_CONTENT_CTL "Certificate Trust List" + IDS_IMPORT_CONTENT_CMS "CMS/PKCS #7 Message" + IDS_IMPORT_CONTENT_PFX "Personal Information Exchange" + IDS_IMPORT_CONTENT_STORE "Certificate Store" + IDS_IMPORT_SUCCEEDED "The import was successful." + IDS_IMPORT_FAILED "The import failed." + IDS_WIZARD_TITLE_FONT "Arial" + IDS_PURPOSE_ALL "" + IDS_PURPOSE_ADVANCED "" + IDS_SUBJECT_COLUMN "Issued To" + IDS_ISSUER_COLUMN "Issued By" + IDS_EXPIRATION_COLUMN "Expiration Date" + IDS_FRIENDLY_NAME_COLUMN "Friendly Name" + IDS_ALLOWED_PURPOSE_ALL "" + IDS_ALLOWED_PURPOSE_NONE "" + IDS_WARN_REMOVE_MY "You will no longer be able to decrypt messages with this certificate, or sign messages with it.\n\ +Are you sure you want to remove this certificate?" + IDS_WARN_REMOVE_PLURAL_MY "You will no longer be able to decrypt messages with these certificates, or sign messages with them.\n\ +Are you sure you want to remove these certificates?" + IDS_WARN_REMOVE_ADDRESSBOOK "You will no longer be able to encrypt messages with this certificate, or verify messages signed with it.\n\ +Are you sure you want to remove this certificate?" + IDS_WARN_REMOVE_PLURAL_ADDRESSBOOK "You will no longer be able to encrypt messages with these certificates, or verify messages signed with it.\n\ +Are you sure you want to remove these certificates?" + IDS_WARN_REMOVE_CA "Certificates issued by this certification authority will no longer be trusted.\n\ +Are you sure you want to remove this certificate?" + IDS_WARN_REMOVE_PLURAL_CA "Certificates issued by these certification authorities will no longer be trusted.\n\ +Are you sure you want to remove these certificates?" + IDS_WARN_REMOVE_ROOT "Certificates issued by this root certification authority, or any certification authorities it issued, will no longer be trusted.\n\ +Are you sure you want to remove this trusted root certificate?" + IDS_WARN_REMOVE_PLURAL_ROOT "Certificates issued by these root certification authorities, or any certification authorities they issued, will no longer be trusted.\n\ +Are you sure you want to remove these trusted root certificates?" + IDS_WARN_REMOVE_TRUSTEDPUBLISHER "Software signed by this publisher will no longer be trusted.\n\ +Are you sure you want to remove this certificate?" + IDS_WARN_REMOVE_PLURAL_TRUSTEDPUBLISHER "Software signed by these publishers will no longer be trusted.\n\ +Are you sure you want to remove these certificates?" + IDS_WARN_REMOVE_DEFAULT "Are you sure you want to remove this certificate?" + IDS_WARN_REMOVE_PLURAL_DEFAULT "Are you sure you want to remove these certificates?" + IDS_CERT_MGR "Certificates" + IDS_FRIENDLY_NAME_NONE "" + IDS_PURPOSE_SERVER_AUTH "Ensures the identity of a remote computer" + IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer" + IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\n\ +Protects software from alteration after publication" + IDS_PURPOSE_EMAIL_PROTECTION "Protects e-mail messages" + IDS_PURPOSE_IPSEC "Allows secure communication over the Internet" + IDS_PURPOSE_TIMESTAMP_SIGNING "Allows data to be signed with the current time" + IDS_PURPOSE_CTL_USAGE_SIGNING "Allows you to digitally sign a certificate trust list" + IDS_PURPOSE_EFS "Allows data on disk to be encrypted" + IDS_PURPOSE_EFS_RECOVERY "File Recovery" + IDS_PURPOSE_WHQL "Windows Hardware Driver Verification" + IDS_PURPOSE_NT5 "Windows System Component Verification" + IDS_PURPOSE_OEM_WHQL "OEM Windows System Component Verification" + IDS_PURPOSE_EMBEDDED_NT "Embedded Windows System Component Verification" + IDS_PURPOSE_ROOT_LIST_SIGNER "Root List Signer" + IDS_PURPOSE_QUALIFIED_SUBORDINATION "Qualified Subordination" + IDS_PURPOSE_KEY_RECOVERY "Key Recovery" + IDS_PURPOSE_DOCUMENT_SIGNING "Document Signing" + IDS_PURPOSE_LIFETIME_SIGNING "Lifetime Signing" + IDS_PURPOSE_DRM "Digital Rights" + IDS_PURPOSE_LICENSES "Key Pack Licenses" + IDS_PURPOSE_LICENSE_SERVER "License Server Verification" + IDS_PURPOSE_ENROLLMENT_AGENT "Certificate Request Agent" + IDS_PURPOSE_SMARTCARD_LOGON "Smart Card Logon" + IDS_PURPOSE_CA_EXCHANGE "Private Key Archival" + IDS_PURPOSE_KEY_RECOVERY_AGENT "Key Recovery Agent" + IDS_PURPOSE_DS_EMAIL_REPLICATION "Directory Service Email Replication" + IDS_EXPORT_WIZARD "Certificate Export Wizard" + IDS_EXPORT_FORMAT_TITLE "Export Format" + IDS_EXPORT_FORMAT_SUBTITLE "Choose the format in which the content will be saved." + IDS_EXPORT_FILE_TITLE "Export Filename" + IDS_EXPORT_FILE_SUBTITLE "Specify the name of the file in which the content will be saved." + IDS_EXPORT_FILE_EXISTS "The specified file already exists. Do you want to replace it?" + IDS_EXPORT_FILTER_CERT "DER-Encoded Binary X.509 (*.cer)" + IDS_EXPORT_FILTER_BASE64_CERT "Base64-Encoded X.509 (*.cer)" + IDS_EXPORT_FILTER_CRL "Certificate Revocation List (*.crl)" + IDS_EXPORT_FILTER_CTL "Certificate Trust List (*.stl)" + IDS_EXPORT_FILTER_CMS "CMS/PKCS #7 Messages (*.p7b)" + IDS_EXPORT_FILTER_PFX "Personal Information Exchange (*.pfx)" + IDS_EXPORT_FILTER_SERIALIZED_CERT_STORE "Serialized Certificate Store (*.sst)" + IDS_EXPORT_FORMAT "File Format" + IDS_EXPORT_INCLUDE_CHAIN "Include all certificates in certificate path" + IDS_EXPORT_KEYS "Export keys" + IDS_YES "Yes" + IDS_NO "No" + IDS_EXPORT_SUCCEEDED "The export was successful." + IDS_EXPORT_FAILED "The export failed." + IDS_EXPORT_PRIVATE_KEY_TITLE "Export Private Key" + IDS_EXPORT_PRIVATE_KEY_SUBTITLE "The certificate contains a private key which may be exported along with the certificate." + IDS_EXPORT_PASSWORD_TITLE "Enter Password" + IDS_EXPORT_PASSWORD_SUBTITLE "You may password-protect a private key." + IDS_EXPORT_PASSWORD_MISMATCH "The passwords do not match." + IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Note: The private key for this certificate could not be opened." + IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Note: The private key for this certificate is not exportable." +} + +IDD_GENERAL DIALOG 0, 0, 255, 236 +CAPTION "Общие" +STYLE WS_VISIBLE +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", -1, "Static", WS_BORDER|SS_WHITERECT, 6,10,241,200 + CONTROL "", IDC_CERTIFICATE_ICON,"RichEdit20W", ES_READONLY|WS_DISABLED,8,11,26,26 + CONTROL "", IDC_CERTIFICATE_INFO,"RichEdit20W", ES_READONLY|WS_DISABLED,34,11,212,26 + CONTROL "", -1, "Static", SS_BLACKFRAME, 16,37,222,1 + CONTROL "", IDC_CERTIFICATE_STATUS,"RichEdit20W", ES_READONLY|ES_MULTILINE,8,38,238,78 + CONTROL "", -1, "Static", SS_BLACKFRAME, 16,116,222,1 + CONTROL "", IDC_CERTIFICATE_NAMES,"RichEdit20W", ES_READONLY|ES_MULTILINE|WS_DISABLED,8,118,238,90 + PUSHBUTTON "&Установить сертификат...", IDC_ADDTOSTORE,53,216,95,14 + PUSHBUTTON "&Заявление поставщика", IDC_ISSUERSTATEMENT,152,216,95,14 +END + +IDD_DETAIL DIALOG 0, 0, 255, 236 +CAPTION "Состав" +STYLE WS_VISIBLE +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Показать:", -1, 6,12,40,14 + COMBOBOX IDC_DETAIL_SELECT, 48,10,100,14, CBS_DROPDOWNLIST|WS_BORDER|WS_VSCROLL|WS_TABSTOP + CONTROL "", IDC_DETAIL_LIST, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 6,28,241,100 + CONTROL "", IDC_DETAIL_VALUE, "RichEdit20W", ES_READONLY|ES_MULTILINE|WS_TABSTOP, 6,136,241,70 + PUSHBUTTON "&Свойства...", IDC_EDITPROPERTIES,53,216,95,14 + PUSHBUTTON "&Копировать в файл...", IDC_EXPORT,152,216,95,14 +END + +IDD_HIERARCHY DIALOG 0, 0, 255, 236 +CAPTION "Путь сертификации" +STYLE WS_VISIBLE +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Пут&ь сертификации", -1,6,10,245,165, BS_GROUPBOX + CONTROL "",IDC_CERTPATH, "SysTreeView32", TVS_HASLINES|WS_BORDER, + 13,22,231,130 + PUSHBUTTON "&Просмотр сертификата", IDC_VIEWCERTIFICATE,155,156,90,14 + LTEXT "Состо&яние сертификата", IDC_CERTIFICATESTATUS,6,183,200,14 + CONTROL "", IDC_CERTIFICATESTATUSTEXT,"RichEdit20W", + WS_BORDER|ES_READONLY|ES_MULTILINE|WS_DISABLED,6,195,245,36 +END + +IDD_USERNOTICE DIALOG 0, 0, 255, 256 +CAPTION "Заявление об отказе" +STYLE WS_VISIBLE +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_USERNOTICE,"RichEdit20W", + WS_BORDER|ES_READONLY|ES_MULTILINE|WS_DISABLED,6,10,241,200 + PUSHBUTTON "Закрыть", IDOK,73,216,85,14 + PUSHBUTTON "&Подробнее", IDC_CPS,162,216,85,14 +END + +IDD_CERT_PROPERTIES_GENERAL DIALOG 0, 0, 255, 236 +CAPTION "Общие" +STYLE WS_VISIBLE +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Понятное имя:", -1, 6,14,60,14 + EDITTEXT IDC_FRIENDLY_NAME, 70,12,181,14, ES_AUTOHSCROLL|WS_TABSTOP + LTEXT "&Описание:", -1, 6,32,60,14 + EDITTEXT IDC_DESCRIPTION, 70,30,181,14, ES_AUTOVSCROLL|ES_MULTILINE|WS_TABSTOP|WS_VSCROLL + GROUPBOX "Назначения сертификата", -1,6,48,245,185, BS_GROUPBOX + AUTORADIOBUTTON "&Разрешить все назначения для этого сертификата", + IDC_ENABLE_ALL_PURPOSES, 12,58,230,14, BS_AUTORADIOBUTTON|WS_TABSTOP + AUTORADIOBUTTON "&Запретить все назначения для этого сертификата", + IDC_DISABLE_ALL_PURPOSES, 12,70,230,14, BS_AUTORADIOBUTTON + AUTORADIOBUTTON "Р&азрешить только следующие назначения:", + IDC_ENABLE_SELECTED_PURPOSES, 12,82,230,14, BS_AUTORADIOBUTTON + CONTROL "", IDC_CERTIFICATE_USAGES,"SysListView32", + LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, + 24,100,220,106 + PUSHBUTTON "Добавить &назначение...", IDC_ADD_PURPOSE,174,212,70,14 +END + +IDD_ADD_CERT_PURPOSE DIALOG 0,0,200,68 +CAPTION "Назначение, определенное пользователем" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Введите код объекта (OID) для добавляемого назначения сертификата.", + -1, 6,6,190,28 + EDITTEXT IDC_NEW_PURPOSE, 6,28,190,14, ES_AUTOVSCROLL|ES_MULTILINE|WS_TABSTOP|WS_VSCROLL + PUSHBUTTON "OK", IDOK, 33,48,60,14 + PUSHBUTTON "Отмена", IDCANCEL, 100,48,60,14 +END + +IDD_SELECT_STORE DIALOG 0,0,200,136 +CAPTION "Выбор хранилища сертификата" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Выберите хранилище сертификата:", IDC_STORE_TEXT, 6,6,190,28 + CONTROL "",IDC_STORE_LIST, "SysTreeView32", TVS_HASLINES|WS_BORDER|WS_TABSTOP, + 6,28,188,70 + CHECKBOX "&Хранилища сертификатов", IDC_SHOW_PHYSICAL_STORES, 6,102,180,14, BS_AUTOCHECKBOX|WS_TABSTOP + PUSHBUTTON "OK", IDOK, 90,118,50,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Отмена", IDCANCEL, 144,118,50,14 +END + +IDD_IMPORT_WELCOME DIALOG 0,0,317,143 +CAPTION "Мастер импорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Мастер импорта сертификатов", IDC_IMPORT_TITLE, 115,7,195,30 + LTEXT "Этот мастер помогает копировать сертификаты, списки доверия и списки отзыва сертификатов с локального диска в хранилище сертификатов.\n\ +\n\ +Сертификат, выданный центром сертификации, является подтверждением вашей личности и содержит информацию, необходимую для защиты данных или установления защищенных сетевых подключений. Хранилище сертификатов - это область системы, предназначенная для хранения сертификатов.\n\ +\n\ +Для продолжения нажмите кнопку ""Далее"".", + -1, 115,40,195,120 +END + +IDD_IMPORT_FILE DIALOG 0,0,317,178 +CAPTION "Мастер импорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Имя фа&йла:", -1, 21,1,195,10 + EDITTEXT IDC_IMPORT_FILENAME, 21,11,208,14, ES_AUTOHSCROLL|WS_TABSTOP + PUSHBUTTON "&Обзор...", IDC_IMPORT_BROWSE_FILE, 236,11,60,14 + LTEXT "Замечание: следующие форматы файлов могут содержать более одного сертификата в одном файле:", + -1, 21,30,265,16 + LTEXT "Стандарт Cryptographic Message Syntax - сертификаты PKCS #7 (.p7b)", + -1, 31,53,265,10 + LTEXT "Файл обмена личной информацией - PKCS #12 (.PFX,.P12)", + -1, 31,68,265,10 + LTEXT "Хранилище сериализованных сертификатов (.SST)", + -1, 31,83,265,10 +END + +IDD_IMPORT_STORE DIALOG 0,0,317,143 +CAPTION "Мастер импорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Выбор хранилища может быть произведен ReactOS автоматически, или же можно указать размещение сертификата вручную.", + -1, 21,1,220,25 + AUTORADIOBUTTON "&Автоматически выбрать хранилище на основе типа сертификата", + IDC_IMPORT_AUTO_STORE, 31,28,220,12, BS_AUTORADIOBUTTON|WS_TABSTOP + AUTORADIOBUTTON "&Поместить все сертификаты в следующее хранилище", + IDC_IMPORT_SPECIFY_STORE, 31,42,220,12, BS_AUTORADIOBUTTON + EDITTEXT IDC_IMPORT_STORE, 44,61,185,14, ES_READONLY + PUSHBUTTON "&Обзор...", IDC_IMPORT_BROWSE_STORE, 236,61,60,14 +END + +IDD_IMPORT_FINISH DIALOG 0,0,317,178 +CAPTION "Мастер импорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Завершение мастера импорта сертификатов", IDC_IMPORT_TITLE, + 115,1,195,40 + LTEXT "Сертификат будет импортирован после нажатия кнопки ""Готово"".", + -1, 115,33,195,24 + LTEXT "Были указаны следующие параметры:", + -1, 115,57,195,12 + CONTROL "Summary", IDC_IMPORT_SETTINGS, "SysListView32", + LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, + 115,67,174,100 +END + +IDD_CERT_MGR DIALOG 0,0,335,270 +CAPTION "Certificates" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "I&ntended purpose:", -1, 7,9,100,12 + COMBOBOX IDC_MGR_PURPOSE_SELECTION, 83,7,245,14, CBS_DROPDOWNLIST|WS_BORDER|WS_VSCROLL|WS_TABSTOP + CONTROL "", IDC_MGR_STORES, "SysTabControl32", WS_CLIPSIBLINGS|WS_TABSTOP, 7,25,321,140 + CONTROL "", IDC_MGR_CERTS, "SysListView32", LVS_REPORT|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 15,46,305,111 + PUSHBUTTON "&Import...", IDC_MGR_IMPORT, 7,172,65,14 + PUSHBUTTON "&Export...", IDC_MGR_EXPORT, 76,172,65,14, WS_DISABLED + PUSHBUTTON "&Remove", IDC_MGR_REMOVE, 145,172,65,14, WS_DISABLED + PUSHBUTTON "&Advanced...", IDC_MGR_ADVANCED, 263,172,65,14 + GROUPBOX "Certificate intended purposes", -1,7,194,321,47, BS_GROUPBOX + LTEXT "", IDC_MGR_PURPOSES, 13,206,252,32 + PUSHBUTTON "&View", IDC_MGR_VIEW, 269,218,51,14, WS_DISABLED + PUSHBUTTON "&Close", IDCANCEL, 277,249,51,14, BS_DEFPUSHBUTTON +END + +IDD_CERT_MGR_ADVANCED DIALOG 0,0,248,176 +CAPTION "Advanced Options" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Certificate purpose", -1, 7,7,234,141, BS_GROUPBOX + LTEXT "Select one or more purposes to be listed when Advanced Purposes is selected.", + -1, 14,18,220,16 + LTEXT "&Certificate purposes:", -1, 14,41,90,12, WS_TABSTOP + CONTROL "", IDC_CERTIFICATE_USAGES,"SysListView32", + LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, + 14,51,220,90 + PUSHBUTTON "OK", IDOK, 132,155,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 190,155,51,14 +END + +IDD_EXPORT_WELCOME DIALOG 0,0,317,143 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Мастер экспорта сертификатов", IDC_EXPORT_TITLE, 115,7,195,30 + LTEXT "Этот мастер помогает копировать сертификаты, списки доверия и списки отзыва сертификатов из хранилища сертификатов на локальный диск.\n\ +\n\ +Сертификат, выданный центром сертификации, является подтверждением вашей личности и содержит информацию, необходимую для защиты данных или установления защищенных сетевых подключений. Хранилище сертификатов - это область системы, предназначенная для хранения сертификатов.\n\ +\n\ +Для продолжения нажмите кнопку ""Далее"".", + -1, 115,40,195,120 +END + +IDD_EXPORT_PRIVATE_KEY DIALOG 0,0,317,143 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Закрытые ключи защищены паролем. Чтобы экспортировать закрытый ключ вместе с сертификатом, нужно будет указать пароль.", -1, 21,1,195,25 + LTEXT "Экспортировать закрытый ключ вместе с сертификатом?", -1, 21,27,195,10 + AUTORADIOBUTTON "Д&а, экспортировать закрытый ключ", + IDC_EXPORT_PRIVATE_KEY_YES, 31,36,200,12, BS_AUTORADIOBUTTON|WS_TABSTOP + AUTORADIOBUTTON "Н&ет, не экспортировать закрытый ключ", + IDC_EXPORT_PRIVATE_KEY_NO, 31,48,200,12, BS_AUTORADIOBUTTON + LTEXT "", IDC_EXPORT_PRIVATE_KEY_UNAVAILABLE, 21,60,200,24 +END + +IDD_EXPORT_PASSWORD DIALOG 0,0,317,143 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Пароль:", -1, 21,1,195,10 + EDITTEXT IDC_EXPORT_PASSWORD, 21,11,208,14, ES_AUTOHSCROLL|WS_TABSTOP + LTEXT "Введите подтвер&ждение пароля (обязательно):", -1, 21,35,195,10 + EDITTEXT IDC_EXPORT_PASSWORD_CONFIRM, 21,45,208,14, ES_AUTOHSCROLL|WS_TABSTOP +END + +IDD_EXPORT_FORMAT DIALOG 0,0,317,143 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Выберите формат файла сертификата:", -1, 21,1,195,10 + AUTORADIOBUTTON "Файлы X.509 (.CER) в &кодировке DER", + IDC_EXPORT_FORMAT_DER, 31,18,280,12, BS_AUTORADIOBUTTON|WS_TABSTOP + AUTORADIOBUTTON "Файлы X.509 (.CER) в к&одировке Base-64", + IDC_EXPORT_FORMAT_BASE64, 31,30,280,12, BS_AUTORADIOBUTTON + AUTORADIOBUTTON "&Стандарт Cryptographic Message Syntax - сертификаты PKCS #7 (.p7b)", + IDC_EXPORT_FORMAT_CMS, 31,42,280,12, BS_AUTORADIOBUTTON + CHECKBOX "&Включить по возможности все сертификаты в путь сертификации", + IDC_EXPORT_CMS_INCLUDE_CHAIN, 44,57,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + AUTORADIOBUTTON "&Файл обмена личной информацией - PKCS #12 (.PFX)", + IDC_EXPORT_FORMAT_PFX, 31,72,280,12, BS_AUTORADIOBUTTON|WS_DISABLED + CHECKBOX "Вкл&ючить по возможности все сертификаты в путь сертификации", + IDC_EXPORT_PFX_INCLUDE_CHAIN, 44,87,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + CHECKBOX "Включить сильное &шифрование", + IDC_EXPORT_PFX_STRONG_ENCRYPTION, 44,102,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED + CHECKBOX "&Удалить закрытый ключ после успешного экспорта", + IDC_EXPORT_PFX_DELETE_PRIVATE_KEY, 44,117,280,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED +END + +IDD_EXPORT_FILE DIALOG 0,0,317,143 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Имя фа&йла:", -1, 21,1,195,10 + EDITTEXT IDC_EXPORT_FILENAME, 21,11,208,14, ES_AUTOHSCROLL|WS_TABSTOP + PUSHBUTTON "&Обзор...", IDC_EXPORT_BROWSE_FILE, 236,11,60,14 +END + +IDD_EXPORT_FINISH DIALOG 0,0,317,178 +CAPTION "Мастер экспорта сертификатов" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Завершение работы мастера экспорта сертификатов", IDC_EXPORT_TITLE, + 115,1,195,40 + LTEXT "Работа мастера экспорта сертификатов успешно завершена.", + -1, 115,33,195,24 + LTEXT "Были указаны следующие параметры:", + -1, 115,57,195,12 + CONTROL "Summary information", IDC_EXPORT_SETTINGS, "SysListView32", + LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, + 115,67,174,100 +END diff --git a/dll/win32/dbghelp/compat.c b/dll/win32/dbghelp/compat.c index c9a49ca7fb5..7a3a0534852 100644 --- a/dll/win32/dbghelp/compat.c +++ b/dll/win32/dbghelp/compat.c @@ -291,7 +291,7 @@ const char *wine_dbgstr_an( const char *str, int n ) static const char hex[16] = "0123456789abcdef"; char *dst, *res; size_t size; - char buffer[256]; + static char buffer[256]; if (!((ULONG_PTR)str >> 16)) { diff --git a/dll/win32/devmgr/lang/ru-RU.rc b/dll/win32/devmgr/lang/ru-RU.rc index d12746ed0bf..97bebb0519c 100644 --- a/dll/win32/devmgr/lang/ru-RU.rc +++ b/dll/win32/devmgr/lang/ru-RU.rc @@ -175,8 +175,8 @@ BEGIN EDITTEXT IDC_DIGITALSIGNER, 100, 81, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY PUSHBUTTON "&Сведения...", IDC_DRIVERDETAILS, 7, 106, 75, 15 LTEXT "Просмотр сведений о файлах драйверов.", -1, 91, 110, 154, 17, SS_NOPREFIX - PUSHBUTTON "&Update Driver...", IDC_UPDATEDRIVER, 7, 126, 75, 15 - LTEXT "Update the device driver.", -1, 91, 130, 154, 17, SS_NOPREFIX + PUSHBUTTON "&Обновить драйвер...", IDC_UPDATEDRIVER, 7, 126, 75, 15 + LTEXT "Обновить драйвер устройства.", -1, 91, 130, 154, 17, SS_NOPREFIX END IDD_DRIVERDETAILS DIALOGEX 0, 0, 224, 230 @@ -216,12 +216,12 @@ END IDD_DEVICERESOURCES DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Resources" +CAPTION "Ресурсы" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT "Resource settings:", -1, 7, 36, 204, 8 + LTEXT "Настройки ресурсов:", -1, 7, 36, 204, 8 CONTROL "", IDC_DRIVERRESOURCES, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 46, 209, 80 diff --git a/dll/win32/gdiplus/CMakeLists.txt b/dll/win32/gdiplus/CMakeLists.txt index 8a75a7507f2..d8f69adb96d 100644 --- a/dll/win32/gdiplus/CMakeLists.txt +++ b/dll/win32/gdiplus/CMakeLists.txt @@ -33,6 +33,11 @@ add_library(gdiplus SHARED set_module_type(gdiplus win32dll) target_link_libraries(gdiplus wine) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(gdiplus mingwex) +endif() + add_delay_importlibs(gdiplus windowscodecs) add_importlibs(gdiplus msvcrt shlwapi oleaut32 ole32 user32 gdi32 kernel32 ntdll) add_pch(gdiplus gdiplus_private.h SOURCE) diff --git a/dll/win32/getuname/lang/en-US.rc b/dll/win32/getuname/lang/en-US.rc index 2ff5b2c99b9..edc38dbf623 100644 --- a/dll/win32/getuname/lang/en-US.rc +++ b/dll/win32/getuname/lang/en-US.rc @@ -898,6 +898,7 @@ BEGIN 892 "Greek Small Dotted Lunate Sigma Symbol" 893 "Greek Small Reversed Dotted Lunate Sigma Symbol" 894 "Greek Question Mark" + 895 "Greek Capital Letter Yot" 900 "Greek Tonos" 901 "Greek Dialytika Tonos" 902 "Greek Capital Letter Alpha With Tonos" @@ -1315,6 +1316,14 @@ BEGIN 1317 "Cyrillic Small Letter Pe With Descender" 1318 "Cyrillic Capital Letter Shha With Descender" 1319 "Cyrillic Small Letter Shha With Descender" + 1320 "Cyrillic Capital Letter En With Left Hook" + 1321 "Cyrillic Small Letter En With Left Hook" + 1322 "Cyrillic Capital Letter Dzzhe" + 1323 "Cyrillic Small Letter Dzzhe" + 1324 "Cyrillic Capital Letter Dche" + 1325 "Cyrillic Small Letter Dche" + 1326 "Cyrillic Capital Letter El With Descender" + 1327 "Cyrillic Small Letter El With Descender" 1329 "Armenian Capital Letter Ayb" 1330 "Armenian Capital Letter Ben" 1331 "Armenian Capital Letter Gim" @@ -1401,6 +1410,8 @@ BEGIN 1415 "Armenian Small Ligature Ech Yiwn" 1417 "Armenian Full Stop" 1418 "Armenian Hyphen" + 1421 "Right-Facing Armenian Eternity Sign" + 1422 "Left-Facing Armenian Eternity Sign" 1423 "Armenian Dram Sign" 1425 "Hebrew Accent Etnahta" 1426 "Hebrew Accent Segol" @@ -1494,6 +1505,7 @@ BEGIN 1538 "Arabic Footnote Marker" 1539 "Arabic Sign Safha" 1540 "Arabic Sign Samvat" + 1541 "Arabic Number Mark Above" 1542 "Arabic-Indic Cube Root" 1543 "Arabic-Indic Fourth Root" 1544 "Arabic Ray" @@ -1516,6 +1528,7 @@ BEGIN 1561 "Arabic Small Damma" 1562 "Arabic Small Kasra" 1563 "Arabic Semicolon" + 1564 "Arabic Letter Mark" 1566 "Arabic Triple Dot Punctuation Mark" 1567 "Arabic Question Mark" 1568 "Arabic Letter Kashmiri Yeh" @@ -2067,6 +2080,7 @@ BEGIN 2139 "Mandaic Gemination Mark" 2142 "Mandaic Punctuation" 2208 "Arabic Letter Beh With Small V Below" + 2209 "Arabic Letter Beh With Hamza Above" 2210 "Arabic Letter Jeem With Two Dots Above" 2211 "Arabic Letter Tah With Two Dots Above" 2212 "Arabic Letter Feh With Dot Below And Three Dots Above" @@ -2078,6 +2092,12 @@ BEGIN 2218 "Arabic Letter Reh With Loop" 2219 "Arabic Letter Waw With Dot Within" 2220 "Arabic Letter Rohingya Yeh" + 2221 "Arabic Letter Low Alef" + 2222 "Arabic Letter Dal With Three Dots Below" + 2223 "Arabic Letter Sad With Three Dots Below" + 2224 "Arabic Letter Gaf With Inverted Stroke" + 2225 "Arabic Letter Straight Waw" + 2226 "Arabic Letter Zain With Inverted V Above" 2276 "Arabic Curly Fatha" 2277 "Arabic Curly Damma" 2278 "Arabic Curly Kasra" @@ -2105,6 +2125,7 @@ BEGIN 2300 "Arabic Double Right Arrowhead Above With Dot" 2301 "Arabic Right Arrowhead Above With Dot" 2302 "Arabic Damma With Dot" + 2303 "Arabic Mark Sideways Noon Ghunna" 2304 "Devanagari Sign Inverted Candrabindu" 2305 "Devanagari Sign Candrabindu" 2306 "Devanagari Sign Anusvara" @@ -2225,6 +2246,7 @@ BEGIN 2421 "Devanagari Letter Aw" 2422 "Devanagari Letter Ue" 2423 "Devanagari Letter Uue" + 2424 "Devanagari Letter Marwari Dda" 2425 "Devanagari Letter Zha" 2426 "Devanagari Letter Heavy Ya" 2427 "Devanagari Letter Gga" @@ -2232,6 +2254,7 @@ BEGIN 2429 "Devanagari Letter Glottal Stop" 2430 "Devanagari Letter Ddda" 2431 "Devanagari Letter Bba" + 2432 "Bengali Anji" 2433 "Bengali Sign Candrabindu" 2434 "Bengali Sign Anusvara" 2435 "Bengali Sign Visarga" @@ -2649,6 +2672,7 @@ BEGIN 3064 "Tamil As Above Sign" 3065 "Tamil Rupee Sign" 3066 "Tamil Number Sign" + 3072 "Telugu Sign Combining Candrabindu Above" 3073 "Telugu Sign Candrabindu" 3074 "Telugu Sign Anusvara" 3075 "Telugu Sign Visarga" @@ -2696,6 +2720,7 @@ BEGIN 3121 "Telugu Letter Rra" 3122 "Telugu Letter La" 3123 "Telugu Letter Lla" + 3124 "Telugu Letter Llla" 3125 "Telugu Letter Va" 3126 "Telugu Letter Sha" 3127 "Telugu Letter Ssa" @@ -2742,6 +2767,7 @@ BEGIN 3197 "Telugu Fraction Digit Two For Even Powers Of Four" 3198 "Telugu Fraction Digit Three For Even Powers Of Four" 3199 "Telugu Sign Tuumu" + 3201 "Kannada Sign Candrabindu" 3202 "Kannada Sign Anusvara" 3203 "Kannada Sign Visarga" 3205 "Kannada Letter A" @@ -2828,6 +2854,7 @@ BEGIN 3311 "Kannada Digit Nine" 3313 "Kannada Sign Jihvamuliya" 3314 "Kannada Sign Upadhmaniya" + 3329 "Malayalam Sign Candrabindu" 3330 "Malayalam Sign Anusvara" 3331 "Malayalam Sign Visarga" 3333 "Malayalam Letter A" @@ -3003,6 +3030,16 @@ BEGIN 3549 "Sinhala Vowel Sign Kombuva Haa Diga Aela-Pilla" 3550 "Sinhala Vowel Sign Kombuva Haa Gayanukitta" 3551 "Sinhala Vowel Sign Gayanukitta" + 3558 "Sinhala Lith Digit Zero" + 3559 "Sinhala Lith Digit One" + 3560 "Sinhala Lith Digit Two" + 3561 "Sinhala Lith Digit Three" + 3562 "Sinhala Lith Digit Four" + 3563 "Sinhala Lith Digit Five" + 3564 "Sinhala Lith Digit Six" + 3565 "Sinhala Lith Digit Seven" + 3566 "Sinhala Lith Digit Eight" + 3567 "Sinhala Lith Digit Nine" 3570 "Sinhala Vowel Sign Diga Gaetta-Pilla" 3571 "Sinhala Vowel Sign Diga Gayanukitta" 3572 "Sinhala Punctuation Kunddaliya" @@ -5094,6 +5131,14 @@ BEGIN 5870 "Runic Arlaug Symbol" 5871 "Runic Tvimadur Symbol" 5872 "Runic Belgthor Symbol" + 5873 "Runic Letter K" + 5874 "Runic Letter Sh" + 5875 "Runic Letter Oo" + 5876 "Runic Letter Franks Casket Os" + 5877 "Runic Letter Franks Casket Is" + 5878 "Runic Letter Franks Casket Eh" + 5879 "Runic Letter Franks Casket Ac" + 5880 "Runic Letter Franks Casket Aesc" 5888 "Tagalog Letter A" 5889 "Tagalog Letter I" 5890 "Tagalog Letter U" @@ -5544,6 +5589,8 @@ BEGIN 6426 "Limbu Letter Ssa" 6427 "Limbu Letter Sa" 6428 "Limbu Letter Ha" + 6429 "Limbu Letter Gyan" + 6430 "Limbu Letter Tra" 6432 "Limbu Vowel Sign A" 6433 "Limbu Vowel Sign I" 6434 "Limbu Vowel Sign U" @@ -5888,6 +5935,21 @@ BEGIN 6827 "Tai Tham Sign Satkaankuu" 6828 "Tai Tham Sign Hang" 6829 "Tai Tham Sign Caang" + 6832 "Combining Doubled Circumflex Accent" + 6833 "Combining Diaeresis-Ring" + 6834 "Combining Infinity" + 6835 "Combining Downwards Arrow" + 6836 "Combining Triple Dot" + 6837 "Combining X-X Below" + 6838 "Combining Wiggly Line Below" + 6839 "Combining Open Mark Below" + 6840 "Combining Double Open Mark Below" + 6841 "Combining Light Centralization Stroke Below" + 6842 "Combining Strong Centralization Stroke Below" + 6843 "Combining Parentheses Above" + 6844 "Combining Double Parentheses Above" + 6845 "Combining Parentheses Below" + 6846 "Combining Parentheses Overlay" 6912 "Balinese Sign Ulu Ricem" 6913 "Balinese Sign Ulu Candra" 6914 "Balinese Sign Cecek" @@ -6298,6 +6360,8 @@ BEGIN 7412 "Vedic Tone Candra Above" 7413 "Vedic Sign Jihvamuliya" 7414 "Vedic Sign Upadhmaniya" + 7416 "Vedic Tone Ring Above" + 7417 "Vedic Tone Double Ring Above" 7424 "Latin Letter Small Capital A" 7425 "Latin Letter Small Capital Ae" 7426 "Latin Small Letter Turned Ae" @@ -6529,6 +6593,21 @@ BEGIN 7652 "Combining Latin Small Letter S" 7653 "Combining Latin Small Letter Long S" 7654 "Combining Latin Small Letter Z" + 7655 "Combining Latin Small Letter Alpha" + 7656 "Combining Latin Small Letter B" + 7657 "Combining Latin Small Letter Beta" + 7658 "Combining Latin Small Letter Schwa" + 7659 "Combining Latin Small Letter F" + 7660 "Combining Latin Small Letter L With Double Middle Tilde" + 7661 "Combining Latin Small Letter O With Light Centralization Stroke" + 7662 "Combining Latin Small Letter P" + 7663 "Combining Latin Small Letter Esh" + 7664 "Combining Latin Small Letter U With Light Centralization Stroke" + 7665 "Combining Latin Small Letter W" + 7666 "Combining Latin Small Letter A With Diaeresis" + 7667 "Combining Latin Small Letter O With Diaeresis" + 7668 "Combining Latin Small Letter U With Diaeresis" + 7669 "Combining Up Tack Above" 7676 "Combining Double Inverted Breve Below" 7677 "Combining Almost Equal To Below" 7678 "Combining Left Arrowhead Above" @@ -7123,6 +7202,10 @@ BEGIN 8290 "Invisible Times" 8291 "Invisible Separator" 8292 "Invisible Plus" + 8294 "Left-To-Right Isolate" + 8295 "Right-To-Left Isolate" + 8296 "First Strong Isolate" + 8297 "Pop Directional Isolate" 8298 "Inhibit Symmetric Swapping" 8299 "Activate Symmetric Swapping" 8300 "Inhibit Arabic Form Shaping" @@ -7198,6 +7281,9 @@ BEGIN 8376 "Tenge Sign" 8377 "Indian Rupee Sign" 8378 "Turkish Lira Sign" + 8379 "Nordic Mark Sign" + 8380 "Manat Sign" + 8381 "Ruble Sign" 8400 "Combining Left Harpoon Above" 8401 "Combining Right Harpoon Above" 8402 "Combining Long Vertical Line Overlay" @@ -7981,6 +8067,13 @@ BEGIN 9201 "Stopwatch" 9202 "Timer Clock" 9203 "Hourglass With Flowing Sand" + 9204 "Black Medium Left-Pointing Triangle" + 9205 "Black Medium Right-Pointing Triangle" + 9206 "Black Medium Up-Pointing Triangle" + 9207 "Black Medium Down-Pointing Triangle" + 9208 "Double Vertical Bar" + 9209 "Black Square For Stop" + 9210 "Black Circle For Record" 9216 "Symbol For Null" 9217 "Symbol For Start Of Heading" 9218 "Symbol For Start Of Text" @@ -8703,6 +8796,7 @@ BEGIN 9981 "Fuel Pump" 9982 "Cup On Black Square" 9983 "White Flag With Horizontal Middle Black Stripe" + 9984 "Black Safety Scissors" 9985 "Upper Blade Scissors" 9986 "Black Scissors" 9987 "Lower Blade Scissors" @@ -9803,6 +9897,9 @@ BEGIN 11082 "Leftwards Arrow Above Almost Equal To" 11083 "Leftwards Arrow Above Reverse Tilde Operator" 11084 "Rightwards Arrow Above Reverse Tilde Operator" + 11085 "Downwards Triangle-Headed Zigzag Arrow" + 11086 "Short Slanted North Arrow" + 11087 "Short Backslanted South Arrow" 11088 "White Medium Star" 11089 "Black Small Star" 11090 "White Small Star" @@ -9813,6 +9910,118 @@ BEGIN 11095 "Heavy Circle With Circle Inside" 11096 "Heavy Circle" 11097 "Heavy Circled Saltire" + 11098 "Slanted North Arrow With Hooked Head" + 11099 "Backslanted South Arrow With Hooked Tail" + 11100 "Slanted North Arrow With Horizontal Tail" + 11101 "Backslanted South Arrow With Horizontal Tail" + 11102 "Bent Arrow Pointing Downwards Then North East" + 11103 "Short Bent Arrow Pointing Downwards Then North East" + 11104 "Leftwards Triangle-Headed Arrow" + 11105 "Upwards Triangle-Headed Arrow" + 11106 "Rightwards Triangle-Headed Arrow" + 11107 "Downwards Triangle-Headed Arrow" + 11108 "Left Right Triangle-Headed Arrow" + 11109 "Up Down Triangle-Headed Arrow" + 11110 "North West Triangle-Headed Arrow" + 11111 "North East Triangle-Headed Arrow" + 11112 "South East Triangle-Headed Arrow" + 11113 "South West Triangle-Headed Arrow" + 11114 "Leftwards Triangle-Headed Dashed Arrow" + 11115 "Upwards Triangle-Headed Dashed Arrow" + 11116 "Rightwards Triangle-Headed Dashed Arrow" + 11117 "Downwards Triangle-Headed Dashed Arrow" + 11118 "Clockwise Triangle-Headed Open Circle Arrow" + 11119 "Anticlockwise Triangle-Headed Open Circle Arrow" + 11120 "Leftwards Triangle-Headed Arrow To Bar" + 11121 "Upwards Triangle-Headed Arrow To Bar" + 11122 "Rightwards Triangle-Headed Arrow To Bar" + 11123 "Downwards Triangle-Headed Arrow To Bar" + 11126 "North West Triangle-Headed Arrow To Bar" + 11127 "North East Triangle-Headed Arrow To Bar" + 11128 "South East Triangle-Headed Arrow To Bar" + 11129 "South West Triangle-Headed Arrow To Bar" + 11130 "Leftwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11131 "Upwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11132 "Rightwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11133 "Downwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11134 "Horizontal Tab Key" + 11135 "Vertical Tab Key" + 11136 "Leftwards Triangle-Headed Arrow Over Rightwards Triangle-Headed Arrow" + 11137 "Upwards Triangle-Headed Arrow Leftwards Of Downwards Triangle-Headed Arrow" + 11138 "Rightwards Triangle-Headed Arrow Over Leftwards Triangle-Headed Arrow" + 11139 "Downwards Triangle-Headed Arrow Leftwards Of Upwards Triangle-Headed Arrow" + 11140 "Leftwards Triangle-Headed Paired Arrows" + 11141 "Upwards Triangle-Headed Paired Arrows" + 11142 "Rightwards Triangle-Headed Paired Arrows" + 11143 "Downwards Triangle-Headed Paired Arrows" + 11144 "Leftwards Black Circled White Arrow" + 11145 "Upwards Black Circled White Arrow" + 11146 "Rightwards Black Circled White Arrow" + 11147 "Downwards Black Circled White Arrow" + 11148 "Anticlockwise Triangle-Headed Right U-Shaped Arrow" + 11149 "Anticlockwise Triangle-Headed Bottom U-Shaped Arrow" + 11150 "Anticlockwise Triangle-Headed Left U-Shaped Arrow" + 11151 "Anticlockwise Triangle-Headed Top U-Shaped Arrow" + 11152 "Return Left" + 11153 "Return Right" + 11154 "Newline Left" + 11155 "Newline Right" + 11156 "Four Corner Arrows Circling Anticlockwise" + 11157 "Rightwards Black Arrow" + 11160 "Three-D Top-Lighted Leftwards Equilateral Arrowhead" + 11161 "Three-D Right-Lighted Upwards Equilateral Arrowhead" + 11162 "Three-D Top-Lighted Rightwards Equilateral Arrowhead" + 11163 "Three-D Left-Lighted Downwards Equilateral Arrowhead" + 11164 "Black Leftwards Equilateral Arrowhead" + 11165 "Black Upwards Equilateral Arrowhead" + 11166 "Black Rightwards Equilateral Arrowhead" + 11167 "Black Downwards Equilateral Arrowhead" + 11168 "Downwards Triangle-Headed Arrow With Long Tip Leftwards" + 11169 "Downwards Triangle-Headed Arrow With Long Tip Rightwards" + 11170 "Upwards Triangle-Headed Arrow With Long Tip Leftwards" + 11171 "Upwards Triangle-Headed Arrow With Long Tip Rightwards" + 11172 "Leftwards Triangle-Headed Arrow With Long Tip Upwards" + 11173 "Rightwards Triangle-Headed Arrow With Long Tip Upwards" + 11174 "Leftwards Triangle-Headed Arrow With Long Tip Downwards" + 11175 "Rightwards Triangle-Headed Arrow With Long Tip Downwards" + 11176 "Black Curved Downwards And Leftwards Arrow" + 11177 "Black Curved Downwards And Rightwards Arrow" + 11178 "Black Curved Upwards And Leftwards Arrow" + 11179 "Black Curved Upwards And Rightwards Arrow" + 11180 "Black Curved Leftwards And Upwards Arrow" + 11181 "Black Curved Rightwards And Upwards Arrow" + 11182 "Black Curved Leftwards And Downwards Arrow" + 11183 "Black Curved Rightwards And Downwards Arrow" + 11184 "Ribbon Arrow Down Left" + 11185 "Ribbon Arrow Down Right" + 11186 "Ribbon Arrow Up Left" + 11187 "Ribbon Arrow Up Right" + 11188 "Ribbon Arrow Left Up" + 11189 "Ribbon Arrow Right Up" + 11190 "Ribbon Arrow Left Down" + 11191 "Ribbon Arrow Right Down" + 11192 "Upwards White Arrow From Bar With Horizontal Bar" + 11193 "Up Arrowhead In A Rectangle Box" + 11197 "Ballot Box With Light X" + 11198 "Circled X" + 11199 "Circled Bold X" + 11200 "Black Square Centred" + 11201 "Black Diamond Centred" + 11202 "Turned Black Pentagon" + 11203 "Horizontal Black Octagon" + 11204 "Black Octagon" + 11205 "Black Medium Up-Pointing Triangle Centred" + 11206 "Black Medium Down-Pointing Triangle Centred" + 11207 "Black Medium Left-Pointing Triangle Centred" + 11208 "Black Medium Right-Pointing Triangle Centred" + 11210 "Top Half Black Circle" + 11211 "Bottom Half Black Circle" + 11212 "Light Four Pointed Black Cusp" + 11213 "Rotated Light Four Pointed Black Cusp" + 11214 "White Four Pointed Cusp" + 11215 "Rotated White Four Pointed Cusp" + 11216 "Square Position Indicator" + 11217 "Uncertainty Sign" 11264 "Glagolitic Capital Letter Azu" 11265 "Glagolitic Capital Letter Buky" 11266 "Glagolitic Capital Letter Vede" @@ -10332,6 +10541,13 @@ BEGIN 11833 "Top Half Section Sign" 11834 "Two-Em Dash" 11835 "Three-Em Dash" + 11836 "Stenographic Full Stop" + 11837 "Vertical Six Dots" + 11838 "Wiggly Vertical Line" + 11839 "Capitulum" + 11840 "Double Hyphen" + 11841 "Reversed Comma" + 11842 "Double Low-Reversed-9 Quotation Mark" 11904 "CJK Radical Repeat" 11905 "CJK Radical Cliff" 11906 "CJK Radical Second One" @@ -13390,6 +13606,12 @@ BEGIN 42645 "Cyrillic Small Letter Hwe" 42646 "Cyrillic Capital Letter Shwe" 42647 "Cyrillic Small Letter Shwe" + 42648 "Cyrillic Capital Letter Double O" + 42649 "Cyrillic Small Letter Double O" + 42650 "Cyrillic Capital Letter Crossed O" + 42651 "Cyrillic Small Letter Crossed O" + 42652 "Modifier Letter Cyrillic Hard Sign" + 42653 "Modifier Letter Cyrillic Soft Sign" 42655 "Combining Cyrillic Letter Iotified E" 42656 "Bamum Letter A" 42657 "Bamum Letter Ka" @@ -13626,6 +13848,18 @@ BEGIN 42897 "Latin Small Letter N With Descender" 42898 "Latin Capital Letter C With Bar" 42899 "Latin Small Letter C With Bar" + 42900 "Latin Small Letter C With Palatal Hook" + 42901 "Latin Small Letter H With Palatal Hook" + 42902 "Latin Capital Letter B With Flourish" + 42903 "Latin Small Letter B With Flourish" + 42904 "Latin Capital Letter F With Stroke" + 42905 "Latin Small Letter F With Stroke" + 42906 "Latin Capital Letter Volapuk Ae" + 42907 "Latin Small Letter Volapuk Ae" + 42908 "Latin Capital Letter Volapuk Oe" + 42909 "Latin Small Letter Volapuk Oe" + 42910 "Latin Capital Letter Volapuk Ue" + 42911 "Latin Small Letter Volapuk Ue" 42912 "Latin Capital Letter G With Oblique Stroke" 42913 "Latin Small Letter G With Oblique Stroke" 42914 "Latin Capital Letter K With Oblique Stroke" @@ -13637,6 +13871,12 @@ BEGIN 42920 "Latin Capital Letter S With Oblique Stroke" 42921 "Latin Small Letter S With Oblique Stroke" 42922 "Latin Capital Letter H With Hook" + 42923 "Latin Capital Letter Reversed Open E" + 42924 "Latin Capital Letter Script G" + 42925 "Latin Capital Letter L With Belt" + 42928 "Latin Capital Letter Turned K" + 42929 "Latin Capital Letter Turned T" + 42999 "Latin Epigraphic Letter Sideways I" 43000 "Modifier Letter Capital H With Stroke" 43001 "Modifier Letter Small Ligature Oe" 43002 "Latin Letter Small Capital Turned M" @@ -14069,6 +14309,37 @@ BEGIN 43481 "Javanese Digit Nine" 43486 "Javanese Pada Tirta Tumetes" 43487 "Javanese Pada Isen-Isen" + 43488 "Myanmar Letter Shan Gha" + 43489 "Myanmar Letter Shan Cha" + 43490 "Myanmar Letter Shan Jha" + 43491 "Myanmar Letter Shan Nna" + 43492 "Myanmar Letter Shan Bha" + 43493 "Myanmar Sign Shan Saw" + 43494 "Myanmar Modifier Letter Shan Reduplication" + 43495 "Myanmar Letter Tai Laing Nya" + 43496 "Myanmar Letter Tai Laing Fa" + 43497 "Myanmar Letter Tai Laing Ga" + 43498 "Myanmar Letter Tai Laing Gha" + 43499 "Myanmar Letter Tai Laing Ja" + 43500 "Myanmar Letter Tai Laing Jha" + 43501 "Myanmar Letter Tai Laing Dda" + 43502 "Myanmar Letter Tai Laing Ddha" + 43503 "Myanmar Letter Tai Laing Nna" + 43504 "Myanmar Tai Laing Digit Zero" + 43505 "Myanmar Tai Laing Digit One" + 43506 "Myanmar Tai Laing Digit Two" + 43507 "Myanmar Tai Laing Digit Three" + 43508 "Myanmar Tai Laing Digit Four" + 43509 "Myanmar Tai Laing Digit Five" + 43510 "Myanmar Tai Laing Digit Six" + 43511 "Myanmar Tai Laing Digit Seven" + 43512 "Myanmar Tai Laing Digit Eight" + 43513 "Myanmar Tai Laing Digit Nine" + 43514 "Myanmar Letter Tai Laing Lla" + 43515 "Myanmar Letter Tai Laing Da" + 43516 "Myanmar Letter Tai Laing Dha" + 43517 "Myanmar Letter Tai Laing Ba" + 43518 "Myanmar Letter Tai Laing Bha" 43520 "Cham Letter A" 43521 "Cham Letter I" 43522 "Cham Letter U" @@ -14180,6 +14451,10 @@ BEGIN 43641 "Myanmar Symbol Aiton Two" 43642 "Myanmar Letter Aiton Ra" 43643 "Myanmar Sign Pao Karen Tone" + 43644 "Myanmar Sign Tai Laing Tone-2" + 43645 "Myanmar Sign Tai Laing Tone-5" + 43646 "Myanmar Letter Shwe Palaung Cha" + 43647 "Myanmar Letter Shwe Palaung Sha" 43648 "Tai Viet Letter Low Ko" 43649 "Tai Viet Letter High Ko" 43650 "Tai Viet Letter Low Kho" @@ -14307,6 +14582,56 @@ BEGIN 43820 "Ethiopic Syllable Bbee" 43821 "Ethiopic Syllable Bbe" 43822 "Ethiopic Syllable Bbo" + 43824 "Latin Small Letter Barred Alpha" + 43825 "Latin Small Letter A Reversed-Schwa" + 43826 "Latin Small Letter Blackletter E" + 43827 "Latin Small Letter Barred E" + 43828 "Latin Small Letter E With Flourish" + 43829 "Latin Small Letter Lenis F" + 43830 "Latin Small Letter Script G With Crossed-Tail" + 43831 "Latin Small Letter L With Inverted Lazy S" + 43832 "Latin Small Letter L With Double Middle Tilde" + 43833 "Latin Small Letter L With Middle Ring" + 43834 "Latin Small Letter M With Crossed-Tail" + 43835 "Latin Small Letter N With Crossed-Tail" + 43836 "Latin Small Letter Eng With Crossed-Tail" + 43837 "Latin Small Letter Blackletter O" + 43838 "Latin Small Letter Blackletter O With Stroke" + 43839 "Latin Small Letter Open O With Stroke" + 43840 "Latin Small Letter Inverted Oe" + 43841 "Latin Small Letter Turned Oe With Stroke" + 43842 "Latin Small Letter Turned Oe With Horizontal Stroke" + 43843 "Latin Small Letter Turned O Open-O" + 43844 "Latin Small Letter Turned O Open-O With Stroke" + 43845 "Latin Small Letter Stirrup R" + 43846 "Latin Letter Small Capital R With Right Leg" + 43847 "Latin Small Letter R Without Handle" + 43848 "Latin Small Letter Double R" + 43849 "Latin Small Letter R With Crossed-Tail" + 43850 "Latin Small Letter Double R With Crossed-Tail" + 43851 "Latin Small Letter Script R" + 43852 "Latin Small Letter Script R With Ring" + 43853 "Latin Small Letter Baseline Esh" + 43854 "Latin Small Letter U With Short Right Leg" + 43855 "Latin Small Letter U Bar With Short Right Leg" + 43856 "Latin Small Letter Ui" + 43857 "Latin Small Letter Turned Ui" + 43858 "Latin Small Letter U With Left Hook" + 43859 "Latin Small Letter Chi" + 43860 "Latin Small Letter Chi With Low Right Ring" + 43861 "Latin Small Letter Chi With Low Left Serif" + 43862 "Latin Small Letter X With Low Right Ring" + 43863 "Latin Small Letter X With Long Left Leg" + 43864 "Latin Small Letter X With Long Left Leg And Low Right Ring" + 43865 "Latin Small Letter X With Long Left Leg With Serif" + 43866 "Latin Small Letter Y With Short Right Leg" + 43867 "Modifier Breve With Inverted Breve" + 43868 "Modifier Letter Small Heng" + 43869 "Modifier Letter Small L With Inverted Lazy S" + 43870 "Modifier Letter Small L With Middle Tilde" + 43871 "Modifier Letter Small U With Left Hook" + 43876 "Latin Small Letter Inverted Alpha" + 43877 "Greek Letter Small Capital Omega" 43968 "Meetei Mayek Letter Kok" 43969 "Meetei Mayek Letter Sam" 43970 "Meetei Mayek Letter Lai" @@ -15619,6 +15944,13 @@ BEGIN 65060 "Combining Macron Left Half" 65061 "Combining Macron Right Half" 65062 "Combining Conjoining Macron" + 65063 "Combining Ligature Left Half Below" + 65064 "Combining Ligature Right Half Below" + 65065 "Combining Tilde Left Half Below" + 65066 "Combining Tilde Right Half Below" + 65067 "Combining Macron Left Half Below" + 65068 "Combining Macron Right Half Below" + 65069 "Combining Conjoining Macron Below" 65072 "Presentation Form For Vertical Two Dot Leader" 65073 "Presentation Form For Vertical Em Dash" 65074 "Presentation Form For Vertical En Dash" diff --git a/dll/win32/getuname/lang/ro-RO.rc b/dll/win32/getuname/lang/ro-RO.rc index 50739745a86..08ac566d9c2 100644 --- a/dll/win32/getuname/lang/ro-RO.rc +++ b/dll/win32/getuname/lang/ro-RO.rc @@ -6,9 +6,11 @@ * TRANSLATOR: Ștefan Fulea (stefan dot fulea at mail dot md) * 2014-01-12: partial translation */ + LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL STRINGTABLE BEGIN + /* Autogenerated from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */ 0 "Nul" 1 "Început de antet - SCH" 2 "Început de text - STX" @@ -898,6 +900,7 @@ BEGIN 892 "Simbolul grecesc sigma luniform punctat" 893 "Simbolul grecesc sigma luniform punctat întors" 894 "Semn de întrebare grecesc" + 895 "Greek Capital Letter Yot" 900 "Accent acut grecesc" 901 "Tremă grecească cu accent acut" 902 "Litera grecească majusculă alfa cu accent acut" @@ -1315,6 +1318,14 @@ BEGIN 1317 "Litera chirilică pă cu descendență" 1318 "Litera chirilică majusculă șha cu descendență" 1319 "Litera chirilică șha cu descendență" + 1320 "Cyrillic Capital Letter En With Left Hook" + 1321 "Cyrillic Small Letter En With Left Hook" + 1322 "Cyrillic Capital Letter Dzzhe" + 1323 "Cyrillic Small Letter Dzzhe" + 1324 "Cyrillic Capital Letter Dche" + 1325 "Cyrillic Small Letter Dche" + 1326 "Cyrillic Capital Letter El With Descender" + 1327 "Cyrillic Small Letter El With Descender" 1329 "Litera armenească majusculă ayb" 1330 "Litera armenească majusculă ben" 1331 "Litera armenească majusculă gim" @@ -1401,6 +1412,8 @@ BEGIN 1415 "Ligatură armenească eci yiwn" 1417 "Punct armenesc" 1418 "Cratimă armenească" + 1421 "Right-Facing Armenian Eternity Sign" + 1422 "Left-Facing Armenian Eternity Sign" 1423 "Semnul armenesc dram" 1425 "Accentul ebraic etnahta" 1426 "Accentul ebraic segol" @@ -1494,6 +1507,7 @@ BEGIN 1538 "Semnul arab de adnotare" 1539 "Semnul arab safha" 1540 "Semnul arab samvat" + 1541 "Arabic Number Mark Above" 1542 "Rădăcina de ordin trei arab-indiană" 1543 "Rădăcina de ordin patru arab-indiană" 1544 "Ray arab" @@ -1516,6 +1530,7 @@ BEGIN 1561 "Damma arabă" 1562 "Kasra arabă" 1563 "Semnul de punctuație două puncte arab" + 1564 "Arabic Letter Mark" 1566 "Semnul de punctuație trei puncte arab" 1567 "Semnul de întrebare arab" 1568 "Litera arabă kashmiri yeh" @@ -2067,6 +2082,7 @@ BEGIN 2139 "Însemn de împerechere mandaic" 2142 "Punctuație mandaică" 2208 "Litera arabă beh cu v dedesubt" + 2209 "Arabic Letter Beh With Hamza Above" 2210 "Litera arabă jeem cu fouă puncte deasupra" 2211 "Litera arabă tah cu două puncte deasupra" 2212 "Litera arabă feh cu punct dedesubt și trei puncte deasupra" @@ -2078,6 +2094,12 @@ BEGIN 2218 "Litera arabă reh cu buclă" 2219 "Litera arabă waw cu punct dedesubt" 2220 "Litera arabă rohingya yeh" + 2221 "Arabic Letter Low Alef" + 2222 "Arabic Letter Dal With Three Dots Below" + 2223 "Arabic Letter Sad With Three Dots Below" + 2224 "Arabic Letter Gaf With Inverted Stroke" + 2225 "Arabic Letter Straight Waw" + 2226 "Arabic Letter Zain With Inverted V Above" 2276 "Fatha arab cu încrețitură" 2277 "Damma arab cu încrețitură" 2278 "Kasra arab cu încrețitură" @@ -2105,6 +2127,7 @@ BEGIN 2300 "Semnul arab dublu-vârf de săgeată spre dreapta deasupra cu punct" 2301 "Semnul arab vârf de săgeată spre dreapta deasupra cu punct" 2302 "Damma arab cu punct" + 2303 "Arabic Mark Sideways Noon Ghunna" 2304 "Semnul devanagari candrabindu inversat" 2305 "Semnul devanagari candrabindu" 2306 "Semnul devanagari anusvara" @@ -2225,6 +2248,7 @@ BEGIN 2421 "Litera devanagari aw" 2422 "Litera devanagari ue" 2423 "Litera devanagari uue" + 2424 "Devanagari Letter Marwari Dda" 2425 "Litera devanagari zha" 2426 "Litera devanagari ya greu" 2427 "Litera devanagari gga" @@ -2232,6 +2256,7 @@ BEGIN 2429 "Litera devanagari stop glotal" 2430 "Litera devanagari ddda" 2431 "Litera devanagari bba" + 2432 "Bengali Anji" 2433 "Semnul bengalez candrabindu" 2434 "Semnul bengalez anusvara" 2435 "Semnul bengalez visarga" @@ -2649,6 +2674,7 @@ BEGIN 3064 "Semnul tamil ca deasupra" 3065 "Semnul tamil rupee" 3066 "Semnul tamil număr" + 3072 "Telugu Sign Combining Candrabindu Above" 3073 "Semnul telugu candrabindu" 3074 "Semnul telugu anusvara" 3075 "Semnul telugu visarga" @@ -2696,6 +2722,7 @@ BEGIN 3121 "Litera telugu rra" 3122 "Litera telugu la" 3123 "Litera telugu lla" + 3124 "Telugu Letter Llla" 3125 "Litera telugu va" 3126 "Litera telugu sha" 3127 "Litera telugu ssa" @@ -2742,6 +2769,7 @@ BEGIN 3197 "Cifra telugu fracționară doi pentru puteri pare a lui patru" 3198 "Cifra telugu fracționară trei pentru puteri pare a lui patru" 3199 "Semnul telugu tuumu" + 3201 "Kannada Sign Candrabindu" 3202 "Semnul kannada anusvara" 3203 "Semnul kannada visarga" 3205 "Litera kannada a" @@ -2828,6 +2856,7 @@ BEGIN 3311 "Cifra kannada nouă" 3313 "Semnul kannada jihvamuliya" 3314 "Semnul kannada upadhmaniya" + 3329 "Malayalam Sign Candrabindu" 3330 "Semnul malayalam anusvara" 3331 "Semnul malayalam visarga" 3333 "Litera malayalam a" @@ -3003,6 +3032,16 @@ BEGIN 3549 "Semnul singalez vocală kombuva haa diga aela-pilla" 3550 "Semnul singalez vocală kombuva haa gayanukitta" 3551 "Semnul singalez vocală gayanukitta" + 3558 "Sinhala Lith Digit Zero" + 3559 "Sinhala Lith Digit One" + 3560 "Sinhala Lith Digit Two" + 3561 "Sinhala Lith Digit Three" + 3562 "Sinhala Lith Digit Four" + 3563 "Sinhala Lith Digit Five" + 3564 "Sinhala Lith Digit Six" + 3565 "Sinhala Lith Digit Seven" + 3566 "Sinhala Lith Digit Eight" + 3567 "Sinhala Lith Digit Nine" 3570 "Semnul singalez vocală diga gaetta-pilla" 3571 "Semnul singalez vocală diga gayanukitta" 3572 "Punctuația singaleză kunddaliya" @@ -5094,6 +5133,14 @@ BEGIN 5870 "Simbolul runic arlaug" 5871 "Simbolul runic tvimadur" 5872 "Simbolul runic belgthor" + 5873 "Runic Letter K" + 5874 "Runic Letter Sh" + 5875 "Runic Letter Oo" + 5876 "Runic Letter Franks Casket Os" + 5877 "Runic Letter Franks Casket Is" + 5878 "Runic Letter Franks Casket Eh" + 5879 "Runic Letter Franks Casket Ac" + 5880 "Runic Letter Franks Casket Aesc" 5888 "Litera tagalog a" 5889 "Litera tagalog i" 5890 "Litera tagalog u" @@ -5544,6 +5591,8 @@ BEGIN 6426 "Litera limbu ssa" 6427 "Litera limbu sa" 6428 "Litera limbu ha" + 6429 "Limbu Letter Gyan" + 6430 "Limbu Letter Tra" 6432 "Semnul limbu vocală a" 6433 "Semnul limbu vocală i" 6434 "Semnul limbu vocală u" @@ -5888,6 +5937,21 @@ BEGIN 6827 "Semnul tai tham satkaankuu" 6828 "Semnul tai tham hang" 6829 "Semnul tai tham caang" + 6832 "Combining Doubled Circumflex Accent" + 6833 "Combining Diaeresis-Ring" + 6834 "Combining Infinity" + 6835 "Combining Downwards Arrow" + 6836 "Combining Triple Dot" + 6837 "Combining X-X Below" + 6838 "Combining Wiggly Line Below" + 6839 "Combining Open Mark Below" + 6840 "Combining Double Open Mark Below" + 6841 "Combining Light Centralization Stroke Below" + 6842 "Combining Strong Centralization Stroke Below" + 6843 "Combining Parentheses Above" + 6844 "Combining Double Parentheses Above" + 6845 "Combining Parentheses Below" + 6846 "Combining Parentheses Overlay" 6912 "Semnul balinez ulu ricem" 6913 "Semnul balinez ulu candra" 6914 "Semnul balinez cecek" @@ -6298,6 +6362,8 @@ BEGIN 7412 "Intonația vedică candra deasupra" 7413 "Semnul vedic jihvamuliya" 7414 "Semnul vedic upadhmaniya" + 7416 "Vedic Tone Ring Above" + 7417 "Vedic Tone Double Ring Above" 7424 "Litera latină a majusculă miniatură" 7425 "Litera latină ae majusculă miniatură" 7426 "Litera latină ae răsturnat" @@ -6529,6 +6595,21 @@ BEGIN 7652 "Îmbinativ literă latină s" 7653 "Îmbinativ literă latină s alungit" 7654 "Îmbinativ literă latină z" + 7655 "Combining Latin Small Letter Alpha" + 7656 "Combining Latin Small Letter B" + 7657 "Combining Latin Small Letter Beta" + 7658 "Combining Latin Small Letter Schwa" + 7659 "Combining Latin Small Letter F" + 7660 "Combining Latin Small Letter L With Double Middle Tilde" + 7661 "Combining Latin Small Letter O With Light Centralization Stroke" + 7662 "Combining Latin Small Letter P" + 7663 "Combining Latin Small Letter Esh" + 7664 "Combining Latin Small Letter U With Light Centralization Stroke" + 7665 "Combining Latin Small Letter W" + 7666 "Combining Latin Small Letter A With Diaeresis" + 7667 "Combining Latin Small Letter O With Diaeresis" + 7668 "Combining Latin Small Letter U With Diaeresis" + 7669 "Combining Up Tack Above" 7676 "Îmbinativ breve alungit inversat dedesubt" 7677 "Îmbinativ semn-aproximativ dedesubt" 7678 "Îmbinativ vârf de săgeată spre stânga deasupra" @@ -7123,6 +7204,10 @@ BEGIN 8290 "Multiplu invizibil" 8291 "Separator invizibil" 8292 "Plus invizibil" + 8294 "Left-To-Right Isolate" + 8295 "Right-To-Left Isolate" + 8296 "First Strong Isolate" + 8297 "Pop Directional Isolate" 8298 "Inhibare de interschimb simetric" 8299 "Activare de interschimb simetric" 8300 "Inhibare pentru modelare forme arabe" @@ -7198,6 +7283,9 @@ BEGIN 8376 "Semnul valutar tenge kazah" 8377 "Semnul valutar rupee indian" 8378 "Semnul valutar liră turcească" + 8379 "Nordic Mark Sign" + 8380 "Manat Sign" + 8381 "Ruble Sign" 8400 "Îmbinativ harpon spre stânga deasupra" 8401 "Îmbinativ harpon spre dreapta deasupra" 8402 "Îmbinativ linie verticală lungă acoperitoare" @@ -7791,6 +7879,75 @@ BEGIN 9011 "Pantă" 9012 "Degajare" 9013 "Locaș axial" + 9014 "Apl Functional Symbol I-Beam" + 9015 "Apl Functional Symbol Squish Quad" + 9016 "Apl Functional Symbol Quad Equal" + 9017 "Apl Functional Symbol Quad Divide" + 9018 "Apl Functional Symbol Quad Diamond" + 9019 "Apl Functional Symbol Quad Jot" + 9020 "Apl Functional Symbol Quad Circle" + 9021 "Apl Functional Symbol Circle Stile" + 9022 "Apl Functional Symbol Circle Jot" + 9023 "Apl Functional Symbol Slash Bar" + 9024 "Apl Functional Symbol Backslash Bar" + 9025 "Apl Functional Symbol Quad Slash" + 9026 "Apl Functional Symbol Quad Backslash" + 9027 "Apl Functional Symbol Quad Less-Than" + 9028 "Apl Functional Symbol Quad Greater-Than" + 9029 "Apl Functional Symbol Leftwards Vane" + 9030 "Apl Functional Symbol Rightwards Vane" + 9031 "Apl Functional Symbol Quad Leftwards Arrow" + 9032 "Apl Functional Symbol Quad Rightwards Arrow" + 9033 "Apl Functional Symbol Circle Backslash" + 9034 "Apl Functional Symbol Down Tack Underbar" + 9035 "Apl Functional Symbol Delta Stile" + 9036 "Apl Functional Symbol Quad Down Caret" + 9037 "Apl Functional Symbol Quad Delta" + 9038 "Apl Functional Symbol Down Tack Jot" + 9039 "Apl Functional Symbol Upwards Vane" + 9040 "Apl Functional Symbol Quad Upwards Arrow" + 9041 "Apl Functional Symbol Up Tack Overbar" + 9042 "Apl Functional Symbol Del Stile" + 9043 "Apl Functional Symbol Quad Up Caret" + 9044 "Apl Functional Symbol Quad Del" + 9045 "Apl Functional Symbol Up Tack Jot" + 9046 "Apl Functional Symbol Downwards Vane" + 9047 "Apl Functional Symbol Quad Downwards Arrow" + 9048 "Apl Functional Symbol Quote Underbar" + 9049 "Apl Functional Symbol Delta Underbar" + 9050 "Apl Functional Symbol Diamond Underbar" + 9051 "Apl Functional Symbol Jot Underbar" + 9052 "Apl Functional Symbol Circle Underbar" + 9053 "Apl Functional Symbol Up Shoe Jot" + 9054 "Apl Functional Symbol Quote Quad" + 9055 "Apl Functional Symbol Circle Star" + 9056 "Apl Functional Symbol Quad Colon" + 9057 "Apl Functional Symbol Up Tack Diaeresis" + 9058 "Apl Functional Symbol Del Diaeresis" + 9059 "Apl Functional Symbol Star Diaeresis" + 9060 "Apl Functional Symbol Jot Diaeresis" + 9061 "Apl Functional Symbol Circle Diaeresis" + 9062 "Apl Functional Symbol Down Shoe Stile" + 9063 "Apl Functional Symbol Left Shoe Stile" + 9064 "Apl Functional Symbol Tilde Diaeresis" + 9065 "Apl Functional Symbol Greater-Than Diaeresis" + 9066 "Apl Functional Symbol Comma Bar" + 9067 "Apl Functional Symbol Del Tilde" + 9068 "Apl Functional Symbol Zilde" + 9069 "Apl Functional Symbol Stile Tilde" + 9070 "Apl Functional Symbol Semicolon Underbar" + 9071 "Apl Functional Symbol Quad Not Equal" + 9072 "Apl Functional Symbol Quad Question" + 9073 "Apl Functional Symbol Down Caret Tilde" + 9074 "Apl Functional Symbol Up Caret Tilde" + 9075 "Apl Functional Symbol Iota" + 9076 "Apl Functional Symbol Rho" + 9077 "Apl Functional Symbol Omega" + 9078 "Apl Functional Symbol Alpha Underbar" + 9079 "Apl Functional Symbol Epsilon Underbar" + 9080 "Apl Functional Symbol Iota Underbar" + 9081 "Apl Functional Symbol Omega Underbar" + 9082 "Apl Functional Symbol Alpha" 9083 "Însemn neverificat" 9084 "Unghi drept cu săgeată zigzag descendentă" 9085 "Cutie deschisă cu umeri" @@ -7812,4 +7969,8416 @@ BEGIN 9101 "Simbol monostabil" 9102 "Simbol histerezis" 9103 "Însemn de ieșire impendanță înaltă pe circuit deschis" + 9104 "Open-Circuit-Output L-Type Symbol" + 9105 "Passive-Pull-Down-Output Symbol" + 9106 "Passive-Pull-Up-Output Symbol" + 9107 "Direct Current Symbol Form Two" + 9108 "Software-Function Symbol" + 9109 "Apl Functional Symbol Quad" + 9110 "Decimal Separator Key Symbol" + 9111 "Previous Page" + 9112 "Next Page" + 9113 "Print Screen Symbol" + 9114 "Clear Screen Symbol" + 9115 "Left Parenthesis Upper Hook" + 9116 "Left Parenthesis Extension" + 9117 "Left Parenthesis Lower Hook" + 9118 "Right Parenthesis Upper Hook" + 9119 "Right Parenthesis Extension" + 9120 "Right Parenthesis Lower Hook" + 9121 "Left Square Bracket Upper Corner" + 9122 "Left Square Bracket Extension" + 9123 "Left Square Bracket Lower Corner" + 9124 "Right Square Bracket Upper Corner" + 9125 "Right Square Bracket Extension" + 9126 "Right Square Bracket Lower Corner" + 9127 "Left Curly Bracket Upper Hook" + 9128 "Left Curly Bracket Middle Piece" + 9129 "Left Curly Bracket Lower Hook" + 9130 "Curly Bracket Extension" + 9131 "Right Curly Bracket Upper Hook" + 9132 "Right Curly Bracket Middle Piece" + 9133 "Right Curly Bracket Lower Hook" + 9134 "Integral Extension" + 9135 "Horizontal Line Extension" + 9136 "Upper Left Or Lower Right Curly Bracket Section" + 9137 "Upper Right Or Lower Left Curly Bracket Section" + 9138 "Summation Top" + 9139 "Summation Bottom" + 9140 "Top Square Bracket" + 9141 "Bottom Square Bracket" + 9142 "Bottom Square Bracket Over Top Square Bracket" + 9143 "Radical Symbol Bottom" + 9144 "Left Vertical Box Line" + 9145 "Right Vertical Box Line" + 9146 "Horizontal Scan Line-1" + 9147 "Horizontal Scan Line-3" + 9148 "Horizontal Scan Line-7" + 9149 "Horizontal Scan Line-9" + 9150 "Dentistry Symbol Light Vertical And Top Right" + 9151 "Dentistry Symbol Light Vertical And Bottom Right" + 9152 "Dentistry Symbol Light Vertical With Circle" + 9153 "Dentistry Symbol Light Down And Horizontal With Circle" + 9154 "Dentistry Symbol Light Up And Horizontal With Circle" + 9155 "Dentistry Symbol Light Vertical With Triangle" + 9156 "Dentistry Symbol Light Down And Horizontal With Triangle" + 9157 "Dentistry Symbol Light Up And Horizontal With Triangle" + 9158 "Dentistry Symbol Light Vertical And Wave" + 9159 "Dentistry Symbol Light Down And Horizontal With Wave" + 9160 "Dentistry Symbol Light Up And Horizontal With Wave" + 9161 "Dentistry Symbol Light Down And Horizontal" + 9162 "Dentistry Symbol Light Up And Horizontal" + 9163 "Dentistry Symbol Light Vertical And Top Left" + 9164 "Dentistry Symbol Light Vertical And Bottom Left" + 9165 "Square Foot" + 9166 "Return Symbol" + 9167 "Eject Symbol" + 9168 "Vertical Line Extension" + 9169 "Metrical Breve" + 9170 "Metrical Long Over Short" + 9171 "Metrical Short Over Long" + 9172 "Metrical Long Over Two Shorts" + 9173 "Metrical Two Shorts Over Long" + 9174 "Metrical Two Shorts Joined" + 9175 "Metrical Triseme" + 9176 "Metrical Tetraseme" + 9177 "Metrical Pentaseme" + 9178 "Earth Ground" + 9179 "Fuse" + 9180 "Top Parenthesis" + 9181 "Bottom Parenthesis" + 9182 "Top Curly Bracket" + 9183 "Bottom Curly Bracket" + 9184 "Top Tortoise Shell Bracket" + 9185 "Bottom Tortoise Shell Bracket" + 9186 "White Trapezium" + 9187 "Benzene Ring With Circle" + 9188 "Straightness" + 9189 "Flatness" + 9190 "Ac Current" + 9191 "Electrical Intersection" + 9192 "Decimal Exponent Symbol" + 9193 "Black Right-Pointing Double Triangle" + 9194 "Black Left-Pointing Double Triangle" + 9195 "Black Up-Pointing Double Triangle" + 9196 "Black Down-Pointing Double Triangle" + 9197 "Black Right-Pointing Double Triangle With Vertical Bar" + 9198 "Black Left-Pointing Double Triangle With Vertical Bar" + 9199 "Black Right-Pointing Triangle With Double Vertical Bar" + 9200 "Alarm Clock" + 9201 "Stopwatch" + 9202 "Timer Clock" + 9203 "Hourglass With Flowing Sand" + 9204 "Black Medium Left-Pointing Triangle" + 9205 "Black Medium Right-Pointing Triangle" + 9206 "Black Medium Up-Pointing Triangle" + 9207 "Black Medium Down-Pointing Triangle" + 9208 "Double Vertical Bar" + 9209 "Black Square For Stop" + 9210 "Black Circle For Record" + 9216 "Symbol For Null" + 9217 "Symbol For Start Of Heading" + 9218 "Symbol For Start Of Text" + 9219 "Symbol For End Of Text" + 9220 "Symbol For End Of Transmission" + 9221 "Symbol For Enquiry" + 9222 "Symbol For Acknowledge" + 9223 "Symbol For Bell" + 9224 "Symbol For Backspace" + 9225 "Symbol For Horizontal Tabulation" + 9226 "Symbol For Line Feed" + 9227 "Symbol For Vertical Tabulation" + 9228 "Symbol For Form Feed" + 9229 "Symbol For Carriage Return" + 9230 "Symbol For Shift Out" + 9231 "Symbol For Shift In" + 9232 "Symbol For Data Link Escape" + 9233 "Symbol For Device Control One" + 9234 "Symbol For Device Control Two" + 9235 "Symbol For Device Control Three" + 9236 "Symbol For Device Control Four" + 9237 "Symbol For Negative Acknowledge" + 9238 "Symbol For Synchronous Idle" + 9239 "Symbol For End Of Transmission Block" + 9240 "Symbol For Cancel" + 9241 "Symbol For End Of Medium" + 9242 "Symbol For Substitute" + 9243 "Symbol For Escape" + 9244 "Symbol For File Separator" + 9245 "Symbol For Group Separator" + 9246 "Symbol For Record Separator" + 9247 "Symbol For Unit Separator" + 9248 "Symbol For Space" + 9249 "Symbol For Delete" + 9250 "Blank Symbol" + 9251 "Open Box" + 9252 "Symbol For Newline" + 9253 "Symbol For Delete Form Two" + 9254 "Symbol For Substitute Form Two" + 9280 "Ocr Hook" + 9281 "Ocr Chair" + 9282 "Ocr Fork" + 9283 "Ocr Inverted Fork" + 9284 "Ocr Belt Buckle" + 9285 "Ocr Bow Tie" + 9286 "Ocr Branch Bank Identification" + 9287 "Ocr Amount Of Check" + 9288 "Ocr Dash" + 9289 "Ocr Customer Account Number" + 9290 "Ocr Double Backslash" + 9312 "Circled Digit One" + 9313 "Circled Digit Two" + 9314 "Circled Digit Three" + 9315 "Circled Digit Four" + 9316 "Circled Digit Five" + 9317 "Circled Digit Six" + 9318 "Circled Digit Seven" + 9319 "Circled Digit Eight" + 9320 "Circled Digit Nine" + 9321 "Circled Number Ten" + 9322 "Circled Number Eleven" + 9323 "Circled Number Twelve" + 9324 "Circled Number Thirteen" + 9325 "Circled Number Fourteen" + 9326 "Circled Number Fifteen" + 9327 "Circled Number Sixteen" + 9328 "Circled Number Seventeen" + 9329 "Circled Number Eighteen" + 9330 "Circled Number Nineteen" + 9331 "Circled Number Twenty" + 9332 "Parenthesized Digit One" + 9333 "Parenthesized Digit Two" + 9334 "Parenthesized Digit Three" + 9335 "Parenthesized Digit Four" + 9336 "Parenthesized Digit Five" + 9337 "Parenthesized Digit Six" + 9338 "Parenthesized Digit Seven" + 9339 "Parenthesized Digit Eight" + 9340 "Parenthesized Digit Nine" + 9341 "Parenthesized Number Ten" + 9342 "Parenthesized Number Eleven" + 9343 "Parenthesized Number Twelve" + 9344 "Parenthesized Number Thirteen" + 9345 "Parenthesized Number Fourteen" + 9346 "Parenthesized Number Fifteen" + 9347 "Parenthesized Number Sixteen" + 9348 "Parenthesized Number Seventeen" + 9349 "Parenthesized Number Eighteen" + 9350 "Parenthesized Number Nineteen" + 9351 "Parenthesized Number Twenty" + 9352 "Digit One Full Stop" + 9353 "Digit Two Full Stop" + 9354 "Digit Three Full Stop" + 9355 "Digit Four Full Stop" + 9356 "Digit Five Full Stop" + 9357 "Digit Six Full Stop" + 9358 "Digit Seven Full Stop" + 9359 "Digit Eight Full Stop" + 9360 "Digit Nine Full Stop" + 9361 "Number Ten Full Stop" + 9362 "Number Eleven Full Stop" + 9363 "Number Twelve Full Stop" + 9364 "Number Thirteen Full Stop" + 9365 "Number Fourteen Full Stop" + 9366 "Number Fifteen Full Stop" + 9367 "Number Sixteen Full Stop" + 9368 "Number Seventeen Full Stop" + 9369 "Number Eighteen Full Stop" + 9370 "Number Nineteen Full Stop" + 9371 "Number Twenty Full Stop" + 9372 "Parenthesized Latin Small Letter A" + 9373 "Parenthesized Latin Small Letter B" + 9374 "Parenthesized Latin Small Letter C" + 9375 "Parenthesized Latin Small Letter D" + 9376 "Parenthesized Latin Small Letter E" + 9377 "Parenthesized Latin Small Letter F" + 9378 "Parenthesized Latin Small Letter G" + 9379 "Parenthesized Latin Small Letter H" + 9380 "Parenthesized Latin Small Letter I" + 9381 "Parenthesized Latin Small Letter J" + 9382 "Parenthesized Latin Small Letter K" + 9383 "Parenthesized Latin Small Letter L" + 9384 "Parenthesized Latin Small Letter M" + 9385 "Parenthesized Latin Small Letter N" + 9386 "Parenthesized Latin Small Letter O" + 9387 "Parenthesized Latin Small Letter P" + 9388 "Parenthesized Latin Small Letter Q" + 9389 "Parenthesized Latin Small Letter R" + 9390 "Parenthesized Latin Small Letter S" + 9391 "Parenthesized Latin Small Letter T" + 9392 "Parenthesized Latin Small Letter U" + 9393 "Parenthesized Latin Small Letter V" + 9394 "Parenthesized Latin Small Letter W" + 9395 "Parenthesized Latin Small Letter X" + 9396 "Parenthesized Latin Small Letter Y" + 9397 "Parenthesized Latin Small Letter Z" + 9398 "Circled Latin Capital Letter A" + 9399 "Circled Latin Capital Letter B" + 9400 "Circled Latin Capital Letter C" + 9401 "Circled Latin Capital Letter D" + 9402 "Circled Latin Capital Letter E" + 9403 "Circled Latin Capital Letter F" + 9404 "Circled Latin Capital Letter G" + 9405 "Circled Latin Capital Letter H" + 9406 "Circled Latin Capital Letter I" + 9407 "Circled Latin Capital Letter J" + 9408 "Circled Latin Capital Letter K" + 9409 "Circled Latin Capital Letter L" + 9410 "Circled Latin Capital Letter M" + 9411 "Circled Latin Capital Letter N" + 9412 "Circled Latin Capital Letter O" + 9413 "Circled Latin Capital Letter P" + 9414 "Circled Latin Capital Letter Q" + 9415 "Circled Latin Capital Letter R" + 9416 "Circled Latin Capital Letter S" + 9417 "Circled Latin Capital Letter T" + 9418 "Circled Latin Capital Letter U" + 9419 "Circled Latin Capital Letter V" + 9420 "Circled Latin Capital Letter W" + 9421 "Circled Latin Capital Letter X" + 9422 "Circled Latin Capital Letter Y" + 9423 "Circled Latin Capital Letter Z" + 9424 "Circled Latin Small Letter A" + 9425 "Circled Latin Small Letter B" + 9426 "Circled Latin Small Letter C" + 9427 "Circled Latin Small Letter D" + 9428 "Circled Latin Small Letter E" + 9429 "Circled Latin Small Letter F" + 9430 "Circled Latin Small Letter G" + 9431 "Circled Latin Small Letter H" + 9432 "Circled Latin Small Letter I" + 9433 "Circled Latin Small Letter J" + 9434 "Circled Latin Small Letter K" + 9435 "Circled Latin Small Letter L" + 9436 "Circled Latin Small Letter M" + 9437 "Circled Latin Small Letter N" + 9438 "Circled Latin Small Letter O" + 9439 "Circled Latin Small Letter P" + 9440 "Circled Latin Small Letter Q" + 9441 "Circled Latin Small Letter R" + 9442 "Circled Latin Small Letter S" + 9443 "Circled Latin Small Letter T" + 9444 "Circled Latin Small Letter U" + 9445 "Circled Latin Small Letter V" + 9446 "Circled Latin Small Letter W" + 9447 "Circled Latin Small Letter X" + 9448 "Circled Latin Small Letter Y" + 9449 "Circled Latin Small Letter Z" + 9450 "Circled Digit Zero" + 9451 "Negative Circled Number Eleven" + 9452 "Negative Circled Number Twelve" + 9453 "Negative Circled Number Thirteen" + 9454 "Negative Circled Number Fourteen" + 9455 "Negative Circled Number Fifteen" + 9456 "Negative Circled Number Sixteen" + 9457 "Negative Circled Number Seventeen" + 9458 "Negative Circled Number Eighteen" + 9459 "Negative Circled Number Nineteen" + 9460 "Negative Circled Number Twenty" + 9461 "Double Circled Digit One" + 9462 "Double Circled Digit Two" + 9463 "Double Circled Digit Three" + 9464 "Double Circled Digit Four" + 9465 "Double Circled Digit Five" + 9466 "Double Circled Digit Six" + 9467 "Double Circled Digit Seven" + 9468 "Double Circled Digit Eight" + 9469 "Double Circled Digit Nine" + 9470 "Double Circled Number Ten" + 9471 "Negative Circled Digit Zero" + 9472 "Box Drawings Light Horizontal" + 9473 "Box Drawings Heavy Horizontal" + 9474 "Box Drawings Light Vertical" + 9475 "Box Drawings Heavy Vertical" + 9476 "Box Drawings Light Triple Dash Horizontal" + 9477 "Box Drawings Heavy Triple Dash Horizontal" + 9478 "Box Drawings Light Triple Dash Vertical" + 9479 "Box Drawings Heavy Triple Dash Vertical" + 9480 "Box Drawings Light Quadruple Dash Horizontal" + 9481 "Box Drawings Heavy Quadruple Dash Horizontal" + 9482 "Box Drawings Light Quadruple Dash Vertical" + 9483 "Box Drawings Heavy Quadruple Dash Vertical" + 9484 "Box Drawings Light Down And Right" + 9485 "Box Drawings Down Light And Right Heavy" + 9486 "Box Drawings Down Heavy And Right Light" + 9487 "Box Drawings Heavy Down And Right" + 9488 "Box Drawings Light Down And Left" + 9489 "Box Drawings Down Light And Left Heavy" + 9490 "Box Drawings Down Heavy And Left Light" + 9491 "Box Drawings Heavy Down And Left" + 9492 "Box Drawings Light Up And Right" + 9493 "Box Drawings Up Light And Right Heavy" + 9494 "Box Drawings Up Heavy And Right Light" + 9495 "Box Drawings Heavy Up And Right" + 9496 "Box Drawings Light Up And Left" + 9497 "Box Drawings Up Light And Left Heavy" + 9498 "Box Drawings Up Heavy And Left Light" + 9499 "Box Drawings Heavy Up And Left" + 9500 "Box Drawings Light Vertical And Right" + 9501 "Box Drawings Vertical Light And Right Heavy" + 9502 "Box Drawings Up Heavy And Right Down Light" + 9503 "Box Drawings Down Heavy And Right Up Light" + 9504 "Box Drawings Vertical Heavy And Right Light" + 9505 "Box Drawings Down Light And Right Up Heavy" + 9506 "Box Drawings Up Light And Right Down Heavy" + 9507 "Box Drawings Heavy Vertical And Right" + 9508 "Box Drawings Light Vertical And Left" + 9509 "Box Drawings Vertical Light And Left Heavy" + 9510 "Box Drawings Up Heavy And Left Down Light" + 9511 "Box Drawings Down Heavy And Left Up Light" + 9512 "Box Drawings Vertical Heavy And Left Light" + 9513 "Box Drawings Down Light And Left Up Heavy" + 9514 "Box Drawings Up Light And Left Down Heavy" + 9515 "Box Drawings Heavy Vertical And Left" + 9516 "Box Drawings Light Down And Horizontal" + 9517 "Box Drawings Left Heavy And Right Down Light" + 9518 "Box Drawings Right Heavy And Left Down Light" + 9519 "Box Drawings Down Light And Horizontal Heavy" + 9520 "Box Drawings Down Heavy And Horizontal Light" + 9521 "Box Drawings Right Light And Left Down Heavy" + 9522 "Box Drawings Left Light And Right Down Heavy" + 9523 "Box Drawings Heavy Down And Horizontal" + 9524 "Box Drawings Light Up And Horizontal" + 9525 "Box Drawings Left Heavy And Right Up Light" + 9526 "Box Drawings Right Heavy And Left Up Light" + 9527 "Box Drawings Up Light And Horizontal Heavy" + 9528 "Box Drawings Up Heavy And Horizontal Light" + 9529 "Box Drawings Right Light And Left Up Heavy" + 9530 "Box Drawings Left Light And Right Up Heavy" + 9531 "Box Drawings Heavy Up And Horizontal" + 9532 "Box Drawings Light Vertical And Horizontal" + 9533 "Box Drawings Left Heavy And Right Vertical Light" + 9534 "Box Drawings Right Heavy And Left Vertical Light" + 9535 "Box Drawings Vertical Light And Horizontal Heavy" + 9536 "Box Drawings Up Heavy And Down Horizontal Light" + 9537 "Box Drawings Down Heavy And Up Horizontal Light" + 9538 "Box Drawings Vertical Heavy And Horizontal Light" + 9539 "Box Drawings Left Up Heavy And Right Down Light" + 9540 "Box Drawings Right Up Heavy And Left Down Light" + 9541 "Box Drawings Left Down Heavy And Right Up Light" + 9542 "Box Drawings Right Down Heavy And Left Up Light" + 9543 "Box Drawings Down Light And Up Horizontal Heavy" + 9544 "Box Drawings Up Light And Down Horizontal Heavy" + 9545 "Box Drawings Right Light And Left Vertical Heavy" + 9546 "Box Drawings Left Light And Right Vertical Heavy" + 9547 "Box Drawings Heavy Vertical And Horizontal" + 9548 "Box Drawings Light Double Dash Horizontal" + 9549 "Box Drawings Heavy Double Dash Horizontal" + 9550 "Box Drawings Light Double Dash Vertical" + 9551 "Box Drawings Heavy Double Dash Vertical" + 9552 "Box Drawings Double Horizontal" + 9553 "Box Drawings Double Vertical" + 9554 "Box Drawings Down Single And Right Double" + 9555 "Box Drawings Down Double And Right Single" + 9556 "Box Drawings Double Down And Right" + 9557 "Box Drawings Down Single And Left Double" + 9558 "Box Drawings Down Double And Left Single" + 9559 "Box Drawings Double Down And Left" + 9560 "Box Drawings Up Single And Right Double" + 9561 "Box Drawings Up Double And Right Single" + 9562 "Box Drawings Double Up And Right" + 9563 "Box Drawings Up Single And Left Double" + 9564 "Box Drawings Up Double And Left Single" + 9565 "Box Drawings Double Up And Left" + 9566 "Box Drawings Vertical Single And Right Double" + 9567 "Box Drawings Vertical Double And Right Single" + 9568 "Box Drawings Double Vertical And Right" + 9569 "Box Drawings Vertical Single And Left Double" + 9570 "Box Drawings Vertical Double And Left Single" + 9571 "Box Drawings Double Vertical And Left" + 9572 "Box Drawings Down Single And Horizontal Double" + 9573 "Box Drawings Down Double And Horizontal Single" + 9574 "Box Drawings Double Down And Horizontal" + 9575 "Box Drawings Up Single And Horizontal Double" + 9576 "Box Drawings Up Double And Horizontal Single" + 9577 "Box Drawings Double Up And Horizontal" + 9578 "Box Drawings Vertical Single And Horizontal Double" + 9579 "Box Drawings Vertical Double And Horizontal Single" + 9580 "Box Drawings Double Vertical And Horizontal" + 9581 "Box Drawings Light Arc Down And Right" + 9582 "Box Drawings Light Arc Down And Left" + 9583 "Box Drawings Light Arc Up And Left" + 9584 "Box Drawings Light Arc Up And Right" + 9585 "Box Drawings Light Diagonal Upper Right To Lower Left" + 9586 "Box Drawings Light Diagonal Upper Left To Lower Right" + 9587 "Box Drawings Light Diagonal Cross" + 9588 "Box Drawings Light Left" + 9589 "Box Drawings Light Up" + 9590 "Box Drawings Light Right" + 9591 "Box Drawings Light Down" + 9592 "Box Drawings Heavy Left" + 9593 "Box Drawings Heavy Up" + 9594 "Box Drawings Heavy Right" + 9595 "Box Drawings Heavy Down" + 9596 "Box Drawings Light Left And Heavy Right" + 9597 "Box Drawings Light Up And Heavy Down" + 9598 "Box Drawings Heavy Left And Light Right" + 9599 "Box Drawings Heavy Up And Light Down" + 9600 "Upper Half Block" + 9601 "Lower One Eighth Block" + 9602 "Lower One Quarter Block" + 9603 "Lower Three Eighths Block" + 9604 "Lower Half Block" + 9605 "Lower Five Eighths Block" + 9606 "Lower Three Quarters Block" + 9607 "Lower Seven Eighths Block" + 9608 "Full Block" + 9609 "Left Seven Eighths Block" + 9610 "Left Three Quarters Block" + 9611 "Left Five Eighths Block" + 9612 "Left Half Block" + 9613 "Left Three Eighths Block" + 9614 "Left One Quarter Block" + 9615 "Left One Eighth Block" + 9616 "Right Half Block" + 9617 "Light Shade" + 9618 "Medium Shade" + 9619 "Dark Shade" + 9620 "Upper One Eighth Block" + 9621 "Right One Eighth Block" + 9622 "Quadrant Lower Left" + 9623 "Quadrant Lower Right" + 9624 "Quadrant Upper Left" + 9625 "Quadrant Upper Left And Lower Left And Lower Right" + 9626 "Quadrant Upper Left And Lower Right" + 9627 "Quadrant Upper Left And Upper Right And Lower Left" + 9628 "Quadrant Upper Left And Upper Right And Lower Right" + 9629 "Quadrant Upper Right" + 9630 "Quadrant Upper Right And Lower Left" + 9631 "Quadrant Upper Right And Lower Left And Lower Right" + 9632 "Black Square" + 9633 "White Square" + 9634 "White Square With Rounded Corners" + 9635 "White Square Containing Black Small Square" + 9636 "Square With Horizontal Fill" + 9637 "Square With Vertical Fill" + 9638 "Square With Orthogonal Crosshatch Fill" + 9639 "Square With Upper Left To Lower Right Fill" + 9640 "Square With Upper Right To Lower Left Fill" + 9641 "Square With Diagonal Crosshatch Fill" + 9642 "Black Small Square" + 9643 "White Small Square" + 9644 "Black Rectangle" + 9645 "White Rectangle" + 9646 "Black Vertical Rectangle" + 9647 "White Vertical Rectangle" + 9648 "Black Parallelogram" + 9649 "White Parallelogram" + 9650 "Black Up-Pointing Triangle" + 9651 "White Up-Pointing Triangle" + 9652 "Black Up-Pointing Small Triangle" + 9653 "White Up-Pointing Small Triangle" + 9654 "Black Right-Pointing Triangle" + 9655 "White Right-Pointing Triangle" + 9656 "Black Right-Pointing Small Triangle" + 9657 "White Right-Pointing Small Triangle" + 9658 "Black Right-Pointing Pointer" + 9659 "White Right-Pointing Pointer" + 9660 "Black Down-Pointing Triangle" + 9661 "White Down-Pointing Triangle" + 9662 "Black Down-Pointing Small Triangle" + 9663 "White Down-Pointing Small Triangle" + 9664 "Black Left-Pointing Triangle" + 9665 "White Left-Pointing Triangle" + 9666 "Black Left-Pointing Small Triangle" + 9667 "White Left-Pointing Small Triangle" + 9668 "Black Left-Pointing Pointer" + 9669 "White Left-Pointing Pointer" + 9670 "Black Diamond" + 9671 "White Diamond" + 9672 "White Diamond Containing Black Small Diamond" + 9673 "Fisheye" + 9674 "Lozenge" + 9675 "White Circle" + 9676 "Dotted Circle" + 9677 "Circle With Vertical Fill" + 9678 "Bullseye" + 9679 "Black Circle" + 9680 "Circle With Left Half Black" + 9681 "Circle With Right Half Black" + 9682 "Circle With Lower Half Black" + 9683 "Circle With Upper Half Black" + 9684 "Circle With Upper Right Quadrant Black" + 9685 "Circle With All But Upper Left Quadrant Black" + 9686 "Left Half Black Circle" + 9687 "Right Half Black Circle" + 9688 "Inverse Bullet" + 9689 "Inverse White Circle" + 9690 "Upper Half Inverse White Circle" + 9691 "Lower Half Inverse White Circle" + 9692 "Upper Left Quadrant Circular Arc" + 9693 "Upper Right Quadrant Circular Arc" + 9694 "Lower Right Quadrant Circular Arc" + 9695 "Lower Left Quadrant Circular Arc" + 9696 "Upper Half Circle" + 9697 "Lower Half Circle" + 9698 "Black Lower Right Triangle" + 9699 "Black Lower Left Triangle" + 9700 "Black Upper Left Triangle" + 9701 "Black Upper Right Triangle" + 9702 "White Bullet" + 9703 "Square With Left Half Black" + 9704 "Square With Right Half Black" + 9705 "Square With Upper Left Diagonal Half Black" + 9706 "Square With Lower Right Diagonal Half Black" + 9707 "White Square With Vertical Bisecting Line" + 9708 "White Up-Pointing Triangle With Dot" + 9709 "Up-Pointing Triangle With Left Half Black" + 9710 "Up-Pointing Triangle With Right Half Black" + 9711 "Large Circle" + 9712 "White Square With Upper Left Quadrant" + 9713 "White Square With Lower Left Quadrant" + 9714 "White Square With Lower Right Quadrant" + 9715 "White Square With Upper Right Quadrant" + 9716 "White Circle With Upper Left Quadrant" + 9717 "White Circle With Lower Left Quadrant" + 9718 "White Circle With Lower Right Quadrant" + 9719 "White Circle With Upper Right Quadrant" + 9720 "Upper Left Triangle" + 9721 "Upper Right Triangle" + 9722 "Lower Left Triangle" + 9723 "White Medium Square" + 9724 "Black Medium Square" + 9725 "White Medium Small Square" + 9726 "Black Medium Small Square" + 9727 "Lower Right Triangle" + 9728 "Black Sun With Rays" + 9729 "Cloud" + 9730 "Umbrella" + 9731 "Snowman" + 9732 "Comet" + 9733 "Black Star" + 9734 "White Star" + 9735 "Lightning" + 9736 "Thunderstorm" + 9737 "Sun" + 9738 "Ascending Node" + 9739 "Descending Node" + 9740 "Conjunction" + 9741 "Opposition" + 9742 "Black Telephone" + 9743 "White Telephone" + 9744 "Ballot Box" + 9745 "Ballot Box With Check" + 9746 "Ballot Box With X" + 9747 "Saltire" + 9748 "Umbrella With Rain Drops" + 9749 "Hot Beverage" + 9750 "White Shogi Piece" + 9751 "Black Shogi Piece" + 9752 "Shamrock" + 9753 "Reversed Rotated Floral Heart Bullet" + 9754 "Black Left Pointing Index" + 9755 "Black Right Pointing Index" + 9756 "White Left Pointing Index" + 9757 "White Up Pointing Index" + 9758 "White Right Pointing Index" + 9759 "White Down Pointing Index" + 9760 "Skull And Crossbones" + 9761 "Caution Sign" + 9762 "Radioactive Sign" + 9763 "Biohazard Sign" + 9764 "Caduceus" + 9765 "Ankh" + 9766 "Orthodox Cross" + 9767 "Chi Rho" + 9768 "Cross Of Lorraine" + 9769 "Cross Of Jerusalem" + 9770 "Star And Crescent" + 9771 "Farsi Symbol" + 9772 "Adi Shakti" + 9773 "Hammer And Sickle" + 9774 "Peace Symbol" + 9775 "Yin Yang" + 9776 "Trigram For Heaven" + 9777 "Trigram For Lake" + 9778 "Trigram For Fire" + 9779 "Trigram For Thunder" + 9780 "Trigram For Wind" + 9781 "Trigram For Water" + 9782 "Trigram For Mountain" + 9783 "Trigram For Earth" + 9784 "Wheel Of Dharma" + 9785 "White Frowning Face" + 9786 "White Smiling Face" + 9787 "Black Smiling Face" + 9788 "White Sun With Rays" + 9789 "First Quarter Moon" + 9790 "Last Quarter Moon" + 9791 "Mercury" + 9792 "Female Sign" + 9793 "Earth" + 9794 "Male Sign" + 9795 "Jupiter" + 9796 "Saturn" + 9797 "Uranus" + 9798 "Neptune" + 9799 "Pluto" + 9800 "Aries" + 9801 "Taurus" + 9802 "Gemini" + 9803 "Cancer" + 9804 "Leo" + 9805 "Virgo" + 9806 "Libra" + 9807 "Scorpius" + 9808 "Sagittarius" + 9809 "Capricorn" + 9810 "Aquarius" + 9811 "Pisces" + 9812 "White Chess King" + 9813 "White Chess Queen" + 9814 "White Chess Rook" + 9815 "White Chess Bishop" + 9816 "White Chess Knight" + 9817 "White Chess Pawn" + 9818 "Black Chess King" + 9819 "Black Chess Queen" + 9820 "Black Chess Rook" + 9821 "Black Chess Bishop" + 9822 "Black Chess Knight" + 9823 "Black Chess Pawn" + 9824 "Black Spade Suit" + 9825 "White Heart Suit" + 9826 "White Diamond Suit" + 9827 "Black Club Suit" + 9828 "White Spade Suit" + 9829 "Black Heart Suit" + 9830 "Black Diamond Suit" + 9831 "White Club Suit" + 9832 "Hot Springs" + 9833 "Quarter Note" + 9834 "Eighth Note" + 9835 "Beamed Eighth Notes" + 9836 "Beamed Sixteenth Notes" + 9837 "Music Flat Sign" + 9838 "Music Natural Sign" + 9839 "Music Sharp Sign" + 9840 "West Syriac Cross" + 9841 "East Syriac Cross" + 9842 "Universal Recycling Symbol" + 9843 "Recycling Symbol For Type-1 Plastics" + 9844 "Recycling Symbol For Type-2 Plastics" + 9845 "Recycling Symbol For Type-3 Plastics" + 9846 "Recycling Symbol For Type-4 Plastics" + 9847 "Recycling Symbol For Type-5 Plastics" + 9848 "Recycling Symbol For Type-6 Plastics" + 9849 "Recycling Symbol For Type-7 Plastics" + 9850 "Recycling Symbol For Generic Materials" + 9851 "Black Universal Recycling Symbol" + 9852 "Recycled Paper Symbol" + 9853 "Partially-Recycled Paper Symbol" + 9854 "Permanent Paper Sign" + 9855 "Wheelchair Symbol" + 9856 "Die Face-1" + 9857 "Die Face-2" + 9858 "Die Face-3" + 9859 "Die Face-4" + 9860 "Die Face-5" + 9861 "Die Face-6" + 9862 "White Circle With Dot Right" + 9863 "White Circle With Two Dots" + 9864 "Black Circle With White Dot Right" + 9865 "Black Circle With Two White Dots" + 9866 "Monogram For Yang" + 9867 "Monogram For Yin" + 9868 "Digram For Greater Yang" + 9869 "Digram For Lesser Yin" + 9870 "Digram For Lesser Yang" + 9871 "Digram For Greater Yin" + 9872 "White Flag" + 9873 "Black Flag" + 9874 "Hammer And Pick" + 9875 "Anchor" + 9876 "Crossed Swords" + 9877 "Staff Of Aesculapius" + 9878 "Scales" + 9879 "Alembic" + 9880 "Flower" + 9881 "Gear" + 9882 "Staff Of Hermes" + 9883 "Atom Symbol" + 9884 "Fleur-De-Lis" + 9885 "Outlined White Star" + 9886 "Three Lines Converging Right" + 9887 "Three Lines Converging Left" + 9888 "Warning Sign" + 9889 "High Voltage Sign" + 9890 "Doubled Female Sign" + 9891 "Doubled Male Sign" + 9892 "Interlocked Female And Male Sign" + 9893 "Male And Female Sign" + 9894 "Male With Stroke Sign" + 9895 "Male With Stroke And Male And Female Sign" + 9896 "Vertical Male With Stroke Sign" + 9897 "Horizontal Male With Stroke Sign" + 9898 "Medium White Circle" + 9899 "Medium Black Circle" + 9900 "Medium Small White Circle" + 9901 "Marriage Symbol" + 9902 "Divorce Symbol" + 9903 "Unmarried Partnership Symbol" + 9904 "Coffin" + 9905 "Funeral Urn" + 9906 "Neuter" + 9907 "Ceres" + 9908 "Pallas" + 9909 "Juno" + 9910 "Vesta" + 9911 "Chiron" + 9912 "Black Moon Lilith" + 9913 "Sextile" + 9914 "Semisextile" + 9915 "Quincunx" + 9916 "Sesquiquadrate" + 9917 "Soccer Ball" + 9918 "Baseball" + 9919 "Squared Key" + 9920 "White Draughts Man" + 9921 "White Draughts King" + 9922 "Black Draughts Man" + 9923 "Black Draughts King" + 9924 "Snowman Without Snow" + 9925 "Sun Behind Cloud" + 9926 "Rain" + 9927 "Black Snowman" + 9928 "Thunder Cloud And Rain" + 9929 "Turned White Shogi Piece" + 9930 "Turned Black Shogi Piece" + 9931 "White Diamond In Square" + 9932 "Crossing Lanes" + 9933 "Disabled Car" + 9934 "Ophiuchus" + 9935 "Pick" + 9936 "Car Sliding" + 9937 "Helmet With White Cross" + 9938 "Circled Crossing Lanes" + 9939 "Chains" + 9940 "No Entry" + 9941 "Alternate One-Way Left Way Traffic" + 9942 "Black Two-Way Left Way Traffic" + 9943 "White Two-Way Left Way Traffic" + 9944 "Black Left Lane Merge" + 9945 "White Left Lane Merge" + 9946 "Drive Slow Sign" + 9947 "Heavy White Down-Pointing Triangle" + 9948 "Left Closed Entry" + 9949 "Squared Saltire" + 9950 "Falling Diagonal In White Circle In Black Square" + 9951 "Black Truck" + 9952 "Restricted Left Entry-1" + 9953 "Restricted Left Entry-2" + 9954 "Astronomical Symbol For Uranus" + 9955 "Heavy Circle With Stroke And Two Dots Above" + 9956 "Pentagram" + 9957 "Right-Handed Interlaced Pentagram" + 9958 "Left-Handed Interlaced Pentagram" + 9959 "Inverted Pentagram" + 9960 "Black Cross On Shield" + 9961 "Shinto Shrine" + 9962 "Church" + 9963 "Castle" + 9964 "Historic Site" + 9965 "Gear Without Hub" + 9966 "Gear With Handles" + 9967 "Map Symbol For Lighthouse" + 9968 "Mountain" + 9969 "Umbrella On Ground" + 9970 "Fountain" + 9971 "Flag In Hole" + 9972 "Ferry" + 9973 "Sailboat" + 9974 "Square Four Corners" + 9975 "Skier" + 9976 "Ice Skate" + 9977 "Person With Ball" + 9978 "Tent" + 9979 "Japanese Bank Symbol" + 9980 "Headstone Graveyard Symbol" + 9981 "Fuel Pump" + 9982 "Cup On Black Square" + 9983 "White Flag With Horizontal Middle Black Stripe" + 9984 "Black Safety Scissors" + 9985 "Upper Blade Scissors" + 9986 "Black Scissors" + 9987 "Lower Blade Scissors" + 9988 "White Scissors" + 9989 "White Heavy Check Mark" + 9990 "Telephone Location Sign" + 9991 "Tape Drive" + 9992 "Airplane" + 9993 "Envelope" + 9994 "Raised Fist" + 9995 "Raised Hand" + 9996 "Victory Hand" + 9997 "Writing Hand" + 9998 "Lower Right Pencil" + 9999 "Pencil" + 10000 "Upper Right Pencil" + 10001 "White Nib" + 10002 "Black Nib" + 10003 "Check Mark" + 10004 "Heavy Check Mark" + 10005 "Multiplication X" + 10006 "Heavy Multiplication X" + 10007 "Ballot X" + 10008 "Heavy Ballot X" + 10009 "Outlined Greek Cross" + 10010 "Heavy Greek Cross" + 10011 "Open Centre Cross" + 10012 "Heavy Open Centre Cross" + 10013 "Latin Cross" + 10014 "Shadowed White Latin Cross" + 10015 "Outlined Latin Cross" + 10016 "Maltese Cross" + 10017 "Star Of David" + 10018 "Four Teardrop-Spoked Asterisk" + 10019 "Four Balloon-Spoked Asterisk" + 10020 "Heavy Four Balloon-Spoked Asterisk" + 10021 "Four Club-Spoked Asterisk" + 10022 "Black Four Pointed Star" + 10023 "White Four Pointed Star" + 10024 "Sparkles" + 10025 "Stress Outlined White Star" + 10026 "Circled White Star" + 10027 "Open Centre Black Star" + 10028 "Black Centre White Star" + 10029 "Outlined Black Star" + 10030 "Heavy Outlined Black Star" + 10031 "Pinwheel Star" + 10032 "Shadowed White Star" + 10033 "Heavy Asterisk" + 10034 "Open Centre Asterisk" + 10035 "Eight Spoked Asterisk" + 10036 "Eight Pointed Black Star" + 10037 "Eight Pointed Pinwheel Star" + 10038 "Six Pointed Black Star" + 10039 "Eight Pointed Rectilinear Black Star" + 10040 "Heavy Eight Pointed Rectilinear Black Star" + 10041 "Twelve Pointed Black Star" + 10042 "Sixteen Pointed Asterisk" + 10043 "Teardrop-Spoked Asterisk" + 10044 "Open Centre Teardrop-Spoked Asterisk" + 10045 "Heavy Teardrop-Spoked Asterisk" + 10046 "Six Petalled Black And White Florette" + 10047 "Black Florette" + 10048 "White Florette" + 10049 "Eight Petalled Outlined Black Florette" + 10050 "Circled Open Centre Eight Pointed Star" + 10051 "Heavy Teardrop-Spoked Pinwheel Asterisk" + 10052 "Snowflake" + 10053 "Tight Trifoliate Snowflake" + 10054 "Heavy Chevron Snowflake" + 10055 "Sparkle" + 10056 "Heavy Sparkle" + 10057 "Balloon-Spoked Asterisk" + 10058 "Eight Teardrop-Spoked Propeller Asterisk" + 10059 "Heavy Eight Teardrop-Spoked Propeller Asterisk" + 10060 "Cross Mark" + 10061 "Shadowed White Circle" + 10062 "Negative Squared Cross Mark" + 10063 "Lower Right Drop-Shadowed White Square" + 10064 "Upper Right Drop-Shadowed White Square" + 10065 "Lower Right Shadowed White Square" + 10066 "Upper Right Shadowed White Square" + 10067 "Black Question Mark Ornament" + 10068 "White Question Mark Ornament" + 10069 "White Exclamation Mark Ornament" + 10070 "Black Diamond Minus White X" + 10071 "Heavy Exclamation Mark Symbol" + 10072 "Light Vertical Bar" + 10073 "Medium Vertical Bar" + 10074 "Heavy Vertical Bar" + 10075 "Heavy Single Turned Comma Quotation Mark Ornament" + 10076 "Heavy Single Comma Quotation Mark Ornament" + 10077 "Heavy Double Turned Comma Quotation Mark Ornament" + 10078 "Heavy Double Comma Quotation Mark Ornament" + 10079 "Heavy Low Single Comma Quotation Mark Ornament" + 10080 "Heavy Low Double Comma Quotation Mark Ornament" + 10081 "Curved Stem Paragraph Sign Ornament" + 10082 "Heavy Exclamation Mark Ornament" + 10083 "Heavy Heart Exclamation Mark Ornament" + 10084 "Heavy Black Heart" + 10085 "Rotated Heavy Black Heart Bullet" + 10086 "Floral Heart" + 10087 "Rotated Floral Heart Bullet" + 10088 "Medium Left Parenthesis Ornament" + 10089 "Medium Right Parenthesis Ornament" + 10090 "Medium Flattened Left Parenthesis Ornament" + 10091 "Medium Flattened Right Parenthesis Ornament" + 10092 "Medium Left-Pointing Angle Bracket Ornament" + 10093 "Medium Right-Pointing Angle Bracket Ornament" + 10094 "Heavy Left-Pointing Angle Quotation Mark Ornament" + 10095 "Heavy Right-Pointing Angle Quotation Mark Ornament" + 10096 "Heavy Left-Pointing Angle Bracket Ornament" + 10097 "Heavy Right-Pointing Angle Bracket Ornament" + 10098 "Light Left Tortoise Shell Bracket Ornament" + 10099 "Light Right Tortoise Shell Bracket Ornament" + 10100 "Medium Left Curly Bracket Ornament" + 10101 "Medium Right Curly Bracket Ornament" + 10102 "Dingbat Negative Circled Digit One" + 10103 "Dingbat Negative Circled Digit Two" + 10104 "Dingbat Negative Circled Digit Three" + 10105 "Dingbat Negative Circled Digit Four" + 10106 "Dingbat Negative Circled Digit Five" + 10107 "Dingbat Negative Circled Digit Six" + 10108 "Dingbat Negative Circled Digit Seven" + 10109 "Dingbat Negative Circled Digit Eight" + 10110 "Dingbat Negative Circled Digit Nine" + 10111 "Dingbat Negative Circled Number Ten" + 10112 "Dingbat Circled Sans-Serif Digit One" + 10113 "Dingbat Circled Sans-Serif Digit Two" + 10114 "Dingbat Circled Sans-Serif Digit Three" + 10115 "Dingbat Circled Sans-Serif Digit Four" + 10116 "Dingbat Circled Sans-Serif Digit Five" + 10117 "Dingbat Circled Sans-Serif Digit Six" + 10118 "Dingbat Circled Sans-Serif Digit Seven" + 10119 "Dingbat Circled Sans-Serif Digit Eight" + 10120 "Dingbat Circled Sans-Serif Digit Nine" + 10121 "Dingbat Circled Sans-Serif Number Ten" + 10122 "Dingbat Negative Circled Sans-Serif Digit One" + 10123 "Dingbat Negative Circled Sans-Serif Digit Two" + 10124 "Dingbat Negative Circled Sans-Serif Digit Three" + 10125 "Dingbat Negative Circled Sans-Serif Digit Four" + 10126 "Dingbat Negative Circled Sans-Serif Digit Five" + 10127 "Dingbat Negative Circled Sans-Serif Digit Six" + 10128 "Dingbat Negative Circled Sans-Serif Digit Seven" + 10129 "Dingbat Negative Circled Sans-Serif Digit Eight" + 10130 "Dingbat Negative Circled Sans-Serif Digit Nine" + 10131 "Dingbat Negative Circled Sans-Serif Number Ten" + 10132 "Heavy Wide-Headed Rightwards Arrow" + 10133 "Heavy Plus Sign" + 10134 "Heavy Minus Sign" + 10135 "Heavy Division Sign" + 10136 "Heavy South East Arrow" + 10137 "Heavy Rightwards Arrow" + 10138 "Heavy North East Arrow" + 10139 "Drafting Point Rightwards Arrow" + 10140 "Heavy Round-Tipped Rightwards Arrow" + 10141 "Triangle-Headed Rightwards Arrow" + 10142 "Heavy Triangle-Headed Rightwards Arrow" + 10143 "Dashed Triangle-Headed Rightwards Arrow" + 10144 "Heavy Dashed Triangle-Headed Rightwards Arrow" + 10145 "Black Rightwards Arrow" + 10146 "Three-D Top-Lighted Rightwards Arrowhead" + 10147 "Three-D Bottom-Lighted Rightwards Arrowhead" + 10148 "Black Rightwards Arrowhead" + 10149 "Heavy Black Curved Downwards And Rightwards Arrow" + 10150 "Heavy Black Curved Upwards And Rightwards Arrow" + 10151 "Squat Black Rightwards Arrow" + 10152 "Heavy Concave-Pointed Black Rightwards Arrow" + 10153 "Right-Shaded White Rightwards Arrow" + 10154 "Left-Shaded White Rightwards Arrow" + 10155 "Back-Tilted Shadowed White Rightwards Arrow" + 10156 "Front-Tilted Shadowed White Rightwards Arrow" + 10157 "Heavy Lower Right-Shadowed White Rightwards Arrow" + 10158 "Heavy Upper Right-Shadowed White Rightwards Arrow" + 10159 "Notched Lower Right-Shadowed White Rightwards Arrow" + 10160 "Curly Loop" + 10161 "Notched Upper Right-Shadowed White Rightwards Arrow" + 10162 "Circled Heavy White Rightwards Arrow" + 10163 "White-Feathered Rightwards Arrow" + 10164 "Black-Feathered South East Arrow" + 10165 "Black-Feathered Rightwards Arrow" + 10166 "Black-Feathered North East Arrow" + 10167 "Heavy Black-Feathered South East Arrow" + 10168 "Heavy Black-Feathered Rightwards Arrow" + 10169 "Heavy Black-Feathered North East Arrow" + 10170 "Teardrop-Barbed Rightwards Arrow" + 10171 "Heavy Teardrop-Shanked Rightwards Arrow" + 10172 "Wedge-Tailed Rightwards Arrow" + 10173 "Heavy Wedge-Tailed Rightwards Arrow" + 10174 "Open-Outlined Rightwards Arrow" + 10175 "Double Curly Loop" + 10176 "Three Dimensional Angle" + 10177 "White Triangle Containing Small White Triangle" + 10178 "Perpendicular" + 10179 "Open Subset" + 10180 "Open Superset" + 10181 "Left S-Shaped Bag Delimiter" + 10182 "Right S-Shaped Bag Delimiter" + 10183 "Or With Dot Inside" + 10184 "Reverse Solidus Preceding Subset" + 10185 "Superset Preceding Solidus" + 10186 "Vertical Bar With Horizontal Stroke" + 10187 "Mathematical Rising Diagonal" + 10188 "Long Division" + 10189 "Mathematical Falling Diagonal" + 10190 "Squared Logical And" + 10191 "Squared Logical Or" + 10192 "White Diamond With Centred Dot" + 10193 "And With Dot" + 10194 "Element Of Opening Upwards" + 10195 "Lower Right Corner With Dot" + 10196 "Upper Left Corner With Dot" + 10197 "Left Outer Join" + 10198 "Right Outer Join" + 10199 "Full Outer Join" + 10200 "Large Up Tack" + 10201 "Large Down Tack" + 10202 "Left And Right Double Turnstile" + 10203 "Left And Right Tack" + 10204 "Left Multimap" + 10205 "Long Right Tack" + 10206 "Long Left Tack" + 10207 "Up Tack With Circle Above" + 10208 "Lozenge Divided By Horizontal Rule" + 10209 "White Concave-Sided Diamond" + 10210 "White Concave-Sided Diamond With Leftwards Tick" + 10211 "White Concave-Sided Diamond With Rightwards Tick" + 10212 "White Square With Leftwards Tick" + 10213 "White Square With Rightwards Tick" + 10214 "Mathematical Left White Square Bracket" + 10215 "Mathematical Right White Square Bracket" + 10216 "Mathematical Left Angle Bracket" + 10217 "Mathematical Right Angle Bracket" + 10218 "Mathematical Left Double Angle Bracket" + 10219 "Mathematical Right Double Angle Bracket" + 10220 "Mathematical Left White Tortoise Shell Bracket" + 10221 "Mathematical Right White Tortoise Shell Bracket" + 10222 "Mathematical Left Flattened Parenthesis" + 10223 "Mathematical Right Flattened Parenthesis" + 10224 "Upwards Quadruple Arrow" + 10225 "Downwards Quadruple Arrow" + 10226 "Anticlockwise Gapped Circle Arrow" + 10227 "Clockwise Gapped Circle Arrow" + 10228 "Right Arrow With Circled Plus" + 10229 "Long Leftwards Arrow" + 10230 "Long Rightwards Arrow" + 10231 "Long Left Right Arrow" + 10232 "Long Leftwards Double Arrow" + 10233 "Long Rightwards Double Arrow" + 10234 "Long Left Right Double Arrow" + 10235 "Long Leftwards Arrow From Bar" + 10236 "Long Rightwards Arrow From Bar" + 10237 "Long Leftwards Double Arrow From Bar" + 10238 "Long Rightwards Double Arrow From Bar" + 10239 "Long Rightwards Squiggle Arrow" + 10240 "Braille Pattern Blank" + 10241 "Braille Pattern Dots-1" + 10242 "Braille Pattern Dots-2" + 10243 "Braille Pattern Dots-12" + 10244 "Braille Pattern Dots-3" + 10245 "Braille Pattern Dots-13" + 10246 "Braille Pattern Dots-23" + 10247 "Braille Pattern Dots-123" + 10248 "Braille Pattern Dots-4" + 10249 "Braille Pattern Dots-14" + 10250 "Braille Pattern Dots-24" + 10251 "Braille Pattern Dots-124" + 10252 "Braille Pattern Dots-34" + 10253 "Braille Pattern Dots-134" + 10254 "Braille Pattern Dots-234" + 10255 "Braille Pattern Dots-1234" + 10256 "Braille Pattern Dots-5" + 10257 "Braille Pattern Dots-15" + 10258 "Braille Pattern Dots-25" + 10259 "Braille Pattern Dots-125" + 10260 "Braille Pattern Dots-35" + 10261 "Braille Pattern Dots-135" + 10262 "Braille Pattern Dots-235" + 10263 "Braille Pattern Dots-1235" + 10264 "Braille Pattern Dots-45" + 10265 "Braille Pattern Dots-145" + 10266 "Braille Pattern Dots-245" + 10267 "Braille Pattern Dots-1245" + 10268 "Braille Pattern Dots-345" + 10269 "Braille Pattern Dots-1345" + 10270 "Braille Pattern Dots-2345" + 10271 "Braille Pattern Dots-12345" + 10272 "Braille Pattern Dots-6" + 10273 "Braille Pattern Dots-16" + 10274 "Braille Pattern Dots-26" + 10275 "Braille Pattern Dots-126" + 10276 "Braille Pattern Dots-36" + 10277 "Braille Pattern Dots-136" + 10278 "Braille Pattern Dots-236" + 10279 "Braille Pattern Dots-1236" + 10280 "Braille Pattern Dots-46" + 10281 "Braille Pattern Dots-146" + 10282 "Braille Pattern Dots-246" + 10283 "Braille Pattern Dots-1246" + 10284 "Braille Pattern Dots-346" + 10285 "Braille Pattern Dots-1346" + 10286 "Braille Pattern Dots-2346" + 10287 "Braille Pattern Dots-12346" + 10288 "Braille Pattern Dots-56" + 10289 "Braille Pattern Dots-156" + 10290 "Braille Pattern Dots-256" + 10291 "Braille Pattern Dots-1256" + 10292 "Braille Pattern Dots-356" + 10293 "Braille Pattern Dots-1356" + 10294 "Braille Pattern Dots-2356" + 10295 "Braille Pattern Dots-12356" + 10296 "Braille Pattern Dots-456" + 10297 "Braille Pattern Dots-1456" + 10298 "Braille Pattern Dots-2456" + 10299 "Braille Pattern Dots-12456" + 10300 "Braille Pattern Dots-3456" + 10301 "Braille Pattern Dots-13456" + 10302 "Braille Pattern Dots-23456" + 10303 "Braille Pattern Dots-123456" + 10304 "Braille Pattern Dots-7" + 10305 "Braille Pattern Dots-17" + 10306 "Braille Pattern Dots-27" + 10307 "Braille Pattern Dots-127" + 10308 "Braille Pattern Dots-37" + 10309 "Braille Pattern Dots-137" + 10310 "Braille Pattern Dots-237" + 10311 "Braille Pattern Dots-1237" + 10312 "Braille Pattern Dots-47" + 10313 "Braille Pattern Dots-147" + 10314 "Braille Pattern Dots-247" + 10315 "Braille Pattern Dots-1247" + 10316 "Braille Pattern Dots-347" + 10317 "Braille Pattern Dots-1347" + 10318 "Braille Pattern Dots-2347" + 10319 "Braille Pattern Dots-12347" + 10320 "Braille Pattern Dots-57" + 10321 "Braille Pattern Dots-157" + 10322 "Braille Pattern Dots-257" + 10323 "Braille Pattern Dots-1257" + 10324 "Braille Pattern Dots-357" + 10325 "Braille Pattern Dots-1357" + 10326 "Braille Pattern Dots-2357" + 10327 "Braille Pattern Dots-12357" + 10328 "Braille Pattern Dots-457" + 10329 "Braille Pattern Dots-1457" + 10330 "Braille Pattern Dots-2457" + 10331 "Braille Pattern Dots-12457" + 10332 "Braille Pattern Dots-3457" + 10333 "Braille Pattern Dots-13457" + 10334 "Braille Pattern Dots-23457" + 10335 "Braille Pattern Dots-123457" + 10336 "Braille Pattern Dots-67" + 10337 "Braille Pattern Dots-167" + 10338 "Braille Pattern Dots-267" + 10339 "Braille Pattern Dots-1267" + 10340 "Braille Pattern Dots-367" + 10341 "Braille Pattern Dots-1367" + 10342 "Braille Pattern Dots-2367" + 10343 "Braille Pattern Dots-12367" + 10344 "Braille Pattern Dots-467" + 10345 "Braille Pattern Dots-1467" + 10346 "Braille Pattern Dots-2467" + 10347 "Braille Pattern Dots-12467" + 10348 "Braille Pattern Dots-3467" + 10349 "Braille Pattern Dots-13467" + 10350 "Braille Pattern Dots-23467" + 10351 "Braille Pattern Dots-123467" + 10352 "Braille Pattern Dots-567" + 10353 "Braille Pattern Dots-1567" + 10354 "Braille Pattern Dots-2567" + 10355 "Braille Pattern Dots-12567" + 10356 "Braille Pattern Dots-3567" + 10357 "Braille Pattern Dots-13567" + 10358 "Braille Pattern Dots-23567" + 10359 "Braille Pattern Dots-123567" + 10360 "Braille Pattern Dots-4567" + 10361 "Braille Pattern Dots-14567" + 10362 "Braille Pattern Dots-24567" + 10363 "Braille Pattern Dots-124567" + 10364 "Braille Pattern Dots-34567" + 10365 "Braille Pattern Dots-134567" + 10366 "Braille Pattern Dots-234567" + 10367 "Braille Pattern Dots-1234567" + 10368 "Braille Pattern Dots-8" + 10369 "Braille Pattern Dots-18" + 10370 "Braille Pattern Dots-28" + 10371 "Braille Pattern Dots-128" + 10372 "Braille Pattern Dots-38" + 10373 "Braille Pattern Dots-138" + 10374 "Braille Pattern Dots-238" + 10375 "Braille Pattern Dots-1238" + 10376 "Braille Pattern Dots-48" + 10377 "Braille Pattern Dots-148" + 10378 "Braille Pattern Dots-248" + 10379 "Braille Pattern Dots-1248" + 10380 "Braille Pattern Dots-348" + 10381 "Braille Pattern Dots-1348" + 10382 "Braille Pattern Dots-2348" + 10383 "Braille Pattern Dots-12348" + 10384 "Braille Pattern Dots-58" + 10385 "Braille Pattern Dots-158" + 10386 "Braille Pattern Dots-258" + 10387 "Braille Pattern Dots-1258" + 10388 "Braille Pattern Dots-358" + 10389 "Braille Pattern Dots-1358" + 10390 "Braille Pattern Dots-2358" + 10391 "Braille Pattern Dots-12358" + 10392 "Braille Pattern Dots-458" + 10393 "Braille Pattern Dots-1458" + 10394 "Braille Pattern Dots-2458" + 10395 "Braille Pattern Dots-12458" + 10396 "Braille Pattern Dots-3458" + 10397 "Braille Pattern Dots-13458" + 10398 "Braille Pattern Dots-23458" + 10399 "Braille Pattern Dots-123458" + 10400 "Braille Pattern Dots-68" + 10401 "Braille Pattern Dots-168" + 10402 "Braille Pattern Dots-268" + 10403 "Braille Pattern Dots-1268" + 10404 "Braille Pattern Dots-368" + 10405 "Braille Pattern Dots-1368" + 10406 "Braille Pattern Dots-2368" + 10407 "Braille Pattern Dots-12368" + 10408 "Braille Pattern Dots-468" + 10409 "Braille Pattern Dots-1468" + 10410 "Braille Pattern Dots-2468" + 10411 "Braille Pattern Dots-12468" + 10412 "Braille Pattern Dots-3468" + 10413 "Braille Pattern Dots-13468" + 10414 "Braille Pattern Dots-23468" + 10415 "Braille Pattern Dots-123468" + 10416 "Braille Pattern Dots-568" + 10417 "Braille Pattern Dots-1568" + 10418 "Braille Pattern Dots-2568" + 10419 "Braille Pattern Dots-12568" + 10420 "Braille Pattern Dots-3568" + 10421 "Braille Pattern Dots-13568" + 10422 "Braille Pattern Dots-23568" + 10423 "Braille Pattern Dots-123568" + 10424 "Braille Pattern Dots-4568" + 10425 "Braille Pattern Dots-14568" + 10426 "Braille Pattern Dots-24568" + 10427 "Braille Pattern Dots-124568" + 10428 "Braille Pattern Dots-34568" + 10429 "Braille Pattern Dots-134568" + 10430 "Braille Pattern Dots-234568" + 10431 "Braille Pattern Dots-1234568" + 10432 "Braille Pattern Dots-78" + 10433 "Braille Pattern Dots-178" + 10434 "Braille Pattern Dots-278" + 10435 "Braille Pattern Dots-1278" + 10436 "Braille Pattern Dots-378" + 10437 "Braille Pattern Dots-1378" + 10438 "Braille Pattern Dots-2378" + 10439 "Braille Pattern Dots-12378" + 10440 "Braille Pattern Dots-478" + 10441 "Braille Pattern Dots-1478" + 10442 "Braille Pattern Dots-2478" + 10443 "Braille Pattern Dots-12478" + 10444 "Braille Pattern Dots-3478" + 10445 "Braille Pattern Dots-13478" + 10446 "Braille Pattern Dots-23478" + 10447 "Braille Pattern Dots-123478" + 10448 "Braille Pattern Dots-578" + 10449 "Braille Pattern Dots-1578" + 10450 "Braille Pattern Dots-2578" + 10451 "Braille Pattern Dots-12578" + 10452 "Braille Pattern Dots-3578" + 10453 "Braille Pattern Dots-13578" + 10454 "Braille Pattern Dots-23578" + 10455 "Braille Pattern Dots-123578" + 10456 "Braille Pattern Dots-4578" + 10457 "Braille Pattern Dots-14578" + 10458 "Braille Pattern Dots-24578" + 10459 "Braille Pattern Dots-124578" + 10460 "Braille Pattern Dots-34578" + 10461 "Braille Pattern Dots-134578" + 10462 "Braille Pattern Dots-234578" + 10463 "Braille Pattern Dots-1234578" + 10464 "Braille Pattern Dots-678" + 10465 "Braille Pattern Dots-1678" + 10466 "Braille Pattern Dots-2678" + 10467 "Braille Pattern Dots-12678" + 10468 "Braille Pattern Dots-3678" + 10469 "Braille Pattern Dots-13678" + 10470 "Braille Pattern Dots-23678" + 10471 "Braille Pattern Dots-123678" + 10472 "Braille Pattern Dots-4678" + 10473 "Braille Pattern Dots-14678" + 10474 "Braille Pattern Dots-24678" + 10475 "Braille Pattern Dots-124678" + 10476 "Braille Pattern Dots-34678" + 10477 "Braille Pattern Dots-134678" + 10478 "Braille Pattern Dots-234678" + 10479 "Braille Pattern Dots-1234678" + 10480 "Braille Pattern Dots-5678" + 10481 "Braille Pattern Dots-15678" + 10482 "Braille Pattern Dots-25678" + 10483 "Braille Pattern Dots-125678" + 10484 "Braille Pattern Dots-35678" + 10485 "Braille Pattern Dots-135678" + 10486 "Braille Pattern Dots-235678" + 10487 "Braille Pattern Dots-1235678" + 10488 "Braille Pattern Dots-45678" + 10489 "Braille Pattern Dots-145678" + 10490 "Braille Pattern Dots-245678" + 10491 "Braille Pattern Dots-1245678" + 10492 "Braille Pattern Dots-345678" + 10493 "Braille Pattern Dots-1345678" + 10494 "Braille Pattern Dots-2345678" + 10495 "Braille Pattern Dots-12345678" + 10496 "Rightwards Two-Headed Arrow With Vertical Stroke" + 10497 "Rightwards Two-Headed Arrow With Double Vertical Stroke" + 10498 "Leftwards Double Arrow With Vertical Stroke" + 10499 "Rightwards Double Arrow With Vertical Stroke" + 10500 "Left Right Double Arrow With Vertical Stroke" + 10501 "Rightwards Two-Headed Arrow From Bar" + 10502 "Leftwards Double Arrow From Bar" + 10503 "Rightwards Double Arrow From Bar" + 10504 "Downwards Arrow With Horizontal Stroke" + 10505 "Upwards Arrow With Horizontal Stroke" + 10506 "Upwards Triple Arrow" + 10507 "Downwards Triple Arrow" + 10508 "Leftwards Double Dash Arrow" + 10509 "Rightwards Double Dash Arrow" + 10510 "Leftwards Triple Dash Arrow" + 10511 "Rightwards Triple Dash Arrow" + 10512 "Rightwards Two-Headed Triple Dash Arrow" + 10513 "Rightwards Arrow With Dotted Stem" + 10514 "Upwards Arrow To Bar" + 10515 "Downwards Arrow To Bar" + 10516 "Rightwards Arrow With Tail With Vertical Stroke" + 10517 "Rightwards Arrow With Tail With Double Vertical Stroke" + 10518 "Rightwards Two-Headed Arrow With Tail" + 10519 "Rightwards Two-Headed Arrow With Tail With Vertical Stroke" + 10520 "Rightwards Two-Headed Arrow With Tail With Double Vertical Stroke" + 10521 "Leftwards Arrow-Tail" + 10522 "Rightwards Arrow-Tail" + 10523 "Leftwards Double Arrow-Tail" + 10524 "Rightwards Double Arrow-Tail" + 10525 "Leftwards Arrow To Black Diamond" + 10526 "Rightwards Arrow To Black Diamond" + 10527 "Leftwards Arrow From Bar To Black Diamond" + 10528 "Rightwards Arrow From Bar To Black Diamond" + 10529 "North West And South East Arrow" + 10530 "North East And South West Arrow" + 10531 "North West Arrow With Hook" + 10532 "North East Arrow With Hook" + 10533 "South East Arrow With Hook" + 10534 "South West Arrow With Hook" + 10535 "North West Arrow And North East Arrow" + 10536 "North East Arrow And South East Arrow" + 10537 "South East Arrow And South West Arrow" + 10538 "South West Arrow And North West Arrow" + 10539 "Rising Diagonal Crossing Falling Diagonal" + 10540 "Falling Diagonal Crossing Rising Diagonal" + 10541 "South East Arrow Crossing North East Arrow" + 10542 "North East Arrow Crossing South East Arrow" + 10543 "Falling Diagonal Crossing North East Arrow" + 10544 "Rising Diagonal Crossing South East Arrow" + 10545 "North East Arrow Crossing North West Arrow" + 10546 "North West Arrow Crossing North East Arrow" + 10547 "Wave Arrow Pointing Directly Right" + 10548 "Arrow Pointing Rightwards Then Curving Upwards" + 10549 "Arrow Pointing Rightwards Then Curving Downwards" + 10550 "Arrow Pointing Downwards Then Curving Leftwards" + 10551 "Arrow Pointing Downwards Then Curving Rightwards" + 10552 "Right-Side Arc Clockwise Arrow" + 10553 "Left-Side Arc Anticlockwise Arrow" + 10554 "Top Arc Anticlockwise Arrow" + 10555 "Bottom Arc Anticlockwise Arrow" + 10556 "Top Arc Clockwise Arrow With Minus" + 10557 "Top Arc Anticlockwise Arrow With Plus" + 10558 "Lower Right Semicircular Clockwise Arrow" + 10559 "Lower Left Semicircular Anticlockwise Arrow" + 10560 "Anticlockwise Closed Circle Arrow" + 10561 "Clockwise Closed Circle Arrow" + 10562 "Rightwards Arrow Above Short Leftwards Arrow" + 10563 "Leftwards Arrow Above Short Rightwards Arrow" + 10564 "Short Rightwards Arrow Above Leftwards Arrow" + 10565 "Rightwards Arrow With Plus Below" + 10566 "Leftwards Arrow With Plus Below" + 10567 "Rightwards Arrow Through X" + 10568 "Left Right Arrow Through Small Circle" + 10569 "Upwards Two-Headed Arrow From Small Circle" + 10570 "Left Barb Up Right Barb Down Harpoon" + 10571 "Left Barb Down Right Barb Up Harpoon" + 10572 "Up Barb Right Down Barb Left Harpoon" + 10573 "Up Barb Left Down Barb Right Harpoon" + 10574 "Left Barb Up Right Barb Up Harpoon" + 10575 "Up Barb Right Down Barb Right Harpoon" + 10576 "Left Barb Down Right Barb Down Harpoon" + 10577 "Up Barb Left Down Barb Left Harpoon" + 10578 "Leftwards Harpoon With Barb Up To Bar" + 10579 "Rightwards Harpoon With Barb Up To Bar" + 10580 "Upwards Harpoon With Barb Right To Bar" + 10581 "Downwards Harpoon With Barb Right To Bar" + 10582 "Leftwards Harpoon With Barb Down To Bar" + 10583 "Rightwards Harpoon With Barb Down To Bar" + 10584 "Upwards Harpoon With Barb Left To Bar" + 10585 "Downwards Harpoon With Barb Left To Bar" + 10586 "Leftwards Harpoon With Barb Up From Bar" + 10587 "Rightwards Harpoon With Barb Up From Bar" + 10588 "Upwards Harpoon With Barb Right From Bar" + 10589 "Downwards Harpoon With Barb Right From Bar" + 10590 "Leftwards Harpoon With Barb Down From Bar" + 10591 "Rightwards Harpoon With Barb Down From Bar" + 10592 "Upwards Harpoon With Barb Left From Bar" + 10593 "Downwards Harpoon With Barb Left From Bar" + 10594 "Leftwards Harpoon With Barb Up Above Leftwards Harpoon With Barb Down" + 10595 "Upwards Harpoon With Barb Left Beside Upwards Harpoon With Barb Right" + 10596 "Rightwards Harpoon With Barb Up Above Rightwards Harpoon With Barb Down" + 10597 "Downwards Harpoon With Barb Left Beside Downwards Harpoon With Barb Right" + 10598 "Leftwards Harpoon With Barb Up Above Rightwards Harpoon With Barb Up" + 10599 "Leftwards Harpoon With Barb Down Above Rightwards Harpoon With Barb Down" + 10600 "Rightwards Harpoon With Barb Up Above Leftwards Harpoon With Barb Up" + 10601 "Rightwards Harpoon With Barb Down Above Leftwards Harpoon With Barb Down" + 10602 "Leftwards Harpoon With Barb Up Above Long Dash" + 10603 "Leftwards Harpoon With Barb Down Below Long Dash" + 10604 "Rightwards Harpoon With Barb Up Above Long Dash" + 10605 "Rightwards Harpoon With Barb Down Below Long Dash" + 10606 "Upwards Harpoon With Barb Left Beside Downwards Harpoon With Barb Right" + 10607 "Downwards Harpoon With Barb Left Beside Upwards Harpoon With Barb Right" + 10608 "Right Double Arrow With Rounded Head" + 10609 "Equals Sign Above Rightwards Arrow" + 10610 "Tilde Operator Above Rightwards Arrow" + 10611 "Leftwards Arrow Above Tilde Operator" + 10612 "Rightwards Arrow Above Tilde Operator" + 10613 "Rightwards Arrow Above Almost Equal To" + 10614 "Less-Than Above Leftwards Arrow" + 10615 "Leftwards Arrow Through Less-Than" + 10616 "Greater-Than Above Rightwards Arrow" + 10617 "Subset Above Rightwards Arrow" + 10618 "Leftwards Arrow Through Subset" + 10619 "Superset Above Leftwards Arrow" + 10620 "Left Fish Tail" + 10621 "Right Fish Tail" + 10622 "Up Fish Tail" + 10623 "Down Fish Tail" + 10624 "Triple Vertical Bar Delimiter" + 10625 "Z Notation Spot" + 10626 "Z Notation Type Colon" + 10627 "Left White Curly Bracket" + 10628 "Right White Curly Bracket" + 10629 "Left White Parenthesis" + 10630 "Right White Parenthesis" + 10631 "Z Notation Left Image Bracket" + 10632 "Z Notation Right Image Bracket" + 10633 "Z Notation Left Binding Bracket" + 10634 "Z Notation Right Binding Bracket" + 10635 "Left Square Bracket With Underbar" + 10636 "Right Square Bracket With Underbar" + 10637 "Left Square Bracket With Tick In Top Corner" + 10638 "Right Square Bracket With Tick In Bottom Corner" + 10639 "Left Square Bracket With Tick In Bottom Corner" + 10640 "Right Square Bracket With Tick In Top Corner" + 10641 "Left Angle Bracket With Dot" + 10642 "Right Angle Bracket With Dot" + 10643 "Left Arc Less-Than Bracket" + 10644 "Right Arc Greater-Than Bracket" + 10645 "Double Left Arc Greater-Than Bracket" + 10646 "Double Right Arc Less-Than Bracket" + 10647 "Left Black Tortoise Shell Bracket" + 10648 "Right Black Tortoise Shell Bracket" + 10649 "Dotted Fence" + 10650 "Vertical Zigzag Line" + 10651 "Measured Angle Opening Left" + 10652 "Right Angle Variant With Square" + 10653 "Measured Right Angle With Dot" + 10654 "Angle With S Inside" + 10655 "Acute Angle" + 10656 "Spherical Angle Opening Left" + 10657 "Spherical Angle Opening Up" + 10658 "Turned Angle" + 10659 "Reversed Angle" + 10660 "Angle With Underbar" + 10661 "Reversed Angle With Underbar" + 10662 "Oblique Angle Opening Up" + 10663 "Oblique Angle Opening Down" + 10664 "Measured Angle With Open Arm Ending In Arrow Pointing Up And Right" + 10665 "Measured Angle With Open Arm Ending In Arrow Pointing Up And Left" + 10666 "Measured Angle With Open Arm Ending In Arrow Pointing Down And Right" + 10667 "Measured Angle With Open Arm Ending In Arrow Pointing Down And Left" + 10668 "Measured Angle With Open Arm Ending In Arrow Pointing Right And Up" + 10669 "Measured Angle With Open Arm Ending In Arrow Pointing Left And Up" + 10670 "Measured Angle With Open Arm Ending In Arrow Pointing Right And Down" + 10671 "Measured Angle With Open Arm Ending In Arrow Pointing Left And Down" + 10672 "Reversed Empty Set" + 10673 "Empty Set With Overbar" + 10674 "Empty Set With Small Circle Above" + 10675 "Empty Set With Right Arrow Above" + 10676 "Empty Set With Left Arrow Above" + 10677 "Circle With Horizontal Bar" + 10678 "Circled Vertical Bar" + 10679 "Circled Parallel" + 10680 "Circled Reverse Solidus" + 10681 "Circled Perpendicular" + 10682 "Circle Divided By Horizontal Bar And Top Half Divided By Vertical Bar" + 10683 "Circle With Superimposed X" + 10684 "Circled Anticlockwise-Rotated Division Sign" + 10685 "Up Arrow Through Circle" + 10686 "Circled White Bullet" + 10687 "Circled Bullet" + 10688 "Circled Less-Than" + 10689 "Circled Greater-Than" + 10690 "Circle With Small Circle To The Right" + 10691 "Circle With Two Horizontal Strokes To The Right" + 10692 "Squared Rising Diagonal Slash" + 10693 "Squared Falling Diagonal Slash" + 10694 "Squared Asterisk" + 10695 "Squared Small Circle" + 10696 "Squared Square" + 10697 "Two Joined Squares" + 10698 "Triangle With Dot Above" + 10699 "Triangle With Underbar" + 10700 "S In Triangle" + 10701 "Triangle With Serifs At Bottom" + 10702 "Right Triangle Above Left Triangle" + 10703 "Left Triangle Beside Vertical Bar" + 10704 "Vertical Bar Beside Right Triangle" + 10705 "Bowtie With Left Half Black" + 10706 "Bowtie With Right Half Black" + 10707 "Black Bowtie" + 10708 "Times With Left Half Black" + 10709 "Times With Right Half Black" + 10710 "White Hourglass" + 10711 "Black Hourglass" + 10712 "Left Wiggly Fence" + 10713 "Right Wiggly Fence" + 10714 "Left Double Wiggly Fence" + 10715 "Right Double Wiggly Fence" + 10716 "Incomplete Infinity" + 10717 "Tie Over Infinity" + 10718 "Infinity Negated With Vertical Bar" + 10719 "Double-Ended Multimap" + 10720 "Square With Contoured Outline" + 10721 "Increases As" + 10722 "Shuffle Product" + 10723 "Equals Sign And Slanted Parallel" + 10724 "Equals Sign And Slanted Parallel With Tilde Above" + 10725 "Identical To And Slanted Parallel" + 10726 "Gleich Stark" + 10727 "Thermodynamic" + 10728 "Down-Pointing Triangle With Left Half Black" + 10729 "Down-Pointing Triangle With Right Half Black" + 10730 "Black Diamond With Down Arrow" + 10731 "Black Lozenge" + 10732 "White Circle With Down Arrow" + 10733 "Black Circle With Down Arrow" + 10734 "Error-Barred White Square" + 10735 "Error-Barred Black Square" + 10736 "Error-Barred White Diamond" + 10737 "Error-Barred Black Diamond" + 10738 "Error-Barred White Circle" + 10739 "Error-Barred Black Circle" + 10740 "Rule-Delayed" + 10741 "Reverse Solidus Operator" + 10742 "Solidus With Overbar" + 10743 "Reverse Solidus With Horizontal Stroke" + 10744 "Big Solidus" + 10745 "Big Reverse Solidus" + 10746 "Double Plus" + 10747 "Triple Plus" + 10748 "Left-Pointing Curved Angle Bracket" + 10749 "Right-Pointing Curved Angle Bracket" + 10750 "Tiny" + 10751 "Miny" + 10752 "N-Ary Circled Dot Operator" + 10753 "N-Ary Circled Plus Operator" + 10754 "N-Ary Circled Times Operator" + 10755 "N-Ary Union Operator With Dot" + 10756 "N-Ary Union Operator With Plus" + 10757 "N-Ary Square Intersection Operator" + 10758 "N-Ary Square Union Operator" + 10759 "Two Logical And Operator" + 10760 "Two Logical Or Operator" + 10761 "N-Ary Times Operator" + 10762 "Modulo Two Sum" + 10763 "Summation With Integral" + 10764 "Quadruple Integral Operator" + 10765 "Finite Part Integral" + 10766 "Integral With Double Stroke" + 10767 "Integral Average With Slash" + 10768 "Circulation Function" + 10769 "Anticlockwise Integration" + 10770 "Line Integration With Rectangular Path Around Pole" + 10771 "Line Integration With Semicircular Path Around Pole" + 10772 "Line Integration Not Including The Pole" + 10773 "Integral Around A Point Operator" + 10774 "Quaternion Integral Operator" + 10775 "Integral With Leftwards Arrow With Hook" + 10776 "Integral With Times Sign" + 10777 "Integral With Intersection" + 10778 "Integral With Union" + 10779 "Integral With Overbar" + 10780 "Integral With Underbar" + 10781 "Join" + 10782 "Large Left Triangle Operator" + 10783 "Z Notation Schema Composition" + 10784 "Z Notation Schema Piping" + 10785 "Z Notation Schema Projection" + 10786 "Plus Sign With Small Circle Above" + 10787 "Plus Sign With Circumflex Accent Above" + 10788 "Plus Sign With Tilde Above" + 10789 "Plus Sign With Dot Below" + 10790 "Plus Sign With Tilde Below" + 10791 "Plus Sign With Subscript Two" + 10792 "Plus Sign With Black Triangle" + 10793 "Minus Sign With Comma Above" + 10794 "Minus Sign With Dot Below" + 10795 "Minus Sign With Falling Dots" + 10796 "Minus Sign With Rising Dots" + 10797 "Plus Sign In Left Half Circle" + 10798 "Plus Sign In Right Half Circle" + 10799 "Vector Or Cross Product" + 10800 "Multiplication Sign With Dot Above" + 10801 "Multiplication Sign With Underbar" + 10802 "Semidirect Product With Bottom Closed" + 10803 "Smash Product" + 10804 "Multiplication Sign In Left Half Circle" + 10805 "Multiplication Sign In Right Half Circle" + 10806 "Circled Multiplication Sign With Circumflex Accent" + 10807 "Multiplication Sign In Double Circle" + 10808 "Circled Division Sign" + 10809 "Plus Sign In Triangle" + 10810 "Minus Sign In Triangle" + 10811 "Multiplication Sign In Triangle" + 10812 "Interior Product" + 10813 "Righthand Interior Product" + 10814 "Z Notation Relational Composition" + 10815 "Amalgamation Or Coproduct" + 10816 "Intersection With Dot" + 10817 "Union With Minus Sign" + 10818 "Union With Overbar" + 10819 "Intersection With Overbar" + 10820 "Intersection With Logical And" + 10821 "Union With Logical Or" + 10822 "Union Above Intersection" + 10823 "Intersection Above Union" + 10824 "Union Above Bar Above Intersection" + 10825 "Intersection Above Bar Above Union" + 10826 "Union Beside And Joined With Union" + 10827 "Intersection Beside And Joined With Intersection" + 10828 "Closed Union With Serifs" + 10829 "Closed Intersection With Serifs" + 10830 "Double Square Intersection" + 10831 "Double Square Union" + 10832 "Closed Union With Serifs And Smash Product" + 10833 "Logical And With Dot Above" + 10834 "Logical Or With Dot Above" + 10835 "Double Logical And" + 10836 "Double Logical Or" + 10837 "Two Intersecting Logical And" + 10838 "Two Intersecting Logical Or" + 10839 "Sloping Large Or" + 10840 "Sloping Large And" + 10841 "Logical Or Overlapping Logical And" + 10842 "Logical And With Middle Stem" + 10843 "Logical Or With Middle Stem" + 10844 "Logical And With Horizontal Dash" + 10845 "Logical Or With Horizontal Dash" + 10846 "Logical And With Double Overbar" + 10847 "Logical And With Underbar" + 10848 "Logical And With Double Underbar" + 10849 "Small Vee With Underbar" + 10850 "Logical Or With Double Overbar" + 10851 "Logical Or With Double Underbar" + 10852 "Z Notation Domain Antirestriction" + 10853 "Z Notation Range Antirestriction" + 10854 "Equals Sign With Dot Below" + 10855 "Identical With Dot Above" + 10856 "Triple Horizontal Bar With Double Vertical Stroke" + 10857 "Triple Horizontal Bar With Triple Vertical Stroke" + 10858 "Tilde Operator With Dot Above" + 10859 "Tilde Operator With Rising Dots" + 10860 "Similar Minus Similar" + 10861 "Congruent With Dot Above" + 10862 "Equals With Asterisk" + 10863 "Almost Equal To With Circumflex Accent" + 10864 "Approximately Equal Or Equal To" + 10865 "Equals Sign Above Plus Sign" + 10866 "Plus Sign Above Equals Sign" + 10867 "Equals Sign Above Tilde Operator" + 10868 "Double Colon Equal" + 10869 "Two Consecutive Equals Signs" + 10870 "Three Consecutive Equals Signs" + 10871 "Equals Sign With Two Dots Above And Two Dots Below" + 10872 "Equivalent With Four Dots Above" + 10873 "Less-Than With Circle Inside" + 10874 "Greater-Than With Circle Inside" + 10875 "Less-Than With Question Mark Above" + 10876 "Greater-Than With Question Mark Above" + 10877 "Less-Than Or Slanted Equal To" + 10878 "Greater-Than Or Slanted Equal To" + 10879 "Less-Than Or Slanted Equal To With Dot Inside" + 10880 "Greater-Than Or Slanted Equal To With Dot Inside" + 10881 "Less-Than Or Slanted Equal To With Dot Above" + 10882 "Greater-Than Or Slanted Equal To With Dot Above" + 10883 "Less-Than Or Slanted Equal To With Dot Above Right" + 10884 "Greater-Than Or Slanted Equal To With Dot Above Left" + 10885 "Less-Than Or Approximate" + 10886 "Greater-Than Or Approximate" + 10887 "Less-Than And Single-Line Not Equal To" + 10888 "Greater-Than And Single-Line Not Equal To" + 10889 "Less-Than And Not Approximate" + 10890 "Greater-Than And Not Approximate" + 10891 "Less-Than Above Double-Line Equal Above Greater-Than" + 10892 "Greater-Than Above Double-Line Equal Above Less-Than" + 10893 "Less-Than Above Similar Or Equal" + 10894 "Greater-Than Above Similar Or Equal" + 10895 "Less-Than Above Similar Above Greater-Than" + 10896 "Greater-Than Above Similar Above Less-Than" + 10897 "Less-Than Above Greater-Than Above Double-Line Equal" + 10898 "Greater-Than Above Less-Than Above Double-Line Equal" + 10899 "Less-Than Above Slanted Equal Above Greater-Than Above Slanted Equal" + 10900 "Greater-Than Above Slanted Equal Above Less-Than Above Slanted Equal" + 10901 "Slanted Equal To Or Less-Than" + 10902 "Slanted Equal To Or Greater-Than" + 10903 "Slanted Equal To Or Less-Than With Dot Inside" + 10904 "Slanted Equal To Or Greater-Than With Dot Inside" + 10905 "Double-Line Equal To Or Less-Than" + 10906 "Double-Line Equal To Or Greater-Than" + 10907 "Double-Line Slanted Equal To Or Less-Than" + 10908 "Double-Line Slanted Equal To Or Greater-Than" + 10909 "Similar Or Less-Than" + 10910 "Similar Or Greater-Than" + 10911 "Similar Above Less-Than Above Equals Sign" + 10912 "Similar Above Greater-Than Above Equals Sign" + 10913 "Double Nested Less-Than" + 10914 "Double Nested Greater-Than" + 10915 "Double Nested Less-Than With Underbar" + 10916 "Greater-Than Overlapping Less-Than" + 10917 "Greater-Than Beside Less-Than" + 10918 "Less-Than Closed By Curve" + 10919 "Greater-Than Closed By Curve" + 10920 "Less-Than Closed By Curve Above Slanted Equal" + 10921 "Greater-Than Closed By Curve Above Slanted Equal" + 10922 "Smaller Than" + 10923 "Larger Than" + 10924 "Smaller Than Or Equal To" + 10925 "Larger Than Or Equal To" + 10926 "Equals Sign With Bumpy Above" + 10927 "Precedes Above Single-Line Equals Sign" + 10928 "Succeeds Above Single-Line Equals Sign" + 10929 "Precedes Above Single-Line Not Equal To" + 10930 "Succeeds Above Single-Line Not Equal To" + 10931 "Precedes Above Equals Sign" + 10932 "Succeeds Above Equals Sign" + 10933 "Precedes Above Not Equal To" + 10934 "Succeeds Above Not Equal To" + 10935 "Precedes Above Almost Equal To" + 10936 "Succeeds Above Almost Equal To" + 10937 "Precedes Above Not Almost Equal To" + 10938 "Succeeds Above Not Almost Equal To" + 10939 "Double Precedes" + 10940 "Double Succeeds" + 10941 "Subset With Dot" + 10942 "Superset With Dot" + 10943 "Subset With Plus Sign Below" + 10944 "Superset With Plus Sign Below" + 10945 "Subset With Multiplication Sign Below" + 10946 "Superset With Multiplication Sign Below" + 10947 "Subset Of Or Equal To With Dot Above" + 10948 "Superset Of Or Equal To With Dot Above" + 10949 "Subset Of Above Equals Sign" + 10950 "Superset Of Above Equals Sign" + 10951 "Subset Of Above Tilde Operator" + 10952 "Superset Of Above Tilde Operator" + 10953 "Subset Of Above Almost Equal To" + 10954 "Superset Of Above Almost Equal To" + 10955 "Subset Of Above Not Equal To" + 10956 "Superset Of Above Not Equal To" + 10957 "Square Left Open Box Operator" + 10958 "Square Right Open Box Operator" + 10959 "Closed Subset" + 10960 "Closed Superset" + 10961 "Closed Subset Or Equal To" + 10962 "Closed Superset Or Equal To" + 10963 "Subset Above Superset" + 10964 "Superset Above Subset" + 10965 "Subset Above Subset" + 10966 "Superset Above Superset" + 10967 "Superset Beside Subset" + 10968 "Superset Beside And Joined By Dash With Subset" + 10969 "Element Of Opening Downwards" + 10970 "Pitchfork With Tee Top" + 10971 "Transversal Intersection" + 10972 "Forking" + 10973 "Nonforking" + 10974 "Short Left Tack" + 10975 "Short Down Tack" + 10976 "Short Up Tack" + 10977 "Perpendicular With S" + 10978 "Vertical Bar Triple Right Turnstile" + 10979 "Double Vertical Bar Left Turnstile" + 10980 "Vertical Bar Double Left Turnstile" + 10981 "Double Vertical Bar Double Left Turnstile" + 10982 "Long Dash From Left Member Of Double Vertical" + 10983 "Short Down Tack With Overbar" + 10984 "Short Up Tack With Underbar" + 10985 "Short Up Tack Above Short Down Tack" + 10986 "Double Down Tack" + 10987 "Double Up Tack" + 10988 "Double Stroke Not Sign" + 10989 "Reversed Double Stroke Not Sign" + 10990 "Does Not Divide With Reversed Negation Slash" + 10991 "Vertical Line With Circle Above" + 10992 "Vertical Line With Circle Below" + 10993 "Down Tack With Circle Below" + 10994 "Parallel With Horizontal Stroke" + 10995 "Parallel With Tilde Operator" + 10996 "Triple Vertical Bar Binary Relation" + 10997 "Triple Vertical Bar With Horizontal Stroke" + 10998 "Triple Colon Operator" + 10999 "Triple Nested Less-Than" + 11000 "Triple Nested Greater-Than" + 11001 "Double-Line Slanted Less-Than Or Equal To" + 11002 "Double-Line Slanted Greater-Than Or Equal To" + 11003 "Triple Solidus Binary Relation" + 11004 "Large Triple Vertical Bar Operator" + 11005 "Double Solidus Operator" + 11006 "White Vertical Bar" + 11007 "N-Ary White Vertical Bar" + 11008 "North East White Arrow" + 11009 "North West White Arrow" + 11010 "South East White Arrow" + 11011 "South West White Arrow" + 11012 "Left Right White Arrow" + 11013 "Leftwards Black Arrow" + 11014 "Upwards Black Arrow" + 11015 "Downwards Black Arrow" + 11016 "North East Black Arrow" + 11017 "North West Black Arrow" + 11018 "South East Black Arrow" + 11019 "South West Black Arrow" + 11020 "Left Right Black Arrow" + 11021 "Up Down Black Arrow" + 11022 "Rightwards Arrow With Tip Downwards" + 11023 "Rightwards Arrow With Tip Upwards" + 11024 "Leftwards Arrow With Tip Downwards" + 11025 "Leftwards Arrow With Tip Upwards" + 11026 "Square With Top Half Black" + 11027 "Square With Bottom Half Black" + 11028 "Square With Upper Right Diagonal Half Black" + 11029 "Square With Lower Left Diagonal Half Black" + 11030 "Diamond With Left Half Black" + 11031 "Diamond With Right Half Black" + 11032 "Diamond With Top Half Black" + 11033 "Diamond With Bottom Half Black" + 11034 "Dotted Square" + 11035 "Black Large Square" + 11036 "White Large Square" + 11037 "Black Very Small Square" + 11038 "White Very Small Square" + 11039 "Black Pentagon" + 11040 "White Pentagon" + 11041 "White Hexagon" + 11042 "Black Hexagon" + 11043 "Horizontal Black Hexagon" + 11044 "Black Large Circle" + 11045 "Black Medium Diamond" + 11046 "White Medium Diamond" + 11047 "Black Medium Lozenge" + 11048 "White Medium Lozenge" + 11049 "Black Small Diamond" + 11050 "Black Small Lozenge" + 11051 "White Small Lozenge" + 11052 "Black Horizontal Ellipse" + 11053 "White Horizontal Ellipse" + 11054 "Black Vertical Ellipse" + 11055 "White Vertical Ellipse" + 11056 "Left Arrow With Small Circle" + 11057 "Three Leftwards Arrows" + 11058 "Left Arrow With Circled Plus" + 11059 "Long Leftwards Squiggle Arrow" + 11060 "Leftwards Two-Headed Arrow With Vertical Stroke" + 11061 "Leftwards Two-Headed Arrow With Double Vertical Stroke" + 11062 "Leftwards Two-Headed Arrow From Bar" + 11063 "Leftwards Two-Headed Triple Dash Arrow" + 11064 "Leftwards Arrow With Dotted Stem" + 11065 "Leftwards Arrow With Tail With Vertical Stroke" + 11066 "Leftwards Arrow With Tail With Double Vertical Stroke" + 11067 "Leftwards Two-Headed Arrow With Tail" + 11068 "Leftwards Two-Headed Arrow With Tail With Vertical Stroke" + 11069 "Leftwards Two-Headed Arrow With Tail With Double Vertical Stroke" + 11070 "Leftwards Arrow Through X" + 11071 "Wave Arrow Pointing Directly Left" + 11072 "Equals Sign Above Leftwards Arrow" + 11073 "Reverse Tilde Operator Above Leftwards Arrow" + 11074 "Leftwards Arrow Above Reverse Almost Equal To" + 11075 "Rightwards Arrow Through Greater-Than" + 11076 "Rightwards Arrow Through Superset" + 11077 "Leftwards Quadruple Arrow" + 11078 "Rightwards Quadruple Arrow" + 11079 "Reverse Tilde Operator Above Rightwards Arrow" + 11080 "Rightwards Arrow Above Reverse Almost Equal To" + 11081 "Tilde Operator Above Leftwards Arrow" + 11082 "Leftwards Arrow Above Almost Equal To" + 11083 "Leftwards Arrow Above Reverse Tilde Operator" + 11084 "Rightwards Arrow Above Reverse Tilde Operator" + 11085 "Downwards Triangle-Headed Zigzag Arrow" + 11086 "Short Slanted North Arrow" + 11087 "Short Backslanted South Arrow" + 11088 "White Medium Star" + 11089 "Black Small Star" + 11090 "White Small Star" + 11091 "Black Right-Pointing Pentagon" + 11092 "White Right-Pointing Pentagon" + 11093 "Heavy Large Circle" + 11094 "Heavy Oval With Oval Inside" + 11095 "Heavy Circle With Circle Inside" + 11096 "Heavy Circle" + 11097 "Heavy Circled Saltire" + 11098 "Slanted North Arrow With Hooked Head" + 11099 "Backslanted South Arrow With Hooked Tail" + 11100 "Slanted North Arrow With Horizontal Tail" + 11101 "Backslanted South Arrow With Horizontal Tail" + 11102 "Bent Arrow Pointing Downwards Then North East" + 11103 "Short Bent Arrow Pointing Downwards Then North East" + 11104 "Leftwards Triangle-Headed Arrow" + 11105 "Upwards Triangle-Headed Arrow" + 11106 "Rightwards Triangle-Headed Arrow" + 11107 "Downwards Triangle-Headed Arrow" + 11108 "Left Right Triangle-Headed Arrow" + 11109 "Up Down Triangle-Headed Arrow" + 11110 "North West Triangle-Headed Arrow" + 11111 "North East Triangle-Headed Arrow" + 11112 "South East Triangle-Headed Arrow" + 11113 "South West Triangle-Headed Arrow" + 11114 "Leftwards Triangle-Headed Dashed Arrow" + 11115 "Upwards Triangle-Headed Dashed Arrow" + 11116 "Rightwards Triangle-Headed Dashed Arrow" + 11117 "Downwards Triangle-Headed Dashed Arrow" + 11118 "Clockwise Triangle-Headed Open Circle Arrow" + 11119 "Anticlockwise Triangle-Headed Open Circle Arrow" + 11120 "Leftwards Triangle-Headed Arrow To Bar" + 11121 "Upwards Triangle-Headed Arrow To Bar" + 11122 "Rightwards Triangle-Headed Arrow To Bar" + 11123 "Downwards Triangle-Headed Arrow To Bar" + 11126 "North West Triangle-Headed Arrow To Bar" + 11127 "North East Triangle-Headed Arrow To Bar" + 11128 "South East Triangle-Headed Arrow To Bar" + 11129 "South West Triangle-Headed Arrow To Bar" + 11130 "Leftwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11131 "Upwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11132 "Rightwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11133 "Downwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11134 "Horizontal Tab Key" + 11135 "Vertical Tab Key" + 11136 "Leftwards Triangle-Headed Arrow Over Rightwards Triangle-Headed Arrow" + 11137 "Upwards Triangle-Headed Arrow Leftwards Of Downwards Triangle-Headed Arrow" + 11138 "Rightwards Triangle-Headed Arrow Over Leftwards Triangle-Headed Arrow" + 11139 "Downwards Triangle-Headed Arrow Leftwards Of Upwards Triangle-Headed Arrow" + 11140 "Leftwards Triangle-Headed Paired Arrows" + 11141 "Upwards Triangle-Headed Paired Arrows" + 11142 "Rightwards Triangle-Headed Paired Arrows" + 11143 "Downwards Triangle-Headed Paired Arrows" + 11144 "Leftwards Black Circled White Arrow" + 11145 "Upwards Black Circled White Arrow" + 11146 "Rightwards Black Circled White Arrow" + 11147 "Downwards Black Circled White Arrow" + 11148 "Anticlockwise Triangle-Headed Right U-Shaped Arrow" + 11149 "Anticlockwise Triangle-Headed Bottom U-Shaped Arrow" + 11150 "Anticlockwise Triangle-Headed Left U-Shaped Arrow" + 11151 "Anticlockwise Triangle-Headed Top U-Shaped Arrow" + 11152 "Return Left" + 11153 "Return Right" + 11154 "Newline Left" + 11155 "Newline Right" + 11156 "Four Corner Arrows Circling Anticlockwise" + 11157 "Rightwards Black Arrow" + 11160 "Three-D Top-Lighted Leftwards Equilateral Arrowhead" + 11161 "Three-D Right-Lighted Upwards Equilateral Arrowhead" + 11162 "Three-D Top-Lighted Rightwards Equilateral Arrowhead" + 11163 "Three-D Left-Lighted Downwards Equilateral Arrowhead" + 11164 "Black Leftwards Equilateral Arrowhead" + 11165 "Black Upwards Equilateral Arrowhead" + 11166 "Black Rightwards Equilateral Arrowhead" + 11167 "Black Downwards Equilateral Arrowhead" + 11168 "Downwards Triangle-Headed Arrow With Long Tip Leftwards" + 11169 "Downwards Triangle-Headed Arrow With Long Tip Rightwards" + 11170 "Upwards Triangle-Headed Arrow With Long Tip Leftwards" + 11171 "Upwards Triangle-Headed Arrow With Long Tip Rightwards" + 11172 "Leftwards Triangle-Headed Arrow With Long Tip Upwards" + 11173 "Rightwards Triangle-Headed Arrow With Long Tip Upwards" + 11174 "Leftwards Triangle-Headed Arrow With Long Tip Downwards" + 11175 "Rightwards Triangle-Headed Arrow With Long Tip Downwards" + 11176 "Black Curved Downwards And Leftwards Arrow" + 11177 "Black Curved Downwards And Rightwards Arrow" + 11178 "Black Curved Upwards And Leftwards Arrow" + 11179 "Black Curved Upwards And Rightwards Arrow" + 11180 "Black Curved Leftwards And Upwards Arrow" + 11181 "Black Curved Rightwards And Upwards Arrow" + 11182 "Black Curved Leftwards And Downwards Arrow" + 11183 "Black Curved Rightwards And Downwards Arrow" + 11184 "Ribbon Arrow Down Left" + 11185 "Ribbon Arrow Down Right" + 11186 "Ribbon Arrow Up Left" + 11187 "Ribbon Arrow Up Right" + 11188 "Ribbon Arrow Left Up" + 11189 "Ribbon Arrow Right Up" + 11190 "Ribbon Arrow Left Down" + 11191 "Ribbon Arrow Right Down" + 11192 "Upwards White Arrow From Bar With Horizontal Bar" + 11193 "Up Arrowhead In A Rectangle Box" + 11197 "Ballot Box With Light X" + 11198 "Circled X" + 11199 "Circled Bold X" + 11200 "Black Square Centred" + 11201 "Black Diamond Centred" + 11202 "Turned Black Pentagon" + 11203 "Horizontal Black Octagon" + 11204 "Black Octagon" + 11205 "Black Medium Up-Pointing Triangle Centred" + 11206 "Black Medium Down-Pointing Triangle Centred" + 11207 "Black Medium Left-Pointing Triangle Centred" + 11208 "Black Medium Right-Pointing Triangle Centred" + 11210 "Top Half Black Circle" + 11211 "Bottom Half Black Circle" + 11212 "Light Four Pointed Black Cusp" + 11213 "Rotated Light Four Pointed Black Cusp" + 11214 "White Four Pointed Cusp" + 11215 "Rotated White Four Pointed Cusp" + 11216 "Square Position Indicator" + 11217 "Uncertainty Sign" + 11264 "Glagolitic Capital Letter Azu" + 11265 "Glagolitic Capital Letter Buky" + 11266 "Glagolitic Capital Letter Vede" + 11267 "Glagolitic Capital Letter Glagoli" + 11268 "Glagolitic Capital Letter Dobro" + 11269 "Glagolitic Capital Letter Yestu" + 11270 "Glagolitic Capital Letter Zhivete" + 11271 "Glagolitic Capital Letter Dzelo" + 11272 "Glagolitic Capital Letter Zemlja" + 11273 "Glagolitic Capital Letter Izhe" + 11274 "Glagolitic Capital Letter Initial Izhe" + 11275 "Glagolitic Capital Letter I" + 11276 "Glagolitic Capital Letter Djervi" + 11277 "Glagolitic Capital Letter Kako" + 11278 "Glagolitic Capital Letter Ljudije" + 11279 "Glagolitic Capital Letter Myslite" + 11280 "Glagolitic Capital Letter Nashi" + 11281 "Glagolitic Capital Letter Onu" + 11282 "Glagolitic Capital Letter Pokoji" + 11283 "Glagolitic Capital Letter Ritsi" + 11284 "Glagolitic Capital Letter Slovo" + 11285 "Glagolitic Capital Letter Tvrido" + 11286 "Glagolitic Capital Letter Uku" + 11287 "Glagolitic Capital Letter Fritu" + 11288 "Glagolitic Capital Letter Heru" + 11289 "Glagolitic Capital Letter Otu" + 11290 "Glagolitic Capital Letter Pe" + 11291 "Glagolitic Capital Letter Shta" + 11292 "Glagolitic Capital Letter Tsi" + 11293 "Glagolitic Capital Letter Chrivi" + 11294 "Glagolitic Capital Letter Sha" + 11295 "Glagolitic Capital Letter Yeru" + 11296 "Glagolitic Capital Letter Yeri" + 11297 "Glagolitic Capital Letter Yati" + 11298 "Glagolitic Capital Letter Spidery Ha" + 11299 "Glagolitic Capital Letter Yu" + 11300 "Glagolitic Capital Letter Small Yus" + 11301 "Glagolitic Capital Letter Small Yus With Tail" + 11302 "Glagolitic Capital Letter Yo" + 11303 "Glagolitic Capital Letter Iotated Small Yus" + 11304 "Glagolitic Capital Letter Big Yus" + 11305 "Glagolitic Capital Letter Iotated Big Yus" + 11306 "Glagolitic Capital Letter Fita" + 11307 "Glagolitic Capital Letter Izhitsa" + 11308 "Glagolitic Capital Letter Shtapic" + 11309 "Glagolitic Capital Letter Trokutasti A" + 11310 "Glagolitic Capital Letter Latinate Myslite" + 11312 "Glagolitic Small Letter Azu" + 11313 "Glagolitic Small Letter Buky" + 11314 "Glagolitic Small Letter Vede" + 11315 "Glagolitic Small Letter Glagoli" + 11316 "Glagolitic Small Letter Dobro" + 11317 "Glagolitic Small Letter Yestu" + 11318 "Glagolitic Small Letter Zhivete" + 11319 "Glagolitic Small Letter Dzelo" + 11320 "Glagolitic Small Letter Zemlja" + 11321 "Glagolitic Small Letter Izhe" + 11322 "Glagolitic Small Letter Initial Izhe" + 11323 "Glagolitic Small Letter I" + 11324 "Glagolitic Small Letter Djervi" + 11325 "Glagolitic Small Letter Kako" + 11326 "Glagolitic Small Letter Ljudije" + 11327 "Glagolitic Small Letter Myslite" + 11328 "Glagolitic Small Letter Nashi" + 11329 "Glagolitic Small Letter Onu" + 11330 "Glagolitic Small Letter Pokoji" + 11331 "Glagolitic Small Letter Ritsi" + 11332 "Glagolitic Small Letter Slovo" + 11333 "Glagolitic Small Letter Tvrido" + 11334 "Glagolitic Small Letter Uku" + 11335 "Glagolitic Small Letter Fritu" + 11336 "Glagolitic Small Letter Heru" + 11337 "Glagolitic Small Letter Otu" + 11338 "Glagolitic Small Letter Pe" + 11339 "Glagolitic Small Letter Shta" + 11340 "Glagolitic Small Letter Tsi" + 11341 "Glagolitic Small Letter Chrivi" + 11342 "Glagolitic Small Letter Sha" + 11343 "Glagolitic Small Letter Yeru" + 11344 "Glagolitic Small Letter Yeri" + 11345 "Glagolitic Small Letter Yati" + 11346 "Glagolitic Small Letter Spidery Ha" + 11347 "Glagolitic Small Letter Yu" + 11348 "Glagolitic Small Letter Small Yus" + 11349 "Glagolitic Small Letter Small Yus With Tail" + 11350 "Glagolitic Small Letter Yo" + 11351 "Glagolitic Small Letter Iotated Small Yus" + 11352 "Glagolitic Small Letter Big Yus" + 11353 "Glagolitic Small Letter Iotated Big Yus" + 11354 "Glagolitic Small Letter Fita" + 11355 "Glagolitic Small Letter Izhitsa" + 11356 "Glagolitic Small Letter Shtapic" + 11357 "Glagolitic Small Letter Trokutasti A" + 11358 "Glagolitic Small Letter Latinate Myslite" + 11360 "Latin Capital Letter L With Double Bar" + 11361 "Latin Small Letter L With Double Bar" + 11362 "Latin Capital Letter L With Middle Tilde" + 11363 "Latin Capital Letter P With Stroke" + 11364 "Latin Capital Letter R With Tail" + 11365 "Latin Small Letter A With Stroke" + 11366 "Latin Small Letter T With Diagonal Stroke" + 11367 "Latin Capital Letter H With Descender" + 11368 "Latin Small Letter H With Descender" + 11369 "Latin Capital Letter K With Descender" + 11370 "Latin Small Letter K With Descender" + 11371 "Latin Capital Letter Z With Descender" + 11372 "Latin Small Letter Z With Descender" + 11373 "Latin Capital Letter Alpha" + 11374 "Latin Capital Letter M With Hook" + 11375 "Latin Capital Letter Turned A" + 11376 "Latin Capital Letter Turned Alpha" + 11377 "Latin Small Letter V With Right Hook" + 11378 "Latin Capital Letter W With Hook" + 11379 "Latin Small Letter W With Hook" + 11380 "Latin Small Letter V With Curl" + 11381 "Latin Capital Letter Half H" + 11382 "Latin Small Letter Half H" + 11383 "Latin Small Letter Tailless Phi" + 11384 "Latin Small Letter E With Notch" + 11385 "Latin Small Letter Turned R With Tail" + 11386 "Latin Small Letter O With Low Ring Inside" + 11387 "Latin Letter Small Capital Turned E" + 11388 "Latin Subscript Small Letter J" + 11389 "Modifier Letter Capital V" + 11390 "Latin Capital Letter S With Swash Tail" + 11391 "Latin Capital Letter Z With Swash Tail" + 11392 "Coptic Capital Letter Alfa" + 11393 "Coptic Small Letter Alfa" + 11394 "Coptic Capital Letter Vida" + 11395 "Coptic Small Letter Vida" + 11396 "Coptic Capital Letter Gamma" + 11397 "Coptic Small Letter Gamma" + 11398 "Coptic Capital Letter Dalda" + 11399 "Coptic Small Letter Dalda" + 11400 "Coptic Capital Letter Eie" + 11401 "Coptic Small Letter Eie" + 11402 "Coptic Capital Letter Sou" + 11403 "Coptic Small Letter Sou" + 11404 "Coptic Capital Letter Zata" + 11405 "Coptic Small Letter Zata" + 11406 "Coptic Capital Letter Hate" + 11407 "Coptic Small Letter Hate" + 11408 "Coptic Capital Letter Thethe" + 11409 "Coptic Small Letter Thethe" + 11410 "Coptic Capital Letter Iauda" + 11411 "Coptic Small Letter Iauda" + 11412 "Coptic Capital Letter Kapa" + 11413 "Coptic Small Letter Kapa" + 11414 "Coptic Capital Letter Laula" + 11415 "Coptic Small Letter Laula" + 11416 "Coptic Capital Letter Mi" + 11417 "Coptic Small Letter Mi" + 11418 "Coptic Capital Letter Ni" + 11419 "Coptic Small Letter Ni" + 11420 "Coptic Capital Letter Ksi" + 11421 "Coptic Small Letter Ksi" + 11422 "Coptic Capital Letter O" + 11423 "Coptic Small Letter O" + 11424 "Coptic Capital Letter Pi" + 11425 "Coptic Small Letter Pi" + 11426 "Coptic Capital Letter Ro" + 11427 "Coptic Small Letter Ro" + 11428 "Coptic Capital Letter Sima" + 11429 "Coptic Small Letter Sima" + 11430 "Coptic Capital Letter Tau" + 11431 "Coptic Small Letter Tau" + 11432 "Coptic Capital Letter Ua" + 11433 "Coptic Small Letter Ua" + 11434 "Coptic Capital Letter Fi" + 11435 "Coptic Small Letter Fi" + 11436 "Coptic Capital Letter Khi" + 11437 "Coptic Small Letter Khi" + 11438 "Coptic Capital Letter Psi" + 11439 "Coptic Small Letter Psi" + 11440 "Coptic Capital Letter Oou" + 11441 "Coptic Small Letter Oou" + 11442 "Coptic Capital Letter Dialect-P Alef" + 11443 "Coptic Small Letter Dialect-P Alef" + 11444 "Coptic Capital Letter Old Coptic Ain" + 11445 "Coptic Small Letter Old Coptic Ain" + 11446 "Coptic Capital Letter Cryptogrammic Eie" + 11447 "Coptic Small Letter Cryptogrammic Eie" + 11448 "Coptic Capital Letter Dialect-P Kapa" + 11449 "Coptic Small Letter Dialect-P Kapa" + 11450 "Coptic Capital Letter Dialect-P Ni" + 11451 "Coptic Small Letter Dialect-P Ni" + 11452 "Coptic Capital Letter Cryptogrammic Ni" + 11453 "Coptic Small Letter Cryptogrammic Ni" + 11454 "Coptic Capital Letter Old Coptic Oou" + 11455 "Coptic Small Letter Old Coptic Oou" + 11456 "Coptic Capital Letter Sampi" + 11457 "Coptic Small Letter Sampi" + 11458 "Coptic Capital Letter Crossed Shei" + 11459 "Coptic Small Letter Crossed Shei" + 11460 "Coptic Capital Letter Old Coptic Shei" + 11461 "Coptic Small Letter Old Coptic Shei" + 11462 "Coptic Capital Letter Old Coptic Esh" + 11463 "Coptic Small Letter Old Coptic Esh" + 11464 "Coptic Capital Letter Akhmimic Khei" + 11465 "Coptic Small Letter Akhmimic Khei" + 11466 "Coptic Capital Letter Dialect-P Hori" + 11467 "Coptic Small Letter Dialect-P Hori" + 11468 "Coptic Capital Letter Old Coptic Hori" + 11469 "Coptic Small Letter Old Coptic Hori" + 11470 "Coptic Capital Letter Old Coptic Ha" + 11471 "Coptic Small Letter Old Coptic Ha" + 11472 "Coptic Capital Letter L-Shaped Ha" + 11473 "Coptic Small Letter L-Shaped Ha" + 11474 "Coptic Capital Letter Old Coptic Hei" + 11475 "Coptic Small Letter Old Coptic Hei" + 11476 "Coptic Capital Letter Old Coptic Hat" + 11477 "Coptic Small Letter Old Coptic Hat" + 11478 "Coptic Capital Letter Old Coptic Gangia" + 11479 "Coptic Small Letter Old Coptic Gangia" + 11480 "Coptic Capital Letter Old Coptic Dja" + 11481 "Coptic Small Letter Old Coptic Dja" + 11482 "Coptic Capital Letter Old Coptic Shima" + 11483 "Coptic Small Letter Old Coptic Shima" + 11484 "Coptic Capital Letter Old Nubian Shima" + 11485 "Coptic Small Letter Old Nubian Shima" + 11486 "Coptic Capital Letter Old Nubian Ngi" + 11487 "Coptic Small Letter Old Nubian Ngi" + 11488 "Coptic Capital Letter Old Nubian Nyi" + 11489 "Coptic Small Letter Old Nubian Nyi" + 11490 "Coptic Capital Letter Old Nubian Wau" + 11491 "Coptic Small Letter Old Nubian Wau" + 11492 "Coptic Symbol Kai" + 11493 "Coptic Symbol Mi Ro" + 11494 "Coptic Symbol Pi Ro" + 11495 "Coptic Symbol Stauros" + 11496 "Coptic Symbol Tau Ro" + 11497 "Coptic Symbol Khi Ro" + 11498 "Coptic Symbol Shima Sima" + 11499 "Coptic Capital Letter Cryptogrammic Shei" + 11500 "Coptic Small Letter Cryptogrammic Shei" + 11501 "Coptic Capital Letter Cryptogrammic Gangia" + 11502 "Coptic Small Letter Cryptogrammic Gangia" + 11503 "Coptic Combining Ni Above" + 11504 "Coptic Combining Spiritus Asper" + 11505 "Coptic Combining Spiritus Lenis" + 11506 "Coptic Capital Letter Bohairic Khei" + 11507 "Coptic Small Letter Bohairic Khei" + 11513 "Coptic Old Nubian Full Stop" + 11514 "Coptic Old Nubian Direct Question Mark" + 11515 "Coptic Old Nubian Indirect Question Mark" + 11516 "Coptic Old Nubian Verse Divider" + 11517 "Coptic Fraction One Half" + 11518 "Coptic Full Stop" + 11519 "Coptic Morphological Divider" + 11520 "Georgian Small Letter An" + 11521 "Georgian Small Letter Ban" + 11522 "Georgian Small Letter Gan" + 11523 "Georgian Small Letter Don" + 11524 "Georgian Small Letter En" + 11525 "Georgian Small Letter Vin" + 11526 "Georgian Small Letter Zen" + 11527 "Georgian Small Letter Tan" + 11528 "Georgian Small Letter In" + 11529 "Georgian Small Letter Kan" + 11530 "Georgian Small Letter Las" + 11531 "Georgian Small Letter Man" + 11532 "Georgian Small Letter Nar" + 11533 "Georgian Small Letter On" + 11534 "Georgian Small Letter Par" + 11535 "Georgian Small Letter Zhar" + 11536 "Georgian Small Letter Rae" + 11537 "Georgian Small Letter San" + 11538 "Georgian Small Letter Tar" + 11539 "Georgian Small Letter Un" + 11540 "Georgian Small Letter Phar" + 11541 "Georgian Small Letter Khar" + 11542 "Georgian Small Letter Ghan" + 11543 "Georgian Small Letter Qar" + 11544 "Georgian Small Letter Shin" + 11545 "Georgian Small Letter Chin" + 11546 "Georgian Small Letter Can" + 11547 "Georgian Small Letter Jil" + 11548 "Georgian Small Letter Cil" + 11549 "Georgian Small Letter Char" + 11550 "Georgian Small Letter Xan" + 11551 "Georgian Small Letter Jhan" + 11552 "Georgian Small Letter Hae" + 11553 "Georgian Small Letter He" + 11554 "Georgian Small Letter Hie" + 11555 "Georgian Small Letter We" + 11556 "Georgian Small Letter Har" + 11557 "Georgian Small Letter Hoe" + 11559 "Georgian Small Letter Yn" + 11565 "Georgian Small Letter Aen" + 11568 "Tifinagh Letter Ya" + 11569 "Tifinagh Letter Yab" + 11570 "Tifinagh Letter Yabh" + 11571 "Tifinagh Letter Yag" + 11572 "Tifinagh Letter Yaghh" + 11573 "Tifinagh Letter Berber Academy Yaj" + 11574 "Tifinagh Letter Yaj" + 11575 "Tifinagh Letter Yad" + 11576 "Tifinagh Letter Yadh" + 11577 "Tifinagh Letter Yadd" + 11578 "Tifinagh Letter Yaddh" + 11579 "Tifinagh Letter Yey" + 11580 "Tifinagh Letter Yaf" + 11581 "Tifinagh Letter Yak" + 11582 "Tifinagh Letter Tuareg Yak" + 11583 "Tifinagh Letter Yakhh" + 11584 "Tifinagh Letter Yah" + 11585 "Tifinagh Letter Berber Academy Yah" + 11586 "Tifinagh Letter Tuareg Yah" + 11587 "Tifinagh Letter Yahh" + 11588 "Tifinagh Letter Yaa" + 11589 "Tifinagh Letter Yakh" + 11590 "Tifinagh Letter Tuareg Yakh" + 11591 "Tifinagh Letter Yaq" + 11592 "Tifinagh Letter Tuareg Yaq" + 11593 "Tifinagh Letter Yi" + 11594 "Tifinagh Letter Yazh" + 11595 "Tifinagh Letter Ahaggar Yazh" + 11596 "Tifinagh Letter Tuareg Yazh" + 11597 "Tifinagh Letter Yal" + 11598 "Tifinagh Letter Yam" + 11599 "Tifinagh Letter Yan" + 11600 "Tifinagh Letter Tuareg Yagn" + 11601 "Tifinagh Letter Tuareg Yang" + 11602 "Tifinagh Letter Yap" + 11603 "Tifinagh Letter Yu" + 11604 "Tifinagh Letter Yar" + 11605 "Tifinagh Letter Yarr" + 11606 "Tifinagh Letter Yagh" + 11607 "Tifinagh Letter Tuareg Yagh" + 11608 "Tifinagh Letter Ayer Yagh" + 11609 "Tifinagh Letter Yas" + 11610 "Tifinagh Letter Yass" + 11611 "Tifinagh Letter Yash" + 11612 "Tifinagh Letter Yat" + 11613 "Tifinagh Letter Yath" + 11614 "Tifinagh Letter Yach" + 11615 "Tifinagh Letter Yatt" + 11616 "Tifinagh Letter Yav" + 11617 "Tifinagh Letter Yaw" + 11618 "Tifinagh Letter Yay" + 11619 "Tifinagh Letter Yaz" + 11620 "Tifinagh Letter Tawellemet Yaz" + 11621 "Tifinagh Letter Yazz" + 11622 "Tifinagh Letter Ye" + 11623 "Tifinagh Letter Yo" + 11631 "Tifinagh Modifier Letter Labialization Mark" + 11632 "Tifinagh Separator Mark" + 11647 "Tifinagh Consonant Joiner" + 11648 "Ethiopic Syllable Loa" + 11649 "Ethiopic Syllable Moa" + 11650 "Ethiopic Syllable Roa" + 11651 "Ethiopic Syllable Soa" + 11652 "Ethiopic Syllable Shoa" + 11653 "Ethiopic Syllable Boa" + 11654 "Ethiopic Syllable Toa" + 11655 "Ethiopic Syllable Coa" + 11656 "Ethiopic Syllable Noa" + 11657 "Ethiopic Syllable Nyoa" + 11658 "Ethiopic Syllable Glottal Oa" + 11659 "Ethiopic Syllable Zoa" + 11660 "Ethiopic Syllable Doa" + 11661 "Ethiopic Syllable Ddoa" + 11662 "Ethiopic Syllable Joa" + 11663 "Ethiopic Syllable Thoa" + 11664 "Ethiopic Syllable Choa" + 11665 "Ethiopic Syllable Phoa" + 11666 "Ethiopic Syllable Poa" + 11667 "Ethiopic Syllable Ggwa" + 11668 "Ethiopic Syllable Ggwi" + 11669 "Ethiopic Syllable Ggwee" + 11670 "Ethiopic Syllable Ggwe" + 11680 "Ethiopic Syllable Ssa" + 11681 "Ethiopic Syllable Ssu" + 11682 "Ethiopic Syllable Ssi" + 11683 "Ethiopic Syllable Ssaa" + 11684 "Ethiopic Syllable Ssee" + 11685 "Ethiopic Syllable Sse" + 11686 "Ethiopic Syllable Sso" + 11688 "Ethiopic Syllable Cca" + 11689 "Ethiopic Syllable Ccu" + 11690 "Ethiopic Syllable Cci" + 11691 "Ethiopic Syllable Ccaa" + 11692 "Ethiopic Syllable Ccee" + 11693 "Ethiopic Syllable Cce" + 11694 "Ethiopic Syllable Cco" + 11696 "Ethiopic Syllable Zza" + 11697 "Ethiopic Syllable Zzu" + 11698 "Ethiopic Syllable Zzi" + 11699 "Ethiopic Syllable Zzaa" + 11700 "Ethiopic Syllable Zzee" + 11701 "Ethiopic Syllable Zze" + 11702 "Ethiopic Syllable Zzo" + 11704 "Ethiopic Syllable Ccha" + 11705 "Ethiopic Syllable Cchu" + 11706 "Ethiopic Syllable Cchi" + 11707 "Ethiopic Syllable Cchaa" + 11708 "Ethiopic Syllable Cchee" + 11709 "Ethiopic Syllable Cche" + 11710 "Ethiopic Syllable Ccho" + 11712 "Ethiopic Syllable Qya" + 11713 "Ethiopic Syllable Qyu" + 11714 "Ethiopic Syllable Qyi" + 11715 "Ethiopic Syllable Qyaa" + 11716 "Ethiopic Syllable Qyee" + 11717 "Ethiopic Syllable Qye" + 11718 "Ethiopic Syllable Qyo" + 11720 "Ethiopic Syllable Kya" + 11721 "Ethiopic Syllable Kyu" + 11722 "Ethiopic Syllable Kyi" + 11723 "Ethiopic Syllable Kyaa" + 11724 "Ethiopic Syllable Kyee" + 11725 "Ethiopic Syllable Kye" + 11726 "Ethiopic Syllable Kyo" + 11728 "Ethiopic Syllable Xya" + 11729 "Ethiopic Syllable Xyu" + 11730 "Ethiopic Syllable Xyi" + 11731 "Ethiopic Syllable Xyaa" + 11732 "Ethiopic Syllable Xyee" + 11733 "Ethiopic Syllable Xye" + 11734 "Ethiopic Syllable Xyo" + 11736 "Ethiopic Syllable Gya" + 11737 "Ethiopic Syllable Gyu" + 11738 "Ethiopic Syllable Gyi" + 11739 "Ethiopic Syllable Gyaa" + 11740 "Ethiopic Syllable Gyee" + 11741 "Ethiopic Syllable Gye" + 11742 "Ethiopic Syllable Gyo" + 11744 "Combining Cyrillic Letter Be" + 11745 "Combining Cyrillic Letter Ve" + 11746 "Combining Cyrillic Letter Ghe" + 11747 "Combining Cyrillic Letter De" + 11748 "Combining Cyrillic Letter Zhe" + 11749 "Combining Cyrillic Letter Ze" + 11750 "Combining Cyrillic Letter Ka" + 11751 "Combining Cyrillic Letter El" + 11752 "Combining Cyrillic Letter Em" + 11753 "Combining Cyrillic Letter En" + 11754 "Combining Cyrillic Letter O" + 11755 "Combining Cyrillic Letter Pe" + 11756 "Combining Cyrillic Letter Er" + 11757 "Combining Cyrillic Letter Es" + 11758 "Combining Cyrillic Letter Te" + 11759 "Combining Cyrillic Letter Ha" + 11760 "Combining Cyrillic Letter Tse" + 11761 "Combining Cyrillic Letter Che" + 11762 "Combining Cyrillic Letter Sha" + 11763 "Combining Cyrillic Letter Shcha" + 11764 "Combining Cyrillic Letter Fita" + 11765 "Combining Cyrillic Letter Es-Te" + 11766 "Combining Cyrillic Letter A" + 11767 "Combining Cyrillic Letter Ie" + 11768 "Combining Cyrillic Letter Djerv" + 11769 "Combining Cyrillic Letter Monograph Uk" + 11770 "Combining Cyrillic Letter Yat" + 11771 "Combining Cyrillic Letter Yu" + 11772 "Combining Cyrillic Letter Iotified A" + 11773 "Combining Cyrillic Letter Little Yus" + 11774 "Combining Cyrillic Letter Big Yus" + 11775 "Combining Cyrillic Letter Iotified Big Yus" + 11776 "Right Angle Substitution Marker" + 11777 "Right Angle Dotted Substitution Marker" + 11778 "Left Substitution Bracket" + 11779 "Right Substitution Bracket" + 11780 "Left Dotted Substitution Bracket" + 11781 "Right Dotted Substitution Bracket" + 11782 "Raised Interpolation Marker" + 11783 "Raised Dotted Interpolation Marker" + 11784 "Dotted Transposition Marker" + 11785 "Left Transposition Bracket" + 11786 "Right Transposition Bracket" + 11787 "Raised Square" + 11788 "Left Raised Omission Bracket" + 11789 "Right Raised Omission Bracket" + 11790 "Editorial Coronis" + 11791 "Paragraphos" + 11792 "Forked Paragraphos" + 11793 "Reversed Forked Paragraphos" + 11794 "Hypodiastole" + 11795 "Dotted Obelos" + 11796 "Downwards Ancora" + 11797 "Upwards Ancora" + 11798 "Dotted Right-Pointing Angle" + 11799 "Double Oblique Hyphen" + 11800 "Inverted Interrobang" + 11801 "Palm Branch" + 11802 "Hyphen With Diaeresis" + 11803 "Tilde With Ring Above" + 11804 "Left Low Paraphrase Bracket" + 11805 "Right Low Paraphrase Bracket" + 11806 "Tilde With Dot Above" + 11807 "Tilde With Dot Below" + 11808 "Left Vertical Bar With Quill" + 11809 "Right Vertical Bar With Quill" + 11810 "Top Left Half Bracket" + 11811 "Top Right Half Bracket" + 11812 "Bottom Left Half Bracket" + 11813 "Bottom Right Half Bracket" + 11814 "Left Sideways U Bracket" + 11815 "Right Sideways U Bracket" + 11816 "Left Double Parenthesis" + 11817 "Right Double Parenthesis" + 11818 "Two Dots Over One Dot Punctuation" + 11819 "One Dot Over Two Dots Punctuation" + 11820 "Squared Four Dot Punctuation" + 11821 "Five Dot Mark" + 11822 "Reversed Question Mark" + 11823 "Vertical Tilde" + 11824 "Ring Point" + 11825 "Word Separator Middle Dot" + 11826 "Turned Comma" + 11827 "Raised Dot" + 11828 "Raised Comma" + 11829 "Turned Semicolon" + 11830 "Dagger With Left Guard" + 11831 "Dagger With Right Guard" + 11832 "Turned Dagger" + 11833 "Top Half Section Sign" + 11834 "Two-Em Dash" + 11835 "Three-Em Dash" + 11836 "Stenographic Full Stop" + 11837 "Vertical Six Dots" + 11838 "Wiggly Vertical Line" + 11839 "Capitulum" + 11840 "Double Hyphen" + 11841 "Reversed Comma" + 11842 "Double Low-Reversed-9 Quotation Mark" + 11904 "CJK Radical Repeat" + 11905 "CJK Radical Cliff" + 11906 "CJK Radical Second One" + 11907 "CJK Radical Second Two" + 11908 "CJK Radical Second Three" + 11909 "CJK Radical Person" + 11910 "CJK Radical Box" + 11911 "CJK Radical Table" + 11912 "CJK Radical Knife One" + 11913 "CJK Radical Knife Two" + 11914 "CJK Radical Divination" + 11915 "CJK Radical Seal" + 11916 "CJK Radical Small One" + 11917 "CJK Radical Small Two" + 11918 "CJK Radical Lame One" + 11919 "CJK Radical Lame Two" + 11920 "CJK Radical Lame Three" + 11921 "CJK Radical Lame Four" + 11922 "CJK Radical Snake" + 11923 "CJK Radical Thread" + 11924 "CJK Radical Snout One" + 11925 "CJK Radical Snout Two" + 11926 "CJK Radical Heart One" + 11927 "CJK Radical Heart Two" + 11928 "CJK Radical Hand" + 11929 "CJK Radical Rap" + 11931 "CJK Radical Choke" + 11932 "CJK Radical Sun" + 11933 "CJK Radical Moon" + 11934 "CJK Radical Death" + 11935 "CJK Radical Mother" + 11936 "CJK Radical Civilian" + 11937 "CJK Radical Water One" + 11938 "CJK Radical Water Two" + 11939 "CJK Radical Fire" + 11940 "CJK Radical Paw One" + 11941 "CJK Radical Paw Two" + 11942 "CJK Radical Simplified Half Tree Trunk" + 11943 "CJK Radical Cow" + 11944 "CJK Radical Dog" + 11945 "CJK Radical Jade" + 11946 "CJK Radical Bolt Of Cloth" + 11947 "CJK Radical Eye" + 11948 "CJK Radical Spirit One" + 11949 "CJK Radical Spirit Two" + 11950 "CJK Radical Bamboo" + 11951 "CJK Radical Silk" + 11952 "CJK Radical C-Simplified Silk" + 11953 "CJK Radical Net One" + 11954 "CJK Radical Net Two" + 11955 "CJK Radical Net Three" + 11956 "CJK Radical Net Four" + 11957 "CJK Radical Mesh" + 11958 "CJK Radical Sheep" + 11959 "CJK Radical Ram" + 11960 "CJK Radical Ewe" + 11961 "CJK Radical Old" + 11962 "CJK Radical Brush One" + 11963 "CJK Radical Brush Two" + 11964 "CJK Radical Meat" + 11965 "CJK Radical Mortar" + 11966 "CJK Radical Grass One" + 11967 "CJK Radical Grass Two" + 11968 "CJK Radical Grass Three" + 11969 "CJK Radical Tiger" + 11970 "CJK Radical Clothes" + 11971 "CJK Radical West One" + 11972 "CJK Radical West Two" + 11973 "CJK Radical C-Simplified See" + 11974 "CJK Radical Simplified Horn" + 11975 "CJK Radical Horn" + 11976 "CJK Radical C-Simplified Speech" + 11977 "CJK Radical C-Simplified Shell" + 11978 "CJK Radical Foot" + 11979 "CJK Radical C-Simplified Cart" + 11980 "CJK Radical Simplified Walk" + 11981 "CJK Radical Walk One" + 11982 "CJK Radical Walk Two" + 11983 "CJK Radical City" + 11984 "CJK Radical C-Simplified Gold" + 11985 "CJK Radical Long One" + 11986 "CJK Radical Long Two" + 11987 "CJK Radical C-Simplified Long" + 11988 "CJK Radical C-Simplified Gate" + 11989 "CJK Radical Mound One" + 11990 "CJK Radical Mound Two" + 11991 "CJK Radical Rain" + 11992 "CJK Radical Blue" + 11993 "CJK Radical C-Simplified Tanned Leather" + 11994 "CJK Radical C-Simplified Leaf" + 11995 "CJK Radical C-Simplified Wind" + 11996 "CJK Radical C-Simplified Fly" + 11997 "CJK Radical Eat One" + 11998 "CJK Radical Eat Two" + 11999 "CJK Radical Eat Three" + 12000 "CJK Radical C-Simplified Eat" + 12001 "CJK Radical Head" + 12002 "CJK Radical C-Simplified Horse" + 12003 "CJK Radical Bone" + 12004 "CJK Radical Ghost" + 12005 "CJK Radical C-Simplified Fish" + 12006 "CJK Radical C-Simplified Bird" + 12007 "CJK Radical C-Simplified Salt" + 12008 "CJK Radical Simplified Wheat" + 12009 "CJK Radical Simplified Yellow" + 12010 "CJK Radical C-Simplified Frog" + 12011 "CJK Radical J-Simplified Even" + 12012 "CJK Radical C-Simplified Even" + 12013 "CJK Radical J-Simplified Tooth" + 12014 "CJK Radical C-Simplified Tooth" + 12015 "CJK Radical J-Simplified Dragon" + 12016 "CJK Radical C-Simplified Dragon" + 12017 "CJK Radical Turtle" + 12018 "CJK Radical J-Simplified Turtle" + 12019 "CJK Radical C-Simplified Turtle" + 12032 "Kangxi Radical One" + 12033 "Kangxi Radical Line" + 12034 "Kangxi Radical Dot" + 12035 "Kangxi Radical Slash" + 12036 "Kangxi Radical Second" + 12037 "Kangxi Radical Hook" + 12038 "Kangxi Radical Two" + 12039 "Kangxi Radical Lid" + 12040 "Kangxi Radical Man" + 12041 "Kangxi Radical Legs" + 12042 "Kangxi Radical Enter" + 12043 "Kangxi Radical Eight" + 12044 "Kangxi Radical Down Box" + 12045 "Kangxi Radical Cover" + 12046 "Kangxi Radical Ice" + 12047 "Kangxi Radical Table" + 12048 "Kangxi Radical Open Box" + 12049 "Kangxi Radical Knife" + 12050 "Kangxi Radical Power" + 12051 "Kangxi Radical Wrap" + 12052 "Kangxi Radical Spoon" + 12053 "Kangxi Radical Right Open Box" + 12054 "Kangxi Radical Hiding Enclosure" + 12055 "Kangxi Radical Ten" + 12056 "Kangxi Radical Divination" + 12057 "Kangxi Radical Seal" + 12058 "Kangxi Radical Cliff" + 12059 "Kangxi Radical Private" + 12060 "Kangxi Radical Again" + 12061 "Kangxi Radical Mouth" + 12062 "Kangxi Radical Enclosure" + 12063 "Kangxi Radical Earth" + 12064 "Kangxi Radical Scholar" + 12065 "Kangxi Radical Go" + 12066 "Kangxi Radical Go Slowly" + 12067 "Kangxi Radical Evening" + 12068 "Kangxi Radical Big" + 12069 "Kangxi Radical Woman" + 12070 "Kangxi Radical Child" + 12071 "Kangxi Radical Roof" + 12072 "Kangxi Radical Inch" + 12073 "Kangxi Radical Small" + 12074 "Kangxi Radical Lame" + 12075 "Kangxi Radical Corpse" + 12076 "Kangxi Radical Sprout" + 12077 "Kangxi Radical Mountain" + 12078 "Kangxi Radical River" + 12079 "Kangxi Radical Work" + 12080 "Kangxi Radical Oneself" + 12081 "Kangxi Radical Turban" + 12082 "Kangxi Radical Dry" + 12083 "Kangxi Radical Short Thread" + 12084 "Kangxi Radical Dotted Cliff" + 12085 "Kangxi Radical Long Stride" + 12086 "Kangxi Radical Two Hands" + 12087 "Kangxi Radical Shoot" + 12088 "Kangxi Radical Bow" + 12089 "Kangxi Radical Snout" + 12090 "Kangxi Radical Bristle" + 12091 "Kangxi Radical Step" + 12092 "Kangxi Radical Heart" + 12093 "Kangxi Radical Halberd" + 12094 "Kangxi Radical Door" + 12095 "Kangxi Radical Hand" + 12096 "Kangxi Radical Branch" + 12097 "Kangxi Radical Rap" + 12098 "Kangxi Radical Script" + 12099 "Kangxi Radical Dipper" + 12100 "Kangxi Radical Axe" + 12101 "Kangxi Radical Square" + 12102 "Kangxi Radical Not" + 12103 "Kangxi Radical Sun" + 12104 "Kangxi Radical Say" + 12105 "Kangxi Radical Moon" + 12106 "Kangxi Radical Tree" + 12107 "Kangxi Radical Lack" + 12108 "Kangxi Radical Stop" + 12109 "Kangxi Radical Death" + 12110 "Kangxi Radical Weapon" + 12111 "Kangxi Radical Do Not" + 12112 "Kangxi Radical Compare" + 12113 "Kangxi Radical Fur" + 12114 "Kangxi Radical Clan" + 12115 "Kangxi Radical Steam" + 12116 "Kangxi Radical Water" + 12117 "Kangxi Radical Fire" + 12118 "Kangxi Radical Claw" + 12119 "Kangxi Radical Father" + 12120 "Kangxi Radical Double X" + 12121 "Kangxi Radical Half Tree Trunk" + 12122 "Kangxi Radical Slice" + 12123 "Kangxi Radical Fang" + 12124 "Kangxi Radical Cow" + 12125 "Kangxi Radical Dog" + 12126 "Kangxi Radical Profound" + 12127 "Kangxi Radical Jade" + 12128 "Kangxi Radical Melon" + 12129 "Kangxi Radical Tile" + 12130 "Kangxi Radical Sweet" + 12131 "Kangxi Radical Life" + 12132 "Kangxi Radical Use" + 12133 "Kangxi Radical Field" + 12134 "Kangxi Radical Bolt Of Cloth" + 12135 "Kangxi Radical Sickness" + 12136 "Kangxi Radical Dotted Tent" + 12137 "Kangxi Radical White" + 12138 "Kangxi Radical Skin" + 12139 "Kangxi Radical Dish" + 12140 "Kangxi Radical Eye" + 12141 "Kangxi Radical Spear" + 12142 "Kangxi Radical Arrow" + 12143 "Kangxi Radical Stone" + 12144 "Kangxi Radical Spirit" + 12145 "Kangxi Radical Track" + 12146 "Kangxi Radical Grain" + 12147 "Kangxi Radical Cave" + 12148 "Kangxi Radical Stand" + 12149 "Kangxi Radical Bamboo" + 12150 "Kangxi Radical Rice" + 12151 "Kangxi Radical Silk" + 12152 "Kangxi Radical Jar" + 12153 "Kangxi Radical Net" + 12154 "Kangxi Radical Sheep" + 12155 "Kangxi Radical Feather" + 12156 "Kangxi Radical Old" + 12157 "Kangxi Radical And" + 12158 "Kangxi Radical Plow" + 12159 "Kangxi Radical Ear" + 12160 "Kangxi Radical Brush" + 12161 "Kangxi Radical Meat" + 12162 "Kangxi Radical Minister" + 12163 "Kangxi Radical Self" + 12164 "Kangxi Radical Arrive" + 12165 "Kangxi Radical Mortar" + 12166 "Kangxi Radical Tongue" + 12167 "Kangxi Radical Oppose" + 12168 "Kangxi Radical Boat" + 12169 "Kangxi Radical Stopping" + 12170 "Kangxi Radical Color" + 12171 "Kangxi Radical Grass" + 12172 "Kangxi Radical Tiger" + 12173 "Kangxi Radical Insect" + 12174 "Kangxi Radical Blood" + 12175 "Kangxi Radical Walk Enclosure" + 12176 "Kangxi Radical Clothes" + 12177 "Kangxi Radical West" + 12178 "Kangxi Radical See" + 12179 "Kangxi Radical Horn" + 12180 "Kangxi Radical Speech" + 12181 "Kangxi Radical Valley" + 12182 "Kangxi Radical Bean" + 12183 "Kangxi Radical Pig" + 12184 "Kangxi Radical Badger" + 12185 "Kangxi Radical Shell" + 12186 "Kangxi Radical Red" + 12187 "Kangxi Radical Run" + 12188 "Kangxi Radical Foot" + 12189 "Kangxi Radical Body" + 12190 "Kangxi Radical Cart" + 12191 "Kangxi Radical Bitter" + 12192 "Kangxi Radical Morning" + 12193 "Kangxi Radical Walk" + 12194 "Kangxi Radical City" + 12195 "Kangxi Radical Wine" + 12196 "Kangxi Radical Distinguish" + 12197 "Kangxi Radical Village" + 12198 "Kangxi Radical Gold" + 12199 "Kangxi Radical Long" + 12200 "Kangxi Radical Gate" + 12201 "Kangxi Radical Mound" + 12202 "Kangxi Radical Slave" + 12203 "Kangxi Radical Short Tailed Bird" + 12204 "Kangxi Radical Rain" + 12205 "Kangxi Radical Blue" + 12206 "Kangxi Radical Wrong" + 12207 "Kangxi Radical Face" + 12208 "Kangxi Radical Leather" + 12209 "Kangxi Radical Tanned Leather" + 12210 "Kangxi Radical Leek" + 12211 "Kangxi Radical Sound" + 12212 "Kangxi Radical Leaf" + 12213 "Kangxi Radical Wind" + 12214 "Kangxi Radical Fly" + 12215 "Kangxi Radical Eat" + 12216 "Kangxi Radical Head" + 12217 "Kangxi Radical Fragrant" + 12218 "Kangxi Radical Horse" + 12219 "Kangxi Radical Bone" + 12220 "Kangxi Radical Tall" + 12221 "Kangxi Radical Hair" + 12222 "Kangxi Radical Fight" + 12223 "Kangxi Radical Sacrificial Wine" + 12224 "Kangxi Radical Cauldron" + 12225 "Kangxi Radical Ghost" + 12226 "Kangxi Radical Fish" + 12227 "Kangxi Radical Bird" + 12228 "Kangxi Radical Salt" + 12229 "Kangxi Radical Deer" + 12230 "Kangxi Radical Wheat" + 12231 "Kangxi Radical Hemp" + 12232 "Kangxi Radical Yellow" + 12233 "Kangxi Radical Millet" + 12234 "Kangxi Radical Black" + 12235 "Kangxi Radical Embroidery" + 12236 "Kangxi Radical Frog" + 12237 "Kangxi Radical Tripod" + 12238 "Kangxi Radical Drum" + 12239 "Kangxi Radical Rat" + 12240 "Kangxi Radical Nose" + 12241 "Kangxi Radical Even" + 12242 "Kangxi Radical Tooth" + 12243 "Kangxi Radical Dragon" + 12244 "Kangxi Radical Turtle" + 12245 "Kangxi Radical Flute" + 12272 "Ideographic Description Character Left To Right" + 12273 "Ideographic Description Character Above To Below" + 12274 "Ideographic Description Character Left To Middle And Right" + 12275 "Ideographic Description Character Above To Middle And Below" + 12276 "Ideographic Description Character Full Surround" + 12277 "Ideographic Description Character Surround From Above" + 12278 "Ideographic Description Character Surround From Below" + 12279 "Ideographic Description Character Surround From Left" + 12280 "Ideographic Description Character Surround From Upper Left" + 12281 "Ideographic Description Character Surround From Upper Right" + 12282 "Ideographic Description Character Surround From Lower Left" + 12283 "Ideographic Description Character Overlaid" + 12288 "Ideographic Space" + 12289 "Ideographic Comma" + 12290 "Ideographic Full Stop" + 12291 "Ditto Mark" + 12292 "Japanese Industrial Standard Symbol" + 12293 "Ideographic Iteration Mark" + 12294 "Ideographic Closing Mark" + 12295 "Ideographic Number Zero" + 12296 "Left Angle Bracket" + 12297 "Right Angle Bracket" + 12298 "Left Double Angle Bracket" + 12299 "Right Double Angle Bracket" + 12300 "Left Corner Bracket" + 12301 "Right Corner Bracket" + 12302 "Left White Corner Bracket" + 12303 "Right White Corner Bracket" + 12304 "Left Black Lenticular Bracket" + 12305 "Right Black Lenticular Bracket" + 12306 "Postal Mark" + 12307 "Geta Mark" + 12308 "Left Tortoise Shell Bracket" + 12309 "Right Tortoise Shell Bracket" + 12310 "Left White Lenticular Bracket" + 12311 "Right White Lenticular Bracket" + 12312 "Left White Tortoise Shell Bracket" + 12313 "Right White Tortoise Shell Bracket" + 12314 "Left White Square Bracket" + 12315 "Right White Square Bracket" + 12316 "Wave Dash" + 12317 "Reversed Double Prime Quotation Mark" + 12318 "Double Prime Quotation Mark" + 12319 "Low Double Prime Quotation Mark" + 12320 "Postal Mark Face" + 12321 "Hangzhou Numeral One" + 12322 "Hangzhou Numeral Two" + 12323 "Hangzhou Numeral Three" + 12324 "Hangzhou Numeral Four" + 12325 "Hangzhou Numeral Five" + 12326 "Hangzhou Numeral Six" + 12327 "Hangzhou Numeral Seven" + 12328 "Hangzhou Numeral Eight" + 12329 "Hangzhou Numeral Nine" + 12330 "Ideographic Level Tone Mark" + 12331 "Ideographic Rising Tone Mark" + 12332 "Ideographic Departing Tone Mark" + 12333 "Ideographic Entering Tone Mark" + 12334 "Hangul Single Dot Tone Mark" + 12335 "Hangul Double Dot Tone Mark" + 12336 "Wavy Dash" + 12337 "Vertical Kana Repeat Mark" + 12338 "Vertical Kana Repeat With Voiced Sound Mark" + 12339 "Vertical Kana Repeat Mark Upper Half" + 12340 "Vertical Kana Repeat With Voiced Sound Mark Upper Half" + 12341 "Vertical Kana Repeat Mark Lower Half" + 12342 "Circled Postal Mark" + 12343 "Ideographic Telegraph Line Feed Separator Symbol" + 12344 "Hangzhou Numeral Ten" + 12345 "Hangzhou Numeral Twenty" + 12346 "Hangzhou Numeral Thirty" + 12347 "Vertical Ideographic Iteration Mark" + 12348 "Masu Mark" + 12349 "Part Alternation Mark" + 12350 "Ideographic Variation Indicator" + 12351 "Ideographic Half Fill Space" + 12353 "Hiragana Letter Small A" + 12354 "Hiragana Letter A" + 12355 "Hiragana Letter Small I" + 12356 "Hiragana Letter I" + 12357 "Hiragana Letter Small U" + 12358 "Hiragana Letter U" + 12359 "Hiragana Letter Small E" + 12360 "Hiragana Letter E" + 12361 "Hiragana Letter Small O" + 12362 "Hiragana Letter O" + 12363 "Hiragana Letter Ka" + 12364 "Hiragana Letter Ga" + 12365 "Hiragana Letter Ki" + 12366 "Hiragana Letter Gi" + 12367 "Hiragana Letter Ku" + 12368 "Hiragana Letter Gu" + 12369 "Hiragana Letter Ke" + 12370 "Hiragana Letter Ge" + 12371 "Hiragana Letter Ko" + 12372 "Hiragana Letter Go" + 12373 "Hiragana Letter Sa" + 12374 "Hiragana Letter Za" + 12375 "Hiragana Letter Si" + 12376 "Hiragana Letter Zi" + 12377 "Hiragana Letter Su" + 12378 "Hiragana Letter Zu" + 12379 "Hiragana Letter Se" + 12380 "Hiragana Letter Ze" + 12381 "Hiragana Letter So" + 12382 "Hiragana Letter Zo" + 12383 "Hiragana Letter Ta" + 12384 "Hiragana Letter Da" + 12385 "Hiragana Letter Ti" + 12386 "Hiragana Letter Di" + 12387 "Hiragana Letter Small Tu" + 12388 "Hiragana Letter Tu" + 12389 "Hiragana Letter Du" + 12390 "Hiragana Letter Te" + 12391 "Hiragana Letter De" + 12392 "Hiragana Letter To" + 12393 "Hiragana Letter Do" + 12394 "Hiragana Letter Na" + 12395 "Hiragana Letter Ni" + 12396 "Hiragana Letter Nu" + 12397 "Hiragana Letter Ne" + 12398 "Hiragana Letter No" + 12399 "Hiragana Letter Ha" + 12400 "Hiragana Letter Ba" + 12401 "Hiragana Letter Pa" + 12402 "Hiragana Letter Hi" + 12403 "Hiragana Letter Bi" + 12404 "Hiragana Letter Pi" + 12405 "Hiragana Letter Hu" + 12406 "Hiragana Letter Bu" + 12407 "Hiragana Letter Pu" + 12408 "Hiragana Letter He" + 12409 "Hiragana Letter Be" + 12410 "Hiragana Letter Pe" + 12411 "Hiragana Letter Ho" + 12412 "Hiragana Letter Bo" + 12413 "Hiragana Letter Po" + 12414 "Hiragana Letter Ma" + 12415 "Hiragana Letter Mi" + 12416 "Hiragana Letter Mu" + 12417 "Hiragana Letter Me" + 12418 "Hiragana Letter Mo" + 12419 "Hiragana Letter Small Ya" + 12420 "Hiragana Letter Ya" + 12421 "Hiragana Letter Small Yu" + 12422 "Hiragana Letter Yu" + 12423 "Hiragana Letter Small Yo" + 12424 "Hiragana Letter Yo" + 12425 "Hiragana Letter Ra" + 12426 "Hiragana Letter Ri" + 12427 "Hiragana Letter Ru" + 12428 "Hiragana Letter Re" + 12429 "Hiragana Letter Ro" + 12430 "Hiragana Letter Small Wa" + 12431 "Hiragana Letter Wa" + 12432 "Hiragana Letter Wi" + 12433 "Hiragana Letter We" + 12434 "Hiragana Letter Wo" + 12435 "Hiragana Letter N" + 12436 "Hiragana Letter Vu" + 12437 "Hiragana Letter Small Ka" + 12438 "Hiragana Letter Small Ke" + 12441 "Combining Katakana-Hiragana Voiced Sound Mark" + 12442 "Combining Katakana-Hiragana Semi-Voiced Sound Mark" + 12443 "Katakana-Hiragana Voiced Sound Mark" + 12444 "Katakana-Hiragana Semi-Voiced Sound Mark" + 12445 "Hiragana Iteration Mark" + 12446 "Hiragana Voiced Iteration Mark" + 12447 "Hiragana Digraph Yori" + 12448 "Katakana-Hiragana Double Hyphen" + 12449 "Katakana Letter Small A" + 12450 "Katakana Letter A" + 12451 "Katakana Letter Small I" + 12452 "Katakana Letter I" + 12453 "Katakana Letter Small U" + 12454 "Katakana Letter U" + 12455 "Katakana Letter Small E" + 12456 "Katakana Letter E" + 12457 "Katakana Letter Small O" + 12458 "Katakana Letter O" + 12459 "Katakana Letter Ka" + 12460 "Katakana Letter Ga" + 12461 "Katakana Letter Ki" + 12462 "Katakana Letter Gi" + 12463 "Katakana Letter Ku" + 12464 "Katakana Letter Gu" + 12465 "Katakana Letter Ke" + 12466 "Katakana Letter Ge" + 12467 "Katakana Letter Ko" + 12468 "Katakana Letter Go" + 12469 "Katakana Letter Sa" + 12470 "Katakana Letter Za" + 12471 "Katakana Letter Si" + 12472 "Katakana Letter Zi" + 12473 "Katakana Letter Su" + 12474 "Katakana Letter Zu" + 12475 "Katakana Letter Se" + 12476 "Katakana Letter Ze" + 12477 "Katakana Letter So" + 12478 "Katakana Letter Zo" + 12479 "Katakana Letter Ta" + 12480 "Katakana Letter Da" + 12481 "Katakana Letter Ti" + 12482 "Katakana Letter Di" + 12483 "Katakana Letter Small Tu" + 12484 "Katakana Letter Tu" + 12485 "Katakana Letter Du" + 12486 "Katakana Letter Te" + 12487 "Katakana Letter De" + 12488 "Katakana Letter To" + 12489 "Katakana Letter Do" + 12490 "Katakana Letter Na" + 12491 "Katakana Letter Ni" + 12492 "Katakana Letter Nu" + 12493 "Katakana Letter Ne" + 12494 "Katakana Letter No" + 12495 "Katakana Letter Ha" + 12496 "Katakana Letter Ba" + 12497 "Katakana Letter Pa" + 12498 "Katakana Letter Hi" + 12499 "Katakana Letter Bi" + 12500 "Katakana Letter Pi" + 12501 "Katakana Letter Hu" + 12502 "Katakana Letter Bu" + 12503 "Katakana Letter Pu" + 12504 "Katakana Letter He" + 12505 "Katakana Letter Be" + 12506 "Katakana Letter Pe" + 12507 "Katakana Letter Ho" + 12508 "Katakana Letter Bo" + 12509 "Katakana Letter Po" + 12510 "Katakana Letter Ma" + 12511 "Katakana Letter Mi" + 12512 "Katakana Letter Mu" + 12513 "Katakana Letter Me" + 12514 "Katakana Letter Mo" + 12515 "Katakana Letter Small Ya" + 12516 "Katakana Letter Ya" + 12517 "Katakana Letter Small Yu" + 12518 "Katakana Letter Yu" + 12519 "Katakana Letter Small Yo" + 12520 "Katakana Letter Yo" + 12521 "Katakana Letter Ra" + 12522 "Katakana Letter Ri" + 12523 "Katakana Letter Ru" + 12524 "Katakana Letter Re" + 12525 "Katakana Letter Ro" + 12526 "Katakana Letter Small Wa" + 12527 "Katakana Letter Wa" + 12528 "Katakana Letter Wi" + 12529 "Katakana Letter We" + 12530 "Katakana Letter Wo" + 12531 "Katakana Letter N" + 12532 "Katakana Letter Vu" + 12533 "Katakana Letter Small Ka" + 12534 "Katakana Letter Small Ke" + 12535 "Katakana Letter Va" + 12536 "Katakana Letter Vi" + 12537 "Katakana Letter Ve" + 12538 "Katakana Letter Vo" + 12539 "Katakana Middle Dot" + 12540 "Katakana-Hiragana Prolonged Sound Mark" + 12541 "Katakana Iteration Mark" + 12542 "Katakana Voiced Iteration Mark" + 12543 "Katakana Digraph Koto" + 12549 "Bopomofo Letter B" + 12550 "Bopomofo Letter P" + 12551 "Bopomofo Letter M" + 12552 "Bopomofo Letter F" + 12553 "Bopomofo Letter D" + 12554 "Bopomofo Letter T" + 12555 "Bopomofo Letter N" + 12556 "Bopomofo Letter L" + 12557 "Bopomofo Letter G" + 12558 "Bopomofo Letter K" + 12559 "Bopomofo Letter H" + 12560 "Bopomofo Letter J" + 12561 "Bopomofo Letter Q" + 12562 "Bopomofo Letter X" + 12563 "Bopomofo Letter Zh" + 12564 "Bopomofo Letter Ch" + 12565 "Bopomofo Letter Sh" + 12566 "Bopomofo Letter R" + 12567 "Bopomofo Letter Z" + 12568 "Bopomofo Letter C" + 12569 "Bopomofo Letter S" + 12570 "Bopomofo Letter A" + 12571 "Bopomofo Letter O" + 12572 "Bopomofo Letter E" + 12573 "Bopomofo Letter Eh" + 12574 "Bopomofo Letter Ai" + 12575 "Bopomofo Letter Ei" + 12576 "Bopomofo Letter Au" + 12577 "Bopomofo Letter Ou" + 12578 "Bopomofo Letter An" + 12579 "Bopomofo Letter En" + 12580 "Bopomofo Letter Ang" + 12581 "Bopomofo Letter Eng" + 12582 "Bopomofo Letter Er" + 12583 "Bopomofo Letter I" + 12584 "Bopomofo Letter U" + 12585 "Bopomofo Letter Iu" + 12586 "Bopomofo Letter V" + 12587 "Bopomofo Letter Ng" + 12588 "Bopomofo Letter Gn" + 12589 "Bopomofo Letter Ih" + 12593 "Hangul Letter Kiyeok" + 12594 "Hangul Letter Ssangkiyeok" + 12595 "Hangul Letter Kiyeok-Sios" + 12596 "Hangul Letter Nieun" + 12597 "Hangul Letter Nieun-Cieuc" + 12598 "Hangul Letter Nieun-Hieuh" + 12599 "Hangul Letter Tikeut" + 12600 "Hangul Letter Ssangtikeut" + 12601 "Hangul Letter Rieul" + 12602 "Hangul Letter Rieul-Kiyeok" + 12603 "Hangul Letter Rieul-Mieum" + 12604 "Hangul Letter Rieul-Pieup" + 12605 "Hangul Letter Rieul-Sios" + 12606 "Hangul Letter Rieul-Thieuth" + 12607 "Hangul Letter Rieul-Phieuph" + 12608 "Hangul Letter Rieul-Hieuh" + 12609 "Hangul Letter Mieum" + 12610 "Hangul Letter Pieup" + 12611 "Hangul Letter Ssangpieup" + 12612 "Hangul Letter Pieup-Sios" + 12613 "Hangul Letter Sios" + 12614 "Hangul Letter Ssangsios" + 12615 "Hangul Letter Ieung" + 12616 "Hangul Letter Cieuc" + 12617 "Hangul Letter Ssangcieuc" + 12618 "Hangul Letter Chieuch" + 12619 "Hangul Letter Khieukh" + 12620 "Hangul Letter Thieuth" + 12621 "Hangul Letter Phieuph" + 12622 "Hangul Letter Hieuh" + 12623 "Hangul Letter A" + 12624 "Hangul Letter Ae" + 12625 "Hangul Letter Ya" + 12626 "Hangul Letter Yae" + 12627 "Hangul Letter Eo" + 12628 "Hangul Letter E" + 12629 "Hangul Letter Yeo" + 12630 "Hangul Letter Ye" + 12631 "Hangul Letter O" + 12632 "Hangul Letter Wa" + 12633 "Hangul Letter Wae" + 12634 "Hangul Letter Oe" + 12635 "Hangul Letter Yo" + 12636 "Hangul Letter U" + 12637 "Hangul Letter Weo" + 12638 "Hangul Letter We" + 12639 "Hangul Letter Wi" + 12640 "Hangul Letter Yu" + 12641 "Hangul Letter Eu" + 12642 "Hangul Letter Yi" + 12643 "Hangul Letter I" + 12644 "Hangul Filler" + 12645 "Hangul Letter Ssangnieun" + 12646 "Hangul Letter Nieun-Tikeut" + 12647 "Hangul Letter Nieun-Sios" + 12648 "Hangul Letter Nieun-Pansios" + 12649 "Hangul Letter Rieul-Kiyeok-Sios" + 12650 "Hangul Letter Rieul-Tikeut" + 12651 "Hangul Letter Rieul-Pieup-Sios" + 12652 "Hangul Letter Rieul-Pansios" + 12653 "Hangul Letter Rieul-Yeorinhieuh" + 12654 "Hangul Letter Mieum-Pieup" + 12655 "Hangul Letter Mieum-Sios" + 12656 "Hangul Letter Mieum-Pansios" + 12657 "Hangul Letter Kapyeounmieum" + 12658 "Hangul Letter Pieup-Kiyeok" + 12659 "Hangul Letter Pieup-Tikeut" + 12660 "Hangul Letter Pieup-Sios-Kiyeok" + 12661 "Hangul Letter Pieup-Sios-Tikeut" + 12662 "Hangul Letter Pieup-Cieuc" + 12663 "Hangul Letter Pieup-Thieuth" + 12664 "Hangul Letter Kapyeounpieup" + 12665 "Hangul Letter Kapyeounssangpieup" + 12666 "Hangul Letter Sios-Kiyeok" + 12667 "Hangul Letter Sios-Nieun" + 12668 "Hangul Letter Sios-Tikeut" + 12669 "Hangul Letter Sios-Pieup" + 12670 "Hangul Letter Sios-Cieuc" + 12671 "Hangul Letter Pansios" + 12672 "Hangul Letter Ssangieung" + 12673 "Hangul Letter Yesieung" + 12674 "Hangul Letter Yesieung-Sios" + 12675 "Hangul Letter Yesieung-Pansios" + 12676 "Hangul Letter Kapyeounphieuph" + 12677 "Hangul Letter Ssanghieuh" + 12678 "Hangul Letter Yeorinhieuh" + 12679 "Hangul Letter Yo-Ya" + 12680 "Hangul Letter Yo-Yae" + 12681 "Hangul Letter Yo-I" + 12682 "Hangul Letter Yu-Yeo" + 12683 "Hangul Letter Yu-Ye" + 12684 "Hangul Letter Yu-I" + 12685 "Hangul Letter Araea" + 12686 "Hangul Letter Araeae" + 12688 "Ideographic Annotation Linking Mark" + 12689 "Ideographic Annotation Reverse Mark" + 12690 "Ideographic Annotation One Mark" + 12691 "Ideographic Annotation Two Mark" + 12692 "Ideographic Annotation Three Mark" + 12693 "Ideographic Annotation Four Mark" + 12694 "Ideographic Annotation Top Mark" + 12695 "Ideographic Annotation Middle Mark" + 12696 "Ideographic Annotation Bottom Mark" + 12697 "Ideographic Annotation First Mark" + 12698 "Ideographic Annotation Second Mark" + 12699 "Ideographic Annotation Third Mark" + 12700 "Ideographic Annotation Fourth Mark" + 12701 "Ideographic Annotation Heaven Mark" + 12702 "Ideographic Annotation Earth Mark" + 12703 "Ideographic Annotation Man Mark" + 12704 "Bopomofo Letter Bu" + 12705 "Bopomofo Letter Zi" + 12706 "Bopomofo Letter Ji" + 12707 "Bopomofo Letter Gu" + 12708 "Bopomofo Letter Ee" + 12709 "Bopomofo Letter Enn" + 12710 "Bopomofo Letter Oo" + 12711 "Bopomofo Letter Onn" + 12712 "Bopomofo Letter Ir" + 12713 "Bopomofo Letter Ann" + 12714 "Bopomofo Letter Inn" + 12715 "Bopomofo Letter Unn" + 12716 "Bopomofo Letter Im" + 12717 "Bopomofo Letter Ngg" + 12718 "Bopomofo Letter Ainn" + 12719 "Bopomofo Letter Aunn" + 12720 "Bopomofo Letter Am" + 12721 "Bopomofo Letter Om" + 12722 "Bopomofo Letter Ong" + 12723 "Bopomofo Letter Innn" + 12724 "Bopomofo Final Letter P" + 12725 "Bopomofo Final Letter T" + 12726 "Bopomofo Final Letter K" + 12727 "Bopomofo Final Letter H" + 12728 "Bopomofo Letter Gh" + 12729 "Bopomofo Letter Lh" + 12730 "Bopomofo Letter Zy" + 12736 "CJK Stroke T" + 12737 "CJK Stroke Wg" + 12738 "CJK Stroke Xg" + 12739 "CJK Stroke Bxg" + 12740 "CJK Stroke Sw" + 12741 "CJK Stroke Hzz" + 12742 "CJK Stroke Hzg" + 12743 "CJK Stroke Hp" + 12744 "CJK Stroke Hzwg" + 12745 "CJK Stroke Szwg" + 12746 "CJK Stroke Hzt" + 12747 "CJK Stroke Hzzp" + 12748 "CJK Stroke Hpwg" + 12749 "CJK Stroke Hzw" + 12750 "CJK Stroke Hzzz" + 12751 "CJK Stroke N" + 12752 "CJK Stroke H" + 12753 "CJK Stroke S" + 12754 "CJK Stroke P" + 12755 "CJK Stroke Sp" + 12756 "CJK Stroke D" + 12757 "CJK Stroke Hz" + 12758 "CJK Stroke Hg" + 12759 "CJK Stroke Sz" + 12760 "CJK Stroke Swz" + 12761 "CJK Stroke St" + 12762 "CJK Stroke Sg" + 12763 "CJK Stroke Pd" + 12764 "CJK Stroke Pz" + 12765 "CJK Stroke Tn" + 12766 "CJK Stroke Szz" + 12767 "CJK Stroke Swg" + 12768 "CJK Stroke Hxwg" + 12769 "CJK Stroke Hzzzg" + 12770 "CJK Stroke Pg" + 12771 "CJK Stroke Q" + 12784 "Katakana Letter Small Ku" + 12785 "Katakana Letter Small Si" + 12786 "Katakana Letter Small Su" + 12787 "Katakana Letter Small To" + 12788 "Katakana Letter Small Nu" + 12789 "Katakana Letter Small Ha" + 12790 "Katakana Letter Small Hi" + 12791 "Katakana Letter Small Hu" + 12792 "Katakana Letter Small He" + 12793 "Katakana Letter Small Ho" + 12794 "Katakana Letter Small Mu" + 12795 "Katakana Letter Small Ra" + 12796 "Katakana Letter Small Ri" + 12797 "Katakana Letter Small Ru" + 12798 "Katakana Letter Small Re" + 12799 "Katakana Letter Small Ro" + 12800 "Parenthesized Hangul Kiyeok" + 12801 "Parenthesized Hangul Nieun" + 12802 "Parenthesized Hangul Tikeut" + 12803 "Parenthesized Hangul Rieul" + 12804 "Parenthesized Hangul Mieum" + 12805 "Parenthesized Hangul Pieup" + 12806 "Parenthesized Hangul Sios" + 12807 "Parenthesized Hangul Ieung" + 12808 "Parenthesized Hangul Cieuc" + 12809 "Parenthesized Hangul Chieuch" + 12810 "Parenthesized Hangul Khieukh" + 12811 "Parenthesized Hangul Thieuth" + 12812 "Parenthesized Hangul Phieuph" + 12813 "Parenthesized Hangul Hieuh" + 12814 "Parenthesized Hangul Kiyeok A" + 12815 "Parenthesized Hangul Nieun A" + 12816 "Parenthesized Hangul Tikeut A" + 12817 "Parenthesized Hangul Rieul A" + 12818 "Parenthesized Hangul Mieum A" + 12819 "Parenthesized Hangul Pieup A" + 12820 "Parenthesized Hangul Sios A" + 12821 "Parenthesized Hangul Ieung A" + 12822 "Parenthesized Hangul Cieuc A" + 12823 "Parenthesized Hangul Chieuch A" + 12824 "Parenthesized Hangul Khieukh A" + 12825 "Parenthesized Hangul Thieuth A" + 12826 "Parenthesized Hangul Phieuph A" + 12827 "Parenthesized Hangul Hieuh A" + 12828 "Parenthesized Hangul Cieuc U" + 12829 "Parenthesized Korean Character Ojeon" + 12830 "Parenthesized Korean Character O Hu" + 12832 "Parenthesized Ideograph One" + 12833 "Parenthesized Ideograph Two" + 12834 "Parenthesized Ideograph Three" + 12835 "Parenthesized Ideograph Four" + 12836 "Parenthesized Ideograph Five" + 12837 "Parenthesized Ideograph Six" + 12838 "Parenthesized Ideograph Seven" + 12839 "Parenthesized Ideograph Eight" + 12840 "Parenthesized Ideograph Nine" + 12841 "Parenthesized Ideograph Ten" + 12842 "Parenthesized Ideograph Moon" + 12843 "Parenthesized Ideograph Fire" + 12844 "Parenthesized Ideograph Water" + 12845 "Parenthesized Ideograph Wood" + 12846 "Parenthesized Ideograph Metal" + 12847 "Parenthesized Ideograph Earth" + 12848 "Parenthesized Ideograph Sun" + 12849 "Parenthesized Ideograph Stock" + 12850 "Parenthesized Ideograph Have" + 12851 "Parenthesized Ideograph Society" + 12852 "Parenthesized Ideograph Name" + 12853 "Parenthesized Ideograph Special" + 12854 "Parenthesized Ideograph Financial" + 12855 "Parenthesized Ideograph Congratulation" + 12856 "Parenthesized Ideograph Labor" + 12857 "Parenthesized Ideograph Represent" + 12858 "Parenthesized Ideograph Call" + 12859 "Parenthesized Ideograph Study" + 12860 "Parenthesized Ideograph Supervise" + 12861 "Parenthesized Ideograph Enterprise" + 12862 "Parenthesized Ideograph Resource" + 12863 "Parenthesized Ideograph Alliance" + 12864 "Parenthesized Ideograph Festival" + 12865 "Parenthesized Ideograph Rest" + 12866 "Parenthesized Ideograph Self" + 12867 "Parenthesized Ideograph Reach" + 12868 "Circled Ideograph Question" + 12869 "Circled Ideograph Kindergarten" + 12870 "Circled Ideograph School" + 12871 "Circled Ideograph Koto" + 12872 "Circled Number Ten On Black Square" + 12873 "Circled Number Twenty On Black Square" + 12874 "Circled Number Thirty On Black Square" + 12875 "Circled Number Forty On Black Square" + 12876 "Circled Number Fifty On Black Square" + 12877 "Circled Number Sixty On Black Square" + 12878 "Circled Number Seventy On Black Square" + 12879 "Circled Number Eighty On Black Square" + 12880 "Partnership Sign" + 12881 "Circled Number Twenty One" + 12882 "Circled Number Twenty Two" + 12883 "Circled Number Twenty Three" + 12884 "Circled Number Twenty Four" + 12885 "Circled Number Twenty Five" + 12886 "Circled Number Twenty Six" + 12887 "Circled Number Twenty Seven" + 12888 "Circled Number Twenty Eight" + 12889 "Circled Number Twenty Nine" + 12890 "Circled Number Thirty" + 12891 "Circled Number Thirty One" + 12892 "Circled Number Thirty Two" + 12893 "Circled Number Thirty Three" + 12894 "Circled Number Thirty Four" + 12895 "Circled Number Thirty Five" + 12896 "Circled Hangul Kiyeok" + 12897 "Circled Hangul Nieun" + 12898 "Circled Hangul Tikeut" + 12899 "Circled Hangul Rieul" + 12900 "Circled Hangul Mieum" + 12901 "Circled Hangul Pieup" + 12902 "Circled Hangul Sios" + 12903 "Circled Hangul Ieung" + 12904 "Circled Hangul Cieuc" + 12905 "Circled Hangul Chieuch" + 12906 "Circled Hangul Khieukh" + 12907 "Circled Hangul Thieuth" + 12908 "Circled Hangul Phieuph" + 12909 "Circled Hangul Hieuh" + 12910 "Circled Hangul Kiyeok A" + 12911 "Circled Hangul Nieun A" + 12912 "Circled Hangul Tikeut A" + 12913 "Circled Hangul Rieul A" + 12914 "Circled Hangul Mieum A" + 12915 "Circled Hangul Pieup A" + 12916 "Circled Hangul Sios A" + 12917 "Circled Hangul Ieung A" + 12918 "Circled Hangul Cieuc A" + 12919 "Circled Hangul Chieuch A" + 12920 "Circled Hangul Khieukh A" + 12921 "Circled Hangul Thieuth A" + 12922 "Circled Hangul Phieuph A" + 12923 "Circled Hangul Hieuh A" + 12924 "Circled Korean Character Chamko" + 12925 "Circled Korean Character Jueui" + 12926 "Circled Hangul Ieung U" + 12927 "Korean Standard Symbol" + 12928 "Circled Ideograph One" + 12929 "Circled Ideograph Two" + 12930 "Circled Ideograph Three" + 12931 "Circled Ideograph Four" + 12932 "Circled Ideograph Five" + 12933 "Circled Ideograph Six" + 12934 "Circled Ideograph Seven" + 12935 "Circled Ideograph Eight" + 12936 "Circled Ideograph Nine" + 12937 "Circled Ideograph Ten" + 12938 "Circled Ideograph Moon" + 12939 "Circled Ideograph Fire" + 12940 "Circled Ideograph Water" + 12941 "Circled Ideograph Wood" + 12942 "Circled Ideograph Metal" + 12943 "Circled Ideograph Earth" + 12944 "Circled Ideograph Sun" + 12945 "Circled Ideograph Stock" + 12946 "Circled Ideograph Have" + 12947 "Circled Ideograph Society" + 12948 "Circled Ideograph Name" + 12949 "Circled Ideograph Special" + 12950 "Circled Ideograph Financial" + 12951 "Circled Ideograph Congratulation" + 12952 "Circled Ideograph Labor" + 12953 "Circled Ideograph Secret" + 12954 "Circled Ideograph Male" + 12955 "Circled Ideograph Female" + 12956 "Circled Ideograph Suitable" + 12957 "Circled Ideograph Excellent" + 12958 "Circled Ideograph Print" + 12959 "Circled Ideograph Attention" + 12960 "Circled Ideograph Item" + 12961 "Circled Ideograph Rest" + 12962 "Circled Ideograph Copy" + 12963 "Circled Ideograph Correct" + 12964 "Circled Ideograph High" + 12965 "Circled Ideograph Centre" + 12966 "Circled Ideograph Low" + 12967 "Circled Ideograph Left" + 12968 "Circled Ideograph Right" + 12969 "Circled Ideograph Medicine" + 12970 "Circled Ideograph Religion" + 12971 "Circled Ideograph Study" + 12972 "Circled Ideograph Supervise" + 12973 "Circled Ideograph Enterprise" + 12974 "Circled Ideograph Resource" + 12975 "Circled Ideograph Alliance" + 12976 "Circled Ideograph Night" + 12977 "Circled Number Thirty Six" + 12978 "Circled Number Thirty Seven" + 12979 "Circled Number Thirty Eight" + 12980 "Circled Number Thirty Nine" + 12981 "Circled Number Forty" + 12982 "Circled Number Forty One" + 12983 "Circled Number Forty Two" + 12984 "Circled Number Forty Three" + 12985 "Circled Number Forty Four" + 12986 "Circled Number Forty Five" + 12987 "Circled Number Forty Six" + 12988 "Circled Number Forty Seven" + 12989 "Circled Number Forty Eight" + 12990 "Circled Number Forty Nine" + 12991 "Circled Number Fifty" + 12992 "Ideographic Telegraph Symbol For January" + 12993 "Ideographic Telegraph Symbol For February" + 12994 "Ideographic Telegraph Symbol For March" + 12995 "Ideographic Telegraph Symbol For April" + 12996 "Ideographic Telegraph Symbol For May" + 12997 "Ideographic Telegraph Symbol For June" + 12998 "Ideographic Telegraph Symbol For July" + 12999 "Ideographic Telegraph Symbol For August" + 13000 "Ideographic Telegraph Symbol For September" + 13001 "Ideographic Telegraph Symbol For October" + 13002 "Ideographic Telegraph Symbol For November" + 13003 "Ideographic Telegraph Symbol For December" + 13004 "Square Hg" + 13005 "Square Erg" + 13006 "Square Ev" + 13007 "Limited Liability Sign" + 13008 "Circled Katakana A" + 13009 "Circled Katakana I" + 13010 "Circled Katakana U" + 13011 "Circled Katakana E" + 13012 "Circled Katakana O" + 13013 "Circled Katakana Ka" + 13014 "Circled Katakana Ki" + 13015 "Circled Katakana Ku" + 13016 "Circled Katakana Ke" + 13017 "Circled Katakana Ko" + 13018 "Circled Katakana Sa" + 13019 "Circled Katakana Si" + 13020 "Circled Katakana Su" + 13021 "Circled Katakana Se" + 13022 "Circled Katakana So" + 13023 "Circled Katakana Ta" + 13024 "Circled Katakana Ti" + 13025 "Circled Katakana Tu" + 13026 "Circled Katakana Te" + 13027 "Circled Katakana To" + 13028 "Circled Katakana Na" + 13029 "Circled Katakana Ni" + 13030 "Circled Katakana Nu" + 13031 "Circled Katakana Ne" + 13032 "Circled Katakana No" + 13033 "Circled Katakana Ha" + 13034 "Circled Katakana Hi" + 13035 "Circled Katakana Hu" + 13036 "Circled Katakana He" + 13037 "Circled Katakana Ho" + 13038 "Circled Katakana Ma" + 13039 "Circled Katakana Mi" + 13040 "Circled Katakana Mu" + 13041 "Circled Katakana Me" + 13042 "Circled Katakana Mo" + 13043 "Circled Katakana Ya" + 13044 "Circled Katakana Yu" + 13045 "Circled Katakana Yo" + 13046 "Circled Katakana Ra" + 13047 "Circled Katakana Ri" + 13048 "Circled Katakana Ru" + 13049 "Circled Katakana Re" + 13050 "Circled Katakana Ro" + 13051 "Circled Katakana Wa" + 13052 "Circled Katakana Wi" + 13053 "Circled Katakana We" + 13054 "Circled Katakana Wo" + 13056 "Square Apaato" + 13057 "Square Aruhua" + 13058 "Square Anpea" + 13059 "Square Aaru" + 13060 "Square Iningu" + 13061 "Square Inti" + 13062 "Square Uon" + 13063 "Square Esukuudo" + 13064 "Square Eekaa" + 13065 "Square Onsu" + 13066 "Square Oomu" + 13067 "Square Kairi" + 13068 "Square Karatto" + 13069 "Square Karorii" + 13070 "Square Garon" + 13071 "Square Ganma" + 13072 "Square Giga" + 13073 "Square Ginii" + 13074 "Square Kyurii" + 13075 "Square Girudaa" + 13076 "Square Kiro" + 13077 "Square Kiroguramu" + 13078 "Square Kiromeetoru" + 13079 "Square Kirowatto" + 13080 "Square Guramu" + 13081 "Square Guramuton" + 13082 "Square Kuruzeiro" + 13083 "Square Kuroone" + 13084 "Square Keesu" + 13085 "Square Koruna" + 13086 "Square Koopo" + 13087 "Square Saikuru" + 13088 "Square Santiimu" + 13089 "Square Siringu" + 13090 "Square Senti" + 13091 "Square Sento" + 13092 "Square Daasu" + 13093 "Square Desi" + 13094 "Square Doru" + 13095 "Square Ton" + 13096 "Square Nano" + 13097 "Square Notto" + 13098 "Square Haitu" + 13099 "Square Paasento" + 13100 "Square Paatu" + 13101 "Square Baareru" + 13102 "Square Piasutoru" + 13103 "Square Pikuru" + 13104 "Square Piko" + 13105 "Square Biru" + 13106 "Square Huaraddo" + 13107 "Square Huiito" + 13108 "Square Bussyeru" + 13109 "Square Huran" + 13110 "Square Hekutaaru" + 13111 "Square Peso" + 13112 "Square Penihi" + 13113 "Square Herutu" + 13114 "Square Pensu" + 13115 "Square Peezi" + 13116 "Square Beeta" + 13117 "Square Pointo" + 13118 "Square Boruto" + 13119 "Square Hon" + 13120 "Square Pondo" + 13121 "Square Hooru" + 13122 "Square Hoon" + 13123 "Square Maikuro" + 13124 "Square Mairu" + 13125 "Square Mahha" + 13126 "Square Maruku" + 13127 "Square Mansyon" + 13128 "Square Mikuron" + 13129 "Square Miri" + 13130 "Square Miribaaru" + 13131 "Square Mega" + 13132 "Square Megaton" + 13133 "Square Meetoru" + 13134 "Square Yaado" + 13135 "Square Yaaru" + 13136 "Square Yuan" + 13137 "Square Rittoru" + 13138 "Square Rira" + 13139 "Square Rupii" + 13140 "Square Ruuburu" + 13141 "Square Remu" + 13142 "Square Rentogen" + 13143 "Square Watto" + 13144 "Ideographic Telegraph Symbol For Hour Zero" + 13145 "Ideographic Telegraph Symbol For Hour One" + 13146 "Ideographic Telegraph Symbol For Hour Two" + 13147 "Ideographic Telegraph Symbol For Hour Three" + 13148 "Ideographic Telegraph Symbol For Hour Four" + 13149 "Ideographic Telegraph Symbol For Hour Five" + 13150 "Ideographic Telegraph Symbol For Hour Six" + 13151 "Ideographic Telegraph Symbol For Hour Seven" + 13152 "Ideographic Telegraph Symbol For Hour Eight" + 13153 "Ideographic Telegraph Symbol For Hour Nine" + 13154 "Ideographic Telegraph Symbol For Hour Ten" + 13155 "Ideographic Telegraph Symbol For Hour Eleven" + 13156 "Ideographic Telegraph Symbol For Hour Twelve" + 13157 "Ideographic Telegraph Symbol For Hour Thirteen" + 13158 "Ideographic Telegraph Symbol For Hour Fourteen" + 13159 "Ideographic Telegraph Symbol For Hour Fifteen" + 13160 "Ideographic Telegraph Symbol For Hour Sixteen" + 13161 "Ideographic Telegraph Symbol For Hour Seventeen" + 13162 "Ideographic Telegraph Symbol For Hour Eighteen" + 13163 "Ideographic Telegraph Symbol For Hour Nineteen" + 13164 "Ideographic Telegraph Symbol For Hour Twenty" + 13165 "Ideographic Telegraph Symbol For Hour Twenty-One" + 13166 "Ideographic Telegraph Symbol For Hour Twenty-Two" + 13167 "Ideographic Telegraph Symbol For Hour Twenty-Three" + 13168 "Ideographic Telegraph Symbol For Hour Twenty-Four" + 13169 "Square Hpa" + 13170 "Square Da" + 13171 "Square Au" + 13172 "Square Bar" + 13173 "Square Ov" + 13174 "Square Pc" + 13175 "Square Dm" + 13176 "Square Dm Squared" + 13177 "Square Dm Cubed" + 13178 "Square Iu" + 13179 "Square Era Name Heisei" + 13180 "Square Era Name Syouwa" + 13181 "Square Era Name Taisyou" + 13182 "Square Era Name Meizi" + 13183 "Square Corporation" + 13184 "Square Pa Amps" + 13185 "Square Na" + 13186 "Square Mu A" + 13187 "Square Ma" + 13188 "Square Ka" + 13189 "Square Kb" + 13190 "Square Mb" + 13191 "Square Gb" + 13192 "Square Cal" + 13193 "Square Kcal" + 13194 "Square Pf" + 13195 "Square Nf" + 13196 "Square Mu F" + 13197 "Square Mu G" + 13198 "Square Mg" + 13199 "Square Kg" + 13200 "Square Hz" + 13201 "Square Khz" + 13202 "Square Mhz" + 13203 "Square Ghz" + 13204 "Square Thz" + 13205 "Square Mu L" + 13206 "Square Ml" + 13207 "Square Dl" + 13208 "Square Kl" + 13209 "Square Fm" + 13210 "Square Nm" + 13211 "Square Mu M" + 13212 "Square Mm" + 13213 "Square Cm" + 13214 "Square Km" + 13215 "Square Mm Squared" + 13216 "Square Cm Squared" + 13217 "Square M Squared" + 13218 "Square Km Squared" + 13219 "Square Mm Cubed" + 13220 "Square Cm Cubed" + 13221 "Square M Cubed" + 13222 "Square Km Cubed" + 13223 "Square M Over S" + 13224 "Square M Over S Squared" + 13225 "Square Pa" + 13226 "Square Kpa" + 13227 "Square Mpa" + 13228 "Square Gpa" + 13229 "Square Rad" + 13230 "Square Rad Over S" + 13231 "Square Rad Over S Squared" + 13232 "Square Ps" + 13233 "Square Ns" + 13234 "Square Mu S" + 13235 "Square Ms" + 13236 "Square Pv" + 13237 "Square Nv" + 13238 "Square Mu V" + 13239 "Square Mv" + 13240 "Square Kv" + 13241 "Square Mv Mega" + 13242 "Square Pw" + 13243 "Square Nw" + 13244 "Square Mu W" + 13245 "Square Mw" + 13246 "Square Kw" + 13247 "Square Mw Mega" + 13248 "Square K Ohm" + 13249 "Square M Ohm" + 13250 "Square Am" + 13251 "Square Bq" + 13252 "Square Cc" + 13253 "Square Cd" + 13254 "Square C Over Kg" + 13255 "Square Co" + 13256 "Square Db" + 13257 "Square Gy" + 13258 "Square Ha" + 13259 "Square Hp" + 13260 "Square In" + 13261 "Square Kk" + 13262 "Square Km Capital" + 13263 "Square Kt" + 13264 "Square Lm" + 13265 "Square Ln" + 13266 "Square Log" + 13267 "Square Lx" + 13268 "Square Mb Small" + 13269 "Square Mil" + 13270 "Square Mol" + 13271 "Square Ph" + 13272 "Square Pm" + 13273 "Square Ppm" + 13274 "Square Pr" + 13275 "Square Sr" + 13276 "Square Sv" + 13277 "Square Wb" + 13278 "Square V Over M" + 13279 "Square A Over M" + 13280 "Ideographic Telegraph Symbol For Day One" + 13281 "Ideographic Telegraph Symbol For Day Two" + 13282 "Ideographic Telegraph Symbol For Day Three" + 13283 "Ideographic Telegraph Symbol For Day Four" + 13284 "Ideographic Telegraph Symbol For Day Five" + 13285 "Ideographic Telegraph Symbol For Day Six" + 13286 "Ideographic Telegraph Symbol For Day Seven" + 13287 "Ideographic Telegraph Symbol For Day Eight" + 13288 "Ideographic Telegraph Symbol For Day Nine" + 13289 "Ideographic Telegraph Symbol For Day Ten" + 13290 "Ideographic Telegraph Symbol For Day Eleven" + 13291 "Ideographic Telegraph Symbol For Day Twelve" + 13292 "Ideographic Telegraph Symbol For Day Thirteen" + 13293 "Ideographic Telegraph Symbol For Day Fourteen" + 13294 "Ideographic Telegraph Symbol For Day Fifteen" + 13295 "Ideographic Telegraph Symbol For Day Sixteen" + 13296 "Ideographic Telegraph Symbol For Day Seventeen" + 13297 "Ideographic Telegraph Symbol For Day Eighteen" + 13298 "Ideographic Telegraph Symbol For Day Nineteen" + 13299 "Ideographic Telegraph Symbol For Day Twenty" + 13300 "Ideographic Telegraph Symbol For Day Twenty-One" + 13301 "Ideographic Telegraph Symbol For Day Twenty-Two" + 13302 "Ideographic Telegraph Symbol For Day Twenty-Three" + 13303 "Ideographic Telegraph Symbol For Day Twenty-Four" + 13304 "Ideographic Telegraph Symbol For Day Twenty-Five" + 13305 "Ideographic Telegraph Symbol For Day Twenty-Six" + 13306 "Ideographic Telegraph Symbol For Day Twenty-Seven" + 13307 "Ideographic Telegraph Symbol For Day Twenty-Eight" + 13308 "Ideographic Telegraph Symbol For Day Twenty-Nine" + 13309 "Ideographic Telegraph Symbol For Day Thirty" + 13310 "Ideographic Telegraph Symbol For Day Thirty-One" + 13311 "Square Gal" + 13312 "" + 19893 "" + 19904 "Hexagram For The Creative Heaven" + 19905 "Hexagram For The Receptive Earth" + 19906 "Hexagram For Difficulty At The Beginning" + 19907 "Hexagram For Youthful Folly" + 19908 "Hexagram For Waiting" + 19909 "Hexagram For Conflict" + 19910 "Hexagram For The Army" + 19911 "Hexagram For Holding Together" + 19912 "Hexagram For Small Taming" + 19913 "Hexagram For Treading" + 19914 "Hexagram For Peace" + 19915 "Hexagram For Standstill" + 19916 "Hexagram For Fellowship" + 19917 "Hexagram For Great Possession" + 19918 "Hexagram For Modesty" + 19919 "Hexagram For Enthusiasm" + 19920 "Hexagram For Following" + 19921 "Hexagram For Work On The Decayed" + 19922 "Hexagram For Approach" + 19923 "Hexagram For Contemplation" + 19924 "Hexagram For Biting Through" + 19925 "Hexagram For Grace" + 19926 "Hexagram For Splitting Apart" + 19927 "Hexagram For Return" + 19928 "Hexagram For Innocence" + 19929 "Hexagram For Great Taming" + 19930 "Hexagram For Mouth Corners" + 19931 "Hexagram For Great Preponderance" + 19932 "Hexagram For The Abysmal Water" + 19933 "Hexagram For The Clinging Fire" + 19934 "Hexagram For Influence" + 19935 "Hexagram For Duration" + 19936 "Hexagram For Retreat" + 19937 "Hexagram For Great Power" + 19938 "Hexagram For Progress" + 19939 "Hexagram For Darkening Of The Light" + 19940 "Hexagram For The Family" + 19941 "Hexagram For Opposition" + 19942 "Hexagram For Obstruction" + 19943 "Hexagram For Deliverance" + 19944 "Hexagram For Decrease" + 19945 "Hexagram For Increase" + 19946 "Hexagram For Breakthrough" + 19947 "Hexagram For Coming To Meet" + 19948 "Hexagram For Gathering Together" + 19949 "Hexagram For Pushing Upward" + 19950 "Hexagram For Oppression" + 19951 "Hexagram For The Well" + 19952 "Hexagram For Revolution" + 19953 "Hexagram For The Cauldron" + 19954 "Hexagram For The Arousing Thunder" + 19955 "Hexagram For The Keeping Still Mountain" + 19956 "Hexagram For Development" + 19957 "Hexagram For The Marrying Maiden" + 19958 "Hexagram For Abundance" + 19959 "Hexagram For The Wanderer" + 19960 "Hexagram For The Gentle Wind" + 19961 "Hexagram For The Joyous Lake" + 19962 "Hexagram For Dispersion" + 19963 "Hexagram For Limitation" + 19964 "Hexagram For Inner Truth" + 19965 "Hexagram For Small Preponderance" + 19966 "Hexagram For After Completion" + 19967 "Hexagram For Before Completion" + 19968 "" + 40908 "" + 40960 "Yi Syllable It" + 40961 "Yi Syllable Ix" + 40962 "Yi Syllable I" + 40963 "Yi Syllable Ip" + 40964 "Yi Syllable Iet" + 40965 "Yi Syllable Iex" + 40966 "Yi Syllable Ie" + 40967 "Yi Syllable Iep" + 40968 "Yi Syllable At" + 40969 "Yi Syllable Ax" + 40970 "Yi Syllable A" + 40971 "Yi Syllable Ap" + 40972 "Yi Syllable Uox" + 40973 "Yi Syllable Uo" + 40974 "Yi Syllable Uop" + 40975 "Yi Syllable Ot" + 40976 "Yi Syllable Ox" + 40977 "Yi Syllable O" + 40978 "Yi Syllable Op" + 40979 "Yi Syllable Ex" + 40980 "Yi Syllable E" + 40981 "Yi Syllable Wu" + 40982 "Yi Syllable Bit" + 40983 "Yi Syllable Bix" + 40984 "Yi Syllable Bi" + 40985 "Yi Syllable Bip" + 40986 "Yi Syllable Biet" + 40987 "Yi Syllable Biex" + 40988 "Yi Syllable Bie" + 40989 "Yi Syllable Biep" + 40990 "Yi Syllable Bat" + 40991 "Yi Syllable Bax" + 40992 "Yi Syllable Ba" + 40993 "Yi Syllable Bap" + 40994 "Yi Syllable Buox" + 40995 "Yi Syllable Buo" + 40996 "Yi Syllable Buop" + 40997 "Yi Syllable Bot" + 40998 "Yi Syllable Box" + 40999 "Yi Syllable Bo" + 41000 "Yi Syllable Bop" + 41001 "Yi Syllable Bex" + 41002 "Yi Syllable Be" + 41003 "Yi Syllable Bep" + 41004 "Yi Syllable But" + 41005 "Yi Syllable Bux" + 41006 "Yi Syllable Bu" + 41007 "Yi Syllable Bup" + 41008 "Yi Syllable Burx" + 41009 "Yi Syllable Bur" + 41010 "Yi Syllable Byt" + 41011 "Yi Syllable Byx" + 41012 "Yi Syllable By" + 41013 "Yi Syllable Byp" + 41014 "Yi Syllable Byrx" + 41015 "Yi Syllable Byr" + 41016 "Yi Syllable Pit" + 41017 "Yi Syllable Pix" + 41018 "Yi Syllable Pi" + 41019 "Yi Syllable Pip" + 41020 "Yi Syllable Piex" + 41021 "Yi Syllable Pie" + 41022 "Yi Syllable Piep" + 41023 "Yi Syllable Pat" + 41024 "Yi Syllable Pax" + 41025 "Yi Syllable Pa" + 41026 "Yi Syllable Pap" + 41027 "Yi Syllable Puox" + 41028 "Yi Syllable Puo" + 41029 "Yi Syllable Puop" + 41030 "Yi Syllable Pot" + 41031 "Yi Syllable Pox" + 41032 "Yi Syllable Po" + 41033 "Yi Syllable Pop" + 41034 "Yi Syllable Put" + 41035 "Yi Syllable Pux" + 41036 "Yi Syllable Pu" + 41037 "Yi Syllable Pup" + 41038 "Yi Syllable Purx" + 41039 "Yi Syllable Pur" + 41040 "Yi Syllable Pyt" + 41041 "Yi Syllable Pyx" + 41042 "Yi Syllable Py" + 41043 "Yi Syllable Pyp" + 41044 "Yi Syllable Pyrx" + 41045 "Yi Syllable Pyr" + 41046 "Yi Syllable Bbit" + 41047 "Yi Syllable Bbix" + 41048 "Yi Syllable Bbi" + 41049 "Yi Syllable Bbip" + 41050 "Yi Syllable Bbiet" + 41051 "Yi Syllable Bbiex" + 41052 "Yi Syllable Bbie" + 41053 "Yi Syllable Bbiep" + 41054 "Yi Syllable Bbat" + 41055 "Yi Syllable Bbax" + 41056 "Yi Syllable Bba" + 41057 "Yi Syllable Bbap" + 41058 "Yi Syllable Bbuox" + 41059 "Yi Syllable Bbuo" + 41060 "Yi Syllable Bbuop" + 41061 "Yi Syllable Bbot" + 41062 "Yi Syllable Bbox" + 41063 "Yi Syllable Bbo" + 41064 "Yi Syllable Bbop" + 41065 "Yi Syllable Bbex" + 41066 "Yi Syllable Bbe" + 41067 "Yi Syllable Bbep" + 41068 "Yi Syllable Bbut" + 41069 "Yi Syllable Bbux" + 41070 "Yi Syllable Bbu" + 41071 "Yi Syllable Bbup" + 41072 "Yi Syllable Bburx" + 41073 "Yi Syllable Bbur" + 41074 "Yi Syllable Bbyt" + 41075 "Yi Syllable Bbyx" + 41076 "Yi Syllable Bby" + 41077 "Yi Syllable Bbyp" + 41078 "Yi Syllable Nbit" + 41079 "Yi Syllable Nbix" + 41080 "Yi Syllable Nbi" + 41081 "Yi Syllable Nbip" + 41082 "Yi Syllable Nbiex" + 41083 "Yi Syllable Nbie" + 41084 "Yi Syllable Nbiep" + 41085 "Yi Syllable Nbat" + 41086 "Yi Syllable Nbax" + 41087 "Yi Syllable Nba" + 41088 "Yi Syllable Nbap" + 41089 "Yi Syllable Nbot" + 41090 "Yi Syllable Nbox" + 41091 "Yi Syllable Nbo" + 41092 "Yi Syllable Nbop" + 41093 "Yi Syllable Nbut" + 41094 "Yi Syllable Nbux" + 41095 "Yi Syllable Nbu" + 41096 "Yi Syllable Nbup" + 41097 "Yi Syllable Nburx" + 41098 "Yi Syllable Nbur" + 41099 "Yi Syllable Nbyt" + 41100 "Yi Syllable Nbyx" + 41101 "Yi Syllable Nby" + 41102 "Yi Syllable Nbyp" + 41103 "Yi Syllable Nbyrx" + 41104 "Yi Syllable Nbyr" + 41105 "Yi Syllable Hmit" + 41106 "Yi Syllable Hmix" + 41107 "Yi Syllable Hmi" + 41108 "Yi Syllable Hmip" + 41109 "Yi Syllable Hmiex" + 41110 "Yi Syllable Hmie" + 41111 "Yi Syllable Hmiep" + 41112 "Yi Syllable Hmat" + 41113 "Yi Syllable Hmax" + 41114 "Yi Syllable Hma" + 41115 "Yi Syllable Hmap" + 41116 "Yi Syllable Hmuox" + 41117 "Yi Syllable Hmuo" + 41118 "Yi Syllable Hmuop" + 41119 "Yi Syllable Hmot" + 41120 "Yi Syllable Hmox" + 41121 "Yi Syllable Hmo" + 41122 "Yi Syllable Hmop" + 41123 "Yi Syllable Hmut" + 41124 "Yi Syllable Hmux" + 41125 "Yi Syllable Hmu" + 41126 "Yi Syllable Hmup" + 41127 "Yi Syllable Hmurx" + 41128 "Yi Syllable Hmur" + 41129 "Yi Syllable Hmyx" + 41130 "Yi Syllable Hmy" + 41131 "Yi Syllable Hmyp" + 41132 "Yi Syllable Hmyrx" + 41133 "Yi Syllable Hmyr" + 41134 "Yi Syllable Mit" + 41135 "Yi Syllable Mix" + 41136 "Yi Syllable Mi" + 41137 "Yi Syllable Mip" + 41138 "Yi Syllable Miex" + 41139 "Yi Syllable Mie" + 41140 "Yi Syllable Miep" + 41141 "Yi Syllable Mat" + 41142 "Yi Syllable Max" + 41143 "Yi Syllable Ma" + 41144 "Yi Syllable Map" + 41145 "Yi Syllable Muot" + 41146 "Yi Syllable Muox" + 41147 "Yi Syllable Muo" + 41148 "Yi Syllable Muop" + 41149 "Yi Syllable Mot" + 41150 "Yi Syllable Mox" + 41151 "Yi Syllable Mo" + 41152 "Yi Syllable Mop" + 41153 "Yi Syllable Mex" + 41154 "Yi Syllable Me" + 41155 "Yi Syllable Mut" + 41156 "Yi Syllable Mux" + 41157 "Yi Syllable Mu" + 41158 "Yi Syllable Mup" + 41159 "Yi Syllable Murx" + 41160 "Yi Syllable Mur" + 41161 "Yi Syllable Myt" + 41162 "Yi Syllable Myx" + 41163 "Yi Syllable My" + 41164 "Yi Syllable Myp" + 41165 "Yi Syllable Fit" + 41166 "Yi Syllable Fix" + 41167 "Yi Syllable Fi" + 41168 "Yi Syllable Fip" + 41169 "Yi Syllable Fat" + 41170 "Yi Syllable Fax" + 41171 "Yi Syllable Fa" + 41172 "Yi Syllable Fap" + 41173 "Yi Syllable Fox" + 41174 "Yi Syllable Fo" + 41175 "Yi Syllable Fop" + 41176 "Yi Syllable Fut" + 41177 "Yi Syllable Fux" + 41178 "Yi Syllable Fu" + 41179 "Yi Syllable Fup" + 41180 "Yi Syllable Furx" + 41181 "Yi Syllable Fur" + 41182 "Yi Syllable Fyt" + 41183 "Yi Syllable Fyx" + 41184 "Yi Syllable Fy" + 41185 "Yi Syllable Fyp" + 41186 "Yi Syllable Vit" + 41187 "Yi Syllable Vix" + 41188 "Yi Syllable Vi" + 41189 "Yi Syllable Vip" + 41190 "Yi Syllable Viet" + 41191 "Yi Syllable Viex" + 41192 "Yi Syllable Vie" + 41193 "Yi Syllable Viep" + 41194 "Yi Syllable Vat" + 41195 "Yi Syllable Vax" + 41196 "Yi Syllable Va" + 41197 "Yi Syllable Vap" + 41198 "Yi Syllable Vot" + 41199 "Yi Syllable Vox" + 41200 "Yi Syllable Vo" + 41201 "Yi Syllable Vop" + 41202 "Yi Syllable Vex" + 41203 "Yi Syllable Vep" + 41204 "Yi Syllable Vut" + 41205 "Yi Syllable Vux" + 41206 "Yi Syllable Vu" + 41207 "Yi Syllable Vup" + 41208 "Yi Syllable Vurx" + 41209 "Yi Syllable Vur" + 41210 "Yi Syllable Vyt" + 41211 "Yi Syllable Vyx" + 41212 "Yi Syllable Vy" + 41213 "Yi Syllable Vyp" + 41214 "Yi Syllable Vyrx" + 41215 "Yi Syllable Vyr" + 41216 "Yi Syllable Dit" + 41217 "Yi Syllable Dix" + 41218 "Yi Syllable Di" + 41219 "Yi Syllable Dip" + 41220 "Yi Syllable Diex" + 41221 "Yi Syllable Die" + 41222 "Yi Syllable Diep" + 41223 "Yi Syllable Dat" + 41224 "Yi Syllable Dax" + 41225 "Yi Syllable Da" + 41226 "Yi Syllable Dap" + 41227 "Yi Syllable Duox" + 41228 "Yi Syllable Duo" + 41229 "Yi Syllable Dot" + 41230 "Yi Syllable Dox" + 41231 "Yi Syllable Do" + 41232 "Yi Syllable Dop" + 41233 "Yi Syllable Dex" + 41234 "Yi Syllable De" + 41235 "Yi Syllable Dep" + 41236 "Yi Syllable Dut" + 41237 "Yi Syllable Dux" + 41238 "Yi Syllable Du" + 41239 "Yi Syllable Dup" + 41240 "Yi Syllable Durx" + 41241 "Yi Syllable Dur" + 41242 "Yi Syllable Tit" + 41243 "Yi Syllable Tix" + 41244 "Yi Syllable Ti" + 41245 "Yi Syllable Tip" + 41246 "Yi Syllable Tiex" + 41247 "Yi Syllable Tie" + 41248 "Yi Syllable Tiep" + 41249 "Yi Syllable Tat" + 41250 "Yi Syllable Tax" + 41251 "Yi Syllable Ta" + 41252 "Yi Syllable Tap" + 41253 "Yi Syllable Tuot" + 41254 "Yi Syllable Tuox" + 41255 "Yi Syllable Tuo" + 41256 "Yi Syllable Tuop" + 41257 "Yi Syllable Tot" + 41258 "Yi Syllable Tox" + 41259 "Yi Syllable To" + 41260 "Yi Syllable Top" + 41261 "Yi Syllable Tex" + 41262 "Yi Syllable Te" + 41263 "Yi Syllable Tep" + 41264 "Yi Syllable Tut" + 41265 "Yi Syllable Tux" + 41266 "Yi Syllable Tu" + 41267 "Yi Syllable Tup" + 41268 "Yi Syllable Turx" + 41269 "Yi Syllable Tur" + 41270 "Yi Syllable Ddit" + 41271 "Yi Syllable Ddix" + 41272 "Yi Syllable Ddi" + 41273 "Yi Syllable Ddip" + 41274 "Yi Syllable Ddiex" + 41275 "Yi Syllable Ddie" + 41276 "Yi Syllable Ddiep" + 41277 "Yi Syllable Ddat" + 41278 "Yi Syllable Ddax" + 41279 "Yi Syllable Dda" + 41280 "Yi Syllable Ddap" + 41281 "Yi Syllable Dduox" + 41282 "Yi Syllable Dduo" + 41283 "Yi Syllable Dduop" + 41284 "Yi Syllable Ddot" + 41285 "Yi Syllable Ddox" + 41286 "Yi Syllable Ddo" + 41287 "Yi Syllable Ddop" + 41288 "Yi Syllable Ddex" + 41289 "Yi Syllable Dde" + 41290 "Yi Syllable Ddep" + 41291 "Yi Syllable Ddut" + 41292 "Yi Syllable Ddux" + 41293 "Yi Syllable Ddu" + 41294 "Yi Syllable Ddup" + 41295 "Yi Syllable Ddurx" + 41296 "Yi Syllable Ddur" + 41297 "Yi Syllable Ndit" + 41298 "Yi Syllable Ndix" + 41299 "Yi Syllable Ndi" + 41300 "Yi Syllable Ndip" + 41301 "Yi Syllable Ndiex" + 41302 "Yi Syllable Ndie" + 41303 "Yi Syllable Ndat" + 41304 "Yi Syllable Ndax" + 41305 "Yi Syllable Nda" + 41306 "Yi Syllable Ndap" + 41307 "Yi Syllable Ndot" + 41308 "Yi Syllable Ndox" + 41309 "Yi Syllable Ndo" + 41310 "Yi Syllable Ndop" + 41311 "Yi Syllable Ndex" + 41312 "Yi Syllable Nde" + 41313 "Yi Syllable Ndep" + 41314 "Yi Syllable Ndut" + 41315 "Yi Syllable Ndux" + 41316 "Yi Syllable Ndu" + 41317 "Yi Syllable Ndup" + 41318 "Yi Syllable Ndurx" + 41319 "Yi Syllable Ndur" + 41320 "Yi Syllable Hnit" + 41321 "Yi Syllable Hnix" + 41322 "Yi Syllable Hni" + 41323 "Yi Syllable Hnip" + 41324 "Yi Syllable Hniet" + 41325 "Yi Syllable Hniex" + 41326 "Yi Syllable Hnie" + 41327 "Yi Syllable Hniep" + 41328 "Yi Syllable Hnat" + 41329 "Yi Syllable Hnax" + 41330 "Yi Syllable Hna" + 41331 "Yi Syllable Hnap" + 41332 "Yi Syllable Hnuox" + 41333 "Yi Syllable Hnuo" + 41334 "Yi Syllable Hnot" + 41335 "Yi Syllable Hnox" + 41336 "Yi Syllable Hnop" + 41337 "Yi Syllable Hnex" + 41338 "Yi Syllable Hne" + 41339 "Yi Syllable Hnep" + 41340 "Yi Syllable Hnut" + 41341 "Yi Syllable Nit" + 41342 "Yi Syllable Nix" + 41343 "Yi Syllable Ni" + 41344 "Yi Syllable Nip" + 41345 "Yi Syllable Niex" + 41346 "Yi Syllable Nie" + 41347 "Yi Syllable Niep" + 41348 "Yi Syllable Nax" + 41349 "Yi Syllable Na" + 41350 "Yi Syllable Nap" + 41351 "Yi Syllable Nuox" + 41352 "Yi Syllable Nuo" + 41353 "Yi Syllable Nuop" + 41354 "Yi Syllable Not" + 41355 "Yi Syllable Nox" + 41356 "Yi Syllable No" + 41357 "Yi Syllable Nop" + 41358 "Yi Syllable Nex" + 41359 "Yi Syllable Ne" + 41360 "Yi Syllable Nep" + 41361 "Yi Syllable Nut" + 41362 "Yi Syllable Nux" + 41363 "Yi Syllable Nu" + 41364 "Yi Syllable Nup" + 41365 "Yi Syllable Nurx" + 41366 "Yi Syllable Nur" + 41367 "Yi Syllable Hlit" + 41368 "Yi Syllable Hlix" + 41369 "Yi Syllable Hli" + 41370 "Yi Syllable Hlip" + 41371 "Yi Syllable Hliex" + 41372 "Yi Syllable Hlie" + 41373 "Yi Syllable Hliep" + 41374 "Yi Syllable Hlat" + 41375 "Yi Syllable Hlax" + 41376 "Yi Syllable Hla" + 41377 "Yi Syllable Hlap" + 41378 "Yi Syllable Hluox" + 41379 "Yi Syllable Hluo" + 41380 "Yi Syllable Hluop" + 41381 "Yi Syllable Hlox" + 41382 "Yi Syllable Hlo" + 41383 "Yi Syllable Hlop" + 41384 "Yi Syllable Hlex" + 41385 "Yi Syllable Hle" + 41386 "Yi Syllable Hlep" + 41387 "Yi Syllable Hlut" + 41388 "Yi Syllable Hlux" + 41389 "Yi Syllable Hlu" + 41390 "Yi Syllable Hlup" + 41391 "Yi Syllable Hlurx" + 41392 "Yi Syllable Hlur" + 41393 "Yi Syllable Hlyt" + 41394 "Yi Syllable Hlyx" + 41395 "Yi Syllable Hly" + 41396 "Yi Syllable Hlyp" + 41397 "Yi Syllable Hlyrx" + 41398 "Yi Syllable Hlyr" + 41399 "Yi Syllable Lit" + 41400 "Yi Syllable Lix" + 41401 "Yi Syllable Li" + 41402 "Yi Syllable Lip" + 41403 "Yi Syllable Liet" + 41404 "Yi Syllable Liex" + 41405 "Yi Syllable Lie" + 41406 "Yi Syllable Liep" + 41407 "Yi Syllable Lat" + 41408 "Yi Syllable Lax" + 41409 "Yi Syllable La" + 41410 "Yi Syllable Lap" + 41411 "Yi Syllable Luot" + 41412 "Yi Syllable Luox" + 41413 "Yi Syllable Luo" + 41414 "Yi Syllable Luop" + 41415 "Yi Syllable Lot" + 41416 "Yi Syllable Lox" + 41417 "Yi Syllable Lo" + 41418 "Yi Syllable Lop" + 41419 "Yi Syllable Lex" + 41420 "Yi Syllable Le" + 41421 "Yi Syllable Lep" + 41422 "Yi Syllable Lut" + 41423 "Yi Syllable Lux" + 41424 "Yi Syllable Lu" + 41425 "Yi Syllable Lup" + 41426 "Yi Syllable Lurx" + 41427 "Yi Syllable Lur" + 41428 "Yi Syllable Lyt" + 41429 "Yi Syllable Lyx" + 41430 "Yi Syllable Ly" + 41431 "Yi Syllable Lyp" + 41432 "Yi Syllable Lyrx" + 41433 "Yi Syllable Lyr" + 41434 "Yi Syllable Git" + 41435 "Yi Syllable Gix" + 41436 "Yi Syllable Gi" + 41437 "Yi Syllable Gip" + 41438 "Yi Syllable Giet" + 41439 "Yi Syllable Giex" + 41440 "Yi Syllable Gie" + 41441 "Yi Syllable Giep" + 41442 "Yi Syllable Gat" + 41443 "Yi Syllable Gax" + 41444 "Yi Syllable Ga" + 41445 "Yi Syllable Gap" + 41446 "Yi Syllable Guot" + 41447 "Yi Syllable Guox" + 41448 "Yi Syllable Guo" + 41449 "Yi Syllable Guop" + 41450 "Yi Syllable Got" + 41451 "Yi Syllable Gox" + 41452 "Yi Syllable Go" + 41453 "Yi Syllable Gop" + 41454 "Yi Syllable Get" + 41455 "Yi Syllable Gex" + 41456 "Yi Syllable Ge" + 41457 "Yi Syllable Gep" + 41458 "Yi Syllable Gut" + 41459 "Yi Syllable Gux" + 41460 "Yi Syllable Gu" + 41461 "Yi Syllable Gup" + 41462 "Yi Syllable Gurx" + 41463 "Yi Syllable Gur" + 41464 "Yi Syllable Kit" + 41465 "Yi Syllable Kix" + 41466 "Yi Syllable Ki" + 41467 "Yi Syllable Kip" + 41468 "Yi Syllable Kiex" + 41469 "Yi Syllable Kie" + 41470 "Yi Syllable Kiep" + 41471 "Yi Syllable Kat" + 41472 "Yi Syllable Kax" + 41473 "Yi Syllable Ka" + 41474 "Yi Syllable Kap" + 41475 "Yi Syllable Kuox" + 41476 "Yi Syllable Kuo" + 41477 "Yi Syllable Kuop" + 41478 "Yi Syllable Kot" + 41479 "Yi Syllable Kox" + 41480 "Yi Syllable Ko" + 41481 "Yi Syllable Kop" + 41482 "Yi Syllable Ket" + 41483 "Yi Syllable Kex" + 41484 "Yi Syllable Ke" + 41485 "Yi Syllable Kep" + 41486 "Yi Syllable Kut" + 41487 "Yi Syllable Kux" + 41488 "Yi Syllable Ku" + 41489 "Yi Syllable Kup" + 41490 "Yi Syllable Kurx" + 41491 "Yi Syllable Kur" + 41492 "Yi Syllable Ggit" + 41493 "Yi Syllable Ggix" + 41494 "Yi Syllable Ggi" + 41495 "Yi Syllable Ggiex" + 41496 "Yi Syllable Ggie" + 41497 "Yi Syllable Ggiep" + 41498 "Yi Syllable Ggat" + 41499 "Yi Syllable Ggax" + 41500 "Yi Syllable Gga" + 41501 "Yi Syllable Ggap" + 41502 "Yi Syllable Gguot" + 41503 "Yi Syllable Gguox" + 41504 "Yi Syllable Gguo" + 41505 "Yi Syllable Gguop" + 41506 "Yi Syllable Ggot" + 41507 "Yi Syllable Ggox" + 41508 "Yi Syllable Ggo" + 41509 "Yi Syllable Ggop" + 41510 "Yi Syllable Gget" + 41511 "Yi Syllable Ggex" + 41512 "Yi Syllable Gge" + 41513 "Yi Syllable Ggep" + 41514 "Yi Syllable Ggut" + 41515 "Yi Syllable Ggux" + 41516 "Yi Syllable Ggu" + 41517 "Yi Syllable Ggup" + 41518 "Yi Syllable Ggurx" + 41519 "Yi Syllable Ggur" + 41520 "Yi Syllable Mgiex" + 41521 "Yi Syllable Mgie" + 41522 "Yi Syllable Mgat" + 41523 "Yi Syllable Mgax" + 41524 "Yi Syllable Mga" + 41525 "Yi Syllable Mgap" + 41526 "Yi Syllable Mguox" + 41527 "Yi Syllable Mguo" + 41528 "Yi Syllable Mguop" + 41529 "Yi Syllable Mgot" + 41530 "Yi Syllable Mgox" + 41531 "Yi Syllable Mgo" + 41532 "Yi Syllable Mgop" + 41533 "Yi Syllable Mgex" + 41534 "Yi Syllable Mge" + 41535 "Yi Syllable Mgep" + 41536 "Yi Syllable Mgut" + 41537 "Yi Syllable Mgux" + 41538 "Yi Syllable Mgu" + 41539 "Yi Syllable Mgup" + 41540 "Yi Syllable Mgurx" + 41541 "Yi Syllable Mgur" + 41542 "Yi Syllable Hxit" + 41543 "Yi Syllable Hxix" + 41544 "Yi Syllable Hxi" + 41545 "Yi Syllable Hxip" + 41546 "Yi Syllable Hxiet" + 41547 "Yi Syllable Hxiex" + 41548 "Yi Syllable Hxie" + 41549 "Yi Syllable Hxiep" + 41550 "Yi Syllable Hxat" + 41551 "Yi Syllable Hxax" + 41552 "Yi Syllable Hxa" + 41553 "Yi Syllable Hxap" + 41554 "Yi Syllable Hxuot" + 41555 "Yi Syllable Hxuox" + 41556 "Yi Syllable Hxuo" + 41557 "Yi Syllable Hxuop" + 41558 "Yi Syllable Hxot" + 41559 "Yi Syllable Hxox" + 41560 "Yi Syllable Hxo" + 41561 "Yi Syllable Hxop" + 41562 "Yi Syllable Hxex" + 41563 "Yi Syllable Hxe" + 41564 "Yi Syllable Hxep" + 41565 "Yi Syllable Ngiex" + 41566 "Yi Syllable Ngie" + 41567 "Yi Syllable Ngiep" + 41568 "Yi Syllable Ngat" + 41569 "Yi Syllable Ngax" + 41570 "Yi Syllable Nga" + 41571 "Yi Syllable Ngap" + 41572 "Yi Syllable Nguot" + 41573 "Yi Syllable Nguox" + 41574 "Yi Syllable Nguo" + 41575 "Yi Syllable Ngot" + 41576 "Yi Syllable Ngox" + 41577 "Yi Syllable Ngo" + 41578 "Yi Syllable Ngop" + 41579 "Yi Syllable Ngex" + 41580 "Yi Syllable Nge" + 41581 "Yi Syllable Ngep" + 41582 "Yi Syllable Hit" + 41583 "Yi Syllable Hiex" + 41584 "Yi Syllable Hie" + 41585 "Yi Syllable Hat" + 41586 "Yi Syllable Hax" + 41587 "Yi Syllable Ha" + 41588 "Yi Syllable Hap" + 41589 "Yi Syllable Huot" + 41590 "Yi Syllable Huox" + 41591 "Yi Syllable Huo" + 41592 "Yi Syllable Huop" + 41593 "Yi Syllable Hot" + 41594 "Yi Syllable Hox" + 41595 "Yi Syllable Ho" + 41596 "Yi Syllable Hop" + 41597 "Yi Syllable Hex" + 41598 "Yi Syllable He" + 41599 "Yi Syllable Hep" + 41600 "Yi Syllable Wat" + 41601 "Yi Syllable Wax" + 41602 "Yi Syllable Wa" + 41603 "Yi Syllable Wap" + 41604 "Yi Syllable Wuox" + 41605 "Yi Syllable Wuo" + 41606 "Yi Syllable Wuop" + 41607 "Yi Syllable Wox" + 41608 "Yi Syllable Wo" + 41609 "Yi Syllable Wop" + 41610 "Yi Syllable Wex" + 41611 "Yi Syllable We" + 41612 "Yi Syllable Wep" + 41613 "Yi Syllable Zit" + 41614 "Yi Syllable Zix" + 41615 "Yi Syllable Zi" + 41616 "Yi Syllable Zip" + 41617 "Yi Syllable Ziex" + 41618 "Yi Syllable Zie" + 41619 "Yi Syllable Ziep" + 41620 "Yi Syllable Zat" + 41621 "Yi Syllable Zax" + 41622 "Yi Syllable Za" + 41623 "Yi Syllable Zap" + 41624 "Yi Syllable Zuox" + 41625 "Yi Syllable Zuo" + 41626 "Yi Syllable Zuop" + 41627 "Yi Syllable Zot" + 41628 "Yi Syllable Zox" + 41629 "Yi Syllable Zo" + 41630 "Yi Syllable Zop" + 41631 "Yi Syllable Zex" + 41632 "Yi Syllable Ze" + 41633 "Yi Syllable Zep" + 41634 "Yi Syllable Zut" + 41635 "Yi Syllable Zux" + 41636 "Yi Syllable Zu" + 41637 "Yi Syllable Zup" + 41638 "Yi Syllable Zurx" + 41639 "Yi Syllable Zur" + 41640 "Yi Syllable Zyt" + 41641 "Yi Syllable Zyx" + 41642 "Yi Syllable Zy" + 41643 "Yi Syllable Zyp" + 41644 "Yi Syllable Zyrx" + 41645 "Yi Syllable Zyr" + 41646 "Yi Syllable Cit" + 41647 "Yi Syllable Cix" + 41648 "Yi Syllable Ci" + 41649 "Yi Syllable Cip" + 41650 "Yi Syllable Ciet" + 41651 "Yi Syllable Ciex" + 41652 "Yi Syllable Cie" + 41653 "Yi Syllable Ciep" + 41654 "Yi Syllable Cat" + 41655 "Yi Syllable Cax" + 41656 "Yi Syllable Ca" + 41657 "Yi Syllable Cap" + 41658 "Yi Syllable Cuox" + 41659 "Yi Syllable Cuo" + 41660 "Yi Syllable Cuop" + 41661 "Yi Syllable Cot" + 41662 "Yi Syllable Cox" + 41663 "Yi Syllable Co" + 41664 "Yi Syllable Cop" + 41665 "Yi Syllable Cex" + 41666 "Yi Syllable Ce" + 41667 "Yi Syllable Cep" + 41668 "Yi Syllable Cut" + 41669 "Yi Syllable Cux" + 41670 "Yi Syllable Cu" + 41671 "Yi Syllable Cup" + 41672 "Yi Syllable Curx" + 41673 "Yi Syllable Cur" + 41674 "Yi Syllable Cyt" + 41675 "Yi Syllable Cyx" + 41676 "Yi Syllable Cy" + 41677 "Yi Syllable Cyp" + 41678 "Yi Syllable Cyrx" + 41679 "Yi Syllable Cyr" + 41680 "Yi Syllable Zzit" + 41681 "Yi Syllable Zzix" + 41682 "Yi Syllable Zzi" + 41683 "Yi Syllable Zzip" + 41684 "Yi Syllable Zziet" + 41685 "Yi Syllable Zziex" + 41686 "Yi Syllable Zzie" + 41687 "Yi Syllable Zziep" + 41688 "Yi Syllable Zzat" + 41689 "Yi Syllable Zzax" + 41690 "Yi Syllable Zza" + 41691 "Yi Syllable Zzap" + 41692 "Yi Syllable Zzox" + 41693 "Yi Syllable Zzo" + 41694 "Yi Syllable Zzop" + 41695 "Yi Syllable Zzex" + 41696 "Yi Syllable Zze" + 41697 "Yi Syllable Zzep" + 41698 "Yi Syllable Zzux" + 41699 "Yi Syllable Zzu" + 41700 "Yi Syllable Zzup" + 41701 "Yi Syllable Zzurx" + 41702 "Yi Syllable Zzur" + 41703 "Yi Syllable Zzyt" + 41704 "Yi Syllable Zzyx" + 41705 "Yi Syllable Zzy" + 41706 "Yi Syllable Zzyp" + 41707 "Yi Syllable Zzyrx" + 41708 "Yi Syllable Zzyr" + 41709 "Yi Syllable Nzit" + 41710 "Yi Syllable Nzix" + 41711 "Yi Syllable Nzi" + 41712 "Yi Syllable Nzip" + 41713 "Yi Syllable Nziex" + 41714 "Yi Syllable Nzie" + 41715 "Yi Syllable Nziep" + 41716 "Yi Syllable Nzat" + 41717 "Yi Syllable Nzax" + 41718 "Yi Syllable Nza" + 41719 "Yi Syllable Nzap" + 41720 "Yi Syllable Nzuox" + 41721 "Yi Syllable Nzuo" + 41722 "Yi Syllable Nzox" + 41723 "Yi Syllable Nzop" + 41724 "Yi Syllable Nzex" + 41725 "Yi Syllable Nze" + 41726 "Yi Syllable Nzux" + 41727 "Yi Syllable Nzu" + 41728 "Yi Syllable Nzup" + 41729 "Yi Syllable Nzurx" + 41730 "Yi Syllable Nzur" + 41731 "Yi Syllable Nzyt" + 41732 "Yi Syllable Nzyx" + 41733 "Yi Syllable Nzy" + 41734 "Yi Syllable Nzyp" + 41735 "Yi Syllable Nzyrx" + 41736 "Yi Syllable Nzyr" + 41737 "Yi Syllable Sit" + 41738 "Yi Syllable Six" + 41739 "Yi Syllable Si" + 41740 "Yi Syllable Sip" + 41741 "Yi Syllable Siex" + 41742 "Yi Syllable Sie" + 41743 "Yi Syllable Siep" + 41744 "Yi Syllable Sat" + 41745 "Yi Syllable Sax" + 41746 "Yi Syllable Sa" + 41747 "Yi Syllable Sap" + 41748 "Yi Syllable Suox" + 41749 "Yi Syllable Suo" + 41750 "Yi Syllable Suop" + 41751 "Yi Syllable Sot" + 41752 "Yi Syllable Sox" + 41753 "Yi Syllable So" + 41754 "Yi Syllable Sop" + 41755 "Yi Syllable Sex" + 41756 "Yi Syllable Se" + 41757 "Yi Syllable Sep" + 41758 "Yi Syllable Sut" + 41759 "Yi Syllable Sux" + 41760 "Yi Syllable Su" + 41761 "Yi Syllable Sup" + 41762 "Yi Syllable Surx" + 41763 "Yi Syllable Sur" + 41764 "Yi Syllable Syt" + 41765 "Yi Syllable Syx" + 41766 "Yi Syllable Sy" + 41767 "Yi Syllable Syp" + 41768 "Yi Syllable Syrx" + 41769 "Yi Syllable Syr" + 41770 "Yi Syllable Ssit" + 41771 "Yi Syllable Ssix" + 41772 "Yi Syllable Ssi" + 41773 "Yi Syllable Ssip" + 41774 "Yi Syllable Ssiex" + 41775 "Yi Syllable Ssie" + 41776 "Yi Syllable Ssiep" + 41777 "Yi Syllable Ssat" + 41778 "Yi Syllable Ssax" + 41779 "Yi Syllable Ssa" + 41780 "Yi Syllable Ssap" + 41781 "Yi Syllable Ssot" + 41782 "Yi Syllable Ssox" + 41783 "Yi Syllable Sso" + 41784 "Yi Syllable Ssop" + 41785 "Yi Syllable Ssex" + 41786 "Yi Syllable Sse" + 41787 "Yi Syllable Ssep" + 41788 "Yi Syllable Ssut" + 41789 "Yi Syllable Ssux" + 41790 "Yi Syllable Ssu" + 41791 "Yi Syllable Ssup" + 41792 "Yi Syllable Ssyt" + 41793 "Yi Syllable Ssyx" + 41794 "Yi Syllable Ssy" + 41795 "Yi Syllable Ssyp" + 41796 "Yi Syllable Ssyrx" + 41797 "Yi Syllable Ssyr" + 41798 "Yi Syllable Zhat" + 41799 "Yi Syllable Zhax" + 41800 "Yi Syllable Zha" + 41801 "Yi Syllable Zhap" + 41802 "Yi Syllable Zhuox" + 41803 "Yi Syllable Zhuo" + 41804 "Yi Syllable Zhuop" + 41805 "Yi Syllable Zhot" + 41806 "Yi Syllable Zhox" + 41807 "Yi Syllable Zho" + 41808 "Yi Syllable Zhop" + 41809 "Yi Syllable Zhet" + 41810 "Yi Syllable Zhex" + 41811 "Yi Syllable Zhe" + 41812 "Yi Syllable Zhep" + 41813 "Yi Syllable Zhut" + 41814 "Yi Syllable Zhux" + 41815 "Yi Syllable Zhu" + 41816 "Yi Syllable Zhup" + 41817 "Yi Syllable Zhurx" + 41818 "Yi Syllable Zhur" + 41819 "Yi Syllable Zhyt" + 41820 "Yi Syllable Zhyx" + 41821 "Yi Syllable Zhy" + 41822 "Yi Syllable Zhyp" + 41823 "Yi Syllable Zhyrx" + 41824 "Yi Syllable Zhyr" + 41825 "Yi Syllable Chat" + 41826 "Yi Syllable Chax" + 41827 "Yi Syllable Cha" + 41828 "Yi Syllable Chap" + 41829 "Yi Syllable Chuot" + 41830 "Yi Syllable Chuox" + 41831 "Yi Syllable Chuo" + 41832 "Yi Syllable Chuop" + 41833 "Yi Syllable Chot" + 41834 "Yi Syllable Chox" + 41835 "Yi Syllable Cho" + 41836 "Yi Syllable Chop" + 41837 "Yi Syllable Chet" + 41838 "Yi Syllable Chex" + 41839 "Yi Syllable Che" + 41840 "Yi Syllable Chep" + 41841 "Yi Syllable Chux" + 41842 "Yi Syllable Chu" + 41843 "Yi Syllable Chup" + 41844 "Yi Syllable Churx" + 41845 "Yi Syllable Chur" + 41846 "Yi Syllable Chyt" + 41847 "Yi Syllable Chyx" + 41848 "Yi Syllable Chy" + 41849 "Yi Syllable Chyp" + 41850 "Yi Syllable Chyrx" + 41851 "Yi Syllable Chyr" + 41852 "Yi Syllable Rrax" + 41853 "Yi Syllable Rra" + 41854 "Yi Syllable Rruox" + 41855 "Yi Syllable Rruo" + 41856 "Yi Syllable Rrot" + 41857 "Yi Syllable Rrox" + 41858 "Yi Syllable Rro" + 41859 "Yi Syllable Rrop" + 41860 "Yi Syllable Rret" + 41861 "Yi Syllable Rrex" + 41862 "Yi Syllable Rre" + 41863 "Yi Syllable Rrep" + 41864 "Yi Syllable Rrut" + 41865 "Yi Syllable Rrux" + 41866 "Yi Syllable Rru" + 41867 "Yi Syllable Rrup" + 41868 "Yi Syllable Rrurx" + 41869 "Yi Syllable Rrur" + 41870 "Yi Syllable Rryt" + 41871 "Yi Syllable Rryx" + 41872 "Yi Syllable Rry" + 41873 "Yi Syllable Rryp" + 41874 "Yi Syllable Rryrx" + 41875 "Yi Syllable Rryr" + 41876 "Yi Syllable Nrat" + 41877 "Yi Syllable Nrax" + 41878 "Yi Syllable Nra" + 41879 "Yi Syllable Nrap" + 41880 "Yi Syllable Nrox" + 41881 "Yi Syllable Nro" + 41882 "Yi Syllable Nrop" + 41883 "Yi Syllable Nret" + 41884 "Yi Syllable Nrex" + 41885 "Yi Syllable Nre" + 41886 "Yi Syllable Nrep" + 41887 "Yi Syllable Nrut" + 41888 "Yi Syllable Nrux" + 41889 "Yi Syllable Nru" + 41890 "Yi Syllable Nrup" + 41891 "Yi Syllable Nrurx" + 41892 "Yi Syllable Nrur" + 41893 "Yi Syllable Nryt" + 41894 "Yi Syllable Nryx" + 41895 "Yi Syllable Nry" + 41896 "Yi Syllable Nryp" + 41897 "Yi Syllable Nryrx" + 41898 "Yi Syllable Nryr" + 41899 "Yi Syllable Shat" + 41900 "Yi Syllable Shax" + 41901 "Yi Syllable Sha" + 41902 "Yi Syllable Shap" + 41903 "Yi Syllable Shuox" + 41904 "Yi Syllable Shuo" + 41905 "Yi Syllable Shuop" + 41906 "Yi Syllable Shot" + 41907 "Yi Syllable Shox" + 41908 "Yi Syllable Sho" + 41909 "Yi Syllable Shop" + 41910 "Yi Syllable Shet" + 41911 "Yi Syllable Shex" + 41912 "Yi Syllable She" + 41913 "Yi Syllable Shep" + 41914 "Yi Syllable Shut" + 41915 "Yi Syllable Shux" + 41916 "Yi Syllable Shu" + 41917 "Yi Syllable Shup" + 41918 "Yi Syllable Shurx" + 41919 "Yi Syllable Shur" + 41920 "Yi Syllable Shyt" + 41921 "Yi Syllable Shyx" + 41922 "Yi Syllable Shy" + 41923 "Yi Syllable Shyp" + 41924 "Yi Syllable Shyrx" + 41925 "Yi Syllable Shyr" + 41926 "Yi Syllable Rat" + 41927 "Yi Syllable Rax" + 41928 "Yi Syllable Ra" + 41929 "Yi Syllable Rap" + 41930 "Yi Syllable Ruox" + 41931 "Yi Syllable Ruo" + 41932 "Yi Syllable Ruop" + 41933 "Yi Syllable Rot" + 41934 "Yi Syllable Rox" + 41935 "Yi Syllable Ro" + 41936 "Yi Syllable Rop" + 41937 "Yi Syllable Rex" + 41938 "Yi Syllable Re" + 41939 "Yi Syllable Rep" + 41940 "Yi Syllable Rut" + 41941 "Yi Syllable Rux" + 41942 "Yi Syllable Ru" + 41943 "Yi Syllable Rup" + 41944 "Yi Syllable Rurx" + 41945 "Yi Syllable Rur" + 41946 "Yi Syllable Ryt" + 41947 "Yi Syllable Ryx" + 41948 "Yi Syllable Ry" + 41949 "Yi Syllable Ryp" + 41950 "Yi Syllable Ryrx" + 41951 "Yi Syllable Ryr" + 41952 "Yi Syllable Jit" + 41953 "Yi Syllable Jix" + 41954 "Yi Syllable Ji" + 41955 "Yi Syllable Jip" + 41956 "Yi Syllable Jiet" + 41957 "Yi Syllable Jiex" + 41958 "Yi Syllable Jie" + 41959 "Yi Syllable Jiep" + 41960 "Yi Syllable Juot" + 41961 "Yi Syllable Juox" + 41962 "Yi Syllable Juo" + 41963 "Yi Syllable Juop" + 41964 "Yi Syllable Jot" + 41965 "Yi Syllable Jox" + 41966 "Yi Syllable Jo" + 41967 "Yi Syllable Jop" + 41968 "Yi Syllable Jut" + 41969 "Yi Syllable Jux" + 41970 "Yi Syllable Ju" + 41971 "Yi Syllable Jup" + 41972 "Yi Syllable Jurx" + 41973 "Yi Syllable Jur" + 41974 "Yi Syllable Jyt" + 41975 "Yi Syllable Jyx" + 41976 "Yi Syllable Jy" + 41977 "Yi Syllable Jyp" + 41978 "Yi Syllable Jyrx" + 41979 "Yi Syllable Jyr" + 41980 "Yi Syllable Qit" + 41981 "Yi Syllable Qix" + 41982 "Yi Syllable Qi" + 41983 "Yi Syllable Qip" + 41984 "Yi Syllable Qiet" + 41985 "Yi Syllable Qiex" + 41986 "Yi Syllable Qie" + 41987 "Yi Syllable Qiep" + 41988 "Yi Syllable Quot" + 41989 "Yi Syllable Quox" + 41990 "Yi Syllable Quo" + 41991 "Yi Syllable Quop" + 41992 "Yi Syllable Qot" + 41993 "Yi Syllable Qox" + 41994 "Yi Syllable Qo" + 41995 "Yi Syllable Qop" + 41996 "Yi Syllable Qut" + 41997 "Yi Syllable Qux" + 41998 "Yi Syllable Qu" + 41999 "Yi Syllable Qup" + 42000 "Yi Syllable Qurx" + 42001 "Yi Syllable Qur" + 42002 "Yi Syllable Qyt" + 42003 "Yi Syllable Qyx" + 42004 "Yi Syllable Qy" + 42005 "Yi Syllable Qyp" + 42006 "Yi Syllable Qyrx" + 42007 "Yi Syllable Qyr" + 42008 "Yi Syllable Jjit" + 42009 "Yi Syllable Jjix" + 42010 "Yi Syllable Jji" + 42011 "Yi Syllable Jjip" + 42012 "Yi Syllable Jjiet" + 42013 "Yi Syllable Jjiex" + 42014 "Yi Syllable Jjie" + 42015 "Yi Syllable Jjiep" + 42016 "Yi Syllable Jjuox" + 42017 "Yi Syllable Jjuo" + 42018 "Yi Syllable Jjuop" + 42019 "Yi Syllable Jjot" + 42020 "Yi Syllable Jjox" + 42021 "Yi Syllable Jjo" + 42022 "Yi Syllable Jjop" + 42023 "Yi Syllable Jjut" + 42024 "Yi Syllable Jjux" + 42025 "Yi Syllable Jju" + 42026 "Yi Syllable Jjup" + 42027 "Yi Syllable Jjurx" + 42028 "Yi Syllable Jjur" + 42029 "Yi Syllable Jjyt" + 42030 "Yi Syllable Jjyx" + 42031 "Yi Syllable Jjy" + 42032 "Yi Syllable Jjyp" + 42033 "Yi Syllable Njit" + 42034 "Yi Syllable Njix" + 42035 "Yi Syllable Nji" + 42036 "Yi Syllable Njip" + 42037 "Yi Syllable Njiet" + 42038 "Yi Syllable Njiex" + 42039 "Yi Syllable Njie" + 42040 "Yi Syllable Njiep" + 42041 "Yi Syllable Njuox" + 42042 "Yi Syllable Njuo" + 42043 "Yi Syllable Njot" + 42044 "Yi Syllable Njox" + 42045 "Yi Syllable Njo" + 42046 "Yi Syllable Njop" + 42047 "Yi Syllable Njux" + 42048 "Yi Syllable Nju" + 42049 "Yi Syllable Njup" + 42050 "Yi Syllable Njurx" + 42051 "Yi Syllable Njur" + 42052 "Yi Syllable Njyt" + 42053 "Yi Syllable Njyx" + 42054 "Yi Syllable Njy" + 42055 "Yi Syllable Njyp" + 42056 "Yi Syllable Njyrx" + 42057 "Yi Syllable Njyr" + 42058 "Yi Syllable Nyit" + 42059 "Yi Syllable Nyix" + 42060 "Yi Syllable Nyi" + 42061 "Yi Syllable Nyip" + 42062 "Yi Syllable Nyiet" + 42063 "Yi Syllable Nyiex" + 42064 "Yi Syllable Nyie" + 42065 "Yi Syllable Nyiep" + 42066 "Yi Syllable Nyuox" + 42067 "Yi Syllable Nyuo" + 42068 "Yi Syllable Nyuop" + 42069 "Yi Syllable Nyot" + 42070 "Yi Syllable Nyox" + 42071 "Yi Syllable Nyo" + 42072 "Yi Syllable Nyop" + 42073 "Yi Syllable Nyut" + 42074 "Yi Syllable Nyux" + 42075 "Yi Syllable Nyu" + 42076 "Yi Syllable Nyup" + 42077 "Yi Syllable Xit" + 42078 "Yi Syllable Xix" + 42079 "Yi Syllable Xi" + 42080 "Yi Syllable Xip" + 42081 "Yi Syllable Xiet" + 42082 "Yi Syllable Xiex" + 42083 "Yi Syllable Xie" + 42084 "Yi Syllable Xiep" + 42085 "Yi Syllable Xuox" + 42086 "Yi Syllable Xuo" + 42087 "Yi Syllable Xot" + 42088 "Yi Syllable Xox" + 42089 "Yi Syllable Xo" + 42090 "Yi Syllable Xop" + 42091 "Yi Syllable Xyt" + 42092 "Yi Syllable Xyx" + 42093 "Yi Syllable Xy" + 42094 "Yi Syllable Xyp" + 42095 "Yi Syllable Xyrx" + 42096 "Yi Syllable Xyr" + 42097 "Yi Syllable Yit" + 42098 "Yi Syllable Yix" + 42099 "Yi Syllable Yi" + 42100 "Yi Syllable Yip" + 42101 "Yi Syllable Yiet" + 42102 "Yi Syllable Yiex" + 42103 "Yi Syllable Yie" + 42104 "Yi Syllable Yiep" + 42105 "Yi Syllable Yuot" + 42106 "Yi Syllable Yuox" + 42107 "Yi Syllable Yuo" + 42108 "Yi Syllable Yuop" + 42109 "Yi Syllable Yot" + 42110 "Yi Syllable Yox" + 42111 "Yi Syllable Yo" + 42112 "Yi Syllable Yop" + 42113 "Yi Syllable Yut" + 42114 "Yi Syllable Yux" + 42115 "Yi Syllable Yu" + 42116 "Yi Syllable Yup" + 42117 "Yi Syllable Yurx" + 42118 "Yi Syllable Yur" + 42119 "Yi Syllable Yyt" + 42120 "Yi Syllable Yyx" + 42121 "Yi Syllable Yy" + 42122 "Yi Syllable Yyp" + 42123 "Yi Syllable Yyrx" + 42124 "Yi Syllable Yyr" + 42128 "Yi Radical Qot" + 42129 "Yi Radical Li" + 42130 "Yi Radical Kit" + 42131 "Yi Radical Nyip" + 42132 "Yi Radical Cyp" + 42133 "Yi Radical Ssi" + 42134 "Yi Radical Ggop" + 42135 "Yi Radical Gep" + 42136 "Yi Radical Mi" + 42137 "Yi Radical Hxit" + 42138 "Yi Radical Lyr" + 42139 "Yi Radical Bbut" + 42140 "Yi Radical Mop" + 42141 "Yi Radical Yo" + 42142 "Yi Radical Put" + 42143 "Yi Radical Hxuo" + 42144 "Yi Radical Tat" + 42145 "Yi Radical Ga" + 42146 "Yi Radical Zup" + 42147 "Yi Radical Cyt" + 42148 "Yi Radical Ddur" + 42149 "Yi Radical Bur" + 42150 "Yi Radical Gguo" + 42151 "Yi Radical Nyop" + 42152 "Yi Radical Tu" + 42153 "Yi Radical Op" + 42154 "Yi Radical Jjut" + 42155 "Yi Radical Zot" + 42156 "Yi Radical Pyt" + 42157 "Yi Radical Hmo" + 42158 "Yi Radical Yit" + 42159 "Yi Radical Vur" + 42160 "Yi Radical Shy" + 42161 "Yi Radical Vep" + 42162 "Yi Radical Za" + 42163 "Yi Radical Jo" + 42164 "Yi Radical Nzup" + 42165 "Yi Radical Jjy" + 42166 "Yi Radical Got" + 42167 "Yi Radical Jjie" + 42168 "Yi Radical Wo" + 42169 "Yi Radical Du" + 42170 "Yi Radical Shur" + 42171 "Yi Radical Lie" + 42172 "Yi Radical Cy" + 42173 "Yi Radical Cuop" + 42174 "Yi Radical Cip" + 42175 "Yi Radical Hxop" + 42176 "Yi Radical Shat" + 42177 "Yi Radical Zur" + 42178 "Yi Radical Shop" + 42179 "Yi Radical Che" + 42180 "Yi Radical Zziet" + 42181 "Yi Radical Nbie" + 42182 "Yi Radical Ke" + 42192 "Lisu Letter Ba" + 42193 "Lisu Letter Pa" + 42194 "Lisu Letter Pha" + 42195 "Lisu Letter Da" + 42196 "Lisu Letter Ta" + 42197 "Lisu Letter Tha" + 42198 "Lisu Letter Ga" + 42199 "Lisu Letter Ka" + 42200 "Lisu Letter Kha" + 42201 "Lisu Letter Ja" + 42202 "Lisu Letter Ca" + 42203 "Lisu Letter Cha" + 42204 "Lisu Letter Dza" + 42205 "Lisu Letter Tsa" + 42206 "Lisu Letter Tsha" + 42207 "Lisu Letter Ma" + 42208 "Lisu Letter Na" + 42209 "Lisu Letter La" + 42210 "Lisu Letter Sa" + 42211 "Lisu Letter Zha" + 42212 "Lisu Letter Za" + 42213 "Lisu Letter Nga" + 42214 "Lisu Letter Ha" + 42215 "Lisu Letter Xa" + 42216 "Lisu Letter Hha" + 42217 "Lisu Letter Fa" + 42218 "Lisu Letter Wa" + 42219 "Lisu Letter Sha" + 42220 "Lisu Letter Ya" + 42221 "Lisu Letter Gha" + 42222 "Lisu Letter A" + 42223 "Lisu Letter Ae" + 42224 "Lisu Letter E" + 42225 "Lisu Letter Eu" + 42226 "Lisu Letter I" + 42227 "Lisu Letter O" + 42228 "Lisu Letter U" + 42229 "Lisu Letter Ue" + 42230 "Lisu Letter Uh" + 42231 "Lisu Letter Oe" + 42232 "Lisu Letter Tone Mya Ti" + 42233 "Lisu Letter Tone Na Po" + 42234 "Lisu Letter Tone Mya Cya" + 42235 "Lisu Letter Tone Mya Bo" + 42236 "Lisu Letter Tone Mya Na" + 42237 "Lisu Letter Tone Mya Jeu" + 42238 "Lisu Punctuation Comma" + 42239 "Lisu Punctuation Full Stop" + 42240 "Vai Syllable Ee" + 42241 "Vai Syllable Een" + 42242 "Vai Syllable Hee" + 42243 "Vai Syllable Wee" + 42244 "Vai Syllable Ween" + 42245 "Vai Syllable Pee" + 42246 "Vai Syllable Bhee" + 42247 "Vai Syllable Bee" + 42248 "Vai Syllable Mbee" + 42249 "Vai Syllable Kpee" + 42250 "Vai Syllable Mgbee" + 42251 "Vai Syllable Gbee" + 42252 "Vai Syllable Fee" + 42253 "Vai Syllable Vee" + 42254 "Vai Syllable Tee" + 42255 "Vai Syllable Thee" + 42256 "Vai Syllable Dhee" + 42257 "Vai Syllable Dhhee" + 42258 "Vai Syllable Lee" + 42259 "Vai Syllable Ree" + 42260 "Vai Syllable Dee" + 42261 "Vai Syllable Ndee" + 42262 "Vai Syllable See" + 42263 "Vai Syllable Shee" + 42264 "Vai Syllable Zee" + 42265 "Vai Syllable Zhee" + 42266 "Vai Syllable Cee" + 42267 "Vai Syllable Jee" + 42268 "Vai Syllable Njee" + 42269 "Vai Syllable Yee" + 42270 "Vai Syllable Kee" + 42271 "Vai Syllable Nggee" + 42272 "Vai Syllable Gee" + 42273 "Vai Syllable Mee" + 42274 "Vai Syllable Nee" + 42275 "Vai Syllable Nyee" + 42276 "Vai Syllable I" + 42277 "Vai Syllable In" + 42278 "Vai Syllable Hi" + 42279 "Vai Syllable Hin" + 42280 "Vai Syllable Wi" + 42281 "Vai Syllable Win" + 42282 "Vai Syllable Pi" + 42283 "Vai Syllable Bhi" + 42284 "Vai Syllable Bi" + 42285 "Vai Syllable Mbi" + 42286 "Vai Syllable Kpi" + 42287 "Vai Syllable Mgbi" + 42288 "Vai Syllable Gbi" + 42289 "Vai Syllable Fi" + 42290 "Vai Syllable Vi" + 42291 "Vai Syllable Ti" + 42292 "Vai Syllable Thi" + 42293 "Vai Syllable Dhi" + 42294 "Vai Syllable Dhhi" + 42295 "Vai Syllable Li" + 42296 "Vai Syllable Ri" + 42297 "Vai Syllable Di" + 42298 "Vai Syllable Ndi" + 42299 "Vai Syllable Si" + 42300 "Vai Syllable Shi" + 42301 "Vai Syllable Zi" + 42302 "Vai Syllable Zhi" + 42303 "Vai Syllable Ci" + 42304 "Vai Syllable Ji" + 42305 "Vai Syllable Nji" + 42306 "Vai Syllable Yi" + 42307 "Vai Syllable Ki" + 42308 "Vai Syllable Nggi" + 42309 "Vai Syllable Gi" + 42310 "Vai Syllable Mi" + 42311 "Vai Syllable Ni" + 42312 "Vai Syllable Nyi" + 42313 "Vai Syllable A" + 42314 "Vai Syllable An" + 42315 "Vai Syllable Ngan" + 42316 "Vai Syllable Ha" + 42317 "Vai Syllable Han" + 42318 "Vai Syllable Wa" + 42319 "Vai Syllable Wan" + 42320 "Vai Syllable Pa" + 42321 "Vai Syllable Bha" + 42322 "Vai Syllable Ba" + 42323 "Vai Syllable Mba" + 42324 "Vai Syllable Kpa" + 42325 "Vai Syllable Kpan" + 42326 "Vai Syllable Mgba" + 42327 "Vai Syllable Gba" + 42328 "Vai Syllable Fa" + 42329 "Vai Syllable Va" + 42330 "Vai Syllable Ta" + 42331 "Vai Syllable Tha" + 42332 "Vai Syllable Dha" + 42333 "Vai Syllable Dhha" + 42334 "Vai Syllable La" + 42335 "Vai Syllable Ra" + 42336 "Vai Syllable Da" + 42337 "Vai Syllable Nda" + 42338 "Vai Syllable Sa" + 42339 "Vai Syllable Sha" + 42340 "Vai Syllable Za" + 42341 "Vai Syllable Zha" + 42342 "Vai Syllable Ca" + 42343 "Vai Syllable Ja" + 42344 "Vai Syllable Nja" + 42345 "Vai Syllable Ya" + 42346 "Vai Syllable Ka" + 42347 "Vai Syllable Kan" + 42348 "Vai Syllable Ngga" + 42349 "Vai Syllable Ga" + 42350 "Vai Syllable Ma" + 42351 "Vai Syllable Na" + 42352 "Vai Syllable Nya" + 42353 "Vai Syllable Oo" + 42354 "Vai Syllable Oon" + 42355 "Vai Syllable Hoo" + 42356 "Vai Syllable Woo" + 42357 "Vai Syllable Woon" + 42358 "Vai Syllable Poo" + 42359 "Vai Syllable Bhoo" + 42360 "Vai Syllable Boo" + 42361 "Vai Syllable Mboo" + 42362 "Vai Syllable Kpoo" + 42363 "Vai Syllable Mgboo" + 42364 "Vai Syllable Gboo" + 42365 "Vai Syllable Foo" + 42366 "Vai Syllable Voo" + 42367 "Vai Syllable Too" + 42368 "Vai Syllable Thoo" + 42369 "Vai Syllable Dhoo" + 42370 "Vai Syllable Dhhoo" + 42371 "Vai Syllable Loo" + 42372 "Vai Syllable Roo" + 42373 "Vai Syllable Doo" + 42374 "Vai Syllable Ndoo" + 42375 "Vai Syllable Soo" + 42376 "Vai Syllable Shoo" + 42377 "Vai Syllable Zoo" + 42378 "Vai Syllable Zhoo" + 42379 "Vai Syllable Coo" + 42380 "Vai Syllable Joo" + 42381 "Vai Syllable Njoo" + 42382 "Vai Syllable Yoo" + 42383 "Vai Syllable Koo" + 42384 "Vai Syllable Nggoo" + 42385 "Vai Syllable Goo" + 42386 "Vai Syllable Moo" + 42387 "Vai Syllable Noo" + 42388 "Vai Syllable Nyoo" + 42389 "Vai Syllable U" + 42390 "Vai Syllable Un" + 42391 "Vai Syllable Hu" + 42392 "Vai Syllable Hun" + 42393 "Vai Syllable Wu" + 42394 "Vai Syllable Wun" + 42395 "Vai Syllable Pu" + 42396 "Vai Syllable Bhu" + 42397 "Vai Syllable Bu" + 42398 "Vai Syllable Mbu" + 42399 "Vai Syllable Kpu" + 42400 "Vai Syllable Mgbu" + 42401 "Vai Syllable Gbu" + 42402 "Vai Syllable Fu" + 42403 "Vai Syllable Vu" + 42404 "Vai Syllable Tu" + 42405 "Vai Syllable Thu" + 42406 "Vai Syllable Dhu" + 42407 "Vai Syllable Dhhu" + 42408 "Vai Syllable Lu" + 42409 "Vai Syllable Ru" + 42410 "Vai Syllable Du" + 42411 "Vai Syllable Ndu" + 42412 "Vai Syllable Su" + 42413 "Vai Syllable Shu" + 42414 "Vai Syllable Zu" + 42415 "Vai Syllable Zhu" + 42416 "Vai Syllable Cu" + 42417 "Vai Syllable Ju" + 42418 "Vai Syllable Nju" + 42419 "Vai Syllable Yu" + 42420 "Vai Syllable Ku" + 42421 "Vai Syllable Nggu" + 42422 "Vai Syllable Gu" + 42423 "Vai Syllable Mu" + 42424 "Vai Syllable Nu" + 42425 "Vai Syllable Nyu" + 42426 "Vai Syllable O" + 42427 "Vai Syllable On" + 42428 "Vai Syllable Ngon" + 42429 "Vai Syllable Ho" + 42430 "Vai Syllable Hon" + 42431 "Vai Syllable Wo" + 42432 "Vai Syllable Won" + 42433 "Vai Syllable Po" + 42434 "Vai Syllable Bho" + 42435 "Vai Syllable Bo" + 42436 "Vai Syllable Mbo" + 42437 "Vai Syllable Kpo" + 42438 "Vai Syllable Mgbo" + 42439 "Vai Syllable Gbo" + 42440 "Vai Syllable Gbon" + 42441 "Vai Syllable Fo" + 42442 "Vai Syllable Vo" + 42443 "Vai Syllable To" + 42444 "Vai Syllable Tho" + 42445 "Vai Syllable Dho" + 42446 "Vai Syllable Dhho" + 42447 "Vai Syllable Lo" + 42448 "Vai Syllable Ro" + 42449 "Vai Syllable Do" + 42450 "Vai Syllable Ndo" + 42451 "Vai Syllable So" + 42452 "Vai Syllable Sho" + 42453 "Vai Syllable Zo" + 42454 "Vai Syllable Zho" + 42455 "Vai Syllable Co" + 42456 "Vai Syllable Jo" + 42457 "Vai Syllable Njo" + 42458 "Vai Syllable Yo" + 42459 "Vai Syllable Ko" + 42460 "Vai Syllable Nggo" + 42461 "Vai Syllable Go" + 42462 "Vai Syllable Mo" + 42463 "Vai Syllable No" + 42464 "Vai Syllable Nyo" + 42465 "Vai Syllable E" + 42466 "Vai Syllable En" + 42467 "Vai Syllable Ngen" + 42468 "Vai Syllable He" + 42469 "Vai Syllable Hen" + 42470 "Vai Syllable We" + 42471 "Vai Syllable Wen" + 42472 "Vai Syllable Pe" + 42473 "Vai Syllable Bhe" + 42474 "Vai Syllable Be" + 42475 "Vai Syllable Mbe" + 42476 "Vai Syllable Kpe" + 42477 "Vai Syllable Kpen" + 42478 "Vai Syllable Mgbe" + 42479 "Vai Syllable Gbe" + 42480 "Vai Syllable Gben" + 42481 "Vai Syllable Fe" + 42482 "Vai Syllable Ve" + 42483 "Vai Syllable Te" + 42484 "Vai Syllable The" + 42485 "Vai Syllable Dhe" + 42486 "Vai Syllable Dhhe" + 42487 "Vai Syllable Le" + 42488 "Vai Syllable Re" + 42489 "Vai Syllable De" + 42490 "Vai Syllable Nde" + 42491 "Vai Syllable Se" + 42492 "Vai Syllable She" + 42493 "Vai Syllable Ze" + 42494 "Vai Syllable Zhe" + 42495 "Vai Syllable Ce" + 42496 "Vai Syllable Je" + 42497 "Vai Syllable Nje" + 42498 "Vai Syllable Ye" + 42499 "Vai Syllable Ke" + 42500 "Vai Syllable Ngge" + 42501 "Vai Syllable Nggen" + 42502 "Vai Syllable Ge" + 42503 "Vai Syllable Gen" + 42504 "Vai Syllable Me" + 42505 "Vai Syllable Ne" + 42506 "Vai Syllable Nye" + 42507 "Vai Syllable Ng" + 42508 "Vai Syllable Lengthener" + 42509 "Vai Comma" + 42510 "Vai Full Stop" + 42511 "Vai Question Mark" + 42512 "Vai Syllable Ndole Fa" + 42513 "Vai Syllable Ndole Ka" + 42514 "Vai Syllable Ndole Soo" + 42515 "Vai Symbol Feeng" + 42516 "Vai Symbol Keeng" + 42517 "Vai Symbol Ting" + 42518 "Vai Symbol Nii" + 42519 "Vai Symbol Bang" + 42520 "Vai Symbol Faa" + 42521 "Vai Symbol Taa" + 42522 "Vai Symbol Dang" + 42523 "Vai Symbol Doong" + 42524 "Vai Symbol Kung" + 42525 "Vai Symbol Tong" + 42526 "Vai Symbol Do-O" + 42527 "Vai Symbol Jong" + 42528 "Vai Digit Zero" + 42529 "Vai Digit One" + 42530 "Vai Digit Two" + 42531 "Vai Digit Three" + 42532 "Vai Digit Four" + 42533 "Vai Digit Five" + 42534 "Vai Digit Six" + 42535 "Vai Digit Seven" + 42536 "Vai Digit Eight" + 42537 "Vai Digit Nine" + 42538 "Vai Syllable Ndole Ma" + 42539 "Vai Syllable Ndole Do" + 42560 "Cyrillic Capital Letter Zemlya" + 42561 "Cyrillic Small Letter Zemlya" + 42562 "Cyrillic Capital Letter Dzelo" + 42563 "Cyrillic Small Letter Dzelo" + 42564 "Cyrillic Capital Letter Reversed Dze" + 42565 "Cyrillic Small Letter Reversed Dze" + 42566 "Cyrillic Capital Letter Iota" + 42567 "Cyrillic Small Letter Iota" + 42568 "Cyrillic Capital Letter Djerv" + 42569 "Cyrillic Small Letter Djerv" + 42570 "Cyrillic Capital Letter Monograph Uk" + 42571 "Cyrillic Small Letter Monograph Uk" + 42572 "Cyrillic Capital Letter Broad Omega" + 42573 "Cyrillic Small Letter Broad Omega" + 42574 "Cyrillic Capital Letter Neutral Yer" + 42575 "Cyrillic Small Letter Neutral Yer" + 42576 "Cyrillic Capital Letter Yeru With Back Yer" + 42577 "Cyrillic Small Letter Yeru With Back Yer" + 42578 "Cyrillic Capital Letter Iotified Yat" + 42579 "Cyrillic Small Letter Iotified Yat" + 42580 "Cyrillic Capital Letter Reversed Yu" + 42581 "Cyrillic Small Letter Reversed Yu" + 42582 "Cyrillic Capital Letter Iotified A" + 42583 "Cyrillic Small Letter Iotified A" + 42584 "Cyrillic Capital Letter Closed Little Yus" + 42585 "Cyrillic Small Letter Closed Little Yus" + 42586 "Cyrillic Capital Letter Blended Yus" + 42587 "Cyrillic Small Letter Blended Yus" + 42588 "Cyrillic Capital Letter Iotified Closed Little Yus" + 42589 "Cyrillic Small Letter Iotified Closed Little Yus" + 42590 "Cyrillic Capital Letter Yn" + 42591 "Cyrillic Small Letter Yn" + 42592 "Cyrillic Capital Letter Reversed Tse" + 42593 "Cyrillic Small Letter Reversed Tse" + 42594 "Cyrillic Capital Letter Soft De" + 42595 "Cyrillic Small Letter Soft De" + 42596 "Cyrillic Capital Letter Soft El" + 42597 "Cyrillic Small Letter Soft El" + 42598 "Cyrillic Capital Letter Soft Em" + 42599 "Cyrillic Small Letter Soft Em" + 42600 "Cyrillic Capital Letter Monocular O" + 42601 "Cyrillic Small Letter Monocular O" + 42602 "Cyrillic Capital Letter Binocular O" + 42603 "Cyrillic Small Letter Binocular O" + 42604 "Cyrillic Capital Letter Double Monocular O" + 42605 "Cyrillic Small Letter Double Monocular O" + 42606 "Cyrillic Letter Multiocular O" + 42607 "Combining Cyrillic Vzmet" + 42608 "Combining Cyrillic Ten Millions Sign" + 42609 "Combining Cyrillic Hundred Millions Sign" + 42610 "Combining Cyrillic Thousand Millions Sign" + 42611 "Slavonic Asterisk" + 42612 "Combining Cyrillic Letter Ukrainian Ie" + 42613 "Combining Cyrillic Letter I" + 42614 "Combining Cyrillic Letter Yi" + 42615 "Combining Cyrillic Letter U" + 42616 "Combining Cyrillic Letter Hard Sign" + 42617 "Combining Cyrillic Letter Yeru" + 42618 "Combining Cyrillic Letter Soft Sign" + 42619 "Combining Cyrillic Letter Omega" + 42620 "Combining Cyrillic Kavyka" + 42621 "Combining Cyrillic Payerok" + 42622 "Cyrillic Kavyka" + 42623 "Cyrillic Payerok" + 42624 "Cyrillic Capital Letter Dwe" + 42625 "Cyrillic Small Letter Dwe" + 42626 "Cyrillic Capital Letter Dzwe" + 42627 "Cyrillic Small Letter Dzwe" + 42628 "Cyrillic Capital Letter Zhwe" + 42629 "Cyrillic Small Letter Zhwe" + 42630 "Cyrillic Capital Letter Cche" + 42631 "Cyrillic Small Letter Cche" + 42632 "Cyrillic Capital Letter Dzze" + 42633 "Cyrillic Small Letter Dzze" + 42634 "Cyrillic Capital Letter Te With Middle Hook" + 42635 "Cyrillic Small Letter Te With Middle Hook" + 42636 "Cyrillic Capital Letter Twe" + 42637 "Cyrillic Small Letter Twe" + 42638 "Cyrillic Capital Letter Tswe" + 42639 "Cyrillic Small Letter Tswe" + 42640 "Cyrillic Capital Letter Tsse" + 42641 "Cyrillic Small Letter Tsse" + 42642 "Cyrillic Capital Letter Tche" + 42643 "Cyrillic Small Letter Tche" + 42644 "Cyrillic Capital Letter Hwe" + 42645 "Cyrillic Small Letter Hwe" + 42646 "Cyrillic Capital Letter Shwe" + 42647 "Cyrillic Small Letter Shwe" + 42648 "Cyrillic Capital Letter Double O" + 42649 "Cyrillic Small Letter Double O" + 42650 "Cyrillic Capital Letter Crossed O" + 42651 "Cyrillic Small Letter Crossed O" + 42652 "Modifier Letter Cyrillic Hard Sign" + 42653 "Modifier Letter Cyrillic Soft Sign" + 42655 "Combining Cyrillic Letter Iotified E" + 42656 "Bamum Letter A" + 42657 "Bamum Letter Ka" + 42658 "Bamum Letter U" + 42659 "Bamum Letter Ku" + 42660 "Bamum Letter Ee" + 42661 "Bamum Letter Ree" + 42662 "Bamum Letter Tae" + 42663 "Bamum Letter O" + 42664 "Bamum Letter Nyi" + 42665 "Bamum Letter I" + 42666 "Bamum Letter La" + 42667 "Bamum Letter Pa" + 42668 "Bamum Letter Rii" + 42669 "Bamum Letter Riee" + 42670 "Bamum Letter Leeee" + 42671 "Bamum Letter Meeee" + 42672 "Bamum Letter Taa" + 42673 "Bamum Letter Ndaa" + 42674 "Bamum Letter Njaem" + 42675 "Bamum Letter M" + 42676 "Bamum Letter Suu" + 42677 "Bamum Letter Mu" + 42678 "Bamum Letter Shii" + 42679 "Bamum Letter Si" + 42680 "Bamum Letter Sheux" + 42681 "Bamum Letter Seux" + 42682 "Bamum Letter Kyee" + 42683 "Bamum Letter Ket" + 42684 "Bamum Letter Nuae" + 42685 "Bamum Letter Nu" + 42686 "Bamum Letter Njuae" + 42687 "Bamum Letter Yoq" + 42688 "Bamum Letter Shu" + 42689 "Bamum Letter Yuq" + 42690 "Bamum Letter Ya" + 42691 "Bamum Letter Nsha" + 42692 "Bamum Letter Keux" + 42693 "Bamum Letter Peux" + 42694 "Bamum Letter Njee" + 42695 "Bamum Letter Ntee" + 42696 "Bamum Letter Pue" + 42697 "Bamum Letter Wue" + 42698 "Bamum Letter Pee" + 42699 "Bamum Letter Fee" + 42700 "Bamum Letter Ru" + 42701 "Bamum Letter Lu" + 42702 "Bamum Letter Mi" + 42703 "Bamum Letter Ni" + 42704 "Bamum Letter Reux" + 42705 "Bamum Letter Rae" + 42706 "Bamum Letter Ken" + 42707 "Bamum Letter Ngkwaen" + 42708 "Bamum Letter Ngga" + 42709 "Bamum Letter Nga" + 42710 "Bamum Letter Sho" + 42711 "Bamum Letter Puae" + 42712 "Bamum Letter Fu" + 42713 "Bamum Letter Fom" + 42714 "Bamum Letter Wa" + 42715 "Bamum Letter Na" + 42716 "Bamum Letter Li" + 42717 "Bamum Letter Pi" + 42718 "Bamum Letter Loq" + 42719 "Bamum Letter Ko" + 42720 "Bamum Letter Mben" + 42721 "Bamum Letter Ren" + 42722 "Bamum Letter Men" + 42723 "Bamum Letter Ma" + 42724 "Bamum Letter Ti" + 42725 "Bamum Letter Ki" + 42726 "Bamum Letter Mo" + 42727 "Bamum Letter Mbaa" + 42728 "Bamum Letter Tet" + 42729 "Bamum Letter Kpa" + 42730 "Bamum Letter Ten" + 42731 "Bamum Letter Ntuu" + 42732 "Bamum Letter Samba" + 42733 "Bamum Letter Faamae" + 42734 "Bamum Letter Kovuu" + 42735 "Bamum Letter Koghom" + 42736 "Bamum Combining Mark Koqndon" + 42737 "Bamum Combining Mark Tukwentis" + 42738 "Bamum Njaemli" + 42739 "Bamum Full Stop" + 42740 "Bamum Colon" + 42741 "Bamum Comma" + 42742 "Bamum Semicolon" + 42743 "Bamum Question Mark" + 42752 "Modifier Letter Chinese Tone Yin Ping" + 42753 "Modifier Letter Chinese Tone Yang Ping" + 42754 "Modifier Letter Chinese Tone Yin Shang" + 42755 "Modifier Letter Chinese Tone Yang Shang" + 42756 "Modifier Letter Chinese Tone Yin Qu" + 42757 "Modifier Letter Chinese Tone Yang Qu" + 42758 "Modifier Letter Chinese Tone Yin Ru" + 42759 "Modifier Letter Chinese Tone Yang Ru" + 42760 "Modifier Letter Extra-High Dotted Tone Bar" + 42761 "Modifier Letter High Dotted Tone Bar" + 42762 "Modifier Letter Mid Dotted Tone Bar" + 42763 "Modifier Letter Low Dotted Tone Bar" + 42764 "Modifier Letter Extra-Low Dotted Tone Bar" + 42765 "Modifier Letter Extra-High Dotted Left-Stem Tone Bar" + 42766 "Modifier Letter High Dotted Left-Stem Tone Bar" + 42767 "Modifier Letter Mid Dotted Left-Stem Tone Bar" + 42768 "Modifier Letter Low Dotted Left-Stem Tone Bar" + 42769 "Modifier Letter Extra-Low Dotted Left-Stem Tone Bar" + 42770 "Modifier Letter Extra-High Left-Stem Tone Bar" + 42771 "Modifier Letter High Left-Stem Tone Bar" + 42772 "Modifier Letter Mid Left-Stem Tone Bar" + 42773 "Modifier Letter Low Left-Stem Tone Bar" + 42774 "Modifier Letter Extra-Low Left-Stem Tone Bar" + 42775 "Modifier Letter Dot Vertical Bar" + 42776 "Modifier Letter Dot Slash" + 42777 "Modifier Letter Dot Horizontal Bar" + 42778 "Modifier Letter Lower Right Corner Angle" + 42779 "Modifier Letter Raised Up Arrow" + 42780 "Modifier Letter Raised Down Arrow" + 42781 "Modifier Letter Raised Exclamation Mark" + 42782 "Modifier Letter Raised Inverted Exclamation Mark" + 42783 "Modifier Letter Low Inverted Exclamation Mark" + 42784 "Modifier Letter Stress And High Tone" + 42785 "Modifier Letter Stress And Low Tone" + 42786 "Latin Capital Letter Egyptological Alef" + 42787 "Latin Small Letter Egyptological Alef" + 42788 "Latin Capital Letter Egyptological Ain" + 42789 "Latin Small Letter Egyptological Ain" + 42790 "Latin Capital Letter Heng" + 42791 "Latin Small Letter Heng" + 42792 "Latin Capital Letter Tz" + 42793 "Latin Small Letter Tz" + 42794 "Latin Capital Letter Tresillo" + 42795 "Latin Small Letter Tresillo" + 42796 "Latin Capital Letter Cuatrillo" + 42797 "Latin Small Letter Cuatrillo" + 42798 "Latin Capital Letter Cuatrillo With Comma" + 42799 "Latin Small Letter Cuatrillo With Comma" + 42800 "Latin Letter Small Capital F" + 42801 "Latin Letter Small Capital S" + 42802 "Latin Capital Letter Aa" + 42803 "Latin Small Letter Aa" + 42804 "Latin Capital Letter Ao" + 42805 "Latin Small Letter Ao" + 42806 "Latin Capital Letter Au" + 42807 "Latin Small Letter Au" + 42808 "Latin Capital Letter Av" + 42809 "Latin Small Letter Av" + 42810 "Latin Capital Letter Av With Horizontal Bar" + 42811 "Latin Small Letter Av With Horizontal Bar" + 42812 "Latin Capital Letter Ay" + 42813 "Latin Small Letter Ay" + 42814 "Latin Capital Letter Reversed C With Dot" + 42815 "Latin Small Letter Reversed C With Dot" + 42816 "Latin Capital Letter K With Stroke" + 42817 "Latin Small Letter K With Stroke" + 42818 "Latin Capital Letter K With Diagonal Stroke" + 42819 "Latin Small Letter K With Diagonal Stroke" + 42820 "Latin Capital Letter K With Stroke And Diagonal Stroke" + 42821 "Latin Small Letter K With Stroke And Diagonal Stroke" + 42822 "Latin Capital Letter Broken L" + 42823 "Latin Small Letter Broken L" + 42824 "Latin Capital Letter L With High Stroke" + 42825 "Latin Small Letter L With High Stroke" + 42826 "Latin Capital Letter O With Long Stroke Overlay" + 42827 "Latin Small Letter O With Long Stroke Overlay" + 42828 "Latin Capital Letter O With Loop" + 42829 "Latin Small Letter O With Loop" + 42830 "Latin Capital Letter Oo" + 42831 "Latin Small Letter Oo" + 42832 "Latin Capital Letter P With Stroke Through Descender" + 42833 "Latin Small Letter P With Stroke Through Descender" + 42834 "Latin Capital Letter P With Flourish" + 42835 "Latin Small Letter P With Flourish" + 42836 "Latin Capital Letter P With Squirrel Tail" + 42837 "Latin Small Letter P With Squirrel Tail" + 42838 "Latin Capital Letter Q With Stroke Through Descender" + 42839 "Latin Small Letter Q With Stroke Through Descender" + 42840 "Latin Capital Letter Q With Diagonal Stroke" + 42841 "Latin Small Letter Q With Diagonal Stroke" + 42842 "Latin Capital Letter R Rotunda" + 42843 "Latin Small Letter R Rotunda" + 42844 "Latin Capital Letter Rum Rotunda" + 42845 "Latin Small Letter Rum Rotunda" + 42846 "Latin Capital Letter V With Diagonal Stroke" + 42847 "Latin Small Letter V With Diagonal Stroke" + 42848 "Latin Capital Letter Vy" + 42849 "Latin Small Letter Vy" + 42850 "Latin Capital Letter Visigothic Z" + 42851 "Latin Small Letter Visigothic Z" + 42852 "Latin Capital Letter Thorn With Stroke" + 42853 "Latin Small Letter Thorn With Stroke" + 42854 "Latin Capital Letter Thorn With Stroke Through Descender" + 42855 "Latin Small Letter Thorn With Stroke Through Descender" + 42856 "Latin Capital Letter Vend" + 42857 "Latin Small Letter Vend" + 42858 "Latin Capital Letter Et" + 42859 "Latin Small Letter Et" + 42860 "Latin Capital Letter Is" + 42861 "Latin Small Letter Is" + 42862 "Latin Capital Letter Con" + 42863 "Latin Small Letter Con" + 42864 "Modifier Letter Us" + 42865 "Latin Small Letter Dum" + 42866 "Latin Small Letter Lum" + 42867 "Latin Small Letter Mum" + 42868 "Latin Small Letter Num" + 42869 "Latin Small Letter Rum" + 42870 "Latin Letter Small Capital Rum" + 42871 "Latin Small Letter Tum" + 42872 "Latin Small Letter Um" + 42873 "Latin Capital Letter Insular D" + 42874 "Latin Small Letter Insular D" + 42875 "Latin Capital Letter Insular F" + 42876 "Latin Small Letter Insular F" + 42877 "Latin Capital Letter Insular G" + 42878 "Latin Capital Letter Turned Insular G" + 42879 "Latin Small Letter Turned Insular G" + 42880 "Latin Capital Letter Turned L" + 42881 "Latin Small Letter Turned L" + 42882 "Latin Capital Letter Insular R" + 42883 "Latin Small Letter Insular R" + 42884 "Latin Capital Letter Insular S" + 42885 "Latin Small Letter Insular S" + 42886 "Latin Capital Letter Insular T" + 42887 "Latin Small Letter Insular T" + 42888 "Modifier Letter Low Circumflex Accent" + 42889 "Modifier Letter Colon" + 42890 "Modifier Letter Short Equals Sign" + 42891 "Latin Capital Letter Saltillo" + 42892 "Latin Small Letter Saltillo" + 42893 "Latin Capital Letter Turned H" + 42894 "Latin Small Letter L With Retroflex Hook And Belt" + 42896 "Latin Capital Letter N With Descender" + 42897 "Latin Small Letter N With Descender" + 42898 "Latin Capital Letter C With Bar" + 42899 "Latin Small Letter C With Bar" + 42900 "Latin Small Letter C With Palatal Hook" + 42901 "Latin Small Letter H With Palatal Hook" + 42902 "Latin Capital Letter B With Flourish" + 42903 "Latin Small Letter B With Flourish" + 42904 "Latin Capital Letter F With Stroke" + 42905 "Latin Small Letter F With Stroke" + 42906 "Latin Capital Letter Volapuk Ae" + 42907 "Latin Small Letter Volapuk Ae" + 42908 "Latin Capital Letter Volapuk Oe" + 42909 "Latin Small Letter Volapuk Oe" + 42910 "Latin Capital Letter Volapuk Ue" + 42911 "Latin Small Letter Volapuk Ue" + 42912 "Latin Capital Letter G With Oblique Stroke" + 42913 "Latin Small Letter G With Oblique Stroke" + 42914 "Latin Capital Letter K With Oblique Stroke" + 42915 "Latin Small Letter K With Oblique Stroke" + 42916 "Latin Capital Letter N With Oblique Stroke" + 42917 "Latin Small Letter N With Oblique Stroke" + 42918 "Latin Capital Letter R With Oblique Stroke" + 42919 "Latin Small Letter R With Oblique Stroke" + 42920 "Latin Capital Letter S With Oblique Stroke" + 42921 "Latin Small Letter S With Oblique Stroke" + 42922 "Latin Capital Letter H With Hook" + 42923 "Latin Capital Letter Reversed Open E" + 42924 "Latin Capital Letter Script G" + 42925 "Latin Capital Letter L With Belt" + 42928 "Latin Capital Letter Turned K" + 42929 "Latin Capital Letter Turned T" + 42999 "Latin Epigraphic Letter Sideways I" + 43000 "Modifier Letter Capital H With Stroke" + 43001 "Modifier Letter Small Ligature Oe" + 43002 "Latin Letter Small Capital Turned M" + 43003 "Latin Epigraphic Letter Reversed F" + 43004 "Latin Epigraphic Letter Reversed P" + 43005 "Latin Epigraphic Letter Inverted M" + 43006 "Latin Epigraphic Letter I Longa" + 43007 "Latin Epigraphic Letter Archaic M" + 43008 "Syloti Nagri Letter A" + 43009 "Syloti Nagri Letter I" + 43010 "Syloti Nagri Sign Dvisvara" + 43011 "Syloti Nagri Letter U" + 43012 "Syloti Nagri Letter E" + 43013 "Syloti Nagri Letter O" + 43014 "Syloti Nagri Sign Hasanta" + 43015 "Syloti Nagri Letter Ko" + 43016 "Syloti Nagri Letter Kho" + 43017 "Syloti Nagri Letter Go" + 43018 "Syloti Nagri Letter Gho" + 43019 "Syloti Nagri Sign Anusvara" + 43020 "Syloti Nagri Letter Co" + 43021 "Syloti Nagri Letter Cho" + 43022 "Syloti Nagri Letter Jo" + 43023 "Syloti Nagri Letter Jho" + 43024 "Syloti Nagri Letter Tto" + 43025 "Syloti Nagri Letter Ttho" + 43026 "Syloti Nagri Letter Ddo" + 43027 "Syloti Nagri Letter Ddho" + 43028 "Syloti Nagri Letter To" + 43029 "Syloti Nagri Letter Tho" + 43030 "Syloti Nagri Letter Do" + 43031 "Syloti Nagri Letter Dho" + 43032 "Syloti Nagri Letter No" + 43033 "Syloti Nagri Letter Po" + 43034 "Syloti Nagri Letter Pho" + 43035 "Syloti Nagri Letter Bo" + 43036 "Syloti Nagri Letter Bho" + 43037 "Syloti Nagri Letter Mo" + 43038 "Syloti Nagri Letter Ro" + 43039 "Syloti Nagri Letter Lo" + 43040 "Syloti Nagri Letter Rro" + 43041 "Syloti Nagri Letter So" + 43042 "Syloti Nagri Letter Ho" + 43043 "Syloti Nagri Vowel Sign A" + 43044 "Syloti Nagri Vowel Sign I" + 43045 "Syloti Nagri Vowel Sign U" + 43046 "Syloti Nagri Vowel Sign E" + 43047 "Syloti Nagri Vowel Sign Oo" + 43048 "Syloti Nagri Poetry Mark-1" + 43049 "Syloti Nagri Poetry Mark-2" + 43050 "Syloti Nagri Poetry Mark-3" + 43051 "Syloti Nagri Poetry Mark-4" + 43056 "North Indic Fraction One Quarter" + 43057 "North Indic Fraction One Half" + 43058 "North Indic Fraction Three Quarters" + 43059 "North Indic Fraction One Sixteenth" + 43060 "North Indic Fraction One Eighth" + 43061 "North Indic Fraction Three Sixteenths" + 43062 "North Indic Quarter Mark" + 43063 "North Indic Placeholder Mark" + 43064 "North Indic Rupee Mark" + 43065 "North Indic Quantity Mark" + 43072 "Phags-Pa Letter Ka" + 43073 "Phags-Pa Letter Kha" + 43074 "Phags-Pa Letter Ga" + 43075 "Phags-Pa Letter Nga" + 43076 "Phags-Pa Letter Ca" + 43077 "Phags-Pa Letter Cha" + 43078 "Phags-Pa Letter Ja" + 43079 "Phags-Pa Letter Nya" + 43080 "Phags-Pa Letter Ta" + 43081 "Phags-Pa Letter Tha" + 43082 "Phags-Pa Letter Da" + 43083 "Phags-Pa Letter Na" + 43084 "Phags-Pa Letter Pa" + 43085 "Phags-Pa Letter Pha" + 43086 "Phags-Pa Letter Ba" + 43087 "Phags-Pa Letter Ma" + 43088 "Phags-Pa Letter Tsa" + 43089 "Phags-Pa Letter Tsha" + 43090 "Phags-Pa Letter Dza" + 43091 "Phags-Pa Letter Wa" + 43092 "Phags-Pa Letter Zha" + 43093 "Phags-Pa Letter Za" + 43094 "Phags-Pa Letter Small A" + 43095 "Phags-Pa Letter Ya" + 43096 "Phags-Pa Letter Ra" + 43097 "Phags-Pa Letter La" + 43098 "Phags-Pa Letter Sha" + 43099 "Phags-Pa Letter Sa" + 43100 "Phags-Pa Letter Ha" + 43101 "Phags-Pa Letter A" + 43102 "Phags-Pa Letter I" + 43103 "Phags-Pa Letter U" + 43104 "Phags-Pa Letter E" + 43105 "Phags-Pa Letter O" + 43106 "Phags-Pa Letter Qa" + 43107 "Phags-Pa Letter Xa" + 43108 "Phags-Pa Letter Fa" + 43109 "Phags-Pa Letter Gga" + 43110 "Phags-Pa Letter Ee" + 43111 "Phags-Pa Subjoined Letter Wa" + 43112 "Phags-Pa Subjoined Letter Ya" + 43113 "Phags-Pa Letter Tta" + 43114 "Phags-Pa Letter Ttha" + 43115 "Phags-Pa Letter Dda" + 43116 "Phags-Pa Letter Nna" + 43117 "Phags-Pa Letter Alternate Ya" + 43118 "Phags-Pa Letter Voiceless Sha" + 43119 "Phags-Pa Letter Voiced Ha" + 43120 "Phags-Pa Letter Aspirated Fa" + 43121 "Phags-Pa Subjoined Letter Ra" + 43122 "Phags-Pa Superfixed Letter Ra" + 43123 "Phags-Pa Letter Candrabindu" + 43124 "Phags-Pa Single Head Mark" + 43125 "Phags-Pa Double Head Mark" + 43126 "Phags-Pa Mark Shad" + 43127 "Phags-Pa Mark Double Shad" + 43136 "Saurashtra Sign Anusvara" + 43137 "Saurashtra Sign Visarga" + 43138 "Saurashtra Letter A" + 43139 "Saurashtra Letter Aa" + 43140 "Saurashtra Letter I" + 43141 "Saurashtra Letter Ii" + 43142 "Saurashtra Letter U" + 43143 "Saurashtra Letter Uu" + 43144 "Saurashtra Letter Vocalic R" + 43145 "Saurashtra Letter Vocalic Rr" + 43146 "Saurashtra Letter Vocalic L" + 43147 "Saurashtra Letter Vocalic Ll" + 43148 "Saurashtra Letter E" + 43149 "Saurashtra Letter Ee" + 43150 "Saurashtra Letter Ai" + 43151 "Saurashtra Letter O" + 43152 "Saurashtra Letter Oo" + 43153 "Saurashtra Letter Au" + 43154 "Saurashtra Letter Ka" + 43155 "Saurashtra Letter Kha" + 43156 "Saurashtra Letter Ga" + 43157 "Saurashtra Letter Gha" + 43158 "Saurashtra Letter Nga" + 43159 "Saurashtra Letter Ca" + 43160 "Saurashtra Letter Cha" + 43161 "Saurashtra Letter Ja" + 43162 "Saurashtra Letter Jha" + 43163 "Saurashtra Letter Nya" + 43164 "Saurashtra Letter Tta" + 43165 "Saurashtra Letter Ttha" + 43166 "Saurashtra Letter Dda" + 43167 "Saurashtra Letter Ddha" + 43168 "Saurashtra Letter Nna" + 43169 "Saurashtra Letter Ta" + 43170 "Saurashtra Letter Tha" + 43171 "Saurashtra Letter Da" + 43172 "Saurashtra Letter Dha" + 43173 "Saurashtra Letter Na" + 43174 "Saurashtra Letter Pa" + 43175 "Saurashtra Letter Pha" + 43176 "Saurashtra Letter Ba" + 43177 "Saurashtra Letter Bha" + 43178 "Saurashtra Letter Ma" + 43179 "Saurashtra Letter Ya" + 43180 "Saurashtra Letter Ra" + 43181 "Saurashtra Letter La" + 43182 "Saurashtra Letter Va" + 43183 "Saurashtra Letter Sha" + 43184 "Saurashtra Letter Ssa" + 43185 "Saurashtra Letter Sa" + 43186 "Saurashtra Letter Ha" + 43187 "Saurashtra Letter Lla" + 43188 "Saurashtra Consonant Sign Haaru" + 43189 "Saurashtra Vowel Sign Aa" + 43190 "Saurashtra Vowel Sign I" + 43191 "Saurashtra Vowel Sign Ii" + 43192 "Saurashtra Vowel Sign U" + 43193 "Saurashtra Vowel Sign Uu" + 43194 "Saurashtra Vowel Sign Vocalic R" + 43195 "Saurashtra Vowel Sign Vocalic Rr" + 43196 "Saurashtra Vowel Sign Vocalic L" + 43197 "Saurashtra Vowel Sign Vocalic Ll" + 43198 "Saurashtra Vowel Sign E" + 43199 "Saurashtra Vowel Sign Ee" + 43200 "Saurashtra Vowel Sign Ai" + 43201 "Saurashtra Vowel Sign O" + 43202 "Saurashtra Vowel Sign Oo" + 43203 "Saurashtra Vowel Sign Au" + 43204 "Saurashtra Sign Virama" + 43214 "Saurashtra Danda" + 43215 "Saurashtra Double Danda" + 43216 "Saurashtra Digit Zero" + 43217 "Saurashtra Digit One" + 43218 "Saurashtra Digit Two" + 43219 "Saurashtra Digit Three" + 43220 "Saurashtra Digit Four" + 43221 "Saurashtra Digit Five" + 43222 "Saurashtra Digit Six" + 43223 "Saurashtra Digit Seven" + 43224 "Saurashtra Digit Eight" + 43225 "Saurashtra Digit Nine" + 43232 "Combining Devanagari Digit Zero" + 43233 "Combining Devanagari Digit One" + 43234 "Combining Devanagari Digit Two" + 43235 "Combining Devanagari Digit Three" + 43236 "Combining Devanagari Digit Four" + 43237 "Combining Devanagari Digit Five" + 43238 "Combining Devanagari Digit Six" + 43239 "Combining Devanagari Digit Seven" + 43240 "Combining Devanagari Digit Eight" + 43241 "Combining Devanagari Digit Nine" + 43242 "Combining Devanagari Letter A" + 43243 "Combining Devanagari Letter U" + 43244 "Combining Devanagari Letter Ka" + 43245 "Combining Devanagari Letter Na" + 43246 "Combining Devanagari Letter Pa" + 43247 "Combining Devanagari Letter Ra" + 43248 "Combining Devanagari Letter Vi" + 43249 "Combining Devanagari Sign Avagraha" + 43250 "Devanagari Sign Spacing Candrabindu" + 43251 "Devanagari Sign Candrabindu Virama" + 43252 "Devanagari Sign Double Candrabindu Virama" + 43253 "Devanagari Sign Candrabindu Two" + 43254 "Devanagari Sign Candrabindu Three" + 43255 "Devanagari Sign Candrabindu Avagraha" + 43256 "Devanagari Sign Pushpika" + 43257 "Devanagari Gap Filler" + 43258 "Devanagari Caret" + 43259 "Devanagari Headstroke" + 43264 "Kayah Li Digit Zero" + 43265 "Kayah Li Digit One" + 43266 "Kayah Li Digit Two" + 43267 "Kayah Li Digit Three" + 43268 "Kayah Li Digit Four" + 43269 "Kayah Li Digit Five" + 43270 "Kayah Li Digit Six" + 43271 "Kayah Li Digit Seven" + 43272 "Kayah Li Digit Eight" + 43273 "Kayah Li Digit Nine" + 43274 "Kayah Li Letter Ka" + 43275 "Kayah Li Letter Kha" + 43276 "Kayah Li Letter Ga" + 43277 "Kayah Li Letter Nga" + 43278 "Kayah Li Letter Sa" + 43279 "Kayah Li Letter Sha" + 43280 "Kayah Li Letter Za" + 43281 "Kayah Li Letter Nya" + 43282 "Kayah Li Letter Ta" + 43283 "Kayah Li Letter Hta" + 43284 "Kayah Li Letter Na" + 43285 "Kayah Li Letter Pa" + 43286 "Kayah Li Letter Pha" + 43287 "Kayah Li Letter Ma" + 43288 "Kayah Li Letter Da" + 43289 "Kayah Li Letter Ba" + 43290 "Kayah Li Letter Ra" + 43291 "Kayah Li Letter Ya" + 43292 "Kayah Li Letter La" + 43293 "Kayah Li Letter Wa" + 43294 "Kayah Li Letter Tha" + 43295 "Kayah Li Letter Ha" + 43296 "Kayah Li Letter Va" + 43297 "Kayah Li Letter Ca" + 43298 "Kayah Li Letter A" + 43299 "Kayah Li Letter Oe" + 43300 "Kayah Li Letter I" + 43301 "Kayah Li Letter Oo" + 43302 "Kayah Li Vowel Ue" + 43303 "Kayah Li Vowel E" + 43304 "Kayah Li Vowel U" + 43305 "Kayah Li Vowel Ee" + 43306 "Kayah Li Vowel O" + 43307 "Kayah Li Tone Plophu" + 43308 "Kayah Li Tone Calya" + 43309 "Kayah Li Tone Calya Plophu" + 43310 "Kayah Li Sign Cwi" + 43311 "Kayah Li Sign Shya" + 43312 "Rejang Letter Ka" + 43313 "Rejang Letter Ga" + 43314 "Rejang Letter Nga" + 43315 "Rejang Letter Ta" + 43316 "Rejang Letter Da" + 43317 "Rejang Letter Na" + 43318 "Rejang Letter Pa" + 43319 "Rejang Letter Ba" + 43320 "Rejang Letter Ma" + 43321 "Rejang Letter Ca" + 43322 "Rejang Letter Ja" + 43323 "Rejang Letter Nya" + 43324 "Rejang Letter Sa" + 43325 "Rejang Letter Ra" + 43326 "Rejang Letter La" + 43327 "Rejang Letter Ya" + 43328 "Rejang Letter Wa" + 43329 "Rejang Letter Ha" + 43330 "Rejang Letter Mba" + 43331 "Rejang Letter Ngga" + 43332 "Rejang Letter Nda" + 43333 "Rejang Letter Nyja" + 43334 "Rejang Letter A" + 43335 "Rejang Vowel Sign I" + 43336 "Rejang Vowel Sign U" + 43337 "Rejang Vowel Sign E" + 43338 "Rejang Vowel Sign Ai" + 43339 "Rejang Vowel Sign O" + 43340 "Rejang Vowel Sign Au" + 43341 "Rejang Vowel Sign Eu" + 43342 "Rejang Vowel Sign Ea" + 43343 "Rejang Consonant Sign Ng" + 43344 "Rejang Consonant Sign N" + 43345 "Rejang Consonant Sign R" + 43346 "Rejang Consonant Sign H" + 43347 "Rejang Virama" + 43359 "Rejang Section Mark" + 43360 "Hangul Choseong Tikeut-Mieum" + 43361 "Hangul Choseong Tikeut-Pieup" + 43362 "Hangul Choseong Tikeut-Sios" + 43363 "Hangul Choseong Tikeut-Cieuc" + 43364 "Hangul Choseong Rieul-Kiyeok" + 43365 "Hangul Choseong Rieul-Ssangkiyeok" + 43366 "Hangul Choseong Rieul-Tikeut" + 43367 "Hangul Choseong Rieul-Ssangtikeut" + 43368 "Hangul Choseong Rieul-Mieum" + 43369 "Hangul Choseong Rieul-Pieup" + 43370 "Hangul Choseong Rieul-Ssangpieup" + 43371 "Hangul Choseong Rieul-Kapyeounpieup" + 43372 "Hangul Choseong Rieul-Sios" + 43373 "Hangul Choseong Rieul-Cieuc" + 43374 "Hangul Choseong Rieul-Khieukh" + 43375 "Hangul Choseong Mieum-Kiyeok" + 43376 "Hangul Choseong Mieum-Tikeut" + 43377 "Hangul Choseong Mieum-Sios" + 43378 "Hangul Choseong Pieup-Sios-Thieuth" + 43379 "Hangul Choseong Pieup-Khieukh" + 43380 "Hangul Choseong Pieup-Hieuh" + 43381 "Hangul Choseong Ssangsios-Pieup" + 43382 "Hangul Choseong Ieung-Rieul" + 43383 "Hangul Choseong Ieung-Hieuh" + 43384 "Hangul Choseong Ssangcieuc-Hieuh" + 43385 "Hangul Choseong Ssangthieuth" + 43386 "Hangul Choseong Phieuph-Hieuh" + 43387 "Hangul Choseong Hieuh-Sios" + 43388 "Hangul Choseong Ssangyeorinhieuh" + 43392 "Javanese Sign Panyangga" + 43393 "Javanese Sign Cecak" + 43394 "Javanese Sign Layar" + 43395 "Javanese Sign Wignyan" + 43396 "Javanese Letter A" + 43397 "Javanese Letter I Kawi" + 43398 "Javanese Letter I" + 43399 "Javanese Letter Ii" + 43400 "Javanese Letter U" + 43401 "Javanese Letter Pa Cerek" + 43402 "Javanese Letter Nga Lelet" + 43403 "Javanese Letter Nga Lelet Raswadi" + 43404 "Javanese Letter E" + 43405 "Javanese Letter Ai" + 43406 "Javanese Letter O" + 43407 "Javanese Letter Ka" + 43408 "Javanese Letter Ka Sasak" + 43409 "Javanese Letter Ka Murda" + 43410 "Javanese Letter Ga" + 43411 "Javanese Letter Ga Murda" + 43412 "Javanese Letter Nga" + 43413 "Javanese Letter Ca" + 43414 "Javanese Letter Ca Murda" + 43415 "Javanese Letter Ja" + 43416 "Javanese Letter Nya Murda" + 43417 "Javanese Letter Ja Mahaprana" + 43418 "Javanese Letter Nya" + 43419 "Javanese Letter Tta" + 43420 "Javanese Letter Tta Mahaprana" + 43421 "Javanese Letter Dda" + 43422 "Javanese Letter Dda Mahaprana" + 43423 "Javanese Letter Na Murda" + 43424 "Javanese Letter Ta" + 43425 "Javanese Letter Ta Murda" + 43426 "Javanese Letter Da" + 43427 "Javanese Letter Da Mahaprana" + 43428 "Javanese Letter Na" + 43429 "Javanese Letter Pa" + 43430 "Javanese Letter Pa Murda" + 43431 "Javanese Letter Ba" + 43432 "Javanese Letter Ba Murda" + 43433 "Javanese Letter Ma" + 43434 "Javanese Letter Ya" + 43435 "Javanese Letter Ra" + 43436 "Javanese Letter Ra Agung" + 43437 "Javanese Letter La" + 43438 "Javanese Letter Wa" + 43439 "Javanese Letter Sa Murda" + 43440 "Javanese Letter Sa Mahaprana" + 43441 "Javanese Letter Sa" + 43442 "Javanese Letter Ha" + 43443 "Javanese Sign Cecak Telu" + 43444 "Javanese Vowel Sign Tarung" + 43445 "Javanese Vowel Sign Tolong" + 43446 "Javanese Vowel Sign Wulu" + 43447 "Javanese Vowel Sign Wulu Melik" + 43448 "Javanese Vowel Sign Suku" + 43449 "Javanese Vowel Sign Suku Mendut" + 43450 "Javanese Vowel Sign Taling" + 43451 "Javanese Vowel Sign Dirga Mure" + 43452 "Javanese Vowel Sign Pepet" + 43453 "Javanese Consonant Sign Keret" + 43454 "Javanese Consonant Sign Pengkal" + 43455 "Javanese Consonant Sign Cakra" + 43456 "Javanese Pangkon" + 43457 "Javanese Left Rerenggan" + 43458 "Javanese Right Rerenggan" + 43459 "Javanese Pada Andap" + 43460 "Javanese Pada Madya" + 43461 "Javanese Pada Luhur" + 43462 "Javanese Pada Windu" + 43463 "Javanese Pada Pangkat" + 43464 "Javanese Pada Lingsa" + 43465 "Javanese Pada Lungsi" + 43466 "Javanese Pada Adeg" + 43467 "Javanese Pada Adeg Adeg" + 43468 "Javanese Pada Piseleh" + 43469 "Javanese Turned Pada Piseleh" + 43471 "Javanese Pangrangkep" + 43472 "Javanese Digit Zero" + 43473 "Javanese Digit One" + 43474 "Javanese Digit Two" + 43475 "Javanese Digit Three" + 43476 "Javanese Digit Four" + 43477 "Javanese Digit Five" + 43478 "Javanese Digit Six" + 43479 "Javanese Digit Seven" + 43480 "Javanese Digit Eight" + 43481 "Javanese Digit Nine" + 43486 "Javanese Pada Tirta Tumetes" + 43487 "Javanese Pada Isen-Isen" + 43488 "Myanmar Letter Shan Gha" + 43489 "Myanmar Letter Shan Cha" + 43490 "Myanmar Letter Shan Jha" + 43491 "Myanmar Letter Shan Nna" + 43492 "Myanmar Letter Shan Bha" + 43493 "Myanmar Sign Shan Saw" + 43494 "Myanmar Modifier Letter Shan Reduplication" + 43495 "Myanmar Letter Tai Laing Nya" + 43496 "Myanmar Letter Tai Laing Fa" + 43497 "Myanmar Letter Tai Laing Ga" + 43498 "Myanmar Letter Tai Laing Gha" + 43499 "Myanmar Letter Tai Laing Ja" + 43500 "Myanmar Letter Tai Laing Jha" + 43501 "Myanmar Letter Tai Laing Dda" + 43502 "Myanmar Letter Tai Laing Ddha" + 43503 "Myanmar Letter Tai Laing Nna" + 43504 "Myanmar Tai Laing Digit Zero" + 43505 "Myanmar Tai Laing Digit One" + 43506 "Myanmar Tai Laing Digit Two" + 43507 "Myanmar Tai Laing Digit Three" + 43508 "Myanmar Tai Laing Digit Four" + 43509 "Myanmar Tai Laing Digit Five" + 43510 "Myanmar Tai Laing Digit Six" + 43511 "Myanmar Tai Laing Digit Seven" + 43512 "Myanmar Tai Laing Digit Eight" + 43513 "Myanmar Tai Laing Digit Nine" + 43514 "Myanmar Letter Tai Laing Lla" + 43515 "Myanmar Letter Tai Laing Da" + 43516 "Myanmar Letter Tai Laing Dha" + 43517 "Myanmar Letter Tai Laing Ba" + 43518 "Myanmar Letter Tai Laing Bha" + 43520 "Cham Letter A" + 43521 "Cham Letter I" + 43522 "Cham Letter U" + 43523 "Cham Letter E" + 43524 "Cham Letter Ai" + 43525 "Cham Letter O" + 43526 "Cham Letter Ka" + 43527 "Cham Letter Kha" + 43528 "Cham Letter Ga" + 43529 "Cham Letter Gha" + 43530 "Cham Letter Ngue" + 43531 "Cham Letter Nga" + 43532 "Cham Letter Cha" + 43533 "Cham Letter Chha" + 43534 "Cham Letter Ja" + 43535 "Cham Letter Jha" + 43536 "Cham Letter Nhue" + 43537 "Cham Letter Nha" + 43538 "Cham Letter Nhja" + 43539 "Cham Letter Ta" + 43540 "Cham Letter Tha" + 43541 "Cham Letter Da" + 43542 "Cham Letter Dha" + 43543 "Cham Letter Nue" + 43544 "Cham Letter Na" + 43545 "Cham Letter Dda" + 43546 "Cham Letter Pa" + 43547 "Cham Letter Ppa" + 43548 "Cham Letter Pha" + 43549 "Cham Letter Ba" + 43550 "Cham Letter Bha" + 43551 "Cham Letter Mue" + 43552 "Cham Letter Ma" + 43553 "Cham Letter Bba" + 43554 "Cham Letter Ya" + 43555 "Cham Letter Ra" + 43556 "Cham Letter La" + 43557 "Cham Letter Va" + 43558 "Cham Letter Ssa" + 43559 "Cham Letter Sa" + 43560 "Cham Letter Ha" + 43561 "Cham Vowel Sign Aa" + 43562 "Cham Vowel Sign I" + 43563 "Cham Vowel Sign Ii" + 43564 "Cham Vowel Sign Ei" + 43565 "Cham Vowel Sign U" + 43566 "Cham Vowel Sign Oe" + 43567 "Cham Vowel Sign O" + 43568 "Cham Vowel Sign Ai" + 43569 "Cham Vowel Sign Au" + 43570 "Cham Vowel Sign Ue" + 43571 "Cham Consonant Sign Ya" + 43572 "Cham Consonant Sign Ra" + 43573 "Cham Consonant Sign La" + 43574 "Cham Consonant Sign Wa" + 43584 "Cham Letter Final K" + 43585 "Cham Letter Final G" + 43586 "Cham Letter Final Ng" + 43587 "Cham Consonant Sign Final Ng" + 43588 "Cham Letter Final Ch" + 43589 "Cham Letter Final T" + 43590 "Cham Letter Final N" + 43591 "Cham Letter Final P" + 43592 "Cham Letter Final Y" + 43593 "Cham Letter Final R" + 43594 "Cham Letter Final L" + 43595 "Cham Letter Final Ss" + 43596 "Cham Consonant Sign Final M" + 43597 "Cham Consonant Sign Final H" + 43600 "Cham Digit Zero" + 43601 "Cham Digit One" + 43602 "Cham Digit Two" + 43603 "Cham Digit Three" + 43604 "Cham Digit Four" + 43605 "Cham Digit Five" + 43606 "Cham Digit Six" + 43607 "Cham Digit Seven" + 43608 "Cham Digit Eight" + 43609 "Cham Digit Nine" + 43612 "Cham Punctuation Spiral" + 43613 "Cham Punctuation Danda" + 43614 "Cham Punctuation Double Danda" + 43615 "Cham Punctuation Triple Danda" + 43616 "Myanmar Letter Khamti Ga" + 43617 "Myanmar Letter Khamti Ca" + 43618 "Myanmar Letter Khamti Cha" + 43619 "Myanmar Letter Khamti Ja" + 43620 "Myanmar Letter Khamti Jha" + 43621 "Myanmar Letter Khamti Nya" + 43622 "Myanmar Letter Khamti Tta" + 43623 "Myanmar Letter Khamti Ttha" + 43624 "Myanmar Letter Khamti Dda" + 43625 "Myanmar Letter Khamti Ddha" + 43626 "Myanmar Letter Khamti Dha" + 43627 "Myanmar Letter Khamti Na" + 43628 "Myanmar Letter Khamti Sa" + 43629 "Myanmar Letter Khamti Ha" + 43630 "Myanmar Letter Khamti Hha" + 43631 "Myanmar Letter Khamti Fa" + 43632 "Myanmar Modifier Letter Khamti Reduplication" + 43633 "Myanmar Letter Khamti Xa" + 43634 "Myanmar Letter Khamti Za" + 43635 "Myanmar Letter Khamti Ra" + 43636 "Myanmar Logogram Khamti Oay" + 43637 "Myanmar Logogram Khamti Qn" + 43638 "Myanmar Logogram Khamti Hm" + 43639 "Myanmar Symbol Aiton Exclamation" + 43640 "Myanmar Symbol Aiton One" + 43641 "Myanmar Symbol Aiton Two" + 43642 "Myanmar Letter Aiton Ra" + 43643 "Myanmar Sign Pao Karen Tone" + 43644 "Myanmar Sign Tai Laing Tone-2" + 43645 "Myanmar Sign Tai Laing Tone-5" + 43646 "Myanmar Letter Shwe Palaung Cha" + 43647 "Myanmar Letter Shwe Palaung Sha" + 43648 "Tai Viet Letter Low Ko" + 43649 "Tai Viet Letter High Ko" + 43650 "Tai Viet Letter Low Kho" + 43651 "Tai Viet Letter High Kho" + 43652 "Tai Viet Letter Low Khho" + 43653 "Tai Viet Letter High Khho" + 43654 "Tai Viet Letter Low Go" + 43655 "Tai Viet Letter High Go" + 43656 "Tai Viet Letter Low Ngo" + 43657 "Tai Viet Letter High Ngo" + 43658 "Tai Viet Letter Low Co" + 43659 "Tai Viet Letter High Co" + 43660 "Tai Viet Letter Low Cho" + 43661 "Tai Viet Letter High Cho" + 43662 "Tai Viet Letter Low So" + 43663 "Tai Viet Letter High So" + 43664 "Tai Viet Letter Low Nyo" + 43665 "Tai Viet Letter High Nyo" + 43666 "Tai Viet Letter Low Do" + 43667 "Tai Viet Letter High Do" + 43668 "Tai Viet Letter Low To" + 43669 "Tai Viet Letter High To" + 43670 "Tai Viet Letter Low Tho" + 43671 "Tai Viet Letter High Tho" + 43672 "Tai Viet Letter Low No" + 43673 "Tai Viet Letter High No" + 43674 "Tai Viet Letter Low Bo" + 43675 "Tai Viet Letter High Bo" + 43676 "Tai Viet Letter Low Po" + 43677 "Tai Viet Letter High Po" + 43678 "Tai Viet Letter Low Pho" + 43679 "Tai Viet Letter High Pho" + 43680 "Tai Viet Letter Low Fo" + 43681 "Tai Viet Letter High Fo" + 43682 "Tai Viet Letter Low Mo" + 43683 "Tai Viet Letter High Mo" + 43684 "Tai Viet Letter Low Yo" + 43685 "Tai Viet Letter High Yo" + 43686 "Tai Viet Letter Low Ro" + 43687 "Tai Viet Letter High Ro" + 43688 "Tai Viet Letter Low Lo" + 43689 "Tai Viet Letter High Lo" + 43690 "Tai Viet Letter Low Vo" + 43691 "Tai Viet Letter High Vo" + 43692 "Tai Viet Letter Low Ho" + 43693 "Tai Viet Letter High Ho" + 43694 "Tai Viet Letter Low O" + 43695 "Tai Viet Letter High O" + 43696 "Tai Viet Mai Kang" + 43697 "Tai Viet Vowel Aa" + 43698 "Tai Viet Vowel I" + 43699 "Tai Viet Vowel Ue" + 43700 "Tai Viet Vowel U" + 43701 "Tai Viet Vowel E" + 43702 "Tai Viet Vowel O" + 43703 "Tai Viet Mai Khit" + 43704 "Tai Viet Vowel Ia" + 43705 "Tai Viet Vowel Uea" + 43706 "Tai Viet Vowel Ua" + 43707 "Tai Viet Vowel Aue" + 43708 "Tai Viet Vowel Ay" + 43709 "Tai Viet Vowel An" + 43710 "Tai Viet Vowel Am" + 43711 "Tai Viet Tone Mai Ek" + 43712 "Tai Viet Tone Mai Nueng" + 43713 "Tai Viet Tone Mai Tho" + 43714 "Tai Viet Tone Mai Song" + 43739 "Tai Viet Symbol Kon" + 43740 "Tai Viet Symbol Nueng" + 43741 "Tai Viet Symbol Sam" + 43742 "Tai Viet Symbol Ho Hoi" + 43743 "Tai Viet Symbol Koi Koi" + 43744 "Meetei Mayek Letter E" + 43745 "Meetei Mayek Letter O" + 43746 "Meetei Mayek Letter Cha" + 43747 "Meetei Mayek Letter Nya" + 43748 "Meetei Mayek Letter Tta" + 43749 "Meetei Mayek Letter Ttha" + 43750 "Meetei Mayek Letter Dda" + 43751 "Meetei Mayek Letter Ddha" + 43752 "Meetei Mayek Letter Nna" + 43753 "Meetei Mayek Letter Sha" + 43754 "Meetei Mayek Letter Ssa" + 43755 "Meetei Mayek Vowel Sign Ii" + 43756 "Meetei Mayek Vowel Sign Uu" + 43757 "Meetei Mayek Vowel Sign Aai" + 43758 "Meetei Mayek Vowel Sign Au" + 43759 "Meetei Mayek Vowel Sign Aau" + 43760 "Meetei Mayek Cheikhan" + 43761 "Meetei Mayek Ahang Khudam" + 43762 "Meetei Mayek Anji" + 43763 "Meetei Mayek Syllable Repetition Mark" + 43764 "Meetei Mayek Word Repetition Mark" + 43765 "Meetei Mayek Vowel Sign Visarga" + 43766 "Meetei Mayek Virama" + 43777 "Ethiopic Syllable Tthu" + 43778 "Ethiopic Syllable Tthi" + 43779 "Ethiopic Syllable Tthaa" + 43780 "Ethiopic Syllable Tthee" + 43781 "Ethiopic Syllable Tthe" + 43782 "Ethiopic Syllable Ttho" + 43785 "Ethiopic Syllable Ddhu" + 43786 "Ethiopic Syllable Ddhi" + 43787 "Ethiopic Syllable Ddhaa" + 43788 "Ethiopic Syllable Ddhee" + 43789 "Ethiopic Syllable Ddhe" + 43790 "Ethiopic Syllable Ddho" + 43793 "Ethiopic Syllable Dzu" + 43794 "Ethiopic Syllable Dzi" + 43795 "Ethiopic Syllable Dzaa" + 43796 "Ethiopic Syllable Dzee" + 43797 "Ethiopic Syllable Dze" + 43798 "Ethiopic Syllable Dzo" + 43808 "Ethiopic Syllable Cchha" + 43809 "Ethiopic Syllable Cchhu" + 43810 "Ethiopic Syllable Cchhi" + 43811 "Ethiopic Syllable Cchhaa" + 43812 "Ethiopic Syllable Cchhee" + 43813 "Ethiopic Syllable Cchhe" + 43814 "Ethiopic Syllable Cchho" + 43816 "Ethiopic Syllable Bba" + 43817 "Ethiopic Syllable Bbu" + 43818 "Ethiopic Syllable Bbi" + 43819 "Ethiopic Syllable Bbaa" + 43820 "Ethiopic Syllable Bbee" + 43821 "Ethiopic Syllable Bbe" + 43822 "Ethiopic Syllable Bbo" + 43824 "Latin Small Letter Barred Alpha" + 43825 "Latin Small Letter A Reversed-Schwa" + 43826 "Latin Small Letter Blackletter E" + 43827 "Latin Small Letter Barred E" + 43828 "Latin Small Letter E With Flourish" + 43829 "Latin Small Letter Lenis F" + 43830 "Latin Small Letter Script G With Crossed-Tail" + 43831 "Latin Small Letter L With Inverted Lazy S" + 43832 "Latin Small Letter L With Double Middle Tilde" + 43833 "Latin Small Letter L With Middle Ring" + 43834 "Latin Small Letter M With Crossed-Tail" + 43835 "Latin Small Letter N With Crossed-Tail" + 43836 "Latin Small Letter Eng With Crossed-Tail" + 43837 "Latin Small Letter Blackletter O" + 43838 "Latin Small Letter Blackletter O With Stroke" + 43839 "Latin Small Letter Open O With Stroke" + 43840 "Latin Small Letter Inverted Oe" + 43841 "Latin Small Letter Turned Oe With Stroke" + 43842 "Latin Small Letter Turned Oe With Horizontal Stroke" + 43843 "Latin Small Letter Turned O Open-O" + 43844 "Latin Small Letter Turned O Open-O With Stroke" + 43845 "Latin Small Letter Stirrup R" + 43846 "Latin Letter Small Capital R With Right Leg" + 43847 "Latin Small Letter R Without Handle" + 43848 "Latin Small Letter Double R" + 43849 "Latin Small Letter R With Crossed-Tail" + 43850 "Latin Small Letter Double R With Crossed-Tail" + 43851 "Latin Small Letter Script R" + 43852 "Latin Small Letter Script R With Ring" + 43853 "Latin Small Letter Baseline Esh" + 43854 "Latin Small Letter U With Short Right Leg" + 43855 "Latin Small Letter U Bar With Short Right Leg" + 43856 "Latin Small Letter Ui" + 43857 "Latin Small Letter Turned Ui" + 43858 "Latin Small Letter U With Left Hook" + 43859 "Latin Small Letter Chi" + 43860 "Latin Small Letter Chi With Low Right Ring" + 43861 "Latin Small Letter Chi With Low Left Serif" + 43862 "Latin Small Letter X With Low Right Ring" + 43863 "Latin Small Letter X With Long Left Leg" + 43864 "Latin Small Letter X With Long Left Leg And Low Right Ring" + 43865 "Latin Small Letter X With Long Left Leg With Serif" + 43866 "Latin Small Letter Y With Short Right Leg" + 43867 "Modifier Breve With Inverted Breve" + 43868 "Modifier Letter Small Heng" + 43869 "Modifier Letter Small L With Inverted Lazy S" + 43870 "Modifier Letter Small L With Middle Tilde" + 43871 "Modifier Letter Small U With Left Hook" + 43876 "Latin Small Letter Inverted Alpha" + 43877 "Greek Letter Small Capital Omega" + 43968 "Meetei Mayek Letter Kok" + 43969 "Meetei Mayek Letter Sam" + 43970 "Meetei Mayek Letter Lai" + 43971 "Meetei Mayek Letter Mit" + 43972 "Meetei Mayek Letter Pa" + 43973 "Meetei Mayek Letter Na" + 43974 "Meetei Mayek Letter Chil" + 43975 "Meetei Mayek Letter Til" + 43976 "Meetei Mayek Letter Khou" + 43977 "Meetei Mayek Letter Ngou" + 43978 "Meetei Mayek Letter Thou" + 43979 "Meetei Mayek Letter Wai" + 43980 "Meetei Mayek Letter Yang" + 43981 "Meetei Mayek Letter Huk" + 43982 "Meetei Mayek Letter Un" + 43983 "Meetei Mayek Letter I" + 43984 "Meetei Mayek Letter Pham" + 43985 "Meetei Mayek Letter Atiya" + 43986 "Meetei Mayek Letter Gok" + 43987 "Meetei Mayek Letter Jham" + 43988 "Meetei Mayek Letter Rai" + 43989 "Meetei Mayek Letter Ba" + 43990 "Meetei Mayek Letter Jil" + 43991 "Meetei Mayek Letter Dil" + 43992 "Meetei Mayek Letter Ghou" + 43993 "Meetei Mayek Letter Dhou" + 43994 "Meetei Mayek Letter Bham" + 43995 "Meetei Mayek Letter Kok Lonsum" + 43996 "Meetei Mayek Letter Lai Lonsum" + 43997 "Meetei Mayek Letter Mit Lonsum" + 43998 "Meetei Mayek Letter Pa Lonsum" + 43999 "Meetei Mayek Letter Na Lonsum" + 44000 "Meetei Mayek Letter Til Lonsum" + 44001 "Meetei Mayek Letter Ngou Lonsum" + 44002 "Meetei Mayek Letter I Lonsum" + 44003 "Meetei Mayek Vowel Sign Onap" + 44004 "Meetei Mayek Vowel Sign Inap" + 44005 "Meetei Mayek Vowel Sign Anap" + 44006 "Meetei Mayek Vowel Sign Yenap" + 44007 "Meetei Mayek Vowel Sign Sounap" + 44008 "Meetei Mayek Vowel Sign Unap" + 44009 "Meetei Mayek Vowel Sign Cheinap" + 44010 "Meetei Mayek Vowel Sign Nung" + 44011 "Meetei Mayek Cheikhei" + 44012 "Meetei Mayek Lum Iyek" + 44013 "Meetei Mayek Apun Iyek" + 44016 "Meetei Mayek Digit Zero" + 44017 "Meetei Mayek Digit One" + 44018 "Meetei Mayek Digit Two" + 44019 "Meetei Mayek Digit Three" + 44020 "Meetei Mayek Digit Four" + 44021 "Meetei Mayek Digit Five" + 44022 "Meetei Mayek Digit Six" + 44023 "Meetei Mayek Digit Seven" + 44024 "Meetei Mayek Digit Eight" + 44025 "Meetei Mayek Digit Nine" + 44032 "" + 55203 "" + 55216 "Hangul Jungseong O-Yeo" + 55217 "Hangul Jungseong O-O-I" + 55218 "Hangul Jungseong Yo-A" + 55219 "Hangul Jungseong Yo-Ae" + 55220 "Hangul Jungseong Yo-Eo" + 55221 "Hangul Jungseong U-Yeo" + 55222 "Hangul Jungseong U-I-I" + 55223 "Hangul Jungseong Yu-Ae" + 55224 "Hangul Jungseong Yu-O" + 55225 "Hangul Jungseong Eu-A" + 55226 "Hangul Jungseong Eu-Eo" + 55227 "Hangul Jungseong Eu-E" + 55228 "Hangul Jungseong Eu-O" + 55229 "Hangul Jungseong I-Ya-O" + 55230 "Hangul Jungseong I-Yae" + 55231 "Hangul Jungseong I-Yeo" + 55232 "Hangul Jungseong I-Ye" + 55233 "Hangul Jungseong I-O-I" + 55234 "Hangul Jungseong I-Yo" + 55235 "Hangul Jungseong I-Yu" + 55236 "Hangul Jungseong I-I" + 55237 "Hangul Jungseong Araea-A" + 55238 "Hangul Jungseong Araea-E" + 55243 "Hangul Jongseong Nieun-Rieul" + 55244 "Hangul Jongseong Nieun-Chieuch" + 55245 "Hangul Jongseong Ssangtikeut" + 55246 "Hangul Jongseong Ssangtikeut-Pieup" + 55247 "Hangul Jongseong Tikeut-Pieup" + 55248 "Hangul Jongseong Tikeut-Sios" + 55249 "Hangul Jongseong Tikeut-Sios-Kiyeok" + 55250 "Hangul Jongseong Tikeut-Cieuc" + 55251 "Hangul Jongseong Tikeut-Chieuch" + 55252 "Hangul Jongseong Tikeut-Thieuth" + 55253 "Hangul Jongseong Rieul-Ssangkiyeok" + 55254 "Hangul Jongseong Rieul-Kiyeok-Hieuh" + 55255 "Hangul Jongseong Ssangrieul-Khieukh" + 55256 "Hangul Jongseong Rieul-Mieum-Hieuh" + 55257 "Hangul Jongseong Rieul-Pieup-Tikeut" + 55258 "Hangul Jongseong Rieul-Pieup-Phieuph" + 55259 "Hangul Jongseong Rieul-Yesieung" + 55260 "Hangul Jongseong Rieul-Yeorinhieuh-Hieuh" + 55261 "Hangul Jongseong Kapyeounrieul" + 55262 "Hangul Jongseong Mieum-Nieun" + 55263 "Hangul Jongseong Mieum-Ssangnieun" + 55264 "Hangul Jongseong Ssangmieum" + 55265 "Hangul Jongseong Mieum-Pieup-Sios" + 55266 "Hangul Jongseong Mieum-Cieuc" + 55267 "Hangul Jongseong Pieup-Tikeut" + 55268 "Hangul Jongseong Pieup-Rieul-Phieuph" + 55269 "Hangul Jongseong Pieup-Mieum" + 55270 "Hangul Jongseong Ssangpieup" + 55271 "Hangul Jongseong Pieup-Sios-Tikeut" + 55272 "Hangul Jongseong Pieup-Cieuc" + 55273 "Hangul Jongseong Pieup-Chieuch" + 55274 "Hangul Jongseong Sios-Mieum" + 55275 "Hangul Jongseong Sios-Kapyeounpieup" + 55276 "Hangul Jongseong Ssangsios-Kiyeok" + 55277 "Hangul Jongseong Ssangsios-Tikeut" + 55278 "Hangul Jongseong Sios-Pansios" + 55279 "Hangul Jongseong Sios-Cieuc" + 55280 "Hangul Jongseong Sios-Chieuch" + 55281 "Hangul Jongseong Sios-Thieuth" + 55282 "Hangul Jongseong Sios-Hieuh" + 55283 "Hangul Jongseong Pansios-Pieup" + 55284 "Hangul Jongseong Pansios-Kapyeounpieup" + 55285 "Hangul Jongseong Yesieung-Mieum" + 55286 "Hangul Jongseong Yesieung-Hieuh" + 55287 "Hangul Jongseong Cieuc-Pieup" + 55288 "Hangul Jongseong Cieuc-Ssangpieup" + 55289 "Hangul Jongseong Ssangcieuc" + 55290 "Hangul Jongseong Phieuph-Sios" + 55291 "Hangul Jongseong Phieuph-Thieuth" + 55296 "" + 56191 "" + 56192 "" + 56319 "" + 56320 "" + 57343 "" + 57344 "" + 63743 "" + 63744 "CJK Compatibility Ideograph-F900" + 63745 "CJK Compatibility Ideograph-F901" + 63746 "CJK Compatibility Ideograph-F902" + 63747 "CJK Compatibility Ideograph-F903" + 63748 "CJK Compatibility Ideograph-F904" + 63749 "CJK Compatibility Ideograph-F905" + 63750 "CJK Compatibility Ideograph-F906" + 63751 "CJK Compatibility Ideograph-F907" + 63752 "CJK Compatibility Ideograph-F908" + 63753 "CJK Compatibility Ideograph-F909" + 63754 "CJK Compatibility Ideograph-F90a" + 63755 "CJK Compatibility Ideograph-F90b" + 63756 "CJK Compatibility Ideograph-F90c" + 63757 "CJK Compatibility Ideograph-F90d" + 63758 "CJK Compatibility Ideograph-F90e" + 63759 "CJK Compatibility Ideograph-F90f" + 63760 "CJK Compatibility Ideograph-F910" + 63761 "CJK Compatibility Ideograph-F911" + 63762 "CJK Compatibility Ideograph-F912" + 63763 "CJK Compatibility Ideograph-F913" + 63764 "CJK Compatibility Ideograph-F914" + 63765 "CJK Compatibility Ideograph-F915" + 63766 "CJK Compatibility Ideograph-F916" + 63767 "CJK Compatibility Ideograph-F917" + 63768 "CJK Compatibility Ideograph-F918" + 63769 "CJK Compatibility Ideograph-F919" + 63770 "CJK Compatibility Ideograph-F91a" + 63771 "CJK Compatibility Ideograph-F91b" + 63772 "CJK Compatibility Ideograph-F91c" + 63773 "CJK Compatibility Ideograph-F91d" + 63774 "CJK Compatibility Ideograph-F91e" + 63775 "CJK Compatibility Ideograph-F91f" + 63776 "CJK Compatibility Ideograph-F920" + 63777 "CJK Compatibility Ideograph-F921" + 63778 "CJK Compatibility Ideograph-F922" + 63779 "CJK Compatibility Ideograph-F923" + 63780 "CJK Compatibility Ideograph-F924" + 63781 "CJK Compatibility Ideograph-F925" + 63782 "CJK Compatibility Ideograph-F926" + 63783 "CJK Compatibility Ideograph-F927" + 63784 "CJK Compatibility Ideograph-F928" + 63785 "CJK Compatibility Ideograph-F929" + 63786 "CJK Compatibility Ideograph-F92a" + 63787 "CJK Compatibility Ideograph-F92b" + 63788 "CJK Compatibility Ideograph-F92c" + 63789 "CJK Compatibility Ideograph-F92d" + 63790 "CJK Compatibility Ideograph-F92e" + 63791 "CJK Compatibility Ideograph-F92f" + 63792 "CJK Compatibility Ideograph-F930" + 63793 "CJK Compatibility Ideograph-F931" + 63794 "CJK Compatibility Ideograph-F932" + 63795 "CJK Compatibility Ideograph-F933" + 63796 "CJK Compatibility Ideograph-F934" + 63797 "CJK Compatibility Ideograph-F935" + 63798 "CJK Compatibility Ideograph-F936" + 63799 "CJK Compatibility Ideograph-F937" + 63800 "CJK Compatibility Ideograph-F938" + 63801 "CJK Compatibility Ideograph-F939" + 63802 "CJK Compatibility Ideograph-F93a" + 63803 "CJK Compatibility Ideograph-F93b" + 63804 "CJK Compatibility Ideograph-F93c" + 63805 "CJK Compatibility Ideograph-F93d" + 63806 "CJK Compatibility Ideograph-F93e" + 63807 "CJK Compatibility Ideograph-F93f" + 63808 "CJK Compatibility Ideograph-F940" + 63809 "CJK Compatibility Ideograph-F941" + 63810 "CJK Compatibility Ideograph-F942" + 63811 "CJK Compatibility Ideograph-F943" + 63812 "CJK Compatibility Ideograph-F944" + 63813 "CJK Compatibility Ideograph-F945" + 63814 "CJK Compatibility Ideograph-F946" + 63815 "CJK Compatibility Ideograph-F947" + 63816 "CJK Compatibility Ideograph-F948" + 63817 "CJK Compatibility Ideograph-F949" + 63818 "CJK Compatibility Ideograph-F94a" + 63819 "CJK Compatibility Ideograph-F94b" + 63820 "CJK Compatibility Ideograph-F94c" + 63821 "CJK Compatibility Ideograph-F94d" + 63822 "CJK Compatibility Ideograph-F94e" + 63823 "CJK Compatibility Ideograph-F94f" + 63824 "CJK Compatibility Ideograph-F950" + 63825 "CJK Compatibility Ideograph-F951" + 63826 "CJK Compatibility Ideograph-F952" + 63827 "CJK Compatibility Ideograph-F953" + 63828 "CJK Compatibility Ideograph-F954" + 63829 "CJK Compatibility Ideograph-F955" + 63830 "CJK Compatibility Ideograph-F956" + 63831 "CJK Compatibility Ideograph-F957" + 63832 "CJK Compatibility Ideograph-F958" + 63833 "CJK Compatibility Ideograph-F959" + 63834 "CJK Compatibility Ideograph-F95a" + 63835 "CJK Compatibility Ideograph-F95b" + 63836 "CJK Compatibility Ideograph-F95c" + 63837 "CJK Compatibility Ideograph-F95d" + 63838 "CJK Compatibility Ideograph-F95e" + 63839 "CJK Compatibility Ideograph-F95f" + 63840 "CJK Compatibility Ideograph-F960" + 63841 "CJK Compatibility Ideograph-F961" + 63842 "CJK Compatibility Ideograph-F962" + 63843 "CJK Compatibility Ideograph-F963" + 63844 "CJK Compatibility Ideograph-F964" + 63845 "CJK Compatibility Ideograph-F965" + 63846 "CJK Compatibility Ideograph-F966" + 63847 "CJK Compatibility Ideograph-F967" + 63848 "CJK Compatibility Ideograph-F968" + 63849 "CJK Compatibility Ideograph-F969" + 63850 "CJK Compatibility Ideograph-F96a" + 63851 "CJK Compatibility Ideograph-F96b" + 63852 "CJK Compatibility Ideograph-F96c" + 63853 "CJK Compatibility Ideograph-F96d" + 63854 "CJK Compatibility Ideograph-F96e" + 63855 "CJK Compatibility Ideograph-F96f" + 63856 "CJK Compatibility Ideograph-F970" + 63857 "CJK Compatibility Ideograph-F971" + 63858 "CJK Compatibility Ideograph-F972" + 63859 "CJK Compatibility Ideograph-F973" + 63860 "CJK Compatibility Ideograph-F974" + 63861 "CJK Compatibility Ideograph-F975" + 63862 "CJK Compatibility Ideograph-F976" + 63863 "CJK Compatibility Ideograph-F977" + 63864 "CJK Compatibility Ideograph-F978" + 63865 "CJK Compatibility Ideograph-F979" + 63866 "CJK Compatibility Ideograph-F97a" + 63867 "CJK Compatibility Ideograph-F97b" + 63868 "CJK Compatibility Ideograph-F97c" + 63869 "CJK Compatibility Ideograph-F97d" + 63870 "CJK Compatibility Ideograph-F97e" + 63871 "CJK Compatibility Ideograph-F97f" + 63872 "CJK Compatibility Ideograph-F980" + 63873 "CJK Compatibility Ideograph-F981" + 63874 "CJK Compatibility Ideograph-F982" + 63875 "CJK Compatibility Ideograph-F983" + 63876 "CJK Compatibility Ideograph-F984" + 63877 "CJK Compatibility Ideograph-F985" + 63878 "CJK Compatibility Ideograph-F986" + 63879 "CJK Compatibility Ideograph-F987" + 63880 "CJK Compatibility Ideograph-F988" + 63881 "CJK Compatibility Ideograph-F989" + 63882 "CJK Compatibility Ideograph-F98a" + 63883 "CJK Compatibility Ideograph-F98b" + 63884 "CJK Compatibility Ideograph-F98c" + 63885 "CJK Compatibility Ideograph-F98d" + 63886 "CJK Compatibility Ideograph-F98e" + 63887 "CJK Compatibility Ideograph-F98f" + 63888 "CJK Compatibility Ideograph-F990" + 63889 "CJK Compatibility Ideograph-F991" + 63890 "CJK Compatibility Ideograph-F992" + 63891 "CJK Compatibility Ideograph-F993" + 63892 "CJK Compatibility Ideograph-F994" + 63893 "CJK Compatibility Ideograph-F995" + 63894 "CJK Compatibility Ideograph-F996" + 63895 "CJK Compatibility Ideograph-F997" + 63896 "CJK Compatibility Ideograph-F998" + 63897 "CJK Compatibility Ideograph-F999" + 63898 "CJK Compatibility Ideograph-F99a" + 63899 "CJK Compatibility Ideograph-F99b" + 63900 "CJK Compatibility Ideograph-F99c" + 63901 "CJK Compatibility Ideograph-F99d" + 63902 "CJK Compatibility Ideograph-F99e" + 63903 "CJK Compatibility Ideograph-F99f" + 63904 "CJK Compatibility Ideograph-F9a0" + 63905 "CJK Compatibility Ideograph-F9a1" + 63906 "CJK Compatibility Ideograph-F9a2" + 63907 "CJK Compatibility Ideograph-F9a3" + 63908 "CJK Compatibility Ideograph-F9a4" + 63909 "CJK Compatibility Ideograph-F9a5" + 63910 "CJK Compatibility Ideograph-F9a6" + 63911 "CJK Compatibility Ideograph-F9a7" + 63912 "CJK Compatibility Ideograph-F9a8" + 63913 "CJK Compatibility Ideograph-F9a9" + 63914 "CJK Compatibility Ideograph-F9aa" + 63915 "CJK Compatibility Ideograph-F9ab" + 63916 "CJK Compatibility Ideograph-F9ac" + 63917 "CJK Compatibility Ideograph-F9ad" + 63918 "CJK Compatibility Ideograph-F9ae" + 63919 "CJK Compatibility Ideograph-F9af" + 63920 "CJK Compatibility Ideograph-F9b0" + 63921 "CJK Compatibility Ideograph-F9b1" + 63922 "CJK Compatibility Ideograph-F9b2" + 63923 "CJK Compatibility Ideograph-F9b3" + 63924 "CJK Compatibility Ideograph-F9b4" + 63925 "CJK Compatibility Ideograph-F9b5" + 63926 "CJK Compatibility Ideograph-F9b6" + 63927 "CJK Compatibility Ideograph-F9b7" + 63928 "CJK Compatibility Ideograph-F9b8" + 63929 "CJK Compatibility Ideograph-F9b9" + 63930 "CJK Compatibility Ideograph-F9ba" + 63931 "CJK Compatibility Ideograph-F9bb" + 63932 "CJK Compatibility Ideograph-F9bc" + 63933 "CJK Compatibility Ideograph-F9bd" + 63934 "CJK Compatibility Ideograph-F9be" + 63935 "CJK Compatibility Ideograph-F9bf" + 63936 "CJK Compatibility Ideograph-F9c0" + 63937 "CJK Compatibility Ideograph-F9c1" + 63938 "CJK Compatibility Ideograph-F9c2" + 63939 "CJK Compatibility Ideograph-F9c3" + 63940 "CJK Compatibility Ideograph-F9c4" + 63941 "CJK Compatibility Ideograph-F9c5" + 63942 "CJK Compatibility Ideograph-F9c6" + 63943 "CJK Compatibility Ideograph-F9c7" + 63944 "CJK Compatibility Ideograph-F9c8" + 63945 "CJK Compatibility Ideograph-F9c9" + 63946 "CJK Compatibility Ideograph-F9ca" + 63947 "CJK Compatibility Ideograph-F9cb" + 63948 "CJK Compatibility Ideograph-F9cc" + 63949 "CJK Compatibility Ideograph-F9cd" + 63950 "CJK Compatibility Ideograph-F9ce" + 63951 "CJK Compatibility Ideograph-F9cf" + 63952 "CJK Compatibility Ideograph-F9d0" + 63953 "CJK Compatibility Ideograph-F9d1" + 63954 "CJK Compatibility Ideograph-F9d2" + 63955 "CJK Compatibility Ideograph-F9d3" + 63956 "CJK Compatibility Ideograph-F9d4" + 63957 "CJK Compatibility Ideograph-F9d5" + 63958 "CJK Compatibility Ideograph-F9d6" + 63959 "CJK Compatibility Ideograph-F9d7" + 63960 "CJK Compatibility Ideograph-F9d8" + 63961 "CJK Compatibility Ideograph-F9d9" + 63962 "CJK Compatibility Ideograph-F9da" + 63963 "CJK Compatibility Ideograph-F9db" + 63964 "CJK Compatibility Ideograph-F9dc" + 63965 "CJK Compatibility Ideograph-F9dd" + 63966 "CJK Compatibility Ideograph-F9de" + 63967 "CJK Compatibility Ideograph-F9df" + 63968 "CJK Compatibility Ideograph-F9e0" + 63969 "CJK Compatibility Ideograph-F9e1" + 63970 "CJK Compatibility Ideograph-F9e2" + 63971 "CJK Compatibility Ideograph-F9e3" + 63972 "CJK Compatibility Ideograph-F9e4" + 63973 "CJK Compatibility Ideograph-F9e5" + 63974 "CJK Compatibility Ideograph-F9e6" + 63975 "CJK Compatibility Ideograph-F9e7" + 63976 "CJK Compatibility Ideograph-F9e8" + 63977 "CJK Compatibility Ideograph-F9e9" + 63978 "CJK Compatibility Ideograph-F9ea" + 63979 "CJK Compatibility Ideograph-F9eb" + 63980 "CJK Compatibility Ideograph-F9ec" + 63981 "CJK Compatibility Ideograph-F9ed" + 63982 "CJK Compatibility Ideograph-F9ee" + 63983 "CJK Compatibility Ideograph-F9ef" + 63984 "CJK Compatibility Ideograph-F9f0" + 63985 "CJK Compatibility Ideograph-F9f1" + 63986 "CJK Compatibility Ideograph-F9f2" + 63987 "CJK Compatibility Ideograph-F9f3" + 63988 "CJK Compatibility Ideograph-F9f4" + 63989 "CJK Compatibility Ideograph-F9f5" + 63990 "CJK Compatibility Ideograph-F9f6" + 63991 "CJK Compatibility Ideograph-F9f7" + 63992 "CJK Compatibility Ideograph-F9f8" + 63993 "CJK Compatibility Ideograph-F9f9" + 63994 "CJK Compatibility Ideograph-F9fa" + 63995 "CJK Compatibility Ideograph-F9fb" + 63996 "CJK Compatibility Ideograph-F9fc" + 63997 "CJK Compatibility Ideograph-F9fd" + 63998 "CJK Compatibility Ideograph-F9fe" + 63999 "CJK Compatibility Ideograph-F9ff" + 64000 "CJK Compatibility Ideograph-Fa00" + 64001 "CJK Compatibility Ideograph-Fa01" + 64002 "CJK Compatibility Ideograph-Fa02" + 64003 "CJK Compatibility Ideograph-Fa03" + 64004 "CJK Compatibility Ideograph-Fa04" + 64005 "CJK Compatibility Ideograph-Fa05" + 64006 "CJK Compatibility Ideograph-Fa06" + 64007 "CJK Compatibility Ideograph-Fa07" + 64008 "CJK Compatibility Ideograph-Fa08" + 64009 "CJK Compatibility Ideograph-Fa09" + 64010 "CJK Compatibility Ideograph-Fa0a" + 64011 "CJK Compatibility Ideograph-Fa0b" + 64012 "CJK Compatibility Ideograph-Fa0c" + 64013 "CJK Compatibility Ideograph-Fa0d" + 64014 "CJK Compatibility Ideograph-Fa0e" + 64015 "CJK Compatibility Ideograph-Fa0f" + 64016 "CJK Compatibility Ideograph-Fa10" + 64017 "CJK Compatibility Ideograph-Fa11" + 64018 "CJK Compatibility Ideograph-Fa12" + 64019 "CJK Compatibility Ideograph-Fa13" + 64020 "CJK Compatibility Ideograph-Fa14" + 64021 "CJK Compatibility Ideograph-Fa15" + 64022 "CJK Compatibility Ideograph-Fa16" + 64023 "CJK Compatibility Ideograph-Fa17" + 64024 "CJK Compatibility Ideograph-Fa18" + 64025 "CJK Compatibility Ideograph-Fa19" + 64026 "CJK Compatibility Ideograph-Fa1a" + 64027 "CJK Compatibility Ideograph-Fa1b" + 64028 "CJK Compatibility Ideograph-Fa1c" + 64029 "CJK Compatibility Ideograph-Fa1d" + 64030 "CJK Compatibility Ideograph-Fa1e" + 64031 "CJK Compatibility Ideograph-Fa1f" + 64032 "CJK Compatibility Ideograph-Fa20" + 64033 "CJK Compatibility Ideograph-Fa21" + 64034 "CJK Compatibility Ideograph-Fa22" + 64035 "CJK Compatibility Ideograph-Fa23" + 64036 "CJK Compatibility Ideograph-Fa24" + 64037 "CJK Compatibility Ideograph-Fa25" + 64038 "CJK Compatibility Ideograph-Fa26" + 64039 "CJK Compatibility Ideograph-Fa27" + 64040 "CJK Compatibility Ideograph-Fa28" + 64041 "CJK Compatibility Ideograph-Fa29" + 64042 "CJK Compatibility Ideograph-Fa2a" + 64043 "CJK Compatibility Ideograph-Fa2b" + 64044 "CJK Compatibility Ideograph-Fa2c" + 64045 "CJK Compatibility Ideograph-Fa2d" + 64046 "CJK Compatibility Ideograph-Fa2e" + 64047 "CJK Compatibility Ideograph-Fa2f" + 64048 "CJK Compatibility Ideograph-Fa30" + 64049 "CJK Compatibility Ideograph-Fa31" + 64050 "CJK Compatibility Ideograph-Fa32" + 64051 "CJK Compatibility Ideograph-Fa33" + 64052 "CJK Compatibility Ideograph-Fa34" + 64053 "CJK Compatibility Ideograph-Fa35" + 64054 "CJK Compatibility Ideograph-Fa36" + 64055 "CJK Compatibility Ideograph-Fa37" + 64056 "CJK Compatibility Ideograph-Fa38" + 64057 "CJK Compatibility Ideograph-Fa39" + 64058 "CJK Compatibility Ideograph-Fa3a" + 64059 "CJK Compatibility Ideograph-Fa3b" + 64060 "CJK Compatibility Ideograph-Fa3c" + 64061 "CJK Compatibility Ideograph-Fa3d" + 64062 "CJK Compatibility Ideograph-Fa3e" + 64063 "CJK Compatibility Ideograph-Fa3f" + 64064 "CJK Compatibility Ideograph-Fa40" + 64065 "CJK Compatibility Ideograph-Fa41" + 64066 "CJK Compatibility Ideograph-Fa42" + 64067 "CJK Compatibility Ideograph-Fa43" + 64068 "CJK Compatibility Ideograph-Fa44" + 64069 "CJK Compatibility Ideograph-Fa45" + 64070 "CJK Compatibility Ideograph-Fa46" + 64071 "CJK Compatibility Ideograph-Fa47" + 64072 "CJK Compatibility Ideograph-Fa48" + 64073 "CJK Compatibility Ideograph-Fa49" + 64074 "CJK Compatibility Ideograph-Fa4a" + 64075 "CJK Compatibility Ideograph-Fa4b" + 64076 "CJK Compatibility Ideograph-Fa4c" + 64077 "CJK Compatibility Ideograph-Fa4d" + 64078 "CJK Compatibility Ideograph-Fa4e" + 64079 "CJK Compatibility Ideograph-Fa4f" + 64080 "CJK Compatibility Ideograph-Fa50" + 64081 "CJK Compatibility Ideograph-Fa51" + 64082 "CJK Compatibility Ideograph-Fa52" + 64083 "CJK Compatibility Ideograph-Fa53" + 64084 "CJK Compatibility Ideograph-Fa54" + 64085 "CJK Compatibility Ideograph-Fa55" + 64086 "CJK Compatibility Ideograph-Fa56" + 64087 "CJK Compatibility Ideograph-Fa57" + 64088 "CJK Compatibility Ideograph-Fa58" + 64089 "CJK Compatibility Ideograph-Fa59" + 64090 "CJK Compatibility Ideograph-Fa5a" + 64091 "CJK Compatibility Ideograph-Fa5b" + 64092 "CJK Compatibility Ideograph-Fa5c" + 64093 "CJK Compatibility Ideograph-Fa5d" + 64094 "CJK Compatibility Ideograph-Fa5e" + 64095 "CJK Compatibility Ideograph-Fa5f" + 64096 "CJK Compatibility Ideograph-Fa60" + 64097 "CJK Compatibility Ideograph-Fa61" + 64098 "CJK Compatibility Ideograph-Fa62" + 64099 "CJK Compatibility Ideograph-Fa63" + 64100 "CJK Compatibility Ideograph-Fa64" + 64101 "CJK Compatibility Ideograph-Fa65" + 64102 "CJK Compatibility Ideograph-Fa66" + 64103 "CJK Compatibility Ideograph-Fa67" + 64104 "CJK Compatibility Ideograph-Fa68" + 64105 "CJK Compatibility Ideograph-Fa69" + 64106 "CJK Compatibility Ideograph-Fa6a" + 64107 "CJK Compatibility Ideograph-Fa6b" + 64108 "CJK Compatibility Ideograph-Fa6c" + 64109 "CJK Compatibility Ideograph-Fa6d" + 64112 "CJK Compatibility Ideograph-Fa70" + 64113 "CJK Compatibility Ideograph-Fa71" + 64114 "CJK Compatibility Ideograph-Fa72" + 64115 "CJK Compatibility Ideograph-Fa73" + 64116 "CJK Compatibility Ideograph-Fa74" + 64117 "CJK Compatibility Ideograph-Fa75" + 64118 "CJK Compatibility Ideograph-Fa76" + 64119 "CJK Compatibility Ideograph-Fa77" + 64120 "CJK Compatibility Ideograph-Fa78" + 64121 "CJK Compatibility Ideograph-Fa79" + 64122 "CJK Compatibility Ideograph-Fa7a" + 64123 "CJK Compatibility Ideograph-Fa7b" + 64124 "CJK Compatibility Ideograph-Fa7c" + 64125 "CJK Compatibility Ideograph-Fa7d" + 64126 "CJK Compatibility Ideograph-Fa7e" + 64127 "CJK Compatibility Ideograph-Fa7f" + 64128 "CJK Compatibility Ideograph-Fa80" + 64129 "CJK Compatibility Ideograph-Fa81" + 64130 "CJK Compatibility Ideograph-Fa82" + 64131 "CJK Compatibility Ideograph-Fa83" + 64132 "CJK Compatibility Ideograph-Fa84" + 64133 "CJK Compatibility Ideograph-Fa85" + 64134 "CJK Compatibility Ideograph-Fa86" + 64135 "CJK Compatibility Ideograph-Fa87" + 64136 "CJK Compatibility Ideograph-Fa88" + 64137 "CJK Compatibility Ideograph-Fa89" + 64138 "CJK Compatibility Ideograph-Fa8a" + 64139 "CJK Compatibility Ideograph-Fa8b" + 64140 "CJK Compatibility Ideograph-Fa8c" + 64141 "CJK Compatibility Ideograph-Fa8d" + 64142 "CJK Compatibility Ideograph-Fa8e" + 64143 "CJK Compatibility Ideograph-Fa8f" + 64144 "CJK Compatibility Ideograph-Fa90" + 64145 "CJK Compatibility Ideograph-Fa91" + 64146 "CJK Compatibility Ideograph-Fa92" + 64147 "CJK Compatibility Ideograph-Fa93" + 64148 "CJK Compatibility Ideograph-Fa94" + 64149 "CJK Compatibility Ideograph-Fa95" + 64150 "CJK Compatibility Ideograph-Fa96" + 64151 "CJK Compatibility Ideograph-Fa97" + 64152 "CJK Compatibility Ideograph-Fa98" + 64153 "CJK Compatibility Ideograph-Fa99" + 64154 "CJK Compatibility Ideograph-Fa9a" + 64155 "CJK Compatibility Ideograph-Fa9b" + 64156 "CJK Compatibility Ideograph-Fa9c" + 64157 "CJK Compatibility Ideograph-Fa9d" + 64158 "CJK Compatibility Ideograph-Fa9e" + 64159 "CJK Compatibility Ideograph-Fa9f" + 64160 "CJK Compatibility Ideograph-Faa0" + 64161 "CJK Compatibility Ideograph-Faa1" + 64162 "CJK Compatibility Ideograph-Faa2" + 64163 "CJK Compatibility Ideograph-Faa3" + 64164 "CJK Compatibility Ideograph-Faa4" + 64165 "CJK Compatibility Ideograph-Faa5" + 64166 "CJK Compatibility Ideograph-Faa6" + 64167 "CJK Compatibility Ideograph-Faa7" + 64168 "CJK Compatibility Ideograph-Faa8" + 64169 "CJK Compatibility Ideograph-Faa9" + 64170 "CJK Compatibility Ideograph-Faaa" + 64171 "CJK Compatibility Ideograph-Faab" + 64172 "CJK Compatibility Ideograph-Faac" + 64173 "CJK Compatibility Ideograph-Faad" + 64174 "CJK Compatibility Ideograph-Faae" + 64175 "CJK Compatibility Ideograph-Faaf" + 64176 "CJK Compatibility Ideograph-Fab0" + 64177 "CJK Compatibility Ideograph-Fab1" + 64178 "CJK Compatibility Ideograph-Fab2" + 64179 "CJK Compatibility Ideograph-Fab3" + 64180 "CJK Compatibility Ideograph-Fab4" + 64181 "CJK Compatibility Ideograph-Fab5" + 64182 "CJK Compatibility Ideograph-Fab6" + 64183 "CJK Compatibility Ideograph-Fab7" + 64184 "CJK Compatibility Ideograph-Fab8" + 64185 "CJK Compatibility Ideograph-Fab9" + 64186 "CJK Compatibility Ideograph-Faba" + 64187 "CJK Compatibility Ideograph-Fabb" + 64188 "CJK Compatibility Ideograph-Fabc" + 64189 "CJK Compatibility Ideograph-Fabd" + 64190 "CJK Compatibility Ideograph-Fabe" + 64191 "CJK Compatibility Ideograph-Fabf" + 64192 "CJK Compatibility Ideograph-Fac0" + 64193 "CJK Compatibility Ideograph-Fac1" + 64194 "CJK Compatibility Ideograph-Fac2" + 64195 "CJK Compatibility Ideograph-Fac3" + 64196 "CJK Compatibility Ideograph-Fac4" + 64197 "CJK Compatibility Ideograph-Fac5" + 64198 "CJK Compatibility Ideograph-Fac6" + 64199 "CJK Compatibility Ideograph-Fac7" + 64200 "CJK Compatibility Ideograph-Fac8" + 64201 "CJK Compatibility Ideograph-Fac9" + 64202 "CJK Compatibility Ideograph-Faca" + 64203 "CJK Compatibility Ideograph-Facb" + 64204 "CJK Compatibility Ideograph-Facc" + 64205 "CJK Compatibility Ideograph-Facd" + 64206 "CJK Compatibility Ideograph-Face" + 64207 "CJK Compatibility Ideograph-Facf" + 64208 "CJK Compatibility Ideograph-Fad0" + 64209 "CJK Compatibility Ideograph-Fad1" + 64210 "CJK Compatibility Ideograph-Fad2" + 64211 "CJK Compatibility Ideograph-Fad3" + 64212 "CJK Compatibility Ideograph-Fad4" + 64213 "CJK Compatibility Ideograph-Fad5" + 64214 "CJK Compatibility Ideograph-Fad6" + 64215 "CJK Compatibility Ideograph-Fad7" + 64216 "CJK Compatibility Ideograph-Fad8" + 64217 "CJK Compatibility Ideograph-Fad9" + 64256 "Latin Small Ligature Ff" + 64257 "Latin Small Ligature Fi" + 64258 "Latin Small Ligature Fl" + 64259 "Latin Small Ligature Ffi" + 64260 "Latin Small Ligature Ffl" + 64261 "Latin Small Ligature Long S T" + 64262 "Latin Small Ligature St" + 64275 "Armenian Small Ligature Men Now" + 64276 "Armenian Small Ligature Men Ech" + 64277 "Armenian Small Ligature Men Ini" + 64278 "Armenian Small Ligature Vew Now" + 64279 "Armenian Small Ligature Men Xeh" + 64285 "Hebrew Letter Yod With Hiriq" + 64286 "Hebrew Point Judeo-Spanish Varika" + 64287 "Hebrew Ligature Yiddish Yod Yod Patah" + 64288 "Hebrew Letter Alternative Ayin" + 64289 "Hebrew Letter Wide Alef" + 64290 "Hebrew Letter Wide Dalet" + 64291 "Hebrew Letter Wide He" + 64292 "Hebrew Letter Wide Kaf" + 64293 "Hebrew Letter Wide Lamed" + 64294 "Hebrew Letter Wide Final Mem" + 64295 "Hebrew Letter Wide Resh" + 64296 "Hebrew Letter Wide Tav" + 64297 "Hebrew Letter Alternative Plus Sign" + 64298 "Hebrew Letter Shin With Shin Dot" + 64299 "Hebrew Letter Shin With Sin Dot" + 64300 "Hebrew Letter Shin With Dagesh And Shin Dot" + 64301 "Hebrew Letter Shin With Dagesh And Sin Dot" + 64302 "Hebrew Letter Alef With Patah" + 64303 "Hebrew Letter Alef With Qamats" + 64304 "Hebrew Letter Alef With Mapiq" + 64305 "Hebrew Letter Bet With Dagesh" + 64306 "Hebrew Letter Gimel With Dagesh" + 64307 "Hebrew Letter Dalet With Dagesh" + 64308 "Hebrew Letter He With Mapiq" + 64309 "Hebrew Letter Vav With Dagesh" + 64310 "Hebrew Letter Zayin With Dagesh" + 64312 "Hebrew Letter Tet With Dagesh" + 64313 "Hebrew Letter Yod With Dagesh" + 64314 "Hebrew Letter Final Kaf With Dagesh" + 64315 "Hebrew Letter Kaf With Dagesh" + 64316 "Hebrew Letter Lamed With Dagesh" + 64318 "Hebrew Letter Mem With Dagesh" + 64320 "Hebrew Letter Nun With Dagesh" + 64321 "Hebrew Letter Samekh With Dagesh" + 64323 "Hebrew Letter Final Pe With Dagesh" + 64324 "Hebrew Letter Pe With Dagesh" + 64326 "Hebrew Letter Tsadi With Dagesh" + 64327 "Hebrew Letter Qof With Dagesh" + 64328 "Hebrew Letter Resh With Dagesh" + 64329 "Hebrew Letter Shin With Dagesh" + 64330 "Hebrew Letter Tav With Dagesh" + 64331 "Hebrew Letter Vav With Holam" + 64332 "Hebrew Letter Bet With Rafe" + 64333 "Hebrew Letter Kaf With Rafe" + 64334 "Hebrew Letter Pe With Rafe" + 64335 "Hebrew Ligature Alef Lamed" + 64336 "Arabic Letter Alef Wasla Isolated Form" + 64337 "Arabic Letter Alef Wasla Final Form" + 64338 "Arabic Letter Beeh Isolated Form" + 64339 "Arabic Letter Beeh Final Form" + 64340 "Arabic Letter Beeh Initial Form" + 64341 "Arabic Letter Beeh Medial Form" + 64342 "Arabic Letter Peh Isolated Form" + 64343 "Arabic Letter Peh Final Form" + 64344 "Arabic Letter Peh Initial Form" + 64345 "Arabic Letter Peh Medial Form" + 64346 "Arabic Letter Beheh Isolated Form" + 64347 "Arabic Letter Beheh Final Form" + 64348 "Arabic Letter Beheh Initial Form" + 64349 "Arabic Letter Beheh Medial Form" + 64350 "Arabic Letter Tteheh Isolated Form" + 64351 "Arabic Letter Tteheh Final Form" + 64352 "Arabic Letter Tteheh Initial Form" + 64353 "Arabic Letter Tteheh Medial Form" + 64354 "Arabic Letter Teheh Isolated Form" + 64355 "Arabic Letter Teheh Final Form" + 64356 "Arabic Letter Teheh Initial Form" + 64357 "Arabic Letter Teheh Medial Form" + 64358 "Arabic Letter Tteh Isolated Form" + 64359 "Arabic Letter Tteh Final Form" + 64360 "Arabic Letter Tteh Initial Form" + 64361 "Arabic Letter Tteh Medial Form" + 64362 "Arabic Letter Veh Isolated Form" + 64363 "Arabic Letter Veh Final Form" + 64364 "Arabic Letter Veh Initial Form" + 64365 "Arabic Letter Veh Medial Form" + 64366 "Arabic Letter Peheh Isolated Form" + 64367 "Arabic Letter Peheh Final Form" + 64368 "Arabic Letter Peheh Initial Form" + 64369 "Arabic Letter Peheh Medial Form" + 64370 "Arabic Letter Dyeh Isolated Form" + 64371 "Arabic Letter Dyeh Final Form" + 64372 "Arabic Letter Dyeh Initial Form" + 64373 "Arabic Letter Dyeh Medial Form" + 64374 "Arabic Letter Nyeh Isolated Form" + 64375 "Arabic Letter Nyeh Final Form" + 64376 "Arabic Letter Nyeh Initial Form" + 64377 "Arabic Letter Nyeh Medial Form" + 64378 "Arabic Letter Tcheh Isolated Form" + 64379 "Arabic Letter Tcheh Final Form" + 64380 "Arabic Letter Tcheh Initial Form" + 64381 "Arabic Letter Tcheh Medial Form" + 64382 "Arabic Letter Tcheheh Isolated Form" + 64383 "Arabic Letter Tcheheh Final Form" + 64384 "Arabic Letter Tcheheh Initial Form" + 64385 "Arabic Letter Tcheheh Medial Form" + 64386 "Arabic Letter Ddahal Isolated Form" + 64387 "Arabic Letter Ddahal Final Form" + 64388 "Arabic Letter Dahal Isolated Form" + 64389 "Arabic Letter Dahal Final Form" + 64390 "Arabic Letter Dul Isolated Form" + 64391 "Arabic Letter Dul Final Form" + 64392 "Arabic Letter Ddal Isolated Form" + 64393 "Arabic Letter Ddal Final Form" + 64394 "Arabic Letter Jeh Isolated Form" + 64395 "Arabic Letter Jeh Final Form" + 64396 "Arabic Letter Rreh Isolated Form" + 64397 "Arabic Letter Rreh Final Form" + 64398 "Arabic Letter Keheh Isolated Form" + 64399 "Arabic Letter Keheh Final Form" + 64400 "Arabic Letter Keheh Initial Form" + 64401 "Arabic Letter Keheh Medial Form" + 64402 "Arabic Letter Gaf Isolated Form" + 64403 "Arabic Letter Gaf Final Form" + 64404 "Arabic Letter Gaf Initial Form" + 64405 "Arabic Letter Gaf Medial Form" + 64406 "Arabic Letter Gueh Isolated Form" + 64407 "Arabic Letter Gueh Final Form" + 64408 "Arabic Letter Gueh Initial Form" + 64409 "Arabic Letter Gueh Medial Form" + 64410 "Arabic Letter Ngoeh Isolated Form" + 64411 "Arabic Letter Ngoeh Final Form" + 64412 "Arabic Letter Ngoeh Initial Form" + 64413 "Arabic Letter Ngoeh Medial Form" + 64414 "Arabic Letter Noon Ghunna Isolated Form" + 64415 "Arabic Letter Noon Ghunna Final Form" + 64416 "Arabic Letter Rnoon Isolated Form" + 64417 "Arabic Letter Rnoon Final Form" + 64418 "Arabic Letter Rnoon Initial Form" + 64419 "Arabic Letter Rnoon Medial Form" + 64420 "Arabic Letter Heh With Yeh Above Isolated Form" + 64421 "Arabic Letter Heh With Yeh Above Final Form" + 64422 "Arabic Letter Heh Goal Isolated Form" + 64423 "Arabic Letter Heh Goal Final Form" + 64424 "Arabic Letter Heh Goal Initial Form" + 64425 "Arabic Letter Heh Goal Medial Form" + 64426 "Arabic Letter Heh Doachashmee Isolated Form" + 64427 "Arabic Letter Heh Doachashmee Final Form" + 64428 "Arabic Letter Heh Doachashmee Initial Form" + 64429 "Arabic Letter Heh Doachashmee Medial Form" + 64430 "Arabic Letter Yeh Barree Isolated Form" + 64431 "Arabic Letter Yeh Barree Final Form" + 64432 "Arabic Letter Yeh Barree With Hamza Above Isolated Form" + 64433 "Arabic Letter Yeh Barree With Hamza Above Final Form" + 64434 "Arabic Symbol Dot Above" + 64435 "Arabic Symbol Dot Below" + 64436 "Arabic Symbol Two Dots Above" + 64437 "Arabic Symbol Two Dots Below" + 64438 "Arabic Symbol Three Dots Above" + 64439 "Arabic Symbol Three Dots Below" + 64440 "Arabic Symbol Three Dots Pointing Downwards Above" + 64441 "Arabic Symbol Three Dots Pointing Downwards Below" + 64442 "Arabic Symbol Four Dots Above" + 64443 "Arabic Symbol Four Dots Below" + 64444 "Arabic Symbol Double Vertical Bar Below" + 64445 "Arabic Symbol Two Dots Vertically Above" + 64446 "Arabic Symbol Two Dots Vertically Below" + 64447 "Arabic Symbol Ring" + 64448 "Arabic Symbol Small Tah Above" + 64449 "Arabic Symbol Small Tah Below" + 64467 "Arabic Letter Ng Isolated Form" + 64468 "Arabic Letter Ng Final Form" + 64469 "Arabic Letter Ng Initial Form" + 64470 "Arabic Letter Ng Medial Form" + 64471 "Arabic Letter U Isolated Form" + 64472 "Arabic Letter U Final Form" + 64473 "Arabic Letter Oe Isolated Form" + 64474 "Arabic Letter Oe Final Form" + 64475 "Arabic Letter Yu Isolated Form" + 64476 "Arabic Letter Yu Final Form" + 64477 "Arabic Letter U With Hamza Above Isolated Form" + 64478 "Arabic Letter Ve Isolated Form" + 64479 "Arabic Letter Ve Final Form" + 64480 "Arabic Letter Kirghiz Oe Isolated Form" + 64481 "Arabic Letter Kirghiz Oe Final Form" + 64482 "Arabic Letter Kirghiz Yu Isolated Form" + 64483 "Arabic Letter Kirghiz Yu Final Form" + 64484 "Arabic Letter E Isolated Form" + 64485 "Arabic Letter E Final Form" + 64486 "Arabic Letter E Initial Form" + 64487 "Arabic Letter E Medial Form" + 64488 "Arabic Letter Uighur Kazakh Kirghiz Alef Maksura Initial Form" + 64489 "Arabic Letter Uighur Kazakh Kirghiz Alef Maksura Medial Form" + 64490 "Arabic Ligature Yeh With Hamza Above With Alef Isolated Form" + 64491 "Arabic Ligature Yeh With Hamza Above With Alef Final Form" + 64492 "Arabic Ligature Yeh With Hamza Above With Ae Isolated Form" + 64493 "Arabic Ligature Yeh With Hamza Above With Ae Final Form" + 64494 "Arabic Ligature Yeh With Hamza Above With Waw Isolated Form" + 64495 "Arabic Ligature Yeh With Hamza Above With Waw Final Form" + 64496 "Arabic Ligature Yeh With Hamza Above With U Isolated Form" + 64497 "Arabic Ligature Yeh With Hamza Above With U Final Form" + 64498 "Arabic Ligature Yeh With Hamza Above With Oe Isolated Form" + 64499 "Arabic Ligature Yeh With Hamza Above With Oe Final Form" + 64500 "Arabic Ligature Yeh With Hamza Above With Yu Isolated Form" + 64501 "Arabic Ligature Yeh With Hamza Above With Yu Final Form" + 64502 "Arabic Ligature Yeh With Hamza Above With E Isolated Form" + 64503 "Arabic Ligature Yeh With Hamza Above With E Final Form" + 64504 "Arabic Ligature Yeh With Hamza Above With E Initial Form" + 64505 "Arabic Ligature Uighur Kirghiz Yeh With Hamza Above With Alef Maksura Isolated Form" + 64506 "Arabic Ligature Uighur Kirghiz Yeh With Hamza Above With Alef Maksura Final Form" + 64507 "Arabic Ligature Uighur Kirghiz Yeh With Hamza Above With Alef Maksura Initial Form" + 64508 "Arabic Letter Farsi Yeh Isolated Form" + 64509 "Arabic Letter Farsi Yeh Final Form" + 64510 "Arabic Letter Farsi Yeh Initial Form" + 64511 "Arabic Letter Farsi Yeh Medial Form" + 64512 "Arabic Ligature Yeh With Hamza Above With Jeem Isolated Form" + 64513 "Arabic Ligature Yeh With Hamza Above With Hah Isolated Form" + 64514 "Arabic Ligature Yeh With Hamza Above With Meem Isolated Form" + 64515 "Arabic Ligature Yeh With Hamza Above With Alef Maksura Isolated Form" + 64516 "Arabic Ligature Yeh With Hamza Above With Yeh Isolated Form" + 64517 "Arabic Ligature Beh With Jeem Isolated Form" + 64518 "Arabic Ligature Beh With Hah Isolated Form" + 64519 "Arabic Ligature Beh With Khah Isolated Form" + 64520 "Arabic Ligature Beh With Meem Isolated Form" + 64521 "Arabic Ligature Beh With Alef Maksura Isolated Form" + 64522 "Arabic Ligature Beh With Yeh Isolated Form" + 64523 "Arabic Ligature Teh With Jeem Isolated Form" + 64524 "Arabic Ligature Teh With Hah Isolated Form" + 64525 "Arabic Ligature Teh With Khah Isolated Form" + 64526 "Arabic Ligature Teh With Meem Isolated Form" + 64527 "Arabic Ligature Teh With Alef Maksura Isolated Form" + 64528 "Arabic Ligature Teh With Yeh Isolated Form" + 64529 "Arabic Ligature Theh With Jeem Isolated Form" + 64530 "Arabic Ligature Theh With Meem Isolated Form" + 64531 "Arabic Ligature Theh With Alef Maksura Isolated Form" + 64532 "Arabic Ligature Theh With Yeh Isolated Form" + 64533 "Arabic Ligature Jeem With Hah Isolated Form" + 64534 "Arabic Ligature Jeem With Meem Isolated Form" + 64535 "Arabic Ligature Hah With Jeem Isolated Form" + 64536 "Arabic Ligature Hah With Meem Isolated Form" + 64537 "Arabic Ligature Khah With Jeem Isolated Form" + 64538 "Arabic Ligature Khah With Hah Isolated Form" + 64539 "Arabic Ligature Khah With Meem Isolated Form" + 64540 "Arabic Ligature Seen With Jeem Isolated Form" + 64541 "Arabic Ligature Seen With Hah Isolated Form" + 64542 "Arabic Ligature Seen With Khah Isolated Form" + 64543 "Arabic Ligature Seen With Meem Isolated Form" + 64544 "Arabic Ligature Sad With Hah Isolated Form" + 64545 "Arabic Ligature Sad With Meem Isolated Form" + 64546 "Arabic Ligature Dad With Jeem Isolated Form" + 64547 "Arabic Ligature Dad With Hah Isolated Form" + 64548 "Arabic Ligature Dad With Khah Isolated Form" + 64549 "Arabic Ligature Dad With Meem Isolated Form" + 64550 "Arabic Ligature Tah With Hah Isolated Form" + 64551 "Arabic Ligature Tah With Meem Isolated Form" + 64552 "Arabic Ligature Zah With Meem Isolated Form" + 64553 "Arabic Ligature Ain With Jeem Isolated Form" + 64554 "Arabic Ligature Ain With Meem Isolated Form" + 64555 "Arabic Ligature Ghain With Jeem Isolated Form" + 64556 "Arabic Ligature Ghain With Meem Isolated Form" + 64557 "Arabic Ligature Feh With Jeem Isolated Form" + 64558 "Arabic Ligature Feh With Hah Isolated Form" + 64559 "Arabic Ligature Feh With Khah Isolated Form" + 64560 "Arabic Ligature Feh With Meem Isolated Form" + 64561 "Arabic Ligature Feh With Alef Maksura Isolated Form" + 64562 "Arabic Ligature Feh With Yeh Isolated Form" + 64563 "Arabic Ligature Qaf With Hah Isolated Form" + 64564 "Arabic Ligature Qaf With Meem Isolated Form" + 64565 "Arabic Ligature Qaf With Alef Maksura Isolated Form" + 64566 "Arabic Ligature Qaf With Yeh Isolated Form" + 64567 "Arabic Ligature Kaf With Alef Isolated Form" + 64568 "Arabic Ligature Kaf With Jeem Isolated Form" + 64569 "Arabic Ligature Kaf With Hah Isolated Form" + 64570 "Arabic Ligature Kaf With Khah Isolated Form" + 64571 "Arabic Ligature Kaf With Lam Isolated Form" + 64572 "Arabic Ligature Kaf With Meem Isolated Form" + 64573 "Arabic Ligature Kaf With Alef Maksura Isolated Form" + 64574 "Arabic Ligature Kaf With Yeh Isolated Form" + 64575 "Arabic Ligature Lam With Jeem Isolated Form" + 64576 "Arabic Ligature Lam With Hah Isolated Form" + 64577 "Arabic Ligature Lam With Khah Isolated Form" + 64578 "Arabic Ligature Lam With Meem Isolated Form" + 64579 "Arabic Ligature Lam With Alef Maksura Isolated Form" + 64580 "Arabic Ligature Lam With Yeh Isolated Form" + 64581 "Arabic Ligature Meem With Jeem Isolated Form" + 64582 "Arabic Ligature Meem With Hah Isolated Form" + 64583 "Arabic Ligature Meem With Khah Isolated Form" + 64584 "Arabic Ligature Meem With Meem Isolated Form" + 64585 "Arabic Ligature Meem With Alef Maksura Isolated Form" + 64586 "Arabic Ligature Meem With Yeh Isolated Form" + 64587 "Arabic Ligature Noon With Jeem Isolated Form" + 64588 "Arabic Ligature Noon With Hah Isolated Form" + 64589 "Arabic Ligature Noon With Khah Isolated Form" + 64590 "Arabic Ligature Noon With Meem Isolated Form" + 64591 "Arabic Ligature Noon With Alef Maksura Isolated Form" + 64592 "Arabic Ligature Noon With Yeh Isolated Form" + 64593 "Arabic Ligature Heh With Jeem Isolated Form" + 64594 "Arabic Ligature Heh With Meem Isolated Form" + 64595 "Arabic Ligature Heh With Alef Maksura Isolated Form" + 64596 "Arabic Ligature Heh With Yeh Isolated Form" + 64597 "Arabic Ligature Yeh With Jeem Isolated Form" + 64598 "Arabic Ligature Yeh With Hah Isolated Form" + 64599 "Arabic Ligature Yeh With Khah Isolated Form" + 64600 "Arabic Ligature Yeh With Meem Isolated Form" + 64601 "Arabic Ligature Yeh With Alef Maksura Isolated Form" + 64602 "Arabic Ligature Yeh With Yeh Isolated Form" + 64603 "Arabic Ligature Thal With Superscript Alef Isolated Form" + 64604 "Arabic Ligature Reh With Superscript Alef Isolated Form" + 64605 "Arabic Ligature Alef Maksura With Superscript Alef Isolated Form" + 64606 "Arabic Ligature Shadda With Dammatan Isolated Form" + 64607 "Arabic Ligature Shadda With Kasratan Isolated Form" + 64608 "Arabic Ligature Shadda With Fatha Isolated Form" + 64609 "Arabic Ligature Shadda With Damma Isolated Form" + 64610 "Arabic Ligature Shadda With Kasra Isolated Form" + 64611 "Arabic Ligature Shadda With Superscript Alef Isolated Form" + 64612 "Arabic Ligature Yeh With Hamza Above With Reh Final Form" + 64613 "Arabic Ligature Yeh With Hamza Above With Zain Final Form" + 64614 "Arabic Ligature Yeh With Hamza Above With Meem Final Form" + 64615 "Arabic Ligature Yeh With Hamza Above With Noon Final Form" + 64616 "Arabic Ligature Yeh With Hamza Above With Alef Maksura Final Form" + 64617 "Arabic Ligature Yeh With Hamza Above With Yeh Final Form" + 64618 "Arabic Ligature Beh With Reh Final Form" + 64619 "Arabic Ligature Beh With Zain Final Form" + 64620 "Arabic Ligature Beh With Meem Final Form" + 64621 "Arabic Ligature Beh With Noon Final Form" + 64622 "Arabic Ligature Beh With Alef Maksura Final Form" + 64623 "Arabic Ligature Beh With Yeh Final Form" + 64624 "Arabic Ligature Teh With Reh Final Form" + 64625 "Arabic Ligature Teh With Zain Final Form" + 64626 "Arabic Ligature Teh With Meem Final Form" + 64627 "Arabic Ligature Teh With Noon Final Form" + 64628 "Arabic Ligature Teh With Alef Maksura Final Form" + 64629 "Arabic Ligature Teh With Yeh Final Form" + 64630 "Arabic Ligature Theh With Reh Final Form" + 64631 "Arabic Ligature Theh With Zain Final Form" + 64632 "Arabic Ligature Theh With Meem Final Form" + 64633 "Arabic Ligature Theh With Noon Final Form" + 64634 "Arabic Ligature Theh With Alef Maksura Final Form" + 64635 "Arabic Ligature Theh With Yeh Final Form" + 64636 "Arabic Ligature Feh With Alef Maksura Final Form" + 64637 "Arabic Ligature Feh With Yeh Final Form" + 64638 "Arabic Ligature Qaf With Alef Maksura Final Form" + 64639 "Arabic Ligature Qaf With Yeh Final Form" + 64640 "Arabic Ligature Kaf With Alef Final Form" + 64641 "Arabic Ligature Kaf With Lam Final Form" + 64642 "Arabic Ligature Kaf With Meem Final Form" + 64643 "Arabic Ligature Kaf With Alef Maksura Final Form" + 64644 "Arabic Ligature Kaf With Yeh Final Form" + 64645 "Arabic Ligature Lam With Meem Final Form" + 64646 "Arabic Ligature Lam With Alef Maksura Final Form" + 64647 "Arabic Ligature Lam With Yeh Final Form" + 64648 "Arabic Ligature Meem With Alef Final Form" + 64649 "Arabic Ligature Meem With Meem Final Form" + 64650 "Arabic Ligature Noon With Reh Final Form" + 64651 "Arabic Ligature Noon With Zain Final Form" + 64652 "Arabic Ligature Noon With Meem Final Form" + 64653 "Arabic Ligature Noon With Noon Final Form" + 64654 "Arabic Ligature Noon With Alef Maksura Final Form" + 64655 "Arabic Ligature Noon With Yeh Final Form" + 64656 "Arabic Ligature Alef Maksura With Superscript Alef Final Form" + 64657 "Arabic Ligature Yeh With Reh Final Form" + 64658 "Arabic Ligature Yeh With Zain Final Form" + 64659 "Arabic Ligature Yeh With Meem Final Form" + 64660 "Arabic Ligature Yeh With Noon Final Form" + 64661 "Arabic Ligature Yeh With Alef Maksura Final Form" + 64662 "Arabic Ligature Yeh With Yeh Final Form" + 64663 "Arabic Ligature Yeh With Hamza Above With Jeem Initial Form" + 64664 "Arabic Ligature Yeh With Hamza Above With Hah Initial Form" + 64665 "Arabic Ligature Yeh With Hamza Above With Khah Initial Form" + 64666 "Arabic Ligature Yeh With Hamza Above With Meem Initial Form" + 64667 "Arabic Ligature Yeh With Hamza Above With Heh Initial Form" + 64668 "Arabic Ligature Beh With Jeem Initial Form" + 64669 "Arabic Ligature Beh With Hah Initial Form" + 64670 "Arabic Ligature Beh With Khah Initial Form" + 64671 "Arabic Ligature Beh With Meem Initial Form" + 64672 "Arabic Ligature Beh With Heh Initial Form" + 64673 "Arabic Ligature Teh With Jeem Initial Form" + 64674 "Arabic Ligature Teh With Hah Initial Form" + 64675 "Arabic Ligature Teh With Khah Initial Form" + 64676 "Arabic Ligature Teh With Meem Initial Form" + 64677 "Arabic Ligature Teh With Heh Initial Form" + 64678 "Arabic Ligature Theh With Meem Initial Form" + 64679 "Arabic Ligature Jeem With Hah Initial Form" + 64680 "Arabic Ligature Jeem With Meem Initial Form" + 64681 "Arabic Ligature Hah With Jeem Initial Form" + 64682 "Arabic Ligature Hah With Meem Initial Form" + 64683 "Arabic Ligature Khah With Jeem Initial Form" + 64684 "Arabic Ligature Khah With Meem Initial Form" + 64685 "Arabic Ligature Seen With Jeem Initial Form" + 64686 "Arabic Ligature Seen With Hah Initial Form" + 64687 "Arabic Ligature Seen With Khah Initial Form" + 64688 "Arabic Ligature Seen With Meem Initial Form" + 64689 "Arabic Ligature Sad With Hah Initial Form" + 64690 "Arabic Ligature Sad With Khah Initial Form" + 64691 "Arabic Ligature Sad With Meem Initial Form" + 64692 "Arabic Ligature Dad With Jeem Initial Form" + 64693 "Arabic Ligature Dad With Hah Initial Form" + 64694 "Arabic Ligature Dad With Khah Initial Form" + 64695 "Arabic Ligature Dad With Meem Initial Form" + 64696 "Arabic Ligature Tah With Hah Initial Form" + 64697 "Arabic Ligature Zah With Meem Initial Form" + 64698 "Arabic Ligature Ain With Jeem Initial Form" + 64699 "Arabic Ligature Ain With Meem Initial Form" + 64700 "Arabic Ligature Ghain With Jeem Initial Form" + 64701 "Arabic Ligature Ghain With Meem Initial Form" + 64702 "Arabic Ligature Feh With Jeem Initial Form" + 64703 "Arabic Ligature Feh With Hah Initial Form" + 64704 "Arabic Ligature Feh With Khah Initial Form" + 64705 "Arabic Ligature Feh With Meem Initial Form" + 64706 "Arabic Ligature Qaf With Hah Initial Form" + 64707 "Arabic Ligature Qaf With Meem Initial Form" + 64708 "Arabic Ligature Kaf With Jeem Initial Form" + 64709 "Arabic Ligature Kaf With Hah Initial Form" + 64710 "Arabic Ligature Kaf With Khah Initial Form" + 64711 "Arabic Ligature Kaf With Lam Initial Form" + 64712 "Arabic Ligature Kaf With Meem Initial Form" + 64713 "Arabic Ligature Lam With Jeem Initial Form" + 64714 "Arabic Ligature Lam With Hah Initial Form" + 64715 "Arabic Ligature Lam With Khah Initial Form" + 64716 "Arabic Ligature Lam With Meem Initial Form" + 64717 "Arabic Ligature Lam With Heh Initial Form" + 64718 "Arabic Ligature Meem With Jeem Initial Form" + 64719 "Arabic Ligature Meem With Hah Initial Form" + 64720 "Arabic Ligature Meem With Khah Initial Form" + 64721 "Arabic Ligature Meem With Meem Initial Form" + 64722 "Arabic Ligature Noon With Jeem Initial Form" + 64723 "Arabic Ligature Noon With Hah Initial Form" + 64724 "Arabic Ligature Noon With Khah Initial Form" + 64725 "Arabic Ligature Noon With Meem Initial Form" + 64726 "Arabic Ligature Noon With Heh Initial Form" + 64727 "Arabic Ligature Heh With Jeem Initial Form" + 64728 "Arabic Ligature Heh With Meem Initial Form" + 64729 "Arabic Ligature Heh With Superscript Alef Initial Form" + 64730 "Arabic Ligature Yeh With Jeem Initial Form" + 64731 "Arabic Ligature Yeh With Hah Initial Form" + 64732 "Arabic Ligature Yeh With Khah Initial Form" + 64733 "Arabic Ligature Yeh With Meem Initial Form" + 64734 "Arabic Ligature Yeh With Heh Initial Form" + 64735 "Arabic Ligature Yeh With Hamza Above With Meem Medial Form" + 64736 "Arabic Ligature Yeh With Hamza Above With Heh Medial Form" + 64737 "Arabic Ligature Beh With Meem Medial Form" + 64738 "Arabic Ligature Beh With Heh Medial Form" + 64739 "Arabic Ligature Teh With Meem Medial Form" + 64740 "Arabic Ligature Teh With Heh Medial Form" + 64741 "Arabic Ligature Theh With Meem Medial Form" + 64742 "Arabic Ligature Theh With Heh Medial Form" + 64743 "Arabic Ligature Seen With Meem Medial Form" + 64744 "Arabic Ligature Seen With Heh Medial Form" + 64745 "Arabic Ligature Sheen With Meem Medial Form" + 64746 "Arabic Ligature Sheen With Heh Medial Form" + 64747 "Arabic Ligature Kaf With Lam Medial Form" + 64748 "Arabic Ligature Kaf With Meem Medial Form" + 64749 "Arabic Ligature Lam With Meem Medial Form" + 64750 "Arabic Ligature Noon With Meem Medial Form" + 64751 "Arabic Ligature Noon With Heh Medial Form" + 64752 "Arabic Ligature Yeh With Meem Medial Form" + 64753 "Arabic Ligature Yeh With Heh Medial Form" + 64754 "Arabic Ligature Shadda With Fatha Medial Form" + 64755 "Arabic Ligature Shadda With Damma Medial Form" + 64756 "Arabic Ligature Shadda With Kasra Medial Form" + 64757 "Arabic Ligature Tah With Alef Maksura Isolated Form" + 64758 "Arabic Ligature Tah With Yeh Isolated Form" + 64759 "Arabic Ligature Ain With Alef Maksura Isolated Form" + 64760 "Arabic Ligature Ain With Yeh Isolated Form" + 64761 "Arabic Ligature Ghain With Alef Maksura Isolated Form" + 64762 "Arabic Ligature Ghain With Yeh Isolated Form" + 64763 "Arabic Ligature Seen With Alef Maksura Isolated Form" + 64764 "Arabic Ligature Seen With Yeh Isolated Form" + 64765 "Arabic Ligature Sheen With Alef Maksura Isolated Form" + 64766 "Arabic Ligature Sheen With Yeh Isolated Form" + 64767 "Arabic Ligature Hah With Alef Maksura Isolated Form" + 64768 "Arabic Ligature Hah With Yeh Isolated Form" + 64769 "Arabic Ligature Jeem With Alef Maksura Isolated Form" + 64770 "Arabic Ligature Jeem With Yeh Isolated Form" + 64771 "Arabic Ligature Khah With Alef Maksura Isolated Form" + 64772 "Arabic Ligature Khah With Yeh Isolated Form" + 64773 "Arabic Ligature Sad With Alef Maksura Isolated Form" + 64774 "Arabic Ligature Sad With Yeh Isolated Form" + 64775 "Arabic Ligature Dad With Alef Maksura Isolated Form" + 64776 "Arabic Ligature Dad With Yeh Isolated Form" + 64777 "Arabic Ligature Sheen With Jeem Isolated Form" + 64778 "Arabic Ligature Sheen With Hah Isolated Form" + 64779 "Arabic Ligature Sheen With Khah Isolated Form" + 64780 "Arabic Ligature Sheen With Meem Isolated Form" + 64781 "Arabic Ligature Sheen With Reh Isolated Form" + 64782 "Arabic Ligature Seen With Reh Isolated Form" + 64783 "Arabic Ligature Sad With Reh Isolated Form" + 64784 "Arabic Ligature Dad With Reh Isolated Form" + 64785 "Arabic Ligature Tah With Alef Maksura Final Form" + 64786 "Arabic Ligature Tah With Yeh Final Form" + 64787 "Arabic Ligature Ain With Alef Maksura Final Form" + 64788 "Arabic Ligature Ain With Yeh Final Form" + 64789 "Arabic Ligature Ghain With Alef Maksura Final Form" + 64790 "Arabic Ligature Ghain With Yeh Final Form" + 64791 "Arabic Ligature Seen With Alef Maksura Final Form" + 64792 "Arabic Ligature Seen With Yeh Final Form" + 64793 "Arabic Ligature Sheen With Alef Maksura Final Form" + 64794 "Arabic Ligature Sheen With Yeh Final Form" + 64795 "Arabic Ligature Hah With Alef Maksura Final Form" + 64796 "Arabic Ligature Hah With Yeh Final Form" + 64797 "Arabic Ligature Jeem With Alef Maksura Final Form" + 64798 "Arabic Ligature Jeem With Yeh Final Form" + 64799 "Arabic Ligature Khah With Alef Maksura Final Form" + 64800 "Arabic Ligature Khah With Yeh Final Form" + 64801 "Arabic Ligature Sad With Alef Maksura Final Form" + 64802 "Arabic Ligature Sad With Yeh Final Form" + 64803 "Arabic Ligature Dad With Alef Maksura Final Form" + 64804 "Arabic Ligature Dad With Yeh Final Form" + 64805 "Arabic Ligature Sheen With Jeem Final Form" + 64806 "Arabic Ligature Sheen With Hah Final Form" + 64807 "Arabic Ligature Sheen With Khah Final Form" + 64808 "Arabic Ligature Sheen With Meem Final Form" + 64809 "Arabic Ligature Sheen With Reh Final Form" + 64810 "Arabic Ligature Seen With Reh Final Form" + 64811 "Arabic Ligature Sad With Reh Final Form" + 64812 "Arabic Ligature Dad With Reh Final Form" + 64813 "Arabic Ligature Sheen With Jeem Initial Form" + 64814 "Arabic Ligature Sheen With Hah Initial Form" + 64815 "Arabic Ligature Sheen With Khah Initial Form" + 64816 "Arabic Ligature Sheen With Meem Initial Form" + 64817 "Arabic Ligature Seen With Heh Initial Form" + 64818 "Arabic Ligature Sheen With Heh Initial Form" + 64819 "Arabic Ligature Tah With Meem Initial Form" + 64820 "Arabic Ligature Seen With Jeem Medial Form" + 64821 "Arabic Ligature Seen With Hah Medial Form" + 64822 "Arabic Ligature Seen With Khah Medial Form" + 64823 "Arabic Ligature Sheen With Jeem Medial Form" + 64824 "Arabic Ligature Sheen With Hah Medial Form" + 64825 "Arabic Ligature Sheen With Khah Medial Form" + 64826 "Arabic Ligature Tah With Meem Medial Form" + 64827 "Arabic Ligature Zah With Meem Medial Form" + 64828 "Arabic Ligature Alef With Fathatan Final Form" + 64829 "Arabic Ligature Alef With Fathatan Isolated Form" + 64830 "Ornate Left Parenthesis" + 64831 "Ornate Right Parenthesis" + 64848 "Arabic Ligature Teh With Jeem With Meem Initial Form" + 64849 "Arabic Ligature Teh With Hah With Jeem Final Form" + 64850 "Arabic Ligature Teh With Hah With Jeem Initial Form" + 64851 "Arabic Ligature Teh With Hah With Meem Initial Form" + 64852 "Arabic Ligature Teh With Khah With Meem Initial Form" + 64853 "Arabic Ligature Teh With Meem With Jeem Initial Form" + 64854 "Arabic Ligature Teh With Meem With Hah Initial Form" + 64855 "Arabic Ligature Teh With Meem With Khah Initial Form" + 64856 "Arabic Ligature Jeem With Meem With Hah Final Form" + 64857 "Arabic Ligature Jeem With Meem With Hah Initial Form" + 64858 "Arabic Ligature Hah With Meem With Yeh Final Form" + 64859 "Arabic Ligature Hah With Meem With Alef Maksura Final Form" + 64860 "Arabic Ligature Seen With Hah With Jeem Initial Form" + 64861 "Arabic Ligature Seen With Jeem With Hah Initial Form" + 64862 "Arabic Ligature Seen With Jeem With Alef Maksura Final Form" + 64863 "Arabic Ligature Seen With Meem With Hah Final Form" + 64864 "Arabic Ligature Seen With Meem With Hah Initial Form" + 64865 "Arabic Ligature Seen With Meem With Jeem Initial Form" + 64866 "Arabic Ligature Seen With Meem With Meem Final Form" + 64867 "Arabic Ligature Seen With Meem With Meem Initial Form" + 64868 "Arabic Ligature Sad With Hah With Hah Final Form" + 64869 "Arabic Ligature Sad With Hah With Hah Initial Form" + 64870 "Arabic Ligature Sad With Meem With Meem Final Form" + 64871 "Arabic Ligature Sheen With Hah With Meem Final Form" + 64872 "Arabic Ligature Sheen With Hah With Meem Initial Form" + 64873 "Arabic Ligature Sheen With Jeem With Yeh Final Form" + 64874 "Arabic Ligature Sheen With Meem With Khah Final Form" + 64875 "Arabic Ligature Sheen With Meem With Khah Initial Form" + 64876 "Arabic Ligature Sheen With Meem With Meem Final Form" + 64877 "Arabic Ligature Sheen With Meem With Meem Initial Form" + 64878 "Arabic Ligature Dad With Hah With Alef Maksura Final Form" + 64879 "Arabic Ligature Dad With Khah With Meem Final Form" + 64880 "Arabic Ligature Dad With Khah With Meem Initial Form" + 64881 "Arabic Ligature Tah With Meem With Hah Final Form" + 64882 "Arabic Ligature Tah With Meem With Hah Initial Form" + 64883 "Arabic Ligature Tah With Meem With Meem Initial Form" + 64884 "Arabic Ligature Tah With Meem With Yeh Final Form" + 64885 "Arabic Ligature Ain With Jeem With Meem Final Form" + 64886 "Arabic Ligature Ain With Meem With Meem Final Form" + 64887 "Arabic Ligature Ain With Meem With Meem Initial Form" + 64888 "Arabic Ligature Ain With Meem With Alef Maksura Final Form" + 64889 "Arabic Ligature Ghain With Meem With Meem Final Form" + 64890 "Arabic Ligature Ghain With Meem With Yeh Final Form" + 64891 "Arabic Ligature Ghain With Meem With Alef Maksura Final Form" + 64892 "Arabic Ligature Feh With Khah With Meem Final Form" + 64893 "Arabic Ligature Feh With Khah With Meem Initial Form" + 64894 "Arabic Ligature Qaf With Meem With Hah Final Form" + 64895 "Arabic Ligature Qaf With Meem With Meem Final Form" + 64896 "Arabic Ligature Lam With Hah With Meem Final Form" + 64897 "Arabic Ligature Lam With Hah With Yeh Final Form" + 64898 "Arabic Ligature Lam With Hah With Alef Maksura Final Form" + 64899 "Arabic Ligature Lam With Jeem With Jeem Initial Form" + 64900 "Arabic Ligature Lam With Jeem With Jeem Final Form" + 64901 "Arabic Ligature Lam With Khah With Meem Final Form" + 64902 "Arabic Ligature Lam With Khah With Meem Initial Form" + 64903 "Arabic Ligature Lam With Meem With Hah Final Form" + 64904 "Arabic Ligature Lam With Meem With Hah Initial Form" + 64905 "Arabic Ligature Meem With Hah With Jeem Initial Form" + 64906 "Arabic Ligature Meem With Hah With Meem Initial Form" + 64907 "Arabic Ligature Meem With Hah With Yeh Final Form" + 64908 "Arabic Ligature Meem With Jeem With Hah Initial Form" + 64909 "Arabic Ligature Meem With Jeem With Meem Initial Form" + 64910 "Arabic Ligature Meem With Khah With Jeem Initial Form" + 64911 "Arabic Ligature Meem With Khah With Meem Initial Form" + 64914 "Arabic Ligature Meem With Jeem With Khah Initial Form" + 64915 "Arabic Ligature Heh With Meem With Jeem Initial Form" + 64916 "Arabic Ligature Heh With Meem With Meem Initial Form" + 64917 "Arabic Ligature Noon With Hah With Meem Initial Form" + 64918 "Arabic Ligature Noon With Hah With Alef Maksura Final Form" + 64919 "Arabic Ligature Noon With Jeem With Meem Final Form" + 64920 "Arabic Ligature Noon With Jeem With Meem Initial Form" + 64921 "Arabic Ligature Noon With Jeem With Alef Maksura Final Form" + 64922 "Arabic Ligature Noon With Meem With Yeh Final Form" + 64923 "Arabic Ligature Noon With Meem With Alef Maksura Final Form" + 64924 "Arabic Ligature Yeh With Meem With Meem Final Form" + 64925 "Arabic Ligature Yeh With Meem With Meem Initial Form" + 64926 "Arabic Ligature Beh With Khah With Yeh Final Form" + 64927 "Arabic Ligature Teh With Jeem With Yeh Final Form" + 64928 "Arabic Ligature Teh With Jeem With Alef Maksura Final Form" + 64929 "Arabic Ligature Teh With Khah With Yeh Final Form" + 64930 "Arabic Ligature Teh With Khah With Alef Maksura Final Form" + 64931 "Arabic Ligature Teh With Meem With Yeh Final Form" + 64932 "Arabic Ligature Teh With Meem With Alef Maksura Final Form" + 64933 "Arabic Ligature Jeem With Meem With Yeh Final Form" + 64934 "Arabic Ligature Jeem With Hah With Alef Maksura Final Form" + 64935 "Arabic Ligature Jeem With Meem With Alef Maksura Final Form" + 64936 "Arabic Ligature Seen With Khah With Alef Maksura Final Form" + 64937 "Arabic Ligature Sad With Hah With Yeh Final Form" + 64938 "Arabic Ligature Sheen With Hah With Yeh Final Form" + 64939 "Arabic Ligature Dad With Hah With Yeh Final Form" + 64940 "Arabic Ligature Lam With Jeem With Yeh Final Form" + 64941 "Arabic Ligature Lam With Meem With Yeh Final Form" + 64942 "Arabic Ligature Yeh With Hah With Yeh Final Form" + 64943 "Arabic Ligature Yeh With Jeem With Yeh Final Form" + 64944 "Arabic Ligature Yeh With Meem With Yeh Final Form" + 64945 "Arabic Ligature Meem With Meem With Yeh Final Form" + 64946 "Arabic Ligature Qaf With Meem With Yeh Final Form" + 64947 "Arabic Ligature Noon With Hah With Yeh Final Form" + 64948 "Arabic Ligature Qaf With Meem With Hah Initial Form" + 64949 "Arabic Ligature Lam With Hah With Meem Initial Form" + 64950 "Arabic Ligature Ain With Meem With Yeh Final Form" + 64951 "Arabic Ligature Kaf With Meem With Yeh Final Form" + 64952 "Arabic Ligature Noon With Jeem With Hah Initial Form" + 64953 "Arabic Ligature Meem With Khah With Yeh Final Form" + 64954 "Arabic Ligature Lam With Jeem With Meem Initial Form" + 64955 "Arabic Ligature Kaf With Meem With Meem Final Form" + 64956 "Arabic Ligature Lam With Jeem With Meem Final Form" + 64957 "Arabic Ligature Noon With Jeem With Hah Final Form" + 64958 "Arabic Ligature Jeem With Hah With Yeh Final Form" + 64959 "Arabic Ligature Hah With Jeem With Yeh Final Form" + 64960 "Arabic Ligature Meem With Jeem With Yeh Final Form" + 64961 "Arabic Ligature Feh With Meem With Yeh Final Form" + 64962 "Arabic Ligature Beh With Hah With Yeh Final Form" + 64963 "Arabic Ligature Kaf With Meem With Meem Initial Form" + 64964 "Arabic Ligature Ain With Jeem With Meem Initial Form" + 64965 "Arabic Ligature Sad With Meem With Meem Initial Form" + 64966 "Arabic Ligature Seen With Khah With Yeh Final Form" + 64967 "Arabic Ligature Noon With Jeem With Yeh Final Form" + 65008 "Arabic Ligature Salla Used As Koranic Stop Sign Isolated Form" + 65009 "Arabic Ligature Qala Used As Koranic Stop Sign Isolated Form" + 65010 "Arabic Ligature Allah Isolated Form" + 65011 "Arabic Ligature Akbar Isolated Form" + 65012 "Arabic Ligature Mohammad Isolated Form" + 65013 "Arabic Ligature Salam Isolated Form" + 65014 "Arabic Ligature Rasoul Isolated Form" + 65015 "Arabic Ligature Alayhe Isolated Form" + 65016 "Arabic Ligature Wasallam Isolated Form" + 65017 "Arabic Ligature Salla Isolated Form" + 65018 "Arabic Ligature Sallallahou Alayhe Wasallam" + 65019 "Arabic Ligature Jallajalalouhou" + 65020 "Rial Sign" + 65021 "Arabic Ligature Bismillah Ar-Rahman Ar-Raheem" + 65024 "Variation Selector-1" + 65025 "Variation Selector-2" + 65026 "Variation Selector-3" + 65027 "Variation Selector-4" + 65028 "Variation Selector-5" + 65029 "Variation Selector-6" + 65030 "Variation Selector-7" + 65031 "Variation Selector-8" + 65032 "Variation Selector-9" + 65033 "Variation Selector-10" + 65034 "Variation Selector-11" + 65035 "Variation Selector-12" + 65036 "Variation Selector-13" + 65037 "Variation Selector-14" + 65038 "Variation Selector-15" + 65039 "Variation Selector-16" + 65040 "Presentation Form For Vertical Comma" + 65041 "Presentation Form For Vertical Ideographic Comma" + 65042 "Presentation Form For Vertical Ideographic Full Stop" + 65043 "Presentation Form For Vertical Colon" + 65044 "Presentation Form For Vertical Semicolon" + 65045 "Presentation Form For Vertical Exclamation Mark" + 65046 "Presentation Form For Vertical Question Mark" + 65047 "Presentation Form For Vertical Left White Lenticular Bracket" + 65048 "Presentation Form For Vertical Right White Lenticular Brakcet" + 65049 "Presentation Form For Vertical Horizontal Ellipsis" + 65056 "Combining Ligature Left Half" + 65057 "Combining Ligature Right Half" + 65058 "Combining Double Tilde Left Half" + 65059 "Combining Double Tilde Right Half" + 65060 "Combining Macron Left Half" + 65061 "Combining Macron Right Half" + 65062 "Combining Conjoining Macron" + 65063 "Combining Ligature Left Half Below" + 65064 "Combining Ligature Right Half Below" + 65065 "Combining Tilde Left Half Below" + 65066 "Combining Tilde Right Half Below" + 65067 "Combining Macron Left Half Below" + 65068 "Combining Macron Right Half Below" + 65069 "Combining Conjoining Macron Below" + 65072 "Presentation Form For Vertical Two Dot Leader" + 65073 "Presentation Form For Vertical Em Dash" + 65074 "Presentation Form For Vertical En Dash" + 65075 "Presentation Form For Vertical Low Line" + 65076 "Presentation Form For Vertical Wavy Low Line" + 65077 "Presentation Form For Vertical Left Parenthesis" + 65078 "Presentation Form For Vertical Right Parenthesis" + 65079 "Presentation Form For Vertical Left Curly Bracket" + 65080 "Presentation Form For Vertical Right Curly Bracket" + 65081 "Presentation Form For Vertical Left Tortoise Shell Bracket" + 65082 "Presentation Form For Vertical Right Tortoise Shell Bracket" + 65083 "Presentation Form For Vertical Left Black Lenticular Bracket" + 65084 "Presentation Form For Vertical Right Black Lenticular Bracket" + 65085 "Presentation Form For Vertical Left Double Angle Bracket" + 65086 "Presentation Form For Vertical Right Double Angle Bracket" + 65087 "Presentation Form For Vertical Left Angle Bracket" + 65088 "Presentation Form For Vertical Right Angle Bracket" + 65089 "Presentation Form For Vertical Left Corner Bracket" + 65090 "Presentation Form For Vertical Right Corner Bracket" + 65091 "Presentation Form For Vertical Left White Corner Bracket" + 65092 "Presentation Form For Vertical Right White Corner Bracket" + 65093 "Sesame Dot" + 65094 "White Sesame Dot" + 65095 "Presentation Form For Vertical Left Square Bracket" + 65096 "Presentation Form For Vertical Right Square Bracket" + 65097 "Dashed Overline" + 65098 "Centreline Overline" + 65099 "Wavy Overline" + 65100 "Double Wavy Overline" + 65101 "Dashed Low Line" + 65102 "Centreline Low Line" + 65103 "Wavy Low Line" + 65104 "Small Comma" + 65105 "Small Ideographic Comma" + 65106 "Small Full Stop" + 65108 "Small Semicolon" + 65109 "Small Colon" + 65110 "Small Question Mark" + 65111 "Small Exclamation Mark" + 65112 "Small Em Dash" + 65113 "Small Left Parenthesis" + 65114 "Small Right Parenthesis" + 65115 "Small Left Curly Bracket" + 65116 "Small Right Curly Bracket" + 65117 "Small Left Tortoise Shell Bracket" + 65118 "Small Right Tortoise Shell Bracket" + 65119 "Small Number Sign" + 65120 "Small Ampersand" + 65121 "Small Asterisk" + 65122 "Small Plus Sign" + 65123 "Small Hyphen-Minus" + 65124 "Small Less-Than Sign" + 65125 "Small Greater-Than Sign" + 65126 "Small Equals Sign" + 65128 "Small Reverse Solidus" + 65129 "Small Dollar Sign" + 65130 "Small Percent Sign" + 65131 "Small Commercial At" + 65136 "Arabic Fathatan Isolated Form" + 65137 "Arabic Tatweel With Fathatan Above" + 65138 "Arabic Dammatan Isolated Form" + 65139 "Arabic Tail Fragment" + 65140 "Arabic Kasratan Isolated Form" + 65142 "Arabic Fatha Isolated Form" + 65143 "Arabic Fatha Medial Form" + 65144 "Arabic Damma Isolated Form" + 65145 "Arabic Damma Medial Form" + 65146 "Arabic Kasra Isolated Form" + 65147 "Arabic Kasra Medial Form" + 65148 "Arabic Shadda Isolated Form" + 65149 "Arabic Shadda Medial Form" + 65150 "Arabic Sukun Isolated Form" + 65151 "Arabic Sukun Medial Form" + 65152 "Arabic Letter Hamza Isolated Form" + 65153 "Arabic Letter Alef With Madda Above Isolated Form" + 65154 "Arabic Letter Alef With Madda Above Final Form" + 65155 "Arabic Letter Alef With Hamza Above Isolated Form" + 65156 "Arabic Letter Alef With Hamza Above Final Form" + 65157 "Arabic Letter Waw With Hamza Above Isolated Form" + 65158 "Arabic Letter Waw With Hamza Above Final Form" + 65159 "Arabic Letter Alef With Hamza Below Isolated Form" + 65160 "Arabic Letter Alef With Hamza Below Final Form" + 65161 "Arabic Letter Yeh With Hamza Above Isolated Form" + 65162 "Arabic Letter Yeh With Hamza Above Final Form" + 65163 "Arabic Letter Yeh With Hamza Above Initial Form" + 65164 "Arabic Letter Yeh With Hamza Above Medial Form" + 65165 "Arabic Letter Alef Isolated Form" + 65166 "Arabic Letter Alef Final Form" + 65167 "Arabic Letter Beh Isolated Form" + 65168 "Arabic Letter Beh Final Form" + 65169 "Arabic Letter Beh Initial Form" + 65170 "Arabic Letter Beh Medial Form" + 65171 "Arabic Letter Teh Marbuta Isolated Form" + 65172 "Arabic Letter Teh Marbuta Final Form" + 65173 "Arabic Letter Teh Isolated Form" + 65174 "Arabic Letter Teh Final Form" + 65175 "Arabic Letter Teh Initial Form" + 65176 "Arabic Letter Teh Medial Form" + 65177 "Arabic Letter Theh Isolated Form" + 65178 "Arabic Letter Theh Final Form" + 65179 "Arabic Letter Theh Initial Form" + 65180 "Arabic Letter Theh Medial Form" + 65181 "Arabic Letter Jeem Isolated Form" + 65182 "Arabic Letter Jeem Final Form" + 65183 "Arabic Letter Jeem Initial Form" + 65184 "Arabic Letter Jeem Medial Form" + 65185 "Arabic Letter Hah Isolated Form" + 65186 "Arabic Letter Hah Final Form" + 65187 "Arabic Letter Hah Initial Form" + 65188 "Arabic Letter Hah Medial Form" + 65189 "Arabic Letter Khah Isolated Form" + 65190 "Arabic Letter Khah Final Form" + 65191 "Arabic Letter Khah Initial Form" + 65192 "Arabic Letter Khah Medial Form" + 65193 "Arabic Letter Dal Isolated Form" + 65194 "Arabic Letter Dal Final Form" + 65195 "Arabic Letter Thal Isolated Form" + 65196 "Arabic Letter Thal Final Form" + 65197 "Arabic Letter Reh Isolated Form" + 65198 "Arabic Letter Reh Final Form" + 65199 "Arabic Letter Zain Isolated Form" + 65200 "Arabic Letter Zain Final Form" + 65201 "Arabic Letter Seen Isolated Form" + 65202 "Arabic Letter Seen Final Form" + 65203 "Arabic Letter Seen Initial Form" + 65204 "Arabic Letter Seen Medial Form" + 65205 "Arabic Letter Sheen Isolated Form" + 65206 "Arabic Letter Sheen Final Form" + 65207 "Arabic Letter Sheen Initial Form" + 65208 "Arabic Letter Sheen Medial Form" + 65209 "Arabic Letter Sad Isolated Form" + 65210 "Arabic Letter Sad Final Form" + 65211 "Arabic Letter Sad Initial Form" + 65212 "Arabic Letter Sad Medial Form" + 65213 "Arabic Letter Dad Isolated Form" + 65214 "Arabic Letter Dad Final Form" + 65215 "Arabic Letter Dad Initial Form" + 65216 "Arabic Letter Dad Medial Form" + 65217 "Arabic Letter Tah Isolated Form" + 65218 "Arabic Letter Tah Final Form" + 65219 "Arabic Letter Tah Initial Form" + 65220 "Arabic Letter Tah Medial Form" + 65221 "Arabic Letter Zah Isolated Form" + 65222 "Arabic Letter Zah Final Form" + 65223 "Arabic Letter Zah Initial Form" + 65224 "Arabic Letter Zah Medial Form" + 65225 "Arabic Letter Ain Isolated Form" + 65226 "Arabic Letter Ain Final Form" + 65227 "Arabic Letter Ain Initial Form" + 65228 "Arabic Letter Ain Medial Form" + 65229 "Arabic Letter Ghain Isolated Form" + 65230 "Arabic Letter Ghain Final Form" + 65231 "Arabic Letter Ghain Initial Form" + 65232 "Arabic Letter Ghain Medial Form" + 65233 "Arabic Letter Feh Isolated Form" + 65234 "Arabic Letter Feh Final Form" + 65235 "Arabic Letter Feh Initial Form" + 65236 "Arabic Letter Feh Medial Form" + 65237 "Arabic Letter Qaf Isolated Form" + 65238 "Arabic Letter Qaf Final Form" + 65239 "Arabic Letter Qaf Initial Form" + 65240 "Arabic Letter Qaf Medial Form" + 65241 "Arabic Letter Kaf Isolated Form" + 65242 "Arabic Letter Kaf Final Form" + 65243 "Arabic Letter Kaf Initial Form" + 65244 "Arabic Letter Kaf Medial Form" + 65245 "Arabic Letter Lam Isolated Form" + 65246 "Arabic Letter Lam Final Form" + 65247 "Arabic Letter Lam Initial Form" + 65248 "Arabic Letter Lam Medial Form" + 65249 "Arabic Letter Meem Isolated Form" + 65250 "Arabic Letter Meem Final Form" + 65251 "Arabic Letter Meem Initial Form" + 65252 "Arabic Letter Meem Medial Form" + 65253 "Arabic Letter Noon Isolated Form" + 65254 "Arabic Letter Noon Final Form" + 65255 "Arabic Letter Noon Initial Form" + 65256 "Arabic Letter Noon Medial Form" + 65257 "Arabic Letter Heh Isolated Form" + 65258 "Arabic Letter Heh Final Form" + 65259 "Arabic Letter Heh Initial Form" + 65260 "Arabic Letter Heh Medial Form" + 65261 "Arabic Letter Waw Isolated Form" + 65262 "Arabic Letter Waw Final Form" + 65263 "Arabic Letter Alef Maksura Isolated Form" + 65264 "Arabic Letter Alef Maksura Final Form" + 65265 "Arabic Letter Yeh Isolated Form" + 65266 "Arabic Letter Yeh Final Form" + 65267 "Arabic Letter Yeh Initial Form" + 65268 "Arabic Letter Yeh Medial Form" + 65269 "Arabic Ligature Lam With Alef With Madda Above Isolated Form" + 65270 "Arabic Ligature Lam With Alef With Madda Above Final Form" + 65271 "Arabic Ligature Lam With Alef With Hamza Above Isolated Form" + 65272 "Arabic Ligature Lam With Alef With Hamza Above Final Form" + 65273 "Arabic Ligature Lam With Alef With Hamza Below Isolated Form" + 65274 "Arabic Ligature Lam With Alef With Hamza Below Final Form" + 65275 "Arabic Ligature Lam With Alef Isolated Form" + 65276 "Arabic Ligature Lam With Alef Final Form" + 65279 "Zero Width No-Break Space" + 65281 "Fullwidth Exclamation Mark" + 65282 "Fullwidth Quotation Mark" + 65283 "Fullwidth Number Sign" + 65284 "Fullwidth Dollar Sign" + 65285 "Fullwidth Percent Sign" + 65286 "Fullwidth Ampersand" + 65287 "Fullwidth Apostrophe" + 65288 "Fullwidth Left Parenthesis" + 65289 "Fullwidth Right Parenthesis" + 65290 "Fullwidth Asterisk" + 65291 "Fullwidth Plus Sign" + 65292 "Fullwidth Comma" + 65293 "Fullwidth Hyphen-Minus" + 65294 "Fullwidth Full Stop" + 65295 "Fullwidth Solidus" + 65296 "Fullwidth Digit Zero" + 65297 "Fullwidth Digit One" + 65298 "Fullwidth Digit Two" + 65299 "Fullwidth Digit Three" + 65300 "Fullwidth Digit Four" + 65301 "Fullwidth Digit Five" + 65302 "Fullwidth Digit Six" + 65303 "Fullwidth Digit Seven" + 65304 "Fullwidth Digit Eight" + 65305 "Fullwidth Digit Nine" + 65306 "Fullwidth Colon" + 65307 "Fullwidth Semicolon" + 65308 "Fullwidth Less-Than Sign" + 65309 "Fullwidth Equals Sign" + 65310 "Fullwidth Greater-Than Sign" + 65311 "Fullwidth Question Mark" + 65312 "Fullwidth Commercial At" + 65313 "Fullwidth Latin Capital Letter A" + 65314 "Fullwidth Latin Capital Letter B" + 65315 "Fullwidth Latin Capital Letter C" + 65316 "Fullwidth Latin Capital Letter D" + 65317 "Fullwidth Latin Capital Letter E" + 65318 "Fullwidth Latin Capital Letter F" + 65319 "Fullwidth Latin Capital Letter G" + 65320 "Fullwidth Latin Capital Letter H" + 65321 "Fullwidth Latin Capital Letter I" + 65322 "Fullwidth Latin Capital Letter J" + 65323 "Fullwidth Latin Capital Letter K" + 65324 "Fullwidth Latin Capital Letter L" + 65325 "Fullwidth Latin Capital Letter M" + 65326 "Fullwidth Latin Capital Letter N" + 65327 "Fullwidth Latin Capital Letter O" + 65328 "Fullwidth Latin Capital Letter P" + 65329 "Fullwidth Latin Capital Letter Q" + 65330 "Fullwidth Latin Capital Letter R" + 65331 "Fullwidth Latin Capital Letter S" + 65332 "Fullwidth Latin Capital Letter T" + 65333 "Fullwidth Latin Capital Letter U" + 65334 "Fullwidth Latin Capital Letter V" + 65335 "Fullwidth Latin Capital Letter W" + 65336 "Fullwidth Latin Capital Letter X" + 65337 "Fullwidth Latin Capital Letter Y" + 65338 "Fullwidth Latin Capital Letter Z" + 65339 "Fullwidth Left Square Bracket" + 65340 "Fullwidth Reverse Solidus" + 65341 "Fullwidth Right Square Bracket" + 65342 "Fullwidth Circumflex Accent" + 65343 "Fullwidth Low Line" + 65344 "Fullwidth Grave Accent" + 65345 "Fullwidth Latin Small Letter A" + 65346 "Fullwidth Latin Small Letter B" + 65347 "Fullwidth Latin Small Letter C" + 65348 "Fullwidth Latin Small Letter D" + 65349 "Fullwidth Latin Small Letter E" + 65350 "Fullwidth Latin Small Letter F" + 65351 "Fullwidth Latin Small Letter G" + 65352 "Fullwidth Latin Small Letter H" + 65353 "Fullwidth Latin Small Letter I" + 65354 "Fullwidth Latin Small Letter J" + 65355 "Fullwidth Latin Small Letter K" + 65356 "Fullwidth Latin Small Letter L" + 65357 "Fullwidth Latin Small Letter M" + 65358 "Fullwidth Latin Small Letter N" + 65359 "Fullwidth Latin Small Letter O" + 65360 "Fullwidth Latin Small Letter P" + 65361 "Fullwidth Latin Small Letter Q" + 65362 "Fullwidth Latin Small Letter R" + 65363 "Fullwidth Latin Small Letter S" + 65364 "Fullwidth Latin Small Letter T" + 65365 "Fullwidth Latin Small Letter U" + 65366 "Fullwidth Latin Small Letter V" + 65367 "Fullwidth Latin Small Letter W" + 65368 "Fullwidth Latin Small Letter X" + 65369 "Fullwidth Latin Small Letter Y" + 65370 "Fullwidth Latin Small Letter Z" + 65371 "Fullwidth Left Curly Bracket" + 65372 "Fullwidth Vertical Line" + 65373 "Fullwidth Right Curly Bracket" + 65374 "Fullwidth Tilde" + 65375 "Fullwidth Left White Parenthesis" + 65376 "Fullwidth Right White Parenthesis" + 65377 "Halfwidth Ideographic Full Stop" + 65378 "Halfwidth Left Corner Bracket" + 65379 "Halfwidth Right Corner Bracket" + 65380 "Halfwidth Ideographic Comma" + 65381 "Halfwidth Katakana Middle Dot" + 65382 "Halfwidth Katakana Letter Wo" + 65383 "Halfwidth Katakana Letter Small A" + 65384 "Halfwidth Katakana Letter Small I" + 65385 "Halfwidth Katakana Letter Small U" + 65386 "Halfwidth Katakana Letter Small E" + 65387 "Halfwidth Katakana Letter Small O" + 65388 "Halfwidth Katakana Letter Small Ya" + 65389 "Halfwidth Katakana Letter Small Yu" + 65390 "Halfwidth Katakana Letter Small Yo" + 65391 "Halfwidth Katakana Letter Small Tu" + 65392 "Halfwidth Katakana-Hiragana Prolonged Sound Mark" + 65393 "Halfwidth Katakana Letter A" + 65394 "Halfwidth Katakana Letter I" + 65395 "Halfwidth Katakana Letter U" + 65396 "Halfwidth Katakana Letter E" + 65397 "Halfwidth Katakana Letter O" + 65398 "Halfwidth Katakana Letter Ka" + 65399 "Halfwidth Katakana Letter Ki" + 65400 "Halfwidth Katakana Letter Ku" + 65401 "Halfwidth Katakana Letter Ke" + 65402 "Halfwidth Katakana Letter Ko" + 65403 "Halfwidth Katakana Letter Sa" + 65404 "Halfwidth Katakana Letter Si" + 65405 "Halfwidth Katakana Letter Su" + 65406 "Halfwidth Katakana Letter Se" + 65407 "Halfwidth Katakana Letter So" + 65408 "Halfwidth Katakana Letter Ta" + 65409 "Halfwidth Katakana Letter Ti" + 65410 "Halfwidth Katakana Letter Tu" + 65411 "Halfwidth Katakana Letter Te" + 65412 "Halfwidth Katakana Letter To" + 65413 "Halfwidth Katakana Letter Na" + 65414 "Halfwidth Katakana Letter Ni" + 65415 "Halfwidth Katakana Letter Nu" + 65416 "Halfwidth Katakana Letter Ne" + 65417 "Halfwidth Katakana Letter No" + 65418 "Halfwidth Katakana Letter Ha" + 65419 "Halfwidth Katakana Letter Hi" + 65420 "Halfwidth Katakana Letter Hu" + 65421 "Halfwidth Katakana Letter He" + 65422 "Halfwidth Katakana Letter Ho" + 65423 "Halfwidth Katakana Letter Ma" + 65424 "Halfwidth Katakana Letter Mi" + 65425 "Halfwidth Katakana Letter Mu" + 65426 "Halfwidth Katakana Letter Me" + 65427 "Halfwidth Katakana Letter Mo" + 65428 "Halfwidth Katakana Letter Ya" + 65429 "Halfwidth Katakana Letter Yu" + 65430 "Halfwidth Katakana Letter Yo" + 65431 "Halfwidth Katakana Letter Ra" + 65432 "Halfwidth Katakana Letter Ri" + 65433 "Halfwidth Katakana Letter Ru" + 65434 "Halfwidth Katakana Letter Re" + 65435 "Halfwidth Katakana Letter Ro" + 65436 "Halfwidth Katakana Letter Wa" + 65437 "Halfwidth Katakana Letter N" + 65438 "Halfwidth Katakana Voiced Sound Mark" + 65439 "Halfwidth Katakana Semi-Voiced Sound Mark" + 65440 "Halfwidth Hangul Filler" + 65441 "Halfwidth Hangul Letter Kiyeok" + 65442 "Halfwidth Hangul Letter Ssangkiyeok" + 65443 "Halfwidth Hangul Letter Kiyeok-Sios" + 65444 "Halfwidth Hangul Letter Nieun" + 65445 "Halfwidth Hangul Letter Nieun-Cieuc" + 65446 "Halfwidth Hangul Letter Nieun-Hieuh" + 65447 "Halfwidth Hangul Letter Tikeut" + 65448 "Halfwidth Hangul Letter Ssangtikeut" + 65449 "Halfwidth Hangul Letter Rieul" + 65450 "Halfwidth Hangul Letter Rieul-Kiyeok" + 65451 "Halfwidth Hangul Letter Rieul-Mieum" + 65452 "Halfwidth Hangul Letter Rieul-Pieup" + 65453 "Halfwidth Hangul Letter Rieul-Sios" + 65454 "Halfwidth Hangul Letter Rieul-Thieuth" + 65455 "Halfwidth Hangul Letter Rieul-Phieuph" + 65456 "Halfwidth Hangul Letter Rieul-Hieuh" + 65457 "Halfwidth Hangul Letter Mieum" + 65458 "Halfwidth Hangul Letter Pieup" + 65459 "Halfwidth Hangul Letter Ssangpieup" + 65460 "Halfwidth Hangul Letter Pieup-Sios" + 65461 "Halfwidth Hangul Letter Sios" + 65462 "Halfwidth Hangul Letter Ssangsios" + 65463 "Halfwidth Hangul Letter Ieung" + 65464 "Halfwidth Hangul Letter Cieuc" + 65465 "Halfwidth Hangul Letter Ssangcieuc" + 65466 "Halfwidth Hangul Letter Chieuch" + 65467 "Halfwidth Hangul Letter Khieukh" + 65468 "Halfwidth Hangul Letter Thieuth" + 65469 "Halfwidth Hangul Letter Phieuph" + 65470 "Halfwidth Hangul Letter Hieuh" + 65474 "Halfwidth Hangul Letter A" + 65475 "Halfwidth Hangul Letter Ae" + 65476 "Halfwidth Hangul Letter Ya" + 65477 "Halfwidth Hangul Letter Yae" + 65478 "Halfwidth Hangul Letter Eo" + 65479 "Halfwidth Hangul Letter E" + 65482 "Halfwidth Hangul Letter Yeo" + 65483 "Halfwidth Hangul Letter Ye" + 65484 "Halfwidth Hangul Letter O" + 65485 "Halfwidth Hangul Letter Wa" + 65486 "Halfwidth Hangul Letter Wae" + 65487 "Halfwidth Hangul Letter Oe" + 65490 "Halfwidth Hangul Letter Yo" + 65491 "Halfwidth Hangul Letter U" + 65492 "Halfwidth Hangul Letter Weo" + 65493 "Halfwidth Hangul Letter We" + 65494 "Halfwidth Hangul Letter Wi" + 65495 "Halfwidth Hangul Letter Yu" + 65498 "Halfwidth Hangul Letter Eu" + 65499 "Halfwidth Hangul Letter Yi" + 65500 "Halfwidth Hangul Letter I" + 65504 "Fullwidth Cent Sign" + 65505 "Fullwidth Pound Sign" + 65506 "Fullwidth Not Sign" + 65507 "Fullwidth Macron" + 65508 "Fullwidth Broken Bar" + 65509 "Fullwidth Yen Sign" + 65510 "Fullwidth Won Sign" + 65512 "Halfwidth Forms Light Vertical" + 65513 "Halfwidth Leftwards Arrow" + 65514 "Halfwidth Upwards Arrow" + 65515 "Halfwidth Rightwards Arrow" + 65516 "Halfwidth Downwards Arrow" + 65517 "Halfwidth Black Square" + 65518 "Halfwidth White Circle" + 65529 "Interlinear Annotation Anchor" + 65530 "Interlinear Annotation Separator" + 65531 "Interlinear Annotation Terminator" + 65532 "Object Replacement Character" END diff --git a/dll/win32/getuname/lang/sq-AL.rc b/dll/win32/getuname/lang/sq-AL.rc index b59a700ff1d..e8aa60f3601 100644 --- a/dll/win32/getuname/lang/sq-AL.rc +++ b/dll/win32/getuname/lang/sq-AL.rc @@ -899,6 +899,7 @@ BEGIN 892 "Greke e Vogël Pika-Pika Lunate Sigma Simbol" 893 "Greke e Vogël Kundërt Pika-Pika Lunate Sigma Simbol" 894 "Greke Pyetje Shenjë" + 895 "Greek Capital Letter Yot" 900 "Greke Tonos" 901 "Greke Dialytika Tonos" 902 "Greke Shkronjë e Madhe Alpha Me Tonos" @@ -1316,6 +1317,14 @@ BEGIN 1317 "Cyrillic Shkronjë e Vogël Pe Me Descender" 1318 "Cyrillic Shkronjë e Madhe Shha Me Descender" 1319 "Cyrillic Shkronjë e Vogël Shha Me Descender" + 1320 "Cyrillic Capital Letter En With Left Hook" + 1321 "Cyrillic Small Letter En With Left Hook" + 1322 "Cyrillic Capital Letter Dzzhe" + 1323 "Cyrillic Small Letter Dzzhe" + 1324 "Cyrillic Capital Letter Dche" + 1325 "Cyrillic Small Letter Dche" + 1326 "Cyrillic Capital Letter El With Descender" + 1327 "Cyrillic Small Letter El With Descender" 1329 "Shkronjë e Madhe Armene Ayb" 1330 "Shkronjë e Madhe Armene Ben" 1331 "Shkronjë e Madhe Armene Gim" @@ -1402,6 +1411,8 @@ BEGIN 1415 "Armene e Vogël Lidhje Ech Yiwn" 1417 "Armene Pikë" 1418 "Armene Hyphen" + 1421 "Right-Facing Armenian Eternity Sign" + 1422 "Left-Facing Armenian Eternity Sign" 1423 "Armene Dram Shenjë" 1425 "Theks Hebre Etnahta" 1426 "Theks Hebre Segol" @@ -1495,6 +1506,7 @@ BEGIN 1538 "Arabe Nën-Shënim Shënues" 1539 "Arabe Shenjë Safha" 1540 "Arabe Shenjë Samvat" + 1541 "Arabic Number Mark Above" 1542 "Arabe-Indic Cube Root" 1543 "Arabe-Indic Katërt Root" 1544 "Arabe Ray" @@ -1517,6 +1529,7 @@ BEGIN 1561 "Arabe e Vogël Damma" 1562 "Arabe e Vogël Kasra" 1563 "Arabe Pikëpresje" + 1564 "Arabic Letter Mark" 1566 "Arabe Trefish Pikë Pikësim Shenjë" 1567 "Arabe Pyetje Shenjë" 1568 "Arabe Shkronjë Kashmiri Yeh" @@ -2068,6 +2081,7 @@ BEGIN 2139 "Mandaic Dyfishim Shenjë" 2142 "Mandaic Pikësim" 2208 "Arabe Shkronjë Beh Me e Vogël V Poshtë" + 2209 "Arabic Letter Beh With Hamza Above" 2210 "Arabe Shkronjë Jeem Me Dy Pikë Lart" 2211 "Arabe Shkronjë Tah Me Dy Pikë Lart" 2212 "Arabe Shkronjë Feh Me Pikë Poshtë dhe Tre Pikë Lart" @@ -2079,6 +2093,12 @@ BEGIN 2218 "Arabe Shkronjë Reh Me Loop" 2219 "Arabe Shkronjë Waw Me Pikë Mein" 2220 "Arabe Shkronjë Rohingya Yeh" + 2221 "Arabic Letter Low Alef" + 2222 "Arabic Letter Dal With Three Dots Below" + 2223 "Arabic Letter Sad With Three Dots Below" + 2224 "Arabic Letter Gaf With Inverted Stroke" + 2225 "Arabic Letter Straight Waw" + 2226 "Arabic Letter Zain With Inverted V Above" 2276 "Arabe Dredhur Fatha" 2277 "Arabe Dredhur Damma" 2278 "Arabe Dredhur Kasra" @@ -2106,6 +2126,7 @@ BEGIN 2300 "Arabe Dyshe Djathtë kokë-Shigjete Lart Me Pikë" 2301 "Arabe Djathtë kokë-Shigjete Lart Me Pikë" 2302 "Arabe Damma Me Pikë" + 2303 "Arabic Mark Sideways Noon Ghunna" 2304 "Devanagari Shenjë Kthyer Candrabindu" 2305 "Devanagari Shenjë Candrabindu" 2306 "Devanagari Shenjë Anusvara" @@ -2226,6 +2247,7 @@ BEGIN 2421 "Devanagari Shkronjë Aw" 2422 "Devanagari Shkronjë Ue" 2423 "Devanagari Shkronjë Uue" + 2424 "Devanagari Letter Marwari Dda" 2425 "Devanagari Shkronjë Zha" 2426 "Devanagari Shkronjë Rëndë Ya" 2427 "Devanagari Shkronjë Gga" @@ -2233,6 +2255,7 @@ BEGIN 2429 "Devanagari Shkronjë Glottal Stop" 2430 "Devanagari Shkronjë Ddda" 2431 "Devanagari Shkronjë Bba" + 2432 "Bengali Anji" 2433 "Bengali Shenjë Candrabindu" 2434 "Bengali Shenjë Anusvara" 2435 "Bengali Shenjë Visarga" @@ -2650,6 +2673,7 @@ BEGIN 3064 "Tamil Aq Lart Shenjë" 3065 "Tamil Rupee Shenjë" 3066 "Tamil Numër Shenjë" + 3072 "Telugu Sign Combining Candrabindu Above" 3073 "Telugu Shenjë Candrabindu" 3074 "Telugu Shenjë Anusvara" 3075 "Telugu Shenjë Visarga" @@ -2697,6 +2721,7 @@ BEGIN 3121 "Telugu Shkronjë Rra" 3122 "Telugu Shkronjë La" 3123 "Telugu Shkronjë Lla" + 3124 "Telugu Letter Llla" 3125 "Telugu Shkronjë Va" 3126 "Telugu Shkronjë Sha" 3127 "Telugu Shkronjë Ssa" @@ -2743,6 +2768,7 @@ BEGIN 3197 "Telugu Fraksion Shifër Dy Për Forcë Probabiliteti Katër" 3198 "Telugu Fraksion Shifër Tre Për Forcë Probabiliteti Barabartë me Katër" 3199 "Telugu Shenjë Tuumu" + 3201 "Kannada Sign Candrabindu" 3202 "Kanada Shenjë Anusvara" 3203 "Kanada Shenjë Visarga" 3205 "Kanada Shkronjë A" @@ -2829,6 +2855,7 @@ BEGIN 3311 "Kanada Shifër Nëntë" 3313 "Kanada Shenjë Jihvamuliya" 3314 "Kanada Shenjë Upadhmaniya" + 3329 "Malayalam Sign Candrabindu" 3330 "Malayalam Shenjë Anusvara" 3331 "Malayalam Shenjë Visarga" 3333 "Malayalam Shkronjë A" @@ -3004,6 +3031,16 @@ BEGIN 3549 "Senegaleze Zanore Shenjë Kombuva Haa Diga Aela-Pilla" 3550 "Senegaleze Zanore Shenjë Kombuva Haa Gayanukitta" 3551 "Senegaleze Zanore Shenjë Gayanukitta" + 3558 "Sinhala Lith Digit Zero" + 3559 "Sinhala Lith Digit One" + 3560 "Sinhala Lith Digit Two" + 3561 "Sinhala Lith Digit Three" + 3562 "Sinhala Lith Digit Four" + 3563 "Sinhala Lith Digit Five" + 3564 "Sinhala Lith Digit Six" + 3565 "Sinhala Lith Digit Seven" + 3566 "Sinhala Lith Digit Eight" + 3567 "Sinhala Lith Digit Nine" 3570 "Senegaleze Zanore Shenjë Diga Gaetta-Pilla" 3571 "Senegaleze Zanore Shenjë Diga Gayanukitta" 3572 "Senegaleze Pikësim Kunddaliya" @@ -5095,6 +5132,14 @@ BEGIN 5870 "Runic Arlaug Simbol" 5871 "Runic Tvimadur Simbol" 5872 "Runic Belgthor Simbol" + 5873 "Runic Letter K" + 5874 "Runic Letter Sh" + 5875 "Runic Letter Oo" + 5876 "Runic Letter Franks Casket Os" + 5877 "Runic Letter Franks Casket Is" + 5878 "Runic Letter Franks Casket Eh" + 5879 "Runic Letter Franks Casket Ac" + 5880 "Runic Letter Franks Casket Aesc" 5888 "Tagalog Shkronjë A" 5889 "Tagalog Shkronjë I" 5890 "Tagalog Shkronjë U" @@ -5545,6 +5590,8 @@ BEGIN 6426 "Limbu Shkronjë Ssa" 6427 "Limbu Shkronjë Sa" 6428 "Limbu Shkronjë Ha" + 6429 "Limbu Letter Gyan" + 6430 "Limbu Letter Tra" 6432 "Limbu Zanore Shenjë A" 6433 "Limbu Zanore Shenjë I" 6434 "Limbu Zanore Shenjë U" @@ -5889,6 +5936,21 @@ BEGIN 6827 "Tai Tham Shenjë Satkaankuu" 6828 "Tai Tham Shenjë Hang" 6829 "Tai Tham Shenjë Caang" + 6832 "Combining Doubled Circumflex Accent" + 6833 "Combining Diaeresis-Ring" + 6834 "Combining Infinity" + 6835 "Combining Downwards Arrow" + 6836 "Combining Triple Dot" + 6837 "Combining X-X Below" + 6838 "Combining Wiggly Line Below" + 6839 "Combining Open Mark Below" + 6840 "Combining Double Open Mark Below" + 6841 "Combining Light Centralization Stroke Below" + 6842 "Combining Strong Centralization Stroke Below" + 6843 "Combining Parentheses Above" + 6844 "Combining Double Parentheses Above" + 6845 "Combining Parentheses Below" + 6846 "Combining Parentheses Overlay" 6912 "Balinese Shenjë Ulu Ricem" 6913 "Balinese Shenjë Ulu Candra" 6914 "Balinese Shenjë Cecek" @@ -6299,6 +6361,8 @@ BEGIN 7412 "Vedic Tone Candra Lart" 7413 "Vedic Shenjë Jihvamuliya" 7414 "Vedic Shenjë Upadhmaniya" + 7416 "Vedic Tone Ring Above" + 7417 "Vedic Tone Double Ring Above" 7424 "Latin Shkronjë e Vogël e Madhe A" 7425 "Latin Shkronjë e Vogël e Madhe Ae" 7426 "Shkronjë e Vogël Latine Kthyer Ae" @@ -6530,6 +6594,21 @@ BEGIN 7652 "Kombinuar Shkronjë e Vogël Latine S" 7653 "Kombinuar Shkronjë e Vogël Latine Gjatë S" 7654 "Kombinuar Shkronjë e Vogël Latine Z" + 7655 "Combining Latin Small Letter Alpha" + 7656 "Combining Latin Small Letter B" + 7657 "Combining Latin Small Letter Beta" + 7658 "Combining Latin Small Letter Schwa" + 7659 "Combining Latin Small Letter F" + 7660 "Combining Latin Small Letter L With Double Middle Tilde" + 7661 "Combining Latin Small Letter O With Light Centralization Stroke" + 7662 "Combining Latin Small Letter P" + 7663 "Combining Latin Small Letter Esh" + 7664 "Combining Latin Small Letter U With Light Centralization Stroke" + 7665 "Combining Latin Small Letter W" + 7666 "Combining Latin Small Letter A With Diaeresis" + 7667 "Combining Latin Small Letter O With Diaeresis" + 7668 "Combining Latin Small Letter U With Diaeresis" + 7669 "Combining Up Tack Above" 7676 "Kombinuar Dyshe Kthyer Breve Poshtë" 7677 "Kombinuar Pothuajse e Barabartë Me Poshtë" 7678 "Kombinuar Majtë kokë-Shigjete Lart" @@ -7124,6 +7203,10 @@ BEGIN 8290 "Kohë Padukshme" 8291 "Padukshme Ndarës" 8292 "Padukshme Plus" + 8294 "Left-To-Right Isolate" + 8295 "Right-To-Left Isolate" + 8296 "First Strong Isolate" + 8297 "Pop Directional Isolate" 8298 "Pengojnë Simetrike Shkëmbejnë" 8299 "Aktivizo Simetrike Shkëmbejnë" 8300 "Pengojnë Arabe Formë Formim" @@ -7199,6 +7282,9 @@ BEGIN 8376 "Tenge Shenjë" 8377 "Indian Rupee Shenjë" 8378 "Turke Lira Shenjë" + 8379 "Nordic Mark Sign" + 8380 "Manat Sign" + 8381 "Ruble Sign" 8400 "Kombinuar Majtë Fuzhnjë Lart" 8401 "Kombinuar Djathtë Fuzhnjë Lart" 8402 "Kombinuar Gjatë Vertikale Linjë Mbulim" @@ -7982,6 +8068,13 @@ BEGIN 9201 "Kronometër" 9202 "Orë Sahati" 9203 "Orë-Qelqi Me Rrjedhin Rërë" + 9204 "Black Medium Left-Pointing Triangle" + 9205 "Black Medium Right-Pointing Triangle" + 9206 "Black Medium Up-Pointing Triangle" + 9207 "Black Medium Down-Pointing Triangle" + 9208 "Double Vertical Bar" + 9209 "Black Square For Stop" + 9210 "Black Circle For Record" 9216 "Simbol Për Nul" 9217 "Simbol Për Start e Kreut" 9218 "Simbol Për Start E Tekstit" @@ -8704,6 +8797,7 @@ BEGIN 9981 "Pompë Karburanti" 9982 "E Zezë Katror" 9983 "E Bardhë Flamur Me Horizontal Mesit e Zezë Shirit" + 9984 "Black Safety Scissors" 9985 "Sipërm Gërshërë Thikë" 9986 "e Zezë Gërshërë" 9987 "Më i'ulët Thikë Gërshërë" @@ -8904,9 +8998,9 @@ BEGIN 10182 "Djathtë S-Formë Çantë Deli-metri" 10183 "ose Me Pikë Brenda" 10184 "Kthe-Mbrapsht Solidus Paraprirë Nën-vendos" - 10187 "Matematikisht Rritje Diagonal" - 10186 "Vertikale Bar Me Horizontal Goditje" 10185 "Mbi-vendos Paraprirë Solidus" + 10186 "Vertikale Bar Me Horizontal Goditje" + 10187 "Matematikisht Rritje Diagonal" 10188 "Gjatë Ndarje" 10189 "Matematikisht Bie Diagonal" 10190 "Katror Logjike dhe" @@ -9804,6 +9898,9 @@ BEGIN 11082 "Majtas Shigjetë Lart Pothuajse e Barabartë Me" 11083 "Majtas Shigjetë Lart Kthe-Mbrapsht Tildë Operator" 11084 "Djathtas Shigjetë Lart Kthe-Mbrapsht Tildë Operator" + 11085 "Downwards Triangle-Headed Zigzag Arrow" + 11086 "Short Slanted North Arrow" + 11087 "Short Backslanted South Arrow" 11088 "e Bardhë Medium Yll" 11089 "e Zezë e Vogël Yll" 11090 "e Bardhë e Vogël Yll" @@ -9814,6 +9911,118 @@ BEGIN 11095 "Rëndë Rreth Me Rreth Brenda" 11096 "Rëndë Rreth" 11097 "Rëndë Rrethuar Saltire" + 11098 "Slanted North Arrow With Hooked Head" + 11099 "Backslanted South Arrow With Hooked Tail" + 11100 "Slanted North Arrow With Horizontal Tail" + 11101 "Backslanted South Arrow With Horizontal Tail" + 11102 "Bent Arrow Pointing Downwards Then North East" + 11103 "Short Bent Arrow Pointing Downwards Then North East" + 11104 "Leftwards Triangle-Headed Arrow" + 11105 "Upwards Triangle-Headed Arrow" + 11106 "Rightwards Triangle-Headed Arrow" + 11107 "Downwards Triangle-Headed Arrow" + 11108 "Left Right Triangle-Headed Arrow" + 11109 "Up Down Triangle-Headed Arrow" + 11110 "North West Triangle-Headed Arrow" + 11111 "North East Triangle-Headed Arrow" + 11112 "South East Triangle-Headed Arrow" + 11113 "South West Triangle-Headed Arrow" + 11114 "Leftwards Triangle-Headed Dashed Arrow" + 11115 "Upwards Triangle-Headed Dashed Arrow" + 11116 "Rightwards Triangle-Headed Dashed Arrow" + 11117 "Downwards Triangle-Headed Dashed Arrow" + 11118 "Clockwise Triangle-Headed Open Circle Arrow" + 11119 "Anticlockwise Triangle-Headed Open Circle Arrow" + 11120 "Leftwards Triangle-Headed Arrow To Bar" + 11121 "Upwards Triangle-Headed Arrow To Bar" + 11122 "Rightwards Triangle-Headed Arrow To Bar" + 11123 "Downwards Triangle-Headed Arrow To Bar" + 11126 "North West Triangle-Headed Arrow To Bar" + 11127 "North East Triangle-Headed Arrow To Bar" + 11128 "South East Triangle-Headed Arrow To Bar" + 11129 "South West Triangle-Headed Arrow To Bar" + 11130 "Leftwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11131 "Upwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11132 "Rightwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11133 "Downwards Triangle-Headed Arrow With Double Horizontal Stroke" + 11134 "Horizontal Tab Key" + 11135 "Vertical Tab Key" + 11136 "Leftwards Triangle-Headed Arrow Over Rightwards Triangle-Headed Arrow" + 11137 "Upwards Triangle-Headed Arrow Leftwards Of Downwards Triangle-Headed Arrow" + 11138 "Rightwards Triangle-Headed Arrow Over Leftwards Triangle-Headed Arrow" + 11139 "Downwards Triangle-Headed Arrow Leftwards Of Upwards Triangle-Headed Arrow" + 11140 "Leftwards Triangle-Headed Paired Arrows" + 11141 "Upwards Triangle-Headed Paired Arrows" + 11142 "Rightwards Triangle-Headed Paired Arrows" + 11143 "Downwards Triangle-Headed Paired Arrows" + 11144 "Leftwards Black Circled White Arrow" + 11145 "Upwards Black Circled White Arrow" + 11146 "Rightwards Black Circled White Arrow" + 11147 "Downwards Black Circled White Arrow" + 11148 "Anticlockwise Triangle-Headed Right U-Shaped Arrow" + 11149 "Anticlockwise Triangle-Headed Bottom U-Shaped Arrow" + 11150 "Anticlockwise Triangle-Headed Left U-Shaped Arrow" + 11151 "Anticlockwise Triangle-Headed Top U-Shaped Arrow" + 11152 "Return Left" + 11153 "Return Right" + 11154 "Newline Left" + 11155 "Newline Right" + 11156 "Four Corner Arrows Circling Anticlockwise" + 11157 "Rightwards Black Arrow" + 11160 "Three-D Top-Lighted Leftwards Equilateral Arrowhead" + 11161 "Three-D Right-Lighted Upwards Equilateral Arrowhead" + 11162 "Three-D Top-Lighted Rightwards Equilateral Arrowhead" + 11163 "Three-D Left-Lighted Downwards Equilateral Arrowhead" + 11164 "Black Leftwards Equilateral Arrowhead" + 11165 "Black Upwards Equilateral Arrowhead" + 11166 "Black Rightwards Equilateral Arrowhead" + 11167 "Black Downwards Equilateral Arrowhead" + 11168 "Downwards Triangle-Headed Arrow With Long Tip Leftwards" + 11169 "Downwards Triangle-Headed Arrow With Long Tip Rightwards" + 11170 "Upwards Triangle-Headed Arrow With Long Tip Leftwards" + 11171 "Upwards Triangle-Headed Arrow With Long Tip Rightwards" + 11172 "Leftwards Triangle-Headed Arrow With Long Tip Upwards" + 11173 "Rightwards Triangle-Headed Arrow With Long Tip Upwards" + 11174 "Leftwards Triangle-Headed Arrow With Long Tip Downwards" + 11175 "Rightwards Triangle-Headed Arrow With Long Tip Downwards" + 11176 "Black Curved Downwards And Leftwards Arrow" + 11177 "Black Curved Downwards And Rightwards Arrow" + 11178 "Black Curved Upwards And Leftwards Arrow" + 11179 "Black Curved Upwards And Rightwards Arrow" + 11180 "Black Curved Leftwards And Upwards Arrow" + 11181 "Black Curved Rightwards And Upwards Arrow" + 11182 "Black Curved Leftwards And Downwards Arrow" + 11183 "Black Curved Rightwards And Downwards Arrow" + 11184 "Ribbon Arrow Down Left" + 11185 "Ribbon Arrow Down Right" + 11186 "Ribbon Arrow Up Left" + 11187 "Ribbon Arrow Up Right" + 11188 "Ribbon Arrow Left Up" + 11189 "Ribbon Arrow Right Up" + 11190 "Ribbon Arrow Left Down" + 11191 "Ribbon Arrow Right Down" + 11192 "Upwards White Arrow From Bar With Horizontal Bar" + 11193 "Up Arrowhead In A Rectangle Box" + 11197 "Ballot Box With Light X" + 11198 "Circled X" + 11199 "Circled Bold X" + 11200 "Black Square Centred" + 11201 "Black Diamond Centred" + 11202 "Turned Black Pentagon" + 11203 "Horizontal Black Octagon" + 11204 "Black Octagon" + 11205 "Black Medium Up-Pointing Triangle Centred" + 11206 "Black Medium Down-Pointing Triangle Centred" + 11207 "Black Medium Left-Pointing Triangle Centred" + 11208 "Black Medium Right-Pointing Triangle Centred" + 11210 "Top Half Black Circle" + 11211 "Bottom Half Black Circle" + 11212 "Light Four Pointed Black Cusp" + 11213 "Rotated Light Four Pointed Black Cusp" + 11214 "White Four Pointed Cusp" + 11215 "Rotated White Four Pointed Cusp" + 11216 "Square Position Indicator" + 11217 "Uncertainty Sign" 11264 "Glagolitike Shkronjë e Madhe Azu" 11265 "Glagolitike Shkronjë e Madhe Buky" 11266 "Glagolitike Shkronjë e Madhe Vede" @@ -10333,6 +10542,13 @@ BEGIN 11833 "Sipërm Gjysmë Seksion Shenjë" 11834 "Dy-Em Dash" 11835 "Tre-Em Dash" + 11836 "Stenographic Full Stop" + 11837 "Vertical Six Dots" + 11838 "Wiggly Vertical Line" + 11839 "Capitulum" + 11840 "Double Hyphen" + 11841 "Reversed Comma" + 11842 "Double Low-Reversed-9 Quotation Mark" 11904 "CJK Radikal Përsëritje" 11905 "CJK Radikal Shkëmb" 11906 "CJK Radikal Sekondë Një" @@ -13391,6 +13607,12 @@ BEGIN 42645 "Cyrillic Shkronjë e Vogël Hwe" 42646 "Cyrillic Shkronjë e Madhe Shwe" 42647 "Cyrillic Shkronjë e Vogël Shwe" + 42648 "Cyrillic Capital Letter Double O" + 42649 "Cyrillic Small Letter Double O" + 42650 "Cyrillic Capital Letter Crossed O" + 42651 "Cyrillic Small Letter Crossed O" + 42652 "Modifier Letter Cyrillic Hard Sign" + 42653 "Modifier Letter Cyrillic Soft Sign" 42655 "Kombinuar Cyrillic Shkronjë Iotified E" 42656 "Bamum Shkronjë A" 42657 "Bamum Shkronjë Ka" @@ -13627,6 +13849,18 @@ BEGIN 42897 "Shkronjë e Vogël Latine N Me Descender" 42898 "Shkronjë e Madhe Latine C Me Bar" 42899 "Shkronjë e Vogël Latine C Me Bar" + 42900 "Latin Small Letter C With Palatal Hook" + 42901 "Latin Small Letter H With Palatal Hook" + 42902 "Latin Capital Letter B With Flourish" + 42903 "Latin Small Letter B With Flourish" + 42904 "Latin Capital Letter F With Stroke" + 42905 "Latin Small Letter F With Stroke" + 42906 "Latin Capital Letter Volapuk Ae" + 42907 "Latin Small Letter Volapuk Ae" + 42908 "Latin Capital Letter Volapuk Oe" + 42909 "Latin Small Letter Volapuk Oe" + 42910 "Latin Capital Letter Volapuk Ue" + 42911 "Latin Small Letter Volapuk Ue" 42912 "Shkronjë e Madhe Latine G Me Oblique Goditje" 42913 "Shkronjë e Vogël Latine G Me Oblique Goditje" 42914 "Shkronjë e Madhe Latine K Me Oblique Goditje" @@ -13638,6 +13872,12 @@ BEGIN 42920 "Shkronjë e Madhe Latine S Me Oblique Goditje" 42921 "Shkronjë e Vogël Latine S Me Oblique Goditje" 42922 "Shkronjë e Madhe Latine H Me Kapje" + 42923 "Latin Capital Letter Reversed Open E" + 42924 "Latin Capital Letter Script G" + 42925 "Latin Capital Letter L With Belt" + 42928 "Latin Capital Letter Turned K" + 42929 "Latin Capital Letter Turned T" + 42999 "Latin Epigraphic Letter Sideways I" 43000 "Modifiko Shkronjë e Madhe H Me Goditje" 43001 "Modifiko Shkronjë e Vogël Lidhje Oe" 43002 "Latin Shkronjë e Vogël e Madhe Kthyer M" @@ -14070,6 +14310,37 @@ BEGIN 43481 "Javanese Shifër Nëntë" 43486 "Javanese Pada Tirta Tumetes" 43487 "Javanese Pada Isen-Isen" + 43488 "Myanmar Letter Shan Gha" + 43489 "Myanmar Letter Shan Cha" + 43490 "Myanmar Letter Shan Jha" + 43491 "Myanmar Letter Shan Nna" + 43492 "Myanmar Letter Shan Bha" + 43493 "Myanmar Sign Shan Saw" + 43494 "Myanmar Modifier Letter Shan Reduplication" + 43495 "Myanmar Letter Tai Laing Nya" + 43496 "Myanmar Letter Tai Laing Fa" + 43497 "Myanmar Letter Tai Laing Ga" + 43498 "Myanmar Letter Tai Laing Gha" + 43499 "Myanmar Letter Tai Laing Ja" + 43500 "Myanmar Letter Tai Laing Jha" + 43501 "Myanmar Letter Tai Laing Dda" + 43502 "Myanmar Letter Tai Laing Ddha" + 43503 "Myanmar Letter Tai Laing Nna" + 43504 "Myanmar Tai Laing Digit Zero" + 43505 "Myanmar Tai Laing Digit One" + 43506 "Myanmar Tai Laing Digit Two" + 43507 "Myanmar Tai Laing Digit Three" + 43508 "Myanmar Tai Laing Digit Four" + 43509 "Myanmar Tai Laing Digit Five" + 43510 "Myanmar Tai Laing Digit Six" + 43511 "Myanmar Tai Laing Digit Seven" + 43512 "Myanmar Tai Laing Digit Eight" + 43513 "Myanmar Tai Laing Digit Nine" + 43514 "Myanmar Letter Tai Laing Lla" + 43515 "Myanmar Letter Tai Laing Da" + 43516 "Myanmar Letter Tai Laing Dha" + 43517 "Myanmar Letter Tai Laing Ba" + 43518 "Myanmar Letter Tai Laing Bha" 43520 "Cham Shkronjë A" 43521 "Cham Shkronjë I" 43522 "Cham Shkronjë U" @@ -14181,6 +14452,10 @@ BEGIN 43641 "Myanmar Simbol Aiton Dy" 43642 "Myanmar Shkronjë Aiton Ra" 43643 "Myanmar Shenjë Pao Karen Tone" + 43644 "Myanmar Sign Tai Laing Tone-2" + 43645 "Myanmar Sign Tai Laing Tone-5" + 43646 "Myanmar Letter Shwe Palaung Cha" + 43647 "Myanmar Letter Shwe Palaung Sha" 43648 "Tai Viet Shkronjë Ulët Ko" 43649 "Tai Viet Shkronjë Lart Ko" 43650 "Tai Viet Shkronjë Ulët Kho" @@ -14308,6 +14583,56 @@ BEGIN 43820 "Ethiopic Rrokje Bbee" 43821 "Ethiopic Rrokje Bbe" 43822 "Ethiopic Rrokje Bbo" + 43824 "Latin Small Letter Barred Alpha" + 43825 "Latin Small Letter A Reversed-Schwa" + 43826 "Latin Small Letter Blackletter E" + 43827 "Latin Small Letter Barred E" + 43828 "Latin Small Letter E With Flourish" + 43829 "Latin Small Letter Lenis F" + 43830 "Latin Small Letter Script G With Crossed-Tail" + 43831 "Latin Small Letter L With Inverted Lazy S" + 43832 "Latin Small Letter L With Double Middle Tilde" + 43833 "Latin Small Letter L With Middle Ring" + 43834 "Latin Small Letter M With Crossed-Tail" + 43835 "Latin Small Letter N With Crossed-Tail" + 43836 "Latin Small Letter Eng With Crossed-Tail" + 43837 "Latin Small Letter Blackletter O" + 43838 "Latin Small Letter Blackletter O With Stroke" + 43839 "Latin Small Letter Open O With Stroke" + 43840 "Latin Small Letter Inverted Oe" + 43841 "Latin Small Letter Turned Oe With Stroke" + 43842 "Latin Small Letter Turned Oe With Horizontal Stroke" + 43843 "Latin Small Letter Turned O Open-O" + 43844 "Latin Small Letter Turned O Open-O With Stroke" + 43845 "Latin Small Letter Stirrup R" + 43846 "Latin Letter Small Capital R With Right Leg" + 43847 "Latin Small Letter R Without Handle" + 43848 "Latin Small Letter Double R" + 43849 "Latin Small Letter R With Crossed-Tail" + 43850 "Latin Small Letter Double R With Crossed-Tail" + 43851 "Latin Small Letter Script R" + 43852 "Latin Small Letter Script R With Ring" + 43853 "Latin Small Letter Baseline Esh" + 43854 "Latin Small Letter U With Short Right Leg" + 43855 "Latin Small Letter U Bar With Short Right Leg" + 43856 "Latin Small Letter Ui" + 43857 "Latin Small Letter Turned Ui" + 43858 "Latin Small Letter U With Left Hook" + 43859 "Latin Small Letter Chi" + 43860 "Latin Small Letter Chi With Low Right Ring" + 43861 "Latin Small Letter Chi With Low Left Serif" + 43862 "Latin Small Letter X With Low Right Ring" + 43863 "Latin Small Letter X With Long Left Leg" + 43864 "Latin Small Letter X With Long Left Leg And Low Right Ring" + 43865 "Latin Small Letter X With Long Left Leg With Serif" + 43866 "Latin Small Letter Y With Short Right Leg" + 43867 "Modifier Breve With Inverted Breve" + 43868 "Modifier Letter Small Heng" + 43869 "Modifier Letter Small L With Inverted Lazy S" + 43870 "Modifier Letter Small L With Middle Tilde" + 43871 "Modifier Letter Small U With Left Hook" + 43876 "Latin Small Letter Inverted Alpha" + 43877 "Greek Letter Small Capital Omega" 43968 "Meetei Mayek Shkronjë Kok" 43969 "Meetei Mayek Shkronjë Sam" 43970 "Meetei Mayek Shkronjë Lai" @@ -15620,6 +15945,13 @@ BEGIN 65060 "Kombinuar Macron Majtë Gjysmë" 65061 "Kombinuar Macron Djathtë Gjysmë" 65062 "Kombinuar Conjoining Macron" + 65063 "Combining Ligature Left Half Below" + 65064 "Combining Ligature Right Half Below" + 65065 "Combining Tilde Left Half Below" + 65066 "Combining Tilde Right Half Below" + 65067 "Combining Macron Left Half Below" + 65068 "Combining Macron Right Half Below" + 65069 "Combining Conjoining Macron Below" 65072 "Prezantimi Forma Për Vertikale Dy Pikë Udhëheqëse" 65073 "Prezantimi Forma Për Vertikale Em Dash" 65074 "Prezantimi Forma Për Vertikale En Dash" diff --git a/dll/win32/hhctrl.ocx/lang/Ru.rc b/dll/win32/hhctrl.ocx/lang/Ru.rc index eee2fd9faeb..afeee4868f1 100644 --- a/dll/win32/hhctrl.ocx/lang/Ru.rc +++ b/dll/win32/hhctrl.ocx/lang/Ru.rc @@ -54,7 +54,7 @@ BEGIN IDTB_FAVORITES "Избранное" IDTB_JUMP1 "Переход 1" IDTB_JUMP2 "Переход 2" - IDTB_CUSTOMIZE "Персонализовать" + IDTB_CUSTOMIZE "Персонализировать" IDTB_ZOOM "Масштаб" IDTB_TOC_NEXT "Следующая глава" IDTB_TOC_PREV "Предыдущая глава" diff --git a/dll/win32/jscript/lang/jscript_Tr.rc b/dll/win32/jscript/lang/jscript_Tr.rc index 6bc6d419589..3dd2ef16c75 100644 --- a/dll/win32/jscript/lang/jscript_Tr.rc +++ b/dll/win32/jscript/lang/jscript_Tr.rc @@ -36,7 +36,7 @@ STRINGTABLE IDS_OBJECT_EXPECTED "Nesne bekleniyordu." IDS_ILLEGAL_ASSIGN "Geçersiz atama." IDS_UNDEFINED """|"" tanımlı değil." - IDS_NOT_BOOL "Boolean nesnesi bekleniyordu." + IDS_NOT_BOOL "Boole nesnesi bekleniyordu." IDS_JSCRIPT_EXPECTED "JScript nesnesi bekleniyordu." IDS_REGEXP_SYNTAX_ERROR "Düzenli deyişte söz dizimi yanlışlığı." IDS_URI_INVALID_CHAR "Kodlanacak URI geçersiz damgalar içeriyor." diff --git a/dll/win32/kernel32/client/console/console.c b/dll/win32/kernel32/client/console/console.c index 0a4059ac84a..ee630cbac3a 100644 --- a/dll/win32/kernel32/client/console/console.c +++ b/dll/win32/kernel32/client/console/console.c @@ -3,8 +3,8 @@ * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/client/console/console.c * PURPOSE: Win32 server console functions - * PROGRAMMERS: James Tabor - * + * PROGRAMMERS: James Tabor + * Hermes Belusca-Maito (hermes.belusca@sfr.fr) */ /* INCLUDES *******************************************************************/ @@ -18,29 +18,37 @@ /* GLOBALS ********************************************************************/ extern RTL_CRITICAL_SECTION ConsoleLock; -extern BOOL ConsoleInitialized; -extern BOOL WINAPI IsDebuggerPresent(VOID); +extern BOOLEAN ConsoleInitialized; /* Console reserved "file" names */ static LPCWSTR BaseConFileName = CONSOLE_FILE_NAME; static LPCWSTR BaseConInputFileName = CONSOLE_INPUT_FILE_NAME; static LPCWSTR BaseConOutputFileName = CONSOLE_OUTPUT_FILE_NAME; -PHANDLER_ROUTINE InitialHandler[1]; -PHANDLER_ROUTINE* CtrlHandlers; -ULONG NrCtrlHandlers; -ULONG NrAllocatedHandlers; -BOOL LastCloseNotify = FALSE; +/* Console Control handling */ +static PHANDLER_ROUTINE InitialHandler[1]; +static PHANDLER_ROUTINE* CtrlHandlers; +static ULONG NrCtrlHandlers; +static ULONG NrAllocatedHandlers; +static BOOLEAN LastCloseNotify = FALSE; +extern BOOL WINAPI IsDebuggerPresent(VOID); + +/* Console Input facilities */ HANDLE InputWaitHandle = INVALID_HANDLE_VALUE; -#define INPUTEXENAME_BUFLEN 256 -static WCHAR InputExeName[INPUTEXENAME_BUFLEN]; +#define EXENAME_LENGTH 255 + 1 +static RTL_CRITICAL_SECTION ExeNameLock; +static BOOLEAN ExeNameInitialized; +static WCHAR ExeNameBuffer[EXENAME_LENGTH]; // NULL-terminated +static USHORT ExeNameLength; // Count in number of characters without NULL +static WCHAR StartDirBuffer[MAX_PATH + 1]; // NULL-terminated +static USHORT StartDirLength; // Count in number of characters without NULL /* Default Console Control Handler ********************************************/ -BOOL +static BOOL WINAPI DefaultConsoleCtrlHandler(DWORD Event) { @@ -193,8 +201,7 @@ ConsoleControlDispatcher(IN LPVOID lpThreadParameter) } VOID -WINAPI -InitConsoleCtrlHandling(VOID) +InitializeCtrlHandling(VOID) { /* Initialize Console Ctrl Handler */ NrAllocatedHandlers = NrCtrlHandlers = 1; @@ -203,6 +210,135 @@ InitConsoleCtrlHandling(VOID) } +/* Input EXE Name Support *****************************************************/ + +VOID +InitExeName(VOID) +{ + NTSTATUS Status; + PPEB Peb = NtCurrentPeb(); + PCURDIR CurrentDirectory = &Peb->ProcessParameters->CurrentDirectory; + PLDR_DATA_TABLE_ENTRY ImageEntry; + + if (ExeNameInitialized) return; + + /* Initialize the EXE name lock */ + Status = RtlInitializeCriticalSection(&ExeNameLock); + if (!NT_SUCCESS(Status)) return; + ExeNameInitialized = TRUE; + + ImageEntry = CONTAINING_RECORD(Peb->Ldr->InLoadOrderModuleList.Flink, + LDR_DATA_TABLE_ENTRY, + InLoadOrderLinks); + + /* Retrieve the EXE name, NULL-terminate it... */ + ExeNameLength = min(sizeof(ExeNameBuffer)/sizeof(ExeNameBuffer[0]), + ImageEntry->BaseDllName.Length / sizeof(WCHAR)); + RtlCopyMemory(ExeNameBuffer, + ImageEntry->BaseDllName.Buffer, + ImageEntry->BaseDllName.Length); + ExeNameBuffer[ExeNameLength] = UNICODE_NULL; + + /* ... and retrieve the current directory path and NULL-terminate it. */ + StartDirLength = min(sizeof(StartDirBuffer)/sizeof(StartDirBuffer[0]), + CurrentDirectory->DosPath.Length / sizeof(WCHAR)); + RtlCopyMemory(StartDirBuffer, + CurrentDirectory->DosPath.Buffer, + CurrentDirectory->DosPath.Length); + StartDirBuffer[StartDirLength] = UNICODE_NULL; +} + +/* + * NOTE: + * The "LPDWORD Length" parameters point on input to the maximum size of + * the buffers that can hold data (if != 0), and on output they hold the + * real size of the data. If "Length" are == 0 on input, then on output + * they receive the full size of the data. + * The "LPWSTR* String" parameters have a double meaning: + * - when "CaptureStrings" is TRUE, data is copied to the buffers pointed + * by the pointers (*String). + * - when "CaptureStrings" is FALSE, "*String" are set to the addresses of + * the source data. + */ +VOID +SetUpAppName(IN BOOLEAN CaptureStrings, + IN OUT LPDWORD CurDirLength, + IN OUT LPWSTR* CurDir, + IN OUT LPDWORD AppNameLength, + IN OUT LPWSTR* AppName) +{ + DWORD Length; + + /* Retrieve the needed buffer size */ + Length = (StartDirLength + 1) * sizeof(WCHAR); + if (*CurDirLength > 0) Length = min(Length, *CurDirLength); + *CurDirLength = Length; + + /* Capture the data if needed, or, return a pointer to it */ + if (CaptureStrings) + { + /* + * Length is always >= sizeof(WCHAR). Copy everything but the + * possible trailing NULL character, and then NULL-terminate. + */ + Length -= sizeof(WCHAR); + RtlCopyMemory(*CurDir, StartDirBuffer, Length); + (*CurDir)[Length / sizeof(WCHAR)] = UNICODE_NULL; + } + else + { + *CurDir = StartDirBuffer; + } + + /* Retrieve the needed buffer size */ + Length = (ExeNameLength + 1) * sizeof(WCHAR); + if (*AppNameLength > 0) Length = min(Length, *AppNameLength); + *AppNameLength = Length; + + /* Capture the data if needed, or, return a pointer to it */ + if (CaptureStrings) + { + /* + * Length is always >= sizeof(WCHAR). Copy everything but the + * possible trailing NULL character, and then NULL-terminate. + */ + Length -= sizeof(WCHAR); + RtlCopyMemory(*AppName, ExeNameBuffer, Length); + (*AppName)[Length / sizeof(WCHAR)] = UNICODE_NULL; + } + else + { + *AppName = ExeNameBuffer; + } +} + +USHORT +GetCurrentExeName(OUT PWCHAR ExeName, + IN USHORT BufferSize) +{ + USHORT ExeLength; + + if (ExeNameInitialized) + { + RtlEnterCriticalSection(&ExeNameLock); + + if (BufferSize > ExeNameLength * sizeof(WCHAR)) + BufferSize = ExeNameLength * sizeof(WCHAR); + + RtlCopyMemory(ExeName, ExeNameBuffer, BufferSize); + + RtlLeaveCriticalSection(&ExeNameLock); + ExeLength = BufferSize; + } + else + { + *ExeName = UNICODE_NULL; + ExeLength = 0; + } + + return ExeLength; +} + /* FUNCTIONS ******************************************************************/ LPCWSTR @@ -999,77 +1135,198 @@ SetStdHandle(DWORD nStdHandle, } -/*-------------------------------------------------------------- - * AllocConsole - * +/* * @implemented */ -BOOL -WINAPI -AllocConsole(VOID) +static BOOL +IntAllocConsole(LPWSTR Title, + DWORD TitleLength, + LPWSTR Desktop, + DWORD DesktopLength, + LPWSTR CurDir, + DWORD CurDirLength, + LPWSTR AppName, + DWORD AppNameLength, + LPTHREAD_START_ROUTINE CtrlRoutine, + LPTHREAD_START_ROUTINE PropRoutine, + PCONSOLE_START_INFO ConsoleStartInfo) { + BOOL Success = TRUE; +#ifdef USE_CONSOLE_INIT_HANDLES NTSTATUS Status; - PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; +#endif + CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_ALLOCCONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest; PCSR_CAPTURE_BUFFER CaptureBuffer; - if (Parameters->ConsoleHandle) - { - DPRINT1("AllocConsole: Allocating a console to a process already having one\n"); - SetLastError(ERROR_ACCESS_DENIED); - return FALSE; - } + AllocConsoleRequest->CtrlRoutine = CtrlRoutine; + AllocConsoleRequest->PropRoutine = PropRoutine; - CaptureBuffer = CsrAllocateCaptureBuffer(1, sizeof(CONSOLE_START_INFO)); + CaptureBuffer = CsrAllocateCaptureBuffer(5, TitleLength + + DesktopLength + + CurDirLength + + AppNameLength + + sizeof(CONSOLE_START_INFO)); if (CaptureBuffer == NULL) { - DPRINT1("CsrAllocateCaptureBuffer failed!\n"); SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; + Success = FALSE; + goto Quit; } - CsrAllocateMessagePointer(CaptureBuffer, - sizeof(CONSOLE_START_INFO), - (PVOID*)&AllocConsoleRequest->ConsoleStartInfo); + CsrCaptureMessageBuffer(CaptureBuffer, + ConsoleStartInfo, + sizeof(CONSOLE_START_INFO), + (PVOID*)&AllocConsoleRequest->ConsoleStartInfo); - InitConsoleInfo(AllocConsoleRequest->ConsoleStartInfo, - &Parameters->ImagePathName); + AllocConsoleRequest->TitleLength = TitleLength; + CsrCaptureMessageBuffer(CaptureBuffer, + Title, + TitleLength, + (PVOID*)&AllocConsoleRequest->ConsoleTitle); - AllocConsoleRequest->ConsoleHandle = NULL; - AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher; - AllocConsoleRequest->PropDispatcher = PropDialogHandler; + AllocConsoleRequest->DesktopLength = DesktopLength; + CsrCaptureMessageBuffer(CaptureBuffer, + Desktop, + DesktopLength, + (PVOID*)&AllocConsoleRequest->Desktop); - Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, - CaptureBuffer, - CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepAlloc), - sizeof(CONSOLE_ALLOCCONSOLE)); + AllocConsoleRequest->CurDirLength = CurDirLength; + CsrCaptureMessageBuffer(CaptureBuffer, + CurDir, + CurDirLength, + (PVOID*)&AllocConsoleRequest->CurDir); - CsrFreeCaptureBuffer(CaptureBuffer); + AllocConsoleRequest->AppNameLength = AppNameLength; + CsrCaptureMessageBuffer(CaptureBuffer, + AppName, + AppNameLength, + (PVOID*)&AllocConsoleRequest->AppName); + CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + CaptureBuffer, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepAlloc), + sizeof(*AllocConsoleRequest)); + if (!NT_SUCCESS(ApiMessage.Status)) + { + BaseSetLastNTError(ApiMessage.Status); + Success = FALSE; + goto Quit; + } + +#ifdef USE_CONSOLE_INIT_HANDLES + // Is AllocConsoleRequest->ConsoleStartInfo->Events aligned on handle boundary ???? + Status = NtWaitForMultipleObjects(2, AllocConsoleRequest->ConsoleStartInfo->Events, + WaitAny, FALSE, NULL); if (!NT_SUCCESS(Status)) { BaseSetLastNTError(Status); - return FALSE; + Success = FALSE; + goto Quit; } - Parameters->ConsoleHandle = AllocConsoleRequest->ConsoleHandle; - SetStdHandle(STD_INPUT_HANDLE , AllocConsoleRequest->InputHandle ); - SetStdHandle(STD_OUTPUT_HANDLE, AllocConsoleRequest->OutputHandle); - SetStdHandle(STD_ERROR_HANDLE , AllocConsoleRequest->ErrorHandle ); + NtClose(AllocConsoleRequest->ConsoleStartInfo->Events[0]); + NtClose(AllocConsoleRequest->ConsoleStartInfo->Events[1]); + if (Status != STATUS_SUCCESS) + { + NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; + Success = FALSE; + } + else +#endif + { + RtlCopyMemory(ConsoleStartInfo, + AllocConsoleRequest->ConsoleStartInfo, + sizeof(CONSOLE_START_INFO)); + Success = TRUE; + } - /* Initialize Console Ctrl Handler */ - InitConsoleCtrlHandling(); +Quit: + if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); + return Success; +} - InputWaitHandle = AllocConsoleRequest->InputWaitHandle; +BOOL +WINAPI +AllocConsole(VOID) +{ + BOOL Success; + CONSOLE_START_INFO ConsoleStartInfo; - return TRUE; + PWCHAR ConsoleTitle; + PWCHAR Desktop; + PWCHAR AppName; + PWCHAR CurDir; + + ULONG TitleLength = (MAX_PATH + 1) * sizeof(WCHAR); + ULONG DesktopLength = (MAX_PATH + 1) * sizeof(WCHAR); + ULONG AppNameLength = 128 * sizeof(WCHAR); + ULONG CurDirLength = (MAX_PATH + 1) * sizeof(WCHAR); + + LCID lcid; + + RtlEnterCriticalSection(&ConsoleLock); + + if (NtCurrentPeb()->ProcessParameters->ConsoleHandle) + { + DPRINT1("AllocConsole: Allocating a console to a process already having one\n"); + SetLastError(ERROR_ACCESS_DENIED); + Success = FALSE; + goto Quit; + } + + /* Set up the console properties */ + SetUpConsoleInfo(FALSE, + &TitleLength, + &ConsoleTitle, + &DesktopLength, + &Desktop, + &ConsoleStartInfo); + DPRINT("ConsoleTitle = '%S' - Desktop = '%S'\n", + ConsoleTitle, Desktop); + + /* Initialize the Input EXE name */ + InitExeName(); + SetUpAppName(FALSE, + &CurDirLength, + &CurDir, + &AppNameLength, + &AppName); + DPRINT("CurDir = '%S' - AppName = '%S'\n", + CurDir, AppName); + + Success = IntAllocConsole(ConsoleTitle, + TitleLength, + Desktop, + DesktopLength, + CurDir, + CurDirLength, + AppName, + AppNameLength, + ConsoleControlDispatcher, + PropDialogHandler, + &ConsoleStartInfo); + if (Success) + { + /* Set up the handles */ + SetUpHandles(&ConsoleStartInfo); + InputWaitHandle = ConsoleStartInfo.InputWaitHandle; + + /* Initialize Console Ctrl Handling */ + InitializeCtrlHandling(); + + /* Sets the current console locale for this thread */ + SetTEBLangID(lcid); + } + +Quit: + RtlLeaveCriticalSection(&ConsoleLock); + return Success; } -/*-------------------------------------------------------------- - * FreeConsole - * +/* * @implemented */ BOOL @@ -1114,9 +1371,7 @@ FreeConsole(VOID) } -/*-------------------------------------------------------------- - * GetConsoleScreenBufferInfo - * +/* * @implemented */ BOOL @@ -1159,9 +1414,7 @@ GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * SetConsoleCursorPosition - * +/* * @implemented */ BOOL @@ -1190,9 +1443,7 @@ SetConsoleCursorPosition(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * GetConsoleMode - * +/* * @implemented */ BOOL @@ -1228,9 +1479,7 @@ GetConsoleMode(HANDLE hConsoleHandle, } -/*-------------------------------------------------------------- - * SetConsoleMode - * +/* * @implemented */ BOOL @@ -1259,9 +1508,7 @@ SetConsoleMode(HANDLE hConsoleHandle, } -/*-------------------------------------------------------------- - * GetNumberOfConsoleInputEvents - * +/* * @implemented */ BOOL @@ -1298,9 +1545,7 @@ GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * GetLargestConsoleWindowSize - * +/* * @implemented */ COORD @@ -1329,9 +1574,7 @@ GetLargestConsoleWindowSize(HANDLE hConsoleOutput) } -/*-------------------------------------------------------------- - * GetConsoleCursorInfo - * +/* * @implemented */ BOOL @@ -1371,9 +1614,7 @@ GetConsoleCursorInfo(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * SetConsoleCursorInfo - * +/* * @implemented */ BOOL @@ -1402,9 +1643,7 @@ SetConsoleCursorInfo(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * GetNumberOfConsoleMouseButtons - * +/* * @implemented */ BOOL @@ -1431,9 +1670,7 @@ GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons) } -/*-------------------------------------------------------------- - * SetConsoleActiveScreenBuffer - * +/* * @implemented */ BOOL @@ -1460,9 +1697,7 @@ SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput) } -/*-------------------------------------------------------------- - * FlushConsoleInputBuffer - * +/* * @implemented */ BOOL @@ -1489,9 +1724,7 @@ FlushConsoleInputBuffer(HANDLE hConsoleInput) } -/*-------------------------------------------------------------- - * SetConsoleScreenBufferSize - * +/* * @implemented */ BOOL @@ -1564,9 +1797,7 @@ IntScrollConsoleScreenBuffer(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ScrollConsoleScreenBufferA - * +/* * @implemented */ BOOL @@ -1586,9 +1817,7 @@ ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ScrollConsoleScreenBufferW - * +/* * @implemented */ BOOL @@ -1608,9 +1837,7 @@ ScrollConsoleScreenBufferW(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * SetConsoleWindowInfo - * +/* * @implemented */ BOOL @@ -1647,9 +1874,7 @@ SetConsoleWindowInfo(HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * SetConsoleTextAttribute - * +/* * @implemented */ BOOL @@ -1774,9 +1999,7 @@ SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, } -/*-------------------------------------------------------------- - * GenerateConsoleCtrlEvent - * +/* * @implemented */ BOOL @@ -1854,9 +2077,9 @@ IntGetConsoleTitle(LPVOID lpConsoleTitle, DWORD dwNumChars, BOOLEAN bUnicode) memcpy(lpConsoleTitle, TitleRequest->Title, TitleRequest->Length); if (bUnicode) - ((LPWSTR)lpConsoleTitle)[dwNumChars] = L'\0'; + ((LPWSTR)lpConsoleTitle)[dwNumChars] = UNICODE_NULL; else - ((LPSTR)lpConsoleTitle)[dwNumChars] = '\0'; + ((LPSTR)lpConsoleTitle)[dwNumChars] = ANSI_NULL; } CsrFreeCaptureBuffer(CaptureBuffer); @@ -1865,9 +2088,7 @@ IntGetConsoleTitle(LPVOID lpConsoleTitle, DWORD dwNumChars, BOOLEAN bUnicode) } -/*-------------------------------------------------------------- - * GetConsoleTitleW - * +/* * @implemented */ DWORD @@ -1879,9 +2100,7 @@ GetConsoleTitleW(LPWSTR lpConsoleTitle, } -/*-------------------------------------------------------------- - * GetConsoleTitleA - * +/* * @implemented */ DWORD @@ -1935,9 +2154,7 @@ IntSetConsoleTitle(CONST VOID *lpConsoleTitle, BOOLEAN bUnicode) return TRUE; } -/*-------------------------------------------------------------- - * SetConsoleTitleW - * +/* * @implemented */ BOOL @@ -1948,9 +2165,7 @@ SetConsoleTitleW(LPCWSTR lpConsoleTitle) } -/*-------------------------------------------------------------- - * SetConsoleTitleA - * +/* * @implemented */ BOOL @@ -1961,9 +2176,7 @@ SetConsoleTitleA(LPCSTR lpConsoleTitle) } -/*-------------------------------------------------------------- - * CreateConsoleScreenBuffer - * +/* * @implemented */ HANDLE @@ -2040,9 +2253,7 @@ CreateConsoleScreenBuffer(DWORD dwDesiredAccess, } -/*-------------------------------------------------------------- - * GetConsoleCP - * +/* * @implemented */ UINT @@ -2070,9 +2281,7 @@ GetConsoleCP(VOID) } -/*-------------------------------------------------------------- - * SetConsoleCP - * +/* * @implemented */ BOOL @@ -2102,9 +2311,7 @@ SetConsoleCP(UINT wCodePageID) } -/*-------------------------------------------------------------- - * GetConsoleOutputCP - * +/* * @implemented */ UINT @@ -2132,9 +2339,7 @@ GetConsoleOutputCP(VOID) } -/*-------------------------------------------------------------- - * SetConsoleOutputCP - * +/* * @implemented */ BOOL @@ -2164,9 +2369,7 @@ SetConsoleOutputCP(UINT wCodePageID) } -/*-------------------------------------------------------------- - * GetConsoleProcessList - * +/* * @implemented */ DWORD @@ -2222,9 +2425,7 @@ GetConsoleProcessList(LPDWORD lpdwProcessList, } -/*-------------------------------------------------------------- - * GetConsoleSelectionInfo - * +/* * @implemented */ BOOL @@ -2258,60 +2459,137 @@ GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo) } -/*-------------------------------------------------------------- - * AttachConsole - * +/* * @implemented - * * @note Strongly inspired by AllocConsole. */ +static BOOL +IntAttachConsole(DWORD ProcessId, + LPTHREAD_START_ROUTINE CtrlRoutine, + LPTHREAD_START_ROUTINE PropRoutine, + PCONSOLE_START_INFO ConsoleStartInfo) +{ + BOOL Success = TRUE; +#ifdef USE_CONSOLE_INIT_HANDLES + NTSTATUS Status; +#endif + + CONSOLE_API_MESSAGE ApiMessage; + PCONSOLE_ATTACHCONSOLE AttachConsoleRequest = &ApiMessage.Data.AttachConsoleRequest; + PCSR_CAPTURE_BUFFER CaptureBuffer; + + AttachConsoleRequest->ProcessId = ProcessId; + AttachConsoleRequest->CtrlRoutine = CtrlRoutine; + AttachConsoleRequest->PropRoutine = PropRoutine; + + CaptureBuffer = CsrAllocateCaptureBuffer(1, sizeof(CONSOLE_START_INFO)); + if (CaptureBuffer == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + Success = FALSE; + goto Quit; + } + + CsrCaptureMessageBuffer(CaptureBuffer, + ConsoleStartInfo, + sizeof(CONSOLE_START_INFO), + (PVOID*)&AttachConsoleRequest->ConsoleStartInfo); + + CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + CaptureBuffer, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepAttach), + sizeof(*AttachConsoleRequest)); + if (!NT_SUCCESS(ApiMessage.Status)) + { + BaseSetLastNTError(ApiMessage.Status); + Success = FALSE; + goto Quit; + } + +#ifdef USE_CONSOLE_INIT_HANDLES + // Is AttachConsoleRequest->ConsoleStartInfo->Events aligned on handle boundary ???? + Status = NtWaitForMultipleObjects(2, AttachConsoleRequest->ConsoleStartInfo->Events, + WaitAny, FALSE, NULL); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + Success = FALSE; + goto Quit; + } + + NtClose(AttachConsoleRequest->ConsoleStartInfo->Events[0]); + NtClose(AttachConsoleRequest->ConsoleStartInfo->Events[1]); + if (Status != STATUS_SUCCESS) + { + NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; + Success = FALSE; + } + else +#endif + { + RtlCopyMemory(ConsoleStartInfo, + AttachConsoleRequest->ConsoleStartInfo, + sizeof(CONSOLE_START_INFO)); + Success = TRUE; + } + +Quit: + if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); + return Success; +} + BOOL WINAPI AttachConsole(DWORD dwProcessId) { - NTSTATUS Status; - PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; - CONSOLE_API_MESSAGE ApiMessage; - PCONSOLE_ATTACHCONSOLE AttachConsoleRequest = &ApiMessage.Data.AttachConsoleRequest; + BOOL Success; + CONSOLE_START_INFO ConsoleStartInfo; - if (Parameters->ConsoleHandle) + DWORD dummy; + LCID lcid; + + RtlEnterCriticalSection(&ConsoleLock); + + if (NtCurrentPeb()->ProcessParameters->ConsoleHandle) { DPRINT1("AttachConsole: Attaching a console to a process already having one\n"); SetLastError(ERROR_ACCESS_DENIED); - return FALSE; + Success = FALSE; + goto Quit; } - AttachConsoleRequest->ProcessId = dwProcessId; - AttachConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher; - AttachConsoleRequest->PropDispatcher = PropDialogHandler; + /* Set up the console properties */ + SetUpConsoleInfo(FALSE, + &dummy, + NULL, + &dummy, + NULL, + &ConsoleStartInfo); - Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, - NULL, - CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepAttach), - sizeof(CONSOLE_ATTACHCONSOLE)); - if (!NT_SUCCESS(Status)) + Success = IntAttachConsole(dwProcessId, + ConsoleControlDispatcher, + PropDialogHandler, + &ConsoleStartInfo); + if (Success) { - BaseSetLastNTError(Status); - return FALSE; + /* Set up the handles */ + SetUpHandles(&ConsoleStartInfo); + InputWaitHandle = ConsoleStartInfo.InputWaitHandle; + + /* Initialize Console Ctrl Handling */ + InitializeCtrlHandling(); + + /* Sets the current console locale for this thread */ + SetTEBLangID(lcid); } - Parameters->ConsoleHandle = AttachConsoleRequest->ConsoleHandle; - SetStdHandle(STD_INPUT_HANDLE , AttachConsoleRequest->InputHandle ); - SetStdHandle(STD_OUTPUT_HANDLE, AttachConsoleRequest->OutputHandle); - SetStdHandle(STD_ERROR_HANDLE , AttachConsoleRequest->ErrorHandle ); - - /* Initialize Console Ctrl Handler */ - InitConsoleCtrlHandling(); - - InputWaitHandle = AttachConsoleRequest->InputWaitHandle; - - return TRUE; +Quit: + RtlLeaveCriticalSection(&ConsoleLock); + return Success; } -/*-------------------------------------------------------------- - * GetConsoleWindow - * +/* * @implemented */ HWND @@ -2337,9 +2615,7 @@ GetConsoleWindow(VOID) } -/*-------------------------------------------------------------- - * SetConsoleIcon - * +/* * @implemented */ BOOL @@ -2369,35 +2645,35 @@ SetConsoleIcon(HICON hIcon) /****************************************************************************** * \name SetConsoleInputExeNameW * \brief Sets the console input file name from a unicode string. - * \param lpInputExeName Pointer to a unicode string with the name. + * \param lpExeName Pointer to a unicode string with the name. * \return TRUE if successful, FALSE if unsuccsedful. - * \remarks If lpInputExeName is 0 or the string length is 0 or greater than 255, + * \remarks If lpExeName is 0 or the string length is 0 or greater than 255, * the function fails and sets last error to ERROR_INVALID_PARAMETER. */ BOOL WINAPI -SetConsoleInputExeNameW(LPCWSTR lpInputExeName) +SetConsoleInputExeNameW(IN LPWSTR lpExeName) { - int lenName; + DWORD ExeLength; - if ( !lpInputExeName || - (lenName = lstrlenW(lpInputExeName)) == 0 || - lenName > INPUTEXENAME_BUFLEN - 1 ) + ExeLength = lstrlenW(lpExeName); + if ((ExeLength == 0) || (ExeLength >= EXENAME_LENGTH)) { /* Fail if string is empty or too long */ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - RtlEnterCriticalSection(&ConsoleLock); + RtlEnterCriticalSection(&ExeNameLock); _SEH2_TRY { - RtlCopyMemory(InputExeName, lpInputExeName, lenName * sizeof(WCHAR)); - InputExeName[lenName] = L'\0'; + /* Set the input EXE name, not NULL terminated */ + RtlCopyMemory(ExeNameBuffer, lpExeName, ExeLength * sizeof(WCHAR)); + ExeNameLength = (USHORT)ExeLength; } _SEH2_FINALLY { - RtlLeaveCriticalSection(&ConsoleLock); + RtlLeaveCriticalSection(&ExeNameLock); } _SEH2_END; @@ -2408,42 +2684,72 @@ SetConsoleInputExeNameW(LPCWSTR lpInputExeName) /****************************************************************************** * \name SetConsoleInputExeNameA * \brief Sets the console input file name from an ansi string. - * \param lpInputExeName Pointer to an ansi string with the name. + * \param lpExeName Pointer to an ansi string with the name. * \return TRUE if successful, FALSE if unsuccsedful. - * \remarks If lpInputExeName is 0 or the string length is 0 or greater than 255, + * \remarks If lpExeName is 0 or the string length is 0 or greater than 255, * the function fails and sets last error to ERROR_INVALID_PARAMETER. */ BOOL WINAPI -SetConsoleInputExeNameA(LPCSTR lpInputExeName) +SetConsoleInputExeNameA(IN LPSTR lpExeName) { - WCHAR Buffer[INPUTEXENAME_BUFLEN]; - ANSI_STRING InputExeNameA; - UNICODE_STRING InputExeNameU; NTSTATUS Status; +#ifdef USE_TEB_STATIC_USTR + PUNICODE_STRING ExeNameU; +#else + UNICODE_STRING ExeNameU; +#endif + ANSI_STRING ExeNameA; +#ifndef USE_TEB_STATIC_USTR + WCHAR Buffer[EXENAME_LENGTH]; +#endif - RtlInitAnsiString(&InputExeNameA, lpInputExeName); +#ifdef USE_TEB_STATIC_USTR + /* + * Use the TEB static UNICODE string for storage. It is already + * initialized at process creation time by the Memory Manager. + */ + ExeNameU = &NtCurrentTeb()->StaticUnicodeString; +#endif - if ( InputExeNameA.Length == 0 || - InputExeNameA.Length > INPUTEXENAME_BUFLEN - 1 ) + /* Initialize string for conversion */ + RtlInitAnsiString(&ExeNameA, lpExeName); + +#if 1 + if ((ExeNameA.Length == 0) || (ExeNameA.Length >= EXENAME_LENGTH)) { /* Fail if string is empty or too long */ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } +#endif +#ifndef USE_TEB_STATIC_USTR + ExeNameU.Length = 0; + ExeNameU.MaximumLength = (USHORT)sizeof(Buffer); + ExeNameU.Buffer = Buffer; +#endif - InputExeNameU.Buffer = Buffer; - InputExeNameU.MaximumLength = sizeof(Buffer); - InputExeNameU.Length = 0; - - Status = RtlAnsiStringToUnicodeString(&InputExeNameU, &InputExeNameA, FALSE); +#ifdef USE_TEB_STATIC_USTR + Status = RtlAnsiStringToUnicodeString(ExeNameU, &ExeNameA, FALSE); +#else + Status = RtlAnsiStringToUnicodeString(&ExeNameU, &ExeNameA, FALSE); +#endif if (!NT_SUCCESS(Status)) { - BaseSetLastNTError(Status); + /* Fail if string is empty or too long */ + if (Status == STATUS_BUFFER_OVERFLOW) + SetLastError(ERROR_FILENAME_EXCED_RANGE); + else + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; } - return SetConsoleInputExeNameW(InputExeNameU.Buffer); +#ifdef USE_TEB_STATIC_USTR + return SetConsoleInputExeNameW(ExeNameU->Buffer); +#else + return SetConsoleInputExeNameW(ExeNameU.Buffer); +#endif } @@ -2460,37 +2766,30 @@ SetConsoleInputExeNameA(LPCSTR lpInputExeName) */ DWORD WINAPI -GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer) +GetConsoleInputExeNameW(IN DWORD nBufferLength, + OUT LPWSTR lpExeName) { - ULONG lenName = lstrlenW(InputExeName); - - if (nBufferLength == 0) + if (nBufferLength <= ExeNameLength) { - /* Buffer size is requested, return it */ - return lenName + 1; - } - - if (lenName + 1 > nBufferLength) - { - /* Buffer is not large enough! */ + /* Buffer is not large enough! Return the correct size. */ SetLastError(ERROR_BUFFER_OVERFLOW); - return 2; + return ExeNameLength + 1; } - RtlEnterCriticalSection(&ConsoleLock); + RtlEnterCriticalSection(&ExeNameLock); _SEH2_TRY { - RtlCopyMemory(lpBuffer, InputExeName, lenName * sizeof(WCHAR)); - lpBuffer[lenName] = '\0'; + /* Copy the input EXE name and NULL-terminate it */ + RtlCopyMemory(lpExeName, ExeNameBuffer, ExeNameLength * sizeof(WCHAR)); + lpExeName[ExeNameLength] = UNICODE_NULL; } _SEH2_FINALLY { - RtlLeaveCriticalSection(&ConsoleLock); + RtlLeaveCriticalSection(&ExeNameLock); } _SEH2_END; - /* Success, return 1 */ - return 1; + return TRUE; } @@ -2505,33 +2804,40 @@ GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer) */ DWORD WINAPI -GetConsoleInputExeNameA(DWORD nBufferLength, LPSTR lpBuffer) +GetConsoleInputExeNameA(IN DWORD nBufferLength, + OUT LPSTR lpExeName) { - WCHAR Buffer[INPUTEXENAME_BUFLEN]; - DWORD Ret; + NTSTATUS Status; + DWORD ExeLength; UNICODE_STRING BufferU; ANSI_STRING BufferA; + WCHAR Buffer[EXENAME_LENGTH]; - /* Get the unicode name */ - Ret = GetConsoleInputExeNameW(sizeof(Buffer) / sizeof(Buffer[0]), Buffer); + /* Get the UNICODE name */ + ExeLength = GetConsoleInputExeNameW(EXENAME_LENGTH, Buffer); - /* Initialize strings for conversion */ + if ((ExeLength == 0) || (ExeLength >= EXENAME_LENGTH)) + return ExeLength; + + /* Initialize the strings for conversion */ RtlInitUnicodeString(&BufferU, Buffer); BufferA.Length = 0; BufferA.MaximumLength = (USHORT)nBufferLength; - BufferA.Buffer = lpBuffer; + BufferA.Buffer = lpExeName; - /* Convert unicode name to ansi, copying as much chars as fit */ - RtlUnicodeStringToAnsiString(&BufferA, &BufferU, FALSE); - - /* Error handling */ - if (nBufferLength <= BufferU.Length / sizeof(WCHAR)) + /* Convert UNICODE name to ANSI, copying as much chars as it can fit */ + Status = RtlUnicodeStringToAnsiString(&BufferA, &BufferU, FALSE); + if (!NT_SUCCESS(Status)) { - SetLastError(ERROR_BUFFER_OVERFLOW); - return 2; + if (Status == STATUS_BUFFER_OVERFLOW) + { + SetLastError(ERROR_BUFFER_OVERFLOW); + return ExeLength + 1; + } + SetLastError(ERROR_INVALID_PARAMETER); } - return Ret; + return ExeLength; } BOOL diff --git a/dll/win32/kernel32/client/console/history.c b/dll/win32/kernel32/client/console/history.c index 2fc50245fb4..fdc582630a7 100644 --- a/dll/win32/kernel32/client/console/history.c +++ b/dll/win32/kernel32/client/console/history.c @@ -25,30 +25,6 @@ IntStringSize(LPCVOID String, ULONG Size = (Unicode ? wcslen(String) : strlen(String)) * sizeof(WCHAR); return (Size + 3) & ~3; } - - -/* Copy a string to a capture buffer */ -static VOID -IntCaptureMessageString(PCSR_CAPTURE_BUFFER CaptureBuffer, - LPCVOID String, - BOOL Unicode, - PUNICODE_STRING RequestString) -{ - ULONG Size; - if (Unicode) - { - Size = wcslen(String) * sizeof(WCHAR); - CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)String, Size, (PVOID *)&RequestString->Buffer); - } - else - { - Size = strlen(String); - CsrAllocateMessagePointer(CaptureBuffer, Size * sizeof(WCHAR), (PVOID *)&RequestString->Buffer); - Size = MultiByteToWideChar(CP_ACP, 0, String, Size, RequestString->Buffer, Size * sizeof(WCHAR)) - * sizeof(WCHAR); - } - RequestString->Length = RequestString->MaximumLength = (USHORT)Size; -} #endif static VOID @@ -80,8 +56,6 @@ IntExpungeConsoleCommandHistory(LPCVOID lpExeName, BOOLEAN bUnicode) return; } - // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - // &ExpungeCommandHistoryRequest->ExeName); CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)lpExeName, ExpungeCommandHistoryRequest->ExeLength, @@ -131,14 +105,11 @@ IntGetConsoleCommandHistory(LPVOID lpHistory, DWORD cbHistory, LPCVOID lpExeName return 0; } - // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - // &GetCommandHistoryRequest->ExeName); CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)lpExeName, GetCommandHistoryRequest->ExeLength, (PVOID)&GetCommandHistoryRequest->ExeName); - // CsrAllocateMessagePointer(CaptureBuffer, HistoryLength, CsrAllocateMessagePointer(CaptureBuffer, GetCommandHistoryRequest->HistoryLength, (PVOID*)&GetCommandHistoryRequest->History); @@ -192,8 +163,6 @@ IntGetConsoleCommandHistoryLength(LPCVOID lpExeName, BOOL bUnicode) return 0; } - // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - // &GetCommandHistoryLengthRequest->ExeName); CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)lpExeName, GetCommandHistoryLengthRequest->ExeLength, @@ -248,8 +217,6 @@ IntSetConsoleNumberOfCommands(DWORD dwNumCommands, return FALSE; } - // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode, - // &SetHistoryNumberCommandsRequest->ExeName); CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)lpExeName, SetHistoryNumberCommandsRequest->ExeLength, diff --git a/dll/win32/kernel32/client/console/init.c b/dll/win32/kernel32/client/console/init.c index 1313b77a232..5134028b9c5 100644 --- a/dll/win32/kernel32/client/console/init.c +++ b/dll/win32/kernel32/client/console/init.c @@ -22,15 +22,14 @@ /* GLOBALS ********************************************************************/ RTL_CRITICAL_SECTION ConsoleLock; -BOOL ConsoleInitialized = FALSE; +BOOLEAN ConsoleInitialized = FALSE; extern HANDLE InputWaitHandle; -static HMODULE ConsoleLibrary = NULL; +static HMODULE ConsoleApplet = NULL; static BOOL AlreadyDisplayingProps = FALSE; -#define WIN_OBJ_DIR L"\\Windows" -#define SESSION_DIR L"\\Sessions" +static const PWSTR DefaultConsoleTitle = L"ReactOS Console"; /* FUNCTIONS ******************************************************************/ @@ -41,6 +40,7 @@ PropDialogHandler(IN LPVOID lpThreadParameter) { // NOTE: lpThreadParameter corresponds to the client shared section handle. + NTSTATUS Status = STATUS_SUCCESS; APPLET_PROC CPLFunc; /* @@ -60,223 +60,242 @@ PropDialogHandler(IN LPVOID lpThreadParameter) AlreadyDisplayingProps = TRUE; /* Load the Control Applet if needed */ - if (ConsoleLibrary == NULL) + if (ConsoleApplet == NULL) { WCHAR szBuffer[MAX_PATH]; GetSystemDirectoryW(szBuffer, MAX_PATH); wcscat(szBuffer, L"\\console.dll"); - ConsoleLibrary = LoadLibraryW(szBuffer); - - if (ConsoleLibrary == NULL) + ConsoleApplet = LoadLibraryW(szBuffer); + if (ConsoleApplet == NULL) { DPRINT1("Failed to load console.dll\n"); - AlreadyDisplayingProps = FALSE; - return STATUS_UNSUCCESSFUL; + Status = STATUS_UNSUCCESSFUL; + goto Quit; } } /* Load its main function */ - CPLFunc = (APPLET_PROC)GetProcAddress(ConsoleLibrary, "CPlApplet"); + CPLFunc = (APPLET_PROC)GetProcAddress(ConsoleApplet, "CPlApplet"); if (CPLFunc == NULL) { - DPRINT("Error: Console.dll misses CPlApplet export\n"); - AlreadyDisplayingProps = FALSE; - return STATUS_UNSUCCESSFUL; + DPRINT1("Error: Console.dll misses CPlApplet export\n"); + Status = STATUS_UNSUCCESSFUL; + goto Quit; } if (CPLFunc(NULL, CPL_INIT, 0, 0) == FALSE) { - DPRINT("Error: failed to initialize console.dll\n"); - AlreadyDisplayingProps = FALSE; - return STATUS_UNSUCCESSFUL; + DPRINT1("Error: failed to initialize console.dll\n"); + Status = STATUS_UNSUCCESSFUL; + goto Quit; } if (CPLFunc(NULL, CPL_GETCOUNT, 0, 0) != 1) { - DPRINT("Error: console.dll returned unexpected CPL count\n"); - AlreadyDisplayingProps = FALSE; - return STATUS_UNSUCCESSFUL; + DPRINT1("Error: console.dll returned unexpected CPL count\n"); + Status = STATUS_UNSUCCESSFUL; + goto Quit; } CPLFunc(NULL, CPL_DBLCLK, (LPARAM)lpThreadParameter, 0); CPLFunc(NULL, CPL_EXIT , 0, 0); +Quit: AlreadyDisplayingProps = FALSE; - return STATUS_SUCCESS; + return Status; +} + + +static INT +ParseShellInfo(LPCWSTR lpszShellInfo, + LPCWSTR lpszKeyword) +{ + DPRINT1("ParseShellInfo is UNIMPLEMENTED\n"); + return 0; +} + + +/* + * NOTE: + * The "LPDWORD Length" parameters point on input to the maximum size of + * the buffers that can hold data (if != 0), and on output they hold the + * real size of the data. If "Length" are == 0 on input, then on output + * they receive the full size of the data. + * The "LPWSTR* lpTitle" parameter has a double meaning: + * - when "CaptureTitle" is TRUE, data is copied to the buffer pointed + * by the pointer (*lpTitle). + * - when "CaptureTitle" is FALSE, "*lpTitle" is set to the address of + * the source data. + */ +VOID +SetUpConsoleInfo(IN BOOLEAN CaptureTitle, + IN OUT LPDWORD pTitleLength, + IN OUT LPWSTR* lpTitle OPTIONAL, + IN OUT LPDWORD pDesktopLength, + IN OUT LPWSTR* lpDesktop OPTIONAL, + IN OUT PCONSOLE_START_INFO ConsoleStartInfo) +{ + PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; + DWORD Length; + + /* Initialize the fields */ + + ConsoleStartInfo->IconIndex = 0; + ConsoleStartInfo->hIcon = NULL; + ConsoleStartInfo->hIconSm = NULL; + ConsoleStartInfo->dwStartupFlags = Parameters->WindowFlags; + ConsoleStartInfo->nFont = 0; + ConsoleStartInfo->nInputBufferSize = 0; + ConsoleStartInfo->uCodePage = GetOEMCP(); + + if (lpTitle) + { + LPWSTR Title; + + /* If we don't have any title, use the default one */ + if (Parameters->WindowTitle.Buffer == NULL) + { + Title = DefaultConsoleTitle; + Length = lstrlenW(DefaultConsoleTitle) * sizeof(WCHAR); // sizeof(DefaultConsoleTitle); + } + else + { + Title = Parameters->WindowTitle.Buffer; + Length = Parameters->WindowTitle.Length; + } + + /* Retrieve the needed buffer size */ + Length += sizeof(WCHAR); + if (*pTitleLength > 0) Length = min(Length, *pTitleLength); + *pTitleLength = Length; + + /* Capture the data if needed, or, return a pointer to it */ + if (CaptureTitle) + { + /* + * Length is always >= sizeof(WCHAR). Copy everything but the + * possible trailing NULL character, and then NULL-terminate. + */ + Length -= sizeof(WCHAR); + RtlCopyMemory(*lpTitle, Title, Length); + (*lpTitle)[Length / sizeof(WCHAR)] = UNICODE_NULL; + } + else + { + *lpTitle = Title; + } + } + else + { + *pTitleLength = 0; + } + + if (lpDesktop && Parameters->DesktopInfo.Buffer && *Parameters->DesktopInfo.Buffer) + { + /* Retrieve the needed buffer size */ + Length = Parameters->DesktopInfo.Length + sizeof(WCHAR); + if (*pDesktopLength > 0) Length = min(Length, *pDesktopLength); + *pDesktopLength = Length; + + /* Return a pointer to the data */ + *lpDesktop = Parameters->DesktopInfo.Buffer; + } + else + { + *pDesktopLength = 0; + if (lpDesktop) *lpDesktop = NULL; + } + + if (Parameters->WindowFlags & STARTF_USEFILLATTRIBUTE) + { + ConsoleStartInfo->wFillAttribute = (WORD)Parameters->FillAttribute; + } + if (Parameters->WindowFlags & STARTF_USECOUNTCHARS) + { + ConsoleStartInfo->dwScreenBufferSize.X = (SHORT)Parameters->CountCharsX; + ConsoleStartInfo->dwScreenBufferSize.Y = (SHORT)Parameters->CountCharsY; + } + if (Parameters->WindowFlags & STARTF_USESHOWWINDOW) + { + ConsoleStartInfo->wShowWindow = (WORD)Parameters->ShowWindowFlags; + } + if (Parameters->WindowFlags & STARTF_USEPOSITION) + { + ConsoleStartInfo->dwWindowOrigin.X = (SHORT)Parameters->StartingX; + ConsoleStartInfo->dwWindowOrigin.Y = (SHORT)Parameters->StartingY; + } + if (Parameters->WindowFlags & STARTF_USESIZE) + { + ConsoleStartInfo->dwWindowSize.X = (SHORT)Parameters->CountX; + ConsoleStartInfo->dwWindowSize.Y = (SHORT)Parameters->CountY; + } + + /* Get shell information (ShellInfo.Buffer is NULL-terminated) */ + if (Parameters->ShellInfo.Buffer != NULL) + { + ConsoleStartInfo->IconIndex = ParseShellInfo(Parameters->ShellInfo.Buffer, L"dde."); + + if ((Parameters->WindowFlags & STARTF_USEHOTKEY) == 0) + ConsoleStartInfo->dwHotKey = ParseShellInfo(Parameters->ShellInfo.Buffer, L"hotkey."); + else + ConsoleStartInfo->dwHotKey = HandleToUlong(Parameters->StandardInput); + } } VOID -InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo, - IN PUNICODE_STRING ImagePathName) +SetUpHandles(IN PCONSOLE_START_INFO ConsoleStartInfo) { - STARTUPINFOW si; - SIZE_T Length; + PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; - /* Get the startup information */ - GetStartupInfoW(&si); - - /* Initialize the fields */ - ConsoleStartInfo->dwStartupFlags = si.dwFlags; - if (si.dwFlags & STARTF_USEFILLATTRIBUTE) + if (ConsoleStartInfo->dwStartupFlags & STARTF_USEHOTKEY) { - ConsoleStartInfo->wFillAttribute = (WORD)si.dwFillAttribute; + Parameters->WindowFlags &= ~STARTF_USEHOTKEY; } - if (si.dwFlags & STARTF_USECOUNTCHARS) + if (ConsoleStartInfo->dwStartupFlags & STARTF_SHELLPRIVATE) { - ConsoleStartInfo->dwScreenBufferSize.X = (SHORT)(si.dwXCountChars); - ConsoleStartInfo->dwScreenBufferSize.Y = (SHORT)(si.dwYCountChars); - } - if (si.dwFlags & STARTF_USESHOWWINDOW) - { - ConsoleStartInfo->wShowWindow = si.wShowWindow; - } - if (si.dwFlags & STARTF_USEPOSITION) - { - ConsoleStartInfo->dwWindowOrigin.X = (SHORT)(si.dwX); - ConsoleStartInfo->dwWindowOrigin.Y = (SHORT)(si.dwY); - } - if (si.dwFlags & STARTF_USESIZE) - { - ConsoleStartInfo->dwWindowSize.X = (SHORT)(si.dwXSize); - ConsoleStartInfo->dwWindowSize.Y = (SHORT)(si.dwYSize); + Parameters->WindowFlags &= ~STARTF_SHELLPRIVATE; } - /* Set up the title for the console */ - if (si.lpTitle) - { - wcsncpy(ConsoleStartInfo->ConsoleTitle, si.lpTitle, MAX_PATH + 1); - } - else - { - ConsoleStartInfo->ConsoleTitle[0] = L'\0'; - } + /* We got the handles, let's set them */ + Parameters->ConsoleHandle = ConsoleStartInfo->ConsoleHandle; - /* Retrieve the application path name */ - Length = min(sizeof(ConsoleStartInfo->AppPath) / sizeof(ConsoleStartInfo->AppPath[0]) - 1, - ImagePathName->Length / sizeof(WCHAR)); - wcsncpy(ConsoleStartInfo->AppPath, ImagePathName->Buffer, Length); - ConsoleStartInfo->AppPath[Length] = L'\0'; - - /* The Console Server will use these fields to set up the console icon */ - ConsoleStartInfo->IconPath[0] = L'\0'; - ConsoleStartInfo->IconIndex = 0; + if ((ConsoleStartInfo->dwStartupFlags & STARTF_USESTDHANDLES) == 0) + { + Parameters->StandardInput = ConsoleStartInfo->InputHandle; + Parameters->StandardOutput = ConsoleStartInfo->OutputHandle; + Parameters->StandardError = ConsoleStartInfo->ErrorHandle; + } } -BOOL -WINAPI -BasepInitConsole(VOID) +static BOOLEAN +IsConsoleApp(VOID) +{ + PIMAGE_NT_HEADERS ImageNtHeader = RtlImageNtHeader(NtCurrentPeb()->ImageBaseAddress); + return (ImageNtHeader && (ImageNtHeader->OptionalHeader.Subsystem == + IMAGE_SUBSYSTEM_WINDOWS_CUI)); +} + + +static BOOLEAN +ConnectConsole(IN PWSTR SessionDir, + IN PCONSRV_API_CONNECTINFO ConnectInfo, + OUT PBOOLEAN IsServerProcess) { NTSTATUS Status; - PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; - WCHAR SessionDir[256]; - ULONG SessionId = NtCurrentPeb()->SessionId; - BOOLEAN InServer; + ULONG ConnectInfoSize = sizeof(*ConnectInfo); - CONSRV_API_CONNECTINFO ConnectInfo; - ULONG ConnectInfoSize = sizeof(ConnectInfo); - - DPRINT("BasepInitConsole for : %wZ\n", &Parameters->ImagePathName); - DPRINT("Our current console handles are: %p, %p, %p %p\n", - Parameters->ConsoleHandle, Parameters->StandardInput, - Parameters->StandardOutput, Parameters->StandardError); - - /* Initialize our global console DLL lock */ - Status = RtlInitializeCriticalSection(&ConsoleLock); - if (!NT_SUCCESS(Status)) return FALSE; - ConsoleInitialized = TRUE; - - /* Do nothing if this isn't a console app... */ - if (RtlImageNtHeader(GetModuleHandle(NULL))->OptionalHeader.Subsystem != - IMAGE_SUBSYSTEM_WINDOWS_CUI) - { - DPRINT("Image is not a console application\n"); - Parameters->ConsoleHandle = NULL; - ConnectInfo.ConsoleStartInfo.ConsoleNeeded = FALSE; // ConsoleNeeded is used for knowing whether or not this is a CUI app. - - ConnectInfo.ConsoleStartInfo.ConsoleTitle[0] = L'\0'; - ConnectInfo.ConsoleStartInfo.AppPath[0] = L'\0'; - } - else - { - LPCWSTR ExeName; - - InitConsoleInfo(&ConnectInfo.ConsoleStartInfo, - &Parameters->ImagePathName); - - /* Initialize Input EXE name */ - ExeName = wcsrchr(Parameters->ImagePathName.Buffer, L'\\'); - if (ExeName) SetConsoleInputExeNameW(ExeName + 1); - - /* Assume one is needed */ - ConnectInfo.ConsoleStartInfo.ConsoleNeeded = TRUE; - - /* Handle the special flags given to us by BasePushProcessParameters */ - if (Parameters->ConsoleHandle == HANDLE_DETACHED_PROCESS) - { - /* No console to create */ - DPRINT("No console to create\n"); - Parameters->ConsoleHandle = NULL; - ConnectInfo.ConsoleStartInfo.ConsoleNeeded = FALSE; - } - else if (Parameters->ConsoleHandle == HANDLE_CREATE_NEW_CONSOLE) - { - /* We'll get the real one soon */ - DPRINT("Creating new console\n"); - Parameters->ConsoleHandle = NULL; - } - else if (Parameters->ConsoleHandle == HANDLE_CREATE_NO_WINDOW) - { - /* We'll get the real one soon */ - DPRINT("Creating new invisible console\n"); - Parameters->ConsoleHandle = NULL; - ConnectInfo.ConsoleStartInfo.wShowWindow = SW_HIDE; - } - else - { - if (Parameters->ConsoleHandle == INVALID_HANDLE_VALUE) - { - Parameters->ConsoleHandle = NULL; - } - DPRINT("Using existing console: %p\n", Parameters->ConsoleHandle); - } - } - - /* Now use the proper console handle */ - ConnectInfo.ConsoleHandle = Parameters->ConsoleHandle; - - /* Initialize the Console Ctrl Handler */ - InitConsoleCtrlHandling(); - ConnectInfo.ConsoleStartInfo.CtrlDispatcher = ConsoleControlDispatcher; - - /* Initialize the Property Dialog Handler */ - ConnectInfo.ConsoleStartInfo.PropDispatcher = PropDialogHandler; - - /* Setup the right Object Directory path */ - if (!SessionId) - { - /* Use the raw path */ - wcscpy(SessionDir, WIN_OBJ_DIR); - } - else - { - /* Use the session path */ - swprintf(SessionDir, - L"%ws\\%ld%ws", - SESSION_DIR, - SessionId, - WIN_OBJ_DIR); - } + ASSERT(SessionDir); /* Connect to the Console Server */ - DPRINT("Connecting to the Console Server in BasepInitConsole...\n"); + DPRINT("Connecting to the Console Server...\n"); Status = CsrClientConnectToServer(SessionDir, CONSRV_SERVERDLL_INDEX, - &ConnectInfo, + ConnectInfo, &ConnectInfoSize, - &InServer); + IsServerProcess); if (!NT_SUCCESS(Status)) { DPRINT1("Failed to connect to the Console Server (Status %lx)\n", Status); @@ -284,52 +303,237 @@ BasepInitConsole(VOID) } /* Nothing to do for server-to-server */ - if (InServer) return TRUE; + if (*IsServerProcess) return TRUE; - /* Nothing to do if not a console app */ - if (!ConnectInfo.ConsoleStartInfo.ConsoleNeeded) return TRUE; + /* Nothing to do if this is not a console app */ + if (!ConnectInfo->IsConsoleApp) return TRUE; - /* We got the handles, let's set them */ - if ((Parameters->ConsoleHandle = ConnectInfo.ConsoleHandle)) +#ifdef USE_CONSOLE_INIT_HANDLES + /* Wait for the connection to finish */ + Status = NtWaitForMultipleObjects(2, ConnectInfo->ConsoleStartInfo.Events, + WaitAny, FALSE, NULL); + if (!NT_SUCCESS(Status)) { - /* If we already had some, don't use the new ones */ - if (!Parameters->StandardInput) - { - Parameters->StandardInput = ConnectInfo.InputHandle; - } - if (!Parameters->StandardOutput) - { - Parameters->StandardOutput = ConnectInfo.OutputHandle; - } - if (!Parameters->StandardError) - { - Parameters->StandardError = ConnectInfo.ErrorHandle; - } + BaseSetLastNTError(Status); + return FALSE; } - InputWaitHandle = ConnectInfo.InputWaitHandle; + NtClose(ConnectInfo->ConsoleStartInfo.Events[0]); + NtClose(ConnectInfo->ConsoleStartInfo.Events[1]); + + if (Status != STATUS_SUCCESS) + { + NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; + return FALSE; + } +#endif - DPRINT("Console setup: %p, %p, %p, %p\n", - Parameters->ConsoleHandle, - Parameters->StandardInput, - Parameters->StandardOutput, - Parameters->StandardError); return TRUE; } -VOID +BOOLEAN WINAPI -BasepUninitConsole(VOID) +ConDllInitialize(IN ULONG Reason, + IN PWSTR SessionDir) { - /* Delete our critical section if we were initialized */ - if (ConsoleInitialized == TRUE) - { - if (ConsoleLibrary) FreeLibrary(ConsoleLibrary); + NTSTATUS Status; + PRTL_USER_PROCESS_PARAMETERS Parameters = NtCurrentPeb()->ProcessParameters; + BOOLEAN IsServerProcess; + CONSRV_API_CONNECTINFO ConnectInfo; + LCID lcid; - ConsoleInitialized = FALSE; - RtlDeleteCriticalSection(&ConsoleLock); + if (Reason != DLL_PROCESS_ATTACH) + { + if ((Reason == DLL_THREAD_ATTACH) && IsConsoleApp()) + { + /* Sets the current console locale for the new thread */ + SetTEBLangID(lcid); + } + else if (Reason == DLL_PROCESS_DETACH) + { + /* Free our resources */ + if (ConsoleInitialized == TRUE) + { + if (ConsoleApplet) FreeLibrary(ConsoleApplet); + + ConsoleInitialized = FALSE; + RtlDeleteCriticalSection(&ConsoleLock); + } + } + + return TRUE; } + + DPRINT("ConDllInitialize for: %wZ\n" + "Our current console handles are: 0x%p, 0x%p, 0x%p 0x%p\n", + &Parameters->ImagePathName, + Parameters->ConsoleHandle, + Parameters->StandardInput, + Parameters->StandardOutput, + Parameters->StandardError); + + /* Initialize our global console DLL lock */ + Status = RtlInitializeCriticalSection(&ConsoleLock); + if (!NT_SUCCESS(Status)) return FALSE; + ConsoleInitialized = TRUE; + + /* Show by default the console window when applicable */ + ConnectInfo.IsWindowVisible = TRUE; + /* If this is a console app, a console will be created/opened */ + ConnectInfo.IsConsoleApp = IsConsoleApp(); + + /* Do nothing if this is not a console app... */ + if (!ConnectInfo.IsConsoleApp) + { + DPRINT("Image is not a console application\n"); + } + + /* + * Handle the special flags given to us by BasePushProcessParameters. + */ + if (Parameters->ConsoleHandle == HANDLE_DETACHED_PROCESS) + { + /* No console to create */ + DPRINT("No console to create\n"); + /* + * The new process does not inherit its parent's console and cannot + * attach to the console of its parent. The new process can call the + * AllocConsole function at a later time to create a console. + */ + Parameters->ConsoleHandle = NULL; // Do not inherit the parent's console. + ConnectInfo.IsConsoleApp = FALSE; // Do not create any console. + } + else if (Parameters->ConsoleHandle == HANDLE_CREATE_NEW_CONSOLE) + { + /* We'll get the real one soon */ + DPRINT("Creating a new separate console\n"); + /* + * The new process has a new console, instead of inheriting + * its parent's console. + */ + Parameters->ConsoleHandle = NULL; // Do not inherit the parent's console. + } + else if (Parameters->ConsoleHandle == HANDLE_CREATE_NO_WINDOW) + { + /* We'll get the real one soon */ + DPRINT("Creating a new invisible console\n"); + /* + * The process is a console application that is being run + * without a console window. Therefore, the console handle + * for the application is not set. + */ + Parameters->ConsoleHandle = NULL; // Do not inherit the parent's console. + ConnectInfo.IsWindowVisible = FALSE; // A console is created but is not shown to the user. + } + else + { + DPRINT("Using existing console: 0x%p\n", Parameters->ConsoleHandle); + } + + /* Do nothing if this is not a console app... */ + if (!ConnectInfo.IsConsoleApp) + { + /* Do not inherit the parent's console if we are not a console app */ + Parameters->ConsoleHandle = NULL; + } + + /* Now use the proper console handle */ + ConnectInfo.ConsoleStartInfo.ConsoleHandle = Parameters->ConsoleHandle; + + /* Initialize the console dispatchers */ + ConnectInfo.CtrlRoutine = ConsoleControlDispatcher; + ConnectInfo.PropRoutine = PropDialogHandler; + // ConnectInfo.ImeRoutine = ImeRoutine; + + /* Set up the console properties */ + if (ConnectInfo.IsConsoleApp && Parameters->ConsoleHandle == NULL) + { + /* + * We can set up the console properties only if we create a new one + * (we do not inherit it from our parent). + */ + + LPWSTR ConsoleTitle = ConnectInfo.ConsoleTitle; + + ConnectInfo.TitleLength = sizeof(ConnectInfo.ConsoleTitle); + ConnectInfo.DesktopLength = 0; // SetUpConsoleInfo will give us the real length. + + SetUpConsoleInfo(TRUE, + &ConnectInfo.TitleLength, + &ConsoleTitle, + &ConnectInfo.DesktopLength, + &ConnectInfo.Desktop, + &ConnectInfo.ConsoleStartInfo); + DPRINT("ConsoleTitle = '%S' - Desktop = '%S'\n", + ConsoleTitle, ConnectInfo.Desktop); + } + else + { + ConnectInfo.TitleLength = 0; + ConnectInfo.DesktopLength = 0; + } + + /* Initialize the Input EXE name */ + if (ConnectInfo.IsConsoleApp) + { + LPWSTR CurDir = ConnectInfo.CurDir; + LPWSTR AppName = ConnectInfo.AppName; + + InitExeName(); + + ConnectInfo.CurDirLength = sizeof(ConnectInfo.CurDir); + ConnectInfo.AppNameLength = sizeof(ConnectInfo.AppName); + + SetUpAppName(TRUE, + &ConnectInfo.CurDirLength, + &CurDir, + &ConnectInfo.AppNameLength, + &AppName); + DPRINT("CurDir = '%S' - AppName = '%S'\n", + CurDir, AppName); + } + else + { + ConnectInfo.CurDirLength = 0; + ConnectInfo.AppNameLength = 0; + } + + /* + * Initialize Console Ctrl Handling, that needs to be supported by + * all applications, especially because it is used at shutdown. + */ + InitializeCtrlHandling(); + + /* Connect to the Console Server */ + if (!ConnectConsole(SessionDir, + &ConnectInfo, + &IsServerProcess)) + { + // DPRINT1("Failed to connect to the Console Server (Status %lx)\n", Status); + return FALSE; + } + + /* If we are not doing server-to-server init and if this is a console app... */ + if (!IsServerProcess && ConnectInfo.IsConsoleApp) + { + /* ... set the handles that we got */ + if (Parameters->ConsoleHandle == NULL) + SetUpHandles(&ConnectInfo.ConsoleStartInfo); + + InputWaitHandle = ConnectInfo.ConsoleStartInfo.InputWaitHandle; + + /* Sets the current console locale for this thread */ + SetTEBLangID(lcid); + } + + DPRINT("Console setup: 0x%p, 0x%p, 0x%p, 0x%p\n", + Parameters->ConsoleHandle, + Parameters->StandardInput, + Parameters->StandardOutput, + Parameters->StandardError); + + return TRUE; } /* EOF */ diff --git a/dll/win32/kernel32/client/console/readwrite.c b/dll/win32/kernel32/client/console/readwrite.c index f1818a0c8c8..e231b418984 100644 --- a/dll/win32/kernel32/client/console/readwrite.c +++ b/dll/win32/kernel32/client/console/readwrite.c @@ -31,10 +31,6 @@ * Read functions * ******************/ -DWORD -WINAPI -GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer); - static BOOL IntReadConsole(IN HANDLE hConsoleInput, @@ -58,26 +54,12 @@ IntReadConsole(IN HANDLE hConsoleInput, ReadConsoleRequest->Unicode = bUnicode; /* - * Retrieve the current console executable name string and length (always - * in UNICODE format). - * FIXME: Do not use GetConsoleInputExeNameW but use something else... + * Retrieve the (current) Input EXE name string and length, + * not NULL-terminated (always in UNICODE format). */ - // 1- Get the exe name length in characters, including NULL character. ReadConsoleRequest->ExeLength = - (USHORT)GetConsoleInputExeNameW(0, (PWCHAR)ReadConsoleRequest->StaticBuffer); - // 2- Get the exe name (GetConsoleInputExeNameW returns 1 in case of success). - if (GetConsoleInputExeNameW(ReadConsoleRequest->ExeLength, - (PWCHAR)ReadConsoleRequest->StaticBuffer) != 1) - { - // Nothing - ReadConsoleRequest->ExeLength = 0; - } - else - { - // Remove the NULL character, and convert in number of bytes. - ReadConsoleRequest->ExeLength--; - ReadConsoleRequest->ExeLength *= sizeof(WCHAR); - } + GetCurrentExeName((PWCHAR)ReadConsoleRequest->StaticBuffer, + sizeof(ReadConsoleRequest->StaticBuffer)); /*** For DEBUGGING purposes ***/ { @@ -181,7 +163,7 @@ IntReadConsole(IN HANDLE hConsoleInput, } _SEH2_END; - /* Check for sanity */ + /* FIXME: Check for sanity */ /* if (!NT_SUCCESS(Status) && pInputControl) { @@ -1185,9 +1167,7 @@ IntFillConsoleOutputCode(IN HANDLE hConsoleOutput, * Read functions * ******************/ -/*-------------------------------------------------------------- - * ReadConsoleW - * +/* * @implemented */ BOOL @@ -1207,9 +1187,7 @@ ReadConsoleW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleA - * +/* * @implemented */ BOOL @@ -1229,9 +1207,7 @@ ReadConsoleA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * PeekConsoleInputW - * +/* * @implemented */ BOOL @@ -1250,9 +1226,7 @@ PeekConsoleInputW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * PeekConsoleInputA - * +/* * @implemented */ BOOL @@ -1271,9 +1245,7 @@ PeekConsoleInputA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleInputW - * +/* * @implemented */ BOOL @@ -1292,9 +1264,7 @@ ReadConsoleInputW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleInputA - * +/* * @implemented */ BOOL @@ -1313,9 +1283,7 @@ ReadConsoleInputA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleInputExW - * +/* * @implemented */ BOOL @@ -1335,9 +1303,7 @@ ReadConsoleInputExW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleInputExA - * +/* * @implemented */ BOOL @@ -1357,9 +1323,7 @@ ReadConsoleInputExA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * ReadConsoleOutputW - * +/* * @implemented */ BOOL @@ -1379,9 +1343,7 @@ ReadConsoleOutputW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ReadConsoleOutputA - * +/* * @implemented */ BOOL @@ -1401,9 +1363,7 @@ ReadConsoleOutputA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ReadConsoleOutputCharacterW - * +/* * @implemented */ BOOL @@ -1423,9 +1383,7 @@ ReadConsoleOutputCharacterW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ReadConsoleOutputCharacterA - * +/* * @implemented */ BOOL @@ -1445,9 +1403,7 @@ ReadConsoleOutputCharacterA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * ReadConsoleOutputAttribute - * +/* * @implemented */ BOOL @@ -1471,9 +1427,7 @@ ReadConsoleOutputAttribute(IN HANDLE hConsoleOutput, * Write functions * *******************/ -/*-------------------------------------------------------------- - * WriteConsoleW - * +/* * @implemented */ BOOL @@ -1493,9 +1447,7 @@ WriteConsoleW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleA - * +/* * @implemented */ BOOL @@ -1515,9 +1467,7 @@ WriteConsoleA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleInputW - * +/* * @implemented */ BOOL @@ -1536,9 +1486,7 @@ WriteConsoleInputW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * WriteConsoleInputA - * +/* * @implemented */ BOOL @@ -1557,9 +1505,7 @@ WriteConsoleInputA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * WriteConsoleInputVDMW - * +/* * @implemented */ BOOL @@ -1578,9 +1524,7 @@ WriteConsoleInputVDMW(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * WriteConsoleInputVDMA - * +/* * @implemented */ BOOL @@ -1599,9 +1543,7 @@ WriteConsoleInputVDMA(IN HANDLE hConsoleInput, } -/*-------------------------------------------------------------- - * WriteConsoleOutputW - * +/* * @implemented */ BOOL @@ -1621,9 +1563,7 @@ WriteConsoleOutputW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleOutputA - * +/* * @implemented */ BOOL @@ -1643,9 +1583,7 @@ WriteConsoleOutputA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleOutputCharacterW - * +/* * @implemented */ BOOL @@ -1665,9 +1603,7 @@ WriteConsoleOutputCharacterW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleOutputCharacterA - * +/* * @implemented */ BOOL @@ -1687,9 +1623,7 @@ WriteConsoleOutputCharacterA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * WriteConsoleOutputAttribute - * +/* * @implemented */ BOOL @@ -1709,9 +1643,7 @@ WriteConsoleOutputAttribute(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * FillConsoleOutputCharacterW - * +/* * @implemented */ BOOL @@ -1733,9 +1665,7 @@ FillConsoleOutputCharacterW(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * FillConsoleOutputCharacterA - * +/* * @implemented */ BOOL @@ -1757,9 +1687,7 @@ FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * FillConsoleOutputAttribute - * +/* * @implemented */ BOOL diff --git a/dll/win32/kernel32/client/console/vista.c b/dll/win32/kernel32/client/console/vista.c index bd2721e126b..ca691dda2c8 100644 --- a/dll/win32/kernel32/client/console/vista.c +++ b/dll/win32/kernel32/client/console/vista.c @@ -18,9 +18,7 @@ #if _WIN32_WINNT >= 0x600 -/*-------------------------------------------------------------- - * GetConsoleHistoryInfo - * +/* * @implemented */ BOOL @@ -55,9 +53,7 @@ GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) } -/*-------------------------------------------------------------- - * SetConsoleHistoryInfo - * +/* * @implemented */ BOOL @@ -92,9 +88,7 @@ SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) } -/*-------------------------------------------------------------- - * GetConsoleOriginalTitleW - * +/* * @unimplemented */ DWORD @@ -108,9 +102,7 @@ GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle, } -/*-------------------------------------------------------------- - * GetConsoleOriginalTitleA - * +/* * @unimplemented */ DWORD @@ -124,9 +116,7 @@ GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle, } -/*-------------------------------------------------------------- - * GetConsoleScreenBufferInfoEx - * +/* * @unimplemented */ BOOL @@ -140,9 +130,7 @@ GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * SetConsoleScreenBufferInfoEx - * +/* * @unimplemented */ BOOL @@ -156,9 +144,7 @@ SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, } -/*-------------------------------------------------------------- - * GetCurrentConsoleFontEx - * +/* * @unimplemented */ BOOL diff --git a/dll/win32/kernel32/client/dllmain.c b/dll/win32/kernel32/client/dllmain.c index 04421291ac4..26c24cf5d43 100644 --- a/dll/win32/kernel32/client/dllmain.c +++ b/dll/win32/kernel32/client/dllmain.c @@ -200,7 +200,7 @@ DllMain(HANDLE hDll, } /* Initialize Console Support */ - if (!BasepInitConsole()) + if (!ConDllInitialize(dwReason, SessionDir)) { DPRINT1("Failed to set up console\n"); return FALSE; @@ -219,18 +219,24 @@ DllMain(HANDLE hDll, { if (DllInitialized == TRUE) { + /* Uninitialize console support */ + ConDllInitialize(dwReason, NULL); + /* Insert more dll detach stuff here! */ NlsUninit(); - /* Uninitialize console support */ - BasepUninitConsole(); - /* Delete DLL critical section */ RtlDeleteCriticalSection(&BaseDllDirectoryLock); } break; } + case DLL_THREAD_ATTACH: + { + /* ConDllInitialize sets the current console locale for the new thread */ + return ConDllInitialize(dwReason, NULL); + } + default: break; } diff --git a/dll/win32/kernel32/client/file/mailslot.c b/dll/win32/kernel32/client/file/mailslot.c index a6b22d6da0c..a5c056b89a1 100644 --- a/dll/win32/kernel32/client/file/mailslot.c +++ b/dll/win32/kernel32/client/file/mailslot.c @@ -78,7 +78,7 @@ CreateMailslotW(IN LPCWSTR lpName, else { /* Convert to NT format */ - DefaultTimeOut.QuadPart = UInt32x32To64(-10000, lReadTimeout); + DefaultTimeOut.QuadPart = lReadTimeout * -10000LL; } Status = NtCreateMailslotFile(&MailslotHandle, @@ -185,7 +185,7 @@ SetMailslotInfo(IN HANDLE hMailslot, else { /* Convert to NT format */ - Timeout.QuadPart = UInt32x32To64(-10000, lReadTimeout); + Timeout.QuadPart = lReadTimeout * -10000LL; } Buffer.ReadTimeout = &Timeout; diff --git a/dll/win32/kernel32/client/file/npipe.c b/dll/win32/kernel32/client/file/npipe.c index 82ac4b5ea9c..6698acd432e 100644 --- a/dll/win32/kernel32/client/file/npipe.c +++ b/dll/win32/kernel32/client/file/npipe.c @@ -287,7 +287,7 @@ CreateNamedPipeW(LPCWSTR lpName, if (nDefaultTimeOut) { /* Convert the time to NT format */ - DefaultTimeOut.QuadPart = UInt32x32To64(nDefaultTimeOut, -10000); + DefaultTimeOut.QuadPart = nDefaultTimeOut * -10000LL; } else { @@ -517,7 +517,7 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName, else { /* Convert to NT format */ - WaitPipeInfo->Timeout.QuadPart = UInt32x32To64(-10000, nTimeOut); + WaitPipeInfo->Timeout.QuadPart = nTimeOut * -10000LL; } /* In both cases, we do have a timeout */ @@ -699,8 +699,7 @@ SetNamedPipeHandleState(HANDLE hNamedPipe, if (lpCollectDataTimeout) { /* Convert it to Quad */ - RemoteSettings.CollectDataTime.QuadPart = - -(LONGLONG)UInt32x32To64(10000, *lpCollectDataTimeout); + RemoteSettings.CollectDataTime.QuadPart = *lpCollectDataTimeout * -10000LL; } /* Tell the driver to change them */ diff --git a/dll/win32/kernel32/client/power.c b/dll/win32/kernel32/client/power.c index 7864221f378..745354e35b4 100644 --- a/dll/win32/kernel32/client/power.c +++ b/dll/win32/kernel32/client/power.c @@ -87,9 +87,8 @@ SetSystemPowerState(IN BOOL fSuspend, { NTSTATUS Status; - Status = NtInitiatePowerAction(PowerActionSleep, - (fSuspend != FALSE) ? - PowerSystemSleeping1 : PowerSystemHibernate, + Status = NtInitiatePowerAction((fSuspend != FALSE) ? PowerActionSleep : PowerActionHibernate, + (fSuspend != FALSE) ? PowerSystemSleeping1 : PowerSystemHibernate, fForce != TRUE, FALSE); if (!NT_SUCCESS(Status)) diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c index 47bb1404509..e590f20ab2a 100644 --- a/dll/win32/kernel32/client/proc.c +++ b/dll/win32/kernel32/client/proc.c @@ -726,7 +726,7 @@ BasePushProcessParameters(IN ULONG ParameterFlags, ProcessParameters->StandardError = StartupInfo->hStdError; } - /* Use Special Flags for BasepInitConsole in Kernel32 */ + /* Use Special Flags for ConDllInitialize in Kernel32 */ if (CreationFlags & DETACHED_PROCESS) { ProcessParameters->ConsoleHandle = HANDLE_DETACHED_PROCESS; diff --git a/dll/win32/kernel32/client/utils.c b/dll/win32/kernel32/client/utils.c index fa476de403e..31134552815 100644 --- a/dll/win32/kernel32/client/utils.c +++ b/dll/win32/kernel32/client/utils.c @@ -292,7 +292,7 @@ BaseFormatTimeOut(OUT PLARGE_INTEGER Timeout, if (dwMilliseconds == INFINITE) return NULL; /* Otherwise, convert the time to NT Format */ - Timeout->QuadPart = UInt32x32To64(dwMilliseconds, -10000); + Timeout->QuadPart = dwMilliseconds * -10000LL; return Timeout; } diff --git a/dll/win32/kernel32/client/vista.c b/dll/win32/kernel32/client/vista.c index a5a14353dbd..02927ab4665 100644 --- a/dll/win32/kernel32/client/vista.c +++ b/dll/win32/kernel32/client/vista.c @@ -45,7 +45,7 @@ SleepConditionVariableCS(IN OUT PCONDITION_VARIABLE ConditionVariable, if (dwMilliseconds != INFINITE) { - TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds); + TimeOut.QuadPart = dwMilliseconds * -10000LL; TimeOutPtr = &TimeOut; } @@ -80,7 +80,7 @@ SleepConditionVariableSRW(IN OUT PCONDITION_VARIABLE ConditionVariable, if (dwMilliseconds != INFINITE) { - TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds); + TimeOut.QuadPart = dwMilliseconds * -10000LL; TimeOutPtr = &TimeOut; } diff --git a/dll/win32/kernel32/include/console.h b/dll/win32/kernel32/include/console.h index 1886608e88e..79e1d9a8022 100644 --- a/dll/win32/kernel32/include/console.h +++ b/dll/win32/kernel32/include/console.h @@ -10,26 +10,31 @@ /* CONSTANTS ******************************************************************/ -#define HANDLE_DETACHED_PROCESS (HANDLE)-2 -#define HANDLE_CREATE_NEW_CONSOLE (HANDLE)-3 -#define HANDLE_CREATE_NO_WINDOW (HANDLE)-4 +#define HANDLE_DETACHED_PROCESS (HANDLE)-1 +#define HANDLE_CREATE_NEW_CONSOLE (HANDLE)-2 +#define HANDLE_CREATE_NO_WINDOW (HANDLE)-3 + +// Enable (and then get rid of) this define when support for +// console initialization handles is implemented in CONSRV. +// #define USE_CONSOLE_INIT_HANDLES /* FUNCTION PROTOTYPES ********************************************************/ -BOOL WINAPI -BasepInitConsole(VOID); +BOOLEAN +WINAPI +ConDllInitialize(IN ULONG Reason, + IN PWSTR SessionDir); -VOID WINAPI -BasepUninitConsole(VOID); +VOID +InitializeCtrlHandling(VOID); -VOID WINAPI -InitConsoleCtrlHandling(VOID); - -DWORD WINAPI +DWORD +WINAPI ConsoleControlDispatcher(IN LPVOID lpThreadParameter); -DWORD WINAPI +DWORD +WINAPI PropDialogHandler(IN LPVOID lpThreadParameter); HANDLE WINAPI @@ -59,9 +64,32 @@ GetConsoleInputWaitHandle(VOID); HANDLE TranslateStdHandle(HANDLE hHandle); +#define SetTEBLangID(p) (p) + VOID -InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo, - IN PUNICODE_STRING ImagePathName); +SetUpConsoleInfo(IN BOOLEAN CaptureTitle, + IN OUT LPDWORD pTitleLength, + IN OUT LPWSTR* lpTitle OPTIONAL, + IN OUT LPDWORD pDesktopLength, + IN OUT LPWSTR* lpDesktop OPTIONAL, + IN OUT PCONSOLE_START_INFO ConsoleStartInfo); + +VOID +SetUpHandles(IN PCONSOLE_START_INFO ConsoleStartInfo); + +VOID +InitExeName(VOID); + +VOID +SetUpAppName(IN BOOLEAN CaptureStrings, + IN OUT LPDWORD CurDirLength, + IN OUT LPWSTR* CurDir, + IN OUT LPDWORD AppNameLength, + IN OUT LPWSTR* AppName); + +USHORT +GetCurrentExeName(OUT PWCHAR ExeName, + IN USHORT BufferSize); LPCWSTR IntCheckForConsoleFileName(IN LPCWSTR pszName, @@ -73,7 +101,4 @@ OpenConsoleW(LPCWSTR wsName, BOOL bInheritHandle, DWORD dwShareMode); -BOOL WINAPI -SetConsoleInputExeNameW(LPCWSTR lpInputExeName); - /* EOF */ diff --git a/dll/win32/kernel32/winnls/lang/ru-RU.mc b/dll/win32/kernel32/winnls/lang/ru-RU.mc index 89dc623a7ef..6a7149332b2 100644 --- a/dll/win32/kernel32/winnls/lang/ru-RU.mc +++ b/dll/win32/kernel32/winnls/lang/ru-RU.mc @@ -29,7 +29,7 @@ Severity=Success Facility=System SymbolicName=ERROR_SUCCESS Language=Russian -ERROR_SUCCESS - . +ERROR_SUCCESS - . . MessageId=1 @@ -45,7 +45,7 @@ Severity=Success Facility=System SymbolicName=ERROR_FILE_NOT_FOUND Language=Russian -ERROR_FILE_NOT_FOUND - . +ERROR_FILE_NOT_FOUND - . . MessageId=3 @@ -53,7 +53,7 @@ Severity=Success Facility=System SymbolicName=ERROR_PATH_NOT_FOUND Language=Russian -ERROR_PATH_NOT_FOUND - . +ERROR_PATH_NOT_FOUND - . . MessageId=4 @@ -61,7 +61,7 @@ Severity=Success Facility=System SymbolicName=ERROR_TOO_MANY_OPEN_FILES Language=Russian -ERROR_TOO_MANY_OPEN_FILES - . +ERROR_TOO_MANY_OPEN_FILES - . . MessageId=5 @@ -69,7 +69,7 @@ Severity=Success Facility=System SymbolicName=ERROR_ACCESS_DENIED Language=Russian -ERROR_ACCESS_DENIED - . +ERROR_ACCESS_DENIED - . . MessageId=6 @@ -77,7 +77,7 @@ Severity=Success Facility=System SymbolicName=ERROR_INVALID_HANDLE Language=Russian -ERROR_INVALID_HANDLE - The handle is invalid. +ERROR_INVALID_HANDLE - . . MessageId=7 @@ -85,7 +85,7 @@ Severity=Success Facility=System SymbolicName=ERROR_ARENA_TRASHED Language=Russian -ERROR_ARENA_TRASHED - The storage control blocks were destroyed. +ERROR_ARENA_TRASHED - . . MessageId=8 @@ -93,7 +93,7 @@ Severity=Success Facility=System SymbolicName=ERROR_NOT_ENOUGH_MEMORY Language=Russian -ERROR_NOT_ENOUGH_MEMORY - Not enough storage is available to process this command. +ERROR_NOT_ENOUGH_MEMORY - . . MessageId=9 @@ -101,7 +101,7 @@ Severity=Success Facility=System SymbolicName=ERROR_INVALID_BLOCK Language=Russian -ERROR_INVALID_BLOCK - The storage control block address is invalid. +ERROR_INVALID_BLOCK - . . MessageId=10 @@ -109,7 +109,7 @@ Severity=Success Facility=System SymbolicName=ERROR_BAD_ENVIRONMENT Language=Russian -ERROR_BAD_ENVIRONMENT - The environment is incorrect. +ERROR_BAD_ENVIRONMENT - . . MessageId=11 @@ -117,7 +117,7 @@ Severity=Success Facility=System SymbolicName=ERROR_BAD_FORMAT Language=Russian -ERROR_BAD_FORMAT - An attempt was made to load a program with an incorrect format. +ERROR_BAD_FORMAT - , . . MessageId=12 @@ -125,7 +125,7 @@ Severity=Success Facility=System SymbolicName=ERROR_INVALID_ACCESS Language=Russian -ERROR_INVALID_ACCESS - The access code is invalid. +ERROR_INVALID_ACCESS - . . MessageId=13 @@ -133,7 +133,7 @@ Severity=Success Facility=System SymbolicName=ERROR_INVALID_DATA Language=Russian -ERROR_INVALID_DATA - . +ERROR_INVALID_DATA - . . MessageId=14 @@ -141,7 +141,7 @@ Severity=Success Facility=System SymbolicName=ERROR_OUTOFMEMORY Language=Russian -ERROR_OUTOFMEMORY - Not enough storage is available to complete this operation. +ERROR_OUTOFMEMORY - . . MessageId=15 @@ -149,7 +149,7 @@ Severity=Success Facility=System SymbolicName=ERROR_INVALID_DRIVE Language=Russian -ERROR_INVALID_DRIVE - The system cannot find the drive specified. +ERROR_INVALID_DRIVE - . . MessageId=16 @@ -157,7 +157,7 @@ Severity=Success Facility=System SymbolicName=ERROR_CURRENT_DIRECTORY Language=Russian -ERROR_CURRENT_DIRECTORY - . +ERROR_CURRENT_DIRECTORY - . . MessageId=17 @@ -165,7 +165,7 @@ Severity=Success Facility=System SymbolicName=ERROR_NOT_SAME_DEVICE Language=Russian -ERROR_NOT_SAME_DEVICE - The system cannot move the file to a different disk drive. +ERROR_NOT_SAME_DEVICE - . . MessageId=18 @@ -173,7 +173,7 @@ Severity=Success Facility=System SymbolicName=ERROR_NO_MORE_FILES Language=Russian -ERROR_NO_MORE_FILES - There are no more files. +ERROR_NO_MORE_FILES - . . MessageId=19 @@ -181,7 +181,7 @@ Severity=Success Facility=System SymbolicName=ERROR_WRITE_PROTECT Language=Russian -ERROR_WRITE_PROTECT - The media is write protected. +ERROR_WRITE_PROTECT - . . MessageId=20 @@ -189,7 +189,7 @@ Severity=Success Facility=System SymbolicName=ERROR_BAD_UNIT Language=Russian -ERROR_BAD_UNIT - The system cannot find the device specified. +ERROR_BAD_UNIT - . . MessageId=21 @@ -197,7 +197,7 @@ Severity=Success Facility=System SymbolicName=ERROR_NOT_READY Language=Russian -ERROR_NOT_READY - The device is not ready. +ERROR_NOT_READY - . . MessageId=22 @@ -205,7 +205,7 @@ Severity=Success Facility=System SymbolicName=ERROR_BAD_COMMAND Language=Russian -ERROR_BAD_COMMAND - The device does not recognize the command. +ERROR_BAD_COMMAND - " . . MessageId=23 @@ -213,7 +213,7 @@ Severity=Success Facility=System SymbolicName=ERROR_CRC Language=Russian -ERROR_CRC - Data error (cyclic redundancy check). +ERROR_CRC - (CRC). . MessageId=24 @@ -221,7 +221,7 @@ Severity=Success Facility=System SymbolicName=ERROR_BAD_LENGTH Language=Russian -ERROR_BAD_LENGTH - The program issued a command but the command length is incorrect. +ERROR_BAD_LENGTH - . . MessageId=25 @@ -229,7 +229,7 @@ Severity=Success Facility=System SymbolicName=ERROR_SEEK Language=Russian -ERROR_SEEK - The drive cannot locate a specific area or track on the disk. +ERROR_SEEK - . . MessageId=26 @@ -237,7 +237,7 @@ Severity=Success Facility=System SymbolicName=ERROR_NOT_DOS_DISK Language=Russian -ERROR_NOT_DOS_DISK - The specified disk or diskette cannot be accessed. +ERROR_NOT_DOS_DISK - . . MessageId=27 @@ -245,7 +245,7 @@ Severity=Success Facility=System SymbolicName=ERROR_SECTOR_NOT_FOUND Language=Russian -ERROR_SECTOR_NOT_FOUND - The drive cannot find the sector requested. +ERROR_SECTOR_NOT_FOUND - . . MessageId=28 @@ -253,7 +253,7 @@ Severity=Success Facility=System SymbolicName=ERROR_OUT_OF_PAPER Language=Russian -ERROR_OUT_OF_PAPER - The printer is out of paper. +ERROR_OUT_OF_PAPER - . . MessageId=29 @@ -261,7 +261,7 @@ Severity=Success Facility=System SymbolicName=ERROR_WRITE_FAULT Language=Russian -ERROR_WRITE_FAULT - The system cannot write to the specified device. +ERROR_WRITE_FAULT - . . MessageId=30 @@ -269,7 +269,7 @@ Severity=Success Facility=System SymbolicName=ERROR_READ_FAULT Language=Russian -ERROR_READ_FAULT - The system cannot read from the specified device. +ERROR_READ_FAULT - e. . MessageId=31 @@ -277,7 +277,7 @@ Severity=Success Facility=System SymbolicName=ERROR_GEN_FAILURE Language=Russian -ERROR_GEN_FAILURE - A device attached to the system is not functioning. +ERROR_GEN_FAILURE - . . MessageId=32 @@ -285,7 +285,7 @@ Severity=Success Facility=System SymbolicName=ERROR_SHARING_VIOLATION Language=Russian -ERROR_SHARING_VIOLATION - The process cannot access the file because it is being used by another process. +ERROR_SHARING_VIOLATION - , . . MessageId=33 @@ -293,7 +293,7 @@ Severity=Success Facility=System SymbolicName=ERROR_LOCK_VIOLATION Language=Russian -ERROR_LOCK_VIOLATION - The process cannot access the file because another process has locked a portion of the file. +ERROR_LOCK_VIOLATION - , . . MessageId=34 @@ -301,7 +301,7 @@ Severity=Success Facility=System SymbolicName=ERROR_WRONG_DISK Language=Russian -ERROR_WRONG_DISK - The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1. +ERROR_WRONG_DISK - . %2 ( : %3) %1. . MessageId=36 @@ -309,7 +309,7 @@ Severity=Success Facility=System SymbolicName=ERROR_SHARING_BUFFER_EXCEEDED Language=Russian -ERROR_SHARING_BUFFER_EXCEEDED - Too many files opened for sharing. +ERROR_SHARING_BUFFER_EXCEEDED - . . MessageId=38 @@ -317,7 +317,7 @@ Severity=Success Facility=System SymbolicName=ERROR_HANDLE_EOF Language=Russian -ERROR_HANDLE_EOF - Reached the end of the file. +ERROR_HANDLE_EOF - . . MessageId=39 @@ -325,7 +325,7 @@ Severity=Success Facility=System SymbolicName=ERROR_HANDLE_DISK_FULL Language=Russian -ERROR_HANDLE_DISK_FULL - The disk is full. +ERROR_HANDLE_DISK_FULL - . . MessageId=50 diff --git a/dll/win32/kernel32/winnls/lang/tr-TR.rc b/dll/win32/kernel32/winnls/lang/tr-TR.rc index b2cd57b017e..def6b3aa658 100644 --- a/dll/win32/kernel32/winnls/lang/tr-TR.rc +++ b/dll/win32/kernel32/winnls/lang/tr-TR.rc @@ -102,10 +102,10 @@ BEGIN 28595 "28595 (ISO 8859-5 Kiril)" 28596 "28596 (ISO 8859-6 Arapça)" 28597 "28597 (ISO 8859-7 Yunanca)" - 28598 "28598 (ISO 8859-8 İbrânice: Görmelik Sıralama)" + 28598 "28598 (ISO 8859-8 İbrânice: Görmelik Dizme)" 28599 "28599 (ISO 8859-9 Latin 5)" 28605 "28605 (ISO 8859-15 Latin 9)" - 38598 "38598 (ISO 8859-8 İbrânice: Mantıklık Sıralama)" + 38598 "38598 (ISO 8859-8 İbrânice: Mantıklık Dizme)" 20105 "20105 (IA5 IRV Uluslararası Harflik Nu: 5)" 20106 "20106 (IA5 Almanca)" diff --git a/dll/win32/kernel32/winnls/nls/trk.nls b/dll/win32/kernel32/winnls/nls/trk.nls index 8a854e45bc7..06b83387cff 100644 --- a/dll/win32/kernel32/winnls/nls/trk.nls +++ b/dll/win32/kernel32/winnls/nls/trk.nls @@ -76,7 +76,7 @@ STRINGTABLE LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LOCALE_SABBREVMONTHNAME1 "Oca" LOCALE_SABBREVMONTHNAME2 "ub" LOCALE_SABBREVMONTHNAME3 "Mar" - LOCALE_SABBREVMONTHNAME4 "Nis" + LOCALE_SABBREVMONTHNAME4 "Ns" LOCALE_SABBREVMONTHNAME5 "May" LOCALE_SABBREVMONTHNAME6 "Haz" LOCALE_SABBREVMONTHNAME7 "Tem" @@ -93,7 +93,7 @@ STRINGTABLE LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LOCALE_SDAYNAME2 "Sal" LOCALE_SDAYNAME3 "aramba" LOCALE_SDAYNAME4 "Perembe" - LOCALE_SDAYNAME5 "Cuma" + LOCALE_SDAYNAME5 "Cum" LOCALE_SDAYNAME6 "Cumartesi" LOCALE_SDAYNAME7 "Pazar" LOCALE_SDECIMAL "," @@ -112,7 +112,7 @@ STRINGTABLE LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LOCALE_SMONTHNAME1 "Ocak" LOCALE_SMONTHNAME2 "ubat" LOCALE_SMONTHNAME3 "Mart" - LOCALE_SMONTHNAME4 "Nisan" + LOCALE_SMONTHNAME4 "Nsan" LOCALE_SMONTHNAME5 "Mays" LOCALE_SMONTHNAME6 "Haziran" LOCALE_SMONTHNAME7 "Temmuz" @@ -138,21 +138,21 @@ STRINGTABLE LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LOCALE_STIMEFORMAT "HH:mm:ss" LOCALE_SYEARMONTH "MMMM yyyy" - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" - LGRPID_GREEK+LGRPID_RES_BASE "Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE "Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE "Thai" - LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE "Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Bat Avrupa ve Amerika Birleik Devletleri" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "zeklik Avrupa" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltk" + LGRPID_GREEK+LGRPID_RES_BASE "Yunanca" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Kiril" + LGRPID_TURKISH+LGRPID_RES_BASE "Trke" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japonca" + LGRPID_KOREAN+LGRPID_RES_BASE "Korece" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Geleneklik ince" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Bayalatrlm ince" + LGRPID_THAI+LGRPID_RES_BASE "Tayca" + LGRPID_HEBREW+LGRPID_RES_BASE "brnice" + LGRPID_ARABIC+LGRPID_RES_BASE "Arapa" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamca" + LGRPID_INDIC+LGRPID_RES_BASE "Hinte" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Grcce" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Ermenice" } diff --git a/dll/win32/lsasrv/lang/tr-TR.rc b/dll/win32/lsasrv/lang/tr-TR.rc new file mode 100644 index 00000000000..a8272980dac --- /dev/null +++ b/dll/win32/lsasrv/lang/tr-TR.rc @@ -0,0 +1,46 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NT_AUTHORITY "NT YETKİLİSİ" + IDS_NULL_RID "BOŞ SID" + IDS_WORLD_RID "Herkes" + IDS_LOCAL_RID "YERLİ" + IDS_CREATOR_OWNER_RID "OLUŞTURUCU İYE" + IDS_CREATOR_GROUP_RID "OLUŞTURUCU TAKIM" + IDS_CREATOR_OWNER_SERVER_RID "OLUŞTURUCU İYE SUNUCUSU" + IDS_CREATOR_GROUP_SERVER_RID "OLUŞTURUCU TAKIM SUNUCUSU" + IDS_DIALUP_RID "ÇEVİRMELİ AĞ" + IDS_NETWORK_RID "AĞ" + IDS_BATCH_RID "TOPLU İŞ" + IDS_INTERACTIVE_RID "ETKLİEŞİMLİ" + IDS_SERVICE_RID "HİZMET" + IDS_ANONYMOUS_LOGON_RID "ADSIZ OTURUM AÇMA" + IDS_PROXY_RID "VEKİL" + IDS_ENTERPRISE_CONTROLLERS_RID "İŞLETME ETKİ ALANI DENETLEYİCİLERİ" + IDS_PRINCIPAL_SELF_RID "KİŞİ" + IDS_AUTHENTICATED_USER_RID "Kimliği Doğrulanmış Kullanıcılar" + IDS_RESTRICTED_CODE_RID "KISITLANMIŞ" + IDS_TERMINAL_SERVER_RID "UÇBİRİM SUNUCUSU KULLANICISI" + IDS_REMOTE_LOGON_RID "UZAK ETKİLEŞİMLİ OTURUM AÇMA" + IDS_THIS_ORGANIZATION_RID "Bu Kuruluş" + IDS_LOCAL_SYSTEM_RID "DİZGE" + IDS_LOCAL_SERVICE_RID "YERLİ HİZMET" + IDS_NETWORK_SERVICE_RID "AĞ HİZMETİ" + IDS_BUILTIN_DOMAIN_RID "İÇ" + IDS_ALIAS_RID_ADMINS "Yöneticiler" + IDS_ALIAS_RID_USERS "Kullanıcılar" + IDS_ALIAS_RID_GUESTS "Konuklar" + IDS_ALIAS_RID_POWER_USERS "Güçlü Kullanıcılar" + IDS_ALIAS_RID_ACCOUNT_OPS "Hesap İşletmenleri" + IDS_ALIAS_RID_SYSTEM_OPS "Sunucu İşletmenleri" + IDS_ALIAS_RID_PRINT_OPS "Yazdırma İşletmenleri" + IDS_ALIAS_RID_BACKUP_OPS "Yedekleme İşletmenleri" + IDS_ALIAS_RID_REPLICATOR "Çoğaltıcılar" + IDS_ALIAS_RID_RAS_SERVERS "RAS ve IAS Sunucuları" + IDS_ALIAS_RID_PREW2KCOMPACCESS "Windows 2000 Öncesiyle Uyumlu Erişim" + IDS_ALIAS_RID_REMOTE_DESKTOP_USERS "Uzak Masaüstü Kullanıcıları" + IDS_ALIAS_RID_NETWORK_CONFIGURATION_OPS "Ağ Yapılandırma İşletmenleri" +END diff --git a/dll/win32/lsasrv/lsasrv.rc b/dll/win32/lsasrv/lsasrv.rc index 20d0920fd35..76f76923097 100644 --- a/dll/win32/lsasrv/lsasrv.rc +++ b/dll/win32/lsasrv/lsasrv.rc @@ -32,4 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" -#endif \ No newline at end of file +#endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif diff --git a/dll/win32/mapi32/lang/Tr.rc b/dll/win32/mapi32/lang/Tr.rc new file mode 100644 index 00000000000..a58442e49f3 --- /dev/null +++ b/dll/win32/mapi32/lang/Tr.rc @@ -0,0 +1,28 @@ +/* +* MAPI32 Turkish resources +* +* Copyright: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +* +*/ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_NO_MAPI_CLIENT, "Kurulu bir MAPI posta istemcisine iye olmadığınzdan dolayı posta gönderme başarısız." + IDS_SEND_MAIL, "Posta Gönder" +} diff --git a/dll/win32/mapi32/version.rc b/dll/win32/mapi32/version.rc index c766066d9cf..cf11a34298a 100644 --- a/dll/win32/mapi32/version.rc +++ b/dll/win32/mapi32/version.rc @@ -86,6 +86,9 @@ #ifdef LANGUAGE_SQ_AL #include "lang/Sq.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/Tr.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/Uk.rc" #endif diff --git a/dll/win32/modemui/lang/tr-TR.rc b/dll/win32/modemui/lang/tr-TR.rc new file mode 100644 index 00000000000..a41ddb9e963 --- /dev/null +++ b/dll/win32/modemui/lang/tr-TR.rc @@ -0,0 +1,615 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDM_MENU MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "&Kopyasını Yap...", 0 + MENUITEM "K&aldır", 1 + MENUITEM "Ka&ydı Göster", 2 + MENUITEM SEPARATOR + MENUITEM "&Husûsiyetler", 3 + MENUITEM "H&usûsiyetleri Çoğalt", 4 + MENUITEM "Hu&sûsiyetleri Uygula", 5 + END +END + +IDD_ADVANCED DIALOGEX 17, 12, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Gelişmiş" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Ek Ayarlar", 1018, 6, 6, 225, 70 + LTEXT "&Ek Başlatma Komutları:", 1011, 16, 20, 143, 8 + EDITTEXT 1016, 16, 31, 205, 13, ES_AUTOHSCROLL + LTEXT "&Kredi Kartı Sesi İçin Bekle:", 1007, 16, 55, 109, 8, NOT WS_VISIBLE + EDITTEXT 1008, 133, 52, 26, 12, ES_RIGHT | NOT WS_VISIBLE | WS_GROUP + CONTROL "", 1009, "MSCTLS_UPDOWN32", NOT WS_VISIBLE | WS_BORDER | WS_GROUP | 0x00000036, 159, 52, 12, 12 + LTEXT "sâniye", 1010, 173, 54, 40, 8, NOT WS_VISIBLE + GROUPBOX "&Ülke ya da Bölge Seç", 1012, 6, 80, 225, 75 + COMBOBOX 1013, 18, 99, 203, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP + PUSHBUTTON "&Gelişmiş Giriş Ayarları...", 1100, 107, 170, 125, 14 + DEFPUSHBUTTON "&Ön Tanımlı Yeğlemeleri Değiştir...", 3, 107, 188, 125, 14 +END + +IDD_GENERAL DIALOGEX 0, 0, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Giriş:", 1018, 9, 8, 32, 10 + LTEXT "COM Girişi", 1095, 48, 8, 181, 10 + GROUPBOX "&Hoparlör Ses Düzeyi", 1029, 10, 21, 218, 48 + CONTROL "", 1032, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000001, 84, 40, 66, 20 + RTEXT "Kapalı", 1045, 56, 40, 22, 8 + LTEXT "Yüksek", 1001, 155, 40, 25, 11 + GROUPBOX "&En Çok Giriş Hızı", 1031, 10, 78, 218, 46 + COMBOBOX 1036, 18, 100, 202, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + GROUPBOX "Çevirme Denetimi", 1060, 10, 133, 218, 51 + AUTOCHECKBOX "&Çevirmeden Önce Çevirme Sesi İçin Bekle", 1003, 27, 157, 174, 10 +END + +IDD_DISTINCTIVE_RING DIALOGEX 0, 0, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Ayırıcı Çalma" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "", 1068, 10, 7, 218, 145 + AUTOCHECKBOX "&Bu Telefon Hattında Ayırıcı Çalma Hizmetleri Vardır", 1069, 20, 7, 184, 10 + CTEXT "Çalma Türü", -1, 84, 21, 70, 8 + CTEXT "Arama Türü", -1, 159, 21, 63, 8 + LTEXT "B&irinci Adres:", 1070, 20, 41, 62, 8 + COMBOBOX 1073, 84, 37, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1082, 160, 37, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Adres &1:", 1071, 20, 59, 62, 8 + COMBOBOX 1074, 84, 55, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1083, 160, 55, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Adres &2:", 1072, 20, 77, 62, 8 + COMBOBOX 1075, 84, 73, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1084, 160, 73, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Adres &3:", 1076, 20, 95, 62, 8 + COMBOBOX 1077, 84, 91, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1085, 160, 91, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Öncelikli Arayanlar:", 1078, 20, 112, 62, 8 + COMBOBOX 1079, 84, 109, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1086, 160, 109, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Geri Arama:", 1080, 20, 131, 62, 8 + COMBOBOX 1081, 84, 127, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP + COMBOBOX 1087, 160, 127, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP +END + +IDD_DISTINCTIVE_RING_2 DIALOGEX 0, 0, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Ayırıcı Çalma" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "", 1068, 10, 7, 218, 87 + AUTOCHECKBOX "&Bu Telefon Hattında Ayırıcı Çalma Hizmetleri Vardır", 1069, 19, 7, 177, 10 + CTEXT "Çalma Türü", -1, 20, 21, 74, 8 + CTEXT "Arama Türü", -1, 96, 21, 65, 8 + LTEXT "&Tekli Çalma:", 1088, 20, 37, 53, 8 + COMBOBOX 1091, 96, 37, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&İkili Çalma:", 1089, 20, 57, 53, 8 + COMBOBOX 1092, 96, 55, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Üçlü Çalma:", 1090, 20, 76, 53, 8 + COMBOBOX 1093, 96, 73, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP +END + +IDD_DIAGNOSTICS DIALOGEX 0, 0, 238, 215 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Tanılama" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", 1042, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 18, 200, 58 + CONTROL "", 1041, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 84, 200, 58 + PUSHBUTTON "&Çevirge Sorgula", 1096, 138, 149, 75, 14 + AUTOCHECKBOX "&Bir Kayda Kaydet", 1020, 18, 187, 98, 10 + PUSHBUTTON "&Kaydı Göster", 1094, 138, 184, 75, 14, WS_DISABLED + GROUPBOX "Çevirge Bilgisi", 1047, 10, 6, 217, 164 + GROUPBOX "Kaydetme", -1, 10, 173, 217, 32 +END + +IDD_PLEASE_WAIT DIALOGEX 0, 0, 195, 72 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Lütfen Bekleyiniz..." +FONT 8, "MS Shell Dlg" +BEGIN + ICON 5100, -1, 9, 7, 20, 20 + LTEXT "Çevirgeyle iletişim kuruluyor. Birkaç sâniye sürebilir.", -1, 42, 7, 146, 28 + DEFPUSHBUTTON "İptal", 2, 72, 52, 50, 14 +END + +IDD_GENERAL_2 DIALOGEX 0, 0, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + AUTOCHECKBOX "&İşletmen Yardımlı (Elle) Çevirme", 1002, 19, 22, 150, 10 + AUTOCHECKBOX "&Şundan Daha Çok Boş Kalırsa Bir Arama Bağlantısını Kes", 1042, 19, 38, 143, 10 + EDITTEXT 1043, 168, 35, 25, 13, ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Ş&u İçinde Bağlanmamışsa Aramayı İptal Et", -1, 19, 56, 147, 10 + EDITTEXT 1040, 168, 54, 25, 13, ES_AUTOHSCROLL | ES_NUMBER + RTEXT "&Giriş Hızı:", 1034, 16, 102, 93, 8 + COMBOBOX 1036, 114, 100, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "&Veri İletişim Kâidesi:", 1032, 16, 122, 93, 8 + COMBOBOX 1037, 114, 119, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "&Sıkıştırma:", 1035, 16, 139, 93, 8 + COMBOBOX 1099, 114, 137, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "&Akış Denetimi:", 1027, 16, 157, 93, 8 + COMBOBOX 1031, 114, 155, 84, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + GROUPBOX "Arama Yeğlemeleri", 1060, 11, 7, 217, 66 + LTEXT "dakîka", 1044, 195, 38, 22, 8 + LTEXT "sâniye", 1041, 194, 56, 22, 8 + GROUPBOX "Veri Bağlantısı Yeğlemeleri", -1, 11, 82, 217, 94 +END + +IDD_ADVANCED_2 DIALOGEX 17, 12, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Gelişmiş" +FONT 8, "MS Shell Dlg" +BEGIN + AUTOCHECKBOX "&Çevirmeden Önce Uçbirim Penceresini Getir", 1000, 20, 21, 200, 10 + AUTOCHECKBOX "Ç&evirmeden Sonra Uçbirim Penceresini Getir", 1001, 20, 38, 200, 10 + RTEXT "&Veri Bitleri:", 1024, 18, 79, 93, 8 + COMBOBOX 1025, 114, 77, 106, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "E&şlik:", 1026, 18, 97, 93, 8 + COMBOBOX 1028, 114, 95, 106, 60, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "&Dur Bitleri:", 1029, 18, 115, 93, 8 + COMBOBOX 1030, 114, 113, 106, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + RTEXT "&Kipleme:", 1045, 18, 133, 93, 8 + COMBOBOX 1038, 114, 131, 106, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + GROUPBOX "Uçbirim Penceresi", 1004, 10, 7, 217, 49 + GROUPBOX "Donanım Ayarları", 1005, 10, 64, 217, 89 +END + +IDD_ISDN DIALOGEX 0, 0, 238, 210 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "ISDN" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "&Değiştirme Türü", -1, 11, 6, 217, 39 + COMBOBOX 1104, 17, 20, 204, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + GROUPBOX "&Birinci Numara", -1, 11, 50, 217, 50 + EDITTEXT 1017, 33, 62, 188, 13, ES_AUTOHSCROLL | ES_NUMBER + LTEXT "&SPID/EAZ:", 1027, 34, 83, 67, 8 + EDITTEXT 1107, 104, 79, 117, 13, ES_AUTOHSCROLL | ES_NUMBER + GROUPBOX "&İkinci Numara", -1, 11, 105, 217, 49 + EDITTEXT 1018, 33, 114, 189, 13, ES_AUTOHSCROLL | ES_NUMBER + LTEXT "S&PID/EAZ:", 1028, 35, 135, 68, 8 + EDITTEXT 1108, 105, 132, 117, 13, ES_AUTOHSCROLL | ES_NUMBER +END + +IDD_PLEASE_WAIT_2 DIALOGEX 0, 0, 195, 72 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Lütfen Bekleyiniz" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 5100, -1, 9, 7, 20, 20 + LTEXT "Çevirgeye ülke ya da bölge bilgisi gönderiliyor.", -1, 42, 7, 146, 28 +END + +IDD_WARNING DIALOGEX 0, 0, 360, 105 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Uyarı" +FONT 8, "MS Shell Dlg" +BEGIN + AUTOCHECKBOX "Bu İletiyi Bir Daha Gösterme", 1109, 17, 73, 118, 10 + DEFPUSHBUTTON "Tamam", 1, 302, 84, 50, 14 + LTEXT "Birtakım çevirgeler, bu uzunluktaki başlatma dizgilerini uygun yönetmez.", -1, 50, 27, 304, 8 + LTEXT "Bu kısıtlama üzerine bilgi, çevirgenizin üreticisinden alınabilir.", -1, 50, 41, 304, 8 + ICON 5100, -1, 15, 14, 20, 20 + LTEXT "57 damga uzunluğundan daha büyük bir çevirge başlatma dizgisi girdiniz.", -1, 50, 14, 304, 8 +END + +IDD_MODEMS DIALOGEX 0, 0, 252, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Çevirgeler" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 5100, 1057, 6, 7, 20, 20 + LTEXT "&Aşağıdaki çevirgeler kurulmuş:", -1, 44, 12, 203, 9 + CONTROL "", 113, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00000849, 7, 32, 238, 158, WS_EX_CLIENTEDGE + PUSHBUTTON "&Ekle...", 110, 56, 198, 60, 14 + PUSHBUTTON "&Kaldır", 112, 121, 198, 60, 14 + PUSHBUTTON "&Husûsiyetler", 109, 185, 198, 60, 14 +END + +IDD_PLEASE_WAIT_3 DIALOGEX 0, 0, 195, 72 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION +CAPTION "Lütfen Bekleyiniz..." +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Dur", 2, 74, 53, 50, 14 + ICON 5100, -1, 9, 7, 20, 20 + LTEXT "Kaldırılıyor", -1, 40, 8, 151, 8 + LTEXT "Çevirge", 1005, 40, 16, 151, 25 +END + +STRINGTABLE +BEGIN + 180 "RS-232 Dizilik Giriş" + 181 "Dış Çevirge" + 182 "İç Çevirge" + 183 "PCMCIA Çevirge" + 184 "Koşut Çevirge" + 185 "Koşut Giriş" + 200 "110" + 201 "1200" + 202 "2400" + 203 "4800" + 204 "9600" + 206 "19200" + 207 "38400" + 210 "115200" + 211 "57600" + 216 "300" + 220 "230400" + 221 "460800" + 222 "921600" + 240 "4" + 241 "5" + 242 "6" + 243 "7" + 244 "8" + 250 "Çift" + 251 "Tek" + 252 "Yok" + 253 "İm" + 254 "Boşluk" + 255 "1" + 256 "1.5" + 257 "2" + 260 "Açık / Kapalı" + 261 "Donanım" + 262 "Yok" + 263 "Açık" + 264 "Düşük" + 265 "V.23 (Minitel)" + 266 "Ölçünlü" + 267 "Ölçünsüz (Bell, HST)" + 270 "&Kayda Ekle" + 300 "Belirtilmemiş" + 301 "Veri" + 302 "Belgegeçer" + 303 "Ses" + 304 "Yok" + 320 "Ülke/bölge ayârı şimdikileştirilmiş." + 340 "Çevirge" + 341 "Çevirge Ayarları" + 342 "Çevirge Adresi" + 400 "Ülke ya da bölge ayârı şimdikileştirilmemiş." + 401 "Birtakım çevirgeler, 57 damgadan uzun kullanıcı başlatma komutlarını kabul etmez.\n\nBu kısıtlama üzerine bilgi, çevirgenizin üreticisinden alınabilir." + 402 "Uyarı" + 460 "Umûmî iletişim kutusunu görüntülemek için yeterli bellek yok.\nBirtakım kütükleri veyâ birtakım izlenceleri kapatınız, sonra yeniden deneyiniz." + 461 "Çevirge Ayarları iletişim kutusunu görüntülemek için yeterli bellek yok.\nBirtakım kütükleri veyâ birtakım izlenceleri kapatınız, sonra yeniden deneyiniz." + 463 "Her bir arama adresi, ""Kendiliğinden""e ya da eşsiz bir çalma türüne ayarlanmalıdır.\n\nKopya çalma türünü ayrı birisiyle değiştiriniz." + 465 "Ölçünlü EC" + 466 "Zorunlu EC" + 467 "Gözelik" + 468 "Edilgin" + 469 "Etkin" + 470 "Edilgin" + 480 "AUTO (1 Yol)" + 481 "AUTO (2 Yol)" + 482 "PPP (56 Kbit/sn)" + 483 "PPP (64 Kbit/sn)" + 484 "PPP (112 Kbit/sn)" + 485 "PPP (112 Kbit/sn, PAP)" + 486 "PPP (112 Kbit/sn, CHAP)" + 487 "PPP (112 Kbit/sn, MSCHAP)" + 488 "PPP (128 Kbit/sn)" + 489 "PPP (128 Kbit/sn, PAP)" + 490 "PPP (128 Kbit/sn, CHAP)" + 491 "PPP (128 Kbit/sn, MSCHAP)" + 500 "V.120 (64 Kbit/sn)" + 501 "V.120 (56 Kbit/sn)" + 502 "V.120 (112 Kbit/sn)" + 503 "V.120 (128 Kbit/sn)" + 504 "X.75 (64 Kbit/sn)" + 505 "X.75 (128 Kbit/sn)" + 506 "X.75 (T.70)" + 507 "X.75 (BTX)" + 508 "V.110 (1,2 Kbit/sn)" + 509 "V.110 (2,4 Kbit/sn)" + 510 "V.110 (4,8 Kbit/sn)" + 511 "V.110 (9,6 Kbit/sn)" + 512 "V.110 (12,0 Kbit/sn)" + 513 "V.110 (14,4 Kbit/sn)" + 514 "V.110 (19,2 Kbit/sn)" + 515 "V.110 (28,8 Kbit/sn)" + 516 "V.110 (38,4 Kbit/sn)" + 517 "V.110 (57,6 Kbit/sn)" + 518 "Analog (V.34/V.90)" + 550 "ESS5 (AT&T) (Kuzey Amerika)" + 551 "AT&T Noktadan Çok Noktaya" + 552 "Ulusluk ISDN 1 (NI-1)" + 553 "Northern Telecom DMS 100 (NT1)" + 554 "NTT INS64 (Japonya)" + 555 "Avrupa ISDN (DSS1)" + 556 "Alman Ulusluk (1TR6) (Seyrek kullanılır.)" + 557 "Fransız Ulusluk (VN3) (Seyrek kullanılır.)" + 558 "Belçika Ulusluk (Seyrek kullanılır.)" + 559 "Avusturalya Ulusluk (Seyrek kullanılır.)" + 560 "Bilinmeyen anahtar" + 570 "Bu çevirge için ISDN yapılandırması bitirilmemiş.\n\nLütfen bu çevirgeyi kullanmadan önce\nISDN sekmesinde bilgiyi doldurunuz." + 600 "PPP (56 Kbit/sn, GSM)" + 601 "PPP (64 Kbit/sn, GSM)" + 602 "V.120 (64 Kbit/sn, GSM)" + 604 "V.110 (1,2 Kbit/sn, GSM)" + 605 "V.110 (2,4 Kbit/sn, GSM)" + 606 "V.110 (4,8 Kbit/sn, GSM)" + 607 "V.110 (9,6 Kbit/sn, GSM)" + 608 "V.110 (12,0 Kbit/sn, GSM)" + 609 "V.110 (14,4 Kbit/sn, GSM)" + 610 "V.110 (19,2 Kbit/sn, GSM)" + 611 "V.110 (28,8 Kbit/sn, GSM)" + 612 "V.110 (38,4 Kbit/sn, GSM)" + 613 "V.110 (57,6 Kbit/sn, GSM)" + 614 "Analog RLP" + 615 "Analog NRLP" + 616 "GPRS" + 617 "PIAFS, gelen" + 618 "PIAFS, giden" + 700 "Şimdiki TAPI konumunu kullan." + 2006 "Şuraya Bağlı" + 2007 "Yok" + 2008 "Çalışır değil" + 2009 "Yeniden başlatma istiyor" + 2010 "#Çevirgenizin kurulumunu bitirmek için bilgisayarınızı yeniden başlatmalısınız.\n\nŞimdi bilgisayarınızı yeniden başlatmak istiyor musunuz?" + 2011 "Çevirge doğru kurulmamış" + 2012 "Bilinmeyen giriş" + 3000 "Çevirge Kur" + 3018 "Çevirgeler" + 3019 "Yeni bir çevirge kurar ve çevirge seçeneklerini değiştirir." + 3053 "Çevirgenin anık olmamasından dolayı çevirge seçenekleri görüntülenemiyor.\n\nDizgeyi yeniden başlatınız ve yeniden deneyiniz." + 3054 "Çevirgeler İçin Seçenekler" + 3060 "Dizgenizden seçili çevirgeyi ya da çevirgeleri kaldırmayı istemenizden emin misiniz?" + 3061 "ReactOS, ""%1"" çevirgesini ""%2""den kaldıramadı." + 3062 "Çevirge" + 3069 "Çevirge denetim masasını açmak için yeterli bellek yok.\n\nBirtakım izlenceleri kapayınız ve yeniden deneyiniz." + 3073 "Bir çevirge kurmak için bir dizge yöneticisi olmanız gerekir." + 3074 "Kurulmuş çevirge yok. Bir çevirge kurmak için bir dizge yöneticisi olmanız gerekir." + 3076 "Yeni ayarların etki etmesinden önce bilgisayarınızı kapatmalı ve yeniden başlatmalısınız.\n\nŞimdi bilgisayarınızı yeniden başlatmak istiyor musunuz?" + 3077 "Ağ Ayarlarını Değiştir" + 3200 "300 Baud" + 3201 "1200 Baud" + 3202 "2400 Baud" + 3203 "9600 Baud" + 3204 "19200 Baud" + 3205 "38400 Baud" + 3206 "57600 Baud" + 3207 "Yanıt yok" + 3212 "Komut" + 3213 "Yanıt" + 3214 "Çevirgenin bağlı olduğu giriş açılamadı. Bu, bir donanım çakışması sonucu olabilir. Tüm aygıtların çalışır olduğunu doğrulamak için aygıt yöneticisine bakınız." + 3215 "Çevirgenin kullanıyor olduğu giriş şimdilik başka bir uygulama eliyle açık. Şimdilik girişi kullanıyor olabilen bir uygulamadan çıkınız." + 3218 "OpenComm" + 3221 "115000 Baud" + 3222 "Şimdikileştiriliyor" + 3223 "Yanlışlık" + 3233 "Başarılı" + 3236 "Çevirge yanıt veremedi. Onun doğru bağlandığından ve açık olduğundan emin olunuz. O, bir iç çevirgeyse ya da bağlıysa giriş için kesmenin doğru ayarlandığını doğrulayınız." + 3237 "KOMUT DESTEKLENMİYOR" + 3238 "Alan" + 3239 "Değer" + 3240 " Ön Tanımlı Yeğlemeler" + 3241 " Bağlantı Yeğlemeleri" + 6144 "Japonya" + 6145 "Arnavutluk" + 6146 "Cezâyir" + 6147 "Amerikan Samoası" + 6148 "Almanya (Ülke ya da bölge kodu 04)" + 6149 "Anguilla" + 6150 "Antigua ve Barbuda" + 6151 "Arjantin" + 6152 "Ascension Adası" + 6153 "Avustralya" + 6154 "Avusturya" + 6155 "Bahamalar" + 6156 "Bahreyn" + 6157 "Bangladeş" + 6158 "Barbados" + 6159 "Belçika" + 6160 "Belize" + 6161 "Benin" + 6162 "Bermuda" + 6163 "Bhutan" + 6164 "Bolivya" + 6165 "Botsvana" + 6166 "Brezilya" + 6167 "Ülke ya da bölge kodu 23" + 6168 "Britanya Hint Ummanı Toprakları" + 6169 "Britanya Virjin Adaları" + 6170 "Brunei" + 6171 "Bulgaristan" + 6172 "Myanmar" + 6173 "Burundi" + 6174 "Ak Rusya" + 6175 "Kamerun" + 6176 "Kanada" + 6177 "Yeşil Burun Adaları" + 6178 "Cayman Adaları" + 6179 "Orta Afrika Cumhûriyeti" + 6180 "Çad" + 6181 "Şili" + 6182 "Çin" + 6183 "Kolombiya" + 6184 "Komorlar" + 6185 "Kongo" + 6186 "Cook Adaları" + 6187 "Kosta Rika" + 6188 "Küba" + 6189 "Kıbrıs" + 6190 "Çek Cumhûriyeti" + 6191 "Kamboçya" + 6192 "Kuzey Kore" + 6193 "Danimarka" + 6194 "Cibuti" + 6195 "Dominik Cumhûriyeti" + 6196 "Dominika" + 6197 "Ekvador" + 6198 "Mısır" + 6199 "El Salvador" + 6200 "Ekvator Ginesi" + 6201 "Habeşistan" + 6202 "Falkland Adaları" + 6203 "Fiji Adaları" + 6204 "Finlandiya" + 6205 "Fransa" + 6206 "Fransız Polinezyası" + 6207 "Ülke ya da bölge kodu 63" + 6208 "Gabon" + 6209 "Gambiya" + 6210 "Almanya (Ülke ya da bölge kodu 66)" + 6211 "Angola" + 6212 "Gana" + 6213 "Cebelitârık" + 6214 "Yunanistan" + 6215 "Grenada" + 6216 "Guam" + 6217 "Guatemala" + 6218 "Guernsey" + 6219 "Gine" + 6220 "Gine-Bissau" + 6221 "Guyana" + 6222 "Haiti" + 6223 "Honduras" + 6224 "Hong Kong" + 6225 "Macaristan" + 6226 "İzlanda" + 6227 "Hindistan" + 6228 "Endonezya" + 6229 "Îran" + 6230 "Îrak" + 6231 "İrlanda" + 6232 "İsrâil" + 6233 "İtalya" + 6234 "Fildişi Kıyısı" + 6235 "Jamaika" + 6236 "Afganistan" + 6237 "Jersey" + 6238 "Ürdün" + 6239 "Kenya" + 6240 "Kiribati" + 6241 "Kore" + 6242 "Kuveyt" + 6243 "Laos" + 6244 "Lübnan" + 6245 "Lesotho" + 6246 "Liberya" + 6247 "Libya" + 6248 "Lihtenştayn" + 6249 "Lüksemburg" + 6250 "Makao" + 6251 "Madagaskar" + 6252 "Malezya" + 6253 "Malavi" + 6254 "Maldivler" + 6255 "Mali" + 6256 "Malta" + 6257 "Moritanya" + 6258 "Mauritius" + 6259 "Meksika" + 6260 "Monako" + 6261 "Moğolistan" + 6262 "Montserrat" + 6263 "Fas" + 6264 "Mozambik" + 6265 "Nauru" + 6266 "Nepal" + 6267 "Hollanda" + 6268 "Hollanda Antilleri" + 6269 "Yeni Kaledonya" + 6270 "Yeni Zelanda" + 6271 "Nikaragua" + 6272 "Nijer" + 6273 "Nijerya" + 6274 "Norveç" + 6275 "Umman" + 6276 "Pâkistan" + 6277 "Panama" + 6278 "Papua Yeni Gine" + 6279 "Paraguay" + 6280 "Peru" + 6281 "Filipinler" + 6282 "Polonya" + 6283 "Portekiz" + 6284 "Porto Riko" + 6285 "Katar" + 6286 "Romanya" + 6287 "Ruanda" + 6288 "Saint Kitts ve Nevis" + 6289 "Ülke ya da bölge kodu 145" + 6290 "Saint Helena" + 6291 "Saint Lucia" + 6292 "San Marino" + 6293 "Ülke ya da bölge kodu 148" + 6294 "Sao Tome ve Principe" + 6295 "Saint Vincent ve Grenadinler" + 6296 "Suudi Arabistan" + 6297 "Senegal" + 6298 "Seyşeller" + 6299 "Sierra Leone" + 6300 "Singapur" + 6301 "Solomon Adaları" + 6302 "Somali" + 6303 "Güney Afrika" + 6304 "İspanya" + 6305 "Sri Lanka" + 6306 "Sûdan" + 6307 "Surinam" + 6308 "Svaziland" + 6309 "İsveç" + 6310 "İsviçre" + 6311 "Sûriye" + 6312 "Tanzanya" + 6313 "Tayland" + 6314 "Togo" + 6315 "Tonga" + 6316 "Trinidad ve Tobago" + 6317 "Tunus" + 6318 "Türkiye" + 6319 "Turks ve Caicos Adaları" + 6320 "Tuvalu" + 6321 "Uganda" + 6322 "Ukrayna" + 6323 "Birleşik Arap Beylikleri" + 6324 "Birleşik Krallık" + 6325 "Amerika Birleşik Devletleri" + 6326 "Burkina Faso" + 6327 "Uruguay" + 6328 "Ülke ya da bölge kodu 184" + 6329 "Vanuatu" + 6330 "Vatikan" + 6331 "Venezuela" + 6332 "Vietnam" + 6333 "Vallis ve Futuna" + 6334 "Samoa" + 6335 "Yemen" + 6336 "Yemen" + 6337 "Ülke ya da bölge kodu 193" + 6338 "El Erklik Kongo Cumhûriyeti" + 6339 "Zambiya" + 6340 "Zimbabve" + 6501 "Moldova" + 6502 "Estonya" + 6503 "Litvanya" + 6504 "Ermenistan" + 6505 "Gürcistan" + 6506 "Azerbaycan" + 6507 "Türkmenistan" + 6508 "Özbekistan" + 6509 "Kazakistan" + 6510 "Tâcikistan" + 6511 "Kırgızistan" + 6512 "Letonya" + 6513 "Rusya" + 6600 "Hırvatistan" + 6601 "Slovenya" + 6602 "Makedonya (MEYC)" + 6603 "Bosna-Hersek" + 6604 "Yugoslavya" + 20013 "Donanım Kimliği" +END diff --git a/dll/win32/modemui/modemui.rc b/dll/win32/modemui/modemui.rc index 6d131b3a6b8..1c90d77abba 100644 --- a/dll/win32/modemui/modemui.rc +++ b/dll/win32/modemui/modemui.rc @@ -39,11 +39,14 @@ IDI_703 ICON "res/703.ico" #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif -#ifdef LANGUAGE_RU_RU - #include "lang/ru-RU.rc" +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" #endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" diff --git a/dll/win32/mpr/lang/mpr_Tr.rc b/dll/win32/mpr/lang/mpr_Tr.rc index 2120d287057..652e94c8b55 100644 --- a/dll/win32/mpr/lang/mpr_Tr.rc +++ b/dll/win32/mpr/lang/mpr_Tr.rc @@ -1,7 +1,7 @@ /* * MPR dll resources for Turkish * - * Copyright (C) 2006 Fatih Aşıcı + * Copyrights: 2006 Fatih Aşıcı; 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,19 +27,19 @@ STRINGTABLE IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ağ Parolanızı Girin" +CAPTION "Ağ Şifresini Giriniz" FONT 8, "MS Shell Dlg" { - LTEXT "Lütfen kullanıcı adınızı ve parolanızı girin:", IDC_EXPLAIN, 40, 6, 150, 15 - LTEXT "Proxy", -1, 40, 26, 50, 10 -/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "Lütfen kullanıcı adınızı ve şifrenizi giriniz:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Vekil", -1, 40, 26, 50, 10 +/* LTEXT "Erişim Alanı", -1, 40, 46, 50, 10 */ LTEXT "Kullanıcı", -1, 40, 66, 50, 10 - LTEXT "Parola", -1, 40, 86, 50, 10 + LTEXT "Şifre", -1, 40, 86, 50, 10 LTEXT "", IDC_PROXY, 80, 26, 150, 14, 0 LTEXT "", IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "Bu parolayı &sakla (Güvensiz)", IDC_SAVEPASSWORD, + CHECKBOX "&Bu Şifreyi Kaydet (Güvensiz)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "Tamam", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "İptal", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/msacm32/lang/msacm_Tr.rc b/dll/win32/msacm32/lang/msacm_Tr.rc index 8f6fd760cc6..510fa9db142 100644 --- a/dll/win32/msacm32/lang/msacm_Tr.rc +++ b/dll/win32/msacm32/lang/msacm_Tr.rc @@ -1,7 +1,7 @@ /* * Turkish resource file for MS ACM * - * Copyright 2006 Fatih Aşıcı + * Copyrights: 2006 Fatih Aşıcı; 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT DLG_ACMFORMATCHOOSE_ID DIALOG 10, 20, 225, 100 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Ses Seçimi" +CAPTION "Ses Seçme" FONT 8, "MS Shell Dlg" BEGIN @@ -31,7 +31,7 @@ BEGIN COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Farklı Kaydet...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14 + PUSHBUTTON "Ay&rı Kaydet...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14 PUSHBUTTON "&Kaldır", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14 LTEXT "&Biçim:", -1, 5, 41, 44, 8, NOT WS_GROUP @@ -39,7 +39,7 @@ BEGIN COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "&Öznitelikler:", -1, 5, 59, 44, 8, NOT WS_GROUP + LTEXT "&Öz Nitelikler:", -1, 5, 59, 44, 8, NOT WS_GROUP COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP diff --git a/dll/win32/mscoree/corruntimehost.c b/dll/win32/mscoree/corruntimehost.c index 983af008a26..ea2e2142320 100644 --- a/dll/win32/mscoree/corruntimehost.c +++ b/dll/win32/mscoree/corruntimehost.c @@ -1205,6 +1205,7 @@ HRESULT RuntimeHost_Destroy(RuntimeHost *This) } #define CHARS_IN_GUID 39 +#undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) diff --git a/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt index 012cd047b88..4fea5a1aaf0 100644 --- a/dll/win32/mshtml/CMakeLists.txt +++ b/dll/win32/mshtml/CMakeLists.txt @@ -106,6 +106,11 @@ set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS "${mshtml_rc_deps} set_module_type(mshtml win32dll) target_link_libraries(mshtml uuid wine strmiids oldnames) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(mshtml mingwex) +endif() + add_delay_importlibs(mshtml wininet) add_importlibs(mshtml urlmon shlwapi shell32 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32 ntdll) add_dependencies(mshtml mshtml_nsiface_header) diff --git a/dll/win32/mshtml/lang/Ru.rc b/dll/win32/mshtml/lang/Ru.rc index e40006c451d..675b40735ca 100644 --- a/dll/win32/mshtml/lang/Ru.rc +++ b/dll/win32/mshtml/lang/Ru.rc @@ -23,8 +23,8 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE { - IDS_STATUS_DONE "Done" - IDS_STATUS_DOWNLOADINGFROM "Downloading from %s..." + IDS_STATUS_DONE "Готово" + IDS_STATUS_DOWNLOADINGFROM "Скачивание с %s..." } STRINGTABLE diff --git a/dll/win32/msi/msi_Tr.rc b/dll/win32/msi/msi_Tr.rc index 8e91ebebac9..ddd2466f728 100644 --- a/dll/win32/msi/msi_Tr.rc +++ b/dll/win32/msi/msi_Tr.rc @@ -1,7 +1,7 @@ /* * Turkish resources for MSI * - * Copyright 2006 Fatih Aşıcı + * Copyrights: 2006 Fatih Aşıcı; 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,13 +24,13 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT STRINGTABLE { - 4 "The specified installation package could not be opened. Please check the file path and try again." - 5 "%s yolu bulunamadı" - 9 "%s nolu diski yerleştirin" - 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" - 11 "%s öğesini içeren dizini girin" - 12 "eksik özellik için kurulum kaynağı" - 13 "eksik özellik için ağ sürücüsü" - 14 "özellik buradan:" - 15 "%s öğesini içeren dizini seçin" + 4 "Belirtilen kurulum paketi açılamadı. Lütfen, kütüğün yolunu denetleyiniz ve yeiden deneyiniz." + 5 "%s yolu bulunamadı." + 9 "%s diskini takınız." + 10 "Windows Yükleyici %s\n\nKullanım:\nmsiexec komut {gerekli değişkenler} [seçimlik değişkenler]\n\nBir ürün yükle:\n\t/i {paket|ürün kodu} [husûsiyet]\n\t/package {paket|ürün kodu} [husûsiyet]\n\t/a paket [husûsiyet]\nBir kurulum onar:\n\t/f[p|o|e|d|c|a|u|m|s|v] {paket|ürün kodu}\nBir ürün kaldır:\n\t/uninstall {paket|ürün kodu} [husûsiyet]\n\t/x {paket|ürün kodu} [husûsiyet]\nBir ürün bildir:\n\t/j[u|m] paket [/t dönüşüm] [/g dil kimliği]\nBir yama uygula:\n\t/p yama paketi [husûsiyet]\n\t/p yama paketi /a paket [husûsiyet]\nYukarıdaki komutlar için kayıt ve kullanıcı arayüzü tümleyicileri:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] kayıt kütüğü\n\t/q{|n|b|r|f|n+|b+|b-}\nMSI hizmetini kaydet:\n\t/y\nMSI hizmetinin kaydını sil:\n\t/z\nBu yardımı görüntüle:\n\t/help\n\t/?\n" + 11 "%s içeren dizini giriniz." + 12 "Husûsiyet eksikliği için kurulum kaynağı" + 13 "Husûsiyet eksikliği için ağ sürücüsü" + 14 "Şuradan özellik:" + 15 "%s içeren dizini seçiniz." } diff --git a/dll/win32/msports/lang/ru-RU.rc b/dll/win32/msports/lang/ru-RU.rc new file mode 100644 index 00000000000..84c7862beae --- /dev/null +++ b/dll/win32/msports/lang/ru-RU.rc @@ -0,0 +1,29 @@ +/* Russian translation by Kudratov Olimjon (olim98@bk.ru) */ +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +IDD_SERIALSETTINGS DIALOGEX 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Параметры порта" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "&Бит в секунду:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "Б&иты данных:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Четность:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "С&топовые биты:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Управление потоком:", -1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "До&полнительно...", IDC_SERIAL_ADVANCED, 111, 130, 65, 14, WS_GROUP + PUSHBUTTON "&Восстановить умолчания", IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END + +IDD_PARALLELSETTINGS DIALOGEX 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Параметры порта" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "TEST", -1, 74, 19, 62, 8, WS_GROUP +END diff --git a/dll/win32/msports/lang/tr-TR.rc b/dll/win32/msports/lang/tr-TR.rc new file mode 100644 index 00000000000..c1eedc9dee7 --- /dev/null +++ b/dll/win32/msports/lang/tr-TR.rc @@ -0,0 +1,30 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_SERIALSETTINGS DIALOGEX 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Giriş Ayarları" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "&Sâniyedeki Bit Sayısı:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Veri Bitleri:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Eşlik:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Dur Bitleri:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Akış Denetimi:", -1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "&Gelişmiş...", IDC_SERIAL_ADVANCED, 111, 130, 65, 14, WS_GROUP + PUSHBUTTON "&Ön Tanımlıları Geri Getir", IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END + +IDD_PARALLELSETTINGS DIALOGEX 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Giriş Ayarları" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "DENEME", -1, 74, 19, 62, 8, WS_GROUP +END diff --git a/dll/win32/msports/msports.rc b/dll/win32/msports/msports.rc index 6bb9da1e629..09156ed4819 100644 --- a/dll/win32/msports/msports.rc +++ b/dll/win32/msports/msports.rc @@ -30,9 +30,15 @@ #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/win32/netapi32/user.c b/dll/win32/netapi32/user.c index 0abfc0d73ab..8bbe930576a 100644 --- a/dll/win32/netapi32/user.c +++ b/dll/win32/netapi32/user.c @@ -451,166 +451,84 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, case 1: Size = sizeof(USER_INFO_1) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectory.Length > 0) - Size += UserInfo->HomeDirectory.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->ScriptPath.Length > 0) - Size += UserInfo->ScriptPath.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->ScriptPath.Length + sizeof(WCHAR); break; case 2: Size = sizeof(USER_INFO_2) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectory.Length > 0) - Size += UserInfo->HomeDirectory.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->ScriptPath.Length > 0) - Size += UserInfo->ScriptPath.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->UserComment.Length > 0) - Size += UserInfo->UserComment.Length + sizeof(WCHAR); - - if (UserInfo->Parameters.Length > 0) - Size += UserInfo->Parameters.Length + sizeof(WCHAR); - - if (UserInfo->WorkStations.Length > 0) - Size += UserInfo->WorkStations.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->ScriptPath.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->UserComment.Length + sizeof(WCHAR) + + UserInfo->Parameters.Length + sizeof(WCHAR) + + UserInfo->WorkStations.Length + sizeof(WCHAR) + + LogonServer.Length + sizeof(WCHAR); if (UserInfo->LogonHours.UnitsPerWeek > 0) Size += (((ULONG)UserInfo->LogonHours.UnitsPerWeek) + 7) / 8; - - if (LogonServer.Length > 0) - Size += LogonServer.Length + sizeof(WCHAR); break; case 3: Size = sizeof(USER_INFO_3) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectory.Length > 0) - Size += UserInfo->HomeDirectory.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->ScriptPath.Length > 0) - Size += UserInfo->ScriptPath.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->UserComment.Length > 0) - Size += UserInfo->UserComment.Length + sizeof(WCHAR); - - if (UserInfo->Parameters.Length > 0) - Size += UserInfo->Parameters.Length + sizeof(WCHAR); - - if (UserInfo->WorkStations.Length > 0) - Size += UserInfo->WorkStations.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->ScriptPath.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->UserComment.Length + sizeof(WCHAR) + + UserInfo->Parameters.Length + sizeof(WCHAR) + + UserInfo->WorkStations.Length + sizeof(WCHAR) + + LogonServer.Length + sizeof(WCHAR) + + UserInfo->ProfilePath.Length + sizeof(WCHAR) + + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR); if (UserInfo->LogonHours.UnitsPerWeek > 0) Size += (((ULONG)UserInfo->LogonHours.UnitsPerWeek) + 7) / 8; - - if (LogonServer.Length > 0) - Size += LogonServer.Length + sizeof(WCHAR); - - if (UserInfo->ProfilePath.Length > 0) - Size += UserInfo->ProfilePath.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectoryDrive.Length > 0) - Size += UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR); break; case 4: Size = sizeof(USER_INFO_4) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectory.Length > 0) - Size += UserInfo->HomeDirectory.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->ScriptPath.Length > 0) - Size += UserInfo->ScriptPath.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->UserComment.Length > 0) - Size += UserInfo->UserComment.Length + sizeof(WCHAR); - - if (UserInfo->Parameters.Length > 0) - Size += UserInfo->Parameters.Length + sizeof(WCHAR); - - if (UserInfo->WorkStations.Length > 0) - Size += UserInfo->WorkStations.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->ScriptPath.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->UserComment.Length + sizeof(WCHAR) + + UserInfo->Parameters.Length + sizeof(WCHAR) + + UserInfo->WorkStations.Length + sizeof(WCHAR) + + LogonServer.Length + sizeof(WCHAR) + + UserInfo->ProfilePath.Length + sizeof(WCHAR) + + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR); if (UserInfo->LogonHours.UnitsPerWeek > 0) Size += (((ULONG)UserInfo->LogonHours.UnitsPerWeek) + 7) / 8; - if (LogonServer.Length > 0) - Size += LogonServer.Length + sizeof(WCHAR); - /* FIXME: usri4_user_sid */ - - if (UserInfo->ProfilePath.Length > 0) - Size += UserInfo->ProfilePath.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectoryDrive.Length > 0) - Size += UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR); break; case 10: Size = sizeof(USER_INFO_10) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->UserComment.Length > 0) - Size += UserInfo->UserComment.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->UserComment.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR); break; case 11: Size = sizeof(USER_INFO_11) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); - - if (UserInfo->UserComment.Length > 0) - Size += UserInfo->UserComment.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->HomeDirectory.Length > 0) - Size += UserInfo->HomeDirectory.Length + sizeof(WCHAR); - - if (UserInfo->Parameters.Length > 0) - Size += UserInfo->Parameters.Length + sizeof(WCHAR); - - if (LogonServer.Length > 0) - Size += LogonServer.Length + sizeof(WCHAR); - - if (UserInfo->WorkStations.Length > 0) - Size += UserInfo->WorkStations.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR) + + UserInfo->UserComment.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->HomeDirectory.Length + sizeof(WCHAR) + + UserInfo->Parameters.Length + sizeof(WCHAR) + + LogonServer.Length + sizeof(WCHAR) + + UserInfo->WorkStations.Length + sizeof(WCHAR); if (UserInfo->LogonHours.UnitsPerWeek > 0) Size += (((ULONG)UserInfo->LogonHours.UnitsPerWeek) + 7) / 8; @@ -618,24 +536,16 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, case 20: Size = sizeof(USER_INFO_20) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR); break; case 23: Size = sizeof(USER_INFO_23) + - UserInfo->UserName.Length + sizeof(WCHAR); - - if (UserInfo->FullName.Length > 0) - Size += UserInfo->FullName.Length + sizeof(WCHAR); - - if (UserInfo->AdminComment.Length > 0) - Size += UserInfo->AdminComment.Length + sizeof(WCHAR); + UserInfo->UserName.Length + sizeof(WCHAR) + + UserInfo->FullName.Length + sizeof(WCHAR) + + UserInfo->AdminComment.Length + sizeof(WCHAR); /* FIXME: usri23_user_sid */ break; @@ -657,6 +567,7 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo0 = (PUSER_INFO_0)LocalBuffer; Ptr = (LPWSTR)((ULONG_PTR)UserInfo0 + sizeof(USER_INFO_0)); + UserInfo0->usri0_name = Ptr; memcpy(UserInfo0->usri0_name, @@ -680,47 +591,32 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); UserInfo1->usri1_password = NULL; - UserInfo1->usri1_password_age = GetPasswordAge(&UserInfo->PasswordLastSet); - /* FIXME: UserInfo1->usri1_priv */ + /* FIXME: usri1_priv */ - if (UserInfo->HomeDirectory.Length > 0) - { - UserInfo1->usri1_home_dir = Ptr; + UserInfo1->usri1_home_dir = Ptr; + memcpy(UserInfo1->usri1_home_dir, + UserInfo->HomeDirectory.Buffer, + UserInfo->HomeDirectory.Length); + UserInfo1->usri1_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - memcpy(UserInfo1->usri1_home_dir, - UserInfo->HomeDirectory.Buffer, - UserInfo->HomeDirectory.Length); - UserInfo1->usri1_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo1->usri1_comment = Ptr; - - memcpy(UserInfo1->usri1_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo1->usri1_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo1->usri1_comment = Ptr; + memcpy(UserInfo1->usri1_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo1->usri1_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo1->usri1_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); - if (UserInfo->ScriptPath.Length > 0) - { - UserInfo1->usri1_script_path = Ptr; - - memcpy(UserInfo1->usri1_script_path, - UserInfo->ScriptPath.Buffer, - UserInfo->ScriptPath.Length); - UserInfo1->usri1_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; - } + UserInfo1->usri1_script_path = Ptr; + memcpy(UserInfo1->usri1_script_path, + UserInfo->ScriptPath.Buffer, + UserInfo->ScriptPath.Length); + UserInfo1->usri1_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; break; case 2: @@ -737,98 +633,64 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); + UserInfo2->usri2_password = NULL; UserInfo2->usri2_password_age = GetPasswordAge(&UserInfo->PasswordLastSet); /* FIXME: usri2_priv */ - if (UserInfo->HomeDirectory.Length > 0) - { - UserInfo2->usri2_home_dir = Ptr; + UserInfo2->usri2_home_dir = Ptr; + memcpy(UserInfo2->usri2_home_dir, + UserInfo->HomeDirectory.Buffer, + UserInfo->HomeDirectory.Length); + UserInfo2->usri2_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - memcpy(UserInfo2->usri2_home_dir, - UserInfo->HomeDirectory.Buffer, - UserInfo->HomeDirectory.Length); - UserInfo2->usri2_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo2->usri2_comment = Ptr; - - memcpy(UserInfo2->usri2_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo2->usri2_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo2->usri2_comment = Ptr; + memcpy(UserInfo2->usri2_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo2->usri2_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo2->usri2_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); - if (UserInfo->ScriptPath.Length > 0) - { - UserInfo2->usri2_script_path = Ptr; - - memcpy(UserInfo2->usri2_script_path, - UserInfo->ScriptPath.Buffer, - UserInfo->ScriptPath.Length); - UserInfo2->usri2_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); - } + UserInfo2->usri2_script_path = Ptr; + memcpy(UserInfo2->usri2_script_path, + UserInfo->ScriptPath.Buffer, + UserInfo->ScriptPath.Length); + UserInfo2->usri2_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); /* FIXME: usri2_auth_flags */ - if (UserInfo->FullName.Length > 0) - { - UserInfo2->usri2_full_name = Ptr; + UserInfo2->usri2_full_name = Ptr; + memcpy(UserInfo2->usri2_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo2->usri2_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - memcpy(UserInfo2->usri2_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo2->usri2_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + UserInfo2->usri2_usr_comment = Ptr; + memcpy(UserInfo2->usri2_usr_comment, + UserInfo->UserComment.Buffer, + UserInfo->UserComment.Length); + UserInfo2->usri2_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } + UserInfo2->usri2_parms = Ptr; + memcpy(UserInfo2->usri2_parms, + UserInfo->Parameters.Buffer, + UserInfo->Parameters.Length); + UserInfo2->usri2_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - if (UserInfo->UserComment.Length > 0) - { - UserInfo2->usri2_usr_comment = Ptr; - - memcpy(UserInfo2->usri2_usr_comment, - UserInfo->UserComment.Buffer, - UserInfo->UserComment.Length); - UserInfo2->usri2_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->Parameters.Length > 0) - { - UserInfo2->usri2_parms = Ptr; - - memcpy(UserInfo2->usri2_parms, - UserInfo->Parameters.Buffer, - UserInfo->Parameters.Length); - UserInfo2->usri2_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - } - - if (UserInfo->WorkStations.Length > 0) - { - UserInfo2->usri2_workstations = Ptr; - - memcpy(UserInfo2->usri2_workstations, - UserInfo->WorkStations.Buffer, - UserInfo->WorkStations.Length); - UserInfo2->usri2_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); - } + UserInfo2->usri2_workstations = Ptr; + memcpy(UserInfo2->usri2_workstations, + UserInfo->WorkStations.Buffer, + UserInfo->WorkStations.Length); + UserInfo2->usri2_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); RtlTimeToSecondsSince1970(&UserInfo->LastLogon, &UserInfo2->usri2_last_logon); @@ -856,17 +718,12 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo2->usri2_bad_pw_count = UserInfo->BadPasswordCount; UserInfo2->usri2_num_logons = UserInfo->LogonCount; - if (LogonServer.Length > 0) - { - UserInfo2->usri2_logon_server = Ptr; - - memcpy(UserInfo2->usri2_logon_server, - LogonServer.Buffer, - LogonServer.Length); - UserInfo2->usri2_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); - } + UserInfo2->usri2_logon_server = Ptr; + memcpy(UserInfo2->usri2_logon_server, + LogonServer.Buffer, + LogonServer.Length); + UserInfo2->usri2_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); UserInfo2->usri2_country_code = UserInfo->CountryCode; UserInfo2->usri2_code_page = UserInfo->CodePage; @@ -886,98 +743,64 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); + UserInfo3->usri3_password = NULL; UserInfo3->usri3_password_age = GetPasswordAge(&UserInfo->PasswordLastSet); /* FIXME: usri3_priv */ - if (UserInfo->HomeDirectory.Length > 0) - { - UserInfo3->usri3_home_dir = Ptr; + UserInfo3->usri3_home_dir = Ptr; + memcpy(UserInfo3->usri3_home_dir, + UserInfo->HomeDirectory.Buffer, + UserInfo->HomeDirectory.Length); + UserInfo3->usri3_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - memcpy(UserInfo3->usri3_home_dir, - UserInfo->HomeDirectory.Buffer, - UserInfo->HomeDirectory.Length); - UserInfo3->usri3_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo3->usri3_comment = Ptr; - - memcpy(UserInfo3->usri3_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo3->usri3_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_comment = Ptr; + memcpy(UserInfo3->usri3_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo3->usri3_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo3->usri3_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); - if (UserInfo->ScriptPath.Length > 0) - { - UserInfo3->usri3_script_path = Ptr; - - memcpy(UserInfo3->usri3_script_path, - UserInfo->ScriptPath.Buffer, - UserInfo->ScriptPath.Length); - UserInfo3->usri3_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_script_path = Ptr; + memcpy(UserInfo3->usri3_script_path, + UserInfo->ScriptPath.Buffer, + UserInfo->ScriptPath.Length); + UserInfo3->usri3_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); /* FIXME: usri3_auth_flags */ - if (UserInfo->FullName.Length > 0) - { - UserInfo3->usri3_full_name = Ptr; + UserInfo3->usri3_full_name = Ptr; + memcpy(UserInfo3->usri3_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo3->usri3_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - memcpy(UserInfo3->usri3_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo3->usri3_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + UserInfo3->usri3_usr_comment = Ptr; + memcpy(UserInfo3->usri3_usr_comment, + UserInfo->UserComment.Buffer, + UserInfo->UserComment.Length); + UserInfo3->usri3_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_parms = Ptr; + memcpy(UserInfo3->usri3_parms, + UserInfo->Parameters.Buffer, + UserInfo->Parameters.Length); + UserInfo3->usri3_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - if (UserInfo->UserComment.Length > 0) - { - UserInfo3->usri3_usr_comment = Ptr; - - memcpy(UserInfo3->usri3_usr_comment, - UserInfo->UserComment.Buffer, - UserInfo->UserComment.Length); - UserInfo3->usri3_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->Parameters.Length > 0) - { - UserInfo3->usri3_parms = Ptr; - - memcpy(UserInfo3->usri3_parms, - UserInfo->Parameters.Buffer, - UserInfo->Parameters.Length); - UserInfo3->usri3_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - } - - if (UserInfo->WorkStations.Length > 0) - { - UserInfo3->usri3_workstations = Ptr; - - memcpy(UserInfo3->usri3_workstations, - UserInfo->WorkStations.Buffer, - UserInfo->WorkStations.Length); - UserInfo3->usri3_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_workstations = Ptr; + memcpy(UserInfo3->usri3_workstations, + UserInfo->WorkStations.Buffer, + UserInfo->WorkStations.Length); + UserInfo3->usri3_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); RtlTimeToSecondsSince1970(&UserInfo->LastLogon, &UserInfo3->usri3_last_logon); @@ -1005,46 +828,31 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo3->usri3_bad_pw_count = UserInfo->BadPasswordCount; UserInfo3->usri3_num_logons = UserInfo->LogonCount; - if (LogonServer.Length > 0) - { - UserInfo3->usri3_logon_server = Ptr; - - memcpy(UserInfo3->usri3_logon_server, - LogonServer.Buffer, - LogonServer.Length); - UserInfo3->usri3_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_logon_server = Ptr; + memcpy(UserInfo3->usri3_logon_server, + LogonServer.Buffer, + LogonServer.Length); + UserInfo3->usri3_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); UserInfo3->usri3_country_code = UserInfo->CountryCode; UserInfo3->usri3_code_page = UserInfo->CodePage; UserInfo3->usri3_user_id = RelativeId; UserInfo3->usri3_primary_group_id = UserInfo->PrimaryGroupId; - if (UserInfo->ProfilePath.Length > 0) - { - UserInfo3->usri3_profile = Ptr; + UserInfo3->usri3_profile = Ptr; + memcpy(UserInfo3->usri3_profile, + UserInfo->ProfilePath.Buffer, + UserInfo->ProfilePath.Length); + UserInfo3->usri3_profile[UserInfo->ProfilePath.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ProfilePath.Length + sizeof(WCHAR)); - memcpy(UserInfo3->usri3_profile, - UserInfo->ProfilePath.Buffer, - UserInfo->ProfilePath.Length); - UserInfo3->usri3_profile[UserInfo->ProfilePath.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ProfilePath.Length + sizeof(WCHAR)); - } - - if (UserInfo->HomeDirectoryDrive.Length > 0) - { - UserInfo3->usri3_home_dir_drive = Ptr; - - memcpy(UserInfo3->usri3_home_dir_drive, - UserInfo->HomeDirectoryDrive.Buffer, - UserInfo->HomeDirectoryDrive.Length); - UserInfo3->usri3_home_dir_drive[UserInfo->HomeDirectoryDrive.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR)); - } + UserInfo3->usri3_home_dir_drive = Ptr; + memcpy(UserInfo3->usri3_home_dir_drive, + UserInfo->HomeDirectoryDrive.Buffer, + UserInfo->HomeDirectoryDrive.Length); + UserInfo3->usri3_home_dir_drive[UserInfo->HomeDirectoryDrive.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR)); UserInfo3->usri3_password_expired = (UserInfo->UserAccountControl & USER_PASSWORD_EXPIRED); break; @@ -1068,94 +876,59 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, /* FIXME: usri4_priv */ - if (UserInfo->HomeDirectory.Length > 0) - { - UserInfo4->usri4_home_dir = Ptr; + UserInfo4->usri4_home_dir = Ptr; + memcpy(UserInfo4->usri4_home_dir, + UserInfo->HomeDirectory.Buffer, + UserInfo->HomeDirectory.Length); + UserInfo4->usri4_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - memcpy(UserInfo4->usri4_home_dir, - UserInfo->HomeDirectory.Buffer, - UserInfo->HomeDirectory.Length); - UserInfo4->usri4_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo4->usri4_comment = Ptr; - - memcpy(UserInfo4->usri4_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo4->usri4_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_comment = Ptr; + memcpy(UserInfo4->usri4_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo4->usri4_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo4->usri4_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); - if (UserInfo->ScriptPath.Length > 0) - { - UserInfo4->usri4_script_path = Ptr; - - memcpy(UserInfo4->usri4_script_path, - UserInfo->ScriptPath.Buffer, - UserInfo->ScriptPath.Length); - UserInfo4->usri4_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_script_path = Ptr; + memcpy(UserInfo4->usri4_script_path, + UserInfo->ScriptPath.Buffer, + UserInfo->ScriptPath.Length); + UserInfo4->usri4_script_path[UserInfo->ScriptPath.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ScriptPath.Length + sizeof(WCHAR)); /* FIXME: usri4_auth_flags */ - if (UserInfo->FullName.Length > 0) - { - UserInfo4->usri4_full_name = Ptr; + UserInfo4->usri4_full_name = Ptr; + memcpy(UserInfo4->usri4_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo4->usri4_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - memcpy(UserInfo4->usri4_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo4->usri4_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + UserInfo4->usri4_usr_comment = Ptr; + memcpy(UserInfo4->usri4_usr_comment, + UserInfo->UserComment.Buffer, + UserInfo->UserComment.Length); + UserInfo4->usri4_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_parms = Ptr; + memcpy(UserInfo4->usri4_parms, + UserInfo->Parameters.Buffer, + UserInfo->Parameters.Length); + UserInfo4->usri4_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - if (UserInfo->UserComment.Length > 0) - { - UserInfo4->usri4_usr_comment = Ptr; - - memcpy(UserInfo4->usri4_usr_comment, - UserInfo->UserComment.Buffer, - UserInfo->UserComment.Length); - UserInfo4->usri4_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->Parameters.Length > 0) - { - UserInfo4->usri4_parms = Ptr; - - memcpy(UserInfo4->usri4_parms, - UserInfo->Parameters.Buffer, - UserInfo->Parameters.Length); - UserInfo4->usri4_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - } - - if (UserInfo->WorkStations.Length > 0) - { - UserInfo4->usri4_workstations = Ptr; - - memcpy(UserInfo4->usri4_workstations, - UserInfo->WorkStations.Buffer, - UserInfo->WorkStations.Length); - UserInfo4->usri4_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_workstations = Ptr; + memcpy(UserInfo4->usri4_workstations, + UserInfo->WorkStations.Buffer, + UserInfo->WorkStations.Length); + UserInfo4->usri4_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); RtlTimeToSecondsSince1970(&UserInfo->LastLogon, &UserInfo4->usri4_last_logon); @@ -1183,17 +956,12 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo4->usri4_bad_pw_count = UserInfo->BadPasswordCount; UserInfo4->usri4_num_logons = UserInfo->LogonCount; - if (LogonServer.Length > 0) - { - UserInfo4->usri4_logon_server = Ptr; - - memcpy(UserInfo4->usri4_logon_server, - LogonServer.Buffer, - LogonServer.Length); - UserInfo4->usri4_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_logon_server = Ptr; + memcpy(UserInfo4->usri4_logon_server, + LogonServer.Buffer, + LogonServer.Length); + UserInfo4->usri4_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); UserInfo4->usri4_country_code = UserInfo->CountryCode; UserInfo4->usri4_code_page = UserInfo->CodePage; @@ -1202,29 +970,19 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo4->usri4_primary_group_id = UserInfo->PrimaryGroupId; - if (UserInfo->ProfilePath.Length > 0) - { - UserInfo4->usri4_profile = Ptr; + UserInfo4->usri4_profile = Ptr; + memcpy(UserInfo4->usri4_profile, + UserInfo->ProfilePath.Buffer, + UserInfo->ProfilePath.Length); + UserInfo4->usri4_profile[UserInfo->ProfilePath.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ProfilePath.Length + sizeof(WCHAR)); - memcpy(UserInfo4->usri4_profile, - UserInfo->ProfilePath.Buffer, - UserInfo->ProfilePath.Length); - UserInfo4->usri4_profile[UserInfo->ProfilePath.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->ProfilePath.Length + sizeof(WCHAR)); - } - - if (UserInfo->HomeDirectoryDrive.Length > 0) - { - UserInfo4->usri4_home_dir_drive = Ptr; - - memcpy(UserInfo4->usri4_home_dir_drive, - UserInfo->HomeDirectoryDrive.Buffer, - UserInfo->HomeDirectoryDrive.Length); - UserInfo4->usri4_home_dir_drive[UserInfo->HomeDirectoryDrive.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR)); - } + UserInfo4->usri4_home_dir_drive = Ptr; + memcpy(UserInfo4->usri4_home_dir_drive, + UserInfo->HomeDirectoryDrive.Buffer, + UserInfo->HomeDirectoryDrive.Length); + UserInfo4->usri4_home_dir_drive[UserInfo->HomeDirectoryDrive.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectoryDrive.Length + sizeof(WCHAR)); UserInfo4->usri4_password_expired = (UserInfo->UserAccountControl & USER_PASSWORD_EXPIRED); break; @@ -1243,41 +1001,25 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); - if (UserInfo->AdminComment.Length > 0) - { - UserInfo10->usri10_comment = Ptr; + UserInfo10->usri10_comment = Ptr; + memcpy(UserInfo10->usri10_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo10->usri10_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - memcpy(UserInfo10->usri10_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo10->usri10_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + UserInfo10->usri10_usr_comment = Ptr; + memcpy(UserInfo10->usri10_usr_comment, + UserInfo->UserComment.Buffer, + UserInfo->UserComment.Length); + UserInfo10->usri10_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->UserComment.Length > 0) - { - UserInfo10->usri10_usr_comment = Ptr; - - memcpy(UserInfo10->usri10_usr_comment, - UserInfo->UserComment.Buffer, - UserInfo->UserComment.Length); - UserInfo10->usri10_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->FullName.Length > 0) - { - UserInfo10->usri10_full_name = Ptr; - - memcpy(UserInfo10->usri10_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo10->usri10_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } + UserInfo10->usri10_full_name = Ptr; + memcpy(UserInfo10->usri10_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo10->usri10_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; break; case 11: @@ -1294,70 +1036,45 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); - if (UserInfo->AdminComment.Length > 0) - { - UserInfo11->usri11_comment = Ptr; + UserInfo11->usri11_comment = Ptr; + memcpy(UserInfo11->usri11_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo11->usri11_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - memcpy(UserInfo11->usri11_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo11->usri11_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + UserInfo11->usri11_usr_comment = Ptr; + memcpy(UserInfo11->usri11_usr_comment, + UserInfo->UserComment.Buffer, + UserInfo->UserComment.Length); + UserInfo11->usri11_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->UserComment.Length > 0) - { - UserInfo11->usri11_usr_comment = Ptr; - - memcpy(UserInfo11->usri11_usr_comment, - UserInfo->UserComment.Buffer, - UserInfo->UserComment.Length); - UserInfo11->usri11_usr_comment[UserInfo->UserComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserComment.Length + sizeof(WCHAR)); - } - - if (UserInfo->FullName.Length > 0) - { - UserInfo11->usri11_full_name = Ptr; - - memcpy(UserInfo11->usri11_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo11->usri11_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } + UserInfo11->usri11_full_name = Ptr; + memcpy(UserInfo11->usri11_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo11->usri11_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); /* FIXME: usri11_priv */ /* FIXME: usri11_auth_flags */ UserInfo11->usri11_password_age = GetPasswordAge(&UserInfo->PasswordLastSet); - if (UserInfo->HomeDirectory.Length > 0) - { - UserInfo11->usri11_home_dir = Ptr; + UserInfo11->usri11_home_dir = Ptr; + memcpy(UserInfo11->usri11_home_dir, + UserInfo->HomeDirectory.Buffer, + UserInfo->HomeDirectory.Length); + UserInfo11->usri11_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - memcpy(UserInfo11->usri11_home_dir, - UserInfo->HomeDirectory.Buffer, - UserInfo->HomeDirectory.Length); - UserInfo11->usri11_home_dir[UserInfo->HomeDirectory.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->HomeDirectory.Length + sizeof(WCHAR)); - } - - if (UserInfo->Parameters.Length > 0) - { - UserInfo11->usri11_parms = Ptr; - - memcpy(UserInfo11->usri11_parms, - UserInfo->Parameters.Buffer, - UserInfo->Parameters.Length); - UserInfo11->usri11_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); - } + UserInfo11->usri11_parms = Ptr; + memcpy(UserInfo11->usri11_parms, + UserInfo->Parameters.Buffer, + UserInfo->Parameters.Length); + UserInfo11->usri11_parms[UserInfo->Parameters.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->Parameters.Length + sizeof(WCHAR)); RtlTimeToSecondsSince1970(&UserInfo->LastLogon, &UserInfo11->usri11_last_logon); @@ -1368,31 +1085,21 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, UserInfo11->usri11_bad_pw_count = UserInfo->BadPasswordCount; UserInfo11->usri11_num_logons = UserInfo->LogonCount; - if (LogonServer.Length > 0) - { - UserInfo11->usri11_logon_server = Ptr; - - memcpy(UserInfo11->usri11_logon_server, - LogonServer.Buffer, - LogonServer.Length); - UserInfo11->usri11_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); - } + UserInfo11->usri11_logon_server = Ptr; + memcpy(UserInfo11->usri11_logon_server, + LogonServer.Buffer, + LogonServer.Length); + UserInfo11->usri11_logon_server[LogonServer.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + LogonServer.Length + sizeof(WCHAR)); UserInfo11->usri11_country_code = UserInfo->CountryCode; - if (UserInfo->WorkStations.Length > 0) - { - UserInfo11->usri11_workstations = Ptr; - - memcpy(UserInfo11->usri11_workstations, - UserInfo->WorkStations.Buffer, - UserInfo->WorkStations.Length); - UserInfo11->usri11_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); - } + UserInfo11->usri11_workstations = Ptr; + memcpy(UserInfo11->usri11_workstations, + UserInfo->WorkStations.Buffer, + UserInfo->WorkStations.Length); + UserInfo11->usri11_workstations[UserInfo->WorkStations.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->WorkStations.Length + sizeof(WCHAR)); UserInfo11->usri11_max_storage = USER_MAXSTORAGE_UNLIMITED; UserInfo11->usri11_units_per_week = UserInfo->LogonHours.UnitsPerWeek; @@ -1425,29 +1132,19 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); - if (UserInfo->FullName.Length > 0) - { - UserInfo20->usri20_full_name = Ptr; + UserInfo20->usri20_full_name = Ptr; + memcpy(UserInfo20->usri20_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo20->usri20_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - memcpy(UserInfo20->usri20_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo20->usri20_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo20->usri20_comment = Ptr; - - memcpy(UserInfo20->usri20_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo20->usri20_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo20->usri20_comment = Ptr; + memcpy(UserInfo20->usri20_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo20->usri20_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo20->usri20_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); @@ -1469,35 +1166,25 @@ BuildUserInfoBuffer(SAM_HANDLE UserHandle, Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->UserName.Length + sizeof(WCHAR)); - if (UserInfo->FullName.Length > 0) - { - UserInfo23->usri23_full_name = Ptr; + UserInfo23->usri23_full_name = Ptr; + memcpy(UserInfo23->usri23_full_name, + UserInfo->FullName.Buffer, + UserInfo->FullName.Length); + UserInfo23->usri23_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - memcpy(UserInfo23->usri23_full_name, - UserInfo->FullName.Buffer, - UserInfo->FullName.Length); - UserInfo23->usri23_full_name[UserInfo->FullName.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->FullName.Length + sizeof(WCHAR)); - } - - if (UserInfo->AdminComment.Length > 0) - { - UserInfo23->usri23_comment = Ptr; - - memcpy(UserInfo23->usri23_comment, - UserInfo->AdminComment.Buffer, - UserInfo->AdminComment.Length); - UserInfo23->usri23_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; - - Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); - } + UserInfo23->usri23_comment = Ptr; + memcpy(UserInfo23->usri23_comment, + UserInfo->AdminComment.Buffer, + UserInfo->AdminComment.Length); + UserInfo23->usri23_comment[UserInfo->AdminComment.Length / sizeof(WCHAR)] = UNICODE_NULL; + Ptr = (LPWSTR)((ULONG_PTR)Ptr + UserInfo->AdminComment.Length + sizeof(WCHAR)); UserInfo23->usri23_flags = GetAccountFlags(UserInfo->UserAccountControl, Dacl); /* FIXME: usri23_user_sid */ - break; + break; } done: diff --git a/dll/win32/netcfgx/lang/ru-RU.rc b/dll/win32/netcfgx/lang/ru-RU.rc index 7fd3c1cb988..06a4af4722b 100644 --- a/dll/win32/netcfgx/lang/ru-RU.rc +++ b/dll/win32/netcfgx/lang/ru-RU.rc @@ -212,8 +212,8 @@ BEGIN IDS_TCPIP "ReactOS-TCP/IP" IDS_ADD "Добавить" IDS_MOD "OK" - IDS_TCP_PORTS "TCP-проты" - IDS_UDP_PORTS "UDP-проты" + IDS_TCP_PORTS "TCP-порты" + IDS_UDP_PORTS "UDP-порты" IDS_IP_PROTO "IP-протоколы" IDS_PORT_RANGE "Номера портов должны быть больше 0 и меньше 65536. Введите номер в этом диапазоне." IDS_PROT_RANGE "Номера протоколов должны быть больше 0 и меньше 256. Введите номер в этом диапазоне." @@ -222,7 +222,7 @@ BEGIN IDS_NO_SUFFIX "Текущие установки метода поиска требуют указания по меньшей мере одного суффикса DNS. Введите суффикс или измените установки." IDS_DOMAIN_SUFFIX "Неправильный суффикс домена." IDS_DNS_SUFFIX "DNS-имя домена ""%s"" не является допустимым DNS-именем." - IDS_DUP_SUFFIX "DNS-суфикс уже имеется в списке." + IDS_DUP_SUFFIX "DNS-суффикс уже имеется в списке." IDS_DUP_IPADDR "IP-адрес уже имеется в списке." IDS_DUP_GW "Шлюз по умолчанию уже в списке." END diff --git a/dll/win32/netcfgx/lang/tr-TR.rc b/dll/win32/netcfgx/lang/tr-TR.rc new file mode 100644 index 00000000000..8ab4c987a6d --- /dev/null +++ b/dll/win32/netcfgx/lang/tr-TR.rc @@ -0,0 +1,230 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_TCPIP_BASIC_DLG DIALOGEX 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Eğer ağınız bu yeteneği destekliyorsa kendiliğinden atanmış IP ayarları alabilirsiniz. Yoksa uygun IP ayarları için ağ yöneticinize sormanız gerekir.", -1, 9, 9, 228, 27 + CONTROL "IP Adresini Kendiliğinden Al", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 + GROUPBOX "", -1, 9, 61, 228, 70, BS_GROUPBOX + CONTROL "&Aşağıdaki IP Adresini Kullan:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 + LTEXT "IP Adresi:", -1, 14, 75, 135, 8 + CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 150, 75 - 2, 80, 12 + LTEXT "Alt Ağ Maskesi:", -1, 14, 90, 135, 8 + CONTROL "", IDC_SUBNETMASK, "SysIPAddress32", WS_TABSTOP, 150, 90 - 2, 80, 12 + LTEXT "Ön Tanımlı Geçit:", -1, 14, 105, 135, 8 + CONTROL "", IDC_DEFGATEWAY, "SysIPAddress32", WS_TABSTOP, 150, 105 - 2, 80, 12 + CONTROL "DNS Sunucusu Adresini Kendiliğinden Al", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 + GROUPBOX "", -1, 9, 157, 228, 47, BS_GROUPBOX + CONTROL "A&şağıdaki DNS Sunucusu Adreslerini Kullan", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 + LTEXT "Yeğlenen DNS Sunucusu:", -1, 14, 171, 135, 8 + CONTROL "", IDC_DNS1, "SysIPAddress32", WS_TABSTOP, 150, 171 - 2, 80, 12 + LTEXT "Başka DNS Sunucusu:", -1, 14, 186, 135, 8 + CONTROL "", IDC_DNS2, "SysIPAddress32", WS_TABSTOP, 150, 186 - 2, 80, 12 + PUSHBUTTON "&Gelişmiş", IDC_ADVANCED, 186, 209, 50, 14, WS_TABSTOP +END + +IDD_TCPIP_ALTCF_DLG DIALOGEX 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Başka Yapılandırma" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Eğer bu bilgisayar birden çok ağda kullanılıyorsa aşağıda başka IP ayarlarını giriniz.", -1, 9, 9, 220, 20 + CONTROL "&Kendiliğinden Husûsî IP Adresi", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 + GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX + CONTROL "K&ullanıcının Yapılandırdığı", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12 + LTEXT "&IP Adresi:", -1, 14, 75, 135, 8 + CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 150, 75, 80, 12 + LTEXT "&Alt Ağ Maskesi:", -1, 14, 95, 135, 8 + CONTROL "", IDC_SUBNETMASK, "SysIPAddress32", WS_TABSTOP, 150, 95, 80, 12 + LTEXT "&Ön Tanımlı Geçit:", -1, 14, 115, 135, 8 + CONTROL "", IDC_DEFGATEWAY, "SysIPAddress32", WS_TABSTOP, 150, 115, 80, 12 + LTEXT "&Yeğlenen DNS Sunucusu:", -1, 14, 150, 135, 8 + CONTROL "", IDC_DNS1, "SysIPAddress32", WS_TABSTOP, 150, 150, 80, 12 + LTEXT "&Başka DNS Sunucusu:", -1, 14, 165, 180, 8 + CONTROL "", IDC_DNS2, "SysIPAddress32", WS_TABSTOP, 150, 165, 80, 12 +END + +IDD_TCPIP_ADVIP_DLG DIALOGEX 0, 0, 247, 247 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "IP Ayarları" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "IP Adresleri", -1, 5, 5, 240, 90 + CONTROL "", IDC_IPLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 15, 210, 55 + PUSHBUTTON "Ekle...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "Düzenle...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "Sil", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP + GROUPBOX "Ön Tanımlı Geçitler:", -1, 5, 100, 240, 90 + CONTROL "", IDC_GWLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 110, 210, 55 + PUSHBUTTON "Ekle...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Düzenle...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Sil", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP + GROUPBOX "", -1, 5, 200, 240, 30 + CHECKBOX "Kendiliğinden Ölçü", IDC_AUTOMETRIC, 9, 200, 90, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Arayüz Ölçüsü:", -1, 15, 215, 90, 12 + EDITTEXT IDC_METRIC, 110, 212, 50, 12, WS_TABSTOP | ES_NUMBER +END + +IDD_TCPIP_ADVDNS_DLG DIALOGEX 0, 0, 247, 270 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "DNS" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_DNSADDRLIST, 5, 15, 180, 60, LBS_NOTIFY + LTEXT "&Kullanmak için DNS sunucusu adresleri:", -1, 5, 5, 180, 12 + PUSHBUTTON "Yukarı", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "Aşağı", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "&Ekle...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "&Düzenle...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "&Sil", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP + LTEXT "Aşağıdaki üç ayar, TCP/IP'nin etkin olduğu tüm bağlantılara uygulanmıştır. Nitelenmemiş adların çözümü için:", -1, 5, 90, 220, 24 + CONTROL "&Birinci ve Bağlantıya Özgü DNS Son Eklerini Ekle", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 160, 12 + CHECKBOX "Bi&rinci DNS Son Ekinin Ana Son Eklerini Ekle", IDC_TOPPRIMSUFFIX, 15, 125, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CONTROL "Di&ziyle Şu DNS Son Eklerini Ekle:", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 190, 12 + LISTBOX IDC_DNSSUFFIXLIST, 5, 155, 180, 60, LBS_NOTIFY + PUSHBUTTON "Yukarı", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Aşağı", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "Ek&le...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "D&üzenle...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "S&il", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP + LTEXT "B&u Bağlantı İçin DNS Son Eki:", -1, 5, 225, 110, 14 + EDITTEXT IDC_SUFFIX, 120, 225, 100, 12, WS_TABSTOP + CHECKBOX "D&NS'ye Bu Bağlantının Adreslerini Kaydet", IDC_REGSUFFIX, 15, 240, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "DNS K&aydında Bu Bağlantının DNS Son Ekini Kullan", IDC_USESUFFIX, 15, 255, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP +END + +IDD_TCPIP_ADVOPT_DLG DIALOGEX 0, 0, 247, 247 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Seçenekler" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_OPTLIST, 5, 30, 230, 70 + LTEXT "&Seçimlik Ayarlar", -1, 5, 15, 130, 12 + PUSHBUTTON "&Husûsiyetler", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP + GROUPBOX "Tanım:", -1, 5, 120, 240, 70 + LTEXT "", IDC_OPTDESC, 15, 130, 220, 33 +END + +IDD_TCPIPADDIP_DLG DIALOGEX 0, 0, 200, 70 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TCP/IP Addresi" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 100, 15, 80, 12 + LTEXT "IP Adresi:", -1, 5, 15, 70, 12 + LTEXT "Alt Ağ Maskesi:", -1, 5, 30, 70, 12 + CONTROL "", IDC_SUBNETMASK, "SysIPAddress32", WS_TABSTOP, 100, 30, 80, 12 + PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP +END + +IDD_TCPIPGW_DLG DIALOGEX 0, 0, 200, 80 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TCP/IP Geçit Adresi" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 100, 15, 80, 12 + LTEXT "Geçit:", -1, 5, 15, 70, 12 + CHECKBOX "Kendiliğinden Ölçü", IDC_USEMETRIC, 15, 30, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "&Ölçü:", IDC_METRICTXT, 5, 45, 45, 12, WS_DISABLED + EDITTEXT IDC_METRIC, 100, 45, 50, 12, WS_TABSTOP | ES_NUMBER | WS_DISABLED + PUSHBUTTON "", IDC_OK, 50, 60, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 110, 60, 50, 14, WS_TABSTOP +END + +IDD_TCPIPDNS_DLG DIALOGEX 0, 0, 200, 80 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TCP/IP DNS Sunucusu" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 5, 25, 80, 12 + LTEXT "DNS Sunucusu:", -1, 5, 10, 120, 12 + PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP +END + +IDD_TCPIPSUFFIX_DLG DIALOGEX 0, 0, 200, 80 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TCP/IP Etki Alanı Son Eki" +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_SUFFIX, 5, 25, 190, 12, WS_TABSTOP + LTEXT "Etki Alanı Son Eki:", -1, 5, 10, 120, 12 + PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP +END + +IDD_TCPIP_FILTER_DLG DIALOGEX 0, 0, 305, 220 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TCP/IP Süzme" +FONT 8, "MS Shell Dlg" +BEGIN + CHECKBOX "Tüm Bağdaştırıcılar İçin TCP/IP Süzmeyi Etkinleştir", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + GROUPBOX "", -1, 5, 30, 90, 150 + CONTROL "Tümüne İzin Ver", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 + CONTROL "Yalnızca Şunlara İzin Ver:", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 + CONTROL "", IDC_TCP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 11, 62, 72, 75 + PUSHBUTTON "Ekle", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Sil", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP + GROUPBOX "", -1, 105, 30, 90, 150 + CONTROL "Tümüne İzin Ver", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 + CONTROL "Yalnızca Şunlara İzin Ver:", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 + CONTROL "", IDC_UDP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 111, 62, 72, 75 + PUSHBUTTON "Ekle", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Sil", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP + GROUPBOX "", -1, 205, 30, 90, 150 + CONTROL "Tümüne İzin Ver", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 + CONTROL "Yalnızca Şunlara İzin Ver:", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 + CONTROL "", IDC_IP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 211, 62, 72, 75 + PUSHBUTTON "Ekle", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Sil", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Tamam", IDC_OK, 150, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP +END + +IDD_TCPIP_PORT_DLG DIALOGEX 0, 0, 200, 60 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Süzgeç Ekle" +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_PORT_VAL, 5, 30, 70, 12, WS_TABSTOP | ES_NUMBER + LTEXT "", IDC_PORT_DESC, 5, 15, 40, 12 + PUSHBUTTON "Tamam", IDC_OK, 120, 15, 50, 14, WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP +END + +STRINGTABLE +BEGIN + IDS_NET_CONNECT "Ağ Bağlantısı" + IDS_NO_IPADDR_SET "Bağdaştırıcı, en az bir IP adresi gerektiriyor. Lütfen bir tâne giriniz." + IDS_NO_SUBMASK_SET "Alt ağ maskesi eksik olan bir adres girdiniz. Lütfen bir alt ağ maskesi giriniz." + IDS_TCPFILTERDESC "TCP/IP süzmesi, bilgisayarınıza uzanan TCP/IP ağ gidişgelişinin türünü denetlemenize izin verir." + IDS_TCPFILTER "TCP/IP Süzmesi" + IDS_IPADDR "IP Adresi" + IDS_SUBMASK "Alt Ağ Maskesi" + IDS_GATEWAY "Geçit" + IDS_METRIC "Ölçü" + IDS_DHCPACTIVE "DHCP Etkin" + IDS_AUTOMATIC "Kendiliğinden" + IDS_NOITEMSEL "Bir öğe seçmediniz. İlk önce birini seçiniz." + IDS_TCPIP "ReactOS TCP/IP" + IDS_ADD "Ekle" + IDS_MOD "Tamam" + IDS_TCP_PORTS "TCP Girişleri" + IDS_UDP_PORTS "UDP Girişleri" + IDS_IP_PROTO "IP İletişim Kâideleri" + IDS_PORT_RANGE "Giriş numaraları, 0'dan büyük ve 65536'dan küçük olmalıdır. Lütfen bu aralıkta bir numara giriniz." + IDS_PROT_RANGE "İletişim kâidesi numaraları, 0'dan büyük ve 256'dan küçük olmalıdır. Lütfen bu aralıkta bir numara giriniz." + IDS_DUP_NUMBER "Eklemeye çalıştığınız numara önceden dizelgede. Lütfen ayrı bir numara giriniz." + IDS_DISABLE_FILTER "Bu umûmî TCP/IP ayârını edilginleştirme tüm bağdaştırıcıları etkileyecektir." + IDS_NO_SUFFIX "Arama yönteminin şimdiki ayârı en az bir DNS son eki gerektiriyor. Lütfen bir tâne giriniz ya da ayârı değiştiriniz." + IDS_DOMAIN_SUFFIX "Etki alanı son eki geçerli bir son ek değil." + IDS_DNS_SUFFIX """%s"" DNS etki alanı adı geçerli bir DNS adı değil." + IDS_DUP_SUFFIX "DNS son eki önceden dizelgede." + IDS_DUP_IPADDR "IP adresi önceden dizelgede." + IDS_DUP_GW "Ön tanımlı geçit önceden dizelgede." +END diff --git a/dll/win32/netcfgx/netcfgx.rc b/dll/win32/netcfgx/netcfgx.rc index dc64e80baba..58e1324c03e 100644 --- a/dll/win32/netcfgx/netcfgx.rc +++ b/dll/win32/netcfgx/netcfgx.rc @@ -81,6 +81,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/win32/netid/lang/ru-RU.rc b/dll/win32/netid/lang/ru-RU.rc index 7e540caecc8..f82ac7be1ac 100644 --- a/dll/win32/netid/lang/ru-RU.rc +++ b/dll/win32/netid/lang/ru-RU.rc @@ -70,7 +70,7 @@ BEGIN 25 "Можно изменить имя и принадлежность этого компьютера. Изменения могут повлиять на доступ к сетевым ресурсам." 1021 "Примечание: только администраторы могут изменить идентификацию этого компьютера." 1022 "Примечание: идентификация этого компьютера не может быть изменена, потому что:" - 1030 "The new computer name ""%s"" contains characters which are not allowed. Characters which are not allowed include ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / and ?" + 1030 "Новое имя компьютера ""%s"" содержит запрещенные знаки. Запрещенные знаки ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / и ?" 3210 "&Подробно >>" 3220 "<< &Подробно" 4000 "Информация" diff --git a/dll/win32/netid/lang/tr-TR.rc b/dll/win32/netid/lang/tr-TR.rc new file mode 100644 index 00000000000..bfcd7dfb6e1 --- /dev/null +++ b/dll/win32/netid/lang/tr-TR.rc @@ -0,0 +1,82 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, 256, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Bilgisayar Adı" +FONT 8, "MS Shell Dlg" +BEGIN + ICON IDI_COMPNAME, IDC_STATIC, 4, 3, 26, 24, SS_ICON + LTEXT "ReactOS, ağda bilgisayarınızı tanılamak için aşağıdaki bilgiyi kullanır.", IDC_STATIC, 40, 5, 204, 20 + LTEXT "Bilgisayar Tanımı:", IDC_STATIC, 6, 40, 90, 9 + EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Tüm Bilgisayar Adı:", IDC_STATIC, 6, 68, 85, 9 + EDITTEXT IDC_COMPUTERNAME, 98, 68, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Çalışma Takımı:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 + EDITTEXT IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Bir etki alanına katılmak ve bir yerli kullanıcı oluşturmak için, Ağ Tanılama Yardımcısı'nı kullanmak için ""Ağ Kimliği""ne tıklayınız.", IDC_STATIC, 6, 113, 172, 24 + PUSHBUTTON "&Ağ Kimliği...", IDC_NETWORK_ID, 190, 114, 58, 15 + LTEXT "Bu bilgisayarı yeniden adlandırmak veyâ bir etki alanına katılmak için ""Değiştir""e tıklayınız.", IDC_STATIC, 6, 149, 170, 17 + PUSHBUTTON "&Değştir...", IDC_NETWORK_PROPERTY, 190, 149, 58, 15 + LTEXT "Önemli: Bu bilgisayarın kimliğini yalnızca yöneticiler değiştirebilir.", IDC_STATIC, 6, 179, 300, 9 +END + +IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Bilgisayar Adı Değişiklikleri" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "(İleti buraya gelecek.)", 1017, 7, 5, 218, 30 + LTEXT "&Bilgisayar Adı:", -1, 7, 41, 219, 8 + EDITTEXT 1002, 7, 53, 218, 14, ES_AUTOHSCROLL | ES_OEMCONVERT + LTEXT "Tüm Bilgisayar Adı:", 1016, 7, 72, 218, 10 + EDITTEXT 1001, 7, 82, 219, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + PUSHBUTTON "&Daha Çok...", 1003, 150, 102, 75, 14 + GROUPBOX "Üyesi", 1018, 7, 119, 219, 73 + AUTORADIOBUTTON "&Etki Alanı:", 1008, 17, 132, 192, 10, WS_GROUP + AUTORADIOBUTTON "&Çalışma Takımı:", 1004, 17, 161, 191, 10 + EDITTEXT 116, 28, 144, 181, 14, ES_AUTOHSCROLL | WS_GROUP + PUSHBUTTON "E&tki Alanımı Bul", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED + EDITTEXT 1007, 28, 172, 181, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_OEMCONVERT + DEFPUSHBUTTON "Tamam", 1, 121, 203, 50, 14, WS_GROUP + PUSHBUTTON "İptal", 2, 176, 203, 50, 14 +END + +IDD_PROPPAGEDNSANDNETBIOS DIALOGEX 0, 0, 266, 125 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION +CAPTION "DNS Son Eki ve NetBIOS Bilgisayar Adı" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Bu Bilgisayarın Birinci DNS Son Eki:", -1, 7, 5, 253, 8 + EDITTEXT 1011, 7, 17, 252, 14, ES_AUTOHSCROLL + AUTOCHECKBOX "&Etki Alanı Üyeliği Değiştiğinde Birinci DNS Son Ekini Değiştir", 115, 11, 39, 250, 10 + LTEXT "&NetBIOS Bilgisayar Adı:", -1, 7, 57, 148, 8 + EDITTEXT 1013, 7, 69, 150, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_READONLY + DEFPUSHBUTTON "Tamam", 1, 153, 104, 50, 14 + PUSHBUTTON "İptal", 2, 209, 104, 50, 14 + LTEXT "Bu ad, daha eski bilgisayarlarla ve daha eski hizmetlerle birlikte çalışabilirlik için kullanılır.", 13, 7, 88, 253, 8 +END + +STRINGTABLE +BEGIN + 1 "* Bilinmeyen *" + 2 "ÇALIŞMATAKIMI" + 3 "Etki alanı üyeliği bilgisini okumaya çalışırken aşağıdaki yanlışlık oluştu:" + 4 "Bilgisayar Adı Değişiklikleri" + 5 "Çalışma Takımı:" + 6 "Etki Alanı:" + 22 "%1 çalışma takımına hoş geldiniz." + 23 "%1 etki alanına hoş geldiniz." + 24 "Değişikliklerin etkili olması için bu bilgisayarı yeniden başlatmalısınız." + 25 "Bu bilgisayarın adını ve üyeliğini değiştirebilirsiniz. Değişiklikler, ağ kaynaklarına erişimi etkileyebilir." + 1021 "Önemli: Bu bilgisayarın kimliğini yalnızca yöneticiler değiştirebilir." + 1022 "Önemli: Bilgisayarın kimliği şundan dolayı değiştirilemedi:" + 1030 """%s"" yeni bilgisayar adı izin verilmeyen damgalar içeriyor. İzin verilmeyen damgalar; `, ~, !, @, #, $, %%, ^, &, *, (, ), =, +, _, [, ], {, }, \\, |, ;, :, ', "", ,, ., <, >, /, ve ?'ni kapsar." + /* Windows allows using these characters, although it displays a warning message. + Forbidding the use of these characters means incompatibility with Windows. */ + 3210 "&Ayrıntılar >>" + 3220 "<< &Ayrıntılar" + 4000 "Bilgi" + 4001 "Yeni bir bilgisayar adı oluşturamaz!" +END diff --git a/dll/win32/netid/netid.rc b/dll/win32/netid/netid.rc index 5d786014b42..2abc648896b 100644 --- a/dll/win32/netid/netid.rc +++ b/dll/win32/netid/netid.rc @@ -69,6 +69,9 @@ IDI_WARNINGICO ICON "res/102.ico" #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/win32/netshell/lang/ru-RU.rc b/dll/win32/netshell/lang/ru-RU.rc index 00188c78733..d0fc0c2beb7 100644 --- a/dll/win32/netshell/lang/ru-RU.rc +++ b/dll/win32/netshell/lang/ru-RU.rc @@ -9,13 +9,13 @@ BEGIN LTEXT "Подключение через:", -1, 9, 9, 217, 8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_TABSTOP | ES_READONLY PUSHBUTTON "&Настроить...", IDC_CONFIGURE, 174, 38, 65, 14 - LTEXT "Отмеченые компоненты используются этим подключением:", -1, 9, 59, 217, 8 + LTEXT "Отмеченные компоненты используются этим подключением:", -1, 9, 59, 217, 8 PUSHBUTTON "&Установить...", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Удалить", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Свойства", IDC_PROPERTIES, 174, 130, 65, 14 GROUPBOX "Описание", -1, 9, 153, 230, 46, BS_GROUPBOX LTEXT "Свойства компонента перечислены ниже...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX "Отображать значок в трее при установленом соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Отображать значок в трее при установленном соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP CHECKBOX "Оповещать в случае разрыва соединения", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END @@ -51,7 +51,7 @@ END IDD_LAN_NETSTATUSADVANCED DIALOGEX 0, 0, 200, 180 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Поддежка" +CAPTION "Поддержка" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Статус подключения", -1, 9, 8, 190, 88, BS_GROUPBOX diff --git a/dll/win32/netshell/lang/tr-TR.rc b/dll/win32/netshell/lang/tr-TR.rc new file mode 100644 index 00000000000..8c6635ce751 --- /dev/null +++ b/dll/win32/netshell/lang/tr-TR.rc @@ -0,0 +1,124 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_NETPROPERTIES DIALOGEX 0, 0, 246, 246 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 + LTEXT "Bağlantıda Kullanılıyor:", -1, 9, 9, 217, 8 + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_TABSTOP | ES_READONLY + PUSHBUTTON "&Yapılandır", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "Bu Bağlantıyla Kullanılan Seçilmiş Bileşenler:", -1, 9, 59, 217, 8 + PUSHBUTTON "&Kur", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "K&aldır", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Husûsiyetler", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Tanım", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Bileşen tanımı buraya gelecek.", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "&Bağlandığında Görev Çubuğunda Simge Göster", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "B&u Bağlantının, Kısıtlı Bağlanabilirliği Varsa ya da Bağlanabilirliği Yoksa Beni Uyar", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP +END + +IDD_STATUS DIALOGEX 0, 0, 200, 280 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN +END + +IDD_LAN_NETSTATUS DIALOGEX 0, 0, 200, 180 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Bağlantı", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Durum:", -1, 19, 20, 60, 8 + LTEXT "Süre:", -1, 19, 34, 60, 8 + LTEXT "Hız:", -1, 19, 48, 60, 8 + GROUPBOX "Etkinlik", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Gönderilen", -1, 26, 90, 60, 8 + ICON "", IDC_NETSTAT, 110, 85, 32, 32 + LTEXT "Alınan", -1, 149, 90, 37, 8 + LTEXT "Çoklu:", -1, 17, 115, 32, 8 + RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 + RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 + PUSHBUTTON "&Husûsiyetler", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Edilginleştir", IDC_ENDISABLE, 66, 150, 50, 14 + RTEXT "", IDC_STATUS, 83, 20, 98, 8 + RTEXT "", IDC_DURATION, 83, 34, 98, 8 + RTEXT "", IDC_SPEED, 83, 48, 98, 8 +END + +IDD_LAN_NETSTATUSADVANCED DIALOGEX 0, 0, 200, 180 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Destek" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Bağlantı Durumu", -1, 9, 8, 190, 88, BS_GROUPBOX + LTEXT "Adres Türü:", -1, 22, 20, 80, 8 + LTEXT "IP Adresi:", -1, 22, 34, 80, 8 + LTEXT "Alt Ağ Maskesi:", -1, 22, 48, 80, 8 + LTEXT "Ön Tanımlı Geçit:", -1, 22, 62, 80, 8 + RTEXT "Yok", IDC_DETAILSTYPE, 112, 20, 80, 8 + RTEXT "000.000.000.000", IDC_DETAILSIP, 112, 34, 80, 8 + RTEXT "000.000.000.000", IDC_DETAILSSUBNET, 112, 48, 80, 8 + RTEXT "", IDC_DETAILSGATEWAY, 112, 62, 80, 8 + PUSHBUTTON "&Ayrıntılar...", IDC_DETAILS, 22, 76, 62, 14 +END + +IDD_LAN_NETSTATUSDETAILS DIALOGEX 0, 0, 190, 175 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Ağ Bağlantısı Ayrıntıları" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Ağ Bağlantısı Ayrıntıları:", -1, 10, 4, 170, 12 + CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 10, 15, 170, 130 + PUSHBUTTON "&Kapat", IDC_CLOSE, 120, 155, 60, 14 +END + +STRINGTABLE +BEGIN + IDS_PHYSICAL_ADDRESS "Fizîkî Adres" + IDS_IP_ADDRESS "IP Adresi" + IDS_SUBNET_MASK "Alt Ağ Maskesi" + IDS_DEF_GATEWAY "Ön Tanımlı Geçit" + IDS_DHCP_SERVER "DHCP Sunucusu" + IDS_LEASE_OBTAINED "Elde Edilen Kirâ" + IDS_LEASE_EXPIRES "Kirâ Bitişi" + IDS_DNS_SERVERS "DNS Sunucuları" + IDS_WINS_SERVERS "WINS Sunucuları" + IDS_PROPERTY "Husûsiyet" + IDS_VALUE "Değer" + IDS_NETWORKCONNECTION "Ağ Bağlantısı" + IDS_SHV_COLUMN_NAME "Ad" + IDS_SHV_COLUMN_TYPE "Tür" + IDS_SHV_COLUMN_STATE "Durum" + IDS_SHV_COLUMN_DEVNAME "Aygıt Adı" + IDS_SHV_COLUMN_PHONE "Telefon Numarası ya da Anabilgisayar Adresi" + IDS_SHV_COLUMN_OWNER "İye" + IDS_TYPE_ETHERNET "LAN ya da Yüksek Hızlı Umûmî Ağ" + IDS_STATUS_NON_OPERATIONAL "Edilgin" + IDS_STATUS_UNREACHABLE "Bağlı Değil" + IDS_STATUS_DISCONNECTED "Ağ kablosu takılmamış." + IDS_STATUS_CONNECTING "Elde Edilen Ağ Adresi" + IDS_STATUS_CONNECTED "Bağlı" + IDS_STATUS_OPERATIONAL "Bağlı" + IDS_NET_ACTIVATE "Etkinleştir" + IDS_NET_DEACTIVATE "Edilginleştir" + IDS_NET_STATUS "Durum" + IDS_NET_REPAIR "Onar" + IDS_NET_CREATELINK "Kısayol Oluştur" + IDS_NET_DELETE "Sil" + IDS_NET_RENAME "Yeniden Adlandır" + IDS_NET_PROPERTIES "Husûsiyetler" + IDS_FORMAT_BIT "%u Bit/s" + IDS_FORMAT_KBIT "%u KBit/s" + IDS_FORMAT_MBIT "%u MBit/s" + IDS_FORMAT_GBIT "%u GBit/s" + IDS_DURATION_DAY "%d Gün %s" + IDS_DURATION_DAYS "%d Gün %s" + IDS_ASSIGNED_DHCP "DHCP eliyle atanmış." + IDS_ASSIGNED_MANUAL "Elle yapılandırılmış." +END diff --git a/dll/win32/netshell/netshell.rc b/dll/win32/netshell/netshell.rc index 071234427d9..ff1c9e32d1b 100644 --- a/dll/win32/netshell/netshell.rc +++ b/dll/win32/netshell/netshell.rc @@ -88,6 +88,9 @@ IDI_NET_TRANSREC ICON "res/nettrrec.ico" #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/win32/newdev/lang/tr-TR.rc b/dll/win32/newdev/lang/tr-TR.rc new file mode 100644 index 00000000000..00192efb003 --- /dev/null +++ b/dll/win32/newdev/lang/tr-TR.rc @@ -0,0 +1,89 @@ +/* TRANSLATOR: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_WELCOMEPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Hoş Geldiniz", IDC_WELCOMETITLE, 120, 8, 195, 24 + LTEXT "Bu yardımcı, şunun için yeni bir aygıt sürücüsü kurar:", IDC_STATIC, 120, 21, 195, 16 + LTEXT "Sürdürmek için İleri'ye tıklayınız.", IDC_STATIC, 120, 169, 195, 17 + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 134, 36, 164, 11 + LTEXT "UYARI! HUSÛSİ BİR AYGIT KURMA BİLGİSAYARINIZI, DONDURABİLİR VEYÂ AÇILAMAZ YAPABİLİR!", IDC_STATIC, 120, 59, 195, 16 + CONTROL "Sürücüyü Kendiliğinden Kur", IDC_RADIO_AUTO, "Button", BS_AUTORADIOBUTTON, 120, 112, 178, 13 + CONTROL "Sürücüyü Belirli Konumdan Kur", IDC_RADIO_MANUAL, "Button", BS_AUTORADIOBUTTON, 120, 133, 164, 14 +END + +IDD_NODRIVER DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Kurulum Başarısız Oldu", IDC_FINISHTITLE, 120, 8, 195, 24 + LTEXT "Sürücü bulunamadığından dolayı aygıt kurulamadı.", IDC_STATIC, 120, 40, 195, 19 + LTEXT "Eğer sizde bir sürücü diski varsa ya da sürücü için yolu biliyorsanız Geri'ye tıklayınız.", IDC_STATIC, 120, 98, 181, 24 + CONTROL "Bu İletişim Kutusunu Bir Daha Gösterme", IDC_DONOTSHOWDLG, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 120, 170, 180, 11 +END + +IDD_INSTALLFAILED DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Kurulum Başarısız Oldu", IDC_FINISHTITLE, 120, 8, 195, 24 + LTEXT "Beklenmeyen bir yanlışlık olduğundan dolayı aygıt kurulamadı.", IDC_STATIC, 120, 40, 195, 19 + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 134, 55, 164, 11 +END + +IDD_CHSOURCE DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Şu Konumlarda Ara:", IDC_RADIO_SEARCHHERE, "Button", BS_AUTORADIOBUTTON, 27, 11, 239, 13 + CONTROL "Sürücüyü Elle Seç", IDC_RADIO_CHOOSE, "Button", BS_AUTORADIOBUTTON, 27, 98, 171, 12 + CONTROL "Çıkarılabilir Ortamı Ara", IDC_CHECK_MEDIA, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 47, 33, 163, 9 + CONTROL "Şu Yolu Kapsa:", IDC_CHECK_PATH, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 47, 54, 162, 10 + PUSHBUTTON "Göz At", IDC_BROWSE, 248, 69, 50, 14 + COMBOBOX IDC_COMBO_PATH, 61, 71, 176, 12, CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL +END + +IDD_SEARCHDRV DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 51, 20, 169, 16 +END + +IDD_INSTALLDRV DIALOGEX 0, 0, 317, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 51, 20, 169, 16 +END + +IDD_NEEDREBOOT DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Kurulum Bitti", IDC_FINISHTITLE, 120, 8, 195, 11 + LTEXT "Şunun kurulumunu bitirmek için yeniden başlatmaya gereksiniminiz var:", IDC_STATIC, 120, 32, 195, 19 + LTEXT "Bu yardımcıyı kapatmak için Bitir'e tıklayınız.", IDC_STATIC, 120, 174, 179, 11 + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 148, 53, 147, 12 +END + +IDD_FINISHPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aygıt Kurulumu" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Kurulum Bitti", IDC_FINISHTITLE, 120, 8, 195, 11 + LTEXT "Bu yardımcı, şunun için sürücüyü kurmayı bitirdi:", IDC_STATIC, 120, 32, 195, 19 + LTEXT "Bu yardımcıyı kapatmak için Bitir'e tıklayınız.", IDC_STATIC, 120, 174, 179, 11 + LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 148, 53, 147, 12 +END diff --git a/dll/win32/newdev/newdev.rc b/dll/win32/newdev/newdev.rc index 3269de39bd5..fafe6912bc3 100644 --- a/dll/win32/newdev/newdev.rc +++ b/dll/win32/newdev/newdev.rc @@ -71,6 +71,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_TH_TH #include "lang/th-TH.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/win32/ole32/compobj.c b/dll/win32/ole32/compobj.c index 5d8fb0c3b2f..070e55e6180 100644 --- a/dll/win32/ole32/compobj.c +++ b/dll/win32/ole32/compobj.c @@ -43,6 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); +#undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) /**************************************************************************** @@ -1173,7 +1174,7 @@ DWORD apartment_release(struct apartment *apt) return ret; } -/* The given OXID must be local to this process: +/* The given OXID must be local to this process: * * The ref parameter is here mostly to ensure people remember that * they get one, you should normally take a ref for thread safety. @@ -2482,7 +2483,7 @@ HRESULT WINAPI CLSIDFromProgIDEx(LPCOLESTR progid, LPCLSID clsid) * PARAMS * riid [I] Interface whose proxy/stub CLSID is to be returned. * pclsid [O] Where to store returned proxy/stub CLSID. - * + * * RETURNS * S_OK * E_OUTOFMEMORY @@ -2594,7 +2595,7 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid) * PARAMS * riid [I] Interface whose proxy/stub CLSID is to be registered. * rclsid [I] CLSID of the proxy/stub. - * + * * RETURNS * Success: S_OK * Failure: E_OUTOFMEMORY @@ -3576,14 +3577,14 @@ HRESULT WINAPI CoLockObjectExternal( if (!apt) return CO_E_NOTINITIALIZED; stubmgr = get_stub_manager_from_object(apt, pUnk); - + if (stubmgr) { if (fLock) stub_manager_ext_addref(stubmgr, 1, FALSE); else stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases); - + stub_manager_int_release(stubmgr); return S_OK; @@ -4036,7 +4037,7 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved) FIXME("(%p, %p): stub\n", pUnk, pvReserved); return S_OK; } - + /*********************************************************************** * CoQueryProxyBlanket [OLE32.@] * diff --git a/dll/win32/oleacc/lang/oleacc_Ru.rc b/dll/win32/oleacc/lang/oleacc_Ru.rc new file mode 100644 index 00000000000..d3ed5c871b0 --- /dev/null +++ b/dll/win32/oleacc/lang/oleacc_Ru.rc @@ -0,0 +1,92 @@ +/* + * Russian resources for oleacc + * + * Copyright 2014 Kudratov Olimjon (olim98@bk.ru) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "oleacc.h" + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +{ + 0 "неизвестный объект" /* undocumented */ + ROLE_SYSTEM_TITLEBAR "заголовок" + ROLE_SYSTEM_MENUBAR "строка меню" + ROLE_SYSTEM_SCROLLBAR "полоса прокрутки" + ROLE_SYSTEM_GRIP "захват" + ROLE_SYSTEM_SOUND "звук" + ROLE_SYSTEM_CURSOR "указатель" + ROLE_SYSTEM_CARET "точка вставки" + ROLE_SYSTEM_ALERT "оповещение" + ROLE_SYSTEM_WINDOW "окно" + ROLE_SYSTEM_CLIENT "клиент" + ROLE_SYSTEM_MENUPOPUP "всплывающее меню" + ROLE_SYSTEM_MENUITEM "элемент меню" + ROLE_SYSTEM_TOOLTIP "подсказка" + ROLE_SYSTEM_APPLICATION "приложение" + ROLE_SYSTEM_DOCUMENT "документ" + ROLE_SYSTEM_PANE "панель" + ROLE_SYSTEM_CHART "диаграмма" + ROLE_SYSTEM_DIALOG "диалог" + ROLE_SYSTEM_BORDER "граница" + ROLE_SYSTEM_GROUPING "группировка" + ROLE_SYSTEM_SEPARATOR "разделитель" + ROLE_SYSTEM_TOOLBAR "панель инструментов" + ROLE_SYSTEM_STATUSBAR "строка состояния" + ROLE_SYSTEM_TABLE "таблица" + ROLE_SYSTEM_COLUMNHEADER "заголовок столбца" + ROLE_SYSTEM_ROWHEADER "заголовок строки" + ROLE_SYSTEM_COLUMN "столбец" + ROLE_SYSTEM_ROW "строка" + ROLE_SYSTEM_CELL "ячейка" + ROLE_SYSTEM_LINK "ссылка" + ROLE_SYSTEM_HELPBALLOON "подсказка" + ROLE_SYSTEM_CHARACTER "знак" + ROLE_SYSTEM_LIST "список" + ROLE_SYSTEM_LISTITEM "элемент списка" + ROLE_SYSTEM_OUTLINE "структура" + ROLE_SYSTEM_OUTLINEITEM "элемент структуры" + ROLE_SYSTEM_PAGETAB "язычок страницы" + ROLE_SYSTEM_PROPERTYPAGE "страница свойств" + ROLE_SYSTEM_INDICATOR "индикатор" + ROLE_SYSTEM_GRAPHIC "графика" + ROLE_SYSTEM_STATICTEXT "текст" + ROLE_SYSTEM_TEXT "редактируемый текст" + ROLE_SYSTEM_PUSHBUTTON "кнопка" + ROLE_SYSTEM_CHECKBUTTON "флажок" + ROLE_SYSTEM_RADIOBUTTON "переключатель" + ROLE_SYSTEM_COMBOBOX "поле со списком" + ROLE_SYSTEM_DROPLIST "раскрывающийся список" + ROLE_SYSTEM_PROGRESSBAR "индикатор выполнения" + ROLE_SYSTEM_DIAL "набор номера" + ROLE_SYSTEM_HOTKEYFIELD "поле горячей клавиши" + ROLE_SYSTEM_SLIDER "ползунок" + ROLE_SYSTEM_SPINBUTTON "регулятор" + ROLE_SYSTEM_DIAGRAM "диаграмма" + ROLE_SYSTEM_ANIMATION "анимация" + ROLE_SYSTEM_EQUATION "формула" + ROLE_SYSTEM_BUTTONDROPDOWN "кнопка списка" + ROLE_SYSTEM_BUTTONMENU "кнопка меню" + ROLE_SYSTEM_BUTTONDROPDOWNGRID "кнопка раскрытия таблицы" + ROLE_SYSTEM_WHITESPACE "разделитель" + ROLE_SYSTEM_PAGETABLIST "список табуляций" + ROLE_SYSTEM_CLOCK "часы" + ROLE_SYSTEM_SPLITBUTTON "кнопка разделения" + ROLE_SYSTEM_IPADDRESS "IP-адрес" + ROLE_SYSTEM_OUTLINEBUTTON "кнопка контура" +} diff --git a/dll/win32/oleacc/lang/oleacc_Tr.rc b/dll/win32/oleacc/lang/oleacc_Tr.rc new file mode 100644 index 00000000000..41ce38eaa42 --- /dev/null +++ b/dll/win32/oleacc/lang/oleacc_Tr.rc @@ -0,0 +1,92 @@ +/* + * Turkish resources for oleacc + * + * Copyright: 2014 Erdem Ersoy (eersoy93) (erdemersoy@live.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "oleacc.h" + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + 0 "bilinmeyen nesne" /* undocumented */ + ROLE_SYSTEM_TITLEBAR "başlık çubuğu" + ROLE_SYSTEM_MENUBAR "seçke çubuğu" + ROLE_SYSTEM_SCROLLBAR "kaydırma çubuğu" + ROLE_SYSTEM_GRIP "tutacak" + ROLE_SYSTEM_SOUND "ses" + ROLE_SYSTEM_CURSOR "imleç" + ROLE_SYSTEM_CARET "düzeltme imi" + ROLE_SYSTEM_ALERT "uyarı" + ROLE_SYSTEM_WINDOW "pencere" + ROLE_SYSTEM_CLIENT "istemci" + ROLE_SYSTEM_MENUPOPUP "açılan seçke" + ROLE_SYSTEM_MENUITEM "seçke öğesi" + ROLE_SYSTEM_TOOLTIP "araç ipucu" + ROLE_SYSTEM_APPLICATION "uygulama" + ROLE_SYSTEM_DOCUMENT "belge" + ROLE_SYSTEM_PANE "levha" + ROLE_SYSTEM_CHART "çizge" + ROLE_SYSTEM_DIALOG "iletişim kutusu" + ROLE_SYSTEM_BORDER "hudut" + ROLE_SYSTEM_GROUPING "öbekleme" + ROLE_SYSTEM_SEPARATOR "ayırıcı" + ROLE_SYSTEM_TOOLBAR "araç çubuğu" + ROLE_SYSTEM_STATUSBAR "durum çubuğu" + ROLE_SYSTEM_TABLE "çizelge" + ROLE_SYSTEM_COLUMNHEADER "dikeç başlığı" + ROLE_SYSTEM_ROWHEADER "yataç başlığı" + ROLE_SYSTEM_COLUMN "dikeç" + ROLE_SYSTEM_ROW "yataç" + ROLE_SYSTEM_CELL "göze" + ROLE_SYSTEM_LINK "bağlantı" + ROLE_SYSTEM_HELPBALLOON "yardım balonu" + ROLE_SYSTEM_CHARACTER "damga" + ROLE_SYSTEM_LIST "dizelge" + ROLE_SYSTEM_LISTITEM "dizelge öğesi" + ROLE_SYSTEM_OUTLINE "anaçizgi" + ROLE_SYSTEM_OUTLINEITEM "anaçizgi öğesi" + ROLE_SYSTEM_PAGETAB "sayfa sekmesi" + ROLE_SYSTEM_PROPERTYPAGE "husûsiyet sayfası" + ROLE_SYSTEM_INDICATOR "gösterge" + ROLE_SYSTEM_GRAPHIC "çizge" + ROLE_SYSTEM_STATICTEXT "durağan metin" + ROLE_SYSTEM_TEXT "metin" + ROLE_SYSTEM_PUSHBUTTON "düğme" + ROLE_SYSTEM_CHECKBUTTON "kutucuk" + ROLE_SYSTEM_RADIOBUTTON "seçenek düğmesi" + ROLE_SYSTEM_COMBOBOX "açılan dizelge" + ROLE_SYSTEM_DROPLIST "açılan" + ROLE_SYSTEM_PROGRESSBAR "ilerleme çubuğu" + ROLE_SYSTEM_DIAL "kadran" + ROLE_SYSTEM_HOTKEYFIELD "kısayol düğmesi alanı" + ROLE_SYSTEM_SLIDER "kaydırıcı" + ROLE_SYSTEM_SPINBUTTON "döndürme kutusu" + ROLE_SYSTEM_DIAGRAM "çizenek" + ROLE_SYSTEM_ANIMATION "canlandırma" + ROLE_SYSTEM_EQUATION "denklem" + ROLE_SYSTEM_BUTTONDROPDOWN "açılan düğme" + ROLE_SYSTEM_BUTTONMENU "seçke düğmesi" + ROLE_SYSTEM_BUTTONDROPDOWNGRID "ızgara açılan düğmesi" + ROLE_SYSTEM_WHITESPACE "boşluk" + ROLE_SYSTEM_PAGETABLIST "sayfa sekmesi dizelgesi" + ROLE_SYSTEM_CLOCK "saat" + ROLE_SYSTEM_SPLITBUTTON "ayırma düğmesi" + ROLE_SYSTEM_IPADDRESS "IP adresi" + ROLE_SYSTEM_OUTLINEBUTTON "anaçizgi düğmesi" +} diff --git a/dll/win32/oleacc/oleacc.rc b/dll/win32/oleacc/oleacc.rc index 48b5a168729..7b51c34055d 100644 --- a/dll/win32/oleacc/oleacc.rc +++ b/dll/win32/oleacc/oleacc.rc @@ -65,12 +65,18 @@ #ifdef LANGUAGE_RO_RO #include "lang/oleacc_Ro.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/oleacc_Ru.rc" +#endif #ifdef LANGUAGE_SL_SI #include "lang/oleacc_Si.rc" #endif #ifdef LANGUAGE_SQ_AL #include "lang/oleacc_Sq.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/oleacc_Tr.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/oleacc_Uk.rc" #endif diff --git a/dll/win32/oleaut32/CMakeLists.txt b/dll/win32/oleaut32/CMakeLists.txt index 1673fb07aa4..8bcbdc930c9 100644 --- a/dll/win32/oleaut32/CMakeLists.txt +++ b/dll/win32/oleaut32/CMakeLists.txt @@ -49,6 +49,12 @@ add_library(oleaut32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c ${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(oleaut32 mingwex) + #FIXME: http://llvm.org/bugs/show_bug.cgi?id=19027 + set_property(SOURCE vartype.c APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") +endif() + add_idl_headers(oleaut32_idlheader oleaut32_oaidl.idl) add_dependencies(oleaut32 oleaut32_idlheader) set_module_type(oleaut32 win32dll) diff --git a/dll/win32/oledlg/lang/oledlg_Ru.rc b/dll/win32/oledlg/lang/oledlg_Ru.rc index fd708f5046e..5e20e4b6746 100644 --- a/dll/win32/oledlg/lang/oledlg_Ru.rc +++ b/dll/win32/oledlg/lang/oledlg_Ru.rc @@ -89,7 +89,7 @@ STRINGTABLE IDS_PS_PASTE_OBJECT "Вставка содержимого буфера обмена в документ так, что его можно активировать, используя %s." IDS_PS_PASTE_OBJECT_AS_ICON "Вставка содержимого буфера обмена в документ так, что его можно активировать, используя %s. Он будет отображаться в виде значка." IDS_PS_PASTE_LINK_DATA "Вставка содержимого буфера обмена в документ как %s. Данные будут связаны с исходным файлом, так что изменения в нём будут отражаться в документе." - IDS_PS_PASTE_LINK_OBJECT "Вставка изображения из буфера обмена в документ. Избражение будет связано с исходным файлом, так что изменения в нём будут отражаться в документе." + IDS_PS_PASTE_LINK_OBJECT "Вставка изображения из буфера обмена в документ. Изображение будет связано с исходным файлом, так что изменения в нём будут отражаться в документе." IDS_PS_PASTE_LINK_OBJECT_AS_ICON "Вставка ссылки, которая будет указывать на расположение содержимого буфера обмена. Ссылка будет связана с исходным файлом, так что изменения в нём будут отражаться в документе." IDS_PS_NON_OLE "Вставка содержимое буфера обмена в документ." IDS_PS_UNKNOWN_TYPE "Неизвестный тип" diff --git a/dll/win32/riched20/CMakeLists.txt b/dll/win32/riched20/CMakeLists.txt index 8491fdc1d07..58a9d68cb8b 100644 --- a/dll/win32/riched20/CMakeLists.txt +++ b/dll/win32/riched20/CMakeLists.txt @@ -33,6 +33,11 @@ else() list(APPEND SOURCE txthost.c txtsrv.c) endif() +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + #FIXME: http://llvm.org/bugs/show_bug.cgi?id=19027 + set_property(SOURCE txthost.c txtsrv.c APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") +endif() + list(APPEND ADDITIONAL_SOURCE version.rc ${CMAKE_CURRENT_BINARY_DIR}/riched20.def) diff --git a/dll/win32/rpcrt4/ndr_marshall.c b/dll/win32/rpcrt4/ndr_marshall.c index 51795467e49..857419b5a1c 100644 --- a/dll/win32/rpcrt4/ndr_marshall.c +++ b/dll/win32/rpcrt4/ndr_marshall.c @@ -1193,7 +1193,7 @@ static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *bufptr = bufbase + *(const SHORT*)&info[2]; unsigned char *saved_memory = pStubMsg->Memory; - pStubMsg->Memory = pMemory; + pStubMsg->Memory = membase; PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4); pStubMsg->Memory = saved_memory; } @@ -1347,7 +1347,7 @@ static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *memptr = membase + *(const SHORT*)&info[0]; unsigned char *saved_memory = pStubMsg->Memory; - pStubMsg->Memory = pMemory; + pStubMsg->Memory = membase; PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4); pStubMsg->Memory = saved_memory; } diff --git a/dll/win32/rpcrt4/rpc_transport.c b/dll/win32/rpcrt4/rpc_transport.c index 771c3957376..42f50563be5 100644 --- a/dll/win32/rpcrt4/rpc_transport.c +++ b/dll/win32/rpcrt4/rpc_transport.c @@ -79,6 +79,7 @@ #define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000) +#undef ARRAYSIZE #define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0])) WINE_DEFAULT_DEBUG_CHANNEL(rpc); @@ -407,7 +408,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_np_open_endpoint(RpcServerProtseq *protse } static void rpcrt4_conn_np_handoff(RpcConnection_np *old_npc, RpcConnection_np *new_npc) -{ +{ /* because of the way named pipes work, we'll transfer the connected pipe * to the child, then reopen the server binding to continue listening */ @@ -448,7 +449,7 @@ static RPC_STATUS rpcrt4_ncalrpc_handoff(RpcConnection *old_conn, RpcConnection strcat(strcpy(pname, prefix), old_conn->Endpoint); status = rpcrt4_conn_create_pipe(old_conn, pname); I_RpcFree(pname); - + return status; } @@ -714,9 +715,9 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p HANDLE *objs = prev_array; RpcConnection_np *conn; RpcServerProtseq_np *npps = CONTAINING_RECORD(protseq, RpcServerProtseq_np, common); - + EnterCriticalSection(&protseq->cs); - + /* open and count connections */ *count = 1; conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common); @@ -726,7 +727,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p (*count)++; conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common); } - + /* make array of connections */ if (objs) objs = HeapReAlloc(GetProcessHeap(), 0, objs, *count*sizeof(HANDLE)); @@ -738,7 +739,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p LeaveCriticalSection(&protseq->cs); return NULL; } - + objs[0] = npps->mgr_event; *count = 1; conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common); @@ -763,7 +764,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq, DWORD res; RpcConnection *cconn; RpcConnection_np *conn; - + if (!objs) return -1; @@ -1472,7 +1473,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr conn->Next = protseq->conn; protseq->conn = first_connection; LeaveCriticalSection(&protseq->cs); - + TRACE("listening on %s\n", endpoint); return RPC_S_OK; } @@ -1638,7 +1639,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void RpcServerProtseq_sock *sockps = CONTAINING_RECORD(protseq, RpcServerProtseq_sock, common); EnterCriticalSection(&protseq->cs); - + /* open and count connections */ *count = 1; conn = (RpcConnection_tcp *)protseq->conn; @@ -1647,7 +1648,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void (*count)++; conn = (RpcConnection_tcp *)conn->common.Next; } - + /* make array of connections */ if (poll_info) poll_info = HeapReAlloc(GetProcessHeap(), 0, poll_info, *count*sizeof(*poll_info)); @@ -1689,10 +1690,10 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq unsigned int i; RpcConnection *cconn; RpcConnection_tcp *conn; - + if (!poll_info) return -1; - + ret = poll(poll_info, count, -1); if (ret < 0) { diff --git a/dll/win32/samsrv/lang/ru-RU.rc b/dll/win32/samsrv/lang/ru-RU.rc new file mode 100644 index 00000000000..ce976893f1c --- /dev/null +++ b/dll/win32/samsrv/lang/ru-RU.rc @@ -0,0 +1,27 @@ +/* Russian translation by Kudratov Olimjon (olim98@bk.ru) */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_DOMAIN_BUILTIN_NAME "Встроенный" + IDS_GROUP_NONE_NAME "Пусто" + IDS_GROUP_NONE_COMMENT "Обычные пользователи" + IDS_ALIAS_ADMINISTRATORS_NAME "Администраторы" + IDS_ALIAS_ADMINISTRATORS_COMMENT "Администраторы имеют полные, ничем не ограниченные права доступа к компьютеру или домену." + IDS_ALIAS_GUESTS_NAME "Гости" + IDS_ALIAS_GUESTS_COMMENT "Гости по умолчанию имеют те же права, что и пользователи, за исключением учетной записи ""Guest"", еще более ограниченной в правах." + IDS_ALIAS_POWER_USERS_NAME "Опытные пользователи" + IDS_ALIAS_POWER_USERS_COMMENT "Категория опытных пользователей обладает ограниченными административными правами." + IDS_ALIAS_USERS_NAME "Пользователи" + IDS_ALIAS_USERS_COMMENT "Пользователи не имеют прав на изменение параметров системы и могут запускать большинство приложений." + /* + * ATTENTION: + * If you translate the administator account name, keep IDS_USER_ADMINISTRATOR_NAME and + * syssetup.dll:IDS_ADMINISTRATOR_NAME synchronized. + */ + IDS_USER_ADMINISTRATOR_NAME "Administrator"// Не изменять, иначе будут глюки с нерусскими программами + IDS_USER_ADMINISTRATOR_COMMENT "Встроенная учетная запись администратора компьютера/домена." + IDS_USER_GUEST_NAME "Guest"// Не изменять, иначе будут глюки с нерусскими программами + IDS_USER_GUEST_COMMENT "Встроенная учетная запись для доступа гостей к компьютеру или домену." +END diff --git a/dll/win32/samsrv/samsrv.rc b/dll/win32/samsrv/samsrv.rc index 62f043e6f73..2a650d45012 100644 --- a/dll/win32/samsrv/samsrv.rc +++ b/dll/win32/samsrv/samsrv.rc @@ -34,6 +34,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif #ifdef LANGUAGE_SQ_AL #include "lang/sq-AL.rc" #endif \ No newline at end of file diff --git a/dll/win32/schannel/CMakeLists.txt b/dll/win32/schannel/CMakeLists.txt index 2fcfa26f6ed..b823a69e35d 100644 --- a/dll/win32/schannel/CMakeLists.txt +++ b/dll/win32/schannel/CMakeLists.txt @@ -1,12 +1,20 @@ -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_definitions(-D__WINESRC__) +include_directories( + ${REACTOS_SOURCE_DIR}/include/reactos/wine + ${REACTOS_SOURCE_DIR}/include/reactos/libs/gnutls) + + +add_definitions(-D__WINESRC__ -D_WINE) spec2def(schannel.dll schannel.spec) list(APPEND SOURCE lsamode.c + schannel_gnutls.c schannel_main.c + schannel_wine.c + secur32_wine.c usermode.c + stubs.c precomp.h ${CMAKE_CURRENT_BINARY_DIR}/schannel_stubs.c) @@ -17,6 +25,6 @@ add_library(schannel SHARED set_module_type(schannel win32dll) target_link_libraries(schannel wine) -add_importlibs(schannel secur32 msvcrt kernel32 ntdll) +add_importlibs(schannel crypt32 secur32 advapi32 msvcrt kernel32 ntdll) add_pch(schannel precomp.h SOURCE) add_cd_file(TARGET schannel DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/schannel/msvc_typeof_hack.h b/dll/win32/schannel/msvc_typeof_hack.h new file mode 100644 index 00000000000..390c2970a76 --- /dev/null +++ b/dll/win32/schannel/msvc_typeof_hack.h @@ -0,0 +1,48 @@ + +#pragma once + +#define typeof(_X) __typeof_ ## _X + +typedef gnutls_alert_description_t (__cdecl typeof(gnutls_alert_get))(gnutls_session_t session); +typedef const char* (__cdecl typeof(gnutls_alert_get_name))(gnutls_alert_description_t alert); +typedef void (__cdecl typeof(gnutls_certificate_free_credentials))(gnutls_certificate_credentials_t sc); +typedef int (__cdecl typeof(gnutls_certificate_allocate_credentials))(gnutls_certificate_credentials_t + * res); +typedef const gnutls_datum_t* (__cdecl typeof(gnutls_certificate_get_peers))(gnutls_session_t + session, unsigned int + *list_size); +typedef gnutls_cipher_algorithm_t (__cdecl typeof(gnutls_cipher_get))(gnutls_session_t session); +typedef size_t (__cdecl typeof(gnutls_cipher_get_key_size))(gnutls_cipher_algorithm_t algorithm); +typedef int (__cdecl typeof(gnutls_credentials_set))(gnutls_session_t session, + gnutls_credentials_type_t type, void *cred); +typedef void (__cdecl typeof(gnutls_deinit))(gnutls_session_t session); +typedef int (__cdecl typeof(gnutls_global_init))(void); +typedef void (__cdecl typeof(gnutls_global_deinit))(void); +typedef void (__cdecl typeof(gnutls_global_set_log_function))(gnutls_log_func log_func); +typedef void (__cdecl typeof(gnutls_global_set_log_level))(int level); +typedef int (__cdecl typeof(gnutls_handshake))(gnutls_session_t session); +typedef int (__cdecl typeof(gnutls_init))(gnutls_session_t * session, unsigned int flags); +typedef gnutls_kx_algorithm_t (__cdecl typeof(gnutls_kx_get))(gnutls_session_t session); +typedef gnutls_mac_algorithm_t (__cdecl typeof(gnutls_mac_get))(gnutls_session_t session); +typedef size_t (__cdecl typeof(gnutls_mac_get_key_size))(gnutls_mac_algorithm_t algorithm); +typedef void (__cdecl typeof(gnutls_perror))(int error); +typedef gnutls_protocol_t (__cdecl typeof(gnutls_protocol_get_version))(gnutls_session_t session); +typedef int (__cdecl typeof(gnutls_priority_set_direct))(gnutls_session_t session, + const char *priorities, + const char **err_pos); +typedef size_t (__cdecl typeof(gnutls_record_get_max_size))(gnutls_session_t session); +typedef ssize_t (__cdecl typeof(gnutls_record_recv))(gnutls_session_t session, void *data, + size_t data_size); +typedef ssize_t (__cdecl typeof(gnutls_record_send))(gnutls_session_t session, const void *data, + size_t data_size); +typedef int (__cdecl typeof(gnutls_server_name_set))(gnutls_session_t session, + gnutls_server_name_type_t type, + const void *name, size_t name_length); +typedef gnutls_transport_ptr_t (__cdecl typeof(gnutls_transport_get_ptr))(gnutls_session_t session); +typedef void (__cdecl typeof(gnutls_transport_set_errno))(gnutls_session_t session, int err); +typedef void (__cdecl typeof(gnutls_transport_set_ptr))(gnutls_session_t session, + gnutls_transport_ptr_t ptr); +typedef void (__cdecl typeof(gnutls_transport_set_push_function))(gnutls_session_t session, + gnutls_push_func push_func); +typedef void (__cdecl typeof(gnutls_transport_set_pull_function))(gnutls_session_t session, + gnutls_pull_func pull_func); diff --git a/dll/win32/schannel/precomp.h b/dll/win32/schannel/precomp.h index d9a7053494b..7c18e61d895 100644 --- a/dll/win32/schannel/precomp.h +++ b/dll/win32/schannel/precomp.h @@ -10,11 +10,20 @@ #define WIN32_NO_STATUS #include #include +#include +#include #include #include #include +#include + +#include +#include "schannel_priv.h" + #include +#include + WINE_DEFAULT_DEBUG_CHANNEL(schannel); #endif /* _SCHANNEL_PCH_ */ diff --git a/dll/win32/schannel/schannel.spec b/dll/win32/schannel/schannel.spec index 6944d1de0b1..b6f452d64f0 100644 --- a/dll/win32/schannel/schannel.spec +++ b/dll/win32/schannel/schannel.spec @@ -1,20 +1,20 @@ -@ stdcall AcceptSecurityContext(ptr ptr ptr long long ptr ptr ptr ptr) secur32.AcceptSecurityContext -@ stdcall AcquireCredentialsHandleA(str str long ptr ptr ptr ptr ptr ptr) secur32.AcquireCredentialsHandleA -@ stdcall AcquireCredentialsHandleW(wstr wstr long ptr ptr ptr ptr ptr ptr) secur32.AcquireCredentialsHandleW -@ stdcall ApplyControlToken(ptr ptr) secur32.ApplyControlToken +@ stdcall AcceptSecurityContext(ptr ptr ptr long long ptr ptr ptr ptr) schan_AcceptSecurityContext +@ stdcall AcquireCredentialsHandleA(str str long ptr ptr ptr ptr ptr ptr) schan_AcquireCredentialsHandleA +@ stdcall AcquireCredentialsHandleW(wstr wstr long ptr ptr ptr ptr ptr ptr) schan_AcquireCredentialsHandleW +@ stdcall ApplyControlToken(ptr ptr) schan_ApplyControlToken @ stub CloseSslPerformanceData @ stub CollectSslPerformanceData -@ stdcall CompleteAuthToken(ptr ptr) secur32.CompleteAuthToken -@ stdcall DeleteSecurityContext(ptr) secur32.DeleteSecurityContext -@ stdcall EnumerateSecurityPackagesA(ptr ptr) secur32.EnumerateSecurityPackagesA -@ stdcall EnumerateSecurityPackagesW(ptr ptr) secur32.EnumerateSecurityPackagesW -@ stdcall FreeContextBuffer(ptr) secur32.FreeContextBuffer -@ stdcall FreeCredentialsHandle(ptr) secur32.FreeCredentialsHandle -@ stdcall ImpersonateSecurityContext(ptr) secur32.ImpersonateSecurityContext -@ stdcall InitSecurityInterfaceA() secur32.InitSecurityInterfaceA -@ stdcall InitSecurityInterfaceW() secur32.InitSecurityInterfaceW -@ stdcall InitializeSecurityContextA(ptr ptr str long long long ptr long ptr ptr ptr ptr) secur32.InitializeSecurityContextA -@ stdcall InitializeSecurityContextW(ptr ptr wstr long long long ptr long ptr ptr ptr ptr) secur32.InitializeSecurityContextW +@ stdcall CompleteAuthToken(ptr ptr) schan_CompleteAuthToken +@ stdcall DeleteSecurityContext(ptr) schan_DeleteSecurityContext +@ stdcall EnumerateSecurityPackagesA(ptr ptr) schan_EnumerateSecurityPackagesA +@ stdcall EnumerateSecurityPackagesW(ptr ptr) schan_EnumerateSecurityPackagesW +@ stdcall FreeContextBuffer(ptr) schan_FreeContextBuffer +@ stdcall FreeCredentialsHandle(ptr) schan_FreeCredentialsHandle +@ stdcall ImpersonateSecurityContext(ptr) schan_ImpersonateSecurityContext +@ stdcall InitSecurityInterfaceA() schan_InitSecurityInterfaceA +@ stdcall InitSecurityInterfaceW() schan_InitSecurityInterfaceW +@ stdcall InitializeSecurityContextA(ptr ptr str long long long ptr long ptr ptr ptr ptr) schan_InitializeSecurityContextA +@ stdcall InitializeSecurityContextW(ptr ptr wstr long long long ptr long ptr ptr ptr ptr) schan_InitializeSecurityContextW @ stdcall MakeSignature(ptr long ptr long) secur32.MakeSignature @ stub OpenSslPerformanceData @ stdcall QueryContextAttributesA(ptr long ptr) secur32.QueryContextAttributesA diff --git a/dll/win32/schannel/schannel_gnutls.c b/dll/win32/schannel/schannel_gnutls.c new file mode 100644 index 00000000000..114354b3835 --- /dev/null +++ b/dll/win32/schannel/schannel_gnutls.c @@ -0,0 +1,598 @@ +/* + * GnuTLS-based implementation of the schannel (SSL/TLS) provider. + * + * Copyright 2005 Juan Lang + * Copyright 2008 Henri Verbeet + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" + +#include +#include +#include + +#ifdef SONAME_LIBGNUTLS +#include +#include +#endif + +#define __wine_dbch_secur32 __wine_dbch_schannel + +#if defined(SONAME_LIBGNUTLS) && !defined(HAVE_SECURITY_SECURITY_H) + +static void *libgnutls_handle; + +#ifdef _MSC_VER +#include "msvc_typeof_hack.h" +#endif + +#define MAKE_FUNCPTR(f) static typeof(f) * p##f +MAKE_FUNCPTR(gnutls_alert_get); +MAKE_FUNCPTR(gnutls_alert_get_name); +MAKE_FUNCPTR(gnutls_certificate_allocate_credentials); +MAKE_FUNCPTR(gnutls_certificate_free_credentials); +MAKE_FUNCPTR(gnutls_certificate_get_peers); +MAKE_FUNCPTR(gnutls_cipher_get); +MAKE_FUNCPTR(gnutls_cipher_get_key_size); +MAKE_FUNCPTR(gnutls_credentials_set); +MAKE_FUNCPTR(gnutls_deinit); +MAKE_FUNCPTR(gnutls_global_deinit); +MAKE_FUNCPTR(gnutls_global_init); +MAKE_FUNCPTR(gnutls_global_set_log_function); +MAKE_FUNCPTR(gnutls_global_set_log_level); +MAKE_FUNCPTR(gnutls_handshake); +MAKE_FUNCPTR(gnutls_init); +MAKE_FUNCPTR(gnutls_kx_get); +MAKE_FUNCPTR(gnutls_mac_get); +MAKE_FUNCPTR(gnutls_mac_get_key_size); +MAKE_FUNCPTR(gnutls_perror); +MAKE_FUNCPTR(gnutls_protocol_get_version); +MAKE_FUNCPTR(gnutls_priority_set_direct); +MAKE_FUNCPTR(gnutls_record_get_max_size); +MAKE_FUNCPTR(gnutls_record_recv); +MAKE_FUNCPTR(gnutls_record_send); +MAKE_FUNCPTR(gnutls_server_name_set); +MAKE_FUNCPTR(gnutls_transport_get_ptr); +MAKE_FUNCPTR(gnutls_transport_set_errno); +MAKE_FUNCPTR(gnutls_transport_set_ptr); +MAKE_FUNCPTR(gnutls_transport_set_pull_function); +MAKE_FUNCPTR(gnutls_transport_set_push_function); +#undef MAKE_FUNCPTR + + + +static ssize_t schan_pull_adapter(gnutls_transport_ptr_t transport, + void *buff, size_t buff_len) +{ + struct schan_transport *t = (struct schan_transport*)transport; + gnutls_session_t s = (gnutls_session_t)schan_session_for_transport(t); + + int ret = schan_pull(transport, buff, &buff_len); + if (ret) + { + pgnutls_transport_set_errno(s, ret); + return -1; + } + + return buff_len; +} + +static ssize_t schan_push_adapter(gnutls_transport_ptr_t transport, + const void *buff, size_t buff_len) +{ + struct schan_transport *t = (struct schan_transport*)transport; + gnutls_session_t s = (gnutls_session_t)schan_session_for_transport(t); + + int ret = schan_push(transport, buff, &buff_len); + if (ret) + { + pgnutls_transport_set_errno(s, ret); + return -1; + } + + return buff_len; +} + +static const struct { + DWORD enable_flag; + const char *gnutls_flag; +} protocol_priority_flags[] = { + {SP_PROT_TLS1_2_CLIENT, "VERS-TLS1.2"}, + {SP_PROT_TLS1_1_CLIENT, "VERS-TLS1.1"}, + {SP_PROT_TLS1_0_CLIENT, "VERS-TLS1.0"}, + {SP_PROT_SSL3_CLIENT, "VERS-SSL3.0"} + /* {SP_PROT_SSL2_CLIENT} is not supported by GnuTLS */ +}; + +DWORD schan_imp_enabled_protocols(void) +{ + /* NOTE: No support for SSL 2.0 */ + return SP_PROT_SSL3_CLIENT | SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT; +} + +BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cred) +{ + gnutls_session_t *s = (gnutls_session_t*)session; + char priority[64] = "NORMAL", *p; + unsigned i; + + int err = pgnutls_init(s, cred->credential_use == SECPKG_CRED_INBOUND ? GNUTLS_SERVER : GNUTLS_CLIENT); + if (err != GNUTLS_E_SUCCESS) + { + pgnutls_perror(err); + return FALSE; + } + + p = priority + strlen(priority); + for(i=0; i < sizeof(protocol_priority_flags)/sizeof(*protocol_priority_flags); i++) { + *p++ = ':'; + *p++ = (cred->enabled_protocols & protocol_priority_flags[i].enable_flag) ? '+' : '-'; + strcpy(p, protocol_priority_flags[i].gnutls_flag); + p += strlen(p); + } + + TRACE("Using %s priority\n", debugstr_a(priority)); + err = pgnutls_priority_set_direct(*s, priority, NULL); + if (err != GNUTLS_E_SUCCESS) + { + pgnutls_perror(err); + pgnutls_deinit(*s); + return FALSE; + } + + err = pgnutls_credentials_set(*s, GNUTLS_CRD_CERTIFICATE, + (gnutls_certificate_credentials_t)cred->credentials); + if (err != GNUTLS_E_SUCCESS) + { + pgnutls_perror(err); + pgnutls_deinit(*s); + return FALSE; + } + + pgnutls_transport_set_pull_function(*s, schan_pull_adapter); + pgnutls_transport_set_push_function(*s, schan_push_adapter); + + return TRUE; +} + +void schan_imp_dispose_session(schan_imp_session session) +{ + gnutls_session_t s = (gnutls_session_t)session; + pgnutls_deinit(s); +} + +void schan_imp_set_session_transport(schan_imp_session session, + struct schan_transport *t) +{ + gnutls_session_t s = (gnutls_session_t)session; + pgnutls_transport_set_ptr(s, (gnutls_transport_ptr_t)t); +} + +void schan_imp_set_session_target(schan_imp_session session, const char *target) +{ + gnutls_session_t s = (gnutls_session_t)session; + + pgnutls_server_name_set( s, GNUTLS_NAME_DNS, target, strlen(target) ); +} + +SECURITY_STATUS schan_imp_handshake(schan_imp_session session) +{ + gnutls_session_t s = (gnutls_session_t)session; + int err; + + while(1) { + err = pgnutls_handshake(s); + switch(err) { + case GNUTLS_E_SUCCESS: + TRACE("Handshake completed\n"); + return SEC_E_OK; + + case GNUTLS_E_AGAIN: + TRACE("Continue...\n"); + return SEC_I_CONTINUE_NEEDED; + + case GNUTLS_E_WARNING_ALERT_RECEIVED: + { + gnutls_alert_description_t alert = pgnutls_alert_get(s); + + WARN("WARNING ALERT: %d %s\n", alert, pgnutls_alert_get_name(alert)); + + switch(alert) { + case GNUTLS_A_UNRECOGNIZED_NAME: + TRACE("Ignoring\n"); + continue; + default: + return SEC_E_INTERNAL_ERROR; + } + } + + case GNUTLS_E_FATAL_ALERT_RECEIVED: + { + gnutls_alert_description_t alert = pgnutls_alert_get(s); + WARN("FATAL ALERT: %d %s\n", alert, pgnutls_alert_get_name(alert)); + return SEC_E_INTERNAL_ERROR; + } + + default: + pgnutls_perror(err); + return SEC_E_INTERNAL_ERROR; + } + } + + /* Never reached */ + return SEC_E_OK; +} + +static unsigned int schannel_get_cipher_block_size(gnutls_cipher_algorithm_t cipher) +{ + const struct + { + gnutls_cipher_algorithm_t cipher; + unsigned int block_size; + } + algorithms[] = + { + {GNUTLS_CIPHER_3DES_CBC, 8}, + {GNUTLS_CIPHER_AES_128_CBC, 16}, + {GNUTLS_CIPHER_AES_256_CBC, 16}, + {GNUTLS_CIPHER_ARCFOUR_128, 1}, + {GNUTLS_CIPHER_ARCFOUR_40, 1}, + {GNUTLS_CIPHER_DES_CBC, 8}, + {GNUTLS_CIPHER_NULL, 1}, + {GNUTLS_CIPHER_RC2_40_CBC, 8}, + }; + unsigned int i; + + for (i = 0; i < sizeof(algorithms) / sizeof(*algorithms); ++i) + { + if (algorithms[i].cipher == cipher) + return algorithms[i].block_size; + } + + FIXME("Unknown cipher %#x, returning 1\n", cipher); + + return 1; +} + +static DWORD schannel_get_protocol(gnutls_protocol_t proto) +{ + /* FIXME: currently schannel only implements client connections, but + * there's no reason it couldn't be used for servers as well. The + * context doesn't tell us which it is, so assume client for now. + */ + switch (proto) + { + case GNUTLS_SSL3: return SP_PROT_SSL3_CLIENT; + case GNUTLS_TLS1_0: return SP_PROT_TLS1_0_CLIENT; + case GNUTLS_TLS1_1: return SP_PROT_TLS1_1_CLIENT; + case GNUTLS_TLS1_2: return SP_PROT_TLS1_2_CLIENT; + default: + FIXME("unknown protocol %d\n", proto); + return 0; + } +} + +static ALG_ID schannel_get_cipher_algid(gnutls_cipher_algorithm_t cipher) +{ + switch (cipher) + { + case GNUTLS_CIPHER_UNKNOWN: + case GNUTLS_CIPHER_NULL: return 0; + case GNUTLS_CIPHER_ARCFOUR_40: + case GNUTLS_CIPHER_ARCFOUR_128: return CALG_RC4; + case GNUTLS_CIPHER_DES_CBC: + case GNUTLS_CIPHER_3DES_CBC: return CALG_DES; + case GNUTLS_CIPHER_AES_128_CBC: + case GNUTLS_CIPHER_AES_256_CBC: return CALG_AES; + case GNUTLS_CIPHER_RC2_40_CBC: return CALG_RC2; + default: + FIXME("unknown algorithm %d\n", cipher); + return 0; + } +} + +static ALG_ID schannel_get_mac_algid(gnutls_mac_algorithm_t mac) +{ + switch (mac) + { + case GNUTLS_MAC_UNKNOWN: + case GNUTLS_MAC_NULL: return 0; + case GNUTLS_MAC_MD5: return CALG_MD5; + case GNUTLS_MAC_SHA1: + case GNUTLS_MAC_SHA256: + case GNUTLS_MAC_SHA384: + case GNUTLS_MAC_SHA512: return CALG_SHA; + default: + FIXME("unknown algorithm %d\n", mac); + return 0; + } +} + +static ALG_ID schannel_get_kx_algid(gnutls_kx_algorithm_t kx) +{ + switch (kx) + { + case GNUTLS_KX_RSA: return CALG_RSA_KEYX; + case GNUTLS_KX_DHE_DSS: + case GNUTLS_KX_DHE_RSA: return CALG_DH_EPHEM; + default: + FIXME("unknown algorithm %d\n", kx); + return 0; + } +} + +unsigned int schan_imp_get_session_cipher_block_size(schan_imp_session session) +{ + gnutls_session_t s = (gnutls_session_t)session; + gnutls_cipher_algorithm_t cipher = pgnutls_cipher_get(s); + return schannel_get_cipher_block_size(cipher); +} + +unsigned int schan_imp_get_max_message_size(schan_imp_session session) +{ + return pgnutls_record_get_max_size((gnutls_session_t)session); +} + +SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session, + SecPkgContext_ConnectionInfo *info) +{ + gnutls_session_t s = (gnutls_session_t)session; + gnutls_protocol_t proto = pgnutls_protocol_get_version(s); + gnutls_cipher_algorithm_t alg = pgnutls_cipher_get(s); + gnutls_mac_algorithm_t mac = pgnutls_mac_get(s); + gnutls_kx_algorithm_t kx = pgnutls_kx_get(s); + + info->dwProtocol = schannel_get_protocol(proto); + info->aiCipher = schannel_get_cipher_algid(alg); + info->dwCipherStrength = pgnutls_cipher_get_key_size(alg) * 8; + info->aiHash = schannel_get_mac_algid(mac); + info->dwHashStrength = pgnutls_mac_get_key_size(mac) * 8; + info->aiExch = schannel_get_kx_algid(kx); + /* FIXME: info->dwExchStrength? */ + info->dwExchStrength = 0; + return SEC_E_OK; +} + +SECURITY_STATUS schan_imp_get_session_peer_certificate(schan_imp_session session, HCERTSTORE store, + PCCERT_CONTEXT *ret) +{ + gnutls_session_t s = (gnutls_session_t)session; + PCCERT_CONTEXT cert = NULL; + const gnutls_datum_t *datum; + unsigned list_size, i; + BOOL res; + + datum = pgnutls_certificate_get_peers(s, &list_size); + if(!datum) + return SEC_E_INTERNAL_ERROR; + + for(i = 0; i < list_size; i++) { + res = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, datum[i].data, datum[i].size, + CERT_STORE_ADD_REPLACE_EXISTING, i ? NULL : &cert); + if(!res) { + if(i) + CertFreeCertificateContext(cert); + return GetLastError(); + } + } + + *ret = cert; + return SEC_E_OK; +} + +SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer, + SIZE_T *length) +{ + gnutls_session_t s = (gnutls_session_t)session; + ssize_t ret; + +again: + ret = pgnutls_record_send(s, buffer, *length); + + if (ret >= 0) + *length = ret; + else if (ret == GNUTLS_E_AGAIN) + { + struct schan_transport *t = (struct schan_transport *)pgnutls_transport_get_ptr(s); + SIZE_T count = 0; + + if (schan_get_buffer(t, &t->out, &count)) + goto again; + + return SEC_I_CONTINUE_NEEDED; + } + else + { + pgnutls_perror(ret); + return SEC_E_INTERNAL_ERROR; + } + + return SEC_E_OK; +} + +SECURITY_STATUS schan_imp_recv(schan_imp_session session, void *buffer, + SIZE_T *length) +{ + gnutls_session_t s = (gnutls_session_t)session; + ssize_t ret; + +again: + ret = pgnutls_record_recv(s, buffer, *length); + + if (ret >= 0) + *length = ret; + else if (ret == GNUTLS_E_AGAIN) + { + struct schan_transport *t = (struct schan_transport *)pgnutls_transport_get_ptr(s); + SIZE_T count = 0; + + if (schan_get_buffer(t, &t->in, &count)) + goto again; + + return SEC_I_CONTINUE_NEEDED; + } + else + { + pgnutls_perror(ret); + return SEC_E_INTERNAL_ERROR; + } + + return SEC_E_OK; +} + +BOOL schan_imp_allocate_certificate_credentials(schan_credentials *c) +{ + int ret = pgnutls_certificate_allocate_credentials((gnutls_certificate_credentials_t*)&c->credentials); + if (ret != GNUTLS_E_SUCCESS) + pgnutls_perror(ret); + return (ret == GNUTLS_E_SUCCESS); +} + +void schan_imp_free_certificate_credentials(schan_credentials *c) +{ + pgnutls_certificate_free_credentials(c->credentials); +} + +static void schan_gnutls_log(int level, const char *msg) +{ + TRACE("<%d> %s", level, msg); +} + +BOOL schan_imp_init(void) +{ + int ret; + +#ifndef __REACTOS__ + libgnutls_handle = wine_dlopen(SONAME_LIBGNUTLS, RTLD_NOW, NULL, 0); + if (!libgnutls_handle) + { + WARN("Failed to load libgnutls.\n"); + return FALSE; + } + +#define LOAD_FUNCPTR(f) \ + if (!(p##f = wine_dlsym(libgnutls_handle, #f, NULL, 0))) \ + { \ + ERR("Failed to load %s\n", #f); \ + goto fail; \ + } +#else +/* + static const WCHAR RosSchannelKey[] = L"Software\\ReactOS\\Schannel"; + static const WCHAR PathValue[] = L"GnuTLSPath"; + WCHAR Path[MAX_PATH]; + DWORD PathSize = sizeof(Path), ValueType; + HKEY Key; + DWORD Error; + + Error = RegOpenKeyW(HKEY_LOCAL_MACHINE, RosSchannelKey, &Key); + if(Error != ERROR_SUCCESS) + return FALSE; + + Error = RegQueryValueExW(Key, PathValue, NULL, &ValueType, (LPBYTE)Path, &PathSize); + RegCloseKey(Key); + if ((Error != ERROR_SUCCESS) || (ValueType != REG_SZ)) + return FALSE; + wcscat(Path, L"\\"); + wcscat(Path, SONAME_LIBGNUTLS); +*/ + static const WCHAR Path[] = L"C:\\Reactos\\system32\\gnutls\\libgnutls-28.dll"; + + libgnutls_handle = LoadLibraryExW(Path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (!libgnutls_handle) + { + ERR("Could not load %S.\n", Path); + return FALSE; + } + +#define LOAD_FUNCPTR(f) \ + if (!(p##f = (void*)GetProcAddress(libgnutls_handle, #f))) \ + { \ + ERR("Failed to load %s\n", #f); \ + goto fail; \ + } +#endif // __REACTOS__ + + LOAD_FUNCPTR(gnutls_alert_get) + LOAD_FUNCPTR(gnutls_alert_get_name) + LOAD_FUNCPTR(gnutls_certificate_allocate_credentials) + LOAD_FUNCPTR(gnutls_certificate_free_credentials) + LOAD_FUNCPTR(gnutls_certificate_get_peers) + LOAD_FUNCPTR(gnutls_cipher_get) + LOAD_FUNCPTR(gnutls_cipher_get_key_size) + LOAD_FUNCPTR(gnutls_credentials_set) + LOAD_FUNCPTR(gnutls_deinit) + LOAD_FUNCPTR(gnutls_global_deinit) + LOAD_FUNCPTR(gnutls_global_init) + LOAD_FUNCPTR(gnutls_global_set_log_function) + LOAD_FUNCPTR(gnutls_global_set_log_level) + LOAD_FUNCPTR(gnutls_handshake) + LOAD_FUNCPTR(gnutls_init) + LOAD_FUNCPTR(gnutls_kx_get) + LOAD_FUNCPTR(gnutls_mac_get) + LOAD_FUNCPTR(gnutls_mac_get_key_size) + LOAD_FUNCPTR(gnutls_perror) + LOAD_FUNCPTR(gnutls_protocol_get_version) + LOAD_FUNCPTR(gnutls_priority_set_direct) + LOAD_FUNCPTR(gnutls_record_get_max_size); + LOAD_FUNCPTR(gnutls_record_recv); + LOAD_FUNCPTR(gnutls_record_send); + LOAD_FUNCPTR(gnutls_server_name_set) + LOAD_FUNCPTR(gnutls_transport_get_ptr) + LOAD_FUNCPTR(gnutls_transport_set_errno) + LOAD_FUNCPTR(gnutls_transport_set_ptr) + LOAD_FUNCPTR(gnutls_transport_set_pull_function) + LOAD_FUNCPTR(gnutls_transport_set_push_function) +#undef LOAD_FUNCPTR + + ret = pgnutls_global_init(); + if (ret != GNUTLS_E_SUCCESS) + { + pgnutls_perror(ret); + goto fail; + } + + if (TRACE_ON(secur32)) + { + pgnutls_global_set_log_level(4); + pgnutls_global_set_log_function(schan_gnutls_log); + } + + return TRUE; + +fail: +#ifndef __REACTOS__ + wine_dlclose(libgnutls_handle, NULL, 0); +#else + FreeLibrary(libgnutls_handle); +#endif + libgnutls_handle = NULL; + return FALSE; +} + +void schan_imp_deinit(void) +{ + pgnutls_global_deinit(); +#ifndef __REACTOS__ + wine_dlclose(libgnutls_handle, NULL, 0); +#else + FreeLibrary(libgnutls_handle); +#endif + libgnutls_handle = NULL; +} + +#endif /* SONAME_LIBGNUTLS && !HAVE_SECURITY_SECURITY_H */ diff --git a/dll/win32/schannel/schannel_main.c b/dll/win32/schannel/schannel_main.c index f309d667e2c..27c35a300d1 100644 --- a/dll/win32/schannel/schannel_main.c +++ b/dll/win32/schannel/schannel_main.c @@ -27,7 +27,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) if (fdwReason == DLL_WINE_PREATTACH) return FALSE; /* prefer native version */ if (fdwReason == DLL_PROCESS_ATTACH) + { DisableThreadLibraryCalls(hinstDLL); + SECUR32_initSchannelSP(); + } return TRUE; } @@ -43,3 +46,19 @@ BOOL WINAPI SslEmptyCacheW(LPWSTR target, DWORD flags) FIXME("%s %x\n", debugstr_w(target), flags); return TRUE; } + +PSecurityFunctionTableW +WINAPI +schan_InitSecurityInterfaceW(VOID) +{ + TRACE("InitSecurityInterfaceW() called\n"); + return &schanTableW; +} + +PSecurityFunctionTableA +WINAPI +schan_InitSecurityInterfaceA(VOID) +{ + TRACE("InitSecurityInterfaceA() called\n"); + return &schanTableA; +} diff --git a/dll/win32/schannel/schannel_priv.h b/dll/win32/schannel/schannel_priv.h new file mode 100644 index 00000000000..63e82a3c8c4 --- /dev/null +++ b/dll/win32/schannel/schannel_priv.h @@ -0,0 +1,130 @@ +/* + * secur32 private definitions. + * + * Copyright (C) 2004 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SCHANNEL_PRIV_H__ +#define __SCHANNEL_PRIV_H__ + +typedef struct _SecureProvider +{ + struct list entry; + BOOL loaded; + PWSTR moduleName; + HMODULE lib; +} SecureProvider; + +typedef struct _SecurePackage +{ + struct list entry; + SecPkgInfoW infoW; + SecureProvider *provider; +} SecurePackage; + +/* Allocates space for and initializes a new provider. If fnTableA or fnTableW + * is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL, + * means must load the LSA/user mode functions tables from external SSP/AP module. + * Otherwise moduleName must not be NULL. + * Returns a pointer to the stored provider entry, for use adding packages. + */ +SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, + const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) DECLSPEC_HIDDEN; + +/* Allocates space for and adds toAdd packages with the given provider. + * provider must not be NULL, and either infoA or infoW may be NULL, but not + * both. + */ +void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, + const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) DECLSPEC_HIDDEN; + +/* Initialization functions for built-in providers */ +void SECUR32_initSchannelSP(void) DECLSPEC_HIDDEN; + +/* schannel internal interface */ +typedef struct schan_imp_session_opaque *schan_imp_session; + +typedef struct schan_credentials +{ + ULONG credential_use; + void *credentials; + DWORD enabled_protocols; +} schan_credentials; + +struct schan_transport; + +struct schan_buffers +{ + SIZE_T offset; + SIZE_T limit; + const SecBufferDesc *desc; + int current_buffer_idx; + BOOL allow_buffer_resize; + int (*get_next_buffer)(const struct schan_transport *, struct schan_buffers *); +}; + +struct schan_transport +{ + struct schan_context *ctx; + struct schan_buffers in; + struct schan_buffers out; +}; + +char *schan_get_buffer(const struct schan_transport *t, struct schan_buffers *s, SIZE_T *count) DECLSPEC_HIDDEN; +extern int schan_pull(struct schan_transport *t, void *buff, size_t *buff_len) DECLSPEC_HIDDEN; +extern int schan_push(struct schan_transport *t, const void *buff, size_t *buff_len) DECLSPEC_HIDDEN; + +extern schan_imp_session schan_session_for_transport(struct schan_transport* t) DECLSPEC_HIDDEN; + +/* schannel implementation interface */ +extern BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cred) DECLSPEC_HIDDEN; +extern void schan_imp_dispose_session(schan_imp_session session) DECLSPEC_HIDDEN; +extern void schan_imp_set_session_transport(schan_imp_session session, + struct schan_transport *t) DECLSPEC_HIDDEN; +extern void schan_imp_set_session_target(schan_imp_session session, const char *target) DECLSPEC_HIDDEN; +extern SECURITY_STATUS schan_imp_handshake(schan_imp_session session) DECLSPEC_HIDDEN; +extern unsigned int schan_imp_get_session_cipher_block_size(schan_imp_session session) DECLSPEC_HIDDEN; +extern unsigned int schan_imp_get_max_message_size(schan_imp_session session) DECLSPEC_HIDDEN; +extern SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session, + SecPkgContext_ConnectionInfo *info) DECLSPEC_HIDDEN; +extern SECURITY_STATUS schan_imp_get_session_peer_certificate(schan_imp_session session, HCERTSTORE, + PCCERT_CONTEXT *cert) DECLSPEC_HIDDEN; +extern SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer, + SIZE_T *length) DECLSPEC_HIDDEN; +extern SECURITY_STATUS schan_imp_recv(schan_imp_session session, void *buffer, + SIZE_T *length) DECLSPEC_HIDDEN; +extern BOOL schan_imp_allocate_certificate_credentials(schan_credentials*) DECLSPEC_HIDDEN; +extern void schan_imp_free_certificate_credentials(schan_credentials*) DECLSPEC_HIDDEN; +extern DWORD schan_imp_enabled_protocols(void) DECLSPEC_HIDDEN; +extern BOOL schan_imp_init(void) DECLSPEC_HIDDEN; +extern void schan_imp_deinit(void) DECLSPEC_HIDDEN; + +SECURITY_STATUS +WINAPI +schan_FreeContextBuffer ( + PVOID pvoid + ); +SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesA(PULONG pcPackages, + PSecPkgInfoA *ppPackageInfo); +SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesW(PULONG pcPackages, + PSecPkgInfoW *ppPackageInfo); +extern SecurityFunctionTableA schanTableA; +extern SecurityFunctionTableW schanTableW; + +#endif /* ndef __SCHANNEL_PRIV_H__ */ + + diff --git a/dll/win32/schannel/schannel_wine.c b/dll/win32/schannel/schannel_wine.c new file mode 100644 index 00000000000..c31a47cb440 --- /dev/null +++ b/dll/win32/schannel/schannel_wine.c @@ -0,0 +1,1471 @@ +/* Copyright (C) 2005 Juan Lang + * Copyright 2008 Henri Verbeet + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * This file implements the schannel provider, or, the SSL/TLS implementations. + */ + +#include "precomp.h" + +#include + +#if defined(SONAME_LIBGNUTLS) || defined (HAVE_SECURITY_SECURITY_H) + +#define SCHAN_INVALID_HANDLE ~0UL + +enum schan_handle_type +{ + SCHAN_HANDLE_CRED, + SCHAN_HANDLE_CTX, + SCHAN_HANDLE_FREE +}; + +struct schan_handle +{ + void *object; + enum schan_handle_type type; +}; + +struct schan_context +{ + schan_imp_session session; + ULONG req_ctx_attr; + const CERT_CONTEXT *cert; +}; + +static struct schan_handle *schan_handle_table; +static struct schan_handle *schan_free_handles; +static SIZE_T schan_handle_table_size; +static SIZE_T schan_handle_count; + +/* Protocols enabled, only those may be used for the connection. */ +static DWORD config_enabled_protocols; + +/* Protocols disabled by default. They are enabled for using, but disabled when caller asks for default settings. */ +static DWORD config_default_disabled_protocols; + +static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) +{ + struct schan_handle *handle; + + if (schan_free_handles) + { + DWORD index = schan_free_handles - schan_handle_table; + /* Use a free handle */ + handle = schan_free_handles; + if (handle->type != SCHAN_HANDLE_FREE) + { + ERR("Handle %d(%p) is in the free list, but has type %#x.\n", index, handle, handle->type); + return SCHAN_INVALID_HANDLE; + } + schan_free_handles = handle->object; + handle->object = object; + handle->type = type; + + return index; + } + if (!(schan_handle_count < schan_handle_table_size)) + { + /* Grow the table */ + SIZE_T new_size = schan_handle_table_size + (schan_handle_table_size >> 1); + struct schan_handle *new_table = HeapReAlloc(GetProcessHeap(), 0, schan_handle_table, new_size * sizeof(*schan_handle_table)); + if (!new_table) + { + ERR("Failed to grow the handle table\n"); + return SCHAN_INVALID_HANDLE; + } + schan_handle_table = new_table; + schan_handle_table_size = new_size; + } + + handle = &schan_handle_table[schan_handle_count++]; + handle->object = object; + handle->type = type; + + return handle - schan_handle_table; +} + +static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type) +{ + struct schan_handle *handle; + void *object; + + if (handle_idx == SCHAN_INVALID_HANDLE) return NULL; + if (handle_idx >= schan_handle_count) return NULL; + handle = &schan_handle_table[handle_idx]; + if (handle->type != type) + { + ERR("Handle %ld(%p) is not of type %#x\n", handle_idx, handle, type); + return NULL; + } + + object = handle->object; + handle->object = schan_free_handles; + handle->type = SCHAN_HANDLE_FREE; + schan_free_handles = handle; + + return object; +} + +static void *schan_get_object(ULONG_PTR handle_idx, enum schan_handle_type type) +{ + struct schan_handle *handle; + + if (handle_idx == SCHAN_INVALID_HANDLE) return NULL; + if (handle_idx >= schan_handle_count) return NULL; + handle = &schan_handle_table[handle_idx]; + if (handle->type != type) + { + ERR("Handle %ld(%p) is not of type %#x\n", handle_idx, handle, type); + return NULL; + } + + return handle->object; +} + +static void read_config(void) +{ + DWORD enabled = 0, default_disabled = 0; + HKEY protocols_key, key; + WCHAR subkey_name[64]; + unsigned i; + DWORD res; + + static BOOL config_read = FALSE; + + static const WCHAR protocol_config_key_name[] = { + 'S','Y','S','T','E','M','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\', + 'S','e','c','u','r','i','t','y','P','r','o','v','i','d','e','r','s','\\', + 'S','C','H','A','N','N','E','L','\\', + 'P','r','o','t','o','c','o','l','s',0 }; + + static const WCHAR clientW[] = {'\\','C','l','i','e','n','t',0}; + static const WCHAR enabledW[] = {'e','n','a','b','l','e','d',0}; + static const WCHAR disabledbydefaultW[] = {'D','i','s','a','b','l','e','d','B','y','D','e','f','a','u','l','t',0}; + + static const struct { + WCHAR key_name[20]; + DWORD prot_client_flag; + BOOL enabled; /* If no config is present, enable the protocol */ + BOOL disabled_by_default; /* Disable if caller asks for default protocol set */ + } protocol_config_keys[] = { + {{'S','S','L',' ','2','.','0',0}, SP_PROT_SSL2_CLIENT, FALSE, TRUE}, /* NOTE: TRUE, TRUE on Windows */ + {{'S','S','L',' ','3','.','0',0}, SP_PROT_SSL3_CLIENT, TRUE, FALSE}, + {{'T','L','S',' ','1','.','0',0}, SP_PROT_TLS1_0_CLIENT, TRUE, FALSE}, + {{'T','L','S',' ','1','.','1',0}, SP_PROT_TLS1_1_CLIENT, TRUE, FALSE /* NOTE: not enabled by default on Windows */ }, + {{'T','L','S',' ','1','.','2',0}, SP_PROT_TLS1_2_CLIENT, TRUE, FALSE /* NOTE: not enabled by default on Windows */ } + }; + + /* No need for thread safety */ + if(config_read) + return; + + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, protocol_config_key_name, 0, KEY_READ, &protocols_key); + if(res == ERROR_SUCCESS) { + DWORD type, size, value; + + for(i=0; i < sizeof(protocol_config_keys)/sizeof(*protocol_config_keys); i++) { + strcpyW(subkey_name, protocol_config_keys[i].key_name); + strcatW(subkey_name, clientW); + res = RegOpenKeyExW(protocols_key, subkey_name, 0, KEY_READ, &key); + if(res != ERROR_SUCCESS) { + if(protocol_config_keys[i].enabled) + enabled |= protocol_config_keys[i].prot_client_flag; + if(protocol_config_keys[i].disabled_by_default) + default_disabled |= protocol_config_keys[i].prot_client_flag; + continue; + } + + size = sizeof(value); + res = RegQueryValueExW(key, enabledW, NULL, &type, (BYTE*)&value, &size); + if(res == ERROR_SUCCESS) { + if(type == REG_DWORD && value) + enabled |= protocol_config_keys[i].prot_client_flag; + }else if(protocol_config_keys[i].enabled) { + enabled |= protocol_config_keys[i].prot_client_flag; + } + + size = sizeof(value); + res = RegQueryValueExW(key, disabledbydefaultW, NULL, &type, (BYTE*)&value, &size); + if(res == ERROR_SUCCESS) { + if(type != REG_DWORD || value) + default_disabled |= protocol_config_keys[i].prot_client_flag; + }else if(protocol_config_keys[i].disabled_by_default) { + default_disabled |= protocol_config_keys[i].prot_client_flag; + } + + RegCloseKey(key); + } + }else { + /* No config, enable all known protocols. */ + for(i=0; i < sizeof(protocol_config_keys)/sizeof(*protocol_config_keys); i++) { + if(protocol_config_keys[i].enabled) + enabled |= protocol_config_keys[i].prot_client_flag; + if(protocol_config_keys[i].disabled_by_default) + default_disabled |= protocol_config_keys[i].prot_client_flag; + } + } + + RegCloseKey(protocols_key); + + config_enabled_protocols = enabled & schan_imp_enabled_protocols(); + config_default_disabled_protocols = default_disabled; + config_read = TRUE; + + TRACE("enabled %x, disabled by default %x\n", config_enabled_protocols, config_default_disabled_protocols); +} + +static SECURITY_STATUS schan_QueryCredentialsAttributes( + PCredHandle phCredential, ULONG ulAttribute, VOID *pBuffer) +{ + struct schan_credentials *cred; + SECURITY_STATUS ret; + + cred = schan_get_object(phCredential->dwLower, SCHAN_HANDLE_CRED); + if(!cred) + return SEC_E_INVALID_HANDLE; + + switch (ulAttribute) + { + case SECPKG_ATTR_SUPPORTED_ALGS: + if (pBuffer) + { + /* FIXME: get from CryptoAPI */ + FIXME("SECPKG_ATTR_SUPPORTED_ALGS: stub\n"); + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INTERNAL_ERROR; + break; + case SECPKG_ATTR_CIPHER_STRENGTHS: + if (pBuffer) + { + SecPkgCred_CipherStrengths *r = pBuffer; + + /* FIXME: get from CryptoAPI */ + FIXME("SECPKG_ATTR_CIPHER_STRENGTHS: semi-stub\n"); + r->dwMinimumCipherStrength = 40; + r->dwMaximumCipherStrength = 168; + ret = SEC_E_OK; + } + else + ret = SEC_E_INTERNAL_ERROR; + break; + case SECPKG_ATTR_SUPPORTED_PROTOCOLS: + if(pBuffer) { + /* Regardless of MSDN documentation, tests show that this attribute takes into account + * what protocols are enabled for given credential. */ + ((SecPkgCred_SupportedProtocols*)pBuffer)->grbitProtocol = cred->enabled_protocols; + ret = SEC_E_OK; + }else { + ret = SEC_E_INTERNAL_ERROR; + } + break; + default: + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + return ret; +} + +static SECURITY_STATUS SEC_ENTRY schan_QueryCredentialsAttributesA( + PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("(%p, %d, %p)\n", phCredential, ulAttribute, pBuffer); + + switch (ulAttribute) + { + case SECPKG_CRED_ATTR_NAMES: + FIXME("SECPKG_CRED_ATTR_NAMES: stub\n"); + ret = SEC_E_UNSUPPORTED_FUNCTION; + break; + default: + ret = schan_QueryCredentialsAttributes(phCredential, ulAttribute, + pBuffer); + } + return ret; +} + +SECURITY_STATUS SEC_ENTRY schan_QueryCredentialsAttributesW( + PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("(%p, %d, %p)\n", phCredential, ulAttribute, pBuffer); + + switch (ulAttribute) + { + case SECPKG_CRED_ATTR_NAMES: + FIXME("SECPKG_CRED_ATTR_NAMES: stub\n"); + ret = SEC_E_UNSUPPORTED_FUNCTION; + break; + default: + ret = schan_QueryCredentialsAttributes(phCredential, ulAttribute, + pBuffer); + } + return ret; +} + +static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred) +{ + SECURITY_STATUS st; + DWORD i; + + TRACE("dwVersion = %d\n", schanCred->dwVersion); + TRACE("cCreds = %d\n", schanCred->cCreds); + TRACE("hRootStore = %p\n", schanCred->hRootStore); + TRACE("cMappers = %d\n", schanCred->cMappers); + TRACE("cSupportedAlgs = %d:\n", schanCred->cSupportedAlgs); + for (i = 0; i < schanCred->cSupportedAlgs; i++) + TRACE("%08x\n", schanCred->palgSupportedAlgs[i]); + TRACE("grbitEnabledProtocols = %08x\n", schanCred->grbitEnabledProtocols); + TRACE("dwMinimumCipherStrength = %d\n", schanCred->dwMinimumCipherStrength); + TRACE("dwMaximumCipherStrength = %d\n", schanCred->dwMaximumCipherStrength); + TRACE("dwSessionLifespan = %d\n", schanCred->dwSessionLifespan); + TRACE("dwFlags = %08x\n", schanCred->dwFlags); + TRACE("dwCredFormat = %d\n", schanCred->dwCredFormat); + + switch (schanCred->dwVersion) + { + case SCH_CRED_V3: + case SCHANNEL_CRED_VERSION: + break; + default: + return SEC_E_INTERNAL_ERROR; + } + + if (schanCred->cCreds == 0) + st = SEC_E_NO_CREDENTIALS; + else if (schanCred->cCreds > 1) + st = SEC_E_UNKNOWN_CREDENTIALS; + else + { + DWORD keySpec; + HCRYPTPROV csp; + BOOL ret, freeCSP; + + ret = CryptAcquireCertificatePrivateKey(schanCred->paCred[0], + 0, /* FIXME: what flags to use? */ NULL, + &csp, &keySpec, &freeCSP); + if (ret) + { + st = SEC_E_OK; + if (freeCSP) + CryptReleaseContext(csp, 0); + } + else + st = SEC_E_UNKNOWN_CREDENTIALS; + } + return st; +} + +static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schanCred, + PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + struct schan_credentials *creds; + unsigned enabled_protocols; + ULONG_PTR handle; + SECURITY_STATUS st = SEC_E_OK; + + TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); + + if (schanCred) + { + st = schan_CheckCreds(schanCred); + if (st != SEC_E_OK && st != SEC_E_NO_CREDENTIALS) + return st; + + st = SEC_E_OK; + } + + read_config(); + if(schanCred && schanCred->grbitEnabledProtocols) + enabled_protocols = schanCred->grbitEnabledProtocols & config_enabled_protocols; + else + enabled_protocols = config_enabled_protocols & ~config_default_disabled_protocols; + if(!enabled_protocols) { + ERR("Could not find matching protocol\n"); + return SEC_E_NO_AUTHENTICATING_AUTHORITY; + } + + /* For now, the only thing I'm interested in is the direction of the + * connection, so just store it. + */ + creds = HeapAlloc(GetProcessHeap(), 0, sizeof(*creds)); + if (!creds) return SEC_E_INSUFFICIENT_MEMORY; + + handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); + if (handle == SCHAN_INVALID_HANDLE) goto fail; + + creds->credential_use = SECPKG_CRED_OUTBOUND; + if (!schan_imp_allocate_certificate_credentials(creds)) + { + schan_free_handle(handle, SCHAN_HANDLE_CRED); + goto fail; + } + + creds->enabled_protocols = enabled_protocols; + phCredential->dwLower = handle; + phCredential->dwUpper = 0; + + /* Outbound credentials have no expiry */ + if (ptsExpiry) + { + ptsExpiry->LowPart = 0; + ptsExpiry->HighPart = 0; + } + + return st; + +fail: + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_INTERNAL_ERROR; +} + +static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schanCred, + PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS st; + + TRACE("schanCred %p, phCredential %p, ptsExpiry %p\n", schanCred, phCredential, ptsExpiry); + + if (!schanCred) return SEC_E_NO_CREDENTIALS; + + st = schan_CheckCreds(schanCred); + if (st == SEC_E_OK) + { + ULONG_PTR handle; + struct schan_credentials *creds; + + creds = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*creds)); + if (!creds) return SEC_E_INSUFFICIENT_MEMORY; + creds->credential_use = SECPKG_CRED_INBOUND; + + handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED); + if (handle == SCHAN_INVALID_HANDLE) + { + HeapFree(GetProcessHeap(), 0, creds); + return SEC_E_INTERNAL_ERROR; + } + + phCredential->dwLower = handle; + phCredential->dwUpper = 0; + + /* FIXME: get expiry from cert */ + } + return st; +} + +static SECURITY_STATUS schan_AcquireCredentialsHandle(ULONG fCredentialUse, + const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + if (fCredentialUse == SECPKG_CRED_OUTBOUND) + ret = schan_AcquireClientCredentials(schanCred, phCredential, + ptsExpiry); + else + ret = schan_AcquireServerCredentials(schanCred, phCredential, + ptsExpiry); + return ret; +} + +SECURITY_STATUS SEC_ENTRY schan_AcquireCredentialsHandleA( + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, + PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + TRACE("(%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p)\n", + debugstr_a(pszPrincipal), debugstr_a(pszPackage), fCredentialUse, + pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry); + return schan_AcquireCredentialsHandle(fCredentialUse, + pAuthData, phCredential, ptsExpiry); +} + +SECURITY_STATUS SEC_ENTRY schan_AcquireCredentialsHandleW( + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, + PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + TRACE("(%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p)\n", + debugstr_w(pszPrincipal), debugstr_w(pszPackage), fCredentialUse, + pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry); + return schan_AcquireCredentialsHandle(fCredentialUse, + pAuthData, phCredential, ptsExpiry); +} + +SECURITY_STATUS SEC_ENTRY schan_FreeCredentialsHandle( + PCredHandle phCredential) +{ + struct schan_credentials *creds; + + TRACE("phCredential %p\n", phCredential); + + if (!phCredential) return SEC_E_INVALID_HANDLE; + + creds = schan_free_handle(phCredential->dwLower, SCHAN_HANDLE_CRED); + if (!creds) return SEC_E_INVALID_HANDLE; + + if (creds->credential_use == SECPKG_CRED_OUTBOUND) + schan_imp_free_certificate_credentials(creds); + HeapFree(GetProcessHeap(), 0, creds); + + return SEC_E_OK; +} + +static void init_schan_buffers(struct schan_buffers *s, const PSecBufferDesc desc, + int (*get_next_buffer)(const struct schan_transport *, struct schan_buffers *)) +{ + s->offset = 0; + s->limit = ~0UL; + s->desc = desc; + s->current_buffer_idx = -1; + s->allow_buffer_resize = FALSE; + s->get_next_buffer = get_next_buffer; +} + +static int schan_find_sec_buffer_idx(const SecBufferDesc *desc, unsigned int start_idx, ULONG buffer_type) +{ + unsigned int i; + PSecBuffer buffer; + + for (i = start_idx; i < desc->cBuffers; ++i) + { + buffer = &desc->pBuffers[i]; + if (buffer->BufferType == buffer_type) return i; + } + + return -1; +} + +static void schan_resize_current_buffer(const struct schan_buffers *s, SIZE_T min_size) +{ + SecBuffer *b = &s->desc->pBuffers[s->current_buffer_idx]; + SIZE_T new_size = b->cbBuffer ? b->cbBuffer * 2 : 128; + void *new_data; + + if (b->cbBuffer >= min_size || !s->allow_buffer_resize || min_size > UINT_MAX / 2) return; + + while (new_size < min_size) new_size *= 2; + + if (b->pvBuffer) + new_data = HeapReAlloc(GetProcessHeap(), 0, b->pvBuffer, new_size); + else + new_data = HeapAlloc(GetProcessHeap(), 0, new_size); + + if (!new_data) + { + TRACE("Failed to resize %p from %d to %ld\n", b->pvBuffer, b->cbBuffer, new_size); + return; + } + + b->cbBuffer = new_size; + b->pvBuffer = new_data; +} + +char *schan_get_buffer(const struct schan_transport *t, struct schan_buffers *s, SIZE_T *count) +{ + SIZE_T max_count; + PSecBuffer buffer; + + if (!s->desc) + { + TRACE("No desc\n"); + return NULL; + } + + if (s->current_buffer_idx == -1) + { + /* Initial buffer */ + int buffer_idx = s->get_next_buffer(t, s); + if (buffer_idx == -1) + { + TRACE("No next buffer\n"); + return NULL; + } + s->current_buffer_idx = buffer_idx; + } + + buffer = &s->desc->pBuffers[s->current_buffer_idx]; + TRACE("Using buffer %d: cbBuffer %d, BufferType %#x, pvBuffer %p\n", s->current_buffer_idx, buffer->cbBuffer, buffer->BufferType, buffer->pvBuffer); + + schan_resize_current_buffer(s, s->offset + *count); + max_count = buffer->cbBuffer - s->offset; + if (s->limit != ~0UL && s->limit < max_count) + max_count = s->limit; + if (!max_count) + { + int buffer_idx; + + s->allow_buffer_resize = FALSE; + buffer_idx = s->get_next_buffer(t, s); + if (buffer_idx == -1) + { + TRACE("No next buffer\n"); + return NULL; + } + s->current_buffer_idx = buffer_idx; + s->offset = 0; + return schan_get_buffer(t, s, count); + } + + if (*count > max_count) + *count = max_count; + if (s->limit != ~0UL) + s->limit -= *count; + + return (char *)buffer->pvBuffer + s->offset; +} + +/* schan_pull + * Read data from the transport input buffer. + * + * t - The session transport object. + * buff - The buffer into which to store the read data. Must be at least + * *buff_len bytes in length. + * buff_len - On input, *buff_len is the desired length to read. On successful + * return, *buff_len is the number of bytes actually read. + * + * Returns: + * 0 on success, in which case: + * *buff_len == 0 indicates end of file. + * *buff_len > 0 indicates that some data was read. May be less than + * what was requested, in which case the caller should call again if/ + * when they want more. + * EAGAIN when no data could be read without blocking + * another errno-style error value on failure + * + */ +int schan_pull(struct schan_transport *t, void *buff, size_t *buff_len) +{ + char *b; + SIZE_T local_len = *buff_len; + + TRACE("Pull %lu bytes\n", local_len); + + *buff_len = 0; + + b = schan_get_buffer(t, &t->in, &local_len); + if (!b) + return EAGAIN; + + memcpy(buff, b, local_len); + t->in.offset += local_len; + + TRACE("Read %lu bytes\n", local_len); + + *buff_len = local_len; + return 0; +} + +/* schan_push + * Write data to the transport output buffer. + * + * t - The session transport object. + * buff - The buffer of data to write. Must be at least *buff_len bytes in length. + * buff_len - On input, *buff_len is the desired length to write. On successful + * return, *buff_len is the number of bytes actually written. + * + * Returns: + * 0 on success + * *buff_len will be > 0 indicating how much data was written. May be less + * than what was requested, in which case the caller should call again + if/when they want to write more. + * EAGAIN when no data could be written without blocking + * another errno-style error value on failure + * + */ +int schan_push(struct schan_transport *t, const void *buff, size_t *buff_len) +{ + char *b; + SIZE_T local_len = *buff_len; + + TRACE("Push %lu bytes\n", local_len); + + *buff_len = 0; + + b = schan_get_buffer(t, &t->out, &local_len); + if (!b) + return EAGAIN; + + memcpy(b, buff, local_len); + t->out.offset += local_len; + + TRACE("Wrote %lu bytes\n", local_len); + + *buff_len = local_len; + return 0; +} + +schan_imp_session schan_session_for_transport(struct schan_transport* t) +{ + return t->ctx->session; +} + +static int schan_init_sec_ctx_get_next_buffer(const struct schan_transport *t, struct schan_buffers *s) +{ + if (s->current_buffer_idx == -1) + { + int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + if (t->ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY) + { + if (idx == -1) + { + idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_EMPTY); + if (idx != -1) s->desc->pBuffers[idx].BufferType = SECBUFFER_TOKEN; + } + if (idx != -1 && !s->desc->pBuffers[idx].pvBuffer) + { + s->desc->pBuffers[idx].cbBuffer = 0; + s->allow_buffer_resize = TRUE; + } + } + return idx; + } + + return -1; +} + +static void dump_buffer_desc(SecBufferDesc *desc) +{ + unsigned int i; + + if (!desc) return; + TRACE("Buffer desc %p:\n", desc); + for (i = 0; i < desc->cBuffers; ++i) + { + SecBuffer *b = &desc->pBuffers[i]; + TRACE("\tbuffer %u: cbBuffer %d, BufferType %#x pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer); + } +} + +/*********************************************************************** + * InitializeSecurityContextW + */ +SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( + PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, + ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, + PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, + PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + struct schan_context *ctx; + struct schan_buffers *out_buffers; + struct schan_credentials *cred; + struct schan_transport transport; + SIZE_T expected_size = ~0UL; + SECURITY_STATUS ret; + + TRACE("%p %p %s 0x%08x %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + + dump_buffer_desc(pInput); + dump_buffer_desc(pOutput); + + if (!phContext) + { + ULONG_PTR handle; + + if (!phCredential) return SEC_E_INVALID_HANDLE; + + cred = schan_get_object(phCredential->dwLower, SCHAN_HANDLE_CRED); + if (!cred) return SEC_E_INVALID_HANDLE; + + if (!(cred->credential_use & SECPKG_CRED_OUTBOUND)) + { + WARN("Invalid credential use %#x\n", cred->credential_use); + return SEC_E_INVALID_HANDLE; + } + + ctx = HeapAlloc(GetProcessHeap(), 0, sizeof(*ctx)); + if (!ctx) return SEC_E_INSUFFICIENT_MEMORY; + + ctx->cert = NULL; + handle = schan_alloc_handle(ctx, SCHAN_HANDLE_CTX); + if (handle == SCHAN_INVALID_HANDLE) + { + HeapFree(GetProcessHeap(), 0, ctx); + return SEC_E_INTERNAL_ERROR; + } + + if (!schan_imp_create_session(&ctx->session, cred)) + { + schan_free_handle(handle, SCHAN_HANDLE_CTX); + HeapFree(GetProcessHeap(), 0, ctx); + return SEC_E_INTERNAL_ERROR; + } + + if (pszTargetName) + { + UINT len = WideCharToMultiByte( CP_UNIXCP, 0, pszTargetName, -1, NULL, 0, NULL, NULL ); + char *target = HeapAlloc( GetProcessHeap(), 0, len ); + + if (target) + { + WideCharToMultiByte( CP_UNIXCP, 0, pszTargetName, -1, target, len, NULL, NULL ); + schan_imp_set_session_target( ctx->session, target ); + HeapFree( GetProcessHeap(), 0, target ); + } + } + phNewContext->dwLower = handle; + phNewContext->dwUpper = 0; + } + else + { + SIZE_T record_size = 0; + unsigned char *ptr; + SecBuffer *buffer; + int idx; + + if (!pInput) + return SEC_E_INCOMPLETE_MESSAGE; + + idx = schan_find_sec_buffer_idx(pInput, 0, SECBUFFER_TOKEN); + if (idx == -1) + return SEC_E_INCOMPLETE_MESSAGE; + + buffer = &pInput->pBuffers[idx]; + ptr = buffer->pvBuffer; + expected_size = 0; + + while (buffer->cbBuffer > expected_size + 5) + { + record_size = 5 + ((ptr[3] << 8) | ptr[4]); + + if (buffer->cbBuffer < expected_size + record_size) + break; + + expected_size += record_size; + ptr += record_size; + } + + if (!expected_size) + { + TRACE("Expected at least %lu bytes, but buffer only contains %u bytes.\n", + max(6, record_size), buffer->cbBuffer); + return SEC_E_INCOMPLETE_MESSAGE; + } + + TRACE("Using expected_size %lu.\n", expected_size); + + ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX); + } + + ctx->req_ctx_attr = fContextReq; + + transport.ctx = ctx; + init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_buffer); + transport.in.limit = expected_size; + init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_buffer); + schan_imp_set_session_transport(ctx->session, &transport); + + /* Perform the TLS handshake */ + ret = schan_imp_handshake(ctx->session); + + if(transport.in.offset && transport.in.offset != pInput->pBuffers[0].cbBuffer) { + if(pInput->cBuffers<2 || pInput->pBuffers[1].BufferType!=SECBUFFER_EMPTY) + return SEC_E_INVALID_TOKEN; + + pInput->pBuffers[1].BufferType = SECBUFFER_EXTRA; + pInput->pBuffers[1].cbBuffer = pInput->pBuffers[0].cbBuffer-transport.in.offset; + } + + out_buffers = &transport.out; + if (out_buffers->current_buffer_idx != -1) + { + SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx]; + buffer->cbBuffer = out_buffers->offset; + } + + *pfContextAttr = 0; + if (ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY) + *pfContextAttr |= ISC_RET_ALLOCATED_MEMORY; + + return ret; +} + +/*********************************************************************** + * InitializeSecurityContextA + */ +SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( + PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, + ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, + PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, + PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + SEC_WCHAR *target_name = NULL; + + TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + + if (pszTargetName) + { + INT len = MultiByteToWideChar(CP_ACP, 0, pszTargetName, -1, NULL, 0); + target_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*target_name)); + MultiByteToWideChar(CP_ACP, 0, pszTargetName, -1, target_name, len); + } + + ret = schan_InitializeSecurityContextW(phCredential, phContext, target_name, + fContextReq, Reserved1, TargetDataRep, pInput, Reserved2, + phNewContext, pOutput, pfContextAttr, ptsExpiry); + + HeapFree(GetProcessHeap(), 0, target_name); + + return ret; +} + +static +SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW( + PCtxtHandle context_handle, ULONG attribute, PVOID buffer) +{ + struct schan_context *ctx; + + TRACE("context_handle %p, attribute %#x, buffer %p\n", + context_handle, attribute, buffer); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + switch(attribute) + { + case SECPKG_ATTR_STREAM_SIZES: + { + SecPkgContext_ConnectionInfo info; + SECURITY_STATUS status = schan_imp_get_connection_info(ctx->session, &info); + if (status == SEC_E_OK) + { + SecPkgContext_StreamSizes *stream_sizes = buffer; + SIZE_T mac_size = info.dwHashStrength; + unsigned int block_size = schan_imp_get_session_cipher_block_size(ctx->session); + unsigned int message_size = schan_imp_get_max_message_size(ctx->session); + + TRACE("Using %lu mac bytes, message size %u, block size %u\n", + mac_size, message_size, block_size); + + /* These are defined by the TLS RFC */ + stream_sizes->cbHeader = 5; + stream_sizes->cbTrailer = mac_size + 256; /* Max 255 bytes padding + 1 for padding size */ + stream_sizes->cbMaximumMessage = message_size; + stream_sizes->cbBuffers = 4; + stream_sizes->cbBlockSize = block_size; + } + + return status; + } + case SECPKG_ATTR_REMOTE_CERT_CONTEXT: + { + PCCERT_CONTEXT *cert = buffer; + + if (!ctx->cert) { + HCERTSTORE cert_store; + SECURITY_STATUS status; + + cert_store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + if(!cert_store) + return GetLastError(); + + status = schan_imp_get_session_peer_certificate(ctx->session, cert_store, &ctx->cert); + CertCloseStore(cert_store, 0); + if(status != SEC_E_OK) + return status; + } + + *cert = CertDuplicateCertificateContext(ctx->cert); + return SEC_E_OK; + } + case SECPKG_ATTR_CONNECTION_INFO: + { + SecPkgContext_ConnectionInfo *info = buffer; + return schan_imp_get_connection_info(ctx->session, info); + } + + default: + FIXME("Unhandled attribute %#x\n", attribute); + return SEC_E_UNSUPPORTED_FUNCTION; + } +} + +static +SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesA( + PCtxtHandle context_handle, ULONG attribute, PVOID buffer) +{ + TRACE("context_handle %p, attribute %#x, buffer %p\n", + context_handle, attribute, buffer); + + switch(attribute) + { + case SECPKG_ATTR_STREAM_SIZES: + return schan_QueryContextAttributesW(context_handle, attribute, buffer); + case SECPKG_ATTR_REMOTE_CERT_CONTEXT: + return schan_QueryContextAttributesW(context_handle, attribute, buffer); + case SECPKG_ATTR_CONNECTION_INFO: + return schan_QueryContextAttributesW(context_handle, attribute, buffer); + + default: + FIXME("Unhandled attribute %#x\n", attribute); + return SEC_E_UNSUPPORTED_FUNCTION; + } +} + +static int schan_encrypt_message_get_next_buffer(const struct schan_transport *t, struct schan_buffers *s) +{ + SecBuffer *b; + + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_STREAM_HEADER); + + b = &s->desc->pBuffers[s->current_buffer_idx]; + + if (b->BufferType == SECBUFFER_STREAM_HEADER) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + + if (b->BufferType == SECBUFFER_DATA) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_STREAM_TRAILER); + + return -1; +} + +static int schan_encrypt_message_get_next_buffer_token(const struct schan_transport *t, struct schan_buffers *s) +{ + SecBuffer *b; + + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + + b = &s->desc->pBuffers[s->current_buffer_idx]; + + if (b->BufferType == SECBUFFER_TOKEN) + { + int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + if (idx != s->current_buffer_idx) return -1; + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + } + + if (b->BufferType == SECBUFFER_DATA) + { + int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + if (idx != -1) + idx = schan_find_sec_buffer_idx(s->desc, idx + 1, SECBUFFER_TOKEN); + return idx; + } + + return -1; +} + +static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle, + ULONG quality, PSecBufferDesc message, ULONG message_seq_no) +{ + struct schan_transport transport; + struct schan_context *ctx; + struct schan_buffers *b; + SECURITY_STATUS status; + SecBuffer *buffer; + SIZE_T data_size; + SIZE_T length; + char *data; + int idx; + + TRACE("context_handle %p, quality %d, message %p, message_seq_no %d\n", + context_handle, quality, message, message_seq_no); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + dump_buffer_desc(message); + + idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_DATA); + if (idx == -1) + { + WARN("No data buffer passed\n"); + return SEC_E_INTERNAL_ERROR; + } + buffer = &message->pBuffers[idx]; + + data_size = buffer->cbBuffer; + data = HeapAlloc(GetProcessHeap(), 0, data_size); + memcpy(data, buffer->pvBuffer, data_size); + + transport.ctx = ctx; + init_schan_buffers(&transport.in, NULL, NULL); + if (schan_find_sec_buffer_idx(message, 0, SECBUFFER_STREAM_HEADER) != -1) + init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer); + else + init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer_token); + schan_imp_set_session_transport(ctx->session, &transport); + + length = data_size; + status = schan_imp_send(ctx->session, data, &length); + + TRACE("Sent %ld bytes.\n", length); + + if (length != data_size) + status = SEC_E_INTERNAL_ERROR; + + b = &transport.out; + b->desc->pBuffers[b->current_buffer_idx].cbBuffer = b->offset; + HeapFree(GetProcessHeap(), 0, data); + + TRACE("Returning %#x.\n", status); + + return status; +} + +static int schan_decrypt_message_get_next_buffer(const struct schan_transport *t, struct schan_buffers *s) +{ + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + + return -1; +} + +static int schan_validate_decrypt_buffer_desc(PSecBufferDesc message) +{ + int data_idx = -1; + unsigned int empty_count = 0; + unsigned int i; + + if (message->cBuffers < 4) + { + WARN("Less than four buffers passed\n"); + return -1; + } + + for (i = 0; i < message->cBuffers; ++i) + { + SecBuffer *b = &message->pBuffers[i]; + if (b->BufferType == SECBUFFER_DATA) + { + if (data_idx != -1) + { + WARN("More than one data buffer passed\n"); + return -1; + } + data_idx = i; + } + else if (b->BufferType == SECBUFFER_EMPTY) + ++empty_count; + } + + if (data_idx == -1) + { + WARN("No data buffer passed\n"); + return -1; + } + + if (empty_count < 3) + { + WARN("Less than three empty buffers passed\n"); + return -1; + } + + return data_idx; +} + +static void schan_decrypt_fill_buffer(PSecBufferDesc message, ULONG buffer_type, void *data, ULONG size) +{ + int idx; + SecBuffer *buffer; + + idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_EMPTY); + buffer = &message->pBuffers[idx]; + + buffer->BufferType = buffer_type; + buffer->pvBuffer = data; + buffer->cbBuffer = size; +} + +static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle, + PSecBufferDesc message, ULONG message_seq_no, PULONG quality) +{ + struct schan_transport transport; + struct schan_context *ctx; + SecBuffer *buffer; + SIZE_T data_size; + char *data; + unsigned expected_size; + SSIZE_T received = 0; + int idx; + unsigned char *buf_ptr; + + TRACE("context_handle %p, message %p, message_seq_no %d, quality %p\n", + context_handle, message, message_seq_no, quality); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + dump_buffer_desc(message); + + idx = schan_validate_decrypt_buffer_desc(message); + if (idx == -1) + return SEC_E_INVALID_TOKEN; + buffer = &message->pBuffers[idx]; + buf_ptr = buffer->pvBuffer; + + expected_size = 5 + ((buf_ptr[3] << 8) | buf_ptr[4]); + if(buffer->cbBuffer < expected_size) + { + TRACE("Expected %u bytes, but buffer only contains %u bytes\n", expected_size, buffer->cbBuffer); + buffer->BufferType = SECBUFFER_MISSING; + buffer->cbBuffer = expected_size - buffer->cbBuffer; + + /* This is a bit weird, but windows does it too */ + idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_EMPTY); + buffer = &message->pBuffers[idx]; + buffer->BufferType = SECBUFFER_MISSING; + buffer->cbBuffer = expected_size - buffer->cbBuffer; + + TRACE("Returning SEC_E_INCOMPLETE_MESSAGE\n"); + return SEC_E_INCOMPLETE_MESSAGE; + } + + data_size = expected_size - 5; + data = HeapAlloc(GetProcessHeap(), 0, data_size); + + transport.ctx = ctx; + init_schan_buffers(&transport.in, message, schan_decrypt_message_get_next_buffer); + transport.in.limit = expected_size; + init_schan_buffers(&transport.out, NULL, NULL); + schan_imp_set_session_transport(ctx->session, &transport); + + while (received < data_size) + { + SIZE_T length = data_size - received; + SECURITY_STATUS status = schan_imp_recv(ctx->session, data + received, &length); + + if (status == SEC_I_CONTINUE_NEEDED) + break; + + if (status != SEC_E_OK) + { + HeapFree(GetProcessHeap(), 0, data); + ERR("Returning %x\n", status); + return status; + } + + if (!length) + break; + + received += length; + } + + TRACE("Received %ld bytes\n", received); + + memcpy(buf_ptr + 5, data, received); + HeapFree(GetProcessHeap(), 0, data); + + schan_decrypt_fill_buffer(message, SECBUFFER_DATA, + buf_ptr + 5, received); + + schan_decrypt_fill_buffer(message, SECBUFFER_STREAM_TRAILER, + buf_ptr + 5 + received, buffer->cbBuffer - 5 - received); + + if(buffer->cbBuffer > expected_size) + schan_decrypt_fill_buffer(message, SECBUFFER_EXTRA, + buf_ptr + expected_size, buffer->cbBuffer - expected_size); + + buffer->BufferType = SECBUFFER_STREAM_HEADER; + buffer->cbBuffer = 5; + + return SEC_E_OK; +} + +SECURITY_STATUS SEC_ENTRY schan_DeleteSecurityContext(PCtxtHandle context_handle) +{ + struct schan_context *ctx; + + TRACE("context_handle %p\n", context_handle); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + + ctx = schan_free_handle(context_handle->dwLower, SCHAN_HANDLE_CTX); + if (!ctx) return SEC_E_INVALID_HANDLE; + + if (ctx->cert) + CertFreeCertificateContext(ctx->cert); + schan_imp_dispose_session(ctx->session); + HeapFree(GetProcessHeap(), 0, ctx); + + return SEC_E_OK; +} + +SecurityFunctionTableA schanTableA = { + 1, + schan_EnumerateSecurityPackagesA, + schan_QueryCredentialsAttributesA, + schan_AcquireCredentialsHandleA, + schan_FreeCredentialsHandle, + NULL, /* Reserved2 */ + schan_InitializeSecurityContextA, + NULL, /* AcceptSecurityContext */ + NULL, /* CompleteAuthToken */ + schan_DeleteSecurityContext, + NULL, /* ApplyControlToken */ + schan_QueryContextAttributesA, + NULL, /* ImpersonateSecurityContext */ + NULL, /* RevertSecurityContext */ + NULL, /* MakeSignature */ + NULL, /* VerifySignature */ + schan_FreeContextBuffer, + NULL, /* QuerySecurityPackageInfoA */ + NULL, /* Reserved3 */ + NULL, /* Reserved4 */ + NULL, /* ExportSecurityContext */ + NULL, /* ImportSecurityContextA */ + NULL, /* AddCredentialsA */ + NULL, /* Reserved8 */ + NULL, /* QuerySecurityContextToken */ + schan_EncryptMessage, + schan_DecryptMessage, + NULL, /* SetContextAttributesA */ +}; + +SecurityFunctionTableW schanTableW = { + 1, + schan_EnumerateSecurityPackagesW, + schan_QueryCredentialsAttributesW, + schan_AcquireCredentialsHandleW, + schan_FreeCredentialsHandle, + NULL, /* Reserved2 */ + schan_InitializeSecurityContextW, + NULL, /* AcceptSecurityContext */ + NULL, /* CompleteAuthToken */ + schan_DeleteSecurityContext, + NULL, /* ApplyControlToken */ + schan_QueryContextAttributesW, + NULL, /* ImpersonateSecurityContext */ + NULL, /* RevertSecurityContext */ + NULL, /* MakeSignature */ + NULL, /* VerifySignature */ + schan_FreeContextBuffer, + NULL, /* QuerySecurityPackageInfoW */ + NULL, /* Reserved3 */ + NULL, /* Reserved4 */ + NULL, /* ExportSecurityContext */ + NULL, /* ImportSecurityContextW */ + NULL, /* AddCredentialsW */ + NULL, /* Reserved8 */ + NULL, /* QuerySecurityContextToken */ + schan_EncryptMessage, + schan_DecryptMessage, + NULL, /* SetContextAttributesW */ +}; + +static const WCHAR schannelComment[] = { 'S','c','h','a','n','n','e','l',' ', + 'S','e','c','u','r','i','t','y',' ','P','a','c','k','a','g','e',0 }; +static const WCHAR schannelDllName[] = { 's','c','h','a','n','n','e','l','.','d','l','l',0 }; + +void SECUR32_initSchannelSP(void) +{ + /* This is what Windows reports. This shouldn't break any applications + * even though the functions are missing, because the wrapper will + * return SEC_E_UNSUPPORTED_FUNCTION if our function is NULL. + */ + static const LONG caps = + SECPKG_FLAG_INTEGRITY | + SECPKG_FLAG_PRIVACY | + SECPKG_FLAG_CONNECTION | + SECPKG_FLAG_MULTI_REQUIRED | + SECPKG_FLAG_EXTENDED_ERROR | + SECPKG_FLAG_IMPERSONATION | + SECPKG_FLAG_ACCEPT_WIN32_NAME | + SECPKG_FLAG_STREAM; + static const short version = 1; + static const LONG maxToken = 16384; + SEC_WCHAR *uniSPName = (SEC_WCHAR *)UNISP_NAME_W, + *schannel = (SEC_WCHAR *)SCHANNEL_NAME_W; + const SecPkgInfoW info[] = { + { caps, version, UNISP_RPC_ID, maxToken, uniSPName, uniSPName }, + { caps, version, UNISP_RPC_ID, maxToken, schannel, + (SEC_WCHAR *)schannelComment }, + }; + SecureProvider *provider; + + if (!schan_imp_init()) + return; + + schan_handle_table = HeapAlloc(GetProcessHeap(), 0, 64 * sizeof(*schan_handle_table)); + if (!schan_handle_table) + { + ERR("Failed to allocate schannel handle table.\n"); + goto fail; + } + schan_handle_table_size = 64; + + provider = SECUR32_addProvider(&schanTableA, &schanTableW, schannelDllName); + if (!provider) + { + ERR("Failed to add schannel provider.\n"); + goto fail; + } + + SECUR32_addPackages(provider, sizeof(info) / sizeof(info[0]), NULL, info); + + return; + +fail: + HeapFree(GetProcessHeap(), 0, schan_handle_table); + schan_handle_table = NULL; + schan_imp_deinit(); + return; +} + +void SECUR32_deinitSchannelSP(void) +{ + SIZE_T i = schan_handle_count; + + if (!schan_handle_table) return; + + /* deinitialized sessions first because a pointer to the credentials + * may be stored for the session. */ + while (i--) + { + if (schan_handle_table[i].type == SCHAN_HANDLE_CTX) + { + struct schan_context *ctx = schan_free_handle(i, SCHAN_HANDLE_CTX); + schan_imp_dispose_session(ctx->session); + HeapFree(GetProcessHeap(), 0, ctx); + } + } + i = schan_handle_count; + while (i--) + { + if (schan_handle_table[i].type != SCHAN_HANDLE_FREE) + { + struct schan_credentials *cred; + cred = schan_free_handle(i, SCHAN_HANDLE_CRED); + schan_imp_free_certificate_credentials(cred); + HeapFree(GetProcessHeap(), 0, cred); + } + } + HeapFree(GetProcessHeap(), 0, schan_handle_table); + schan_imp_deinit(); +} + +#else /* SONAME_LIBGNUTLS || HAVE_SECURITY_SECURITY_H */ + +void SECUR32_initSchannelSP(void) +{ + ERR("TLS library not found, SSL connections will fail\n"); +} + +void SECUR32_deinitSchannelSP(void) {} + +#endif /* SONAME_LIBGNUTLS || HAVE_SECURITY_SECURITY_H */ diff --git a/dll/win32/schannel/secur32_wine.c b/dll/win32/schannel/secur32_wine.c new file mode 100644 index 00000000000..48ba2c9174a --- /dev/null +++ b/dll/win32/schannel/secur32_wine.c @@ -0,0 +1,399 @@ +/* Copyright (C) 2004 Juan Lang + * + * This file implements loading of SSP DLLs. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" + +#include + +typedef struct _SecurePackageTable +{ + DWORD numPackages; + DWORD numAllocated; + struct list table; +} SecurePackageTable; + +typedef struct _SecureProviderTable +{ + DWORD numProviders; + DWORD numAllocated; + struct list table; +} SecureProviderTable; + +/** + * Globals + */ + +static CRITICAL_SECTION cs; +static CRITICAL_SECTION_DEBUG cs_debug = +{ + 0, 0, &cs, + { &cs_debug.ProcessLocksList, &cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": cs") } +}; +static CRITICAL_SECTION cs = { &cs_debug, -1, 0, 0, 0, 0 }; +static SecurePackageTable *packageTable = NULL; +static SecureProviderTable *providerTable = NULL; + +/*********************************************************************** + * EnumerateSecurityPackagesW (SECUR32.@) + */ +SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesW(PULONG pcPackages, + PSecPkgInfoW *ppPackageInfo) +{ + SECURITY_STATUS ret = SEC_E_OK; + + TRACE("(%p, %p)\n", pcPackages, ppPackageInfo); + + /* windows just crashes if pcPackages or ppPackageInfo is NULL, so will I */ + *pcPackages = 0; + EnterCriticalSection(&cs); + if (packageTable) + { + SecurePackage *package; + size_t bytesNeeded; + + bytesNeeded = packageTable->numPackages * sizeof(SecPkgInfoW); + LIST_FOR_EACH_ENTRY(package, &packageTable->table, SecurePackage, entry) + { + if (package->infoW.Name) + bytesNeeded += (lstrlenW(package->infoW.Name) + 1) * sizeof(WCHAR); + if (package->infoW.Comment) + bytesNeeded += (lstrlenW(package->infoW.Comment) + 1) * sizeof(WCHAR); + } + if (bytesNeeded) + { + *ppPackageInfo = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (*ppPackageInfo) + { + ULONG i = 0; + PWSTR nextString; + + *pcPackages = packageTable->numPackages; + nextString = (PWSTR)((PBYTE)*ppPackageInfo + + packageTable->numPackages * sizeof(SecPkgInfoW)); + LIST_FOR_EACH_ENTRY(package, &packageTable->table, SecurePackage, entry) + { + PSecPkgInfoW pkgInfo = *ppPackageInfo + i++; + + *pkgInfo = package->infoW; + if (package->infoW.Name) + { + TRACE("Name[%d] = %S\n", i - 1, package->infoW.Name); + pkgInfo->Name = nextString; + lstrcpyW(nextString, package->infoW.Name); + nextString += lstrlenW(nextString) + 1; + } + else + pkgInfo->Name = NULL; + if (package->infoW.Comment) + { + TRACE("Comment[%d] = %S\n", i - 1, package->infoW.Comment); + pkgInfo->Comment = nextString; + lstrcpyW(nextString, package->infoW.Comment); + nextString += lstrlenW(nextString) + 1; + } + else + pkgInfo->Comment = NULL; + } + } + else + ret = SEC_E_INSUFFICIENT_MEMORY; + } + } + LeaveCriticalSection(&cs); + TRACE("<-- 0x%08x\n", ret); + return ret; +} + +/* Converts info (which is assumed to be an array of cPackages SecPkgInfoW + * structures) into an array of SecPkgInfoA structures, which it returns. + */ +static PSecPkgInfoA thunk_PSecPkgInfoWToA(ULONG cPackages, + const SecPkgInfoW *info) +{ + PSecPkgInfoA ret; + + if (info) + { + size_t bytesNeeded = cPackages * sizeof(SecPkgInfoA); + ULONG i; + + for (i = 0; i < cPackages; i++) + { + if (info[i].Name) + bytesNeeded += WideCharToMultiByte(CP_ACP, 0, info[i].Name, + -1, NULL, 0, NULL, NULL); + if (info[i].Comment) + bytesNeeded += WideCharToMultiByte(CP_ACP, 0, info[i].Comment, + -1, NULL, 0, NULL, NULL); + } + ret = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (ret) + { + PSTR nextString; + + nextString = (PSTR)((PBYTE)ret + cPackages * sizeof(SecPkgInfoA)); + for (i = 0; i < cPackages; i++) + { + PSecPkgInfoA pkgInfo = ret + i; + int bytes; + + memcpy(pkgInfo, &info[i], sizeof(SecPkgInfoA)); + if (info[i].Name) + { + pkgInfo->Name = nextString; + /* just repeat back to WideCharToMultiByte how many bytes + * it requires, since we asked it earlier + */ + bytes = WideCharToMultiByte(CP_ACP, 0, info[i].Name, -1, + NULL, 0, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, info[i].Name, -1, + pkgInfo->Name, bytes, NULL, NULL); + nextString += lstrlenA(nextString) + 1; + } + else + pkgInfo->Name = NULL; + if (info[i].Comment) + { + pkgInfo->Comment = nextString; + /* just repeat back to WideCharToMultiByte how many bytes + * it requires, since we asked it earlier + */ + bytes = WideCharToMultiByte(CP_ACP, 0, info[i].Comment, -1, + NULL, 0, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, info[i].Comment, -1, + pkgInfo->Comment, bytes, NULL, NULL); + nextString += lstrlenA(nextString) + 1; + } + else + pkgInfo->Comment = NULL; + } + } + } + else + ret = NULL; + return ret; +} + +/*********************************************************************** + * EnumerateSecurityPackagesA (SECUR32.@) + */ +SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesA(PULONG pcPackages, + PSecPkgInfoA *ppPackageInfo) +{ + SECURITY_STATUS ret; + PSecPkgInfoW info; + + ret = schan_EnumerateSecurityPackagesW(pcPackages, &info); + if (ret == SEC_E_OK && *pcPackages && info) + { + *ppPackageInfo = thunk_PSecPkgInfoWToA(*pcPackages, info); + if (*pcPackages && !*ppPackageInfo) + { + *pcPackages = 0; + ret = SEC_E_INSUFFICIENT_MEMORY; + } + schan_FreeContextBuffer(info); + } + return ret; +} + +SECURITY_STATUS +WINAPI +schan_FreeContextBuffer ( + PVOID pvoid + ) +{ + HeapFree(GetProcessHeap(), 0, pvoid); + return SEC_E_OK; +} + + + +static PWSTR SECUR32_strdupW(PCWSTR str) +{ + PWSTR ret; + + if (str) + { + ret = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(str) + 1) * sizeof(WCHAR)); + if (ret) + lstrcpyW(ret, str); + } + else + ret = NULL; + return ret; +} + +PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str) +{ + PWSTR ret; + + if (str) + { + int charsNeeded = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + + if (charsNeeded) + { + ret = HeapAlloc(GetProcessHeap(), 0, charsNeeded * sizeof(WCHAR)); + if (ret) + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, charsNeeded); + } + else + ret = NULL; + } + else + ret = NULL; + return ret; +} + +PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str) +{ + PSTR ret; + + if (str) + { + int charsNeeded = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, + NULL, NULL); + + if (charsNeeded) + { + ret = HeapAlloc(GetProcessHeap(), 0, charsNeeded); + if (ret) + WideCharToMultiByte(CP_ACP, 0, str, -1, ret, charsNeeded, + NULL, NULL); + } + else + ret = NULL; + } + else + ret = NULL; + return ret; +} + +static void _copyPackageInfo(PSecPkgInfoW info, const SecPkgInfoA *inInfoA, + const SecPkgInfoW *inInfoW) +{ + if (info && (inInfoA || inInfoW)) + { + /* odd, I know, but up until Name and Comment the structures are + * identical + */ + memcpy(info, inInfoW ? inInfoW : (const SecPkgInfoW *)inInfoA, sizeof(*info)); + if (inInfoW) + { + info->Name = SECUR32_strdupW(inInfoW->Name); + info->Comment = SECUR32_strdupW(inInfoW->Comment); + } + else + { + info->Name = SECUR32_AllocWideFromMultiByte(inInfoA->Name); + info->Comment = SECUR32_AllocWideFromMultiByte(inInfoA->Comment); + } + } +} + +SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, + const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) +{ + SecureProvider *ret; + + EnterCriticalSection(&cs); + + if (!providerTable) + { + providerTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProviderTable)); + if (!providerTable) + { + LeaveCriticalSection(&cs); + return NULL; + } + + list_init(&providerTable->table); + } + + ret = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProvider)); + if (!ret) + { + LeaveCriticalSection(&cs); + return NULL; + } + + list_add_tail(&providerTable->table, &ret->entry); + ret->lib = NULL; + +#ifndef __REACTOS__ + if (fnTableA || fnTableW) + { + ret->moduleName = moduleName ? SECUR32_strdupW(moduleName) : NULL; + _makeFnTableA(&ret->fnTableA, fnTableA, fnTableW); + _makeFnTableW(&ret->fnTableW, fnTableA, fnTableW); + ret->loaded = !moduleName; + } + else +#endif + { + ret->moduleName = SECUR32_strdupW(moduleName); + ret->loaded = FALSE; + } + + LeaveCriticalSection(&cs); + return ret; +} + +void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, + const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) +{ + ULONG i; + + assert(provider); + assert(infoA || infoW); + + EnterCriticalSection(&cs); + + if (!packageTable) + { + packageTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackageTable)); + if (!packageTable) + { + LeaveCriticalSection(&cs); + return; + } + + packageTable->numPackages = 0; + list_init(&packageTable->table); + } + + for (i = 0; i < toAdd; i++) + { + SecurePackage *package = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackage)); + if (!package) + continue; + + list_add_tail(&packageTable->table, &package->entry); + + package->provider = provider; + _copyPackageInfo(&package->infoW, + infoA ? &infoA[i] : NULL, + infoW ? &infoW[i] : NULL); + } + packageTable->numPackages += toAdd; + + LeaveCriticalSection(&cs); +} diff --git a/dll/win32/schannel/stubs.c b/dll/win32/schannel/stubs.c new file mode 100644 index 00000000000..dd6fe1ab592 --- /dev/null +++ b/dll/win32/schannel/stubs.c @@ -0,0 +1,27 @@ + +#include "precomp.h" + +SECURITY_STATUS WINAPI schan_AcceptSecurityContext( + PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, + ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, + PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + return SEC_E_UNSUPPORTED_FUNCTION; +} + +SECURITY_STATUS WINAPI schan_ApplyControlToken(PCtxtHandle phContext, + PSecBufferDesc pInput) +{ + return SEC_E_UNSUPPORTED_FUNCTION; +} + +SECURITY_STATUS WINAPI schan_CompleteAuthToken(PCtxtHandle phContext, + PSecBufferDesc pToken) +{ + return SEC_E_UNSUPPORTED_FUNCTION; +} + +SECURITY_STATUS WINAPI schan_ImpersonateSecurityContext(PCtxtHandle phContext) +{ + return SEC_E_UNSUPPORTED_FUNCTION; +} diff --git a/dll/win32/secur32/CMakeLists.txt b/dll/win32/secur32/CMakeLists.txt index c09dc40490d..94a2b747151 100644 --- a/dll/win32/secur32/CMakeLists.txt +++ b/dll/win32/secur32/CMakeLists.txt @@ -9,6 +9,8 @@ list(APPEND SOURCE secext.c sspi.c stubs.c + thunks.c + wrapper.c precomp.h) add_library(secur32 SHARED @@ -17,11 +19,11 @@ add_library(secur32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/secur32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/secur32.def) -set_module_type(secur32 win32dll UNICODE ENTRYPOINT DllMain 12) +set_module_type(secur32 win32dll UNICODE) -target_link_libraries(secur32 lsalib) +target_link_libraries(secur32 lsalib wine) -add_importlibs(secur32 advapi32 kernel32 ntdll) +add_importlibs(secur32 advapi32 msvcrt kernel32 ntdll) add_pch(secur32 precomp.h SOURCE) add_cd_file(TARGET secur32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/secur32/precomp.h b/dll/win32/secur32/precomp.h index 427b1e0d5b3..a57daeaa66a 100644 --- a/dll/win32/secur32/precomp.h +++ b/dll/win32/secur32/precomp.h @@ -17,10 +17,15 @@ #define COM_NO_WINDOWS_H #include #include +#include +#include #define NTOS_MODE_USER #include #include #include +#include "secur32_priv.h" +#include "thunks.h" + #endif /* _SECUR32_PCH_ */ diff --git a/dll/win32/secur32/secur32.spec b/dll/win32/secur32/secur32.spec index 8ccc0ddd7c0..fe9d5e64410 100644 --- a/dll/win32/secur32/secur32.spec +++ b/dll/win32/secur32/secur32.spec @@ -5,8 +5,7 @@ @ stdcall AddCredentialsW(ptr wstr wstr long ptr ptr ptr ptr) @ stdcall AddSecurityPackageA(str ptr) @ stdcall AddSecurityPackageW(wstr ptr) -@ stdcall ApplyControlTokenA(ptr ptr) -@ stdcall ApplyControlToken(ptr ptr) ApplyControlTokenW +@ stdcall ApplyControlToken(ptr ptr) @ stdcall CompleteAuthToken(ptr ptr) @ stub CredMarshalTargetInfo @ stub CredUnmarshalTargetInfo @@ -69,8 +68,8 @@ @ stub SecpFreeMemory @ stub SecpTranslateName @ stub SecpTranslateNameEx -@ stub SetContextAttributesA -@ stub SetContextAttributesW +@ stdcall SetContextAttributesA(ptr long ptr long) +@ stdcall SetContextAttributesW(ptr long ptr long) @ stdcall TranslateNameA(str long long ptr ptr) @ stdcall TranslateNameW(wstr long long ptr ptr) @ stdcall UnsealMessage(ptr ptr long ptr) DecryptMessage diff --git a/dll/win32/secur32/secur32_priv.h b/dll/win32/secur32/secur32_priv.h new file mode 100644 index 00000000000..6c675ae43c8 --- /dev/null +++ b/dll/win32/secur32/secur32_priv.h @@ -0,0 +1,57 @@ +/* + * secur32 private definitions. + * + * Copyright (C) 2004 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SECUR32_PRIV_H__ +#define __SECUR32_PRIV_H__ + +#include + +typedef struct _SecureProvider +{ + struct list entry; + BOOL loaded; + PWSTR moduleName; + HMODULE lib; + SecurityFunctionTableA fnTableA; + SecurityFunctionTableW fnTableW; +} SecureProvider; + +typedef struct _SecurePackage +{ + struct list entry; + SecPkgInfoW infoW; + SecureProvider *provider; +} SecurePackage; + +/* Tries to find the package named packageName. If it finds it, implicitly + * loads the package if it isn't already loaded. + */ +SecurePackage *SECUR32_findPackageW(PCWSTR packageName) DECLSPEC_HIDDEN; + +/* Tries to find the package named packageName. (Thunks to _findPackageW) + */ +SecurePackage *SECUR32_findPackageA(PCSTR packageName) DECLSPEC_HIDDEN; + +/* A few string helpers; will return NULL if str is NULL. Free return with + * HeapFree */ +PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str) DECLSPEC_HIDDEN; +PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str) DECLSPEC_HIDDEN; + +#endif /* ndef __SECUR32_PRIV_H__ */ diff --git a/dll/win32/secur32/sspi.c b/dll/win32/secur32/sspi.c index 5cb902f26d9..670d8b4851f 100644 --- a/dll/win32/secur32/sspi.c +++ b/dll/win32/secur32/sspi.c @@ -1,10 +1,53 @@ +/* Copyright (C) 2004 Juan Lang + * + * This file implements loading of SSP DLLs. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include "precomp.h" -#define NDEBUG -#include +#include -SECURITY_STATUS WINAPI ApplyControlTokenW(PCtxtHandle Handle, PSecBufferDesc Buffer); -SECURITY_STATUS WINAPI ApplyControlTokenA(PCtxtHandle Handle, PSecBufferDesc Buffer); +#include +WINE_DEFAULT_DEBUG_CHANNEL(secur32); + +typedef struct _SecurePackageTable +{ + DWORD numPackages; + DWORD numAllocated; + struct list table; +} SecurePackageTable; + +typedef struct _SecureProviderTable +{ + DWORD numProviders; + DWORD numAllocated; + struct list table; +} SecureProviderTable; + +static CRITICAL_SECTION cs; +static CRITICAL_SECTION_DEBUG cs_debug = +{ + 0, 0, &cs, + { &cs_debug.ProcessLocksList, &cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": cs") } +}; +static CRITICAL_SECTION cs = { &cs_debug, -1, 0, 0, 0, 0 }; +static SecurePackageTable *packageTable = NULL; +static SecureProviderTable *providerTable = NULL; static SecurityFunctionTableA securityFunctionTableA = { @@ -18,7 +61,7 @@ static SecurityFunctionTableA securityFunctionTableA = AcceptSecurityContext, CompleteAuthToken, DeleteSecurityContext, - ApplyControlTokenA, + ApplyControlToken, QueryContextAttributesA, ImpersonateSecurityContext, RevertSecurityContext, @@ -50,7 +93,7 @@ static SecurityFunctionTableW securityFunctionTableW = AcceptSecurityContext, CompleteAuthToken, DeleteSecurityContext, - ApplyControlTokenW, + ApplyControlToken, QueryContextAttributesW, ImpersonateSecurityContext, RevertSecurityContext, @@ -70,52 +113,167 @@ static SecurityFunctionTableW securityFunctionTableW = NULL }; -SECURITY_STATUS -WINAPI -EnumerateSecurityPackagesW ( - PULONG pcPackages, - PSecPkgInfoW* ppPackageInfo - ) +/*********************************************************************** + * EnumerateSecurityPackagesW (SECUR32.@) + */ +SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages, + PSecPkgInfoW *ppPackageInfo) { SECURITY_STATUS ret = SEC_E_OK; + TRACE("(%p, %p)\n", pcPackages, ppPackageInfo); + + /* windows just crashes if pcPackages or ppPackageInfo is NULL, so will I */ *pcPackages = 0; - *ppPackageInfo = NULL; - /* + EnterCriticalSection(&cs); if (packageTable) { + SecurePackage *package; + size_t bytesNeeded; + bytesNeeded = packageTable->numPackages * sizeof(SecPkgInfoW); + LIST_FOR_EACH_ENTRY(package, &packageTable->table, SecurePackage, entry) + { + if (package->infoW.Name) + bytesNeeded += (lstrlenW(package->infoW.Name) + 1) * sizeof(WCHAR); + if (package->infoW.Comment) + bytesNeeded += (lstrlenW(package->infoW.Comment) + 1) * sizeof(WCHAR); + } + if (bytesNeeded) + { + *ppPackageInfo = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (*ppPackageInfo) + { + ULONG i = 0; + PWSTR nextString; + + *pcPackages = packageTable->numPackages; + nextString = (PWSTR)((PBYTE)*ppPackageInfo + + packageTable->numPackages * sizeof(SecPkgInfoW)); + LIST_FOR_EACH_ENTRY(package, &packageTable->table, SecurePackage, entry) + { + PSecPkgInfoW pkgInfo = *ppPackageInfo + i++; + + *pkgInfo = package->infoW; + if (package->infoW.Name) + { + TRACE("Name[%d] = %S\n", i - 1, package->infoW.Name); + pkgInfo->Name = nextString; + lstrcpyW(nextString, package->infoW.Name); + nextString += lstrlenW(nextString) + 1; + } + else + pkgInfo->Name = NULL; + if (package->infoW.Comment) + { + TRACE("Comment[%d] = %S\n", i - 1, package->infoW.Comment); + pkgInfo->Comment = nextString; + lstrcpyW(nextString, package->infoW.Comment); + nextString += lstrlenW(nextString) + 1; + } + else + pkgInfo->Comment = NULL; + } + } + else + ret = SEC_E_INSUFFICIENT_MEMORY; + } } - */ - - UNIMPLEMENTED; + LeaveCriticalSection(&cs); + TRACE("<-- 0x%08x\n", ret); return ret; } -SECURITY_STATUS -WINAPI -EnumerateSecurityPackagesA( - PULONG pcPackages, - PSecPkgInfoA* ppPackageInfo - ) +/* Converts info (which is assumed to be an array of cPackages SecPkgInfoW + * structures) into an array of SecPkgInfoA structures, which it returns. + */ +static PSecPkgInfoA thunk_PSecPkgInfoWToA(ULONG cPackages, + const SecPkgInfoW *info) +{ + PSecPkgInfoA ret; + + if (info) + { + size_t bytesNeeded = cPackages * sizeof(SecPkgInfoA); + ULONG i; + + for (i = 0; i < cPackages; i++) + { + if (info[i].Name) + bytesNeeded += WideCharToMultiByte(CP_ACP, 0, info[i].Name, + -1, NULL, 0, NULL, NULL); + if (info[i].Comment) + bytesNeeded += WideCharToMultiByte(CP_ACP, 0, info[i].Comment, + -1, NULL, 0, NULL, NULL); + } + ret = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (ret) + { + PSTR nextString; + + nextString = (PSTR)((PBYTE)ret + cPackages * sizeof(SecPkgInfoA)); + for (i = 0; i < cPackages; i++) + { + PSecPkgInfoA pkgInfo = ret + i; + int bytes; + + memcpy(pkgInfo, &info[i], sizeof(SecPkgInfoA)); + if (info[i].Name) + { + pkgInfo->Name = nextString; + /* just repeat back to WideCharToMultiByte how many bytes + * it requires, since we asked it earlier + */ + bytes = WideCharToMultiByte(CP_ACP, 0, info[i].Name, -1, + NULL, 0, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, info[i].Name, -1, + pkgInfo->Name, bytes, NULL, NULL); + nextString += lstrlenA(nextString) + 1; + } + else + pkgInfo->Name = NULL; + if (info[i].Comment) + { + pkgInfo->Comment = nextString; + /* just repeat back to WideCharToMultiByte how many bytes + * it requires, since we asked it earlier + */ + bytes = WideCharToMultiByte(CP_ACP, 0, info[i].Comment, -1, + NULL, 0, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, info[i].Comment, -1, + pkgInfo->Comment, bytes, NULL, NULL); + nextString += lstrlenA(nextString) + 1; + } + else + pkgInfo->Comment = NULL; + } + } + } + else + ret = NULL; + return ret; +} + +/*********************************************************************** + * EnumerateSecurityPackagesA (SECUR32.@) + */ +SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages, + PSecPkgInfoA *ppPackageInfo) { SECURITY_STATUS ret; - PSecPkgInfoW info = NULL; + PSecPkgInfoW info; ret = EnumerateSecurityPackagesW(pcPackages, &info); if (ret == SEC_E_OK && *pcPackages && info) { - /* *ppPackageInfo = thunk_PSecPkgInfoWToA(*pcPackages, info); + *ppPackageInfo = thunk_PSecPkgInfoWToA(*pcPackages, info); if (*pcPackages && !*ppPackageInfo) { *pcPackages = 0; ret = SEC_E_INSUFFICIENT_MEMORY; - } */ + } FreeContextBuffer(info); } - *ppPackageInfo = NULL; - UNIMPLEMENTED; - return ret; } @@ -129,434 +287,19 @@ FreeContextBuffer ( return SEC_E_OK; } -SECURITY_STATUS -WINAPI -FreeCredentialsHandle(PCredHandle Handle) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -DeleteSecurityContext(PCtxtHandle Handle) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(VOID) { - DPRINT("InitSecurityInterfaceW() called\n"); + TRACE("InitSecurityInterfaceW() called\n"); return &securityFunctionTableW; } -SECURITY_STATUS -WINAPI -EncryptMessage(PCtxtHandle Handle, - ULONG Foo, - PSecBufferDesc Buffer, - ULONG Bar) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -DecryptMessage(PCtxtHandle Handle, - PSecBufferDesc Buffer, - ULONG Foo, - PULONG Bar) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ApplyControlTokenW(PCtxtHandle Handle, - PSecBufferDesc Buffer) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ApplyControlTokenA(PCtxtHandle Handle, - PSecBufferDesc Buffer) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -CompleteAuthToken(PCtxtHandle Handle, - PSecBufferDesc Buffer) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -QueryContextAttributesA(PCtxtHandle Handle, - ULONG Foo, - PVOID Bar) -{ - UNIMPLEMENTED; - - if (Handle) - { - Bar = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_INVALID_HANDLE; -} - -SECURITY_STATUS -WINAPI -QueryContextAttributesW(PCtxtHandle Handle, - ULONG Foo, - PVOID Bar) -{ - UNIMPLEMENTED; - - if (Handle) - { - Bar = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_INVALID_HANDLE; -} - -SECURITY_STATUS -WINAPI -AcquireCredentialsHandleA ( - SEC_CHAR* pszPrincipal, - SEC_CHAR* pszPackage, - ULONG fUsage, - PLUID pID, - PVOID pAuth, - SEC_GET_KEY_FN pGetKeyFn, - PVOID pvGetKeyArgument, - PCredHandle phCred, - PTimeStamp pExpires - ) -{ - UNIMPLEMENTED; - - if (pszPackage) - { - phCred = NULL; - pExpires = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_SECPKG_NOT_FOUND; -} - -SECURITY_STATUS -WINAPI -AcquireCredentialsHandleW ( - SEC_WCHAR* pszPrincipal, - SEC_WCHAR* pszPackage, - ULONG fUsage, - PLUID pID, - PVOID pAuth, - SEC_GET_KEY_FN pGetKeyFn, - PVOID pvGetKeyArgument, - PCredHandle phCred, - PTimeStamp pExpires - ) -{ - UNIMPLEMENTED; - - if (pszPackage) - { - phCred = NULL; - pExpires = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_SECPKG_NOT_FOUND; -} - -SECURITY_STATUS -WINAPI -InitializeSecurityContextW ( - PCredHandle phCred, - PCtxtHandle phContext, - SEC_WCHAR* pszTarget, - ULONG fContextReq, - ULONG Reserved, - ULONG TargetData, - PSecBufferDesc pInput, - ULONG Reserved2, - PCtxtHandle phNewContext, - PSecBufferDesc pOut, - PULONG pfContextAttributes, - PTimeStamp pExpires - ) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -InitializeSecurityContextA ( - PCredHandle phCred, - PCtxtHandle phContext, - SEC_CHAR* pszTarget, - ULONG fContextReq, - ULONG Reserved, - ULONG TargetData, - PSecBufferDesc pInput, - ULONG Reserved2, - PCtxtHandle phNewContext, - PSecBufferDesc pOut, - PULONG pfContextAttributes, - PTimeStamp pExpires - ) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - - -SECURITY_STATUS -SEC_ENTRY -MakeSignature( - PCtxtHandle phContext, - ULONG fQOP, - PSecBufferDesc pMessage, - ULONG MessageSeqNo - ) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - - -SECURITY_STATUS -SEC_ENTRY -VerifySignature( - PCtxtHandle phContext, - PSecBufferDesc pMessage, - ULONG MessageSeqNo, - PULONG pfQOP - ) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -SEC_ENTRY -QuerySecurityPackageInfoA( - SEC_CHAR* pszPackageName, - PSecPkgInfoA* ppPackageInfo -) -{ - UNIMPLEMENTED; - - if (pszPackageName) - { - *ppPackageInfo = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - return SEC_E_SECPKG_NOT_FOUND; -} - -SECURITY_STATUS -SEC_ENTRY -QuerySecurityPackageInfoW( - SEC_WCHAR* pszPackageName, - PSecPkgInfoW* ppPackageInfo -) -{ - UNIMPLEMENTED; - - if (pszPackageName) - { - *ppPackageInfo = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - return SEC_E_SECPKG_NOT_FOUND; -} - -SECURITY_STATUS -WINAPI -AcceptSecurityContext( - PCredHandle phCredential, - PCtxtHandle phContext, - PSecBufferDesc pInput, - ULONG fContextReq, - ULONG TargetDataRep, - PCtxtHandle phNewContext, - PSecBufferDesc pOutput, - ULONG *pfContextAttr, - PTimeStamp ptsExpiry -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -AddCredentialsA( - PCredHandle hCredentials, - SEC_CHAR *pszPrincipal, - SEC_CHAR *pszPackage, - ULONG fCredentialUse, - LPVOID pAuthData, - SEC_GET_KEY_FN pGetKeyFn, - LPVOID pvGetKeyArgument, - PTimeStamp ptsExpiry -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -AddCredentialsW( - PCredHandle hCredentials, - SEC_WCHAR *pszPrincipal, - SEC_WCHAR *pszPackage, - ULONG fCredentialUse, - LPVOID pAuthData, - SEC_GET_KEY_FN pGetKeyFn, - LPVOID pvGetKeyArgument, - PTimeStamp ptsExpiry -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ExportSecurityContext( - PCtxtHandle phContext, - ULONG fFlags, - PSecBuffer pPackedContext, - LPVOID *pToken -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ImpersonateSecurityContext( - PCtxtHandle phContext -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ImportSecurityContextA( - SEC_CHAR *pszPackage, - PSecBuffer pPackedContext, - LPVOID Token, - PCtxtHandle phContext -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -ImportSecurityContextW( - SEC_WCHAR *pszPackage, - PSecBuffer pPackedContext, - LPVOID Token, - PCtxtHandle phContext -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -QueryCredentialsAttributesA( - PCredHandle phCredential, - ULONG ulAttribute, - LPVOID pBuffer -) -{ - UNIMPLEMENTED; - - if (phCredential) - { - pBuffer = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_INVALID_HANDLE; -} - -SECURITY_STATUS -WINAPI -QueryCredentialsAttributesW( - PCredHandle phCredential, - ULONG ulAttribute, - LPVOID pBuffer -) -{ - UNIMPLEMENTED; - - if (phCredential) - { - pBuffer = NULL; - return ERROR_CALL_NOT_IMPLEMENTED; - } - - return SEC_E_INVALID_HANDLE; -} - -SECURITY_STATUS -WINAPI -QuerySecurityContextToken( - PCtxtHandle phContext, - PHANDLE phToken -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - -SECURITY_STATUS -WINAPI -RevertSecurityContext( - PCtxtHandle phContext -) -{ - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; -} - PSecurityFunctionTableA WINAPI InitSecurityInterfaceA(VOID) { - DPRINT("InitSecurityInterfaceA() called\n"); + TRACE("InitSecurityInterfaceA() called\n"); return &securityFunctionTableA; } @@ -587,3 +330,500 @@ TranslateNameW( UNIMPLEMENTED; return FALSE; } + +/*** PRIVATE FUNCTIONS ***************************************************************************/ + +static PWSTR SECUR32_strdupW(PCWSTR str) +{ + PWSTR ret; + + if (str) + { + ret = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(str) + 1) * sizeof(WCHAR)); + if (ret) + lstrcpyW(ret, str); + } + else + ret = NULL; + return ret; +} + +PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str) +{ + PWSTR ret; + + if (str) + { + int charsNeeded = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + + if (charsNeeded) + { + ret = HeapAlloc(GetProcessHeap(), 0, charsNeeded * sizeof(WCHAR)); + if (ret) + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, charsNeeded); + } + else + ret = NULL; + } + else + ret = NULL; + return ret; +} + +PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str) +{ + PSTR ret; + + if (str) + { + int charsNeeded = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, + NULL, NULL); + + if (charsNeeded) + { + ret = HeapAlloc(GetProcessHeap(), 0, charsNeeded); + if (ret) + WideCharToMultiByte(CP_ACP, 0, str, -1, ret, charsNeeded, + NULL, NULL); + } + else + ret = NULL; + } + else + ret = NULL; + return ret; +} + +static void _makeFnTableA(PSecurityFunctionTableA fnTableA, + const SecurityFunctionTableA *inFnTableA, + const SecurityFunctionTableW *inFnTableW) +{ + if (fnTableA) + { + if (inFnTableA) + { + /* The size of the version 1 table is based on platform sdk's + * sspi.h, though the sample ssp also provided with platform sdk + * implies only functions through QuerySecurityPackageInfoA are + * implemented (yikes) + */ + size_t tableSize = inFnTableA->dwVersion == 1 ? + (const BYTE *)&inFnTableA->SetContextAttributesA - + (const BYTE *)inFnTableA : sizeof(SecurityFunctionTableA); + + memcpy(fnTableA, inFnTableA, tableSize); + /* override this, since we can do it internally anyway */ + fnTableA->QuerySecurityPackageInfoA = + QuerySecurityPackageInfoA; + } + else if (inFnTableW) + { + /* functions with thunks */ + if (inFnTableW->AcquireCredentialsHandleW) + fnTableA->AcquireCredentialsHandleA = + thunk_AcquireCredentialsHandleA; + if (inFnTableW->InitializeSecurityContextW) + fnTableA->InitializeSecurityContextA = + thunk_InitializeSecurityContextA; + if (inFnTableW->ImportSecurityContextW) + fnTableA->ImportSecurityContextA = + thunk_ImportSecurityContextA; + if (inFnTableW->AddCredentialsW) + fnTableA->AddCredentialsA = + thunk_AddCredentialsA; + if (inFnTableW->QueryCredentialsAttributesW) + fnTableA->QueryCredentialsAttributesA = + thunk_QueryCredentialsAttributesA; + if (inFnTableW->QueryContextAttributesW) + fnTableA->QueryContextAttributesA = + thunk_QueryContextAttributesA; + if (inFnTableW->SetContextAttributesW) + fnTableA->SetContextAttributesA = + thunk_SetContextAttributesA; + /* this can't be thunked, there's no extra param to know which + * package to forward to */ + fnTableA->EnumerateSecurityPackagesA = NULL; + /* functions with no thunks needed */ + fnTableA->AcceptSecurityContext = inFnTableW->AcceptSecurityContext; + fnTableA->CompleteAuthToken = inFnTableW->CompleteAuthToken; + fnTableA->DeleteSecurityContext = inFnTableW->DeleteSecurityContext; + fnTableA->ImpersonateSecurityContext = + inFnTableW->ImpersonateSecurityContext; + fnTableA->RevertSecurityContext = inFnTableW->RevertSecurityContext; + fnTableA->MakeSignature = inFnTableW->MakeSignature; + fnTableA->VerifySignature = inFnTableW->VerifySignature; + fnTableA->FreeContextBuffer = inFnTableW->FreeContextBuffer; + fnTableA->QuerySecurityPackageInfoA = + QuerySecurityPackageInfoA; + fnTableA->ExportSecurityContext = + inFnTableW->ExportSecurityContext; + fnTableA->QuerySecurityContextToken = + inFnTableW->QuerySecurityContextToken; + fnTableA->EncryptMessage = inFnTableW->EncryptMessage; + fnTableA->DecryptMessage = inFnTableW->DecryptMessage; + } + } +} + +static void _makeFnTableW(PSecurityFunctionTableW fnTableW, + const SecurityFunctionTableA *inFnTableA, + const SecurityFunctionTableW *inFnTableW) +{ + if (fnTableW) + { + if (inFnTableW) + { + /* The size of the version 1 table is based on platform sdk's + * sspi.h, though the sample ssp also provided with platform sdk + * implies only functions through QuerySecurityPackageInfoA are + * implemented (yikes) + */ + size_t tableSize = inFnTableW->dwVersion == 1 ? + (const BYTE *)&inFnTableW->SetContextAttributesW - + (const BYTE *)inFnTableW : sizeof(SecurityFunctionTableW); + + memcpy(fnTableW, inFnTableW, tableSize); + /* override this, since we can do it internally anyway */ + fnTableW->QuerySecurityPackageInfoW = + QuerySecurityPackageInfoW; + } + else if (inFnTableA) + { + /* functions with thunks */ + if (inFnTableA->AcquireCredentialsHandleA) + fnTableW->AcquireCredentialsHandleW = + thunk_AcquireCredentialsHandleW; + if (inFnTableA->InitializeSecurityContextA) + fnTableW->InitializeSecurityContextW = + thunk_InitializeSecurityContextW; + if (inFnTableA->ImportSecurityContextA) + fnTableW->ImportSecurityContextW = + thunk_ImportSecurityContextW; + if (inFnTableA->AddCredentialsA) + fnTableW->AddCredentialsW = + thunk_AddCredentialsW; + if (inFnTableA->QueryCredentialsAttributesA) + fnTableW->QueryCredentialsAttributesW = + thunk_QueryCredentialsAttributesW; + if (inFnTableA->QueryContextAttributesA) + fnTableW->QueryContextAttributesW = + thunk_QueryContextAttributesW; + if (inFnTableA->SetContextAttributesA) + fnTableW->SetContextAttributesW = + thunk_SetContextAttributesW; + /* this can't be thunked, there's no extra param to know which + * package to forward to */ + fnTableW->EnumerateSecurityPackagesW = NULL; + /* functions with no thunks needed */ + fnTableW->AcceptSecurityContext = inFnTableA->AcceptSecurityContext; + fnTableW->CompleteAuthToken = inFnTableA->CompleteAuthToken; + fnTableW->DeleteSecurityContext = inFnTableA->DeleteSecurityContext; + fnTableW->ImpersonateSecurityContext = + inFnTableA->ImpersonateSecurityContext; + fnTableW->RevertSecurityContext = inFnTableA->RevertSecurityContext; + fnTableW->MakeSignature = inFnTableA->MakeSignature; + fnTableW->VerifySignature = inFnTableA->VerifySignature; + fnTableW->FreeContextBuffer = inFnTableA->FreeContextBuffer; + fnTableW->QuerySecurityPackageInfoW = + QuerySecurityPackageInfoW; + fnTableW->ExportSecurityContext = + inFnTableA->ExportSecurityContext; + fnTableW->QuerySecurityContextToken = + inFnTableA->QuerySecurityContextToken; + fnTableW->EncryptMessage = inFnTableA->EncryptMessage; + fnTableW->DecryptMessage = inFnTableA->DecryptMessage; + } + } +} + +static void _copyPackageInfo(PSecPkgInfoW info, const SecPkgInfoA *inInfoA, + const SecPkgInfoW *inInfoW) +{ + if (info && (inInfoA || inInfoW)) + { + /* odd, I know, but up until Name and Comment the structures are + * identical + */ + memcpy(info, inInfoW ? inInfoW : (const SecPkgInfoW *)inInfoA, sizeof(*info)); + if (inInfoW) + { + info->Name = SECUR32_strdupW(inInfoW->Name); + info->Comment = SECUR32_strdupW(inInfoW->Comment); + } + else + { + info->Name = SECUR32_AllocWideFromMultiByte(inInfoA->Name); + info->Comment = SECUR32_AllocWideFromMultiByte(inInfoA->Comment); + } + } +} + +static +SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, + const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) +{ + SecureProvider *ret; + + EnterCriticalSection(&cs); + + if (!providerTable) + { + providerTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProviderTable)); + if (!providerTable) + { + LeaveCriticalSection(&cs); + return NULL; + } + + list_init(&providerTable->table); + } + + ret = HeapAlloc(GetProcessHeap(), 0, sizeof(SecureProvider)); + if (!ret) + { + LeaveCriticalSection(&cs); + return NULL; + } + + list_add_tail(&providerTable->table, &ret->entry); + ret->lib = NULL; + + if (fnTableA || fnTableW) + { + ret->moduleName = moduleName ? SECUR32_strdupW(moduleName) : NULL; + _makeFnTableA(&ret->fnTableA, fnTableA, fnTableW); + _makeFnTableW(&ret->fnTableW, fnTableA, fnTableW); + ret->loaded = !moduleName; + } + else + { + ret->moduleName = SECUR32_strdupW(moduleName); + ret->loaded = FALSE; + } + + LeaveCriticalSection(&cs); + return ret; +} + +static +void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, + const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) +{ + ULONG i; + + assert(provider); + assert(infoA || infoW); + + EnterCriticalSection(&cs); + + if (!packageTable) + { + packageTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackageTable)); + if (!packageTable) + { + LeaveCriticalSection(&cs); + return; + } + + packageTable->numPackages = 0; + list_init(&packageTable->table); + } + + for (i = 0; i < toAdd; i++) + { + SecurePackage *package = HeapAlloc(GetProcessHeap(), 0, sizeof(SecurePackage)); + if (!package) + continue; + + list_add_tail(&packageTable->table, &package->entry); + + package->provider = provider; + _copyPackageInfo(&package->infoW, + infoA ? &infoA[i] : NULL, + infoW ? &infoW[i] : NULL); + } + packageTable->numPackages += toAdd; + + LeaveCriticalSection(&cs); +} + +static void _tryLoadProvider(PWSTR moduleName) +{ + HMODULE lib = LoadLibraryW(moduleName); + + if (lib) + { + INIT_SECURITY_INTERFACE_W pInitSecurityInterfaceW = + (INIT_SECURITY_INTERFACE_W)GetProcAddress(lib, + SECURITY_ENTRYPOINT_ANSIW); + INIT_SECURITY_INTERFACE_A pInitSecurityInterfaceA = + (INIT_SECURITY_INTERFACE_A)GetProcAddress(lib, + SECURITY_ENTRYPOINT_ANSIA); + + TRACE("loaded %S, InitSecurityInterfaceA is %p, InitSecurityInterfaceW is %p\n", + moduleName, pInitSecurityInterfaceA, + pInitSecurityInterfaceW); + if (pInitSecurityInterfaceW || pInitSecurityInterfaceA) + { + PSecurityFunctionTableA fnTableA = NULL; + PSecurityFunctionTableW fnTableW = NULL; + ULONG toAdd = 0; + PSecPkgInfoA infoA = NULL; + PSecPkgInfoW infoW = NULL; + SECURITY_STATUS ret = SEC_E_OK; + + if (pInitSecurityInterfaceA) + fnTableA = pInitSecurityInterfaceA(); + if (pInitSecurityInterfaceW) + fnTableW = pInitSecurityInterfaceW(); + if (fnTableW && fnTableW->EnumerateSecurityPackagesW) + { + if (fnTableW != &securityFunctionTableW) + ret = fnTableW->EnumerateSecurityPackagesW(&toAdd, &infoW); + else + TRACE("%S has built-in providers, skip adding\n", moduleName); + } + else if (fnTableA && fnTableA->EnumerateSecurityPackagesA) + { + if (fnTableA != &securityFunctionTableA) + ret = fnTableA->EnumerateSecurityPackagesA(&toAdd, &infoA); + else + TRACE("%S has built-in providers, skip adding\n", moduleName); + } + if (ret == SEC_E_OK && toAdd > 0 && (infoW || infoA)) + { + SecureProvider *provider = SECUR32_addProvider(NULL, NULL, + moduleName); + + if (provider) + SECUR32_addPackages(provider, toAdd, infoA, infoW); + if (infoW) + fnTableW->FreeContextBuffer(infoW); + else + fnTableA->FreeContextBuffer(infoA); + } + } + FreeLibrary(lib); + } + else + WARN("failed to load %S\n", moduleName); +} + +static const WCHAR securityProvidersKeyW[] = { + 'S','Y','S','T','E','M','\\','C','u','r','r','e','n','t','C','o','n','t','r', + 'o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','S','e','c','u','r', + 'i','t','y','P','r','o','v','i','d','e','r','s','\0' + }; +static const WCHAR securityProvidersW[] = { + 'S','e','c','u','r','i','t','y','P','r','o','v','i','d','e','r','s',0 + }; + +static void SECUR32_initializeProviders(void) +{ + HKEY key; + LSTATUS apiRet; + + /* Now load providers from registry */ + apiRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, securityProvidersKeyW, 0, + KEY_READ, &key); + if (apiRet == ERROR_SUCCESS) + { + WCHAR securityPkgNames[MAX_PATH]; /* arbitrary len */ + DWORD size = sizeof(securityPkgNames) / sizeof(WCHAR), type; + + apiRet = RegQueryValueExW(key, securityProvidersW, NULL, &type, + (PBYTE)securityPkgNames, &size); + if (apiRet == ERROR_SUCCESS && type == REG_SZ) + { + WCHAR *ptr; + + size = size / sizeof(WCHAR); + for (ptr = securityPkgNames; + ptr < securityPkgNames + size; ) + { + WCHAR *comma; + + for (comma = ptr; *comma && *comma != ','; comma++) + ; + if (*comma == ',') + *comma = '\0'; + for (; *ptr && isspace(*ptr) && ptr < securityPkgNames + size; + ptr++) + ; + if (*ptr) + _tryLoadProvider(ptr); + ptr += lstrlenW(ptr) + 1; + } + } + RegCloseKey(key); + } +} + +SecurePackage *SECUR32_findPackageW(PCWSTR packageName) +{ + SecurePackage *ret = NULL; + BOOL matched = FALSE; + + if (!packageTable) + SECUR32_initializeProviders(); + + if (packageTable && packageName) + { + LIST_FOR_EACH_ENTRY(ret, &packageTable->table, SecurePackage, entry) + { + matched = !lstrcmpiW(ret->infoW.Name, packageName); + if (matched) + break; + } + + if (!matched) + return NULL; + + if (ret->provider && !ret->provider->loaded) + { + ret->provider->lib = LoadLibraryW(ret->provider->moduleName); + if (ret->provider->lib) + { + INIT_SECURITY_INTERFACE_W pInitSecurityInterfaceW = + (INIT_SECURITY_INTERFACE_W) GetProcAddress(ret->provider->lib, + SECURITY_ENTRYPOINT_ANSIW); + INIT_SECURITY_INTERFACE_A pInitSecurityInterfaceA = + (INIT_SECURITY_INTERFACE_A) GetProcAddress(ret->provider->lib, + SECURITY_ENTRYPOINT_ANSIA); + PSecurityFunctionTableA fnTableA = NULL; + PSecurityFunctionTableW fnTableW = NULL; + + if (pInitSecurityInterfaceA) + fnTableA = pInitSecurityInterfaceA(); + if (pInitSecurityInterfaceW) + fnTableW = pInitSecurityInterfaceW(); + /* don't update built-in SecurityFunctionTable */ + if (fnTableA != &securityFunctionTableA) + _makeFnTableA(&ret->provider->fnTableA, fnTableA, fnTableW); + if (fnTableW != &securityFunctionTableW) + _makeFnTableW(&ret->provider->fnTableW, fnTableA, fnTableW); + ret->provider->loaded = TRUE; + } + else + ret = NULL; + } + } + return ret; +} + +SecurePackage *SECUR32_findPackageA(PCSTR packageName) +{ + SecurePackage *ret; + + if (packageName) + { + UNICODE_STRING package; + + RtlCreateUnicodeStringFromAsciiz(&package, packageName); + ret = SECUR32_findPackageW(package.Buffer); + RtlFreeUnicodeString(&package); + } + else + ret = NULL; + return ret; +} diff --git a/dll/win32/secur32/thunks.c b/dll/win32/secur32/thunks.c new file mode 100644 index 00000000000..6fc7258e0cc --- /dev/null +++ b/dll/win32/secur32/thunks.c @@ -0,0 +1,893 @@ +/* Copyright (C) 2004 Juan Lang + * + * This file implements thunks between wide char and multibyte functions for + * SSPs that only provide one or the other. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "precomp.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(secur32); + +SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA( + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_a(pszPrincipal), + debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, + pvGetKeyArgument, phCredential, ptsExpiry); + if (pszPackage) + { + UNICODE_STRING principal, package; + + RtlCreateUnicodeStringFromAsciiz(&principal, pszPrincipal); + RtlCreateUnicodeStringFromAsciiz(&package, pszPackage); + ret = AcquireCredentialsHandleW(principal.Buffer, package.Buffer, + fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, + phCredential, ptsExpiry); + RtlFreeUnicodeString(&principal); + RtlFreeUnicodeString(&package); + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW( + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_w(pszPrincipal), + debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, + pvGetKeyArgument, phCredential, ptsExpiry); + if (pszPackage) + { + PSTR principal, package; + + principal = SECUR32_AllocMultiByteFromWide(pszPrincipal); + package = SECUR32_AllocMultiByteFromWide(pszPackage); + ret = AcquireCredentialsHandleA(principal, package, fCredentialsUse, + pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential, + ptsExpiry); + HeapFree(GetProcessHeap(), 0, principal); + HeapFree(GetProcessHeap(), 0, package); + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/* thunking is pretty dicey for these--the output type depends on ulAttribute, + * so we have to know about every type the caller does + */ +SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.QueryCredentialsAttributesW) + { + ret = package->provider->fnTableW.QueryCredentialsAttributesW( + cred, ulAttribute, pBuffer); + if (ret == SEC_E_OK) + { + switch (ulAttribute) + { + case SECPKG_CRED_ATTR_NAMES: + { + PSecPkgCredentials_NamesW names = + (PSecPkgCredentials_NamesW)pBuffer; + SEC_WCHAR *oldUser = names->sUserName; + + if (oldUser) + { + names->sUserName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldUser); + package->provider->fnTableW.FreeContextBuffer( + oldUser); + } + break; + } + default: + WARN("attribute type %d unknown\n", ulAttribute); + ret = SEC_E_INTERNAL_ERROR; + } + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.QueryCredentialsAttributesA) + { + ret = package->provider->fnTableA.QueryCredentialsAttributesA( + cred, ulAttribute, pBuffer); + if (ret == SEC_E_OK) + { + switch (ulAttribute) + { + case SECPKG_CRED_ATTR_NAMES: + { + PSecPkgCredentials_NamesA names = + (PSecPkgCredentials_NamesA)pBuffer; + SEC_CHAR *oldUser = names->sUserName; + + if (oldUser) + { + names->sUserName = + (PSTR)SECUR32_AllocWideFromMultiByte(oldUser); + package->provider->fnTableA.FreeContextBuffer( + oldUser); + } + break; + } + default: + WARN("attribute type %d unknown\n", ulAttribute); + ret = SEC_E_INTERNAL_ERROR; + } + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_CHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + + if (package && package->provider) + { + if (package->provider->fnTableW.InitializeSecurityContextW) + { + UNICODE_STRING target; + + RtlCreateUnicodeStringFromAsciiz(&target, pszTargetName); + ret = package->provider->fnTableW.InitializeSecurityContextW( + phCredential, phContext, target.Buffer, fContextReq, Reserved1, + TargetDataRep, pInput, Reserved2, phNewContext, pOutput, + pfContextAttr, ptsExpiry); + RtlFreeUnicodeString(&target); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_WCHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + + if (package && package->provider) + { + if (package->provider->fnTableA.InitializeSecurityContextA) + { + PSTR target = SECUR32_AllocMultiByteFromWide(pszTargetName); + + ret = package->provider->fnTableA.InitializeSecurityContextA( + phCredential, phContext, target, fContextReq, Reserved1, + TargetDataRep, pInput, Reserved2, phNewContext, pOutput, + pfContextAttr, ptsExpiry); + HeapFree(GetProcessHeap(), 0, target); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA(PCredHandle hCredentials, + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal), + debugstr_a(pszPackage), fCredentialUse, pAuthData, pGetKeyFn, + pvGetKeyArgument, ptsExpiry); + if (hCredentials) + { + SecurePackage *package = (SecurePackage *)hCredentials->dwUpper; + PCredHandle cred = (PCtxtHandle)hCredentials->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.AddCredentialsW) + { + UNICODE_STRING szPrincipal, szPackage; + + RtlCreateUnicodeStringFromAsciiz(&szPrincipal, pszPrincipal); + RtlCreateUnicodeStringFromAsciiz(&szPackage, pszPackage); + ret = package->provider->fnTableW.AddCredentialsW( + cred, szPrincipal.Buffer, szPackage.Buffer, fCredentialUse, + pAuthData, pGetKeyFn, pvGetKeyArgument, ptsExpiry); + RtlFreeUnicodeString(&szPrincipal); + RtlFreeUnicodeString(&szPackage); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials, + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal), + debugstr_w(pszPackage), fCredentialUse, pAuthData, pGetKeyFn, + pvGetKeyArgument, ptsExpiry); + if (hCredentials) + { + SecurePackage *package = (SecurePackage *)hCredentials->dwUpper; + PCredHandle cred = (PCtxtHandle)hCredentials->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.AddCredentialsA) + { + PSTR szPrincipal = SECUR32_AllocMultiByteFromWide(pszPrincipal); + PSTR szPackage = SECUR32_AllocMultiByteFromWide(pszPackage); + + ret = package->provider->fnTableA.AddCredentialsA( + cred, szPrincipal, szPackage, fCredentialUse, pAuthData, + pGetKeyFn, pvGetKeyArgument, ptsExpiry); + HeapFree(GetProcessHeap(), 0, szPrincipal); + HeapFree(GetProcessHeap(), 0, szPackage); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +static PSecPkgInfoA _copyPackageInfoFlatWToA(const SecPkgInfoW *infoW) +{ + PSecPkgInfoA ret; + + if (infoW) + { + size_t bytesNeeded = sizeof(SecPkgInfoA); + int nameLen = 0, commentLen = 0; + + if (infoW->Name) + { + nameLen = WideCharToMultiByte(CP_ACP, 0, infoW->Name, -1, + NULL, 0, NULL, NULL); + bytesNeeded += nameLen; + } + if (infoW->Comment) + { + commentLen = WideCharToMultiByte(CP_ACP, 0, infoW->Comment, -1, + NULL, 0, NULL, NULL); + bytesNeeded += commentLen; + } + ret = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (ret) + { + PSTR nextString = (PSTR)((PBYTE)ret + sizeof(SecPkgInfoA)); + + memcpy(ret, infoW, sizeof(SecPkgInfoA)); + if (infoW->Name) + { + ret->Name = nextString; + WideCharToMultiByte(CP_ACP, 0, infoW->Name, -1, nextString, + nameLen, NULL, NULL); + nextString += nameLen; + } + else + ret->Name = NULL; + if (infoW->Comment) + { + ret->Comment = nextString; + WideCharToMultiByte(CP_ACP, 0, infoW->Comment, -1, nextString, + nameLen, NULL, NULL); + } + else + ret->Comment = NULL; + } + } + else + ret = NULL; + return ret; +} + +static SECURITY_STATUS thunk_ContextAttributesWToA(SecurePackage *package, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret = SEC_E_OK; + + if (package && pBuffer) + { + switch (ulAttribute) + { + case SECPKG_ATTR_NAMES: + { + PSecPkgContext_NamesW names = (PSecPkgContext_NamesW)pBuffer; + SEC_WCHAR *oldUser = names->sUserName; + + if (oldUser) + { + names->sUserName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldUser); + package->provider->fnTableW.FreeContextBuffer(oldUser); + } + break; + } + case SECPKG_ATTR_AUTHORITY: + { + PSecPkgContext_AuthorityW names = + (PSecPkgContext_AuthorityW)pBuffer; + SEC_WCHAR *oldAuth = names->sAuthorityName; + + if (oldAuth) + { + names->sAuthorityName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldAuth); + package->provider->fnTableW.FreeContextBuffer(oldAuth); + } + break; + } + case SECPKG_ATTR_KEY_INFO: + { + PSecPkgContext_KeyInfoW info = (PSecPkgContext_KeyInfoW)pBuffer; + SEC_WCHAR *oldSigAlgName = info->sSignatureAlgorithmName; + SEC_WCHAR *oldEncAlgName = info->sEncryptAlgorithmName; + + if (oldSigAlgName) + { + info->sSignatureAlgorithmName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldSigAlgName); + package->provider->fnTableW.FreeContextBuffer( + oldSigAlgName); + } + if (oldEncAlgName) + { + info->sEncryptAlgorithmName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldEncAlgName); + package->provider->fnTableW.FreeContextBuffer( + oldEncAlgName); + } + break; + } + case SECPKG_ATTR_PACKAGE_INFO: + { + PSecPkgContext_PackageInfoW info = + (PSecPkgContext_PackageInfoW)pBuffer; + PSecPkgInfoW oldPkgInfo = info->PackageInfo; + + if (oldPkgInfo) + { + info->PackageInfo = (PSecPkgInfoW) + _copyPackageInfoFlatWToA(oldPkgInfo); + package->provider->fnTableW.FreeContextBuffer(oldPkgInfo); + } + break; + } + case SECPKG_ATTR_NEGOTIATION_INFO: + { + PSecPkgContext_NegotiationInfoW info = + (PSecPkgContext_NegotiationInfoW)pBuffer; + PSecPkgInfoW oldPkgInfo = info->PackageInfo; + + if (oldPkgInfo) + { + info->PackageInfo = (PSecPkgInfoW) + _copyPackageInfoFlatWToA(oldPkgInfo); + package->provider->fnTableW.FreeContextBuffer(oldPkgInfo); + } + break; + } + case SECPKG_ATTR_NATIVE_NAMES: + { + PSecPkgContext_NativeNamesW names = + (PSecPkgContext_NativeNamesW)pBuffer; + PWSTR oldClient = names->sClientName; + PWSTR oldServer = names->sServerName; + + if (oldClient) + { + names->sClientName = (PWSTR)SECUR32_AllocMultiByteFromWide( + oldClient); + package->provider->fnTableW.FreeContextBuffer(oldClient); + } + if (oldServer) + { + names->sServerName = (PWSTR)SECUR32_AllocMultiByteFromWide( + oldServer); + package->provider->fnTableW.FreeContextBuffer(oldServer); + } + break; + } + case SECPKG_ATTR_CREDENTIAL_NAME: + { + PSecPkgContext_CredentialNameW name = + (PSecPkgContext_CredentialNameW)pBuffer; + PWSTR oldCred = name->sCredentialName; + + if (oldCred) + { + name->sCredentialName = + (PWSTR)SECUR32_AllocMultiByteFromWide(oldCred); + package->provider->fnTableW.FreeContextBuffer(oldCred); + } + break; + } + /* no thunking needed: */ + case SECPKG_ATTR_ACCESS_TOKEN: + case SECPKG_ATTR_DCE_INFO: + case SECPKG_ATTR_FLAGS: + case SECPKG_ATTR_LIFESPAN: + case SECPKG_ATTR_PASSWORD_EXPIRY: + case SECPKG_ATTR_SESSION_KEY: + case SECPKG_ATTR_SIZES: + case SECPKG_ATTR_STREAM_SIZES: + case SECPKG_ATTR_TARGET_INFORMATION: + break; + default: + WARN("attribute type %d unknown\n", ulAttribute); + ret = SEC_E_INTERNAL_ERROR; + } + } + else + ret = SEC_E_INVALID_TOKEN; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.QueryContextAttributesW) + { + ret = package->provider->fnTableW.QueryContextAttributesW( + ctxt, ulAttribute, pBuffer); + if (ret == SEC_E_OK) + ret = thunk_ContextAttributesWToA(package, ulAttribute, + pBuffer); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +static PSecPkgInfoW _copyPackageInfoFlatAToW(const SecPkgInfoA *infoA) +{ + PSecPkgInfoW ret; + + if (infoA) + { + size_t bytesNeeded = sizeof(SecPkgInfoW); + int nameLen = 0, commentLen = 0; + + if (infoA->Name) + { + nameLen = MultiByteToWideChar(CP_ACP, 0, infoA->Name, -1, + NULL, 0); + bytesNeeded += nameLen * sizeof(WCHAR); + } + if (infoA->Comment) + { + commentLen = MultiByteToWideChar(CP_ACP, 0, infoA->Comment, -1, + NULL, 0); + bytesNeeded += commentLen * sizeof(WCHAR); + } + ret = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (ret) + { + PWSTR nextString = (PWSTR)((PBYTE)ret + sizeof(SecPkgInfoW)); + + memcpy(ret, infoA, sizeof(SecPkgInfoA)); + if (infoA->Name) + { + ret->Name = nextString; + MultiByteToWideChar(CP_ACP, 0, infoA->Name, -1, nextString, + nameLen); + nextString += nameLen; + } + else + ret->Name = NULL; + if (infoA->Comment) + { + ret->Comment = nextString; + MultiByteToWideChar(CP_ACP, 0, infoA->Comment, -1, nextString, + commentLen); + } + else + ret->Comment = NULL; + } + } + else + ret = NULL; + return ret; +} + +static SECURITY_STATUS thunk_ContextAttributesAToW(SecurePackage *package, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret = SEC_E_OK; + + if (package && pBuffer) + { + switch (ulAttribute) + { + case SECPKG_ATTR_NAMES: + { + PSecPkgContext_NamesA names = (PSecPkgContext_NamesA)pBuffer; + SEC_CHAR *oldUser = names->sUserName; + + if (oldUser) + { + names->sUserName = + (PSTR)SECUR32_AllocWideFromMultiByte(oldUser); + package->provider->fnTableW.FreeContextBuffer(oldUser); + } + break; + } + case SECPKG_ATTR_AUTHORITY: + { + PSecPkgContext_AuthorityA names = + (PSecPkgContext_AuthorityA)pBuffer; + SEC_CHAR *oldAuth = names->sAuthorityName; + + if (oldAuth) + { + names->sAuthorityName = + (PSTR)SECUR32_AllocWideFromMultiByte(oldAuth); + package->provider->fnTableW.FreeContextBuffer(oldAuth); + } + break; + } + case SECPKG_ATTR_KEY_INFO: + { + PSecPkgContext_KeyInfoA info = (PSecPkgContext_KeyInfoA)pBuffer; + SEC_CHAR *oldSigAlgName = info->sSignatureAlgorithmName; + SEC_CHAR *oldEncAlgName = info->sEncryptAlgorithmName; + + if (oldSigAlgName) + { + info->sSignatureAlgorithmName = + (PSTR)SECUR32_AllocWideFromMultiByte(oldSigAlgName); + package->provider->fnTableW.FreeContextBuffer( + oldSigAlgName); + } + if (oldEncAlgName) + { + info->sEncryptAlgorithmName = + (PSTR)SECUR32_AllocWideFromMultiByte( + oldEncAlgName); + package->provider->fnTableW.FreeContextBuffer( + oldEncAlgName); + } + break; + } + case SECPKG_ATTR_PACKAGE_INFO: + { + PSecPkgContext_PackageInfoA info = + (PSecPkgContext_PackageInfoA)pBuffer; + PSecPkgInfoA oldPkgInfo = info->PackageInfo; + + if (oldPkgInfo) + { + info->PackageInfo = (PSecPkgInfoA) + _copyPackageInfoFlatAToW(oldPkgInfo); + package->provider->fnTableW.FreeContextBuffer(oldPkgInfo); + } + break; + } + case SECPKG_ATTR_NEGOTIATION_INFO: + { + PSecPkgContext_NegotiationInfoA info = + (PSecPkgContext_NegotiationInfoA)pBuffer; + PSecPkgInfoA oldPkgInfo = info->PackageInfo; + + if (oldPkgInfo) + { + info->PackageInfo = (PSecPkgInfoA) + _copyPackageInfoFlatAToW(oldPkgInfo); + package->provider->fnTableW.FreeContextBuffer(oldPkgInfo); + } + break; + } + case SECPKG_ATTR_NATIVE_NAMES: + { + PSecPkgContext_NativeNamesA names = + (PSecPkgContext_NativeNamesA)pBuffer; + PSTR oldClient = names->sClientName; + PSTR oldServer = names->sServerName; + + if (oldClient) + { + names->sClientName = (PSTR)SECUR32_AllocWideFromMultiByte( + oldClient); + package->provider->fnTableW.FreeContextBuffer(oldClient); + } + if (oldServer) + { + names->sServerName = (PSTR)SECUR32_AllocWideFromMultiByte( + oldServer); + package->provider->fnTableW.FreeContextBuffer(oldServer); + } + break; + } + case SECPKG_ATTR_CREDENTIAL_NAME: + { + PSecPkgContext_CredentialNameA name = + (PSecPkgContext_CredentialNameA)pBuffer; + PSTR oldCred = name->sCredentialName; + + if (oldCred) + { + name->sCredentialName = + (PSTR)SECUR32_AllocWideFromMultiByte(oldCred); + package->provider->fnTableW.FreeContextBuffer(oldCred); + } + break; + } + /* no thunking needed: */ + case SECPKG_ATTR_ACCESS_TOKEN: + case SECPKG_ATTR_DCE_INFO: + case SECPKG_ATTR_FLAGS: + case SECPKG_ATTR_LIFESPAN: + case SECPKG_ATTR_PASSWORD_EXPIRY: + case SECPKG_ATTR_SESSION_KEY: + case SECPKG_ATTR_SIZES: + case SECPKG_ATTR_STREAM_SIZES: + case SECPKG_ATTR_TARGET_INFORMATION: + break; + default: + WARN("attribute type %d unknown\n", ulAttribute); + ret = SEC_E_INTERNAL_ERROR; + } + } + else + ret = SEC_E_INVALID_TOKEN; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.QueryContextAttributesA) + { + ret = package->provider->fnTableA.QueryContextAttributesA( + ctxt, ulAttribute, pBuffer); + if (ret == SEC_E_OK) + ret = thunk_ContextAttributesAToW(package, ulAttribute, + pBuffer); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider && pBuffer && cbBuffer) + { + if (package->provider->fnTableW.SetContextAttributesW) + { + /* TODO: gotta validate size too! */ + ret = thunk_ContextAttributesWToA(package, ulAttribute, + pBuffer); + if (ret == SEC_E_OK) + ret = package->provider->fnTableW.SetContextAttributesW( + ctxt, ulAttribute, pBuffer, cbBuffer); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider && pBuffer && cbBuffer) + { + if (package->provider->fnTableA.SetContextAttributesA) + { + /* TODO: gotta validate size too! */ + ret = thunk_ContextAttributesAToW(package, ulAttribute, + pBuffer); + if (ret == SEC_E_OK) + ret = package->provider->fnTableA.SetContextAttributesA( + ctxt, ulAttribute, pBuffer, cbBuffer); + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA( + SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, + PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + UNICODE_STRING package; + + TRACE("%s %p %p %p\n", debugstr_a(pszPackage), pPackedContext, Token, + phContext); + RtlCreateUnicodeStringFromAsciiz(&package, pszPackage); + ret = ImportSecurityContextW(package.Buffer, pPackedContext, Token, + phContext); + RtlFreeUnicodeString(&package); + return ret; +} + +SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW( + SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, + PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + PSTR package = SECUR32_AllocMultiByteFromWide(pszPackage); + + TRACE("%s %p %p %p\n", debugstr_w(pszPackage), pPackedContext, Token, + phContext); + ret = ImportSecurityContextA(package, pPackedContext, Token, phContext); + HeapFree(GetProcessHeap(), 0, package); + return ret; +} + diff --git a/dll/win32/secur32/thunks.h b/dll/win32/secur32/thunks.h new file mode 100644 index 00000000000..7c3171e0623 --- /dev/null +++ b/dll/win32/secur32/thunks.h @@ -0,0 +1,74 @@ +/* Copyright (C) 2004 Juan Lang + * + * This file defines thunks between wide char and multibyte functions for + * SSPs that only provide one or the other. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SECUR32_THUNKS_H__ +#define __SECUR32_THUNKS_H__ + +/* Prototypes for functions that thunk between wide char and multibyte versions, + * for SSPs that only provide one or the other. + */ +SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA( + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW( + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_CHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_WCHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA( + SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, + PCtxtHandle phContext) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW( + SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, + PCtxtHandle phContext) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA(PCredHandle hCredentials, + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials, + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA( + PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW( + PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN; +SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN; + +#endif /* ndef __SECUR32_THUNKS_H__ */ diff --git a/dll/win32/secur32/wrapper.c b/dll/win32/secur32/wrapper.c new file mode 100644 index 00000000000..882144c5db7 --- /dev/null +++ b/dll/win32/secur32/wrapper.c @@ -0,0 +1,1121 @@ +/* Copyright (C) 2004 Juan Lang + * + * Implements secur32 functions that forward to (wrap) an SSP's implementation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "precomp.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(secur32); + +/* Tries to allocate a new SecHandle, into which it stores package (in + * phSec->dwUpper) and a copy of realHandle (allocated with SECUR32_ALLOC, + * and stored in phSec->dwLower). SecHandle is equivalent to both a + * CredHandle and a CtxtHandle. + */ +static SECURITY_STATUS SECUR32_makeSecHandle(PSecHandle phSec, + SecurePackage *package, PSecHandle realHandle) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %p\n", phSec, package, realHandle); + + if (phSec && package && realHandle) + { + PSecHandle newSec = HeapAlloc(GetProcessHeap(), 0, sizeof(SecHandle)); + + if (newSec) + { + *newSec = *realHandle; + phSec->dwUpper = (ULONG_PTR)package; + phSec->dwLower = (ULONG_PTR)newSec; + ret = SEC_E_OK; + } + else + ret = SEC_E_INSUFFICIENT_MEMORY; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * AcquireCredentialsHandleA (SECUR32.@) + */ +SECURITY_STATUS WINAPI AcquireCredentialsHandleA( + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_a(pszPrincipal), + debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, + pvGetKeyArgument, phCredential, ptsExpiry); + if (pszPackage) + { + SecurePackage *package = SECUR32_findPackageA(pszPackage); + + if (package && package->provider) + { + if (package->provider->fnTableA.AcquireCredentialsHandleA) + { + CredHandle myCred; + + ret = package->provider->fnTableA.AcquireCredentialsHandleA( + pszPrincipal, pszPackage, fCredentialsUse, pvLogonID, + pAuthData, pGetKeyFn, pvGetKeyArgument, &myCred, + ptsExpiry); + if (ret == SEC_E_OK) + { + ret = SECUR32_makeSecHandle(phCredential, package, &myCred); + if (ret != SEC_E_OK) + package->provider->fnTableW.FreeCredentialsHandle( + &myCred); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/*********************************************************************** + * AcquireCredentialsHandleW (SECUR32.@) + */ +SECURITY_STATUS WINAPI AcquireCredentialsHandleW( + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, + PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, + PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_w(pszPrincipal), + debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, + pvGetKeyArgument, phCredential, ptsExpiry); + if (pszPackage) + { + SecurePackage *package = SECUR32_findPackageW(pszPackage); + + if (package && package->provider) + { + if (package->provider->fnTableW.AcquireCredentialsHandleW) + { + CredHandle myCred; + + ret = package->provider->fnTableW.AcquireCredentialsHandleW( + pszPrincipal, pszPackage, fCredentialsUse, pvLogonID, + pAuthData, pGetKeyFn, pvGetKeyArgument, &myCred, + ptsExpiry); + if (ret == SEC_E_OK) + { + ret = SECUR32_makeSecHandle(phCredential, package, &myCred); + if (ret != SEC_E_OK) + package->provider->fnTableW.FreeCredentialsHandle( + &myCred); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/*********************************************************************** + * FreeCredentialsHandle (SECUR32.@) + */ +SECURITY_STATUS WINAPI FreeCredentialsHandle( + PCredHandle phCredential) +{ + SECURITY_STATUS ret; + + TRACE("%p\n", phCredential); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider && + package->provider->fnTableW.FreeCredentialsHandle) + ret = package->provider->fnTableW.FreeCredentialsHandle(cred); + else + ret = SEC_E_INVALID_HANDLE; + HeapFree(GetProcessHeap(), 0, cred); + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QueryCredentialsAttributesA (SECUR32.@) + */ +SECURITY_STATUS WINAPI QueryCredentialsAttributesA( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.QueryCredentialsAttributesA) + ret = package->provider->fnTableA.QueryCredentialsAttributesA( + cred, ulAttribute, pBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QueryCredentialsAttributesW (SECUR32.@) + */ +SECURITY_STATUS WINAPI QueryCredentialsAttributesW( + PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.QueryCredentialsAttributesW) + ret = package->provider->fnTableW.QueryCredentialsAttributesW( + cred, ulAttribute, pBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * InitializeSecurityContextA (SECUR32.@) + */ +SECURITY_STATUS WINAPI InitializeSecurityContextA( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_CHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + SecurePackage *package = NULL; + PCredHandle cred = NULL; + PCredHandle ctxt = NULL; + + TRACE("%p %p %s 0x%08x %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + + if (phContext) + { + package = (SecurePackage *)phContext->dwUpper; + ctxt = (PCtxtHandle)phContext->dwLower; + } + if (phCredential) + { + package = (SecurePackage *)phCredential->dwUpper; + cred = (PCredHandle)phCredential->dwLower; + } + + if (package && package->provider) + { + if (package->provider->fnTableA.InitializeSecurityContextA) + { + CtxtHandle myCtxt; + + if (phContext) + { + PCtxtHandle realCtxt = (PCtxtHandle)phContext->dwLower; + myCtxt.dwUpper = realCtxt->dwUpper; + myCtxt.dwLower = realCtxt->dwLower; + } + + ret = package->provider->fnTableA.InitializeSecurityContextA( + cred, ctxt, pszTargetName, fContextReq, + Reserved1, TargetDataRep, pInput, Reserved2, phNewContext ? &myCtxt : NULL, + pOutput, pfContextAttr, ptsExpiry); + if ((ret == SEC_E_OK || ret == SEC_I_CONTINUE_NEEDED) && + phNewContext && phNewContext != phContext) + { + SECURITY_STATUS ret2; + ret2 = SECUR32_makeSecHandle(phNewContext, package, &myCtxt); + if (ret2 != SEC_E_OK) + package->provider->fnTableA.DeleteSecurityContext(&myCtxt); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * InitializeSecurityContextW (SECUR32.@) + */ +SECURITY_STATUS WINAPI InitializeSecurityContextW( + PCredHandle phCredential, PCtxtHandle phContext, + SEC_WCHAR *pszTargetName, ULONG fContextReq, + ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, + ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + SecurePackage *package = NULL; + PCredHandle cred = NULL; + PCredHandle ctxt = NULL; + + TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext, + debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, + Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + + if (phContext) + { + package = (SecurePackage *)phContext->dwUpper; + ctxt = (PCtxtHandle)phContext->dwLower; + } + if (phCredential) + { + package = (SecurePackage *)phCredential->dwUpper; + cred = (PCredHandle)phCredential->dwLower; + } + + if (package && package->provider) + { + if (package->provider->fnTableW.InitializeSecurityContextW) + { + CtxtHandle myCtxt; + + if (phContext) + { + PCtxtHandle realCtxt = (PCtxtHandle)phContext->dwLower; + myCtxt.dwUpper = realCtxt->dwUpper; + myCtxt.dwLower = realCtxt->dwLower; + } + + ret = package->provider->fnTableW.InitializeSecurityContextW( + cred, ctxt, pszTargetName, fContextReq, + Reserved1, TargetDataRep, pInput, Reserved2, phNewContext ? &myCtxt : NULL, + pOutput, pfContextAttr, ptsExpiry); + if ((ret == SEC_E_OK || ret == SEC_I_CONTINUE_NEEDED) && + phNewContext && phNewContext != phContext) + { + SECURITY_STATUS ret2; + ret2 = SECUR32_makeSecHandle(phNewContext, package, &myCtxt); + if (ret2 != SEC_E_OK) + package->provider->fnTableW.DeleteSecurityContext(&myCtxt); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * AcceptSecurityContext (SECUR32.@) + */ +SECURITY_STATUS WINAPI AcceptSecurityContext( + PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, + ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, + PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %p %d %d %p %p %p %p\n", phCredential, phContext, pInput, + fContextReq, TargetDataRep, phNewContext, pOutput, pfContextAttr, + ptsExpiry); + if (phCredential) + { + SecurePackage *package = (SecurePackage *)phCredential->dwUpper; + PCredHandle cred = (PCredHandle)phCredential->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.AcceptSecurityContext) + { + CtxtHandle myCtxt; + + if(phContext) + { + PCtxtHandle realCtxt = (PCtxtHandle)phContext->dwLower; + TRACE("realCtx: %p\n", realCtxt); + myCtxt.dwUpper = realCtxt->dwUpper; + myCtxt.dwLower = realCtxt->dwLower; + } + + ret = package->provider->fnTableW.AcceptSecurityContext( + cred, phContext ? &myCtxt : NULL, pInput, fContextReq, + TargetDataRep, &myCtxt, pOutput, pfContextAttr, ptsExpiry); + if (ret == SEC_E_OK || ret == SEC_I_CONTINUE_NEEDED) + { + SECURITY_STATUS ret2; + ret2 = SECUR32_makeSecHandle(phNewContext, package, &myCtxt); + if (ret2 != SEC_E_OK) + package->provider->fnTableW.DeleteSecurityContext( + &myCtxt); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * CompleteAuthToken (SECUR32.@) + */ +SECURITY_STATUS WINAPI CompleteAuthToken(PCtxtHandle phContext, + PSecBufferDesc pToken) +{ + SECURITY_STATUS ret; + + TRACE("%p %p\n", phContext, pToken); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.CompleteAuthToken) + ret = package->provider->fnTableW.CompleteAuthToken(ctxt, + pToken); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * DeleteSecurityContext (SECUR32.@) + */ +SECURITY_STATUS WINAPI DeleteSecurityContext(PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + + TRACE("%p\n", phContext); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider && + package->provider->fnTableW.DeleteSecurityContext) + ret = package->provider->fnTableW.DeleteSecurityContext(ctxt); + else + ret = SEC_E_INVALID_HANDLE; + HeapFree(GetProcessHeap(), 0, ctxt); + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * ApplyControlToken (SECUR32.@) + */ +SECURITY_STATUS WINAPI ApplyControlToken(PCtxtHandle phContext, + PSecBufferDesc pInput) +{ + SECURITY_STATUS ret; + + TRACE("%p %p\n", phContext, pInput); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.ApplyControlToken) + ret = package->provider->fnTableW.ApplyControlToken( + ctxt, pInput); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QueryContextAttributesA (SECUR32.@) + */ +SECURITY_STATUS WINAPI QueryContextAttributesA(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.QueryContextAttributesA) + ret = package->provider->fnTableA.QueryContextAttributesA( + ctxt, ulAttribute, pBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QueryContextAttributesW (SECUR32.@) + */ +SECURITY_STATUS WINAPI QueryContextAttributesW(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.QueryContextAttributesW) + ret = package->provider->fnTableW.QueryContextAttributesW( + ctxt, ulAttribute, pBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * ImpersonateSecurityContext (SECUR32.@) + */ +SECURITY_STATUS WINAPI ImpersonateSecurityContext(PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + + TRACE("%p\n", phContext); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.ImpersonateSecurityContext) + ret = package->provider->fnTableW.ImpersonateSecurityContext( + ctxt); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * RevertSecurityContext (SECUR32.@) + */ +SECURITY_STATUS WINAPI RevertSecurityContext(PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + + TRACE("%p\n", phContext); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.RevertSecurityContext) + ret = package->provider->fnTableW.RevertSecurityContext( + ctxt); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * MakeSignature (SECUR32.@) + */ +SECURITY_STATUS WINAPI MakeSignature(PCtxtHandle phContext, ULONG fQOP, + PSecBufferDesc pMessage, ULONG MessageSeqNo) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, fQOP, pMessage, MessageSeqNo); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.MakeSignature) + ret = package->provider->fnTableW.MakeSignature( + ctxt, fQOP, pMessage, MessageSeqNo); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * VerifySignature (SECUR32.@) + */ +SECURITY_STATUS WINAPI VerifySignature(PCtxtHandle phContext, + PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %d %p\n", phContext, pMessage, MessageSeqNo, pfQOP); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.VerifySignature) + ret = package->provider->fnTableW.VerifySignature( + ctxt, pMessage, MessageSeqNo, pfQOP); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QuerySecurityPackageInfoA (SECUR32.@) + */ +SECURITY_STATUS WINAPI QuerySecurityPackageInfoA(SEC_CHAR *pszPackageName, + PSecPkgInfoA *ppPackageInfo) +{ + SECURITY_STATUS ret; + + TRACE("%s %p\n", debugstr_a(pszPackageName), ppPackageInfo); + if (pszPackageName) + { + SecurePackage *package = SECUR32_findPackageA(pszPackageName); + + if (package) + { + size_t bytesNeeded = sizeof(SecPkgInfoA); + int nameLen = 0, commentLen = 0; + + if (package->infoW.Name) + { + nameLen = WideCharToMultiByte(CP_ACP, 0, + package->infoW.Name, -1, NULL, 0, NULL, NULL); + bytesNeeded += nameLen; + } + if (package->infoW.Comment) + { + commentLen = WideCharToMultiByte(CP_ACP, 0, + package->infoW.Comment, -1, NULL, 0, NULL, NULL); + bytesNeeded += commentLen; + } + *ppPackageInfo = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (*ppPackageInfo) + { + PSTR nextString = (PSTR)((PBYTE)*ppPackageInfo + + sizeof(SecPkgInfoA)); + + memcpy(*ppPackageInfo, &package->infoW, sizeof(package->infoW)); + if (package->infoW.Name) + { + (*ppPackageInfo)->Name = nextString; + nextString += WideCharToMultiByte(CP_ACP, 0, + package->infoW.Name, -1, nextString, nameLen, NULL, NULL); + } + else + (*ppPackageInfo)->Name = NULL; + if (package->infoW.Comment) + { + (*ppPackageInfo)->Comment = nextString; + nextString += WideCharToMultiByte(CP_ACP, 0, + package->infoW.Comment, -1, nextString, commentLen, NULL, + NULL); + } + else + (*ppPackageInfo)->Comment = NULL; + ret = SEC_E_OK; + } + else + ret = SEC_E_INSUFFICIENT_MEMORY; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/*********************************************************************** + * QuerySecurityPackageInfoW (SECUR32.@) + */ +SECURITY_STATUS WINAPI QuerySecurityPackageInfoW(SEC_WCHAR *pszPackageName, + PSecPkgInfoW *ppPackageInfo) +{ + SECURITY_STATUS ret; + SecurePackage *package = SECUR32_findPackageW(pszPackageName); + + TRACE("%s %p\n", debugstr_w(pszPackageName), ppPackageInfo); + if (package) + { + size_t bytesNeeded = sizeof(SecPkgInfoW); + int nameLen = 0, commentLen = 0; + + if (package->infoW.Name) + { + nameLen = lstrlenW(package->infoW.Name) + 1; + bytesNeeded += nameLen * sizeof(WCHAR); + } + if (package->infoW.Comment) + { + commentLen = lstrlenW(package->infoW.Comment) + 1; + bytesNeeded += commentLen * sizeof(WCHAR); + } + *ppPackageInfo = HeapAlloc(GetProcessHeap(), 0, bytesNeeded); + if (*ppPackageInfo) + { + PWSTR nextString = (PWSTR)((PBYTE)*ppPackageInfo + + sizeof(SecPkgInfoW)); + + **ppPackageInfo = package->infoW; + if (package->infoW.Name) + { + (*ppPackageInfo)->Name = nextString; + lstrcpynW(nextString, package->infoW.Name, nameLen); + nextString += nameLen; + } + else + (*ppPackageInfo)->Name = NULL; + if (package->infoW.Comment) + { + (*ppPackageInfo)->Comment = nextString; + lstrcpynW(nextString, package->infoW.Comment, commentLen); + } + else + (*ppPackageInfo)->Comment = NULL; + ret = SEC_E_OK; + } + else + ret = SEC_E_INSUFFICIENT_MEMORY; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/*********************************************************************** + * ExportSecurityContext (SECUR32.@) + */ +SECURITY_STATUS WINAPI ExportSecurityContext(PCtxtHandle phContext, + ULONG fFlags, PSecBuffer pPackedContext, void **pToken) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %p\n", phContext, fFlags, pPackedContext, pToken); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.ExportSecurityContext) + ret = package->provider->fnTableW.ExportSecurityContext( + ctxt, fFlags, pPackedContext, pToken); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * ImportSecurityContextA (SECUR32.@) + */ +SECURITY_STATUS WINAPI ImportSecurityContextA(SEC_CHAR *pszPackage, + PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + SecurePackage *package = SECUR32_findPackageA(pszPackage); + + TRACE("%s %p %p %p\n", debugstr_a(pszPackage), pPackedContext, Token, + phContext); + if (package && package->provider) + { + if (package->provider->fnTableA.ImportSecurityContextA) + { + CtxtHandle myCtxt; + + ret = package->provider->fnTableA.ImportSecurityContextA( + pszPackage, pPackedContext, Token, &myCtxt); + if (ret == SEC_E_OK) + { + ret = SECUR32_makeSecHandle(phContext, package, &myCtxt); + if (ret != SEC_E_OK) + package->provider->fnTableW.DeleteSecurityContext(&myCtxt); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; + +} + +/*********************************************************************** + * ImportSecurityContextW (SECUR32.@) + */ +SECURITY_STATUS WINAPI ImportSecurityContextW(SEC_WCHAR *pszPackage, + PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext) +{ + SECURITY_STATUS ret; + SecurePackage *package = SECUR32_findPackageW(pszPackage); + + TRACE("%s %p %p %p\n", debugstr_w(pszPackage), pPackedContext, Token, + phContext); + if (package && package->provider) + { + if (package->provider->fnTableW.ImportSecurityContextW) + { + CtxtHandle myCtxt; + + ret = package->provider->fnTableW.ImportSecurityContextW( + pszPackage, pPackedContext, Token, &myCtxt); + if (ret == SEC_E_OK) + { + ret = SECUR32_makeSecHandle(phContext, package, &myCtxt); + if (ret != SEC_E_OK) + package->provider->fnTableW.DeleteSecurityContext(&myCtxt); + } + } + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_SECPKG_NOT_FOUND; + return ret; +} + +/*********************************************************************** + * AddCredentialsA (SECUR32.@) + */ +SECURITY_STATUS WINAPI AddCredentialsA(PCredHandle hCredentials, + SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal), + debugstr_a(pszPackage), fCredentialUse, pAuthData, pGetKeyFn, + pvGetKeyArgument, ptsExpiry); + if (hCredentials) + { + SecurePackage *package = (SecurePackage *)hCredentials->dwUpper; + PCredHandle cred = (PCtxtHandle)hCredentials->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.AddCredentialsA) + ret = package->provider->fnTableA.AddCredentialsA( + cred, pszPrincipal, pszPackage, fCredentialUse, pAuthData, + pGetKeyFn, pvGetKeyArgument, ptsExpiry); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * AddCredentialsW (SECUR32.@) + */ +SECURITY_STATUS WINAPI AddCredentialsW(PCredHandle hCredentials, + SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, + void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, + PTimeStamp ptsExpiry) +{ + SECURITY_STATUS ret; + + TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal), + debugstr_w(pszPackage), fCredentialUse, pAuthData, pGetKeyFn, + pvGetKeyArgument, ptsExpiry); + if (hCredentials) + { + SecurePackage *package = (SecurePackage *)hCredentials->dwUpper; + PCredHandle cred = (PCtxtHandle)hCredentials->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.AddCredentialsW) + ret = package->provider->fnTableW.AddCredentialsW( + cred, pszPrincipal, pszPackage, fCredentialUse, pAuthData, + pGetKeyFn, pvGetKeyArgument, ptsExpiry); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * QuerySecurityContextToken (SECUR32.@) + */ +SECURITY_STATUS WINAPI QuerySecurityContextToken(PCtxtHandle phContext, + HANDLE *phToken) +{ + SECURITY_STATUS ret; + + TRACE("%p %p\n", phContext, phToken); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.QuerySecurityContextToken) + ret = package->provider->fnTableW.QuerySecurityContextToken( + ctxt, phToken); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * EncryptMessage (SECUR32.@) + */ +SECURITY_STATUS WINAPI EncryptMessage(PCtxtHandle phContext, ULONG fQOP, + PSecBufferDesc pMessage, ULONG MessageSeqNo) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, fQOP, pMessage, MessageSeqNo); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.EncryptMessage) + ret = package->provider->fnTableW.EncryptMessage( + ctxt, fQOP, pMessage, MessageSeqNo); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * DecryptMessage (SECUR32.@) + */ +SECURITY_STATUS WINAPI DecryptMessage(PCtxtHandle phContext, + PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP) +{ + SECURITY_STATUS ret; + + TRACE("%p %p %d %p\n", phContext, pMessage, MessageSeqNo, pfQOP); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.DecryptMessage) + ret = package->provider->fnTableW.DecryptMessage( + ctxt, pMessage, MessageSeqNo, pfQOP); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * SetContextAttributesA (SECUR32.@) + */ +SECURITY_STATUS WINAPI SetContextAttributesA(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableA.SetContextAttributesA) + ret = package->provider->fnTableA.SetContextAttributesA( + ctxt, ulAttribute, pBuffer, cbBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} + +/*********************************************************************** + * SetContextAttributesW (SECUR32.@) + */ +SECURITY_STATUS WINAPI SetContextAttributesW(PCtxtHandle phContext, + ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) +{ + SECURITY_STATUS ret; + + TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer); + if (phContext) + { + SecurePackage *package = (SecurePackage *)phContext->dwUpper; + PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower; + + if (package && package->provider) + { + if (package->provider->fnTableW.SetContextAttributesW) + ret = package->provider->fnTableW.SetContextAttributesW( + ctxt, ulAttribute, pBuffer, cbBuffer); + else + ret = SEC_E_UNSUPPORTED_FUNCTION; + } + else + ret = SEC_E_INVALID_HANDLE; + } + else + ret = SEC_E_INVALID_HANDLE; + return ret; +} diff --git a/dll/win32/shell32/folders/fonts.cpp b/dll/win32/shell32/folders/fonts.cpp index 9ed181bfd55..236b84a0ba5 100644 --- a/dll/win32/shell32/folders/fonts.cpp +++ b/dll/win32/shell32/folders/fonts.cpp @@ -78,30 +78,28 @@ HRESULT WINAPI CDesktopFolderEnumZ::Initialize(DWORD dwFlags) static LPITEMIDLIST _ILCreateFontItem(LPWSTR pszFont, LPWSTR pszFile) { - PIDLDATA tmp; LPITEMIDLIST pidl; - PIDLFontStruct * p; - int size0 = (char*)&tmp.u.cfont.szName - (char*)&tmp.u.cfont; - int size = size0; + LPPIDLDATA data; + int length = wcslen(pszFont) + 1; + int size = sizeof(PIDLDATA) + sizeof(ITEMIDLIST); - tmp.type = 0x00; - tmp.u.cfont.dummy = 0xFF; - tmp.u.cfont.offsFile = wcslen(pszFont) + 1; + size += length * sizeof(WCHAR); + size += (wcslen(pszFile) + 1) * sizeof(WCHAR); - size += (tmp.u.cfont.offsFile + wcslen(pszFile) + 1) * sizeof(WCHAR); - - pidl = (LPITEMIDLIST)SHAlloc(size + 4); + pidl = (LPITEMIDLIST)SHAlloc(size + 5); if (!pidl) return pidl; - pidl->mkid.cb = size + 2; - memcpy(pidl->mkid.abID, &tmp, 2 + size0); + ZeroMemory(pidl, size + 5); + pidl->mkid.cb = size + 3; - p = &((PIDLDATA*)pidl->mkid.abID)->u.cfont; - wcscpy(p->szName, pszFont); - wcscpy(p->szName + tmp.u.cfont.offsFile, pszFile); + data = _ILGetDataPointer(pidl); + data->type = 0x00; + data->u.cfont.dummy = 0xFF; + data->u.cfont.offsFile = length; + wcscpy(data->u.cfont.szName, pszFont); + wcscpy(&data->u.cfont.szName[length], pszFile); - *(WORD*)((char*)pidl + (size + 2)) = 0; return pidl; } @@ -609,7 +607,7 @@ HRESULT WINAPI CFontsFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SH { if (StrFormatByteSizeW(FileSize.QuadPart, buffer, sizeof(buffer) / sizeof(WCHAR))) { - psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc(wcslen(buffer) + 1); + psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc((wcslen(buffer) + 1) * sizeof(WCHAR)); if (!psd->str.pOleStr) { CloseHandle(hFile); diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index 9a3e14286ea..e44f66723b7 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -136,7 +136,7 @@ END IDD_RUN DIALOGEX 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Run" +CAPTION "Выполнить" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE @@ -169,7 +169,7 @@ BEGIN CONTROL "", 14015, "msctls_hotkey32", WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP, 79, 115, 150, 14 LTEXT "Ок&но:", 14016, 8, 136, 68, 10 COMBOBOX 14017, 79, 134, 150, 14, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP - LTEXT "&Коментарий:", 14018, 8, 154, 68, 10 + LTEXT "&Комментарий:", 14018, 8, 154, 68, 10 EDITTEXT 14019, 79, 152, 150, 14, ES_AUTOHSCROLL PUSHBUTTON "&Найти объект...", 14020, 9, 172, 70, 14, ES_LEFT PUSHBUTTON "См&енить значок...", 14021, 84, 172, 70, 14, ES_LEFT @@ -203,7 +203,7 @@ BEGIN EDITTEXT 14009, 68, 56, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | ES_AUTOHSCROLL | NOT WS_TABSTOP LTEXT "Размер:", 14010, 8, 72, 55, 10 EDITTEXT 14011, 68, 72, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "Size on disk:", 140101, 8, 88, 55, 10 + LTEXT "На диске:", 140101, 8, 88, 55, 10 EDITTEXT 14012, 68, 88, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL LTEXT "Содержит:", 14026, 8, 104, 55, 10 EDITTEXT 14027, 68, 104, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL @@ -213,9 +213,9 @@ BEGIN LTEXT "", -1, 8, 144, 221, 1, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE LTEXT "Атрибуты:", 14020, 8, 152, 46, 10 AUTOCHECKBOX "&Только чтение", 14021, 56, 152, 70, 10 - AUTOCHECKBOX "&Скрыто", 14022, 56, 166, 70, 10 + AUTOCHECKBOX "&Скрытый", 14022, 56, 166, 70, 10 AUTOCHECKBOX "&Архивный", 14023, 56, 180, 70, 10 - PUSHBUTTON "A&dvanced...", 14028, 158, 150, 70, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Д&ополнительно...", 14028, 158, 150, 70, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_FILE_PROPERTIES DIALOGEX 0, 0, 240, 205 @@ -230,14 +230,14 @@ BEGIN CONTROL "файл", 14005, "edit", ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP, 68, 35, 160, 10 LTEXT "Приложение:", 14006, 8, 53, 50, 10 ICON "", 14025, 68, 52, 11, 10, NOT WS_VISIBLE - PUSHBUTTON "&Change...", 14024, 168, 50, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Изменить...", 14024, 168, 50, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP EDITTEXT 14007, 68, 53, 90, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | ES_AUTOHSCROLL | NOT WS_TABSTOP LTEXT "", -1, 8, 68, 221, 1, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE LTEXT "Размещение:", 14008, 8, 75, 45, 10 EDITTEXT 14009, 68, 75, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | ES_AUTOHSCROLL | NOT WS_TABSTOP LTEXT "Размер:", 14010, 8, 91, 45, 10 EDITTEXT 14011, 68, 91, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Size on disk:", 140112, 8, 107, 55, 10 + LTEXT "На диске:", 140112, 8, 107, 55, 10 EDITTEXT 14012, 68, 107, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "", -1, 8, 123, 221, 1, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE LTEXT "Создан:", 14014, 8, 131, 45, 10 @@ -251,7 +251,7 @@ BEGIN AUTOCHECKBOX "Только &чтение", 14021, 58, 189, 67, 10 AUTOCHECKBOX "Скр&ытый", 14022, 126, 189, 50, 10 AUTOCHECKBOX "&Архивный", 14023, 181, 189, 49, 10 - PUSHBUTTON "A&dvanced...", 14028, 180, 185, 50, 15, WS_TABSTOP + PUSHBUTTON "Д&ополнительно...", 14028, 180, 185, 50, 15, WS_TABSTOP END IDD_FILE_VERSION DIALOGEX 0, 0, 235, 215 @@ -357,7 +357,7 @@ BEGIN GROUPBOX "Установки для выбранного расположения", -1, 10, 66, 220, 73 RADIOBUTTON "&Другой размер:", 14001, 17, 80, 80, 10, NOT WS_TABSTOP EDITTEXT 14002, 100, 78, 65, 14, WS_TABSTOP | ES_NUMBER - LTEXT "&Максимальный размер(Мб):", -1, 17, 95, 102, 10 + LTEXT "&Максимальный размер (МБ):", -1, 17, 95, 102, 10 RADIOBUTTON "&Уничтожать файлы сразу после удаления, не помещая их в корзину.", 14003, 17, 108, 206, 20, BS_MULTILINE | WS_TABSTOP AUTOCHECKBOX "&Запрашивать подтверждение на удаление", 14004, 20, 145, 176, 10, WS_TABSTOP END @@ -380,12 +380,12 @@ END IDD_FILE_COPY DIALOGEX 0, 0, 264, 45 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Copying..." +CAPTION "Копирование..." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - PUSHBUTTON "Cancel", 14002, 195, 14, 60, 16 + PUSHBUTTON "Отмена", 14002, 195, 14, 60, 16 CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 - LTEXT "File", 14001, 8, 6, 169, 10 + LTEXT "Файл", 14001, 8, 6, 169, 10 END IDD_FOLDER_OPTIONS_GENERAL DIALOGEX 0, 0, 264, 238 @@ -477,7 +477,7 @@ END IDD_DISCONNECT DIALOGEX 0, 0, 190, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Отключение ReactOS" +CAPTION "Отключить ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL @@ -587,7 +587,7 @@ BEGIN GROUPBOX "Параметры проверки диска", -1, 7, 5, 218, 50 PUSHBUTTON "Отмена", IDCANCEL, 165, 91, 60, 14 AUTOCHECKBOX "&Автоматически исправлять системные ошибки", 14000, 16, 19, 178, 10 - AUTOCHECKBOX "&Проверять и востанавливать поврежденные сектора", 14001, 16, 35, 200, 10 + AUTOCHECKBOX "&Проверять и восстанавливать поврежденные сектора", 14001, 16, 35, 200, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 218, 8 LTEXT "", 14003, 7, 75, 218, 10 END @@ -612,9 +612,9 @@ BEGIN IDS_SHV_COLUMN1 "Имя" IDS_SHV_COLUMN2 "Размер" IDS_SHV_COLUMN3 "Тип" - IDS_SHV_COLUMN4 "Изменён" + IDS_SHV_COLUMN4 "Изменен" IDS_SHV_COLUMN5 "Атрибуты" - IDS_SHV_COLUMN6 "Полный объём" + IDS_SHV_COLUMN6 "Полный объем" IDS_SHV_COLUMN7 "Свободно" IDS_SHV_COLUMN8 "Имя" IDS_SHV_COLUMN9 "Комментарий" @@ -629,7 +629,7 @@ BEGIN IDS_SHV_NETWORKLOCATION "Сетевое расположение" IDS_SHV_COLUMN_DOCUMENTS "Документы" IDS_SHV_COLUMN_STATUS "Состояние" - IDS_SHV_COLUMN_COMMENTS "Коментарии" + IDS_SHV_COLUMN_COMMENTS "Комментарии" IDS_SHV_COLUMN_LOCATION "Расположение" IDS_SHV_COLUMN_MODEL "Модель" @@ -652,37 +652,37 @@ BEGIN IDS_DELETE "Удалить" IDS_PROPERTIES "Свойства" IDS_CUT "Вырезать" - IDS_RESTORE "Востановить" + IDS_RESTORE "Восстановить" IDS_FORMATDRIVE "Форматировать..." IDS_RENAME "Переименовать" IDS_INSERT "Вставить" - IDS_CREATEFOLDER_DENIED "Невозможно создать папку - нет полномочий." + IDS_CREATEFOLDER_DENIED "Недостаточно прав для создания папки" IDS_CREATEFOLDER_CAPTION "Ошибка во время создания папки" IDS_DELETEITEM_CAPTION "Подтверждение удаления файла" IDS_DELETEFOLDER_CAPTION "Подтверждение удаления папки" IDS_DELETEITEM_TEXT "Удалить '%1'?" - IDS_DELETEMULTIPLE_TEXT "Удалить эти обьекты (%1?" + IDS_DELETEMULTIPLE_TEXT "Удалить эти объекты (%1?" IDS_DELETESELECTED_TEXT "Вы действительно хотите удалить выбранный элементы(ы)?" - IDS_TRASHITEM_TEXT "Вы действильно хотите поместить '%1' в Корзину?" + IDS_TRASHITEM_TEXT "Вы действительно хотите поместить '%1' в Корзину?" IDS_TRASHFOLDER_TEXT "Вы действительно хотите поместить '%1' и все содержащиеся файлы в Корзину?" IDS_TRASHMULTIPLE_TEXT "Вы действительно хотите переместить элементы %1 в Корзину?" IDS_CANTTRASH_TEXT "Файл '%1' не может быть помещен в Корзину. Удалить безвозвратно?" IDS_OVERWRITEFILE_TEXT "В этой папке уже имеется элемент '%1'.\n\nЗаменить его?" IDS_OVERWRITEFILE_CAPTION "Подтверждение замены файла" - IDS_OVERWRITEFOLDER_TEXT "Эта папка уже содержит папку с именем '%1'.\n\nЕсли в папке содержатся файлы с одинаковыми именами, то они так же будут\nземенены. Продолжить?" + IDS_OVERWRITEFOLDER_TEXT "Эта папка уже содержит папку с именем '%1'.\n\nЕсли в папке содержатся файлы с одинаковыми именами, то они так же будут\nзаменены. Продолжить?" /* message box strings */ - IDS_RESTART_TITLE "Перезагрузить" + IDS_RESTART_TITLE "Перезагрузка" IDS_RESTART_PROMPT "Вы действительно хотите перезагрузить ReactOS?" - IDS_SHUTDOWN_TITLE "Выключить питание" + IDS_SHUTDOWN_TITLE "Завершение работы" IDS_SHUTDOWN_PROMPT "Закончить работу с ReactOS?" - IDS_LOGOFF_TITLE "Log Off" - IDS_LOGOFF_PROMPT "Do you want to log off?" + IDS_LOGOFF_TITLE "Завершение сеанса" + IDS_LOGOFF_PROMPT "Вы действительно хотите выйти из системы?" /* Run File dialog */ - IDS_RUNDLG_ERROR "Невозможно отобразить Диалог Выполнить Файл (внутренняя ошибка)" - IDS_RUNDLG_BROWSE_ERROR "Невозможно отобразить Диалог Обзор (внутренняя ошибка)" + IDS_RUNDLG_ERROR "Невозможно отобразить диалоговое окно Выполнить (внутренняя ошибка)" + IDS_RUNDLG_BROWSE_ERROR "Невозможно отобразить диалоговое окно Обзор (внутренняя ошибка)" IDS_RUNDLG_BROWSE_CAPTION "Обзор" IDS_RUNDLG_BROWSE_FILTER "Исполняемые файлы (*.exe)\0*.exe\0Все файлы (*.*)\0*.*\0" @@ -695,7 +695,7 @@ BEGIN IDS_SENDTO "Отправить" IDS_STARTMENU "Главное меню" IDS_MYMUSIC "Моя музыка" - IDS_MYVIDEO "Мои фильмы" + IDS_MYVIDEO "Мои видеозаписи" IDS_DESKTOPDIRECTORY "Рабочий стол" IDS_NETHOOD "Сетевое окружение" IDS_TEMPLATES "Шаблоны" @@ -712,7 +712,7 @@ BEGIN IDS_ADMINTOOLS "Главное меню\\Программы\\Администрирование" IDS_COMMON_MUSIC "Общие документы\\Моя музыка" IDS_COMMON_PICTURES "Общие документы\\Мои рисунки" - IDS_COMMON_VIDEO "Общие документы\\Мои фильмы" + IDS_COMMON_VIDEO "Общие документы\\Мои видеозаписи" IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" IDS_NETWORKPLACE "Сетевое окружение" @@ -725,8 +725,8 @@ BEGIN /* Open With */ IDS_OPEN_WITH "Открыть с помощью" IDS_OPEN_WITH_CHOOSE "Выбрать программу..." - IDS_OPEN_WITH_RECOMMENDED "Recommended Programs:" - IDS_OPEN_WITH_OTHER "Other Programs:" + IDS_OPEN_WITH_RECOMMENDED "Рекомендуемые программы:" + IDS_OPEN_WITH_OTHER "Другие программы:" IDS_SHELL_ABOUT_AUTHORS "&Авторы" IDS_SHELL_ABOUT_BACK "< &Назад" @@ -745,7 +745,7 @@ BEGIN IDS_BAT_FILE "Пакетный файл ReactOS" IDS_CMD_FILE "Командный скрипт ReactOS" IDS_COM_FILE "Приложение Dos" - IDS_CPL_FILE "Аплет панели управления" + IDS_CPL_FILE "Апплет панели управления" IDS_CUR_FILE "Курсор" IDS_DLL_FILE "Расширение приложения" IDS_DRV_FILE "Драйвер устройства" @@ -778,7 +778,7 @@ BEGIN IDS_FILE_DETAILSADV "Файлы с расширением '%s' имеют тип '%s'. Для изменения параметров всех файлов '%s', нажмите 'Дополнительно'." IDS_FILE_TYPES "Типы файлов" IDS_COLUMN_EXTENSION "Расширения" - IDS_BYTES_FORMAT "bytes" - IDS_UNKNOWN_APP "Unknown application" - IDS_EXE_DESCRIPTION "Description:" + IDS_BYTES_FORMAT "байт" + IDS_UNKNOWN_APP "Неизвестное приложение" + IDS_EXE_DESCRIPTION "Описание:" END diff --git a/dll/win32/urlmon/urlmon.inf b/dll/win32/urlmon/urlmon.inf index 77bb8f21165..0a3fb59868b 100644 --- a/dll/win32/urlmon/urlmon.inf +++ b/dll/win32/urlmon/urlmon.inf @@ -459,3 +459,71 @@ ZICON_INTERNET="inetcpl.cpl#001313" NAME_UNTRUSTED="Restricted sites" DESC_UNTRUSTED="This zone contains Web sites that could potentially damage your computer or data." ZICON_UNTRUSTED="inetcpl.cpl#00004481" + +; LANG_POLISH SUBLANG_NEUTRAL +[Strings.0015] +PATH_ZONEMAP="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" +PATH_ZONEMAP_PROTOCOLS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults" +PATH_ZONEMAP_DOMAINS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains" +PATH_ZONEMAP_RANGES="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges" + +PATH_ZONES="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones" +ZONES_LOCAL="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0" +ZONES_INTRANET="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" +ZONES_TRUSTED="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" +ZONES_INTERNET="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" +ZONES_UNTRUSTED="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4" + +NAME_LOCAL="Mój komputer" +DESC_LOCAL="Twój komputer" +ZICON_LOCAL="explorer.exe#0100" + +NAME_INTRANET="Lokalny intranet" +DESC_INTRANET="Ta strefa zawiera wszystkie witryny sieci Web, które znajdują się w firmowym intranecie." +ZICON_INTRANET="shell32.dll#0018" + +NAME_TRUSTED="Zaufane witryny" +DESC_TRUSTED="Ta strefa zawiera wszystkie witryny sieci Web, którym ufasz, że nie zniszczą tego komputera." +ZICON_TRUSTED="inetcpl.cpl#00004480" + +NAME_INTERNET="Internet" +DESC_INTERNET="Ta strefa zawiera witryny sieci Web, których nie umieszczono w innych strefach." +ZICON_INTERNET="inetcpl.cpl#001313" + +NAME_UNTRUSTED="Witryny z ograniczeniami" +DESC_UNTRUSTED="Ta strefa zawiera witryny sieci Web, które mogą potencjalnie zniszczyć komputer lub dane." +ZICON_UNTRUSTED="inetcpl.cpl#00004481" + +; Czech +[Strings.0405] +PATH_ZONEMAP="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" +PATH_ZONEMAP_PROTOCOLS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults" +PATH_ZONEMAP_DOMAINS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains" +PATH_ZONEMAP_RANGES="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges" + +PATH_ZONES="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones" +ZONES_LOCAL="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0" +ZONES_INTRANET="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" +ZONES_TRUSTED="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" +ZONES_INTERNET="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" +ZONES_UNTRUSTED="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4" + +NAME_LOCAL="Tento počítač" +DESC_LOCAL="Váš počítač" +ZICON_LOCAL="explorer.exe#0100" + +NAME_INTRANET="Místní intranet" +DESC_INTRANET="Tato zóna obsahuje všechny webové stránky, které jsou v místním intranetu (například v rámci organizace)." +ZICON_INTRANET="shell32.dll#0018" + +NAME_TRUSTED="Důvěryhodné stránky" +DESC_TRUSTED="Tato zóna obsahuje webové stránky, jimž věříte." +ZICON_TRUSTED="inetcpl.cpl#00004480" + +NAME_INTERNET="Internet" +DESC_INTERNET="Tato zóna obsahuje všechny stránky, které nebyly umístěny do jiných zón." +ZICON_INTERNET="inetcpl.cpl#001313" + +NAME_UNTRUSTED="Omezené stránky" +DESC_UNTRUSTED="Tato zóna obsahuje webové stránky, které by mohly poškodit tento počítač či data." +ZICON_UNTRUSTED="inetcpl.cpl#00004481" diff --git a/dll/win32/urlmon/urlmon.spec b/dll/win32/urlmon/urlmon.spec index 27483ef41df..8ab6fdedfa4 100644 --- a/dll/win32/urlmon/urlmon.spec +++ b/dll/win32/urlmon/urlmon.spec @@ -1,96 +1,269 @@ #100 ZoneMappingToRegKey -#101 stub AsyncGetClassBits -102 stdcall AsyncInstallDistributionUnit(ptr ptr ptr long long ptr ptr ptr long) -103 stdcall BindAsyncMoniker(ptr long ptr ptr ptr) -#104 stub CDLGetLongPathNameA -#105 stub CDLGetLongPathNameW -106 stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr) -#107 stub CoInstall -108 stdcall CoInternetCombineUrl(wstr wstr long ptr long ptr long) -109 stdcall CoInternetCompareUrl(wstr wstr long) -110 stdcall CoInternetCreateSecurityManager(ptr ptr long) -111 stdcall CoInternetCreateZoneManager(ptr ptr long) -#112 CoInternetFeatureSettingsChanged -#113 stub CoInternetGetProtocolFlags -114 stdcall CoInternetGetSecurityUrl(ptr ptr long long) -115 stdcall CoInternetGetSession(long ptr long) -116 stdcall CoInternetIsFeatureEnabled(long long) -117 stdcall CoInternetIsFeatureEnabledForUrl(long long wstr ptr) -118 stdcall CoInternetIsFeatureZoneElevationEnabled(wstr wstr ptr long) -119 stdcall CoInternetParseUrl(wstr long long wstr long ptr long) -120 stdcall CoInternetQueryInfo(ptr long long ptr long ptr long) -121 stdcall CoInternetSetFeatureEnabled(long long long) -122 stdcall CompareSecurityIds(ptr long ptr long long) -#123 CompatFlagsFromClsid -124 stdcall CopyBindInfo(ptr ptr) -125 stdcall CopyStgMedium(ptr ptr) -126 stdcall CreateAsyncBindCtx(long ptr ptr ptr) -127 stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long) -128 stdcall CreateFormatEnumerator(long ptr ptr) -129 stdcall CreateURLMoniker(ptr wstr ptr) -130 stdcall CreateURLMonikerEx(ptr wstr ptr long) +#101 CoInternetIsExtensionsOff +#102 CoInternetSetExtensionsOff +#103 CoInternetExtensionAllowed +#104 CoInternetCreateExtension +#105 CoInternetExtensionCollectStats +#106 CoInternetExtensionNeedsApproval +#107 CoInternetApproveExtension +108 stdcall -noname IsInternetESCEnabledLocal() +#109 stub AsyncGetClassBits +110 stdcall AsyncInstallDistributionUnit(ptr ptr ptr long long ptr ptr ptr long) +111 stdcall -noname IsProtectedModeURL(ptr) +#112 IsProtectedModeIUri +#113 IsFileInSpecialDirs +#114 SkipBrokerCheckForURL +#115 IEIsProtectedModeURLInternal +#116 CoInternetDomainNeedsApproval +117 stdcall BindAsyncMoniker(ptr long ptr ptr ptr) +#118 stub CDLGetLongPathNameA +#119 stub CDLGetLongPathNameW +120 stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr) +#121 stub CoInstall +#122 CoInternetCanonicalizeIUri +123 stdcall CoInternetCombineIUri(ptr ptr long ptr long) +124 stdcall CoInternetCombineUrl(wstr wstr long ptr long ptr long) +125 stdcall CoInternetCombineUrlEx(ptr wstr long ptr long) +126 stdcall CoInternetCompareUrl(wstr wstr long) +127 stdcall CoInternetCreateSecurityManager(ptr ptr long) +128 stdcall CoInternetCreateZoneManager(ptr ptr long) +#129 CoInternetFeatureSettingsChanged +#130 stub CoInternetGetProtocolFlags +131 stdcall CoInternetGetSecurityUrl(ptr ptr long long) +132 stdcall CoInternetGetSecurityUrlEx(ptr ptr long long) +133 stdcall CoInternetGetSession(long ptr long) +134 stdcall CoInternetIsFeatureEnabled(long long) +#135 CoInternetIsFeatureEnabledForIUri +136 stdcall CoInternetIsFeatureEnabledForUrl(long long wstr ptr) +137 stdcall CoInternetIsFeatureZoneElevationEnabled(wstr wstr ptr long) +138 stdcall CoInternetParseIUri(ptr long long wstr long ptr long) +139 stdcall CoInternetParseUrl(wstr long long wstr long ptr long) +140 stdcall CoInternetQueryInfo(ptr long long ptr long ptr long) +141 stdcall CoInternetSetFeatureEnabled(long long long) +142 stdcall CompareSecurityIds(ptr long ptr long long) +#143 CompatFlagsFromClsid +144 stdcall CopyBindInfo(ptr ptr) +145 stdcall CopyStgMedium(ptr ptr) +146 stdcall CreateAsyncBindCtx(long ptr ptr ptr) +147 stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long) +148 stdcall CreateFormatEnumerator(long ptr ptr) +149 stdcall CreateIUriBuilder(ptr long long ptr) +150 stdcall CreateURLMoniker(ptr wstr ptr) +151 stdcall CreateURLMonikerEx2(ptr ptr ptr long) +152 stdcall CreateURLMonikerEx(ptr wstr ptr long) +153 stdcall CreateUri(wstr long long ptr) +#154 CreateUriFromMultiByteString +#155 CreateUriPriv +156 stdcall CreateUriWithFragment(wstr wstr long long ptr) @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllInstall(long wstr) @ stdcall -private DllRegisterServer() @ stdcall -private DllRegisterServerEx() @ stdcall -private DllUnregisterServer() -137 stdcall Extract(long ptr) -138 stdcall FaultInIEFeature(long ptr ptr long) -#139 stub FindMediaType -#140 stub FindMediaTypeClass -141 stdcall FindMimeFromData(long ptr ptr long ptr long ptr long) -#142 GetAddSitesFileUrl -143 stdcall GetClassFileOrMime(ptr wstr ptr long wstr long ptr) -#144 stub GetClassURL -#145 stub GetComponentIDFromCLSSPEC -#146 stub GetMarkOfTheWeb -147 stdcall GetSoftwareUpdateInfo(ptr ptr) -148 stdcall -stub HlinkGoBack(ptr) -#149 stub HlinkGoForward -#150 stub HlinkNavigateMoniker -151 stdcall HlinkNavigateString(ptr wstr) -152 stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long) -153 stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long) -#154 InstallFlash -155 stdcall IsAsyncMoniker(ptr) -#156 stub IsJITInProgress -157 stdcall IsLoggingEnabledA(str) -158 stdcall IsLoggingEnabledW(wstr) -159 stdcall IsValidURL(ptr wstr long) -160 stdcall MkParseDisplayNameEx(ptr wstr ptr ptr) -161 stdcall ObtainUserAgentString(long str ptr) -#162 stub PrivateCoInstall -163 stdcall RegisterBindStatusCallback(ptr ptr ptr long) -164 stdcall RegisterFormatEnumerator(ptr ptr long) -#165 stub RegisterMediaTypeClass -166 stdcall RegisterMediaTypes(long ptr ptr) -167 stdcall ReleaseBindInfo(ptr) -168 stdcall RevokeBindStatusCallback(ptr ptr) -169 stdcall RevokeFormatEnumerator(ptr ptr) -#170 stub SetSoftwareUpdateAdvertisementState -#171 ShowTrustAlertDialog -#172 stub URLDownloadA -173 stdcall URLDownloadToCacheFileA(ptr str str long long ptr) -174 stdcall URLDownloadToCacheFileW(ptr wstr wstr long long ptr) -175 stdcall URLDownloadToFileA(ptr str str long ptr) -176 stdcall URLDownloadToFileW(ptr wstr wstr long ptr) -#177 stub URLDownloadW -178 stdcall URLOpenBlockingStreamA(ptr str ptr long ptr) -179 stdcall URLOpenBlockingStreamW(ptr wstr ptr long ptr) -#180 stub URLOpenPullStreamA -#181 stub URLOpenPullStreamW -182 stdcall URLOpenStreamA(ptr str long ptr) -183 stdcall URLOpenStreamW(ptr wstr long ptr) -#184 stub UrlMkBuildVersion -185 stdcall UrlMkGetSessionOption(long ptr long ptr long) -186 stdcall UrlMkSetSessionOption(long ptr long long) -#187 stub WriteHitLogging -#188 stub ZonesReInit - -#FIXME: Needed by Wine -@ stdcall CoInternetCombineUrlEx(ptr wstr long ptr long) -@ stdcall CoInternetParseIUri(ptr long long wstr long ptr long) -@ stdcall CreateIUriBuilder(ptr long long ptr) -@ stdcall CreateUri(wstr long long ptr) -@ stdcall CreateURLMonikerEx2(ptr ptr ptr long) +163 stdcall Extract(long ptr) +164 stdcall FaultInIEFeature(long ptr ptr long) +#165 stub FindMediaType +#166 stub FindMediaTypeClass +167 stdcall FindMimeFromData(long ptr ptr long ptr long ptr long) +#168 GetAddSitesFileUrl +169 stdcall GetClassFileOrMime(ptr wstr ptr long wstr long ptr) +#170 stub GetClassURL +#171 stub GetComponentIDFromCLSSPEC +#172 GetIDNFlagsForUri +#173 GetIUriPriv +#174 GetLabelsFromNamedHost +#175 stub GetMarkOfTheWeb +#176 GetPortFromUrlScheme +#177 GetPropertyFromName +#178 GetPropertyName +179 stdcall GetSoftwareUpdateInfo(ptr ptr) +#180 GetUrlmonThreadNotificationHwnd +181 stdcall -stub HlinkGoBack(ptr) +#182 stub HlinkGoForward +#183 stub HlinkNavigateMoniker +184 stdcall HlinkNavigateString(ptr wstr) +185 stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long) +186 stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long) +#187 IEInstallScope +#188 InstallFlash +#189 IntlPercentEncodeNormalize +190 stdcall IsAsyncMoniker(ptr) +#191 IsDWORDProperty +#192 IsIntranetAvailable +#193 stub IsJITInProgress +194 stdcall IsLoggingEnabledA(str) +195 stdcall IsLoggingEnabledW(wstr) +#196 IsStringProperty +197 stdcall IsValidURL(ptr wstr long) +198 stdcall MkParseDisplayNameEx(ptr wstr ptr ptr) +199 stdcall ObtainUserAgentString(long str ptr) +#200 stub PrivateCoInstall +#201 QueryAssociations +#202 QueryClsidAssociation +203 stdcall RegisterBindStatusCallback(ptr ptr ptr long) +204 stdcall RegisterFormatEnumerator(ptr ptr long) +#205 stub RegisterMediaTypeClass +206 stdcall RegisterMediaTypes(long ptr ptr) +207 stdcall ReleaseBindInfo(ptr) +#208 ResetUrlmonLanguageData +209 stdcall RevokeBindStatusCallback(ptr ptr) +210 stdcall RevokeFormatEnumerator(ptr ptr) +#211 stub SetSoftwareUpdateAdvertisementState +#212 ShouldDisplayPunycodeForUri +#213 ShouldShowIntranetWarningSecband +#214 ShowTrustAlertDialog +#215 stub URLDownloadA +216 stdcall URLDownloadToCacheFileA(ptr str str long long ptr) +217 stdcall URLDownloadToCacheFileW(ptr wstr wstr long long ptr) +218 stdcall URLDownloadToFileA(ptr str str long ptr) +219 stdcall URLDownloadToFileW(ptr wstr wstr long ptr) +#220 stub URLDownloadW +221 stdcall URLOpenBlockingStreamA(ptr str ptr long ptr) +222 stdcall URLOpenBlockingStreamW(ptr wstr ptr long ptr) +#223 stub URLOpenPullStreamA +#224 stub URLOpenPullStreamW +225 stdcall URLOpenStreamA(ptr str long ptr) +226 stdcall URLOpenStreamW(ptr wstr long ptr) +#227 stub UrlMkBuildVersion +228 stdcall UrlMkGetSessionOption(long ptr long ptr long) +229 stdcall UrlMkSetSessionOption(long ptr long long) +#230 stub WriteHitLogging +#231 stub ZonesReInit +#304 IECompatLogEventWithUrl +#305 IECompatLogPopupMgr +#306 IECompatLogMkAndViewSource +#307 IECompatLogMimeHandling +#308 IECompatLogControlBlock +#309 IECompatLogObjCache +#310 IECompatLogWindowRestriction +#311 IECompatLogBinaryBhvr +#312 IECompatLogIDNNavigation +#313 IECompatLogSSLNavBlock +#314 IECompatLogRedirectUrl +#315 IECompatLogScriptUrl +#316 IECompatLogAntiphishingUrl +#318 IECompatLogZoneElevation3 +#319 IECompatLogZoneElevation4 +#320 IECompatLogSubframeNavigate +#321 IECompatLogFileDownloadWithSrcUrl +#322 IECompatLogCSSFix +#323 IECompatLogUIPIBlockedExtension +#324 ResetWarnOnIntranetFlag +#325 PSCreateMemoryPropertyStore +#326 PSCreatePropertyStoreFromObject +#327 PSCreateAdapterFromPropertyStore +#328 VariantCompare +#329 VariantToGUID +#330 VariantToStringWithDefault +#331 InitPropVariantFromBuffer +#332 InitPropVariantFromCLSID +#333 InitPropVariantFromFileTime +#334 InitPropVariantFromString +#335 InitVariantFromBuffer +#336 InitVariantFromStrRet +#337 PropVariantGetElementCount +#338 PropVariantToBoolean +#339 PropVariantToInt32 +#340 PropVariantToUInt32 +#341 PropVariantToInt64 +#342 PropVariantToUInt64 +#343 PropVariantToBooleanWithDefault +#344 PropVariantToInt32WithDefault +#345 PropVariantToUInt32WithDefault +#346 PropVariantToInt64WithDefault +#347 PropVariantToUInt64WithDefault +#348 PropVariantToBuffer +#349 PropVariantToFileTime +#350 PropVariantToGUID +#351 PropVariantToStringAlloc +#352 VariantToBoolean +#353 VariantToBooleanWithDefault +#354 VariantToPropVariant +#355 PropVariantToVariant +#360 ClearVariantArray +#361 InitVariantFromFileTime +#362 InitVariantFromGUIDAsString +#363 InitVariantFromResource +#364 PropVariantToStringWithDefault +#365 PropVariantToString +#366 VariantToBuffer +#367 VariantToDouble +#368 VariantToDoubleArray +#369 VariantToDoubleArrayAlloc +#370 VariantToFileTime +#371 VariantToInt16 +#372 VariantToUInt16 +#373 VariantToInt32 +#374 VariantToUInt32 +#375 VariantToInt64 +#376 VariantToUInt64 +#377 VariantToInt16Array +#378 VariantToUInt16Array +#379 VariantToInt32Array +#380 VariantToUInt32Array +#381 VariantToInt64Array +#382 VariantToUInt64Array +#383 VariantToInt16ArrayAlloc +#384 VariantToUInt16ArrayAlloc +#385 VariantToInt32ArrayAlloc +#386 VariantToUInt32ArrayAlloc +#387 VariantToUInt32WithDefault +#388 VariantToInt64ArrayAlloc +#389 VariantToUInt64ArrayAlloc +#390 VariantToString +#391 VariantToStringArray +#392 VariantToStringArrayAlloc +#393 VariantToStringAlloc +#394 VariantToStrRet +#395 PropVariantToBSTR +#396 PropVariantChangeType +#400 InitCustomerFeedback +#401 DeinitCustomerFeedback +#403 SqmAddExtensionClsid +#404 SqmOptedIn +#406 ScheduleSqmTasksInIdleThread +#407 IESqmGetSession +#408 LogSqmDWord +#409 LogSqmBool +#410 LogSqmBits +#411 LogSqmSetString +#412 LogSqmIfMax +#413 LogSqmIfMin +#414 LogSqmIncrement +#415 LogSqmAddToAverage +#416 LogSqmAddToStreamDWord +#417 LogSqmAddToStreamString +#420 FindDomainOrHostFromUri +#421 GetIESqmMutex +#422 ReleaseIESqmMutex +#423 LogSqmUXCommandOffsetInternal +#430 IsSQMOptionEnabled +#431 SetSQMOption +#432 GetSQMUrl +#433 LCIELowerConnLimit +#434 IECompatLogApplicationProtocolDialog +#435 IECompatLogNavigationRestricted +#436 IECompatLogMimeSniffUnsafe +#437 IECompatLogMimeSniffImageNotUpgraded +#438 IECompatLogProxyContentManaged +#439 IECompatLogNoCompression +#440 LCIEGetEffectiveConnLimit +#441 UrlmonCreateInstance +#442 CreateBrowserEmulationFilter +#443 CreateReadOnlyBrowserEmulationFilter +#444 MapUriToBrowserEmulationState +#445 MapBrowserEmulationModeToUserAgent +#446 CoInternetGetBrowserProfile +#447 CoInternetSetBrowserProfile +#448 DeleteBrowserEmulationUserData +#449 CoInternetGetBrowserEmulationMode +#450 CoInternetSetBrowserEmulationMode +#451 CleanBrowserEmulationCache +#452 ClearSessionBasedEmulationData +#453 GetSecMgrCacheSeed +#454 SeedSecMgrCache +#455 FlushUrlmonZonesCache +#456 Urlmon_CleanIETldListCache +#457 CreateIETldListManager +#458 IsClientCertSuppliedInProcess diff --git a/dll/win32/wdmaud.drv/CMakeLists.txt b/dll/win32/wdmaud.drv/CMakeLists.txt index 38bd5e059c2..f23bc045c78 100644 --- a/dll/win32/wdmaud.drv/CMakeLists.txt +++ b/dll/win32/wdmaud.drv/CMakeLists.txt @@ -30,6 +30,10 @@ target_link_libraries(wdmaud.drv libsamplerate mmixer) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(wdmaud.drv mingwex) +endif() + add_importlibs(wdmaud.drv user32 winmm advapi32 msvcrt setupapi ksuser kernel32 ntdll) add_pch(wdmaud.drv wdmaud.h SOURCE) add_cd_file(TARGET wdmaud.drv DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/winemp3.acm/CMakeLists.txt b/dll/win32/winemp3.acm/CMakeLists.txt index 7002521334d..65300138133 100644 --- a/dll/win32/winemp3.acm/CMakeLists.txt +++ b/dll/win32/winemp3.acm/CMakeLists.txt @@ -16,5 +16,10 @@ add_library(winemp3.acm SHARED set_module_type(winemp3.acm win32dll) set_target_properties(winemp3.acm PROPERTIES SUFFIX "") target_link_libraries(winemp3.acm wine libmpg123 oldnames) + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_libraries(winemp3.acm mingwex) +endif() + add_importlibs(winemp3.acm winmm user32 msvcrt kernel32 ntdll) add_cd_file(TARGET winemp3.acm DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/winhttp/request.c b/dll/win32/winhttp/request.c index e1e650bdfb7..0a75894136c 100644 --- a/dll/win32/winhttp/request.c +++ b/dll/win32/winhttp/request.c @@ -1197,6 +1197,7 @@ BOOL WINAPI WinHttpSendRequest( HINTERNET hrequest, LPCWSTR headers, DWORD heade return ret; } +#undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0])) static const WCHAR basicW[] = {'B','a','s','i','c',0}; diff --git a/dll/win32/wininet/http.c b/dll/win32/wininet/http.c index e287abda03b..714c4a60980 100644 --- a/dll/win32/wininet/http.c +++ b/dll/win32/wininet/http.c @@ -123,6 +123,7 @@ static const WCHAR emptyW[] = {0}; #define COLLECT_TIME 60000 +#undef ARRAYSIZE #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) struct HttpAuthInfo @@ -1299,7 +1300,7 @@ BOOL WINAPI HttpAddRequestHeadersW(HINTERNET hHttpRequest, TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); - if (!lpszHeader) + if (!lpszHeader) return TRUE; request = (http_request_t*) get_handle_object( hHttpRequest ); @@ -3841,13 +3842,13 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, info_mod &= ~ modifier_flags[i].val; } } - + if (info_mod) { TRACE(" Unknown (%08x)", info_mod); } TRACE("\n"); } - + request = (http_request_t*) get_handle_object( hHttpRequest ); if (NULL == request || request->hdr.htype != WH_HHTTPREQ) { @@ -4943,7 +4944,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, else requestString = build_request_header(request, request->verb, request->path, request->version, TRUE); - + TRACE("Request header -> %s\n", debugstr_w(requestString) ); res = open_http_connection(request, &reusing_connection); @@ -4991,7 +4992,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); - + if (HTTP_GetResponseHeaders(request, &responseLen)) { http_release_netconn(request, FALSE); @@ -6038,7 +6039,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR /* REPLACE wins out over ADD */ if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE) dwModifier &= ~HTTP_ADDHDR_FLAG_ADD; - + if (dwModifier & HTTP_ADDHDR_FLAG_ADD) index = -1; else diff --git a/dll/win32/winmm/CMakeLists.txt b/dll/win32/winmm/CMakeLists.txt index 6123003f1ca..0c59c51db63 100644 --- a/dll/win32/winmm/CMakeLists.txt +++ b/dll/win32/winmm/CMakeLists.txt @@ -29,6 +29,6 @@ add_pch(winmm winemm.h SOURCE) add_subdirectory(midimap) add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all) -if(NOT MSVC) +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) add_target_compile_flags(winmm "-Wno-unused-but-set-variable") endif() diff --git a/dll/win32/winmm/lang/winmm_Ru.rc b/dll/win32/winmm/lang/winmm_Ru.rc index 5f272796ec3..efb9a8c9f07 100644 --- a/dll/win32/winmm/lang/winmm_Ru.rc +++ b/dll/win32/winmm/lang/winmm_Ru.rc @@ -95,7 +95,7 @@ MCIERR_NONAPPLICABLE_FUNCTION, " MCIERR_ILLEGAL_FOR_AUTO_OPEN, " , . ." MCIERR_FILENAME_REQUIRED, " . , 8 , ." MCIERR_EXTRA_CHARACTERS, " , ." -MCIERR_DEVICE_NOT_INSTALLED, " . Control Panel ." +MCIERR_DEVICE_NOT_INSTALLED, " . ." MCIERR_GET_CD, " CI. ;-)" MCIERR_SET_CD, " MCI, ." MCIERR_SET_DRIVE, " MCI, ." @@ -108,20 +108,20 @@ MCIERR_WAVE_INPUTSINUSE, " MCIERR_WAVE_SETINPUTINUSE, " , .. . , , ." MCIERR_WAVE_OUTPUTUNSPECIFIED, " ." MCIERR_WAVE_INPUTUNSPECIFIED, " ." -MCIERR_WAVE_OUTPUTSUNSUITABLE, " . Drivers ." +MCIERR_WAVE_OUTPUTSUNSUITABLE, " . ." MCIERR_WAVE_SETOUTPUTUNSUITABLE,", , ." -MCIERR_WAVE_INPUTSUNSUITABLE, " . Drivers ." +MCIERR_WAVE_INPUTSUNSUITABLE, " . ." MCIERR_WAVE_SETINPUTUNSUITABLE, ", , ." MCIERR_NO_WINDOW, " ." MCIERR_CREATEWINDOW, " ." MCIERR_FILE_READ, " . , , . " MCIERR_FILE_WRITE, " . , , ." MCIERR_SEQ_DIV_INCOMPATIBLE, " ""song pointer"" SMPTE . ." -MCIERR_SEQ_NOMIDIPRESENT, " MIDI. Drivers Control Panel, MIDI." +MCIERR_SEQ_NOMIDIPRESENT, " MIDI. , MIDI." MCIERR_SEQ_PORT_INUSE, " MIDI . , , ." -MCIERR_SEQ_PORT_MAPNODEVICE, " MIDI Mapper MIDI. MIDI Mapper Control Panel, ." +MCIERR_SEQ_PORT_MAPNODEVICE, " MIDI Mapper MIDI. MIDI Mapper , ." MCIERR_SEQ_PORT_MISCERROR, " ." -MCIERR_SEQ_PORT_NONEXISTENT, " MIDI. Drivers Control Panel, MIDI." +MCIERR_SEQ_PORT_NONEXISTENT, " MIDI. , MIDI." MCIERR_SEQ_PORTUNSPECIFIED, " MIDI." MCIERR_SEQ_TIMER, " . ." diff --git a/dll/win32/wldap32/lang/wldap32_Ru.rc b/dll/win32/wldap32/lang/wldap32_Ru.rc index 4232a97c683..0416542ff0a 100644 --- a/dll/win32/wldap32/lang/wldap32_Ru.rc +++ b/dll/win32/wldap32/lang/wldap32_Ru.rc @@ -42,7 +42,7 @@ STRINGTABLE 14 "" 15 "" 16 "Нет такого атрибута" - 17 "Неопределённый тип" + 17 "Неопределенный тип" 18 "Неподходящее соответствие" 19 "Нарушение ограничения" 20 "Атрибут или значение существует" diff --git a/drivers/base/CMakeLists.txt b/drivers/base/CMakeLists.txt index 2a539a84aef..7d84024299a 100644 --- a/drivers/base/CMakeLists.txt +++ b/drivers/base/CMakeLists.txt @@ -4,9 +4,13 @@ add_subdirectory(bootvid) add_subdirectory(condrv) if(_WINKD_) -add_subdirectory(kdcom) + if (GDB) + add_subdirectory(kdgdb) + else() + add_subdirectory(kdcom) + endif() else() -add_subdirectory(kdrosdbg) + add_subdirectory(kdrosdbg) endif() add_subdirectory(nmidebug) diff --git a/drivers/base/bootvid/arm/bootdata.c b/drivers/base/bootvid/arm/bootdata.c index 5087a8a1fa2..87085a3401b 100644 --- a/drivers/base/bootvid/arm/bootdata.c +++ b/drivers/base/bootvid/arm/bootdata.c @@ -48,7 +48,10 @@ USHORT AT_Initialization[] = 0x0 // End of command stream }; -UCHAR FontData[256 * 13] = +// +// The character generator is in natural order, top of char is first element. +// +UCHAR FontData[256 * BOOTCHAR_HEIGHT] = { 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 0 0x00, 0x00, 0x3C, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, // 13 diff --git a/drivers/base/bootvid/arm/bootvid.c b/drivers/base/bootvid/arm/bootvid.c index 925c58bc96d..4ae37a53a7c 100644 --- a/drivers/base/bootvid/arm/bootvid.c +++ b/drivers/base/bootvid/arm/bootvid.c @@ -3,19 +3,19 @@ #define NDEBUG #include -#define LCDTIMING0_PPL(x) ((((x) / 16 - 1) & 0x3f) << 2) -#define LCDTIMING1_LPP(x) (((x) & 0x3ff) - 1) -#define LCDCONTROL_LCDPWR (1 << 11) -#define LCDCONTROL_LCDEN (1) -#define LCDCONTROL_LCDBPP(x) (((x) & 7) << 1) -#define LCDCONTROL_LCDTFT (1 << 5) +#define LCDTIMING0_PPL(x) ((((x) / 16 - 1) & 0x3f) << 2) +#define LCDTIMING1_LPP(x) (((x) & 0x3ff) - 1) +#define LCDCONTROL_LCDPWR (1 << 11) +#define LCDCONTROL_LCDEN (1) +#define LCDCONTROL_LCDBPP(x) (((x) & 7) << 1) +#define LCDCONTROL_LCDTFT (1 << 5) -#define PL110_LCDTIMING0 (PVOID)0xE0020000 -#define PL110_LCDTIMING1 (PVOID)0xE0020004 -#define PL110_LCDTIMING2 (PVOID)0xE0020008 -#define PL110_LCDUPBASE (PVOID)0xE0020010 -#define PL110_LCDLPBASE (PVOID)0xE0020014 -#define PL110_LCDCONTROL (PVOID)0xE0020018 +#define PL110_LCDTIMING0 (PVOID)0xE0020000 +#define PL110_LCDTIMING1 (PVOID)0xE0020004 +#define PL110_LCDTIMING2 (PVOID)0xE0020008 +#define PL110_LCDUPBASE (PVOID)0xE0020010 +#define PL110_LCDLPBASE (PVOID)0xE0020014 +#define PL110_LCDCONTROL (PVOID)0xE0020018 #define READ_REGISTER_ULONG(r) (*(volatile ULONG * const)(r)) #define WRITE_REGISTER_ULONG(r, v) (*(volatile ULONG *)(r) = (v)) @@ -71,14 +71,14 @@ FORCEINLINE VidpBuildColor(IN UCHAR Color) { UCHAR Red, Green, Blue; - + // // Extract color components // Red = VidpVga8To16BitTransform[Color].Red; Green = VidpVga8To16BitTransform[Color].Green; Blue = VidpVga8To16BitTransform[Color].Blue; - + // // Build the 16-bit color mask // @@ -93,7 +93,7 @@ VidpSetPixel(IN ULONG Left, IN UCHAR Color) { PUSHORT PixelPosition; - + // // Calculate the pixel position // @@ -107,18 +107,18 @@ VidpSetPixel(IN ULONG Left, VOID NTAPI -DisplayCharacter(CHAR Character, - ULONG Left, - ULONG Top, - ULONG TextColor, - ULONG BackTextColor) +DisplayCharacter(IN CHAR Character, + IN ULONG Left, + IN ULONG Top, + IN ULONG TextColor, + IN ULONG BackTextColor) { PUCHAR FontChar; ULONG i, j, XOffset; - + /* Get the font line for this character */ FontChar = &FontData[Character * 13 - Top]; - + /* Loop each pixel height */ i = 13; do @@ -140,11 +140,11 @@ DisplayCharacter(CHAR Character, /* transparent. */ VidpSetPixel(XOffset, Top, (UCHAR)BackTextColor); } - + /* Increase X Offset */ XOffset++; } while (j >>= 1); - + /* Move to the next Y ordinate */ Top++; } while (--i); @@ -152,56 +152,56 @@ DisplayCharacter(CHAR Character, VOID NTAPI -VgaScroll(ULONG Scroll) +VgaScroll(IN ULONG Scroll) { ULONG Top, Offset; PUSHORT SourceOffset, DestOffset; PUSHORT i, j; - + /* Set memory positions of the scroll */ SourceOffset = &VgaArmBase[(VidpScrollRegion[1] * 80) + (VidpScrollRegion[0] >> 3)]; DestOffset = &SourceOffset[Scroll * 80]; - + /* Save top and check if it's above the bottom */ Top = VidpScrollRegion[1]; if (Top > VidpScrollRegion[3]) return; - + /* Start loop */ do { /* Set number of bytes to loop and start offset */ Offset = VidpScrollRegion[0] >> 3; j = SourceOffset; - + /* Check if this is part of the scroll region */ if (Offset <= (VidpScrollRegion[2] >> 3)) { /* Update position */ i = (PUSHORT)(DestOffset - SourceOffset); - + /* Loop the X axis */ do { /* Write value in the new position so that we can do the scroll */ WRITE_REGISTER_USHORT(j, READ_REGISTER_USHORT(j + (ULONG_PTR)i)); - + /* Move to the next memory location to write to */ j++; - + /* Move to the next byte in the region */ Offset++; - + /* Make sure we don't go past the scroll region */ } while (Offset <= (VidpScrollRegion[2] >> 3)); } - + /* Move to the next line */ SourceOffset += 80; DestOffset += 80; - + /* Increase top */ Top++; - + /* Make sure we don't go past the scroll region */ } while (Top <= VidpScrollRegion[3]); } @@ -214,7 +214,7 @@ PreserveRow(IN ULONG CurrentTop, { PUSHORT Position1, Position2; ULONG Count; - + /* Check which way we're preserving */ if (Direction) { @@ -228,21 +228,17 @@ PreserveRow(IN ULONG CurrentTop, Position1 = &VgaArmBase[0x9600]; Position2 = &VgaArmBase[CurrentTop * 80]; } - - /* Set the count and make sure it's above 0 */ + + /* Set the count and loop every pixel */ Count = TopDelta * 80; - if (Count) + while (Count--) { - /* Loop every pixel */ - do - { - /* Write the data back on the other position */ - WRITE_REGISTER_USHORT(Position1, READ_REGISTER_USHORT(Position2)); - - /* Increase both positions */ - Position2++; - Position1++; - } while (--Count); + /* Write the data back on the other position */ + WRITE_REGISTER_USHORT(Position1, READ_REGISTER_USHORT(Position2)); + + /* Increase both positions */ + Position1++; + Position2++; } } @@ -255,17 +251,17 @@ VidpInitializeDisplay(VOID) // WRITE_REGISTER_ULONG(PL110_LCDUPBASE, VgaPhysical.LowPart); WRITE_REGISTER_ULONG(PL110_LCDLPBASE, VgaPhysical.LowPart); - + // // Initialize timings to 640x480 // - WRITE_REGISTER_ULONG(PL110_LCDTIMING0, LCDTIMING0_PPL(640)); - WRITE_REGISTER_ULONG(PL110_LCDTIMING1, LCDTIMING1_LPP(480)); - + WRITE_REGISTER_ULONG(PL110_LCDTIMING0, LCDTIMING0_PPL(640)); + WRITE_REGISTER_ULONG(PL110_LCDTIMING1, LCDTIMING1_LPP(480)); + // // Enable the LCD Display // - WRITE_REGISTER_ULONG(PL110_LCDCONTROL, + WRITE_REGISTER_ULONG(PL110_LCDCONTROL, LCDCONTROL_LCDEN | LCDCONTROL_LCDTFT | LCDCONTROL_LCDPWR | @@ -280,9 +276,9 @@ VidpInitializeDisplay(VOID) BOOLEAN NTAPI VidInitialize(IN BOOLEAN SetMode) -{ +{ DPRINT1("bv-arm v0.1\n"); - + // // Allocate framebuffer // 600kb works out to 640x480@16bpp @@ -290,7 +286,7 @@ VidInitialize(IN BOOLEAN SetMode) VgaPhysical.QuadPart = -1; VgaArmBase = MmAllocateContiguousMemory(600 * 1024, VgaPhysical); if (!VgaArmBase) return FALSE; - + // // Get physical address // @@ -321,12 +317,12 @@ VidResetDisplay(IN BOOLEAN HalReset) // VidpCurrentX = 0; VidpCurrentY = 0; - + // // Re-initialize the VGA Display // VidpInitializeDisplay(); - + // // Re-initialize the palette and fill the screen black // @@ -339,16 +335,16 @@ VidResetDisplay(IN BOOLEAN HalReset) */ ULONG NTAPI -VidSetTextColor(ULONG Color) +VidSetTextColor(IN ULONG Color) { UCHAR OldColor; - + // // Save the old, set the new // OldColor = VidpTextColor; VidpTextColor = Color; - + // // Return the old text color // @@ -360,10 +356,10 @@ VidSetTextColor(ULONG Color) */ VOID NTAPI -VidDisplayStringXY(PUCHAR String, - ULONG Left, - ULONG Top, - BOOLEAN Transparent) +VidDisplayStringXY(IN PUCHAR String, + IN ULONG Left, + IN ULONG Top, + IN BOOLEAN Transparent) { UNIMPLEMENTED; while (TRUE); @@ -374,24 +370,24 @@ VidDisplayStringXY(PUCHAR String, */ VOID NTAPI -VidSetScrollRegion(ULONG x1, - ULONG y1, - ULONG x2, - ULONG y2) +VidSetScrollRegion(IN ULONG Left, + IN ULONG Top, + IN ULONG Right, + IN ULONG Bottom) { /* Assert alignment */ - ASSERT((x1 & 0x7) == 0); - ASSERT((x2 & 0x7) == 7); - + ASSERT((Left & 0x7) == 0); + ASSERT((Right & 0x7) == 7); + /* Set Scroll Region */ - VidpScrollRegion[0] = x1; - VidpScrollRegion[1] = y1; - VidpScrollRegion[2] = x2; - VidpScrollRegion[3] = y2; - + VidpScrollRegion[0] = Left; + VidpScrollRegion[1] = Top; + VidpScrollRegion[2] = Right; + VidpScrollRegion[3] = Bottom; + /* Set current X and Y */ - VidpCurrentX = x1; - VidpCurrentY = y1; + VidpCurrentX = Left; + VidpCurrentY = Top; } /* @@ -426,10 +422,10 @@ VidBufferToScreenBlt(IN PUCHAR Buffer, */ VOID NTAPI -VidDisplayString(PUCHAR String) +VidDisplayString(IN PUCHAR String) { ULONG TopDelta = 14; - + /* Start looping the string */ while (*String) { @@ -443,14 +439,14 @@ VidDisplayString(PUCHAR String) /* Scroll the view */ VgaScroll(TopDelta); VidpCurrentY -= TopDelta; - + /* Preserve row */ PreserveRow(VidpCurrentY, TopDelta, TRUE); } - + /* Update current X */ VidpCurrentX = VidpScrollRegion[0]; - + /* Preseve the current row */ PreserveRow(VidpCurrentY, TopDelta, FALSE); } @@ -458,7 +454,7 @@ VidDisplayString(PUCHAR String) { /* Update current X */ VidpCurrentX = VidpScrollRegion[0]; - + /* Check if we're being followed by a new line */ if (String[1] != '\n') NextLine = TRUE; } @@ -471,7 +467,7 @@ VidDisplayString(PUCHAR String) PreserveRow(VidpCurrentY, TopDelta, TRUE); NextLine = FALSE; } - + /* Display this character */ DisplayCharacter(*String, VidpCurrentX, @@ -479,7 +475,7 @@ VidDisplayString(PUCHAR String) VidpTextColor, 16); VidpCurrentX += 8; - + /* Check if we should scroll */ if (VidpCurrentX > VidpScrollRegion[2]) { @@ -490,19 +486,19 @@ VidDisplayString(PUCHAR String) /* Do the scroll */ VgaScroll(TopDelta); VidpCurrentY -= TopDelta; - + /* Save the row */ PreserveRow(VidpCurrentY, TopDelta, TRUE); } - + /* Update X */ VidpCurrentX = VidpScrollRegion[0]; } } - + /* Get the next character */ String++; - } + } } /* @@ -510,9 +506,9 @@ VidDisplayString(PUCHAR String) */ VOID NTAPI -VidBitBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top) +VidBitBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top) { UNIMPLEMENTED; //while (TRUE); @@ -523,12 +519,12 @@ VidBitBlt(PUCHAR Buffer, */ VOID NTAPI -VidScreenToBufferBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top, - ULONG Width, - ULONG Height, - ULONG Delta) +VidScreenToBufferBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top, + IN ULONG Width, + IN ULONG Height, + IN ULONG Delta) { UNIMPLEMENTED; while (TRUE); @@ -546,12 +542,12 @@ VidSolidColorFill(IN ULONG Left, IN UCHAR Color) { int y, x; - + // // Loop along the Y-axis // - for (y = Top; y <= Bottom; y++) - { + for (y = Top; y <= Bottom; y++) + { // // Loop along the X-axis // @@ -562,5 +558,5 @@ VidSolidColorFill(IN ULONG Left, // VidpSetPixel(x, y, Color); } - } + } } diff --git a/drivers/base/bootvid/i386/bootvid.c b/drivers/base/bootvid/i386/bootvid.c index 59f28c617f8..280c2c59d16 100644 --- a/drivers/base/bootvid/i386/bootvid.c +++ b/drivers/base/bootvid/i386/bootvid.c @@ -5,7 +5,7 @@ /* PRIVATE FUNCTIONS *********************************************************/ -BOOLEAN +static BOOLEAN NTAPI VgaInterpretCmdStream(IN PUSHORT CmdStream) { @@ -139,6 +139,7 @@ VgaInterpretCmdStream(IN PUSHORT CmdStream) switch (Minor) { case 0: + { /* The port is what is in the stream right now */ ShortPort = UlongToPtr(*CmdStream); @@ -167,7 +168,10 @@ VgaInterpretCmdStream(IN PUSHORT CmdStream) WRITE_PORT_USHORT(ShortPort, ShortValue); } break; + } + case 1: + { /* The port is what is in the stream right now. Add the base too */ Port = *CmdStream + Base; @@ -196,7 +200,10 @@ VgaInterpretCmdStream(IN PUSHORT CmdStream) WRITE_PORT_UCHAR(Port, Value); } break; + } + case 2: + { /* The port is what is in the stream right now. Add the base too */ Port = *CmdStream + Base; @@ -208,6 +215,8 @@ VgaInterpretCmdStream(IN PUSHORT CmdStream) /* Write the value */ WRITE_PORT_UCHAR(Port, Value); break; + } + default: /* Unknown command, fail */ return FALSE; @@ -227,7 +236,7 @@ VgaInterpretCmdStream(IN PUSHORT CmdStream) return TRUE; } -BOOLEAN +static BOOLEAN NTAPI VgaIsPresent(VOID) { diff --git a/drivers/base/bootvid/i386/vga.c b/drivers/base/bootvid/i386/vga.c index 71754c5fb77..3efed459d58 100644 --- a/drivers/base/bootvid/i386/vga.c +++ b/drivers/base/bootvid/i386/vga.c @@ -2,14 +2,14 @@ /* GLOBALS *******************************************************************/ -ULONG ScrollRegion[4] = +static ULONG ScrollRegion[4] = { 0, 0, 640 - 1, 480 - 1 }; -UCHAR lMaskTable[8] = +static UCHAR lMaskTable[8] = { (1 << 8) - (1 << 0), (1 << 7) - (1 << 0), @@ -20,7 +20,7 @@ UCHAR lMaskTable[8] = (1 << 2) - (1 << 0), (1 << 1) - (1 << 0) }; -UCHAR rMaskTable[8] = +static UCHAR rMaskTable[8] = { (1 << 7), (1 << 7)+ (1 << 6), @@ -43,7 +43,7 @@ UCHAR PixelMask[8] = (1 << 1), (1 << 0), }; -ULONG lookup[16] = +static ULONG lookup[16] = { 0x0000, 0x0100, @@ -63,24 +63,24 @@ ULONG lookup[16] = 0x1111, }; -ULONG VidTextColor = 0xF; -ULONG curr_x = 0; -ULONG curr_y = 0; -BOOLEAN CarriageReturn = FALSE; ULONG_PTR VgaRegisterBase = 0; ULONG_PTR VgaBase = 0; +ULONG curr_x = 0; +ULONG curr_y = 0; +static ULONG VidTextColor = 0xF; +static BOOLEAN CarriageReturn = FALSE; #define __outpb(Port, Value) \ - WRITE_PORT_UCHAR((PUCHAR)VgaRegisterBase + Port, (UCHAR)Value) + WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value)) #define __outpw(Port, Value) \ - WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + Port), (USHORT)Value) + WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value)) /* PRIVATE FUNCTIONS *********************************************************/ -VOID +static VOID NTAPI -ReadWriteMode(UCHAR Mode) +ReadWriteMode(IN UCHAR Mode) { UCHAR Value; @@ -94,7 +94,6 @@ ReadWriteMode(UCHAR Mode) __outpb(0x3CF, Mode | Value); } - FORCEINLINE VOID SetPixel(IN ULONG Left, @@ -104,7 +103,7 @@ SetPixel(IN ULONG Left, PUCHAR PixelPosition; /* Calculate the pixel position. */ - PixelPosition = (PUCHAR)VgaBase + (Left >> 3) + (Top * 80); + PixelPosition = (PUCHAR)(VgaBase + (Left >> 3) + (Top * 80)); /* Select the bitmask register and write the mask */ __outpw(0x3CE, (PixelMask[Left & 7] << 8) | 8); @@ -114,6 +113,14 @@ SetPixel(IN ULONG Left, READ_REGISTER_UCHAR(PixelPosition) & Color); } +#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor) \ +do { \ + /* Select the bitmask register and write the mask */ \ + __outpw(0x3CE, ((_PixelMask) << 8) | 8); \ + /* Set the new color */ \ + WRITE_REGISTER_UCHAR((_PixelPtr), (UCHAR)(_TextColor)); \ +} while (0); + #ifdef CHAR_GEN_UPSIDE_DOWN # define GetFontPtr(_Char) &FontData[_Char * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1; # define FONT_PTR_DELTA (-1) @@ -122,20 +129,13 @@ SetPixel(IN ULONG Left, # define FONT_PTR_DELTA (1) #endif -#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor) \ - /* Select the bitmask register and write the mask */ \ - __outpw(0x3CE, (_PixelMask << 8) | 8); \ -\ - /* Set the new color */ \ - WRITE_REGISTER_UCHAR(_PixelPtr, (UCHAR)_TextColor);\ - -VOID +static VOID NTAPI -DisplayCharacter(CHAR Character, - ULONG Left, - ULONG Top, - ULONG TextColor, - ULONG BackColor) +DisplayCharacter(IN CHAR Character, + IN ULONG Left, + IN ULONG Top, + IN ULONG TextColor, + IN ULONG BackColor) { PUCHAR FontChar, PixelPtr; ULONG Height; @@ -155,7 +155,7 @@ DisplayCharacter(CHAR Character, /* Get the font and pixel pointer */ FontChar = GetFontPtr(Character); - PixelPtr = (PUCHAR)VgaBase + (Left >> 3) + (Top * 80); + PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * 80)); /* Loop all pixel rows */ Height = BOOTCHAR_HEIGHT; @@ -174,7 +174,7 @@ DisplayCharacter(CHAR Character, /* Get the font and pixel pointer (2nd byte) */ FontChar = GetFontPtr(Character); - PixelPtr = (PUCHAR)VgaBase + (Left >> 3) + (Top * 80) + 1; + PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * 80) + 1); /* Loop all pixel rows */ Height = BOOTCHAR_HEIGHT; @@ -198,7 +198,7 @@ DisplayCharacter(CHAR Character, /* Get the font and pixel pointer */ FontChar = GetFontPtr(Character); - PixelPtr = (PUCHAR)VgaBase + (Left >> 3) + (Top * 80); + PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * 80)); /* Loop all pixel rows */ Height = BOOTCHAR_HEIGHT; @@ -217,7 +217,7 @@ DisplayCharacter(CHAR Character, /* Get the font and pixel pointer (2nd byte) */ FontChar = GetFontPtr(Character); - PixelPtr = (PUCHAR)VgaBase + (Left >> 3) + (Top * 80) + 1; + PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * 80) + 1); /* Loop all pixel rows */ Height = BOOTCHAR_HEIGHT; @@ -230,13 +230,13 @@ DisplayCharacter(CHAR Character, } } -VOID +static VOID NTAPI -DisplayStringXY(PUCHAR String, - ULONG Left, - ULONG Top, - ULONG TextColor, - ULONG BackColor) +DisplayStringXY(IN PUCHAR String, + IN ULONG Left, + IN ULONG Top, + IN ULONG TextColor, + IN ULONG BackColor) { /* Loop every character */ while (*String) @@ -250,7 +250,7 @@ DisplayStringXY(PUCHAR String, } } -VOID +static VOID NTAPI SetPaletteEntryRGB(IN ULONG Id, IN ULONG Rgb) @@ -266,7 +266,7 @@ SetPaletteEntryRGB(IN ULONG Id, __outpb(0x3C9, Colors[0] >> 2); } -VOID +static VOID NTAPI InitPaletteWithTable(IN PULONG Table, IN ULONG Count) @@ -282,7 +282,7 @@ InitPaletteWithTable(IN PULONG Table, } } -VOID +static VOID NTAPI SetPaletteEntry(IN ULONG Id, IN ULONG PaletteEntry) @@ -300,18 +300,18 @@ VOID NTAPI InitializePalette(VOID) { - ULONG PaletteEntry[16] = {0, - 0x20, - 0x2000, - 0x2020, + ULONG PaletteEntry[16] = {0x000000, + 0x000020, + 0x002000, + 0x002020, 0x200000, 0x200020, 0x202000, 0x202020, 0x303030, - 0x3F, - 0x3F00, - 0x3F3F, + 0x00003F, + 0x003F00, + 0x003F3F, 0x3F0000, 0x3F003F, 0x3F3F00, @@ -322,9 +322,9 @@ InitializePalette(VOID) for (i = 0; i < 16; i++) SetPaletteEntry(i, PaletteEntry[i]); } -VOID +static VOID NTAPI -VgaScroll(ULONG Scroll) +VgaScroll(IN ULONG Scroll) { ULONG Top, RowSize; PUCHAR OldPosition, NewPosition; @@ -341,11 +341,11 @@ VgaScroll(ULONG Scroll) RowSize = (ScrollRegion[2] - ScrollRegion[0] + 1) / 8; /* Calculate the position in memory for the row */ - OldPosition = (PUCHAR)VgaBase + (ScrollRegion[1] + Scroll) * 80 + ScrollRegion[0] / 8; - NewPosition = (PUCHAR)VgaBase + ScrollRegion[1] * 80 + ScrollRegion[0] / 8; + OldPosition = (PUCHAR)(VgaBase + (ScrollRegion[1] + Scroll) * 80 + ScrollRegion[0] / 8); + NewPosition = (PUCHAR)(VgaBase + ScrollRegion[1] * 80 + ScrollRegion[0] / 8); /* Start loop */ - for(Top = ScrollRegion[1]; Top <= ScrollRegion[3]; ++Top) + for (Top = ScrollRegion[1]; Top <= ScrollRegion[3]; ++Top) { #if defined(_M_IX86) || defined(_M_AMD64) __movsb(NewPosition, OldPosition, RowSize); @@ -353,7 +353,7 @@ VgaScroll(ULONG Scroll) ULONG i; /* Scroll the row */ - for(i = 0; i < RowSize; ++i) + for (i = 0; i < RowSize; ++i) WRITE_REGISTER_UCHAR(NewPosition + i, READ_REGISTER_UCHAR(OldPosition + i)); #endif OldPosition += 80; @@ -361,7 +361,7 @@ VgaScroll(ULONG Scroll) } } -VOID +static VOID NTAPI PreserveRow(IN ULONG CurrentTop, IN ULONG TopDelta, @@ -383,36 +383,35 @@ PreserveRow(IN ULONG CurrentTop, if (Direction) { /* Calculate the position in memory for the row */ - Position1 = (PUCHAR)VgaBase + CurrentTop * 80; - Position2 = (PUCHAR)VgaBase + 0x9600; + Position1 = (PUCHAR)(VgaBase + CurrentTop * 80); + Position2 = (PUCHAR)(VgaBase + 0x9600); } else { /* Calculate the position in memory for the row */ - Position1 = (PUCHAR)VgaBase + 0x9600; - Position2 = (PUCHAR)VgaBase + CurrentTop * 80; + Position1 = (PUCHAR)(VgaBase + 0x9600); + Position2 = (PUCHAR)(VgaBase + CurrentTop * 80); } - /* Set the count and make sure it's above 0 */ + /* Set the count and loop every pixel */ Count = TopDelta * 80; #if defined(_M_IX86) || defined(_M_AMD64) __movsb(Position1, Position2, Count); #else - /* Loop every pixel */ while (Count--) { /* Write the data back on the other position */ WRITE_REGISTER_UCHAR(Position1, READ_REGISTER_UCHAR(Position2)); /* Increase both positions */ - Position2++; Position1++; + Position2++; } #endif } -VOID +static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, @@ -479,7 +478,7 @@ BitBlt(IN ULONG Left, } while (dy < Bottom); } -VOID +static VOID NTAPI RleBitBlt(IN ULONG Left, IN ULONG Top, @@ -577,22 +576,24 @@ RleBitBlt(IN ULONG Left, { /* Case 0 */ case 0: - + { /* Set new x value, decrease distance and restart */ x = Left; YDelta--; Buffer++; continue; + } /* Case 1 */ case 1: - + { /* Done */ return; + } /* Case 2 */ case 2: - + { /* Set new x value, decrease distance and restart */ Buffer++; x += *Buffer; @@ -600,12 +601,14 @@ RleBitBlt(IN ULONG Left, YDelta -= *Buffer; Buffer++; continue; + } /* Other values */ default: - + { Buffer++; break; + } } /* Check if we've gone past the edge */ @@ -684,7 +687,7 @@ RleBitBlt(IN ULONG Left, */ ULONG NTAPI -VidSetTextColor(ULONG Color) +VidSetTextColor(IN ULONG Color) { ULONG OldColor; @@ -699,16 +702,18 @@ VidSetTextColor(ULONG Color) */ VOID NTAPI -VidDisplayStringXY(PUCHAR String, - ULONG Left, - ULONG Top, - BOOLEAN Transparent) +VidDisplayStringXY(IN PUCHAR String, + IN ULONG Left, + IN ULONG Top, + IN BOOLEAN Transparent) { ULONG BackColor; - /* If the caller wanted transparent, then send the special value (16), else */ - /* use our default and call the helper routine. */ - BackColor = (Transparent) ? 16 : 14; + /* + * If the caller wanted transparent, then send the special value (16), + * else use our default and call the helper routine. + */ + BackColor = Transparent ? 16 : 14; DisplayStringXY(String, Left, Top, 12, BackColor); } @@ -717,24 +722,24 @@ VidDisplayStringXY(PUCHAR String, */ VOID NTAPI -VidSetScrollRegion(ULONG x1, - ULONG y1, - ULONG x2, - ULONG y2) +VidSetScrollRegion(IN ULONG Left, + IN ULONG Top, + IN ULONG Right, + IN ULONG Bottom) { /* Assert alignment */ - ASSERT((x1 & 0x7) == 0); - ASSERT((x2 & 0x7) == 7); + ASSERT((Left & 0x7) == 0); + ASSERT((Right & 0x7) == 7); /* Set Scroll Region */ - ScrollRegion[0] = x1; - ScrollRegion[1] = y1; - ScrollRegion[2] = x2; - ScrollRegion[3] = y2; + ScrollRegion[0] = Left; + ScrollRegion[1] = Top; + ScrollRegion[2] = Right; + ScrollRegion[3] = Bottom; /* Set current X and Y */ - curr_x = x1; - curr_y = y1; + curr_x = Left; + curr_y = Top; } /* @@ -764,7 +769,7 @@ VidBufferToScreenBlt(IN PUCHAR Buffer, IN ULONG Delta) { /* Make sure we have a width and height */ - if (!(Width) || !(Height)) return; + if (!Width || !Height) return; /* Call the helper function */ BitBlt(Left, Top, Width, Height, Buffer, 4, Delta); @@ -775,7 +780,7 @@ VidBufferToScreenBlt(IN PUCHAR Buffer, */ VOID NTAPI -VidDisplayString(PUCHAR String) +VidDisplayString(IN PUCHAR String) { ULONG TopDelta = BOOTCHAR_HEIGHT + 1; @@ -859,9 +864,9 @@ VidDisplayString(PUCHAR String) */ VOID NTAPI -VidBitBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top) +VidBitBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top) { PBITMAPINFOHEADER BitmapInfoHeader; LONG Delta; @@ -878,15 +883,17 @@ VidBitBlt(PUCHAR Buffer, /* Make sure we can support this bitmap */ ASSERT((BitmapInfoHeader->biBitCount * BitmapInfoHeader->biPlanes) <= 4); - /* Calculate the delta and align it on 32-bytes, then calculate the actual */ - /* start of the bitmap data. */ + /* + * Calculate the delta and align it on 32-bytes, then calculate + * the actual start of the bitmap data. + */ Delta = (BitmapInfoHeader->biBitCount * BitmapInfoHeader->biWidth) + 31; Delta >>= 3; Delta &= ~3; BitmapOffset = Buffer + sizeof(BITMAPINFOHEADER) + 16 * sizeof(ULONG); /* Check the compression of the bitmap */ - if (BitmapInfoHeader->biCompression == 2) + if (BitmapInfoHeader->biCompression == BI_RLE4) { /* Make sure we have a width and a height */ if ((BitmapInfoHeader->biWidth) && (BitmapInfoHeader->biHeight)) @@ -910,7 +917,7 @@ VidBitBlt(PUCHAR Buffer, else { /* Update buffer offset */ - BitmapOffset += ((BitmapInfoHeader->biHeight -1) * Delta); + BitmapOffset += ((BitmapInfoHeader->biHeight - 1) * Delta); Delta *= -1; } @@ -934,12 +941,12 @@ VidBitBlt(PUCHAR Buffer, */ VOID NTAPI -VidScreenToBufferBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top, - ULONG Width, - ULONG Height, - ULONG Delta) +VidScreenToBufferBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top, + IN ULONG Width, + IN ULONG Height, + IN ULONG Delta) { ULONG Plane; ULONG XDistance; @@ -974,7 +981,7 @@ VidScreenToBufferBlt(PUCHAR Buffer, do { /* Set the current pixel position and reset buffer loop variable */ - PixelPosition = (PUCHAR)VgaBase + PixelOffset; + PixelPosition = (PUCHAR)(VgaBase + PixelOffset); i = Buffer; /* Set Mode 0 */ @@ -1073,7 +1080,7 @@ VidSolidColorFill(IN ULONG Left, __outpw(0x3CE, 7); /* Calculate pixel position for the read */ - Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)LeftOffset; + Offset = (PUCHAR)(VgaBase + (Top * 80) + LeftOffset); /* Select the bitmask register and write the mask */ __outpw(0x3CE, (USHORT)lMask); @@ -1097,7 +1104,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)RightOffset; + Offset = (PUCHAR)(VgaBase + (Top * 80) + RightOffset); Distance--; /* Select the bitmask register and write the mask */ @@ -1123,7 +1130,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)(LeftOffset + 1); + Offset = (PUCHAR)(VgaBase + (Top * 80) + LeftOffset + 1); /* Set the bitmask to 0xFF for all 4 planes */ __outpw(0x3CE, 0xFF08); diff --git a/drivers/base/bootvid/precomp.h b/drivers/base/bootvid/precomp.h index f61e41c28d1..33fb58c7483 100644 --- a/drivers/base/bootvid/precomp.h +++ b/drivers/base/bootvid/precomp.h @@ -1,7 +1,7 @@ #ifndef _BOOTVID_PCH_ #define _BOOTVID_PCH_ -#include +#include #include /* Define if FontData has upside down characters */ @@ -31,11 +31,13 @@ typedef struct tagBITMAPINFOHEADER ULONG biClrImportant; } BITMAPINFOHEADER, *PBITMAPINFOHEADER; +/* Supported bitmap compression formats */ +#define BI_RGB 0 +#define BI_RLE4 2 + VOID NTAPI -InitializePalette( - VOID -); +InitializePalette(VOID); /* Globals */ extern USHORT AT_Initialization[]; diff --git a/drivers/base/kdgdb/CMakeLists.txt b/drivers/base/kdgdb/CMakeLists.txt new file mode 100644 index 00000000000..cf180c1a680 --- /dev/null +++ b/drivers/base/kdgdb/CMakeLists.txt @@ -0,0 +1,29 @@ + +spec2def(kdcom.dll kdgdb.spec ADD_IMPORTLIB) + +list(APPEND SOURCE + gdb_input.c + gdb_receive.c + gdb_send.c + kdcom.c + kdpacket.c + kdgdb.h) + +# TODO: AMD64, ARM... +if(ARCH STREQUAL "i386") + list(APPEND SOURCE i386_sup.c) +endif() + +add_library(kdcom SHARED + ${SOURCE} + kdgdb.rc + ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def) + +set_entrypoint(kdcom 0) +set_subsystem(kdcom native) +set_image_base(kdcom 0x00010000) + +add_importlibs(kdcom ntoskrnl hal) +target_link_libraries(kdcom cportlib) +add_pch(kdcom kdgdb.h SOURCE) +add_cd_file(TARGET kdcom DESTINATION reactos/system32 NO_CAB FOR all) diff --git a/drivers/base/kdgdb/gdb_input.c b/drivers/base/kdgdb/gdb_input.c new file mode 100644 index 00000000000..2305055bd06 --- /dev/null +++ b/drivers/base/kdgdb/gdb_input.c @@ -0,0 +1,285 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/gdb_input.c + * PURPOSE: Base functions for the kernel debugger. + */ + +#include "kdgdb.h" + +/* LOCALS *********************************************************************/ +static HANDLE gdb_run_thread; +static HANDLE gdb_dbg_process; +HANDLE gdb_dbg_thread; + +/* PRIVATE FUNCTIONS **********************************************************/ +static +HANDLE +hex_to_thread(char* buffer) +{ + ULONG_PTR ret = 0; + char hex; + while (*buffer) + { + hex = hex_value(*buffer++); + if (hex < 0) + return (HANDLE)ret; + ret <<= 4; + ret += hex; + } + return (HANDLE)ret; +} + +static +ULONG64 +hex_to_address(char* buffer) +{ + ULONG64 ret = 0; + char hex; + while (*buffer) + { + hex = hex_value(*buffer++); + if (hex < 0) + return ret; + ret <<= 4; + ret += hex; + } + return ret; +} + +/* H* packets */ +static +void +handle_gdb_set_thread(void) +{ + switch (gdb_input[1]) + { + case 'c': + if (strcmp(&gdb_input[2], "-1") == 0) + gdb_run_thread = (HANDLE)-1; + else + gdb_run_thread = hex_to_thread(&gdb_input[2]); + send_gdb_packet("OK"); + break; + case 'g': + if (strncmp(&gdb_input[2], "p-1", 3) == 0) + { + gdb_dbg_process = (HANDLE)-1; + gdb_dbg_thread = (HANDLE)-1; + } + else + { + char* ptr = strstr(gdb_input, ".") + 1; + gdb_dbg_process = hex_to_thread(&gdb_input[3]); + if (strncmp(ptr, "-1", 2) == 0) + gdb_dbg_thread = (HANDLE)-1; + else + gdb_dbg_thread = hex_to_thread(ptr); + } + send_gdb_packet("OK"); + break; + default: + KDDBGPRINT("KDGBD: Unknown 'H' command: %s\n", gdb_input); + send_gdb_packet(""); + } +} + +static +void +handle_gdb_thread_alive(void) +{ + char* ptr = strstr(gdb_input, ".") + 1; + CLIENT_ID ClientId; + PETHREAD Thread; + NTSTATUS Status; + + ClientId.UniqueProcess = hex_to_thread(&gdb_input[2]); + ClientId.UniqueThread = hex_to_thread(ptr); + + Status = PsLookupProcessThreadByCid(&ClientId, NULL, &Thread); + + if (!NT_SUCCESS(Status)) + { + /* Thread doesn't exist */ + send_gdb_packet("E03"); + return; + } + + /* It's OK */ + ObDereferenceObject(Thread); + send_gdb_packet("OK"); +} + +/* q* packets */ +static +void +handle_gdb_query(void) +{ + if (strncmp(gdb_input, "qSupported:", 11) == 0) + { + send_gdb_packet("PacketSize=4096;multiprocess+;"); + return; + } + + if (strncmp(gdb_input, "qAttached", 9) == 0) + { + /* Say yes: the remote server didn't create the process, ReactOS did! */ + send_gdb_packet("0"); + return; + } + + if (strncmp(gdb_input, "qRcmd,", 6) == 0) + { + send_gdb_packet("OK"); + return; + } + + if (strcmp(gdb_input, "qC") == 0) + { + char gdb_out[64]; + sprintf(gdb_out, "QC:p%p.%p;", + PsGetThreadProcessId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread), + PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread)); + send_gdb_packet(gdb_out); + return; + } + + if (strncmp(gdb_input, "qTStatus", 8) == 0) + { + /* We don't support tracepoints. */ + send_gdb_packet("T0"); + return; + } + + KDDBGPRINT("KDGDB: Unknown query: %s\n", gdb_input); + send_gdb_packet(""); +} + +#if 0 +static +KDSTATUS +handle_gdb_registers( + _Out_ DBGKD_MANIPULATE_STATE64* State, + _Out_ PSTRING MessageData, + _Out_ PULONG MessageLength) +{ + /* + if (gdb_dbg_thread) + KDDBGPRINT("Should get registers from other thread!\n"); + */ + + State->ApiNumber = DbgKdGetContextApi; + State->ReturnStatus = STATUS_SUCCESS; /* ? */ + State->Processor = CurrentStateChange.Processor; + State->ProcessorLevel = CurrentStateChange.ProcessorLevel; + if (MessageData) + MessageData->Length = 0; + *MessageLength = 0; + return KdPacketReceived; +} +#endif + +static +KDSTATUS +handle_gdb_read_mem( + _Out_ DBGKD_MANIPULATE_STATE64* State, + _Out_ PSTRING MessageData, + _Out_ PULONG MessageLength) +{ + State->ApiNumber = DbgKdReadVirtualMemoryApi; + State->ReturnStatus = STATUS_SUCCESS; /* ? */ + State->Processor = CurrentStateChange.Processor; + State->ProcessorLevel = CurrentStateChange.ProcessorLevel; + if (MessageData) + MessageData->Length = 0; + *MessageLength = 0; + + State->u.ReadMemory.TargetBaseAddress = hex_to_address(&gdb_input[1]); + State->u.ReadMemory.TransferCount = hex_to_address(strstr(&gdb_input[1], ",") + 1); + return KdPacketReceived; +} + +static +KDSTATUS +handle_gdb_v( + _Out_ DBGKD_MANIPULATE_STATE64* State, + _Out_ PSTRING MessageData, + _Out_ PULONG MessageLength, + _Inout_ PKD_CONTEXT KdContext) +{ + if (strncmp(gdb_input, "vCont", 5) == 0) + { + if (gdb_input[5] == '?') + { + KDSTATUS Status; + /* Report what we support */ + send_gdb_packet("vCont;c;C;s;S"); + Status = gdb_receive_packet(KdContext); + if (Status != KdPacketReceived) + return Status; + return gdb_interpret_input(State, MessageData, MessageLength, KdContext); + } + + if (strcmp(gdb_input, "vCont;c") == 0) + { + /* Let's go on */ + State->ApiNumber = DbgKdContinueApi; + State->ReturnStatus = STATUS_SUCCESS; /* ? */ + State->Processor = CurrentStateChange.Processor; + State->ProcessorLevel = CurrentStateChange.ProcessorLevel; + if (MessageData) + MessageData->Length = 0; + *MessageLength = 0; + State->u.Continue.ContinueStatus = STATUS_SUCCESS; + /* Tell GDB we are fine */ + send_gdb_packet("OK"); + return KdPacketReceived; + } + } + + return KdPacketReceived; +} + +/* GLOBAL FUNCTIONS ***********************************************************/ +KDSTATUS +gdb_interpret_input( + _Out_ DBGKD_MANIPULATE_STATE64* State, + _Out_ PSTRING MessageData, + _Out_ PULONG MessageLength, + _Inout_ PKD_CONTEXT KdContext) +{ + KDSTATUS Status; + switch (gdb_input[0]) + { + case '?': + /* Send the Status */ + gdb_send_exception(); + break; + case 'g': + gdb_send_registers(); + break; + case 'H': + handle_gdb_set_thread(); + break; + case 'm': + return handle_gdb_read_mem(State, MessageData, MessageLength); + case 'q': + handle_gdb_query(); + break; + case 'T': + handle_gdb_thread_alive(); + break; + case 'v': + return handle_gdb_v(State, MessageData, MessageLength, KdContext); + default: + /* We don't know how to handle this request. Maybe this is something for KD */ + State->ReturnStatus = STATUS_NOT_SUPPORTED; + return KdPacketReceived; + } + /* Get the answer from GDB */ + Status = gdb_receive_packet(KdContext); + if (Status != KdPacketReceived) + return Status; + /* Try interpreting this new packet */ + return gdb_interpret_input(State, MessageData, MessageLength, KdContext); +} diff --git a/drivers/base/kdgdb/gdb_receive.c b/drivers/base/kdgdb/gdb_receive.c new file mode 100644 index 00000000000..7494039ad95 --- /dev/null +++ b/drivers/base/kdgdb/gdb_receive.c @@ -0,0 +1,90 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/gdb_receive.c + * PURPOSE: Base functions for the kernel debugger. + */ + +#include "kdgdb.h" + +/* GLOBALS ********************************************************************/ +CHAR gdb_input[0x1000]; + +/* GLOBAL FUNCTIONS ***********************************************************/ +char +hex_value(char ch) +{ + if ((ch >= '0') && (ch <= '9')) + return (ch - '0'); + + if ((ch >= 'a') && (ch <= 'f')) + return (ch - 'a' + 10); + + if ((ch >= 'A') && (ch <= 'F')) + return (ch - 'A' + 10); + + return -1; +} + +KDSTATUS +NTAPI +gdb_receive_packet(_Inout_ PKD_CONTEXT KdContext) +{ + char* ByteBuffer = gdb_input; + UCHAR Byte; + KDSTATUS Status; + CHAR CheckSum = 0, ReceivedCheckSum; + + do + { + Status = KdpReceiveByte(&Byte); + if (Status != KdPacketReceived) + return Status; + if (Byte == 0x03) + { + KdContext->KdpControlCPending = TRUE; + return KdPacketNeedsResend; + } + } while (Byte != '$'); + + while (TRUE) + { + /* Try to get a byte from the port */ + Status = KdpReceiveByte(&Byte); + if (Status != KdPacketReceived) + return Status; + + if (Byte == '#') + { + *ByteBuffer = '\0'; + break; + } + + *ByteBuffer++ = Byte; + CheckSum += (CHAR)Byte; + } + + /* Get Check sum (two bytes) */ + Status = KdpReceiveByte(&Byte); + if (Status != KdPacketReceived) + goto end; + ReceivedCheckSum = hex_value(Byte) << 4;; + + Status = KdpReceiveByte(&Byte); + if (Status != KdPacketReceived) + goto end; + ReceivedCheckSum += hex_value(Byte); + +end: + if (ReceivedCheckSum != CheckSum) + { + /* Do not acknowledge to GDB */ + KdpSendByte('-'); + return KdPacketNeedsResend; + } + + /* Acknowledge */ + KdpSendByte('+'); + + return KdPacketReceived; +} diff --git a/drivers/base/kdgdb/gdb_send.c b/drivers/base/kdgdb/gdb_send.c new file mode 100644 index 00000000000..4e64495467e --- /dev/null +++ b/drivers/base/kdgdb/gdb_send.c @@ -0,0 +1,220 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/gdb_send.c + * PURPOSE: Base functions for the kernel debugger. + */ + +#include "kdgdb.h" + +/* LOCALS *********************************************************************/ +const char hex_chars[] = "0123456789abcdef"; + +/* PRIVATE FUNCTIONS **********************************************************/ +static +char* +exception_code_to_gdb(NTSTATUS code, char* out) +{ + unsigned char SigVal; + + switch (code) + { + case STATUS_INTEGER_DIVIDE_BY_ZERO: + SigVal = 8; /* divide by zero */ + break; + case STATUS_SINGLE_STEP: + case STATUS_BREAKPOINT: + SigVal = 5; /* breakpoint */ + break; + case STATUS_INTEGER_OVERFLOW: + case STATUS_ARRAY_BOUNDS_EXCEEDED: + SigVal = 16; /* bound instruction */ + break; + case STATUS_ILLEGAL_INSTRUCTION: + SigVal = 4; /* Invalid opcode */ + break; + case STATUS_STACK_OVERFLOW: + case STATUS_DATATYPE_MISALIGNMENT: + case STATUS_ACCESS_VIOLATION: + SigVal = 11; /* access violation */ + break; + default: + SigVal = 7; /* "software generated" */ + } + *out++ = hex_chars[(SigVal >> 4) & 0xf]; + *out++ = hex_chars[SigVal & 0xf]; + return out; +} + +/* GLOBAL FUNCTIONS ***********************************************************/ +void +send_gdb_packet(_In_ CHAR* Buffer) +{ + UCHAR ack; + + do { + CHAR* ptr = Buffer; + CHAR check_sum = 0; + + KdpSendByte('$'); + + /* Calculate checksum */ + check_sum = 0; + while (*ptr) + { + check_sum += *ptr; + KdpSendByte(*ptr++); + } + + /* append it */ + KdpSendByte('#'); + KdpSendByte(hex_chars[(check_sum >> 4) & 0xf]); + KdpSendByte(hex_chars[check_sum & 0xf]); + + /* Wait for acknowledgement */ + if (KdpReceiveByte(&ack) != KdPacketReceived) + { + KD_DEBUGGER_NOT_PRESENT = TRUE; + break; + } + } while (ack != '+'); +} + +void +send_gdb_memory( + _In_ VOID* Buffer, + _In_ size_t Length) +{ + UCHAR ack; + + do { + CHAR* ptr = Buffer; + CHAR check_sum = 0; + size_t len = Length; + CHAR Byte; + + KdpSendByte('$'); + + /* Send the data */ + check_sum = 0; + while (len--) + { + Byte = hex_chars[(*ptr >> 4) & 0xf]; + KdpSendByte(Byte); + check_sum += Byte; + Byte = hex_chars[*ptr++ & 0xf]; + KdpSendByte(Byte); + check_sum += Byte; + } + + /* append check sum */ + KdpSendByte('#'); + KdpSendByte(hex_chars[(check_sum >> 4) & 0xf]); + KdpSendByte(hex_chars[check_sum & 0xf]); + + /* Wait for acknowledgement */ + if (KdpReceiveByte(&ack) != KdPacketReceived) + { + KD_DEBUGGER_NOT_PRESENT = TRUE; + break; + } + } while (ack != '+'); +} + +void +gdb_send_debug_io( + _In_ PSTRING String) +{ + UCHAR ack; + + do { + CHAR* ptr = String->Buffer; + CHAR check_sum; + USHORT Length = String->Length; + CHAR Byte; + + KdpSendByte('$'); + + KdpSendByte('O'); + + /* Send the data */ + check_sum = 'O'; + while (Length--) + { + Byte = hex_chars[(*ptr >> 4) & 0xf]; + KdpSendByte(Byte); + check_sum += Byte; + Byte = hex_chars[*ptr++ & 0xf]; + KdpSendByte(Byte); + check_sum += Byte; + } + + /* append check sum */ + KdpSendByte('#'); + KdpSendByte(hex_chars[(check_sum >> 4) & 0xf]); + KdpSendByte(hex_chars[check_sum & 0xf]); + + /* Wait for acknowledgement */ + if (KdpReceiveByte(&ack) != KdPacketReceived) + { + KD_DEBUGGER_NOT_PRESENT = TRUE; + break; + } + } while (ack != '+'); +} + +void +gdb_send_exception(void) +{ + char gdb_out[1024]; + char* ptr = gdb_out; + DBGKM_EXCEPTION64* Exception = NULL; + + if (CurrentStateChange.NewState == DbgKdExceptionStateChange) + Exception = &CurrentStateChange.u.Exception; + + /* Report to GDB */ + *ptr++ = 'T'; + if (Exception) + ptr = exception_code_to_gdb(Exception->ExceptionRecord.ExceptionCode, ptr); + else + ptr += sprintf(ptr, "05"); + ptr += sprintf(ptr, "thread:p%p.%p;", + PsGetThreadProcessId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread), + PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread)); + ptr += sprintf(ptr, "core:%x;", CurrentStateChange.Processor); + send_gdb_packet(gdb_out); +} + +#ifdef KDDEBUG +ULONG KdpDbgPrint(const char* Format, ...) +{ + va_list ap; + CHAR Buffer[512]; + struct _STRING Str; + int Length; + + va_start(ap, Format); + Length = _vsnprintf(Buffer, sizeof(Buffer), Format, ap); + va_end(ap); + + /* Check if we went past the buffer */ + if (Length == -1) + { + /* Terminate it if we went over-board */ + Buffer[sizeof(Buffer) - 1] = '\n'; + + /* Put maximum */ + Length = sizeof(Buffer); + } + + Str.Buffer = Buffer; + Str.Length = Length; + Str.MaximumLength = sizeof(Buffer); + + gdb_send_debug_io(&Str); + + return 0; +} +#endif + diff --git a/drivers/base/kdgdb/i386_sup.c b/drivers/base/kdgdb/i386_sup.c new file mode 100644 index 00000000000..86ddabc6ed7 --- /dev/null +++ b/drivers/base/kdgdb/i386_sup.c @@ -0,0 +1,99 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/gdb_input.c + * PURPOSE: Base functions for the kernel debugger. + */ + +#include "kdgdb.h" + +enum reg_name +{ + EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, + EIP, + EFLAGS, + CS, SS, DS, ES, FS, GS, + ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, + FCTRL, FSTAT, FTAG, FISEG, FIOFF, FOSEG, FOOFF, FOP, + XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, + MXCSR +}; + +static +void* +ctx_to_reg(CONTEXT* ctx, enum reg_name name, unsigned short* size) +{ + /* For general registers: 32bits */ + *size = 4; + switch (name) + { + case EAX: return &ctx->Eax; + case EBX: return &ctx->Ebx; + case ECX: return &ctx->Ecx; + case EDX: return &ctx->Edx; + case ESP: return &ctx->Esp; + case EBP: return &ctx->Ebp; + case ESI: return &ctx->Esi; + case EDI: return &ctx->Edi; + case EIP: return &ctx->Eip; + case EFLAGS: return &ctx->EFlags; + case CS: return &ctx->SegCs; + case DS: return &ctx->SegDs; + case ES: return &ctx->SegEs; + case FS: return &ctx->SegFs; + case GS: return &ctx->SegGs; + case SS: return &ctx->SegSs; + /* 80 bits */ + case ST0: + case ST1: + case ST2: + case ST3: + case ST4: + case ST5: + case ST6: + case ST7: + *size = 10; + return &ctx->FloatSave.RegisterArea[10 * (name - ST0)]; + /* X87 registers */ + case FCTRL: return &ctx->FloatSave.ControlWord; + case FSTAT: return &ctx->FloatSave.StatusWord; + case FTAG: return &ctx->FloatSave.TagWord; + case FISEG: return &ctx->FloatSave.DataSelector; + case FIOFF: return &ctx->FloatSave.DataOffset; + case FOSEG: return &ctx->FloatSave.ErrorSelector; + case FOOFF: return &ctx->FloatSave.ErrorOffset; + case FOP: return &ctx->FloatSave.Cr0NpxState; + /* SSE */ + case XMM0: + case XMM1: + case XMM2: + case XMM3: + case XMM4: + case XMM5: + case XMM6: + case XMM7: + *size = 16; + return &ctx->ExtendedRegisters[160 + (name - XMM0)*16]; + case MXCSR: return &ctx->ExtendedRegisters[24]; + } + return 0; +} + +void +gdb_send_registers(void) +{ + CONTEXT* ctx; + PKPRCB* ProcessorBlockLists; + ULONG32 Registers[16]; + unsigned i; + unsigned short size; + + ProcessorBlockLists = (PKPRCB*)KdDebuggerDataBlock->KiProcessorBlock.Pointer; + ctx = (CONTEXT*)((char*)ProcessorBlockLists[CurrentStateChange.Processor] + KdDebuggerDataBlock->OffsetPrcbProcStateContext); + + for(i=0; i < 16; i++) + { + Registers[i] = *(ULONG32*)ctx_to_reg(ctx, i, &size); + } + send_gdb_memory(Registers, sizeof(Registers)); +} diff --git a/drivers/base/kdgdb/kdcom.c b/drivers/base/kdgdb/kdcom.c new file mode 100644 index 00000000000..f07a4d80124 --- /dev/null +++ b/drivers/base/kdgdb/kdcom.c @@ -0,0 +1,269 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kdgdb/kdcom.c + * PURPOSE: COM port functions for the kernel debugger. + */ + +#include "kdgdb.h" + +#include +#include +#include +#include + +/* Serial debug connection */ +#define DEFAULT_DEBUG_PORT 2 /* COM2 */ +#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */ +#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */ +#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */ + +#define DEFAULT_BAUD_RATE 19200 + +#if defined(_M_IX86) || defined(_M_AMD64) +const ULONG BaseArray[] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; +#elif defined(_M_PPC) +const ULONG BaseArray[] = {0, 0x800003F8}; +#elif defined(_M_MIPS) +const ULONG BaseArray[] = {0, 0x80006000, 0x80007000}; +#elif defined(_M_ARM) +const ULONG BaseArray[] = {0, 0xF1012000}; +#else +#error Unknown architecture +#endif + +/* GLOBALS ********************************************************************/ + +CPPORT KdDebugComPort; +ULONG KdDebugComPortIrq = 0; // Not used at the moment. + + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +NTAPI +KdD0Transition(VOID) +{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdD3Transition(VOID) +{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdSave(IN BOOLEAN SleepTransition) +{ + /* Nothing to do on COM ports */ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdRestore(IN BOOLEAN SleepTransition) +{ + /* Nothing to do on COM ports */ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdpPortInitialize(IN ULONG ComPortNumber, + IN ULONG ComPortBaudRate) +{ + NTSTATUS Status; + + Status = CpInitialize(&KdDebugComPort, + UlongToPtr(BaseArray[ComPortNumber]), + ComPortBaudRate); + if (!NT_SUCCESS(Status)) + { + return STATUS_INVALID_PARAMETER; + } + else + { + KdComPortInUse = KdDebugComPort.Address; + return STATUS_SUCCESS; + } +} + +/****************************************************************************** + * \name KdDebuggerInitialize0 + * \brief Phase 0 initialization. + * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL. + * \return Status + */ +NTSTATUS +NTAPI +KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) +{ + ULONG ComPortNumber = DEFAULT_DEBUG_PORT; + ULONG ComPortBaudRate = DEFAULT_DEBUG_BAUD_RATE; + + PCHAR CommandLine, PortString, BaudString, IrqString; + ULONG Value; + + /* Check if e have a LoaderBlock */ + if (LoaderBlock) + { + + /* Get the Command Line */ + CommandLine = LoaderBlock->LoadOptions; + + /* Upcase it */ + _strupr(CommandLine); + + /* Get the port and baud rate */ + PortString = strstr(CommandLine, "DEBUGPORT"); + BaudString = strstr(CommandLine, "BAUDRATE"); + IrqString = strstr(CommandLine, "IRQ"); + + /* Check if we got the /DEBUGPORT parameter */ + if (PortString) + { + /* Move past the actual string, to reach the port*/ + PortString += strlen("DEBUGPORT"); + + /* Now get past any spaces and skip the equal sign */ + while (*PortString == ' ') PortString++; + PortString++; + + /* Do we have a serial port? */ + if (strncmp(PortString, "COM", 3) != 0) + { + return STATUS_INVALID_PARAMETER; + } + + /* Check for a valid Serial Port */ + PortString += 3; + Value = atol(PortString); + if (Value >= sizeof(BaseArray) / sizeof(BaseArray[0])) + { + return STATUS_INVALID_PARAMETER; + } + + /* Set the port to use */ + ComPortNumber = Value; + } + + /* Check if we got a baud rate */ + if (BaudString) + { + /* Move past the actual string, to reach the rate */ + BaudString += strlen("BAUDRATE"); + + /* Now get past any spaces */ + while (*BaudString == ' ') BaudString++; + + /* And make sure we have a rate */ + if (*BaudString) + { + /* Read and set it */ + Value = atol(BaudString + 1); + if (Value) ComPortBaudRate = Value; + } + } + + /* Check Serial Port Settings [IRQ] */ + if (IrqString) + { + /* Move past the actual string, to reach the rate */ + IrqString += strlen("IRQ"); + + /* Now get past any spaces */ + while (*IrqString == ' ') IrqString++; + + /* And make sure we have an IRQ */ + if (*IrqString) + { + /* Read and set it */ + Value = atol(IrqString + 1); + if (Value) KdDebugComPortIrq = Value; + } + } + } + + /* Initialize the port */ + return KdpPortInitialize(ComPortNumber, ComPortBaudRate); +} + +/****************************************************************************** + * \name KdDebuggerInitialize1 + * \brief Phase 1 initialization. + * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL. + * \return Status + */ +NTSTATUS +NTAPI +KdDebuggerInitialize1(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) +{ + return STATUS_SUCCESS; +} + + +VOID +NTAPI +KdpSendByte(_In_ UCHAR Byte) +{ + /* Send the byte */ + CpPutByte(&KdDebugComPort, Byte); +} + +KDSTATUS +NTAPI +KdpPollByte(OUT PUCHAR OutByte) +{ + /* Poll the byte */ + if (CpGetByte(&KdDebugComPort, OutByte, FALSE, FALSE) == CP_GET_SUCCESS) + { + return KdPacketReceived; + } + else + { + return KdPacketTimedOut; + } +} + +KDSTATUS +NTAPI +KdpReceiveByte(_Out_ PUCHAR OutByte) +{ + /* Get the byte */ + if (CpGetByte(&KdDebugComPort, OutByte, TRUE, FALSE) == CP_GET_SUCCESS) + { + return KdPacketReceived; + } + else + { + return KdPacketTimedOut; + } +} + +KDSTATUS +NTAPI +KdpPollBreakIn(VOID) +{ + KDSTATUS KdStatus; + UCHAR Byte; + + KdStatus = KdpPollByte(&Byte); + if (KdStatus == KdPacketReceived) + { + if (Byte == 0x03) + { + return KdPacketReceived; + } + else if (Byte == '$') + { + /* GDB tried to send a new packet. N-ack it. */ + KdpSendByte('-'); + } + } + return KdPacketTimedOut; +} + +/* EOF */ diff --git a/drivers/base/kdgdb/kdgdb.h b/drivers/base/kdgdb/kdgdb.h new file mode 100644 index 00000000000..37b55106039 --- /dev/null +++ b/drivers/base/kdgdb/kdgdb.h @@ -0,0 +1,56 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/kddll.h + * PURPOSE: Base definitions for the kernel debugger. + */ + +#ifndef _KDGDB_H_ +#define _KDGDB_H_ + +#define NOEXTAPI +#include +#include +#include +#include +#include +#include + +// #define KDDEBUG /* uncomment to enable debugging this dll */ + +#ifndef KDDEBUG +#define KDDBGPRINT(...) +#else +extern ULONG KdpDbgPrint(const char* Format, ...); +#define KDDBGPRINT KdpDbgPrint +#endif + +/* gdb_input.c */ +extern HANDLE gdb_dbg_thread; +KDSTATUS gdb_interpret_input(_Out_ DBGKD_MANIPULATE_STATE64* State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext); + +/* gdb_receive.c */ +extern CHAR gdb_input[]; +KDSTATUS NTAPI gdb_receive_packet(_Inout_ PKD_CONTEXT KdContext); +char hex_value(char ch); + +/* gdb_send.c */ +void send_gdb_packet(_In_ CHAR* Buffer); +void send_gdb_memory(_In_ VOID* Buffer, size_t Length); +void gdb_send_debug_io(_In_ PSTRING String); +void gdb_send_exception(void); + +/* kdcom.c */ +KDSTATUS NTAPI KdpPollBreakIn(VOID); +VOID NTAPI KdpSendByte(_In_ UCHAR Byte); +KDSTATUS NTAPI KdpReceiveByte(_Out_ PUCHAR OutByte); + +/* kdpacket.c */ +extern DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange; +extern DBGKD_GET_VERSION64 KdVersion; +extern KDDEBUGGER_DATA64* KdDebuggerDataBlock; + +/* arch_sup.c */ +void gdb_send_registers(void); + +#endif /* _KDGDB_H_ */ diff --git a/drivers/base/kdgdb/kdgdb.rc b/drivers/base/kdgdb/kdgdb.rc new file mode 100644 index 00000000000..d24a029c9ea --- /dev/null +++ b/drivers/base/kdgdb/kdgdb.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS GDB KDCOM wrapper DLL" +#define REACTOS_STR_INTERNAL_NAME "kdcom" +#define REACTOS_STR_ORIGINAL_FILENAME "kdcom.dll" +#include diff --git a/drivers/base/kdgdb/kdgdb.spec b/drivers/base/kdgdb/kdgdb.spec new file mode 100644 index 00000000000..4098dd6e2ad --- /dev/null +++ b/drivers/base/kdgdb/kdgdb.spec @@ -0,0 +1,8 @@ +@ stdcall KdD0Transition() +@ stdcall KdD3Transition() +@ stdcall KdDebuggerInitialize0(ptr) +@ stdcall KdDebuggerInitialize1(ptr) +@ stdcall KdReceivePacket(long ptr ptr ptr ptr) +@ stdcall KdRestore(long) +@ stdcall KdSave(long) +@ stdcall KdSendPacket(long ptr ptr ptr) diff --git a/drivers/base/kdgdb/kdpacket.c b/drivers/base/kdgdb/kdpacket.c new file mode 100644 index 00000000000..adcf15bb719 --- /dev/null +++ b/drivers/base/kdgdb/kdpacket.c @@ -0,0 +1,203 @@ +/* + * COPYRIGHT: GPL, see COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/base/kddll/kdpacket.c + * PURPOSE: Base functions for the kernel debugger. + */ + +#include "kdgdb.h" + +/* GLOBALS ********************************************************************/ + +DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange; +DBGKD_GET_VERSION64 KdVersion; +KDDEBUGGER_DATA64* KdDebuggerDataBlock; + +/* LOCALS *********************************************************************/ +static BOOLEAN FakeNextManipulatePacket = FALSE; +static DBGKD_MANIPULATE_STATE64 FakeManipulateState = {0}; + +/* PRIVATE FUNCTIONS **********************************************************/ +static +void +send_kd_state_change(DBGKD_ANY_WAIT_STATE_CHANGE* StateChange) +{ + static BOOLEAN first = TRUE; + + /* Save current state for later GDB queries */ + CurrentStateChange = *StateChange; + + if (first) + { + /* + * This is the first packet we receive. + * We take this as an opportunity to connect with GDB and to + * get the KD version block + */ + FakeNextManipulatePacket = TRUE; + FakeManipulateState.ApiNumber = DbgKdGetVersionApi; + FakeManipulateState.Processor = StateChange->Processor; + FakeManipulateState.ProcessorLevel = StateChange->ProcessorLevel; + FakeManipulateState.ReturnStatus = STATUS_SUCCESS; + + first = FALSE; + return; + } + + switch (StateChange->NewState) + { + case DbgKdLoadSymbolsStateChange: + { + /* We don't care about symbols loading */ + FakeNextManipulatePacket = TRUE; + FakeManipulateState.ApiNumber = DbgKdContinueApi; + FakeManipulateState.Processor = StateChange->Processor; + FakeManipulateState.ProcessorLevel = StateChange->ProcessorLevel; + FakeManipulateState.ReturnStatus = STATUS_SUCCESS; + FakeManipulateState.u.Continue.ContinueStatus = STATUS_SUCCESS; + break; + } + case DbgKdExceptionStateChange: + gdb_send_exception(); + break; + default: + /* FIXME */ + while (1); + } +} + +static +void +send_kd_debug_io( + _In_ DBGKD_DEBUG_IO* DebugIO, + _In_ PSTRING String) +{ + switch (DebugIO->ApiNumber) + { + case DbgKdPrintStringApi: + gdb_send_debug_io(String); + break; + default: + /* FIXME */ + while (1); + } +} + +static +void +send_kd_state_manipulate( + _In_ DBGKD_MANIPULATE_STATE64* State, + _In_ PSTRING MessageData) +{ + switch (State->ApiNumber) + { +#if 0 + case DbgKdGetContextApi: + /* This is an answer to a 'g' GDB request */ + gdb_send_registers((CONTEXT*)MessageData->Buffer); + return; +#endif + case DbgKdReadVirtualMemoryApi: + /* Answer to 'm' GDB request */ + send_gdb_memory(MessageData->Buffer, State->u.ReadMemory.ActualBytesRead); + break; + case DbgKdGetVersionApi: + { + LIST_ENTRY* DebuggerDataList; + /* Simply get a copy */ + RtlCopyMemory(&KdVersion, &State->u.GetVersion64, sizeof(KdVersion)); + DebuggerDataList = (LIST_ENTRY*)(ULONG_PTR)KdVersion.DebuggerDataList; + KdDebuggerDataBlock = CONTAINING_RECORD(DebuggerDataList->Flink, KDDEBUGGER_DATA64, Header.List); + return; + } + default: + /* FIXME */ + while (1); + } +} + +/* PUBLIC FUNCTIONS ***********************************************************/ + +/****************************************************************************** + * \name KdReceivePacket + * \brief Receive a packet from the KD port. + * \param [in] PacketType Describes the type of the packet to receive. + * This can be one of the PACKET_TYPE_ constants. + * \param [out] MessageHeader Pointer to a STRING structure for the header. + * \param [out] MessageData Pointer to a STRING structure for the data. + * \return KdPacketReceived if successful, KdPacketTimedOut if the receive + * timed out, KdPacketNeedsResend to signal that the last packet needs + * to be sent again. + * \note If PacketType is PACKET_TYPE_KD_POLL_BREAKIN, the function doesn't + * wait for any data, but returns KdPacketTimedOut instantly if no breakin + * packet byte is received. + * \sa http://www.nynaeve.net/?p=169 + */ +KDSTATUS +NTAPI +KdReceivePacket( + _In_ ULONG PacketType, + _Out_ PSTRING MessageHeader, + _Out_ PSTRING MessageData, + _Out_ PULONG DataLength, + _Inout_ PKD_CONTEXT KdContext) +{ + KDSTATUS Status; + DBGKD_MANIPULATE_STATE64* State; + + /* Special handling for breakin packet */ + if (PacketType == PACKET_TYPE_KD_POLL_BREAKIN) + { + return KdpPollBreakIn(); + } + + if (PacketType != PACKET_TYPE_KD_STATE_MANIPULATE) + { + /* What should we do ? */ + while (1); + } + + State = (DBGKD_MANIPULATE_STATE64*)MessageHeader->Buffer; + + if (FakeNextManipulatePacket) + { + FakeNextManipulatePacket = FALSE; + *State = FakeManipulateState; + return KdPacketReceived; + } + + /* Receive data from GDB */ + Status = gdb_receive_packet(KdContext); + if (Status != KdPacketReceived) + return Status; + + /* Interpret it */ + return gdb_interpret_input(State, MessageData, DataLength, KdContext); +} + +VOID +NTAPI +KdSendPacket( + IN ULONG PacketType, + IN PSTRING MessageHeader, + IN PSTRING MessageData, + IN OUT PKD_CONTEXT KdContext) +{ + switch (PacketType) + { + case PACKET_TYPE_KD_STATE_CHANGE64: + send_kd_state_change((DBGKD_ANY_WAIT_STATE_CHANGE*)MessageHeader->Buffer); + return; + case PACKET_TYPE_KD_DEBUG_IO: + send_kd_debug_io((DBGKD_DEBUG_IO*)MessageHeader->Buffer, MessageData); + break; + case PACKET_TYPE_KD_STATE_MANIPULATE: + send_kd_state_manipulate((DBGKD_MANIPULATE_STATE64*)MessageHeader->Buffer, MessageData); + break; + default: + /* FIXME */ + while (1); + } +} + +/* EOF */ diff --git a/drivers/bluetooth/fbtusb/CMakeLists.txt b/drivers/bluetooth/fbtusb/CMakeLists.txt index 5b8288f5c12..f3f9d190a53 100644 --- a/drivers/bluetooth/fbtusb/CMakeLists.txt +++ b/drivers/bluetooth/fbtusb/CMakeLists.txt @@ -12,8 +12,8 @@ list(APPEND SOURCE add_library(fbtusb SHARED ${SOURCE} fbtusb.rc) -if(NOT MSVC) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable") +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) + add_target_compile_flags(fbtusb "-Wno-unused-but-set-variable") endif() set_module_type(fbtusb kernelmodedriver) diff --git a/drivers/filesystems/cdfs/fsctl.c b/drivers/filesystems/cdfs/fsctl.c index 8504b0f8c22..5da9923e822 100644 --- a/drivers/filesystems/cdfs/fsctl.c +++ b/drivers/filesystems/cdfs/fsctl.c @@ -200,15 +200,7 @@ CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject, PVD_HEADER VdHeader; ULONG Size; ULONG Offset; - ULONG i; - struct - { - UCHAR Length[2]; - UCHAR FirstSession; - UCHAR LastSession; - TRACK_DATA TrackData; - } - Toc; + CDROM_TOC Toc; DPRINT("CdfsGetVolumeData\n"); @@ -219,7 +211,7 @@ CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject, Size = sizeof(Toc); Status = CdfsDeviceIoControl(DeviceObject, - IOCTL_CDROM_GET_LAST_SESSION, + IOCTL_CDROM_READ_TOC, NULL, 0, &Toc, @@ -231,13 +223,17 @@ CdfsGetVolumeData(PDEVICE_OBJECT DeviceObject, return Status; } - DPRINT("FirstSession %u, LastSession %u, FirstTrack %u\n", - Toc.FirstSession, Toc.LastSession, Toc.TrackData.TrackNumber); + DPRINT("FirstTrack %u, LastTrack %u, TrackNumber %u\n", + Toc.FirstTrack, Toc.LastTrack, Toc.TrackData[0].TrackNumber); - Offset = 0; - for (i = 0; i < 4; i++) + Offset = Toc.TrackData[0].Address[1] * 60 * 75; + Offset += Toc.TrackData[0].Address[2] * 75; + Offset += Toc.TrackData[0].Address[3]; + if (Offset >= 150) { - Offset = (Offset << 8) + Toc.TrackData.Address[i]; + /* Remove MSF numbering offset of first frame */ + /* FIXME: should be done only for real cdroms? */ + Offset -= 150; } CdInfo->VolumeOffset = Offset; diff --git a/drivers/filesystems/ext2/CMakeLists.txt b/drivers/filesystems/ext2/CMakeLists.txt index afb66a6a2ed..8e1f9529efe 100644 --- a/drivers/filesystems/ext2/CMakeLists.txt +++ b/drivers/filesystems/ext2/CMakeLists.txt @@ -24,8 +24,8 @@ list(APPEND SOURCE add_library(ext2fs SHARED ${SOURCE}) -if(NOT MSVC) - add_compile_flags("-Wno-unused-but-set-variable") +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) + add_target_compile_flags(ext2fs "-Wno-unused-but-set-variable") endif() target_link_libraries(ext2fs ${PSEH_LIB}) diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c index 52d485724ef..938467b5b3a 100644 --- a/drivers/filesystems/fastfat/fsctl.c +++ b/drivers/filesystems/fastfat/fsctl.c @@ -442,8 +442,7 @@ VfatMount( goto ByeBye; } - DeviceObject->Flags = DeviceObject->Flags | DO_DIRECT_IO; - DeviceExt = (PVOID) DeviceObject->DeviceExtension; + DeviceExt = DeviceObject->DeviceExtension; RtlZeroMemory(DeviceExt, ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize); DeviceExt->FcbHashTable = (HASHENTRY**)((ULONG_PTR)DeviceExt + ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(ULONG))); DeviceExt->HashTableSize = HashTableSize; diff --git a/drivers/storage/ide/uniata/CMakeLists.txt b/drivers/storage/ide/uniata/CMakeLists.txt index 2236e470c05..922d18e7a11 100644 --- a/drivers/storage/ide/uniata/CMakeLists.txt +++ b/drivers/storage/ide/uniata/CMakeLists.txt @@ -22,7 +22,10 @@ add_library(uniata SHARED ${SOURCE} idedma.rc) if(NOT MSVC) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable -Wno-narrowing") + add_target_compile_flags(uniata "-Wno-narrowing") + if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") + add_target_compile_flags(uniata "-Wno-unused-but-set-variable") + endif() endif() add_pch(uniata stdafx.h SOURCE) diff --git a/drivers/storage/ide/uniata/atapi.h b/drivers/storage/ide/uniata/atapi.h index f8c02ef9eaf..54adb5b765f 100644 --- a/drivers/storage/ide/uniata/atapi.h +++ b/drivers/storage/ide/uniata/atapi.h @@ -938,6 +938,7 @@ typedef struct _IDENTIFY_DATA { USHORT v30:1; USHORT Reserved:10; } SATA; + USHORT Flags; } TransportMajor; USHORT TransportMinor; // 223 diff --git a/drivers/storage/ide/uniata/bm_devs.h b/drivers/storage/ide/uniata/bm_devs.h index 3c11ffe9784..6f9563b3636 100644 --- a/drivers/storage/ide/uniata/bm_devs.h +++ b/drivers/storage/ide/uniata/bm_devs.h @@ -319,12 +319,13 @@ typedef struct _BUSMASTER_CONTROLLER_INFORMATION { #define ATA_M88SX6042 0x604211ab #define ATA_M88SX6081 0x608111ab #define ATA_M88SX7042 0x704211ab -#define ATA_M88SX6101 0x610111ab -#define ATA_M88SX6102 0x610211ab -#define ATA_M88SX6111 0x611111ab -#define ATA_M88SX6121 0x612111ab -#define ATA_M88SX6141 0x614111ab -#define ATA_M88SX6145 0x614511ab +#define ATA_M88SE6101 0x610111ab +#define ATA_M88SE6102 0x610211ab +#define ATA_M88SE6111 0x611111ab +#define ATA_M88SE6121 0x612111ab +#define ATA_M88SE6141 0x614111ab +#define ATA_M88SE6145 0x614511ab +#define ATA_M88SE9123 0x91231b4b #define ATA_MARVELL2_ID 0x1b4b #define ATA_MICRON_ID 0x1042 @@ -934,6 +935,7 @@ BUSMASTER_CONTROLLER_INFORMATION const BusMasterAdapters[] = { PCI_DEV_HW_SPEC_BM( 6121, 11ab, 0x00, ATA_UDMA6, "Marvell 88SX6121" , UNIATA_SATA | UNIATA_AHCI ), PCI_DEV_HW_SPEC_BM( 6141, 11ab, 0x00, ATA_UDMA6, "Marvell 88SX6141" , UNIATA_SATA | UNIATA_AHCI ), PCI_DEV_HW_SPEC_BM( 6145, 11ab, 0x00, ATA_UDMA6, "Marvell 88SX6145" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( 9123, 1b4b, 0x00, ATA_UDMA6, "Marvell 88SX9123" , UNIATA_SATA | UNIATA_AHCI ), /* PCI_DEV_HW_SPEC_BM( 91a4, 1b4b, 0x00, ATA_UDMA6, "Marvell 88SE912x" , 0 ),*/ PCI_DEV_HW_SPEC_BM( 01bc, 10de, 0x00, ATA_UDMA5, "nVidia nForce" , 0 ), @@ -1139,11 +1141,12 @@ BUSMASTER_CONTROLLER_INFORMATION const BusMasterAdapters[] = { */ PCI_DEV_HW_SPEC_BM( 5513, 1039, 0xc2, ATA_UDMA2, "SiS ATA-xxx" , 0 ), PCI_DEV_HW_SPEC_BM( 5513, 1039, 0x00, ATA_WDMA2, "SiS ATA-xxx" , 0 ), + PCI_DEV_HW_SPEC_BM( 5518, 1039, 0x00, ATA_UDMA6, "SiS 962/3" , SIS133NEW | SIS_BASE ), PCI_DEV_HW_SPEC_BM( 0601, 1039, 0x00, ATA_WDMA2, "SiS ATA-xxx" , 0 ), - PCI_DEV_HW_SPEC_BM( 1183, 1039, 0x00, ATA_UDMA6, "SiS PATA-1183" , SIS133NEW), - PCI_DEV_HW_SPEC_BM( 1182, 1039, 0x00, ATA_SA150, "SiS SATA 1182" , SISSATA | UNIATA_SATA), - PCI_DEV_HW_SPEC_BM( 0183, 1039, 0x00, ATA_SA150, "SiS SATA 183" , SISSATA | UNIATA_SATA), + PCI_DEV_HW_SPEC_BM( 1183, 1039, 0x00, ATA_SA150, "SiS 1183 SATA" , SISSATA), + PCI_DEV_HW_SPEC_BM( 1182, 1039, 0x00, ATA_SA150, "SiS 1182" , SISSATA | UNIATA_SATA), + PCI_DEV_HW_SPEC_BM( 0183, 1039, 0x00, ATA_SA150, "SiS 183 RAID" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0182, 1039, 0x00, ATA_SA150, "SiS SATA 182" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0181, 1039, 0x00, ATA_SA150, "SiS SATA 181" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0180, 1039, 0x00, ATA_SA150, "SiS SATA 180" , SISSATA | UNIATA_SATA), diff --git a/drivers/storage/ide/uniata/config.h b/drivers/storage/ide/uniata/config.h index d338bf01584..b59de064676 100644 --- a/drivers/storage/ide/uniata/config.h +++ b/drivers/storage/ide/uniata/config.h @@ -43,6 +43,7 @@ /***************************************/ //#define UNIATA_DUMP_ATAPI +#define UNIATA_DUMP_RW /***************************************/ // Optimization for uni-processor machines diff --git a/drivers/storage/ide/uniata/id_ata.cpp b/drivers/storage/ide/uniata/id_ata.cpp index fc3edfe180b..d58319d3110 100644 --- a/drivers/storage/ide/uniata/id_ata.cpp +++ b/drivers/storage/ide/uniata/id_ata.cpp @@ -1677,6 +1677,25 @@ IssueIdentify( ULONGLONG NativeNumOfSectors=0; ULONGLONG cylinders=0; ULONGLONG tmp_cylinders=0; + + KdPrint2((PRINT_PREFIX "PhysLogSectorSize %#x, %#x, offset %#x\n", + deviceExtension->FullIdentifyData.PhysLogSectorSize, + deviceExtension->FullIdentifyData.LargeSectorSize, + deviceExtension->FullIdentifyData.LogicalSectorOffset + )); + + KdPrint2((PRINT_PREFIX "NV PM_Sup %d, PM_En %d, En %d, PM ver %#x ver %#x\n", + deviceExtension->FullIdentifyData.NVCache_PM_Supported, + deviceExtension->FullIdentifyData.NVCache_PM_Enabled, + deviceExtension->FullIdentifyData.NVCache_Enabled, + deviceExtension->FullIdentifyData.NVCache_PM_Version, + deviceExtension->FullIdentifyData.NVCache_Version + )); + + KdPrint2((PRINT_PREFIX "R-rate %#x\n", + deviceExtension->FullIdentifyData.NominalMediaRotationRate + )); + // Read very-old-style drive geometry KdPrint2((PRINT_PREFIX "CHS %#x:%#x:%#x\n", deviceExtension->FullIdentifyData.NumberOfCylinders, @@ -2243,6 +2262,7 @@ AtapiResetController__( UniataAhciReset(HwDeviceExtension, j); } else { KdPrint2((PRINT_PREFIX " skip not implemented\n")); + continue; } } else { KdPrint2((PRINT_PREFIX " ATA path, chan %#x\n", chan)); @@ -5181,6 +5201,7 @@ continue_PIO: } else { + KdPrint2((PRINT_PREFIX "AtapiInterrupt: !DRQ, !BUSY, WordsLeft %#x\n", AtaReq->WordsLeft)); if (AtaReq->WordsLeft) { // Funky behaviour seen with PCI IDE (not all, just one). @@ -5568,7 +5589,7 @@ IntrPrepareResetController: } else if (interruptReason == (ATAPI_IR_IO_toHost | ATAPI_IR_COD_Cmd) && !(statusByte & IDE_STATUS_DRQ)) { KdPrint2((PRINT_PREFIX "AtapiInterrupt: interruptReason = CompleteRequest\n")); - // Command complete. We exactly know this because os IReason. + // Command complete. We exactly know this because of IReason. if(DmaTransfer) { KdPrint2((PRINT_PREFIX "AtapiInterrupt: CompleteRequest, was DmaTransfer\n")); @@ -5582,6 +5603,9 @@ IntrPrepareResetController: AtaReq->DataBuffer += wordCount; AtaReq->WordsLeft -= wordCount; AtaReq->WordsTransfered += wordCount; + + KdPrint2((PRINT_PREFIX "AtapiInterrupt: wordCount %#x, WordsTransfered %#x\n", wordCount, AtaReq->WordsTransfered)); + } //if (AtaReq->WordsLeft) { // status = SRB_STATUS_DATA_OVERRUN; @@ -6921,6 +6945,13 @@ AtapiSendCommand( case SCSIOP_WRITE16: // all right break; + case SCSIOP_READ_CD: + case SCSIOP_READ_CD_MSF: + if(deviceExtension->opt_AtapiDmaRawRead) { + // all right + break; + } + /* FALL THROUGH */ default: KdPrint2((PRINT_PREFIX "AtapiSendCommand: SRB_STATUS_BUSY\n")); return SRB_STATUS_BUSY; @@ -7100,6 +7131,7 @@ call_dma_setup: } break; case SCSIOP_READ_CD: + case SCSIOP_READ_CD_MSF: if(deviceExtension->opt_AtapiDmaRawRead) goto call_dma_setup; break; diff --git a/drivers/storage/ide/uniata/id_dma.cpp b/drivers/storage/ide/uniata/id_dma.cpp index 2f04ff488f0..800d02d0570 100644 --- a/drivers/storage/ide/uniata/id_dma.cpp +++ b/drivers/storage/ide/uniata/id_dma.cpp @@ -105,6 +105,7 @@ AtapiVirtToPhysAddr_( ULONG addr; ph_addr = MmGetPhysicalAddress(data); + KdPrint3((PRINT_PREFIX "AtapiVirtToPhysAddr_: %x -> %8.8x:%8.8x\n", data, ph_addr.HighPart, ph_addr.LowPart)); if(!ph_addru && ph_addr.HighPart) { // do so until we add 64bit address support // or some workaround diff --git a/drivers/storage/ide/uniata/id_init.cpp b/drivers/storage/ide/uniata/id_init.cpp index cb07c2915c2..6268c9623c5 100644 --- a/drivers/storage/ide/uniata/id_init.cpp +++ b/drivers/storage/ide/uniata/id_init.cpp @@ -355,9 +355,9 @@ unknown_dev: } static BUSMASTER_CONTROLLER_INFORMATION const SiSAdapters[] = { - PCI_DEV_HW_SPEC_BM( 1183, 1039, 0x00, ATA_UDMA6, "SiS 1183" , SIS133NEW), + PCI_DEV_HW_SPEC_BM( 1183, 1039, 0x00, ATA_SA150, "SiS 1183 IDE" , SIS133NEW), PCI_DEV_HW_SPEC_BM( 1182, 1039, 0x00, ATA_SA150, "SiS 1182" , SISSATA | UNIATA_SATA), - PCI_DEV_HW_SPEC_BM( 0183, 1039, 0x00, ATA_SA150, "SiS 183" , SISSATA | UNIATA_SATA), + PCI_DEV_HW_SPEC_BM( 0183, 1039, 0x00, ATA_SA150, "SiS 183 RAID" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0182, 1039, 0x00, ATA_SA150, "SiS 182" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0181, 1039, 0x00, ATA_SA150, "SiS 181" , SISSATA | UNIATA_SATA), PCI_DEV_HW_SPEC_BM( 0180, 1039, 0x00, ATA_SA150, "SiS 180" , SISSATA | UNIATA_SATA), @@ -376,7 +376,7 @@ unknown_dev: /* PCI_DEV_HW_SPEC_BM( 0640, 1039, 0x00, ATA_UDMA4, "SiS 640" , SIS_SOUTH ),*/ PCI_DEV_HW_SPEC_BM( 0635, 1039, 0x00, ATA_UDMA5, "SiS 635" , SIS100NEW ), PCI_DEV_HW_SPEC_BM( 0633, 1039, 0x00, ATA_UDMA5, "SiS 633" , SIS100NEW ), - PCI_DEV_HW_SPEC_BM( 0630, 1039, 0x00, ATA_UDMA5, "SiS 630S" , SIS100OLD ), + PCI_DEV_HW_SPEC_BM( 0630, 1039, 0x30, ATA_UDMA5, "SiS 630S" , SIS100OLD ), PCI_DEV_HW_SPEC_BM( 0630, 1039, 0x00, ATA_UDMA4, "SiS 630" , SIS66 ), PCI_DEV_HW_SPEC_BM( 0620, 1039, 0x00, ATA_UDMA4, "SiS 620" , SIS66 ), @@ -2390,6 +2390,9 @@ AtapiChipInit( break; } } + if(deviceExtension->HwFlags & UNIATA_SATA) { + // do nothing for SATA + } else if(ChipType == SIS133NEW) { USHORT tmp16; // check 80-pin cable diff --git a/drivers/storage/ide/uniata/id_sata.cpp b/drivers/storage/ide/uniata/id_sata.cpp index 9996852d55c..7d099e7e346 100644 --- a/drivers/storage/ide/uniata/id_sata.cpp +++ b/drivers/storage/ide/uniata/id_sata.cpp @@ -645,9 +645,7 @@ UniataAhciInit( PHW_CHANNEL chan; ULONG offs; ULONG BaseMemAddress; -#ifdef DBG ULONG PI; -#endif //DBG ULONG CAP; ULONG CAP2; ULONG BOHC; @@ -757,11 +755,12 @@ UniataAhciInit( if(CAP & AHCI_CAP_SAM) { KdPrint2((PRINT_PREFIX " AHCI legasy SATA\n")); } -#ifdef DBG + /* get the number of HW channels */ PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); + deviceExtension->AHCI_PI = PI; KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI)); -#endif //DBG + CAP2 = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP2); if(CAP2 & AHCI_CAP2_BOH) { KdPrint2((PRINT_PREFIX " retry BOHC\n")); @@ -977,18 +976,22 @@ UniataAhciDetect( max((CAP & AHCI_CAP_NOP_MASK)+1, n); KdPrint2((PRINT_PREFIX " CommandSlots %d\n", (CAP & AHCI_CAP_NCS_MASK)>>8 )); - KdPrint2((PRINT_PREFIX " Channels %d\n", n)); + KdPrint2((PRINT_PREFIX " Detected Channels %d / %d\n", NumberChannels, n)); switch(deviceExtension->DevID) { - case ATA_M88SX6111: + case ATA_M88SE6111: + KdPrint2((PRINT_PREFIX " Marvell M88SE6111 -> 1\n")); NumberChannels = 1; break; - case ATA_M88SX6121: - NumberChannels = 2; + case ATA_M88SE6121: + KdPrint2((PRINT_PREFIX " Marvell M88SE6121 -> 2\n")); + NumberChannels = min(NumberChannels, 2); break; - case ATA_M88SX6141: - case ATA_M88SX6145: - NumberChannels = 4; + case ATA_M88SE6141: + case ATA_M88SE6145: + case ATA_M88SE9123: + KdPrint2((PRINT_PREFIX " Marvell M88SE614x/9123 -> 4\n")); + NumberChannels = min(NumberChannels, 4); break; } // switch() @@ -997,6 +1000,7 @@ UniataAhciDetect( found = FALSE; goto exit_detect; } + KdPrint2((PRINT_PREFIX " Adjusted Channels %d\n", NumberChannels)); #ifdef DBG v_Mj = ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f); diff --git a/drivers/storage/ide/uniata/id_sata.h b/drivers/storage/ide/uniata/id_sata.h index aa6665278ba..016dbffaf6c 100644 --- a/drivers/storage/ide/uniata/id_sata.h +++ b/drivers/storage/ide/uniata/id_sata.h @@ -407,8 +407,18 @@ BuildAhciInternalSrb ( IN ULONG Length = 0 ); -#define UniataAhciChanImplemented(deviceExtension, c) \ - (((deviceExtension)->AHCI_PI) & (1 << c)) +__inline +BOOLEAN +UniataAhciChanImplemented( + IN PHW_DEVICE_EXTENSION deviceExtension, + IN ULONG c + ) +{ +#ifdef DBG + KdPrint2((PRINT_PREFIX "imp: %#x & %#x\n", (deviceExtension)->AHCI_PI, (1<AHCI_PI) & ((ULONG)1 << c)) ? TRUE : FALSE; +} // end UniataAhciChanImplemented() #endif //__UNIATA_SATA__H__ diff --git a/drivers/storage/ide/uniata/uniata_ver.h b/drivers/storage/ide/uniata/uniata_ver.h index 496c1d7d5d8..e3d79e5b6a9 100644 --- a/drivers/storage/ide/uniata/uniata_ver.h +++ b/drivers/storage/ide/uniata/uniata_ver.h @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "45a3" -#define UNIATA_VER_DOT 0.45.1.3 +#define UNIATA_VER_STR "45a8" +#define UNIATA_VER_DOT 0.45.1.8 #define UNIATA_VER_MJ 0 #define UNIATA_VER_MN 45 #define UNIATA_VER_SUB_MJ 1 -#define UNIATA_VER_SUB_MN 3 -#define UNIATA_VER_DOT_COMMA 0,45,1,3 -#define UNIATA_VER_DOT_STR "0.45.1.3" +#define UNIATA_VER_SUB_MN 8 +#define UNIATA_VER_DOT_COMMA 0,45,1,8 +#define UNIATA_VER_DOT_STR "0.45.1.8" #define UNIATA_VER_YEAR 2014 #define UNIATA_VER_YEAR_STR "2014" diff --git a/drivers/storage/scsiport/scsiport.c b/drivers/storage/scsiport/scsiport.c index 1671fc7c9a9..0db7e81bf31 100644 --- a/drivers/storage/scsiport/scsiport.c +++ b/drivers/storage/scsiport/scsiport.c @@ -5296,7 +5296,7 @@ SpiBuildDeviceMap (PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, - OBJ_CASE_INSENSITIVE | OBJ_OPENIF, + OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_KERNEL_HANDLE, 0, NULL); Status = ZwCreateKey(&ScsiKey, @@ -5323,7 +5323,7 @@ SpiBuildDeviceMap (PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, NameBuffer); InitializeObjectAttributes(&ObjectAttributes, &KeyName, - 0, + OBJ_KERNEL_HANDLE, ScsiKey, NULL); Status = ZwCreateKey(&ScsiPortKey, diff --git a/drivers/usb/usbhub/fdo.c b/drivers/usb/usbhub/fdo.c index 38e53b806f7..3e3cfafef02 100644 --- a/drivers/usb/usbhub/fdo.c +++ b/drivers/usb/usbhub/fdo.c @@ -1291,7 +1291,7 @@ CreateUsbChildDeviceObject( if (ConfigDesc.bNumInterfaces > 1) { - DPRINT1("Warning: Device has more that one interface. Only one interface (the first) is currently supported\n"); + DPRINT1("Warning: Device has more than one interface. Only one interface (the first) is currently supported\n"); } ConfigDescSize = ConfigDesc.wTotalLength; @@ -1328,7 +1328,7 @@ CreateUsbChildDeviceObject( //DumpFullConfigurationDescriptor(UsbChildExtension->FullConfigDesc); // - // Construct all the strings that will described the device to PNP + // Construct all the strings that will describe the device to PNP // Status = CreateDeviceIds(NewChildDeviceObject); if (!NT_SUCCESS(Status)) diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt index 965a08d1376..f11bad8f864 100644 --- a/hal/CMakeLists.txt +++ b/hal/CMakeLists.txt @@ -3,7 +3,7 @@ project(HAL) if((ARCH STREQUAL "i386") OR (ARCH STREQUAL "amd64")) add_subdirectory(halx86) elseif(ARCH STREQUAL "arm") -# add_subdirectory(halarm) + add_subdirectory(halarm) elseif(ARCH STREQUAL "powerpc") # add_subdirectory(halppc) endif() diff --git a/hal/halarm/CMakeLists.txt b/hal/halarm/CMakeLists.txt new file mode 100644 index 00000000000..c04c8246b90 --- /dev/null +++ b/hal/halarm/CMakeLists.txt @@ -0,0 +1,17 @@ + +spec2def(hal.dll ../hal.spec ADD_IMPORTLIB) + +add_definitions( + -D_NTHALDLL_ + -D_NTHAL_) + +include_directories( + include + ${REACTOS_SOURCE_DIR}/ntoskrnl/include) + +list(APPEND SOURCES + omap3/halinit_up.c + omap3/halup.rc) + +add_library(hal SHARED + ${SOURCES}) diff --git a/hal/halx86/legacy/bus/pci_classes.ids b/hal/halx86/legacy/bus/pci_classes.ids index ee2a157a7c9..e2c738d3dc9 100644 --- a/hal/halx86/legacy/bus/pci_classes.ids +++ b/hal/halx86/legacy/bus/pci_classes.ids @@ -1,12 +1,12 @@ # -# Extracted from the pci.ids database from http://pciids.sourceforge.net/ +# Extracted from the pci.ids database at http://pciids.sourceforge.net/ # # # List of PCI ID's # -# Version: 2013.07.20 -# Date: 2013-07-20 03:15:02 +# Version: 2014.08.30 +# Date: 2014-08-30 03:15:01 # # Maintained by Martin Mares and other volunteers from the # PCI ID Project at http://pci-ids.ucw.cz/. @@ -40,8 +40,12 @@ C 01 Mass storage controller 06 SATA controller 00 Vendor specific 01 AHCI 1.0 + 02 Serial Storage Bus 07 Serial Attached SCSI controller + 01 Serial Storage Bus 08 Non-Volatile memory controller + 01 NVMHCI + 02 NVM Express 80 Mass storage controller C 02 Network controller 00 Ethernet controller @@ -51,6 +55,7 @@ C 02 Network controller 04 ISDN controller 05 WorldFip controller 06 PICMG controller + 07 Infiniband controller 80 Network controller C 03 Display controller 00 VGA compatible controller @@ -128,6 +133,7 @@ C 08 Generic system peripheral 00 8254 01 ISA Timer 02 EISA Timers + 03 HPET 03 RTC 00 Generic 01 ISA RTC @@ -200,4 +206,7 @@ C 11 Signal processing controller 10 Communication synchronizer 20 Signal processing management 80 Signal processing controller +C 12 Processing accelerators + 00 Processing accelerators +C 13 Non-Essential Instrumentation C ff Unassigned class diff --git a/hal/halx86/legacy/bus/pci_vendors.ids b/hal/halx86/legacy/bus/pci_vendors.ids index f3bcc527aab..94a82a6c28a 100644 --- a/hal/halx86/legacy/bus/pci_vendors.ids +++ b/hal/halx86/legacy/bus/pci_vendors.ids @@ -1,12 +1,12 @@ # -# Extracted from the pci.ids database from http://pciids.sourceforge.net/ +# Extracted from the pci.ids database at http://pciids.sourceforge.net/ # # # List of PCI ID's # -# Version: 2013.07.20 -# Date: 2013-07-20 03:15:02 +# Version: 2014.08.30 +# Date: 2014-08-30 03:15:01 # # Maintained by Martin Mares and other volunteers from the # PCI ID Project at http://pci-ids.ucw.cz/. @@ -196,6 +196,7 @@ c000 Remote Insight Lights-Out Edition f130 NetFlex-3/P ThunderLAN 1.0 f150 NetFlex-3/P ThunderLAN 2.3 +0e55 HaSoTec GmbH 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. @@ -329,6 +330,7 @@ 1000 9291 MegaRAID SAS 9286CV-8e 1000 9295 MegaRAID SAS 9286CV-8eCC 1014 040b ServeRAID M5110 SAS/SATA Controller + 1014 040c ServeRAID M5120 SAS/SATA Controller 1014 0412 ServeRAID M5110e SAS/SATA Controller 1028 1f2d PERC H810 Adapter 1028 1f30 PERC H710 Embedded @@ -338,6 +340,8 @@ 1028 1f35 PERC H710 Adapter 1028 1f37 PERC H710 Mini (for blades) 1028 1f38 PERC H710 Mini (for monolithics) + 15d9 0690 LSI MegaRAID ROMB + 8086 3510 RMS25PB080 RAID Controller 8086 3513 RMS25CB080 RAID Controller 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] @@ -348,6 +352,11 @@ 1028 1f48 PERC H730P Mini (for blades) 1028 1f49 PERC H730 Mini 1028 1f4a PERC H730 Mini (for blades) + 1028 1f4d PERC FS33xS + 1028 1f4f PERC H730P Slim + 1028 1f54 PERC FS33xD + 17aa 1052 ThinkServer RAID 720i + 17aa 1053 ThinkServer RAID 720ix 005e SAS1066 PCI-X Fusion-MPT SAS 005f MegaRAID SAS-3 3008 [Fury] 1028 1f44 PERC H330 Adapter @@ -417,8 +426,11 @@ 1137 0073 2008 ROMB 1137 00b0 UCSC RAID SAS 2008M-8i 1137 00b1 UCSC RAID SAS 2008M-8i + 1137 00c2 UCS E-Series Double Wide + 1137 00c3 UCS E-Series Single Wide 15d9 0400 Supermicro SMC2008-iMR 1734 1177 RAID Ctrl SAS 6G 0/1 (D2607) + 17aa 1051 ThinkServer RAID 510i 8086 350d RMS2AF040 RAID Controller 8086 9240 RAID Controller RS2WC080 8086 9241 RAID Controller RS2WC040 @@ -479,6 +491,8 @@ 0095 SAS3108 PCI-Express Fusion-MPT SAS-3 0096 SAS3004 PCI-Express Fusion-MPT SAS-3 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 + 1028 1f45 12GB/s HBA internal + 1028 1f46 12GB/s HBA external 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -562,6 +576,7 @@ 1028 0533 PowerEdge Expandable RAID Controller 4/QC 8086 0520 MegaRAID RAID Controller SRCU41L 8086 0523 MegaRAID RAID Controller SRCS16 + 3050 SAS2008 PCI-Express Fusion-MPT SAS-2 6001 DX1 Multiformat Broadcast HD/SD Encoder/Decoder 1001 Kolter Electronic 0010 PCI 1616 Measurement card with 32 digital I/O lines @@ -579,22 +594,27 @@ 1305 Kaveri 1306 Kaveri 1307 Kaveri - 1309 Kaveri - 130a Kaveri - 130b Kaveri - 130c Kaveri - 130d Kaveri - 130e Kaveri - 130f Kaveri + 1308 Kaveri HDMI/DP Audio Controller + 1309 Kaveri [Radeon R6/R7 Graphics] + 130a Kaveri [Radeon R6 Graphics] + 130b Kaveri [Radeon R4 Graphics] + 130c Kaveri [Radeon R7 Graphics] + 130d Kaveri [Radeon R6 Graphics] + 130e Kaveri [Radeon R5 Graphics] + 130f Kaveri [Radeon R7 Graphics] 1310 Kaveri 1311 Kaveri - 1313 Kaveri + 1312 Kaveri + 1313 Kaveri [Radeon R7 Graphics] 1314 Wrestler HDMI Audio 174b 1001 PURE Fusion Mini - 1315 Kaveri - 1316 Kaveri - 131b Kaveri - 131c Kaveri + 1315 Kaveri [Radeon R5 Graphics] + 1316 Kaveri [Radeon R5 Graphics] + 1317 Kaveri + 1318 Kaveri [Radeon R5 Graphics] + 131b Kaveri [Radeon R4 Graphics] + 131c Kaveri [Radeon R7 Graphics] + 131d Kaveri [Radeon R6 Graphics] 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s 3150 RV380/M24 [Mobility Radeon X600] @@ -640,7 +660,7 @@ 4154 RV350 GL [FireGL T2] 4155 RV350 [Radeon 9600] 4157 RV350 GL [FireGL T2] - 4158 68800AX [Mach32] + 4158 68800AX [Graphics Ultra Pro PCI] 4164 R300 [Radeon 9500 PRO] (Secondary) 4165 R300 [Radeon 9700 PRO] (Secondary) 4166 R300 [Radeon 9700 PRO] (Secondary) @@ -935,7 +955,7 @@ 4753 Rage XC 1002 4753 Rage XC 4754 3D Rage II/II+ PCI [Mach64 GT] - 4755 3D Rage II+ PCI [Mach64 GTB] + 4755 Mach64 GTB [3D Rage II+ DVD] 4756 3D Rage IIC PCI [Mach64 GT IIC] 1002 4756 Rage IIC 4757 3D Rage IIC AGP @@ -1017,7 +1037,7 @@ 4c54 264LT [Mach64 LT] 4c57 RV200/M7 [Mobility Radeon 7500] 1014 0517 ThinkPad T30 - 1014 0530 ThinkPad T42 2373-4WU + 1014 0530 ThinkPad T4x Series 1028 00e6 Radeon Mobility M7 LW (Dell Inspiron 8100) 1028 012a Latitude C640 1043 1622 Mobility Radeon M7 (L3C/S) @@ -1419,42 +1439,63 @@ 5e6d RV410 [Radeon X700] (Secondary) 148c 2117 Bravo X700 (Secondary) 5f57 R423 [Radeon X800 XT] - 6600 Mars [Radeon HD 8670A/8750M] + 6600 Mars [Radeon HD 8670A/8670M/8750M] + 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] + 103c 2100 FirePro M4100 6602 Mars 6603 Mars + 6604 Opal XT [Radeon R7 M265] + 6605 Opal PRO [Radeon R7 M260] 6606 Mars XTX [Radeon HD 8790M] - 6607 Mars LE [Radeon HD 8530M] - 6610 Oland [Radeon HD 8600 Series] - 6611 Oland [Radeon HD 8570] - 6613 Oland [Radeon HD 8500 Series] + 6607 Mars LE [Radeon HD 8530M / R5 M240] + 6610 Oland XT [Radeon HD 8670 / R7 250] + 1019 0030 Radeon HD 8670 + 1028 2120 Radeon R7 250 + 1028 2322 Radeon R7 250 + 1462 2910 Radeon HD 8670 + 1462 2911 Radeon HD 8670 + 1642 3c81 Radeon HD 8670 + 1642 3c91 Radeon HD 8670 + 6611 Oland [Radeon HD 8570 / R7 240 OEM] + 1028 210b Radeon R5 240 OEM + 174b 4248 Radeon R7 240 OEM + 174b a240 Radeon R7 240 OEM + 1b0a 90d3 Radeon R7 240 OEM + 6613 Oland PRO [Radeon R7 240] + 1682 7240 R7 240 2048 MB 6620 Mars 6621 Mars PRO 6623 Mars 6631 Oland - 6640 Saturn [Radeon HD 8950] - 6641 Saturn PRO - 6649 Bonaire + 6640 Saturn XT [FirePro M6100] + 6641 Saturn PRO [Radeon HD 8930M] + 6646 Bonaire XT [Radeon R9 M280X] + 6647 Bonaire PRO [Radeon R9 M270X] + 6649 Bonaire [FirePro W5100] 6650 Bonaire 6651 Bonaire - 6658 Bonaire - 665c Bonaire XT [Radeon HD 7790/8770] + 6658 Bonaire XTX [Radeon R7 260X] + 665c Bonaire XT [Radeon HD 7790/8770 / R9 260 OEM] 1043 0452 Radeon HD 7790 DirectCU II OC # R7790-1GD5/OC 1462 2930 Radeon HD 7790 OC 1462 2932 Radeon HD 8770 + 1462 2934 Radeon R9 260 OEM + 148c 9260 Radeon R9 260 OEM # FX-779A-CDB4 / FX-779A-CDBC 1682 3310 Radeon HD 7790 Black Edition 2 GB # 100356OCL / 11210-01-20G 174b e253 Radeon HD 7790 Dual-X OC 1787 2329 Radeon HD 7790 TurboDuo - 665d Bonaire - 6660 Sun XT [Radeon HD 8670A] - 6663 Sun PRO [Radeon HD 8500M Series] - 6664 Sun [Radeon R5 M200 Series] - 6665 Sun [Radeon R5 M200 Series] - 6667 Sun [Radeon R5 M200 Series] - 666f Sun [Radeon HD 8500M] + 665d Bonaire [Radeon R7 200 Series] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M] + 6663 Sun PRO [Radeon HD 8570A/8570M] + 1025 0846 Radeon HD 8570A + 6664 Jet XT [Radeon R5 M240] + 6665 Jet PRO [Radeon R5 M230] + 6667 Jet ULT [Radeon R5 M230] + 666f Sun LE [Radeon HD 8550M / R5 M230] 6670 Hainan 6704 Cayman PRO GL [FirePro V7900] 6707 Cayman LE GL [FirePro V5900] @@ -1639,7 +1680,11 @@ 1462 6570 Turks [Radeon HD 6570] 148c 6570 Turks [Radeon HD 6570] 1682 6570 Turks [Radeon HD 6570] + 174b 5570 Turks [Radeon HD 5570] 174b 6570 Turks [Radeon HD 6570] + 174b 7570 Turks [Radeon HD 7570] + 174b 8510 Turks [Radeon HD 8510] + 174b 8570 Turks [Radeon HD 8570] 1787 6570 Turks [Radeon HD 6570] 17af 6570 Turks [Radeon HD 6570] 8086 2111 Radeon HD 6625M @@ -1670,13 +1715,16 @@ 1682 3300 Radeon HD 7670 174b 7670 Radeon HD 7670 174b e181 Radeon HD 6670 - 6759 Turks PRO [Radeon HD 6570/7570] + 1787 2309 Radeon HD 6670 + 6759 Turks PRO [Radeon HD 6570/7570/8550] 103c 3130 Radeon HD 6570 + 1043 0403 Radeon HD 6570 1462 2500 Radeon HD 6570 1462 2509 Radeon HD 7570 148c 7570 Radeon HD 7570 1642 3a67 Radeon HD 6570 1682 3280 Radeon HD 7570 + 1682 3530 Radeon HD 8550 174b 7570 Radeon HD 7570 174b e142 Radeon HD 6570 174b e181 Radeon HD 6570 @@ -1687,6 +1735,7 @@ 1b0a 909e Radeon HD 6570 1b0a 90b5 Radeon HD 7570 1b0a 90b6 Radeon HD 7570 + 675b Turks [Radeon HD 7600 Series] 675d Turks PRO [Radeon HD 7570] 675f Turks LE [Radeon HD 5570/6510/7510/8510] 148c 6510 Radeon HD 6510 @@ -1877,9 +1926,9 @@ 17aa 3629 Radeon HD 6450A 17aa 363c Radeon HD 6450A 17aa 3658 Radeon HD 7470A - 6771 Caicos XTX [Radeon HD 8490] + 6771 Caicos XTX [Radeon HD 8490 / R5 235X OEM] 6772 Caicos [Radeon HD 7450A] - 6778 Caicos XT [Radeon HD 7470/8470] + 6778 Caicos XT [Radeon HD 7470/8470 / R5 235 OEM] 1019 0024 Radeon HD 7470 1019 0027 Radeon HD 8470 1028 2120 Radeon HD 7470 @@ -1890,13 +1939,14 @@ 1642 3c75 Radeon HD 8470 174b 8145 Radeon HD 8470 174b e145 Radeon HD 7470 - 6779 Caicos [Radeon HD 6450/7450/8450] + 6779 Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] 1019 0016 Radeon HD 6450 1019 0017 Radeon HD 6450 1019 0018 Radeon HD 6450 1028 2120 Radeon HD 6450 103c 2128 Radeon HD 6450 103c 2aee Radeon HD 7450A + 1462 2125 Radeon HD 6450 1462 2346 Radeon HD 7450 1462 2490 Radeon HD 6450 1462 2494 Radeon HD 6450 @@ -1929,13 +1979,17 @@ 678a Tahiti PRO GL [FirePro Series] 1002 030c FirePro W8000 1002 0310 FirePro S9000 + 1002 0420 Radeon Sky 700 + 1002 0422 Radeon Sky 900 + 1002 0b0e FirePro S10000 Passive 1002 0b2a FirePro S10000 1028 030c FirePro W8000 6790 Tahiti 6791 Tahiti 6792 Tahiti - 6798 Tahiti XT [Radeon HD 7970] + 6798 Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] 1002 3000 Tahiti XT2 [Radeon HD 7970 GHz Edition] + 1002 3001 Tahiti XTL [Radeon R9 280X] 1002 4000 Radeon HD 8970 OEM 1043 041c HD 7970 DirectCU II 1043 0420 HD 7970 DirectCU II TOP @@ -1943,9 +1997,12 @@ 1043 0448 HD 7970 DirectCU II TOP 1043 044a Tahiti XT2 [Matrix HD 7970] 1043 044c Tahiti XT2 [Matrix HD 7970 Platinum] + 1043 3001 Tahiti XTL [ROG Matrix R9 280X] + 1043 3006 Tahiti XTL [Radeon R9 280X DirectCU II TOP] 1043 9999 ARES II 1092 3000 Tahiti XT2 [Radeon HD 7970 GHz Edition] 1458 2261 Tahiti XT2 [Radeon HD 7970 GHz Edition OC] + 1462 2774 MSI R7970 TF 3GD5/OC BE 1682 3211 Double D HD 7970 Black Edition # FX-797A-TNBC 1682 3213 HD 7970 Black Edition @@ -1955,7 +2012,7 @@ 1787 2317 Radeon HD 7990 1787 3000 Tahiti XT2 [Radeon HD 7970 GHz Edition] 6799 New Zealand [Radeon HD 7900 Series] - 679a Tahiti PRO [Radeon HD 7950] + 679a Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] 1002 0b01 Radeon HD 8950 OEM 1002 3000 Tahiti PRO2 [Radeon HD 7950 Boost] 1462 3000 Radeon HD 8950 OEM @@ -1963,30 +2020,36 @@ 1002 0b28 Radeon HD 8990 OEM 1002 0b2a Radeon HD 7990 1462 8036 Radeon HD 8990 OEM + 148c 8990 Radeon HD 8990 OEM 679e Tahiti LE [Radeon HD 7870 XT] 679f Tahiti - 67a0 Hawaii XT GL - 67a1 Hawaii GL + 67a0 Hawaii XT GL [FirePro W9100] + 67a1 Hawaii PRO GL [FirePro W8100] 67a2 Hawaii GL - 67b0 Hawaii XT [Radeon HD 8970] - 67b1 Hawaii PRO - 67b9 Vesuvius + 67a8 Hawaii + 67a9 Hawaii + 67aa Hawaii + 67b0 Hawaii XT [Radeon R9 290X] + 67b1 Hawaii PRO [Radeon R9 290] + 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M 8086 2110 Radeon HD 7970M 8086 2111 Radeon HD 7970M - 6801 Neptune [Radeon HD 8970M] + 6801 Neptune XT [Radeon HD 8970M] 1002 0124 Radeon HD 8970M + 1462 1117 Radeon R9 M290X 8086 2110 Radeon HD 8970M 8086 2111 Radeon HD 8970M 6802 Wimbledon 6806 Neptune 6808 Pitcairn XT GL [FirePro W7000] 1002 0310 FirePro S7000 + 1002 0420 Radeon Sky 500 6809 Pitcairn LE GL [FirePro W5000] - 6810 Pitcairn - 6811 Pitcairn + 6810 Curacao XT [Radeon R9 270X] + 6811 Curacao PRO [Radeon R9 270] 6816 Pitcairn 6817 Pitcairn 6818 Pitcairn XT [Radeon HD 7870 GHz Edition] @@ -1994,11 +2057,15 @@ 174b 8b04 Radeon HD 8860 6819 Pitcairn PRO [Radeon HD 7850] 174b e221 Radeon HD 7850 2GB GDDR5 DVI-I/DVI-D/HDMI/DP - 6820 Venus XTX [Radeon HD 8800M Series] + 6820 Venus XTX [Radeon HD 8890M / R9 M275X] 103c 1851 Radeon HD 7750M - 6821 Venus XT [Radeon HD 8800M Series] - 6822 Venus PRO - 6823 Venus PRO [Radeon HD 8800M Series] + 17aa 3801 Radeon R9 M275 + 6821 Venus XT [Radeon HD 8870M / R9 M270X] + 1002 031e FirePro SX4000 + 1028 05cc FirePro M5100 + 1028 15cc FirePro M5100 + 6822 Venus PRO [Radeon E8860] + 6823 Venus PRO [Radeon HD 8850M / R9 M265X] 6825 Heathrow XT [Radeon HD 7870M] 8086 2111 Chelsea PRO 6826 Chelsea LP [Radeon HD 7700M Series] @@ -2006,23 +2073,29 @@ 6828 Cape Verde PRO [FirePro W600] 6829 Cape Verde 682a Venus PRO - 682b Venus LE [Radeon HD 8800M Series] + 682b Venus LE [Radeon HD 8830M] 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] 103c 1851 Radeon HD 7750M 6830 Cape Verde [Radeon HD 7800M Series] 6831 Cape Verde [AMD Radeon HD 7700M Series] - 6835 Cape Verde PRX - 6837 Cape Verde LE [Radeon HD 7730] + 6835 Cape Verde PRX [Radeon R9 255 OEM] + 6837 Cape Verde LE [Radeon HD 7730/8730] + 1462 2796 Radeon HD 8730 + 1462 8092 Radeon HD 8730 + 148c 8730 Radeon HD 8730 1787 3000 Radeon HD 6570 6838 Cape Verde 6839 Cape Verde 683b Cape Verde [Radeon HD 7700 Series] - 683d Cape Verde XT [Radeon HD 7770 GHz Edition] + 683d Cape Verde XT [Radeon HD 7770/8760 / R7 250X] 1002 0030 Radeon HD 8760 OEM 1019 0030 Radeon HD 8760 OEM 103c 6890 Radeon HD 8760 OEM - 683f Cape Verde PRO [Radeon HD 7750] + 1043 8760 Radeon HD 8760 OEM + 1462 2710 R7770-PMD1GD5 + 174b 8304 Radeon HD 8760 OEM + 683f Cape Verde PRO [Radeon HD 7750 / R7 250E] 6840 Thames [Radeon HD 7500M/7600M Series] 1025 050e Radeon HD 7670M 1025 050f Radeon HD 7670M @@ -2515,6 +2588,7 @@ 103c 2aac Radeon HD 5450 103c 2aae Radeon HD 5450 103c 3580 Radeon HD 5450 + 1043 0386 Radeon HD 5450 1043 03c2 EAH5450 SILENT/DI/512MD2 (LP) 1462 2130 Radeon HD 5450 1462 2131 Radeon HD 5450 @@ -2568,7 +2642,7 @@ 17af 3012 Radeon HD 5490 17af 3013 Radeon HD 5470 17af 3014 Radeon HD 6350 - 68fa Cedar [Radeon HD 7350/8350] + 68fa Cedar [Radeon HD 7350/8350 / R5 220] 1019 0019 Radeon HD 7350 1019 0021 Radeon HD 7350 1019 0022 Radeon HD 7350 @@ -2582,6 +2656,9 @@ 1462 2495 Radeon HD 7350 1462 b490 Radeon HD 7350 1642 3985 Radeon HD 7350 + 174b 3510 Radeon HD 8350 + 174b 3521 Radeon R5 220 + 174b 3522 Radeon R5 220 174b 7350 Radeon HD 7350 174b 8153 Radeon HD 8350 174b e127 Radeon HD 7350 @@ -2589,7 +2666,15 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE + 6900 Topaz XT [Radeon R7 M260/M265] + 1028 0640 Radeon R7 M265 + 1179 f934 Radeon R7 M260 + 6901 Topaz PRO [Radeon R5 M255] 6920 Tonga + 6921 Amethyst XT [Radeon R9 M295X] + 692b Tonga XT GL [FirePro W8100] + 692f Tonga XT GL [FirePro W8100] + 6939 Tonga PRO [Radeon R9 285] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -2640,6 +2725,7 @@ 103c 30c1 6910p 718a RV516/M64 [Mobility Radeon X2300] 718b RV516/M62 [Mobility Radeon X1350] + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 718c RV516/M62-CSP64 [Mobility Radeon X1350] 718d RV516/M64-CSP128 [Mobility Radeon X1450] 7193 RV516 [Radeon X1550 Series] @@ -2777,7 +2863,7 @@ 9488 RV730/M96-XT [Mobility Radeon HD 4670] 9489 RV730/M96 GL [Mobility FireGL V5725] 9490 RV730 XT [Radeon HD 4670] - 174b e880 Radeon HD 4670 512MB DDR3 + 174b e880 Radeon HD 4670 512MB GDDR3 Dual DVI-I/TVO 9491 RV730/M96-CSP [Radeon E4690] 9495 RV730 [Radeon HD 4600 AGP Series] 1002 0028 Radeon HD 4650/4670 AGP @@ -2944,15 +3030,15 @@ 9808 Wrestler [Radeon HD 7340] 9809 Wrestler [Radeon HD 7310] 980a Wrestler [Radeon HD 7290] - 9830 Kabini [Radeon HD 8400] + 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] - 9836 Kabini [Radeon HD 8280] + 9836 Kabini [Radeon HD 8280 / R3 Series] 9837 Kabini [Radeon HD 8280E] - 9838 Kabini [Radeon HD 8240] + 9838 Kabini [Radeon HD 8240 / R3 Series] 9839 Kabini [Radeon HD 8180] 983a Kabini 983b Kabini @@ -2960,13 +3046,14 @@ 983d Temash [Radeon HD 8250/8280G] 983e Kabini 983f Kabini - 9850 Mullins [Radeon APU A6-6200 with R3 Graphics] - 9851 Mullins [Radeon APU A4-6000 with R2 Graphics] - 9852 Mullins [Radeon APU A4-6000 with R2 Graphics] - 9853 Mullins [Radeon APU E2-4000 with R2 Graphics] - 9854 Mullins [Radeon APU E2-3700 with R2 Graphics] - 9855 Mullins [Radeon APU XX-2450M with R3 Graphics] - 9856 Mullins [Radeon APU XX-2200M with R2 Graphics] + 9840 Kabini HDMI/DP Audio + 9850 Mullins [Radeon R3 Graphics] + 9851 Mullins [Radeon R4/R5 Graphics] + 9852 Mullins [Radeon R2 Graphics] + 9853 Mullins [Radeon R2 Graphics] + 9854 Mullins [Radeon R3 Graphics] + 9855 Mullins [Radeon R6 Graphics] + 9856 Mullins [Radeon R2 Graphics] 9857 Mullins [Radeon APU XX-2200M with R2 Graphics] 9858 Mullins 9859 Mullins @@ -2976,10 +3063,14 @@ 985d Mullins 985e Mullins 985f Mullins + 9900 Trinity [Radeon HD 7660G] # AMD A10-5800K CPU 9901 Trinity [Radeon HD 7660D] 9902 Trinity HDMI Audio Controller + 103c 194e ProBook 455 G1 Notebook 9903 Trinity [Radeon HD 7640G] + 103c 194e ProBook 455 G1 Notebook + 103c 1952 ProBook 455 G1 Notebook 9904 Trinity [Radeon HD 7560D] 9905 Trinity [FirePro A300 Series Graphics] 9906 Trinity [FirePro A300 Series Graphics] @@ -3010,7 +3101,8 @@ 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] 999c Richland - 999d Richland +# AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D + 999d Richland [Radeon HD 8550D] 99a0 Trinity [Radeon HD 7520G] 99a2 Trinity [Radeon HD 7420G] 99a4 Trinity [Radeon HD 7400G] @@ -3177,7 +3269,7 @@ 2646 0001 KNE100TX Fast Ethernet 000a 21230 Video Codec 000d PBXGB [TGA2] - 000f PCI-to-PDQ Interface Chip [PFI] + 000f DEFPA FDDI PCI-to-PDQ Interface Chip [PFI] 1011 def1 FDDI controller (DEFPA) 103c def1 FDDI controller (3X-DEFPA) 0014 DECchip 21041 [Tulip Pass 3] @@ -3210,6 +3302,7 @@ 1186 1101 DFE-500TX Fast Ethernet 1186 1102 DFE-500TX Fast Ethernet 1186 1112 DFE-570TX Quad Fast Ethernet + 11f0 4235 21143 [FASTLine-II UTP 10/100] 1259 2800 AT-2800Tx Fast Ethernet 1266 0004 Eagle Fast EtherMAX 12af 0019 NetFlyer Cardbus Fast Ethernet @@ -3265,6 +3358,7 @@ 00ac GD 5436 [Alpine] 00b0 GD 5440 00b8 GD 5446 + 1af4 1100 QEMU Virtual Machine 00bc GD 5480 1013 00bc CL-GD5480 00d0 GD 5462 @@ -3444,7 +3538,17 @@ 1014 035d PCIe3 1.8GB Cache RAID SAS Adapter Quad-port 6GB (57C8) 1014 035e PCIe2 3.6GB Cache 6Gb SAS RAID Adapter Quad-port (57CE) 1014 03fb PCIe3 28GB Cache RAID SAS Enclosure 6Gb x 16 (57D5) - 04aa Flash Adapter 900GB Full Height + 1014 03fe PCIe3 x8 Cache SAS RAID Internal Adapter 6Gb (57D8) + 1014 03ff PCIe3 x8 SAS RAID Internal Adapter 6Gb (57D7) + 1014 0474 PCIe3 x16 Cache SAS RAID Internal Adapter 6Gb (57EB) + 1014 0475 PCIe3 x16 SAS RAID Internal Adapter 6Gb (57EC) + 1014 0499 PCIe3 x16 Cache SAS RAID Internal Adapter 6Gb (57ED) + 1014 049a PCIe3 x16 SAS RAID Internal Adapter 6Gb (57EE) + 1014 04c7 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CCA) + 1014 04c8 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CD2) + 1014 0c49 PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CCD) + 044b GenWQE Accelerator Adapter + 04aa Flash Adapter 90 (PCIe2 0.9TB) 3022 QLA3022 Network Adapter 4022 QLA3022 Network Adapter ffff MPIC-2 interrupt controller @@ -3504,6 +3608,7 @@ 1028 0493 PowerEdge RAID Controller 3/DC 1028 0511 PowerEdge Cost Effective RAID Controller ATA100/4Ch 103c 60e7 NetRAID-1M + 103c 60e8 NetRaid 2M [AMI MegaRaid 493] 9010 MegaRAID 428 Ultra RAID Controller 9030 EIDE Controller 9031 EIDE Controller @@ -3546,6 +3651,15 @@ 1417 Family 15h (Models 10h-1fh) Processor Root Port 1418 Family 15h (Models 10h-1fh) Processor Root Port 1419 Family 15h (Models 10h-1fh) I/O Memory Management Unit + 141a Family 15h (Models 30h-3fh) Processor Function 0 + 141b Family 15h (Models 30h-3fh) Processor Function 1 + 141c Family 15h (Models 30h-3fh) Processor Function 2 + 141d Family 15h (Models 30h-3fh) Processor Function 3 + 141e Family 15h (Models 30h-3fh) Processor Function 4 + 141f Family 15h (Models 30h-3fh) Processor Function 5 + 1422 Family 15h (Models 30h-3fh) Processor Root Complex + 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit + 1426 Family 15h (Models 30h-3fh) Processor Root Port 1439 Family 16h Processor Functions 5:1 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini @@ -3612,6 +3726,7 @@ 1668 0299 ActionLink Home Network Adapter 2003 Am 1771 MBW [Alchemy] 2020 53c974 [PCscsi] + 1af4 1100 QEMU Virtual Machine 2040 79c974 2080 CS5536 [Geode companion] Host Bridge 2081 Geode LX Video @@ -3687,25 +3802,42 @@ 7800 FCH SATA Controller [IDE mode] 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook + 103c 194e ProBook 455 G1 Notebook 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] 7805 FCH SATA Controller [RAID mode] 7806 FCH SD Flash Controller 7807 FCH USB OHCI Controller + 103c 194e ProBook 455 G1 Notebook 7808 FCH USB EHCI Controller + 103c 194e ProBook 455 G1 Notebook 7809 FCH USB OHCI Controller + 103c 194e ProBook 455 G1 Notebook 780b FCH SMBus Controller + 103c 194e ProBook 455 G1 Notebook 780c FCH IDE Controller 780d FCH Azalia Controller + 103c 194e ProBook 455 G1 Notebook 1043 8444 F2A85-M Series 780e FCH LPC Bridge + 103c 194e ProBook 455 G1 Notebook 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller - 7900 CZ SATA Controller [IDE mode] - 790b CZ SMBus Controller + 103c 194e ProBook 455 G1 Notebook + 7900 FCH SATA Controller [IDE mode] + 7901 FCH SATA Controller [AHCI mode] + 7902 FCH SATA Controller [RAID mode] + 7903 FCH SATA Controller [RAID mode] + 7904 FCH SATA Controller [AHCI mode] + 7906 FCH SD Flash Controller + 7908 FCH USB EHCI Controller + 790b FCH SMBus Controller + 790e FCH LPC Bridge + 790f FCH PCI Bridge + 7914 FCH USB XHCI Controller 9600 RS780 Host Bridge 1043 82f1 M3A78-EH Motherboard 9601 RS880 Host Bridge @@ -4051,6 +4183,7 @@ 1028 028d PowerEdge T410 MGA G200eW WPCM450 1028 029c PowerEdge M710 MGA G200eW WPCM450 1028 02a4 PowerEdge T310 MGA G200eW WPCM450 + 15d9 0624 X9SCM-F Motherboard 15d9 a811 H8DGU 0533 MGA G200EH 103c 3381 iLO4 @@ -4082,6 +4215,8 @@ 110a 001e MGA-G100 AGP 2007 MGA Mistral 2527 Millennium G550 +# PCI\VEN_102B&DEV_2527&SUBSYS_0F42102B&REV_01 + 102b 0f42 Matrox G550 Low Profile PCI 102b 0f83 Millennium G550 102b 0f84 Millennium G550 Dual Head DDR 32Mb 102b 1e41 Millennium G550 @@ -4166,10 +4301,15 @@ 47c2 Solios COM port 4949 Radient frame grabber family 102b 0010 Radient eCL (Single-full) frame grabber + 102b 0011 Radient eCLV (Single-full) frame grabber 102b 0020 Radient eCL (Dual-base) frame grabber 102b 0030 Radient eCL (Dual-full) frame grabber 102b 0040 Radient eCL (Quad-base) frame grabber 102b 0050 Radient eCL (Golden) frame grabber + 102b 1010 Radient eV-CXP (quad CXP-6) frame grabber + 102b 1015 Radient eV-CXP (dual CXP-6) frame grabber + 102b 1020 Radient eV-CXP (quad CXP-3) frame grabber + 102b 1050 Radient eV-CXP (Golden) frame grabber 4cdc Morphis JPEG2000 accelerator 4f54 Morphis (e)Quad frame grabber 4fc5 Morphis (e)Dual frame grabber @@ -4298,6 +4438,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 8413 P8P67 Deluxe Motherboard + 1af4 1100 QEMU Virtual Machine 1b96 0001 USB 3.0 PCIe Card 01e7 uPD72873 [Firewarden] IEEE1394a OHCI 1.1 Link/2-port PHY Controller 01f2 uPD72874 [Firewarden] IEEE1394a OHCI 1.1 Link/3-port PHY Controller @@ -4318,6 +4459,7 @@ 000a PCI-to-PCI bridge 0016 SiS961/2/3 SMBus controller 0018 SiS85C503/5513 (LPC Bridge) + 0163 163 802.11b/g Wireless LAN Adapter 0180 RAID bus controller 180 SATA/PATA [SiS] 0181 SATA 0182 182 SATA/RAID Controller @@ -4558,6 +4700,25 @@ 3238 Smart Array E200i (SAS Controller) 103c 3211 Smart Array E200i 103c 3212 Smart Array E200 + 3239 Smart Array Gen9 Controllers + 103c 21bd Smart Array + 103c 21be Smart Array + 103c 21bf Smart Array + 103c 21c0 Smart Array + 103c 21c1 Smart Array + 103c 21c2 Smart Array + 103c 21c3 Smart Array + 103c 21c4 Smart Array + 103c 21c5 Smart Array + 103c 21c6 Smart Array + 103c 21c7 Smart Array + 103c 21c8 Smart Array + 103c 21c9 Smart Array + 103c 21ca Smart Array + 103c 21cb Smart Array + 103c 21cc Smart Array + 103c 21cd Smart Array + 103c 21ce Smart Array 323a Smart Array G6 controllers 103c 3241 Smart Array P212 103c 3243 Smart Array P410 @@ -4572,22 +4733,14 @@ 103c 3352 P421 103c 3354 P420i 103c 3355 P220i -# New Smart Array controllers for Gen8+ servers 323c Smart Array Gen8+ Controllers -# Add marketing names for Gen8+ Smart Array 103c 1920 P430i -# Add marketing names for Gen8+ Smart Array 103c 1921 P830i -# Add marketing names for Gen8+ Smart Array 103c 1922 P430 -# Add marketing names for Gen8+ Smart Array 103c 1923 P431 -# Add marketing names for Gen8+ Smart Array 103c 1924 P830 103c 1925 Smart Array -# Add marketing names for Gen8+ Smart Array 103c 1926 P731m -# Add marketing names for Gen8+ Smart Array 103c 1928 P230i 3300 Integrated Lights-Out Standard Virtual USB Controller 103c 3304 iLO2 @@ -4623,7 +4776,6 @@ 4031 zx2 I/O Controller 4037 PCIe Local Bus Adapter 403b PCIe Root Port - 60e8 NetRAID-2M : ZX1/M (OEM AMI MegaRAID 493) 103e Solliday Engineering 103f Synopsys/Logic Modeling Group 1040 Accelgraphics Inc. @@ -4635,6 +4787,7 @@ 3010 Samurai_1 3020 Samurai_IDE 1043 ASUSTeK Computer Inc. + 0464 Radeon R9 270x GPU 0675 ISDNLink P-IN100-ST-D 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) @@ -4727,6 +4880,8 @@ 0009 STG 1764X 0010 STG4000 [3D Prophet Kyro Series] 104a 4018 ST PowerVR Kyro (64MB AGP TVO) +# 64MB AGP + 1681 0010 PowerVR Kyro II [3D Prophet 4500] 1681 0028 3D Prophet 4000XT 1681 c010 3D Prophet 4500 TV-Out 1681 c069 3D Prophet 4000XT @@ -4816,8 +4971,9 @@ 8022 TSB43AB22 IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx] 104c 8023 TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link) 8023 TSB43AB22A IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx] + 1028 0168 Precision Workstation 670 Mainboard 103c 088c NC8000 laptop - 1043 808b K8N4-E Mainboard + 1043 808b K8N4/A8N Series Mainboard 1043 815b P5W DH Deluxe Motherboard 1443 8023 FireCard400 8086 5044 Desktop Board DP35DP @@ -5086,6 +5242,7 @@ 3020 FIVE-EX based Fibre Channel to PCIe HBA 302c M001 PCI Express Switch Upstream Port 302d M001 PCI Express Switch Downstream Port + 3070 Hitachi FIVE-FX Fibre Channel to PCIe HBA 3505 SH7751 PCI Controller (PCIC) 350e SH7751R PCI Controller (PCIC) 1055 Efar Microsystems @@ -5413,6 +5570,7 @@ 003b UniNorth/Intrepid ATA/100 003e KeyLargo/Intrepid Mac I/O 003f KeyLargo/Intrepid USB + 1af4 1100 QEMU Virtual Machine 0040 K2 KeyLargo USB 0041 K2 KeyLargo Mac/IO 0042 K2 FireWire @@ -5517,6 +5675,7 @@ 103c 12d7 4Gb Fibre Channel [AB379A] 103c 12dd 4Gb Fibre Channel [AB429A] 2432 ISP2432-based 4Gb Fibre Channel to PCI Express HBA + 103c 7040 FC1142SR 4Gb 1-port PCIe Fibre Channel Host Bus Adapter [HPAE311A] 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA 103c 3262 StorageWorks 81Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine @@ -5552,6 +5711,8 @@ 1077 0246 8300 Series Dual Port 10GbE Converged Network Adapter (TCP/IP Networking) 8031 8300 Series 10GbE Converged Network Adapter (FCoE) 8032 8300 Series 10GbE Converged Network Adapter (iSCSI) + 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) + 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) 1078 Cyrix Corporation 0000 5510 [Grappa] @@ -5616,7 +5777,7 @@ 108d Olicom 0001 Token-Ring 16/4 PCI Adapter (3136/3137) 0002 16/4 Token Ring - 0004 RapidFire 3139 Token-Ring 16/4 PCI Adapter + 0004 RapidFire OC-3139/3140 Token-Ring 16/4 PCI Adapter 108d 0004 OC-3139/3140 RapidFire Token-Ring 16/4 Adapter 0005 GoCard 3250 Token-Ring 16/4 CardBus PC Card 0006 OC-3530 RapidFire Token-Ring 100 @@ -5733,84 +5894,712 @@ 1093 National Instruments 0160 PCI-DIO-96 0162 PCI-MIO-16XE-50 - 1150 PCI-DIO-32HS High Speed Digital I/O Board + 1150 PCI-6533 (PCI-DIO-32HS) 1170 PCI-MIO-16XE-10 1180 PCI-MIO-16E-1 1190 PCI-MIO-16E-4 11b0 PXI-6070E - 11c0 PXI-6040e - 11d0 PXI-6030e - 1270 PCI-6032e + 11c0 PXI-6040E + 11d0 PXI-6030E + 1270 PCI-6032E + 1290 PCI-6704 + 12b0 PCI-6534 1310 PCI-6602 + 1320 PXI-6533 1330 PCI-6031E - 1340 PCI-6033e + 1340 PCI-6033E 1350 PCI-6071E 1360 PXI-6602 + 13c0 PXI-6508 + 1490 PXI-6534 14e0 PCI-6110 14f0 PCI-6111 1580 PXI-6031E 15b0 PXI-6071E 1710 PXI-6509 + 17c0 PXI-5690 17d0 PCI-6503 1870 PCI-6713 1880 PCI-6711 18b0 PCI-6052E 18c0 PXI-6052E + 1920 PXI-6704 + 1930 PCI-6040E + 19c0 PCI-4472 + 1aa0 PXI-4110 + 1ad0 PCI-6133 + 1ae0 PXI-6133 + 1e30 PCI-6624 + 1e40 PXI-6624 + 1e50 PXI-5404 2410 PCI-6733 2420 PXI-6733 2430 PCI-6731 + 2470 PCI-4474 + 24a0 PCI-4065 + 24b0 PXI-4200 + 24f0 PXI-4472 + 2510 PCI-4472 + 2520 PCI-4474 + 27a0 PCI-6123 + 27b0 PXI-6123 2880 DAQCard-6601 2890 PCI-6036E + 28a0 PXI-4461 + 28b0 PCI-6013 28c0 PCI-6014 + 28d0 PCI-5122 + 28e0 PXI-5122 + 29f0 PXI-7334 + 2a00 PXI-7344 2a60 PCI-6023E 2a70 PCI-6024E 2a80 PCI-6025E - 2ab0 PXI-6025e + 2ab0 PXI-6025E + 2b10 PXI-6527 + 2b20 PCI-6527 2b80 PXI-6713 2b90 PXI-6711 2c60 PCI-6601 2c70 PXI-6601 2c80 PCI-6035E + 2c90 PCI-6703 2ca0 PCI-6034E + 2cb0 PCI-7344 2cc0 PXI-6608 + 2d20 PXI-5600 2db0 PCI-6608 -# Low-Cost, High-Current, 96 Ch, 5 V TTL/CMOS Digital I/O + 2dc0 PCI-4070 + 2dd0 PXI-4070 + 2eb0 PXI-4472 + 2ec0 PXI-6115 + 2ed0 PCI-6115 + 2ee0 PXI-6120 + 2ef0 PCI-6120 + 2fd1 PCI-7334 + 2fd2 PCI-7350 + 2fd3 PCI-7342 + 2fd5 PXI-7350 + 2fd6 PXI-7342 + 7003 PCI-6551 + 7004 PXI-6551 + 700b PXI-5421 + 700c PCI-5421 + 7023 PXI-2593 + 702c PXI-7831R + 702d PCI-7831R + 702e PXI-7811R + 702f PCI-7811R + 7030 PCI-CAN (Series 2) + 7031 PCI-CAN/2 (Series 2) + 7032 PCI-CAN/LS (Series 2) + 7033 PCI-CAN/LS2 (Series 2) + 7034 PCI-CAN/DS (Series 2) + 7035 PXI-8460 (Series 2, 1 port) + 7036 PXI-8460 (Series 2, 2 ports) + 7037 PXI-8461 (Series 2, 1 port) + 7038 PXI-8461 (Series 2, 2 ports) + 7039 PXI-8462 (Series 2) + 703f PXI-2566 + 7040 PXI-2567 + 7044 MXI-4 Connection Monitor + 7047 PXI-6653 + 704c PXI-2530 + 704f PXI-4220 + 7050 PXI-4204 + 7055 PXI-7830R + 7056 PCI-7830R + 705a PCI-CAN/XS (Series 2) + 705b PCI-CAN/XS2 (Series 2) + 705c PXI-8464 (Series 2, 1 port) + 705d PXI-8464 (Series 2, 2 ports) + 705e cRIO-9102 + 7060 PXI-5610 + 7064 PXI-1045 Trigger Routing Module + 7065 PXI-6652 + 7066 PXI-6651 + 7067 PXI-2529 + 7068 PCI-CAN/SW (Series 2) + 7069 PCI-CAN/SW2 (Series 2) + 706a PXI-8463 (Series 2, 1 port) + 706b PXI-8463 (Series 2, 2 ports) + 7073 PCI-6723 + 7074 PXI-7833R + 7075 PXI-6552 + 7076 PCI-6552 + 707c PXI-1428 + 707e PXI-4462 + 7080 PXI-8430/2 (RS-232) Interface + 7081 PXI-8431/2 (RS-485) Interface + 7083 PCI-7833R 7085 PCI-6509 - 70a9 PCI-6528 (Digital I/O at 60V) + 7086 PXI-6528 + 7087 PCI-6515 + 7088 PCI-6514 + 708c PXI-2568 + 708d PXI-2569 + 70a9 PCI-6528 70aa PCI-6229 70ab PCI-6259 70ac PCI-6289 + 70ad PXI-6251 70ae PXI-6220 70af PCI-6221 70b0 PCI-6220 + 70b1 PXI-6229 + 70b2 PXI-6259 + 70b3 PXI-6289 70b4 PCI-6250 + 70b5 PXI-6221 70b6 PCI-6280 70b7 PCI-6254 - 70b8 PCI-6251 [M Series - High Speed Multifunction DAQ] + 70b8 PCI-6251 + 70b9 PXI-6250 + 70ba PXI-6254 + 70bb PXI-6280 70bc PCI-6284 70bd PCI-6281 + 70be PXI-6284 70bf PXI-6281 70c0 PCI-6143 + 70c3 PCI-6511 + 70c4 PXI-7330 + 70c5 PXI-7340 + 70c6 PCI-7330 + 70c7 PCI-7340 + 70c8 PCI-6513 + 70c9 PXI-6515 + 70ca PCI-1405 + 70cc PCI-6512 + 70cd PXI-6514 + 70ce PXI-1405 + 70cf PCIe-GPIB + 70d0 PXI-2570 + 70d1 PXI-6513 + 70d2 PXI-6512 + 70d3 PXI-6511 + 70d4 PCI-6722 + 70d6 PXI-4072 + 70d7 PXI-6541 + 70d8 PXI-6542 + 70d9 PCI-6541 + 70da PCI-6542 + 70db PCI-8430/2 (RS-232) Interface + 70dc PCI-8431/2 (RS-485) Interface + 70dd PXI-8430/4 (RS-232) Interface + 70de PXI-8431/4 (RS-485) Interface + 70df PCI-8430/4 (RS-232) Interface + 70e0 PCI-8431/4 (RS-485) Interface + 70e1 PXI-2532 + 70e2 PXI-8430/8 (RS-232) Interface + 70e3 PXI-8431/8 (RS-485) Interface + 70e4 PCI-8430/8 (RS-232) Interface + 70e5 PCI-8431/8 (RS-485) Interface + 70e6 PXI-8430/16 (RS-232) Interface + 70e7 PCI-8430/16 (RS-232) Interface + 70e8 PXI-8432/2 (Isolated RS-232) Interface + 70e9 PXI-8433/2 (Isolated RS-485) Interface + 70ea PCI-8432/2 (Isolated RS-232) Interface + 70eb PCI-8433/2 (Isolated RS-485) Interface + 70ec PXI-8432/4 (Isolated RS-232) Interface + 70ed PXI-8433/4 (Isolated RS-485) Interface + 70ee PCI-8432/4 (Isolated RS-232) Interface + 70ef PCI-8433/4 (Isolated RS-485) Interface + 70f0 PXI-5922 + 70f1 PCI-5922 70f2 PCI-6224 - 7144 PXI-5124 (12-bit 200 MS/s Digitizer) + 70f3 PXI-6224 + 70f6 cRIO-9101 + 70f7 cRIO-9103 + 70f8 cRIO-9104 + 70ff PXI-6723 + 7100 PXI-6722 + 7104 PCIx-1429 + 7105 PCIe-1429 + 710a PXI-4071 + 710d PXI-6143 + 710e PCIe-GPIB + 710f PXI-5422 + 7110 PCI-5422 + 7111 PXI-5441 + 7119 PXI-6561 + 711a PXI-6562 + 711b PCI-6561 + 711c PCI-6562 + 7120 PCI-7390 + 7121 PXI-5122EX + 7122 PCI-5122EX + 7123 PXIe-5653 + 7124 PCI-6510 + 7125 PCI-6516 + 7126 PCI-6517 + 7127 PCI-6518 + 7128 PCI-6519 + 7137 PXI-2575 + 713c PXI-2585 + 713d PXI-2586 + 7142 PXI-4224 + 7144 PXI-5124 + 7145 PCI-5124 + 7146 PCI-6132 + 7147 PXI-6132 + 7148 PCI-6122 + 7149 PXI-6122 + 714c PXI-5114 + 714d PCI-5114 + 7150 PXI-2564 + 7152 PCI-5640R + 7156 PXI-1044 Trigger Routing Module + 715d PCI-1426 + 7167 PXI-5412 + 7168 PCI-5412 + 716b PCI-6230 716c PCI-6225 - 717d PCIE-6251 + 716d PXI-6225 + 716f PCI-4461 + 7170 PCI-4462 + 7171 PCI-6010 + 7174 PXI-8360 + 7177 PXI-6230 + 717d PCIe-6251 717f PCIe-6259 - 71bc PCI-6221 (37pin) - 71d0 PXI-6143 - b001 IMAQ-PCI-1408 - b011 IMAQ-PXI-1408 - b021 IMAQ-PCI-1424 - b031 IMAQ-PCI-1413 - b041 IMAQ-PCI-1407 - b051 IMAQ-PXI-1407 - b061 IMAQ-PCI-1411 - b071 IMAQ-PCI-1422 - b081 IMAQ-PXI-1422 - b091 IMAQ-PXI-1411 - c4c4 PXIe-4353 + 7187 PCI-1410 + 718b PCI-6521 + 718c PXI-6521 + 7191 PCI-6154 + 7193 PXI-7813R + 7194 PCI-7813R + 7195 PCI-8254R + 7197 PXI-5402 + 7198 PCI-5402 + 719f PCIe-6535 + 71a0 PCIe-6536 + 71a3 PXI-5650 + 71a4 PXI-5652 + 71a5 PXI-2594 + 71a7 PXI-2595 + 71a9 PXI-2596 + 71aa PXI-2597 + 71ab PXI-2598 + 71ac PXI-2599 + 71ad PCI-GPIB+ + 71ae PCIe-1430 + 71b7 PXI-1056 Trigger Routing Module + 71b8 PXI-1045 Trigger Routing Module + 71b9 PXI-1044 Trigger Routing Module + 71bb PXI-2584 + 71bc PCI-6221 (37-pin) + 71bf PCIe-1427 + 71c5 PCI-6520 + 71c6 PXI-2576 + 71c7 cRIO-9072 + 71dc PCI-1588 + 71e0 PCI-6255 + 71e1 PXI-6255 + 71e2 PXI-5406 + 71e3 PCI-5406 + 71fc PXI-4022 + 7209 PCI-6233 + 720a PXI-6233 + 720b PCI-6238 + 720c PXI-6238 + 7260 PXI-5142 + 7261 PCI-5142 + 726d PXI-5651 + 7273 PXI-4461 + 7274 PXI-4462 + 7279 PCI-6232 + 727a PXI-6232 + 727b PCI-6239 + 727c PXI-6239 + 727e SMBus Controller + 1093 75ac PXIe-8388 + 1093 75ad PXIe-8389 + 1093 7650 PXIe-8381 + 1093 8360 PXIe-8360 + 1093 8370 PXIe-8370 + 1093 8375 PXIe-8375 + 7281 PCI-6236 + 7282 PXI-6236 + 7283 PXI-2554 + 7288 PXIe-5611 + 7293 PCIe-8255R + 729d cRIO-9074 + 72a4 PCIe-4065 + 72a7 PCIe-6537 + 72a8 PXI-5152 + 72a9 PCI-5152 + 72aa PXI-5105 + 72ab PCI-5105 + 72b8 PXI-6682 + 72d0 PXI-2545 + 72d1 PXI-2546 + 72d2 PXI-2547 + 72d3 PXI-2548 + 72d4 PXI-2549 + 72d5 PXI-2555 + 72d6 PXI-2556 + 72d7 PXI-2557 + 72d8 PXI-2558 + 72d9 PXI-2559 + 72e8 PXIe-6251 + 72e9 PXIe-6259 + 72ef PXI-4498 + 72f0 PXI-4496 + 72fb PXIe-6672 + 730e PXI-4130 + 730f PXI-5922EX + 7310 PCI-5922EX + 731c PXI-2535 + 731d PXI-2536 + 7322 PXIe-6124 + 7327 PXI-6529 + 7331 PXIe-5602 + 7332 PXIe-5601 + 7333 PXI-5900 + 7335 PXI-2533 + 7336 PXI-2534 + 7342 PXI-4461 + 7349 PXI-5154 + 734a PCI-5154 + 7357 PXI-4065 + 7359 PXI-4495 + 7370 PXI-4461 + 7373 sbRIO-9601 + 7374 IOtech-9601 + 7375 sbRIO-9602 + 7378 sbRIO-9641 + 737d PXI-5124EX + 7384 PXI-7851R + 7385 PXI-7852R + 7386 PCIe-7851R + 7387 PCIe-7852R + 7390 PXI-7841R + 7391 PXI-7842R + 7392 PXI-7853R + 7393 PCIe-7841R + 7394 PCIe-7842R + 7397 sbRIO-9611 + 7398 sbRIO-9612 + 7399 sbRIO-9631 + 739a sbRIO-9632 + 739b sbRIO-9642 + 73a1 PXIe-4498 + 73a2 PXIe-4496 + 73a5 PXIe-5641R + 73a7 PXI-8250 Chassis Monitor Module + 73a8 PXI-8511 CAN/LS + 73a9 PXI-8511 CAN/LS + 73aa PXI-8512 CAN/HS + 73ab PXI-8512 CAN/HS + 73ac PXI-8513 CAN/XS + 73ad PXI-8513 CAN/XS + 73af PXI-8516 LIN + 73b1 PXI-8517 FlexRay + 73b2 PXI-8531 CANopen + 73b3 PXI-8531 CANopen + 73b4 PXI-8532 DeviceNet + 73b5 PXI-8532 DeviceNet + 73b6 PCI-8511 CAN/LS + 73b7 PCI-8511 CAN/LS + 73b8 PCI-8512 CAN/HS + 73b9 PCI-8512 CAN/HS + 73ba PCI-8513 CAN/XS + 73bb PCI-8513 CAN/XS + 73bd PCI-8516 LIN + 73bf PCI-8517 FlexRay + 73c0 PCI-8531 CANopen + 73c1 PCI-8531 CANopen + 73c2 PCI-8532 DeviceNet + 73c3 PCI-8532 DeviceNet + 73c5 PXIe-2527 + 73c6 PXIe-2529 + 73c8 PXIe-2530 + 73c9 PXIe-2532 + 73ca PXIe-2569 + 73cb PXIe-2575 + 73cc PXIe-2593 + 73d5 PXI-7951R + 73d6 PXI-7952R + 73d7 PXI-7953R + 73e1 PXI-7854R + 73ec PXI-7954R + 73ed cRIO-9073 + 73f0 PXI-5153 + 73f1 PCI-5153 + 73f4 PXI-2515 + 73f6 cRIO-9111 + 73f7 cRIO-9112 + 73f8 cRIO-9113 + 73f9 cRIO-9114 + 73fa cRIO-9116 + 73fb cRIO-9118 + 7404 PXI-4132 + 7405 PXIe-6674T + 7406 PXIe-6674 + 740e PCIe-8430/16 (RS-232) Interface + 740f PCIe-8430/8 (RS-232) Interface + 7410 PCIe-8431/16 (RS-485) Interface + 7411 PCIe-8431/8 (RS-485) Interface + 7414 PCIe-GPIB+ + 741c PXI-5691 + 741d PXI-5695 + 743c CSC-3059 + 7448 PXI-2510 + 7454 PXI-2512 + 7455 PXI-2514 + 7456 PXIe-2512 + 7457 PXIe-2514 + 745a PXI-6682H + 745e PXI-5153EX + 745f PCI-5153EX + 7460 PXI-5154EX + 7461 PCI-5154EX + 746d PXIe-5650 + 746e PXIe-5651 + 746f PXIe-5652 + 7472 PXI-2800 + 7495 PXIe-5603 + 7497 PXIe-5605 + 74ae PXIe-2515 + 74b4 PXI-2531 + 74b5 PXIe-2531 + 74c1 PXIe-8430/16 (RS-232) Interface + 74c2 PXIe-8430/8 (RS-232) Interface + 74c3 PXIe-8431/16 (RS-485) Interface + 74c4 PXIe-8431/8 (RS-485) Interface + 74d5 PXIe-5630 + 74d9 PCIe-8432/2 (Isolated RS-232) Interface + 74da PCIe-8433/2 (Isolated RS-485) Interface + 74db PCIe-8432/4 (Isolated RS-232) Interface + 74dc PCIe-8433/4 (Isolated RS-485) Interface + 74e8 NI 9148 + 7515 PCIe-8430/2 (RS-232) Interface + 7516 PCIe-8430/4 (RS-232) Interface + 7517 PCIe-8431/2 (RS-485) Interface + 7518 PCIe-8431/4 (RS-485) Interface + 751b cRIO-9081 + 751c cRIO-9082 + 7528 PXIe-4497 + 7529 PXIe-4499 + 752a PXIe-4492 + 7539 NI 9157 + 753a NI 9159 + 7598 PXI-2571 + 75a4 PXI-4131A + 75b1 PCIe-7854R + 75ba PXI-2543 + 75bb PXIe-2543 + 75e5 PXI-6683 + 75e6 PXI-6683H + 75ef PXIe-5632 + 761f PXI-2540 + 7620 PXIe-2540 + 7621 PXI-2541 + 7622 PXIe-2541 + 7626 NI 9154 + 7627 NI 9155 + 7638 PXI-2720 + 7639 PXI-2722 + 763a PXIe-2725 + 763b PXIe-2727 + 763c PXI-4465 + 764b PXIe-2790 + 764c PXI-2520 + 764d PXI-2521 + 764e PXI-2522 + 764f PXI-2523 + 7654 PXI-2796 + 7655 PXI-2797 + 7656 PXI-2798 + 7657 PXI-2799 + 765d PXI-2542 + 765e PXIe-2542 + 765f PXI-2544 + 7660 PXIe-2544 + 766d PCIe-6535B + 766e PCIe-6536B + 766f PCIe-6537B + 76a3 PXIe-6535B + 76a4 PXIe-6536B + 76a5 PXIe-6537B + 9020 PXI-2501 + 9030 PXI-2503 + 9040 PXI-2527 + 9050 PXI-2565 + 9060 PXI-2590 + 9070 PXI-2591 + 9080 PXI-2580 + 9090 PCI-4021 + 90a0 PXI-4021 + b001 PCI-1408 + b011 PXI-1408 + b021 PCI-1424 + b022 PXI-1424 + b031 PCI-1413 + b041 PCI-1407 + b051 PXI-1407 + b061 PCI-1411 + b071 PCI-1422 + b081 PXI-1422 + b091 PXI-1411 + b0b1 PCI-1409 + b0c1 PXI-1409 + b0e1 PCI-1428 + c4c4 PXIe/PCIe Device + 1093 728a PXIe-5421 + 1093 728b PXIe-5442 + 1093 728d PXIe-5451 + 1093 72a2 PXIe-5122 + 1093 72da PXIe-5422 + 1093 72f7 PXIe-6535 + 1093 72f8 PXIe-6536 + 1093 72f9 PXIe-6537 + 1093 7326 PCIe-6509 + 1093 736c PXIe-4140 + 1093 738b PXIe-5622 + 1093 73c4 PXIe-5450 + 1093 73c7 PXIe-6545 + 1093 73d4 PXIe-6544 + 1093 7425 PCIe-6320 + 1093 7427 PCIe-6321 + 1093 7428 PXIe-6323 + 1093 7429 PCIe-6323 + 1093 742a PXIe-6341 + 1093 742b PCIe-6341 + 1093 742c PXIe-6343 + 1093 742d PCIe-6343 + 1093 742f PCIe-6351 + 1093 7431 PCIe-6353 + 1093 7432 PXIe-6361 + 1093 7433 PCIe-6361 + 1093 7434 PXIe-6363 + 1093 7435 PCIe-6363 + 1093 7436 PXIe-6356 + 1093 7437 PXIe-6358 + 1093 7438 PXIe-6366 + 1093 7439 PXIe-6368 + 1093 7468 PXIe-5185 + 1093 7469 PXIe-5186 + 1093 7492 PXIe-4300 + 1093 7498 PXIe-6548 + 1093 7499 PXIe-6547 + 1093 74a8 PXIe-4330 + 1093 74a9 PXIe-4331 + 1093 74b1 PXIe-4154 + 1093 74b2 PXIe-4353 + 1093 74b6 PCIe-1433 + 1093 74cd PXIe-5643R + 1093 74d0 PXIe-7961R + 1093 74dd PXIe-6376 + 1093 74de PXIe-6378 + 1093 74e2 PXIe-7962R + 1093 74e3 PXIe-7965R + 1093 74e5 PXIe-4844 + 1093 74f3 PCIe-5140 + 1093 753c PXIe-1435 + 1093 7548 PXIe-5622 (25MHz DDC) + 1093 754d PCIe-5155 + 1093 7551 PXIe-6556 + 1093 7553 PCIe-1473R + 1093 7570 PCIe-1474R + 1093 7571 PXIe-1475R + 1093 7572 PXIe-1476R + 1093 75a2 PXIe-5693 + 1093 75a3 PXIe-5694 + 1093 75a5 PXIe-4141 + 1093 75ce PXIe-7966R + 1093 75cf PXIe-4357 + 1093 75d2 PXIe-RevB-5643R + 1093 75d3 PXIe-5644R + 1093 75ee PXIe-5645R + 1093 7613 PXIe-6555 + 1093 7619 PXIe-5185 + 1093 761a PXIe-5186 + 1093 7629 PXIe-4142 + 1093 762a PXIe-4143 + 1093 762b PXIe-4138 + 1093 762c PXIe-4144 + 1093 762d PXIe-4145 + 1093 7644 PXIe-4841 + 1093 7658 PXIe-5162 (4CH) + 1093 76ab PXIe-4322 + 1093 76ad PXIe-4112 + 1093 76ae PXIe-4113 + 1093 76b5 PXIe-7971R + 1093 76b6 PXIe-7972R + 1093 76b7 PXIe-7975R + 1093 76c8 PXIe-6614 + 1093 76c9 PXIe-6612 + 1093 76cb PXIe-5646R + 1093 76cc PXIe-5162 (2CH) + 1093 76d0 PXIe-5160 (2CH) + 1093 76d1 PXIe-5160 (4CH) + 1093 76dc PXIe-4610 + 1093 76fb PCIe-1473R-LX110 + 1093 76fe PXIe-5644R + 1093 76ff PXIe-5644R + 1093 7700 PXIe-5644R + 1093 7701 PXIe-5645R + 1093 7702 PXIe-5645R + 1093 7703 PXIe-5645R + 1093 770c PXIe-4139 + 1093 7711 PXIe-4464 + 1093 7716 PCIe-6612 + 1093 771e PXIe-4339 + 1093 7735 cRIO-9033 + 1093 774b cRIO-9031 + 1093 774d cRIO-9034 + 1093 7755 cRIO-9030 + 1093 7777 PXIe-7976R + 1093 7782 PXIe-5646R + 1093 7783 PXIe-5646R + 1093 7784 PXIe-5646R + 1093 77a5 PXIe-6345 + 1093 77a6 PXIe-6355 + 1093 77a7 PXIe-6365 + 1093 77a8 PXIe-6375 + 1093 77b4 PXIe-7820R + 1093 77b5 PXIe-7821R + 1093 77b6 PXIe-7822R + 1093 77b9 cRIO-9038 c801 PCI-GPIB - c831 PCI-GPIB bridge + c811 PCI-GPIB+ + c821 PXI-GPIB + c831 PMC-GPIB + c840 PCI-GPIB + d130 PCI-232/2 Interface + d140 PCI-232/4 Interface + d150 PCI-232/8 Interface + d160 PCI-485/2 Interface + d170 PCI-485/4 Interface + d190 PXI-8422/2 (Isolated RS-232) Interface + d1a0 PXI-8422/4 (Isolated RS-232) Interface + d1b0 PXI-8423/2 (Isolated RS-485) Interface + d1c0 PXI-8423/4 (Isolated RS-485) Interface + d1d0 PXI-8420/2 (RS-232) Interface + d1e0 PXI-8420/4 (RS-232) Interface + d1f0 PXI-8420/8 (RS-232) Interface + d1f1 PXI-8420/16 (RS-232) Interface + d230 PXI-8421/2 (RS-485) Interface + d240 PXI-8421/4 (RS-485) Interface + d250 PCI-232/2 (Isolated) Interface + d260 PCI-485/2 (Isolated) Interface + d270 PCI-232/4 (Isolated) Interface + d280 PCI-485/4 (Isolated) Interface + d290 PCI-485/8 Interface + d2a0 PXI-8421/8 (RS-485) Interface + d2b0 PCI-232/16 Interface + e111 PCI-CAN + e131 PXI-8461 (1 port) + e141 PCI-CAN/LS + e151 PXI-8460 (1 port) + e211 PCI-CAN/2 + e231 PXI-8461 (2 ports) + e241 PCI-CAN/LS2 + e251 PXI-8460 (2 ports) + e261 PCI-CAN/DS + e271 PXI-8462 1094 First International Computers [FIC] # nee CMD Technology Inc 1095 Silicon Image, Inc. @@ -5837,6 +6626,7 @@ 1095 6112 SiI 3112 SATARaid Controller 9005 0250 SATAConnect 1205SA Host Controller 3114 SiI 3114 [SATALink/SATARaid] Serial ATA Controller + 1043 8167 A8N-SLI Deluxe/Premium Mainboard 1095 3114 SiI 3114 SATALink Controller 1095 6114 SiI 3114 SATARaid Controller 3124 SiI 3124 PCI-X Serial ATA Controller @@ -5846,6 +6636,7 @@ 1095 3512 SiI 3512 SATALink Controller 1095 6512 SiI 3512 SATARaid Controller 3531 SiI 3531 [SATALink/SATARaid] Serial ATA Controller + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 1096 Alacron 1097 Appian Technology 1098 Quantum Designs (H.K.) Ltd @@ -5893,6 +6684,38 @@ 1852 1852 FlyVideo'98 - Video (with FM Tuner) 18ac d500 DViCO FusionHDTV5 Lite 270f fc00 Digitop DTT-1000 +# Vendor/ID appear to be randomly chosen + aa00 1460 Spectra8 CardA Input0 +# Vendor/ID appear to be randomly chosen + aa01 1461 Spectra8 CardA Input1 +# Vendor/ID appear to be randomly chosen + aa02 1462 Spectra8 CardA Input2 +# Vendor/ID appear to be randomly chosen + aa03 1463 Spectra8 CardA Input3 +# Vendor/ID appear to be randomly chosen + aa04 1464 Spectra8 CardB Input0 +# Vendor/ID appear to be randomly chosen + aa05 1465 Spectra8 CardB Input1 +# Vendor/ID appear to be randomly chosen + aa06 1466 Spectra8 CardB Input2 +# Vendor/ID appear to be randomly chosen + aa07 1467 Spectra8 CardB Input3 +# Vendor/ID appear to be randomly chosen + aa08 1468 Spectra8 CardC Input0 +# Vendor/ID appear to be randomly chosen + aa09 1469 Spectra8 CardC Input1 +# Vendor/ID appear to be randomly chosen + aa0a 146a Spectra8 CardC Input2 +# Vendor/ID appear to be randomly chosen + aa0b 146b Spectra8 CardC Input3 +# Vendor/ID appear to be randomly chosen + aa0c 146c Spectra8 CardD Input0 +# Vendor/ID appear to be randomly chosen + aa0d 146d Spectra8 CardD Input1 +# Vendor/ID appear to be randomly chosen + aa0e 146e Spectra8 CardD Input2 +# Vendor/ID appear to be randomly chosen + aa0f 146f Spectra8 CardD Input3 bd11 1200 PCTV pro (TV + FM stereo receiver) 036f Bt879 Video Capture 127a 0044 Bt879 Video Capture NTSC @@ -6034,6 +6857,8 @@ 4002 TIO-CE PCI Express Port 8001 O2 1394 8002 G-net NT +# PCIe x1 Low Profile + 802b REACT external interrupt controller 10aa ACC Microelectronics 0000 ACCM 2188 2051 2051 CPU bridge @@ -6145,6 +6970,7 @@ 8718 PEX 8718 16-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch 8732 PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch 8734 PEX 8734 32-lane, 8-Port PCI Express Gen 3 (8.0GT/s) Switch + 8747 PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch # This is the Non-Transparent-Bridge Virtualized Port as presented by the PLX PEX 8732 chip, the physical bridges show up at 10b5:8732 87b0 PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch 9016 PLX 9016 8-port serial controller @@ -6308,8 +7134,8 @@ 10b6 0007 Presto PCI 0009 Smart 100/16/4 PCI-HS Ringnode 10b6 0009 Smart 100/16/4 PCI-HS Ringnode - 000a Smart 100/16/4 PCI Ringnode - 10b6 000a Smart 100/16/4 PCI Ringnode + 000a Token Ring 100/16/4 Ringnode/Ringrunner + 10b6 000a Token Ring 100/16/4 Ringnode/Ringrunner 000b 16/4 CardBus Adapter Mk2 10b6 0008 16/4 CardBus Adapter Mk2 10b6 000b 16/4 Cardbus Adapter Mk2 @@ -6319,6 +7145,8 @@ 1001 Collage 155 ATM Server Adapter 10b7 3Com Corporation 0001 3c985 1000BaseSX (SX/TX) +# wrong ID? + 9850 0001 3c985B-SX 0013 AR5212 802.11abg NIC (3CRDAG675) 10b7 2031 3CRDAG675 11a/b/g Wireless PCI Adapter 0910 3C910-A01 @@ -6845,7 +7673,7 @@ 0048 NV40 [GeForce 6800 XT] 004e NV40GL [Quadro FX 4000] 0050 CK804 ISA Bridge - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 0c11 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6856,7 +7684,7 @@ 1028 0225 PowerEdge T105 ISA Bridge 0052 CK804 SMBus 1028 0225 PowerEdge T105 SMBus - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 0c11 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6864,7 +7692,7 @@ 147b 1c1a KN8-Ultra Mainboard 1565 3402 NF4 AM2L Mainboard 0053 CK804 IDE - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 5002 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6873,7 +7701,7 @@ 1565 3402 NF4 AM2L Mainboard 0054 CK804 Serial ATA Controller 1028 0225 PowerEdge T105 Serial ATA - 1043 815a A8N-E Mainboard + 1043 815a A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 b003 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6882,7 +7710,7 @@ 1565 5401 NF4 AM2L Mainboard 0055 CK804 Serial ATA Controller 1028 0225 PowerEdge T105 Serial ATA - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 b003 GA-K8N Ultra-9 Mainboard 1462 7125 K8N Neo4-F mainboard @@ -6890,7 +7718,7 @@ 1565 5401 NF4 AM2L Mainboard 0056 CK804 Ethernet Controller 0057 CK804 Ethernet Controller - 1043 8141 K8N4-E or A8N-E Mainboard + 1043 8141 K8N4/A8N Series Mainboard 10de cb84 NF4 Lanparty 10f1 2865 Tomcat K8E (S2865) 1458 e000 GA-K8N Ultra-9 Mainboard @@ -6900,14 +7728,14 @@ 1565 2501 NF4 AM2L Mainboard 0058 CK804 AC'97 Modem 0059 CK804 AC'97 Audio Controller - 1043 812a K8N4-E or A8N-E Mainboard + 1043 812a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1462 7585 K8N Neo4-F mainboard 147b 1c1a KN8-Ultra Mainboard 1565 8211 NF4 AM2L Mainboard 005a CK804 USB Controller 1028 0225 PowerEdge T105 onboard USB - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 5004 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6916,7 +7744,7 @@ 1565 3402 NF4 AM2L Mainboard 005b CK804 USB Controller 1028 0225 PowerEdge T105 onboard USB - 1043 815a K8N4-E or A8N-E Mainboard + 1043 815a K8N4/A8N Series Mainboard 10f1 2865 Tomcat K8E (S2865) 1458 5004 GA-K8N Ultra-9 Mainboard 1462 7100 MSI K8N Diamond @@ -6927,7 +7755,7 @@ 005d CK804 PCIE Bridge 005e CK804 Memory Controller 1028 0225 PowerEdge T105 Memory Controller - 1043 815a A8N-E Mainboard + 1043 815a A8N Series Mainboard 10de 005e ECS Elitegroup NFORCE3-A939 motherboard. 10f1 2865 Tomcat K8E (S2865) 10f1 2891 Thunder K8SRE Mainboard @@ -7004,8 +7832,7 @@ 00c8 NV41M [GeForce Go 6800] 00c9 NV41M [GeForce Go 6800 Ultra] 00cc NV41GLM [Quadro FX Go1400] - 00cd NV41GL [Quadro FX 3450/4000 SDI] - 10de 029b wx4300 Workstation + 00cd NV42GL [Quadro FX 3450/4000 SDI] 00ce NV41GL [Quadro FX 1400] 00cf NV41 00d0 nForce3 LPC Bridge @@ -7609,7 +8436,7 @@ 0365 MCP55 LPC Bridge 0366 MCP55 LPC Bridge 0367 MCP55 LPC Bridge - 0368 MCP55 SMBus + 0368 MCP55 SMBus Controller 1028 020c PowerEdge M605 MCP55 SMBus 1028 0221 PowerEdge R805 MCP55 SMBus 147b 1c24 KN9 series mainboard @@ -7647,6 +8474,7 @@ 0390 G73 [GeForce 7650 GS] 0391 G73 [GeForce 7600 GT] 1458 3427 GV-NX76T128D-RH + 1462 0452 NX7600GT-VT2D256E 0392 G73 [GeForce 7600 GS] 1462 0622 NX7600GS-T2D256EH 0393 G73 [GeForce 7300 GT] @@ -7924,6 +8752,11 @@ 1682 2490 GX-285N-ZDF 05e6 GT200b [GeForce GTX 275] 05e7 GT200GL [Tesla C1060 / M1060] + 10de 0595 Tesla T10 Processor + 10de 068f Tesla T10 Processor + 10de 0697 Tesla M1060 + 10de 0714 Tesla M1060 + 10de 0743 Tesla M1060 05ea GT200 [GeForce GTX 260] 05eb GT200 [GeForce GTX 295] 05ed GT200GL [Quadro Plex 2200 D2] @@ -7944,6 +8777,7 @@ 0607 G92 [GeForce GTS 240] 0608 G92M [GeForce 9800M GTX] 0609 G92M [GeForce 8800M GTS] + 106b 00a7 GeForce 8800 GS 060a G92M [GeForce GTX 280M] 060b G92M [GeForce 9800M GT] 060c G92M [GeForce 8800M GTX] @@ -7990,6 +8824,7 @@ 062c G94M [GeForce 9800M GTS] 062d G94 [GeForce 9600 GT] 062e G94 [GeForce 9600 GT] + 106b 0605 GeForce GT 130 062f G94 [GeForce 9800 S] 0630 G94 [GeForce 9600 GT] 0631 G94M [GeForce GTS 160M] @@ -8002,6 +8837,8 @@ 063f G94 [GeForce 9600 GE] 0640 G96 [GeForce 9500 GT] 0641 G96 [GeForce 9400 GT] + 1682 4009 PV-T94G-ZAFG + 0642 G96 [D9M-10] 0643 G96 [GeForce 9500 GT] 0644 G96 [GeForce 9500 GS] 0645 G96 [GeForce 9500 GS] @@ -8009,6 +8846,7 @@ 0647 G96M [GeForce 9600M GT] 0648 G96M [GeForce 9600M GS] 0649 G96M [GeForce 9600M GT] + 1043 202d GeForce GT 220M 064a G96M [GeForce 9700M GT] 064b G96M [GeForce 9500M G] 064c G96M [GeForce 9650M GT] @@ -8016,8 +8854,11 @@ 064e G96 [GeForce 9600 GT / 9800 GT] 0651 G96M [GeForce G 110M] 0652 G96M [GeForce GT 130M] + 152d 0850 GeForce GT 240M LE 0653 G96M [GeForce GT 120M] 0654 G96M [GeForce GT 220M] + 1043 14a2 GeForce GT 320M + 1043 14d2 GeForce GT 320M 0655 G96 [GeForce GT 120] 0656 G96 [GeForce 9650 S] 0658 G96GL [Quadro FX 380] @@ -8068,6 +8909,7 @@ 06e6 G98 [GeForce G 100] 06e7 G98 [GeForce 9300 SE] 06e8 G98M [GeForce 9200M GS] + 103c 360b GeForce 9200M GE 06e9 G98M [GeForce 9300M GS] 1043 19b2 U6V laptop 06ea G98M [Quadro NVS 150M] @@ -8235,6 +9077,7 @@ 07fe GeForce 7100/nForce 630i USB 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD + 0840 C77 [GeForce 8200M] 0844 C77 [GeForce 9100M G] 0845 C77 [GeForce 8200M G] 0846 C77 [GeForce 9200] @@ -8258,6 +9101,7 @@ 0864 C79 [GeForce 9300] 0865 C79 [GeForce 9300/ION] 0866 C79 [GeForce 9400M G] + 106b 00b1 GeForce 9400M 0867 C79 [GeForce 9400] 106b 00ad iMac 9,1 0868 C79 [nForce 760i SLI] @@ -8266,7 +9110,7 @@ 086c C79 [GeForce 9300 / nForce 730i] 086d C79 [GeForce 9200] 086e C79 [GeForce 9100M G] - 086f C79 [GeForce 9200M G] + 086f MCP79 [GeForce 8200M G] 0870 C79 [GeForce 9400M] 0871 C79 [GeForce 9200] 0872 C79 [GeForce G102M] @@ -8285,9 +9129,11 @@ 19da a123 IONITX-F-E 087e ION LE VGA 087f ION LE VGA + 08a0 MCP89 [GeForce 320M] 08a2 MCP89 [GeForce 320M] 08a3 MCP89 [GeForce 320M] 08a4 MCP89 [GeForce 320M] + 08a5 MCP89 [GeForce 320M] 0a20 GT216 [GeForce GT 220] 1043 8311 ENGT220/DI/1GD3(LP)/V2 0a21 GT216M [GeForce GT 330M] @@ -8328,10 +9174,52 @@ 0a72 GT218M [GeForce 310M] 0a73 GT218M [GeForce 305M] 0a74 GT218M [GeForce G210M] + 1b0a 903a GeForce G210 0a75 GT218M [GeForce 310M] 0a76 GT218 [ION 2] 0a78 GT218GL [Quadro FX 380 LP] 0a7a GT218M [GeForce 315M] + 104d 907e GeForce 315M + 1179 fc50 GeForce 315M + 1179 fc61 GeForce 315M + 1179 fc71 GeForce 315M + 1179 fc90 GeForce 315M + 1179 fcc0 GeForce 315M + 1179 fcd0 GeForce 315M + 1179 fce2 GeForce 315M + 1179 fcf2 GeForce 315M + 1179 fd16 GeForce 315M + 1179 fd40 GeForce 315M + 1179 fd50 GeForce 315M + 1179 fd52 GeForce 315M + 1179 fd61 GeForce 315M + 1179 fd71 GeForce 315M + 1179 fd92 GeForce 315M + 1179 fd96 GeForce 315M + 1179 fdd0 GeForce 315M + 1179 fdd2 GeForce 315M + 1179 fdfe GeForce 315M + 144d c0a2 GeForce 315M + 144d c0b2 GeForce 315M + 144d c581 GeForce 315M + 144d c587 GeForce 315M + 144d c588 GeForce 315M + 144d c597 GeForce 315M + 144d c606 GeForce 315M + 1462 aa51 GeForce 405 + 1462 aa58 GeForce 405 + 1462 ac71 GeForce 405 + 1462 ac81 GeForce 315M + 1462 ac82 GeForce 405 + 1462 ae33 GeForce 405 + 1642 3980 GeForce 405 + 17aa 3950 GeForce 405M + 17aa 397d GeForce 405M + 1b0a 2091 GeForce 315M + 1b0a 90b4 GeForce 405 + 1bfd 0003 GeForce 405 + 1bfd 8006 GeForce 405 + 1bfd 8007 GeForce 315M 0a7b GT218 [GeForce 505] 0a7c GT218GLM [Quadro FX 380M] 0a80 MCP79 Host Bridge @@ -8419,7 +9307,7 @@ 1043 82e8 M3N72-D 1849 0ad4 K10N78FullHD-hSLI R3.0 AHCI Controller 0ad8 MCP78S [GeForce 8200] SATA Controller (RAID mode) - 0be2 High Definition Audio Controller + 0be2 GT216 HDMI Audio Controller 1043 8311 ENGT220/DI/1GD3(LP)/V2 0be3 High Definition Audio Controller 1028 040b Latitude E6510 @@ -8484,8 +9372,18 @@ 0de3 GF108M [GeForce GT 635M] 0de4 GF108 [GeForce GT 520] 0de5 GF108 [GeForce GT 530] + 0de7 GF108 [GeForce GT 610] 0de8 GF108M [GeForce GT 620M] 0de9 GF108M [GeForce GT 630M] + 1025 0692 GeForce GT 620M + 1025 0725 GeForce GT 620M + 1025 0728 GeForce GT 620M + 1025 072b GeForce GT 620M + 1025 072e GeForce GT 620M + 1025 0753 GeForce GT 620M + 1025 0754 GeForce GT 620M + 17aa 3977 GeForce GT 640M LE + 1b0a 2210 GeForce GT 635M 0dea GF108M [GeForce 610M] 17aa 365a GeForce 615 17aa 365b GeForce 615 @@ -8502,6 +9400,8 @@ 0df2 GF108M [GeForce GT 435M] 0df3 GF108M [GeForce GT 420M] 0df4 GF108M [GeForce GT 540M] + 152d 0952 GeForce GT 630M + 152d 0953 GeForce GT 630M 0df5 GF108M [GeForce GT 525M] 0df6 GF108M [GeForce GT 550M] 0df7 GF108M [GeForce GT 520M] @@ -8518,6 +9418,7 @@ 0e0c GF114 HDMI Audio Controller 0e1a GK110 HDMI Audio 0e1b GK107 HDMI Audio Controller + 103c 197b ZBook 15 1043 8428 GTX650-DC-1GD5 0e22 GF104 [GeForce GTX 460] 1462 2322 N460GTX Cyclone 1GD5/OC @@ -8529,11 +9430,15 @@ 0e3b GF104GLM [Quadro 4000M] 0f00 GF108 [GeForce GT 630] 0f01 GF108 [GeForce GT 620] + 0f02 GF108 [GeForce GT 730] 0fc0 GK107 [GeForce GT 640 OEM] 0fc1 GK107 [GeForce GT 640] 0fc2 GK107 [GeForce GT 630 OEM] 0fc6 GK107 [GeForce GTX 650] 1043 8428 GTX650-DC-1GD5 + 0fc8 GK107 [GeForce GT 740] + 0fcd GK107M [GeForce GT 755M] + 0fce GK107M [GeForce GT 640M LE] 0fd1 GK107M [GeForce GT 650M] 1043 1597 GeForce GT 650M 1043 15a7 GeForce GT 650M @@ -8550,21 +9455,33 @@ 0fd5 GK107M [GeForce GT 650M Mac Edition] 0fd8 GK107M [GeForce GT 640M Mac Edition] 0fd9 GK107M [GeForce GT 645M] + 0fdb GK107M 0fdf GK107M [GeForce GT 740M] - 0fe0 GK107M [GeForce GTX 660M OEM] + 0fe0 GK107M [GeForce GTX 660M Mac Edition] 0fe1 GK107M [GeForce GT 730M] + 0fe2 GK107M [GeForce GT 745M] 0fe3 GK107M [GeForce GT 745M] + 103c 2b16 GeForce GT 745A + 17aa 3675 GeForce GT 745A 0fe4 GK107M [GeForce GT 750M] 0fe5 GK107 [GeForce K340 USM] - 0fe6 GK107 [NVS K1 USM] - 0fe7 GRID K1 vGPU + 0fe6 GK107 [GRID K1 NVS USM] +# GRID K1 USM + 0fe7 GK107GL [GRID K100 vGPU] 10de 101e GRID K100 + 0fe9 GK107M [GeForce GT 750M Mac Edition] + 0fea GK107M [GeForce GT 755M Mac Edition] 0fef GK107GL [GRID K340] 0ff1 GK107 [NVS 1000] 0ff2 GK107GL [GRID K1] - 0ff5 GK107GL [Tesla K1 USM] - 0ff7 GK107GL [Quadro K1 USM] + 0ff3 GK107GL [Quadro K420] + 0ff5 GK107GL [GRID K1 Tesla USM] + 0ff6 GK107GLM [Quadro K1100M] + 103c 197b ZBook 15 +# GRID K1 Quadro USM + 0ff7 GK107GL [GRID K140Q vGPU] 10de 1037 GRID K140Q + 0ff8 GK107GLM [Quadro K500M] 0ff9 GK107GL [Quadro K2000D] 0ffa GK107GL [Quadro K600] 0ffb GK107GLM [Quadro K2000M] @@ -8572,8 +9489,12 @@ 0ffd GK107 [NVS 510] 0ffe GK107GL [Quadro K2000] 0fff GK107GL [Quadro 410] + 1001 GK110B [GeForce GTX TITAN Z] 1003 GK110 [GeForce GTX Titan LE] 1004 GK110 [GeForce GTX 780] + 3842 0784 GK110B [GeForce GTX 780 SC w/ ACX Cooler] + 3842 1784 GK110B [GeForce GTX 780 Dual FTW w/ ACX Cooler] + 3842 1788 GK110B [GeForce GTX 780 Dual Classified w/ ACX Cooler] 1005 GK110 [GeForce GTX Titan] 1043 8451 GTXTITAN-6GD5 # Reference Model @@ -8588,12 +9509,26 @@ 3842 2794 GeForce GTX Titan SC Hydro Copper # 06G-P4-2795-KR 3842 2795 GeForce GTX Titan SC Hydro Copper Signature + 1007 GK110 [GeForce GTX 780 Rev. 2] + 1008 GK110 [GeForce GTX 780 Ti Rev. 2] + 100a GK110B [GeForce GTX 780 Ti] + 100c GK110B [GeForce GTX Titan Black] + 101e GK110GL [Tesla K20X] 101f GK110GL [Tesla K20] 1020 GK110GL [Tesla K20X] 1021 GK110GL [Tesla K20Xm] 1022 GK110GL [Tesla K20c] + 1023 GK110BGL [Tesla K40m] + 1024 GK110BGL [Tesla K40c] 1026 GK110GL [Tesla K20s] + 1027 GK110BGL [Tesla K40st] 1028 GK110GL [Tesla K20m] + 1029 GK110BGL [Tesla K40s] + 102a GK110BGL [Tesla K40t] + 102d GK110BGL [Tesla K80] + 102e GK110BGL [Tesla K40d] + 103a GK110GL [Quadro K6000] + 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] @@ -8602,6 +9537,8 @@ # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 104b GF119 [GeForce GT 625 OEM] + 104c GF119 [GeForce GT 705] + 104d GF119 [GeForce GT 710] 1050 GF119M [GeForce GT 520M] 1051 GF119M [GeForce GT 520MX] 1052 GF119M [GeForce GT 520M] @@ -8610,14 +9547,26 @@ 1056 GF119M [NVS 4200M] 1057 GF119M [Quadro NVS 4200M] 1058 GF119M [GeForce 610M] + 103c 2aed GeForce 610 + 103c 2af1 GeForce 610 1043 10ac GeForce GT 610M 1043 10bc GeForce GT 610M 1043 1652 GeForce GT 610M + 17aa 367a GeForce 610M + 17aa 3682 GeForce 800A + 17aa 3687 GeForce 800A + 17aa 3692 GeForce 705A + 17aa 3695 GeForce 800A + 17aa a117 GeForce 610M + 1059 GF119M [GeForce 610M] 105a GF119M [GeForce 610M] 1043 2111 GeForce GT 610M 1043 2112 GeForce GT 610M 105b GF119M [GeForce 705M] 103c 2afb GeForce 705A + 17aa 309d GeForce 705A + 17aa 30b1 GeForce 800A + 17aa 36a1 GeForce 800A 107c GF119 [NVS 315] 107d GF119 [NVS 310] 1080 GF110 [GeForce GTX 580] @@ -8634,6 +9583,8 @@ 1091 GF110GL [Tesla M2090] 10de 088e Tesla X2090 10de 0891 Tesla X2090 + 10de 0974 Tesla X2090 + 10de 098d Tesla X2090 1094 GF110GL [Tesla M2075] 10de 0888 Tesla M2075 1096 GF110GL [Tesla C2050 / C2075] @@ -8646,7 +9597,7 @@ 10c3 GT218 [GeForce 8400 GS Rev. 3] 10c5 GT218 [GeForce 405] 10d8 GT218 [NVS 300] - 1140 GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] + 1140 GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] 1025 0600 GeForce GT 620M 1025 0606 GeForce GT 620M 1025 064a GeForce GT 620M @@ -8680,12 +9631,36 @@ 1025 077f GeForce 710M 1025 0781 GeForce GT 720M 1025 0798 GeForce GT 720M + 1025 0799 GeForce GT 720M 1025 079b GeForce GT 720M + 1025 079c GeForce GT 720M + 1025 0807 GeForce GT 720M 1025 0821 GeForce GT 720M + 1025 0823 GeForce GT 720M + 1025 0830 GeForce GT 720M + 1025 0837 GeForce GT 720M + 1025 083e GeForce 820M + 1025 0841 GeForce 710M + 1025 0854 GeForce 820M + 1025 0855 GeForce 820M + 1025 0856 GeForce 820M + 1025 0857 GeForce 820M + 1025 0858 GeForce 820M + 1025 0868 GeForce 820M + 1025 0869 GeForce 810M + 1025 0873 GeForce 820M + 1025 0878 GeForce 820M + 1025 087b GeForce 820M + 1025 087c GeForce 810M + 1025 0881 GeForce 820M + 1025 088a GeForce 820M + 1025 090f GeForce 820M + 1025 0921 GeForce 820M 1028 054d GeForce GT 630M 1028 054e GeForce GT 630M 1028 0554 GeForce GT 620M 1028 0557 GeForce GT 620M + 1028 0562 GeForce GT 625M 1028 0565 GeForce GT 630M 1028 0568 GeForce GT 630M 1028 0590 GeForce GT 630M @@ -8696,7 +9671,14 @@ 1028 05b1 GeForce GT 625M 1028 05b3 GeForce GT 625M 1028 05da GeForce GT 630M + 1028 05de GeForce GT 720M + 1028 05e0 GeForce GT 720M 1028 05e8 GeForce GT 630M + 1028 05f4 GeForce GT 720M + 1028 064e GeForce 820M + 1028 0652 GeForce 820M + 1028 0662 GeForce 820M + 1028 068d GeForce 820M 103c 18ef GeForce GT 630M 103c 18f9 GeForce GT 630M 103c 18fb GeForce GT 630M @@ -8710,14 +9692,34 @@ 1043 124d GeForce GT 720M 1043 126d GeForce GT 720M 1043 131d GeForce GT 720M + 1043 13fd GeForce GT 720M 1043 14c7 GeForce GT 720M 1043 1507 GeForce GT 620M + 1043 15ad GeForce 820M + 1043 15ed GeForce 820M + 1043 160d GeForce 820M + 1043 163d GeForce 820M + 1043 166d GeForce 820M + 1043 16cd GeForce 820M + 1043 16dd GeForce 820M + 1043 170d GeForce 820M + 1043 176d GeForce 820M + 1043 178d GeForce 820M + 1043 179d GeForce 820M + 1043 17dd GeForce 820M 1043 2132 GeForce GT 620M 1043 2136 NVS 5200M 1043 21ba GeForce GT 720M 1043 21fa GeForce GT 720M 1043 220a GeForce GT 720M 1043 221a GeForce GT 720M + 1043 223a GeForce GT 710M + 1043 224a GeForce GT 710M + 1043 227a GeForce 820M + 1043 228a GeForce 820M + 1043 8595 GeForce GT 720M + 1072 152d GeForce GT 720M + 10cf 17f5 GeForce GT 720M 1179 fa01 GeForce 710M 1179 fa02 GeForce 710M 1179 fa03 GeForce 710M @@ -8742,6 +9744,7 @@ 1179 fa59 GeForce 710M 1179 fa88 GeForce 710M 1179 fa89 GeForce 710M + 144d b092 GeForce GT 620M 144d c0d5 GeForce GT 630M 144d c0d7 GeForce GT 620M 144d c0e2 NVS 5200M @@ -8750,18 +9753,57 @@ 144d c652 GeForce GT 620M 144d c709 GeForce 710M 144d c711 GeForce 710M + 144d c736 GeForce 710M 1462 10b8 GeForce GT 710M 1462 10e9 GeForce GT 720M + 1462 1116 GeForce 820M + 1462 aa33 GeForce 720M + 1462 aaa2 GeForce GT 720M + 1462 aaa3 GeForce 820M + 1462 ae71 GeForce GT 720M 152d 0926 GeForce 620M 152d 0982 GeForce GT 630M 152d 0983 GeForce GT 630M + 152d 1005 GeForce GT 820M + 152d 1012 GeForce 710M + 152d 1019 GeForce 820M 152d 1030 GeForce GT 630M + 152d 1055 GeForce 710M + 152d 1067 GeForce GT 720M + 152d 1072 GeForce GT 720M + 152d 1086 GeForce 820M 17aa 2200 NVS 5200M + 17aa 2213 GeForce GT 720M + 17aa 2220 GeForce GT 720M + 17aa 309c GeForce GT 720A + 17aa 30b4 GeForce 820A 17aa 3656 GeForce GT 620M + 17aa 365a GeForce 705M + 17aa 365e GeForce 800M + 17aa 366c GeForce 800M + 17aa 3685 GeForce 800M + 17aa 3686 GeForce 800M + 17aa 3687 GeForce 705A + 17aa 3696 GeForce 820A + 17aa 369b GeForce 820A + 17aa 369c GeForce 820A + 17aa 369d GeForce 820A + 17aa 369e GeForce 820A 17aa 3800 GeForce GT 720M 17aa 3801 GeForce GT 720M 17aa 3802 GeForce GT 720M 17aa 3803 GeForce GT 720M + 17aa 3804 GeForce GT 720M + 17aa 3806 GeForce GT 720M + 17aa 3808 GeForce GT 720M + 17aa 380d GeForce 820M + 17aa 380e GeForce 820M + 17aa 380f GeForce 820M + 17aa 3811 GeForce 820M + 17aa 3812 GeForce 820M + 17aa 3813 GeForce 820M + 17aa 3816 GeForce 820M + 17aa 3818 GeForce 820M 17aa 3901 GeForce 610M / GT 620M 17aa 3902 GeForce 710M 17aa 3903 GeForce 610M/710M @@ -8771,35 +9813,65 @@ 17aa 3912 GeForce 720M 17aa 3977 GeForce GT 720M 17aa 3983 GeForce 610M + 17aa 5001 GeForce 610M 17aa 5003 GeForce GT 720M + 17aa 5005 GeForce 705M 17aa 500d GeForce GT 620M 17aa 5014 GeForce 710M 17aa 5017 GeForce 710M 17aa 5019 GeForce 710M 17aa 501a GeForce 710M 17aa 501f GeForce GT 720M + 17aa 5025 GeForce 710M 17aa 5027 GeForce 710M 17aa 502a GeForce 710M + 17aa 502b GeForce GT 720M + 17aa 502d GeForce 710M + 17aa 502e GeForce GT 720M + 17aa 502f GeForce GT 720M + 17aa 5030 GeForce 705M + 17aa 5031 GeForce 705M + 17aa 5032 GeForce 820M + 17aa 5033 GeForce 820M + 17aa 503e GeForce 710M + 17aa 503f GeForce 820M + 17aa 5040 GeForce 820M 1854 0177 GeForce 710M 1854 0180 GeForce 710M + 1854 0190 GeForce GT 720M + 1854 0192 GeForce GT 720M 1b0a 20dd GeForce GT 620M 1b0a 20df GeForce GT 620M + 1b0a 2202 GeForce GT 720M 1180 GK104 [GeForce GTX 680] + 1043 83f1 GTX680-DC2-2GD5 3842 3682 GeForce GTX 680 Mac Edition 1182 GK104 [GeForce GTX 760 Ti] 1183 GK104 [GeForce GTX 660 Ti] 1184 GK104 [GeForce GTX 770] 1185 GK104 [GeForce GTX 660 OEM] + 10de 106f GK104 [GeForce GTX 760 OEM] 1187 GK104 [GeForce GTX 760] 1188 GK104 [GeForce GTX 690] 1189 GK104 [GeForce GTX 670] + 10de 1074 GK104 [GeForce GTX 760 Ti OEM] 118a GK104GL [GRID K520] - 118b GK104 [GeForce K2 USM] - 118c GK104 [NVS K2 USM] - 118d GRID K2 vGPU + 118b GK104GL [GRID K2 GeForce USM] + 118c GK104 [GRID K2 NVS USM] +# GRID K2 USM + 118d GK104GL [GRID K200 vGPU] 10de 101d GRID K200 + 118e GK104 [GeForce GTX 760 OEM] 118f GK104GL [Tesla K10] - 119d GK104M [GeForce GTX 775M] + 1191 GK104 [GeForce GTX 760 Rev. 2] + 1193 GK104 [GeForce GTX 760 Ti OEM] + 1194 GK104GL [Tesla K8] + 1195 GK104 [GeForce GTX 660 Rev. 2] + 1198 GK104M [GeForce GTX 880M] + 1199 GK104M [GeForce GTX 870M] + 119a GK104M [GeForce GTX 860M] + 119d GK104M [GeForce GTX 775M Mac Edition] + 119e GK104M [GeForce GTX 780M Mac Edition] 119f GK104M [GeForce GTX 780M] 11a0 GK104M [GeForce GTX 680M] 11a1 GK104M [GeForce GTX 670MX] @@ -8807,10 +9879,15 @@ 11a3 GK104M [GeForce GTX 680MX] 106b 010d iMac 13,2 11a7 GK104M [GeForce GTX 675MX] - 11b0 GK104GL [Quadro K2 USM] +# GRID K2 Quadro USM + 11b0 GK104GL [GRID K240Q\K260Q vGPU] 10de 101a GRID K240Q 10de 101b GRID K260Q - 11b1 GK104GL [Tesla K2 USM] + 11b1 GK104GL [GRID K2 Tesla USM] + 11b4 GK104GL [Quadro K4200] + 11b6 GK104GLM [Quadro K3100M] + 11b7 GK104GLM [Quadro K4100M] + 11b8 GK104GLM [Quadro K5100M] 11ba GK104GL [Quadro K5000] 11bb GK104GL [Quadro 4100] 11bc GK104GLM [Quadro K5000M] @@ -8829,11 +9906,15 @@ 10de 1030 GeForce GTX 650 Ti OEM 11c4 GK106 [GeForce GTX 645 OEM] 11c6 GK106 [GeForce GTX 650 Ti] + 11c7 GK106 [GeForce GTX 750 Ti] + 11c8 GK106 [GeForce GTX 650 OEM] 11e0 GK106M [GeForce GTX 770M] 11e1 GK106M [GeForce GTX 765M] 11e2 GK106M [GeForce GTX 765M] 11e3 GK106M [GeForce GTX 760M] + 17aa 3683 GeForce GTX 760A 11fa GK106GL [Quadro K4000] + 11fc GK106GLM [Quadro K2100M] 1200 GF114 [GeForce GTX 560 Ti] 1201 GF114 [GeForce GTX 560] 1202 GF114 [GeForce GTX 560 Ti OEM] @@ -8858,14 +9939,32 @@ 1043 212a GeForce GT 635M 1043 212b GeForce GT 635M 1043 212c GeForce GT 635M - 1248 GF116M [GeForce GT 555M] + 152d 0930 GeForce GT 635M + 1248 GF116M [GeForce GT 555M/635M] + 152d 0930 GeForce GT 635M + 17c0 10e7 GeForce GT 555M + 17c0 10e8 GeForce GT 555M + 17c0 10ea GeForce GT 555M + 1854 0890 GeForce GT 555M + 1854 0891 GeForce GT 555M + 1854 1795 GeForce GT 555M + 1854 1796 GeForce GT 555M + 1854 3005 GeForce GT 555M 1249 GF116 [GeForce GTS 450 Rev. 3] 124b GF116 [GeForce GT 640 OEM] 124d GF116M [GeForce GT 555M/635M] + 1028 0491 GeForce GT 555M + 1028 0570 GeForce GT 555M + 1028 0571 GeForce GT 555M + 1462 108d GeForce GT 555M + 1462 10cc GeForce GT 635M 1251 GF116M [GeForce GT 560M] 1280 GK208 [GeForce GT 635] + 1281 GK208 [GeForce GT 710] 1282 GK208 [GeForce GT 640 Rev. 2] 1284 GK208 [GeForce GT 630 Rev. 2] + 1286 GK208 [GeForce GT 720] + 1287 GK208 [GeForce GT 730] 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -8873,11 +9972,47 @@ 1043 13cd GeForce GT 730M 1291 GK208M [GeForce GT 735M] 1292 GK208M [GeForce GT 740M] + 17aa 3675 GeForce GT 740A + 17aa 3684 GeForce GT 740A 1293 GK208M [GeForce GT 730M] 1294 GK208M [GeForce GT 740M] + 1295 GK208M [GeForce 710M] + 103c 2b0d GeForce GT 710A + 103c 2b0f GeForce GT 710A + 103c 2b11 GeForce GT 710A + 103c 2b20 GeForce 810A + 103c 2b21 GeForce GT 810A + 103c 2b22 GeForce GT 810A + 1296 GK208M [GeForce 825M] + 1298 GK208M [GeForce GT 720M] 12a0 GK208 + 12b9 GK208GLM [Quadro K610M] + 12ba GK208GLM [Quadro K510M] + 1340 GM108M [GeForce 830M] + 103c 2b2b GeForce 830A + 1341 GM108M [GeForce 840M] + 17aa 3697 GeForce 840A + 17aa 3699 GeForce 840A + 17aa 369c GeForce 840A + 1380 GM107 [GeForce GTX 750 Ti] + 1381 GM107 [GeForce GTX 750] + 1382 GM107 [GeForce GTX 745] + 1389 GM107GL [GRID M3] + 1390 GM107M [GeForce 845M] + 1391 GM107M [GeForce GTX 850M] + 17aa 3697 GeForce GTX 850A + 17aa a125 GeForce GTX 850A + 1392 GM107M [GeForce GTX 860M] + 1393 GM107M [GeForce 840M] + 13b3 GM107GLM [Quadro K2200M] + 13ba GM107GL [Quadro K2200] + 13bb GM107GL [Quadro K620] + 13bd GM107GL [Tesla M40] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) + 17aa 1056 ThinkServer OCm14102-UX-L AnyFabric + 17aa 1057 ThinkServer OCm14104-UX-L AnyFabric + 17aa 1059 ThinkServer OCm14104-UT-L AnyFabric 0722 OneConnect iSCSI Initiator (Skyhawk) 0723 OneConnect iSCSI Initiator + Target (Skyhawk) 0724 OneConnect FCoE Initiator (Skyhawk) @@ -8892,6 +10027,8 @@ e200 Lancer-X: LightPulse Fibre Channel Host Adapter e208 LightPulse 16Gb Fibre Channel Host Adapter (Lancer-VF) e220 OneConnect NIC (Lancer) + 17aa 1054 ThinkServer LPm16002B-M6-L AnyFabric + 17aa 1055 ThinkServer LPm16004B-M8-L AnyFabric e240 OneConnect iSCSI Initiator (Lancer) e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) @@ -9014,32 +10151,36 @@ 0101 3GA 8111 Twist3 Frame Grabber 10ec Realtek Semiconductor Co., Ltd. - 0139 Zonet Zen3200 - 0880 Realtek 880 High Definition Audio - 0883 Realtek 883 High Definition Audio - 0885 Realtek 885 High Definition Audio - 0888 Realtek 888 High Definition Audio - 0892 Realtek 892 High Definition Audio + 0139 RTL-8139/8139C/8139C+ Ethernet Controller + 5208 RTS5208 PCI Express Card Reader 5209 RTS5209 PCI Express Card Reader + 5227 RTS5227 PCI Express Card Reader + 17aa 220e ThinkPad T440p + 17aa 2214 ThinkPad X240 5229 RTS5229 PCI Express Card Reader - 5288 Barossa PCI Express Card Reader + 1025 0813 Aspire R7-571 + 103c 194e ProBook 455 G1 Notebook + 5249 RTS5249 PCI Express Card Reader + 103c 1909 ZBook 15 + 5288 RTS5288 PCI Express Card Reader 8029 RTL-8029(AS) 10b8 2011 EZ-Card (SMC1208) 10ec 8029 RTL-8029(AS) 1113 1208 EN1208 1186 0300 DE-528 1259 2400 AT-2400 - 1af4 1100 Qemu virtual machine + 1af4 1100 QEMU Virtual Machine 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter - 11ec 8129 RT8129 Fast Ethernet Adapter + 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) 8136 RTL8101E/RTL8102E PCI Express Fast Ethernet controller - 103c 2ab1 Pavillion p6774 + 103c 2ab1 Pavilion p6774 103c 30cc Pavilion dv6700 1179 ff64 RTL8102E PCI-E Fast Ethernet NIC + 17c0 1053 AzureWave AW-NE766 802.11B/G/N Mini PCIe Card Model RT2700E 8138 RT8139 (B/C) Cardbus Fast Ethernet Adapter 10ec 8138 RT8139 (B/C) Fast Ethernet Adapter - 8139 RTL-8139/8139C/8139C+ + 8139 RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 0357 000a TTP-Monitoring Card V2.0 1025 005a TravelMate 290 1025 8920 ALN-325 @@ -9051,8 +10192,9 @@ 1043 8109 P5P800-MX Mainboard 1071 8160 MIM2000 10bd 0320 EP-320X-R + 10ec 8139 RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 10f7 8338 Panasonic CF-Y5 laptop - 1113 ec01 FNC-0107TX + 1113 ec01 LevelOne FNC-0107TX/FNC-0109TX 1186 1300 DFE-538TX 1186 1320 SN5200 1186 8139 DRN-32TX @@ -9083,6 +10225,7 @@ 1799 5010 F5D5010 CardBus Notebook Network Card 187e 3303 FN312 1904 8139 RTL8139D Fast Ethernet Adapter + 1af4 1100 QEMU Virtual Machine 2646 0001 KNE120TX 8e2e 7000 KF-230TX 8e2e 7100 KF-230TX/2 @@ -9093,21 +10236,25 @@ 1462 236c 945P Neo3-F motherboard 8168 RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 1019 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller + 1028 0283 Vostro 220 1028 04b2 Vostro 3350 1028 04da Vostro 3750 103c 1611 Pavilion DM1Z-3000 + 103c 1950 ProBook 450/455 + 103c 2a6f Asus IPIBL-LB Motherboard 1043 11f5 A6J-Q008 1043 16d5 U6V/U31J laptop 1043 81aa P5B 1043 82c6 M3A78-EH Motherboard 1043 83a3 M4A785TD Motherboard 1043 8432 P8P67 and other motherboards - 1043 8505 P8H77-I Motherboard + 1043 8505 P8 series motherboard 105b 0d7c D270S/D250S Motherboard 10ec 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller 1458 e000 Motherboard 1462 238c Onboard RTL8111b on MSI P965 Platinum Mainboard 1462 368c K9AG Neo2 + 1462 4180 Wind PC MS-7418 1462 7522 X58 Pro-E 1775 11cc CC11/CL11 1849 8168 Motherboard (one of many) @@ -9134,21 +10281,26 @@ 8174 RTL8192SE Wireless LAN Controller 8176 RTL8188CE 802.11b/g/n WiFi Adapter 1a3b 1139 AW-NE139H Half-size Mini PCIe Card - 8177 RTL8188CE 802.11b/g/n WiFi Adapter - 8178 RTL8188CE 802.11b/g/n WiFi Adapter + 8177 RTL8191CE PCIe Wireless Network Adapter + 8178 RTL8192CE PCIe Wireless Network Adapter 8179 RTL8188EE Wireless Network Adapter 8180 RTL8180L 802.11b MAC 1385 4700 MA521 802.11b Wireless PC Card 1737 0019 WPC11v4 802.11b Wireless-B Notebook Adapter 8185 RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller - 8190 RTL8190 802.11n Wireless LAN - 8191 RTL8188CE 802.11b/g/n WiFi Adapter + 818b RTL8192EE PCIe Wireless Network Adapter + 8190 RTL8190 802.11n PCI Wireless Network Adapter + 8191 RTL8192CE PCIe Wireless Network Adapter 8192 RTL8192E/RTL8192SE Wireless LAN Controller 8193 RTL8192DE Wireless LAN Controller 8197 SmartLAN56 56K Modem 8199 RTL8187SE Wireless LAN Controller 1462 6894 MN54G2 / MS-6894 Wireless Mini PCIe Card 8723 RTL8723AE PCIe Wireless Network Adapter + 8812 RTL8812AE 802.11ac PCIe Wireless Network Adapter + 8813 RTL8813AE 802.11ac PCIe Wireless Network Adapter + 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter + b723 RTL8723BE PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -9241,6 +10393,7 @@ 1102 0053 SB0090 Audigy Player/OEM 1102 0058 SB0090 Audigy Player/OEM 1102 1002 SB Audigy2 Platinum + 1102 1003 SB0350 Audigy 2 1102 1007 SB0240 Audigy 2 Platinum 6.1 1102 1009 SB Audigy2 OEM HP 1102 2001 SB Audigy 2 ZS Platinum Pro @@ -9269,6 +10422,7 @@ 1102 0018 SB1040 000b EMU20k2 [X-Fi Titanium Series] 1102 0041 SB0880 [SoundBlaster X-Fi Titanium PCI-e] + 0012 SB Recon3D 4001 SB Audigy FireWire Port 1102 0010 SB Audigy FireWire Port 7002 SB Live! Game Port @@ -9313,10 +10467,12 @@ 0620 RocketRAID 620 2 Port SATA-III Controller 0622 RocketRAID 622 2 Port SATA-III Controller 0640 RocketRAID 640 4 Port SATA-III Controller + 0644 RocketRAID 644 4 Port SATA-III Controller (eSATA) 1720 RocketRAID 1720 (2x SATA II RAID Controller) 1740 RocketRAID 1740 1742 RocketRAID 1742 2210 RocketRAID 2210 SATA-II Controller + 11ab 11ab 88SX6042 2300 RocketRAID 230x 4 Port SATA-II Controller 2310 RocketRAID 2310 4 Port SATA-II Controller 2320 RocketRAID 2320 SATA-II Controller @@ -9386,7 +10542,7 @@ 0409 VX855/VX875 Host Bridge: Host Control 0410 VX900 Host Bridge: Host Control 0415 VT6415 PATA IDE Host Controller - 1043 838f M5A88-V EVO + 1043 838f Motherboard 0501 VT8501 [Apollo MVP4] 0505 VT82C505 # Shares chip with :0576. The VT82C576M has :1571 instead of :0561. @@ -9524,6 +10680,7 @@ # probably all K7VT2/4*/6 1849 3038 K7VT series Motherboards 19da a179 ZBOX nano VD01 + 1af4 1100 QEMU Virtual Machine 3040 VT82C586B ACPI 3043 VT86C100A [Rhine] 10bd 0000 VT86C100A Fast Ethernet Adapter @@ -9716,6 +10873,7 @@ 3230 K8M890CE/K8N890CE [Chrome 9] 3238 K8T890 Host Bridge 3249 VT6421 IDE/SATA Controller + 1106 3249 VT6421 IDE/SATA Controller 324a CX700/VX700 PCI to PCI Bridge 324b CX700/VX700 Host Bridge 324e CX700/VX700 Internal Module Bus @@ -9895,6 +11053,7 @@ e238 K8T890 PCI to PCI Bridge Controller e340 PT900 PCI to PCI Bridge Controller e353 VX800/VX820 PCI Express Root Port + e410 VX900 PCI Express Physical Layer Electrical Sub-block f208 PT890 PCI to PCI Bridge Controller f238 K8T890 PCI to PCI Bridge Controller f340 PT900 PCI to PCI Bridge Controller @@ -9912,7 +11071,7 @@ 013d P1690Plus 1109 Cogent Data Technologies, Inc. 1400 EM110TX [EX110TX] -110a Siemens Nixdorf AG +110a Siemens AG 0002 Pirahna 2-port 0005 Tulip controller, power management, switch extender 0006 FSC PINC (I/O-APIC) @@ -9925,11 +11084,24 @@ # Superfastcom-PCI (Commtech, Inc.) or DSCC4 WAN Adapter 2102 DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels 2104 Eicon Diva 2.02 compatible passive ISDN card - 3141 SIMATIC NET CP 5611 (Profibus Adapter) - 3142 SIMATIC NET CP 5613A1 (Profibus Adapter) + 3141 SIMATIC NET CP 5611 / 5621 + 3142 SIMATIC NET CP 5613 / 5614 + 3143 SIMATIC NET CP 1613 4021 SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter) - 4029 SIMATIC NET CP 5613A2 (Profibus Adapter) + 4029 SIMATIC NET CP 5613 A2 + 110a 4029 SIMATIC NET CP 5613 A2 + 110a c029 SIMATIC NET CP 5614 A2 4035 SIMATIC NET CP 1613 A2 + 4036 SIMATIC NET CP 1616 + 4038 SIMATIC NET CP 1604 + 4069 SIMATIC NET CP 5623 + 110a 4069 SIMATIC NET CP 5623 + 110a c069 SIMATIC NET CP 5624 + 407c SIMATIC NET CP 5612 + 407d SIMATIC NET CP 5613 A3 + 407e SIMATIC NET CP 5622 + 4083 SIMATIC NET CP 5614 A3 + 4084 SIMATIC NET CP 1626 4942 FPGA I-Bus Tracer for MBD 6120 SZB6120 110b Chromatic Research Inc. @@ -10123,6 +11295,14 @@ 806c PES16T4A/4T4G2 PCI Express Gen2 Switch 806e PES24T6G2 PCI Express Gen2 Switch 806f HIO524G2 PCI Express Gen2 Switch + 8088 PES32NT8BG2 PCI Express Switch + 1093 752f PXIe-8383mc Device + 1093 7543 PXIe-8383mc System Host + 1093 755c PXIe-8364 + 1093 755d PXIe-8374 + 1093 75ff PXIe-8383mc DMA + 1093 7600 PXIe-8383mc DMA + 1093 7602 PXIe-8384 111e Eldec 111f Precision Digital Images 4a47 Precision MX Video engine interface @@ -10245,6 +11425,7 @@ 14c0 1212 LifeView FlyTV Platinum Mini2 153b 1160 Cinergy 250 PCI TV 153b 1162 Terratec Cinergy 400 mobile + 17de 7256 PlusTV All In One PI610 card 17de 7350 ATSC 110 Digital / Analog HDTV Tuner 17de 7352 ATSC 115 Digital / Analog HDTV Tuner 185b c100 VideoMate TV @@ -10269,7 +11450,12 @@ 5ace 6193 Behold TV M6 Extra 5ace 6290 Behold TV H6 5ace 7090 Behold TV A7 + 5ace 7150 Behold TV H75 + 5ace 7151 Behold TV H75 5ace 7190 Behold TV H7 + 5ace 7191 Behold TV H7 + 5ace 7290 Behold TV T7 + 5ace 7591 Behold TV X7 5ace 7595 Behold TV X7 7134 SAA7134/SAA7135HL Video Broadcast Decoder 0000 4036 Behold TV 403 @@ -10343,12 +11529,14 @@ 13c2 1019 S2-3200 13c2 1102 Technotrend/Hauppauge DVB card rev2.1 153b 1155 Cinergy 1200 DVB-S - 153b 1156 Terratec Cynergy 1200C + 153b 1156 Cinergy 1200 DVB-C 153b 1157 Cinergy 1200 DVB-T + 153b 1176 Cinergy 1200 DVB-C (MK3) 1894 0020 KNC One DVB-C V1.0 1894 0023 TVStation DVB-C plus 7160 SAA7160 1458 9009 E8000 DVB-T/Analog TV/FM tuner + 1461 1455 AVerTV Hybrid Speedy PCI-E (H788) 7162 SAA7162 11bd 0101 Pinnacle PCTV 7010iX TV Card 7164 SAA7164 @@ -10372,7 +11560,14 @@ 0070 89a1 WinTV HVR-2200 7231 SAA7231 5ace 8000 Behold TV H8 + 5ace 8001 Behold TV H8 + 5ace 8050 Behold TV H85 + 5ace 8051 Behold TV H85 5ace 8100 Behold TV A8 + 5ace 8101 Behold TV A8 + 5ace 8150 Behold TV A85 + 5ace 8151 Behold TV A85 + 5ace 8201 Behold TV T8 9730 SAA9730 Integrated Multimedia and Peripheral Controller 1131 0000 Integrated Multimedia and Peripheral Controller 1132 Mitel Corp. @@ -10483,23 +11678,35 @@ 0041 VIC PCIe Downstream Port 0042 VIC Management Controller 1137 0047 VIC P81E PCIe Management Controller + 1137 0085 VIC 1225 PCIe Management Controller + 1137 00cd VIC 1285 PCIe Management Controller + 1137 00ce VIC 1225T PCIe Management Controller 0043 VIC Ethernet NIC 1137 0047 VIC P81E PCIe Ethernet NIC 1137 0048 VIC M81KR Mezzanine Ethernet NIC 1137 004f VIC 1280 Mezzanine Ethernet NIC 1137 0084 VIC 1240 MLOM Ethernet NIC 1137 0085 VIC 1225 PCIe Ethernet NIC + 1137 00cd VIC 1285 PCIe Ethernet NIC + 1137 00ce VIC 1225T PCIe Ethernet NIC 0044 VIC Ethernet NIC Dynamic 1137 0047 VIC P81E PCIe Ethernet NIC Dynamic 1137 0048 VIC M81KR Mezzanine Ethernet NIC Dynamic 1137 004f VIC 1280 Mezzanine Ethernet NIC Dynamic 1137 0084 VIC 1240 MLOM Ethernet NIC Dynamic 1137 0085 VIC 1225 PCIe Ethernet NIC Dynamic + 1137 00cd VIC 1285 PCIe Ethernet NIC Dynamic + 1137 00ce VIC 1225T PCIe Ethernet NIC Dynamic 0045 VIC FCoE HBA 1137 0047 VIC P81E PCIe FCoE HBA 1137 0048 VIC M81KR Mezzanine FCoE HBA 1137 004f VIC 1280 Mezzanine FCoE HBA + 1137 0084 VIC 1240 MLOM FCoE HBA + 1137 0085 VIC 1225 PCIe FCoE HBA + 1137 00cd VIC 1285 PCIe FCoE HBA + 1137 00ce VIC 1225T PCIe FCoE HBA 004e VIC 82 PCIe Upstream Port + 0071 VIC SR-IOV VF 00cf VIC Userspace NIC 1138 Ziatech Corporation 8905 8905 [STD 32 Bridge] @@ -10888,6 +12095,7 @@ 0617 ToPIC100 PCI to Cardbus Bridge with ZV Support 0618 CPU to PCI and PCI to ISA bridge 0701 FIR Port Type-O + 0803 TC6371AF SD Host Controller 0804 TC6371AF SmartMedia Controller 0805 SD TypA Controller 0d01 FIR Port Type-DO @@ -10927,8 +12135,9 @@ 144d c005 X10 Laptop 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S - 17aa 201c ThinkPad X60s + 17aa 201c ThinkPad X60/X60s 17aa 20c4 ThinkPad T61 + 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 1014 0184 ThinkPad A30p @@ -10946,7 +12155,7 @@ 1043 1757 M2400N laptop 144d c005 X10 Laptop 144d c00c P30/P35 notebook - 17aa 201e ThinkPad X60s + 17aa 201e ThinkPad X60/X60s 0554 R5C554 0575 R5C575 SD Bus Host Adapter 0576 R5C576 SD Bus Host Adapter @@ -10980,18 +12189,20 @@ 1043 1967 ASUS V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV - 17aa 201d ThinkPad X60s + 17aa 201d ThinkPad X60/X60s 17aa 20c7 ThinkPad T61 17aa 20c8 ThinkPad W500 0832 R5C832 IEEE 1394 Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 + 1028 024d Latitude E4300 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G @@ -11175,7 +12386,11 @@ 2a2b 88W8687 [TopDog] 802.11b/g Wireless 2a30 88W8687 [TopDog] 802.11b/g Wireless 2a40 88W8366 [TopDog] 802.11n Wireless + 2a41 88W8366 [TopDog] 802.11n Wireless + 2a42 88W8366 [TopDog] 802.11n Wireless 2a43 88W8366 [TopDog] 802.11n Wireless + 2a55 88W8864 [Avastar] 802.11ac Wireless + 2b36 88W8764 [Avastar] 802.11n Wireless 4101 OLPC Cafe Controller Secure Digital Controller 4320 88E8001 Gigabit Ethernet Controller 1019 0f38 Marvell 88E8001 Gigabit Ethernet Controller (ECS) @@ -11245,6 +12460,7 @@ 4353 88E8039 PCI-E Fast Ethernet Controller 104d 902d VAIO VGN-NR120E 4354 88E8040 PCI-E Fast Ethernet Controller + 144d c06a R730 Laptop 144d c072 Notebook N150P 4355 88E8040T PCI-E Fast Ethernet Controller 1179 ff50 Satellite P305D-S8995E @@ -11358,6 +12574,7 @@ 16b8 434b Tempo SATA E4P 7810 MV78100 [Discovery Innovation] ARM SoC 7820 MV78200 [Discovery Innovation] ARM SoC + 7823 MV78230 [Armada XP] ARM SoC f003 GT-64010 Primary Image Piranha Image Generator 11ac Canon Information Systems Research Aust. 11ad Lite-On Communications Inc @@ -11528,6 +12745,7 @@ 5803 USS-344S USB Controller 5811 FW322/323 [TrueFire] 1394a Controller 103c 2a34 Pavilion a1677c + 103c 2a6f Asus IPIBL-LB Motherboard 103c 2a9e Pavilion p6310f 1043 8294 LSI FW322/323 IEEE 1394a FireWire Controller 8086 524c D865PERL mainboard @@ -11660,6 +12878,9 @@ 7375 PM7375 [LASAR-155 ATM SAR] 7384 PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr] 8000 PM8000 [SPC - SAS Protocol Controller] + 8032 ATTO Celerity FC8xEN + 117c 003b Celerity FC-82EN Fibre Channel Adapter + 117c 003c Celerity FC-84EN Fibre Channel Adapter 11f9 I-Cube Inc 11fa Kasan Electronics Company, Ltd. 11fb Datel Inc @@ -11749,6 +12970,7 @@ 1216 Purup Prepress A/S 1217 O2 Micro, Inc. 00f7 Firewire (IEEE 1394) + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 1179 ff50 Satellite P305D-S8995E 10f7 1394 OHCI Compliant Host Controller 11f7 OZ600 1394a-2000 Controller @@ -11775,8 +12997,10 @@ 1025 0035 TravelMate 660 7114 OZ711M1/MC1 4-in-1 MemoryCardBus Controller 7120 Integrated MMC/SD Controller + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 1179 ff50 Satellite P305D-S8995E 7130 Integrated MS/xD Controller + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 1179 ff50 Satellite P305D-S8995E 7134 OZ711MP1/MS1 MemoryCardBus Controller 7135 Cardbus bridge @@ -11791,12 +13015,15 @@ 7233 OZ711MP3/MS3 4-in-1 MemoryCardBus Controller 8120 Integrated MMC/SD Controller 8130 Integrated MS/MSPRO/xD Controller - 8320 OZ600 MMC/SD Controller + 8220 OZ600FJ1/OZ900FJ1 SD/MMC Card Reader Controller + 8221 OZ600FJ0/OZ900FJ0/OZ600FJS SD/MMC Card Reader Controller + 8320 OZ600RJ1/OZ900RJ1 SD/MMC Card Reader Controller 1028 04a3 Precision M4600 - 8321 Integrated MMC/SD controller + 8321 OZ600RJ0/OZ900RJ0/OZ600RJS SD/MMC Card Reader Controller 8330 OZ600 MS/xD Controller 1028 04a3 Precision M4600 8331 O2 Flash Memory Card + 8520 SD/MMC Card Reader Controller 1218 Hybricon Corp. 1219 First Virtual Corporation 121a 3Dfx Interactive, Inc. @@ -11918,9 +13145,15 @@ 0002 EasyConnect 8/64 0003 EasyIO 123e Simutech, Inc. -123f C-Cube Microsystems +# nee C-Cube Microsystems / acquired by Magnum Semiconductor +123f LSI Logic 00e4 MPEG - 8120 E4? + 8120 DVxplore Codec + 10de 01e1 NVTV PAL + 10de 01e2 NVTV NTSC + 10de 01e3 NVTV PAL + 10de 0248 NVTV NTSC + 10de 0249 NVTV PAL 11bd 0006 DV500 E4 11bd 000a DV500 E4 11bd 000f DV500 E4 @@ -12113,6 +13346,7 @@ 0510 SM501 VoyagerGX Rev. B 0710 SM710 LynxEM 0712 SM712 LynxEM+ + 0718 SM718 LynxSE+ 0720 SM720 Lynx3DM 0730 SM731 Cougar3DR 0810 SM810 LynxE @@ -12126,13 +13360,13 @@ 0002 DirecPC 1274 Ensoniq 1171 ES1373 [AudioPCI] (also Creative Labs CT5803) - 1371 ES1371 [AudioPCI-97] + 1371 ES1371 / Creative Labs CT2518 [AudioPCI-97] 0e11 0024 AudioPCI on Motherboard Compaq Deskpro 0e11 b1a7 ES1371, ES1373 AudioPCI 1033 80ac ES1371, ES1373 AudioPCI 1042 1854 Tazer 107b 8054 Tabor2 - 1274 1371 Creative Sound Blaster AudioPCI64V, AudioPCI128 + 1274 1371 AudioPCI 64V/128 / Creative Sound Blaster CT4810 1274 8001 CT4751 board 1462 6470 ES1371, ES1373 AudioPCI On Motherboard MS-6147 1.1A 1462 6560 ES1371, ES1373 AudioPCI On Motherboard MS-6156 1.10 @@ -12628,6 +13862,7 @@ 122d 1002 AU8820 Vortex Digital Audio Processor 12eb 0001 AU8820 Vortex Digital Audio Processor 5053 3355 Montego + 50b2 1111 XLerate 0002 Vortex 2 104d 8049 AU8830 Vortex 3D Digital Audio Processor 104d 807b AU8830 Vortex 3D Digital Audio Processor @@ -12960,6 +14195,8 @@ 0204 GPS170PCI GPS Receiver 0205 GPS170PEX GPS Receiver (PCI Express) 0206 GPS180PEX GPS Receiver (PCI Express) + 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) + 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -13360,10 +14597,12 @@ 1043 838e Virtuoso 66 (Xonar DS) 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) + 1043 85f4 Virtuoso 100 (Xonar Essence STX II) 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI 14c3 1710 HiFier Fantasia 14c3 1711 HiFier Serenade + 14c3 1713 HiFier Serenade III 1a58 0910 Barracuda AC-1 415a 5431 X-Meridian 7.1 5431 017a X-Meridian 7.1 2G @@ -13665,10 +14904,11 @@ 4081 T440F-4081 T440-FCoE Unified Wire Ethernet Controller 4082 T420-4082 Unified Wire Ethernet Controller 4083 T420X-4083 Unified Wire Ethernet Controller - 4084 T420-4084 Unified Wire Ethernet Controller + 4084 T440-4084 Unified Wire Ethernet Controller 4085 T420-4085 SFP+ Unified Wire Ethernet Controller 4086 T440-4086 10Gbase-T Unified Wire Ethernet Controller 4087 T440T-4087 Unified Wire Ethernet Controller + 4088 T440-4088 Unified Wire Ethernet Controller 4401 T420-CR Unified Wire Ethernet Controller 4402 T422-CR Unified Wire Ethernet Controller 4403 T440-CR Unified Wire Ethernet Controller @@ -13688,10 +14928,11 @@ 4481 T440F-4081 T440-FCoE Unified Wire Ethernet Controller 4482 T420-4082 Unified Wire Ethernet Controller 4483 T420X-4083 Unified Wire Ethernet Controller - 4484 T420-4084 Unified Wire Ethernet Controller + 4484 T440-4084 Unified Wire Ethernet Controller 4485 T420-4085 SFP+ Unified Wire Ethernet Controller 4486 T440-4086 10Gbase-T Unified Wire Ethernet Controller 4487 T440T-4087 Unified Wire Ethernet Controller + 4488 T440-4088 Unified Wire Ethernet Controller 4501 T420-CR Unified Wire Storage Controller 4502 T422-CR Unified Wire Storage Controller 4503 T440-CR Unified Wire Storage Controller @@ -13711,10 +14952,11 @@ 4581 T440F-4081 T440-FCoE Unified Wire Storage Controller 4582 T420-4082 Unified Wire Storage Controller 4583 T420X-4083 Unified Wire Storage Controller - 4584 T420-4084 Unified Wire Storage Controller + 4584 T440-4084 Unified Wire Storage Controller 4585 T420-4085 SFP+ Unified Wire Storage Controller 4586 T440-4086 10Gbase-T Unified Wire Storage Controller 4587 T440T-4087 Unified Wire Storage Controller + 4588 T440-4088 Unified Wire Storage Controller 4601 T420-CR Unified Wire Storage Controller 4602 T422-CR Unified Wire Storage Controller 4603 T440-CR Unified Wire Storage Controller @@ -13734,10 +14976,11 @@ 4681 T440F-4081 T440-FCoE Unified Wire Storage Controller 4682 T420-4082 Unified Wire Storage Controller 4683 T420X-4083 Unified Wire Storage Controller - 4684 T420-4084 Unified Wire Storage Controller + 4684 T440-4084 Unified Wire Storage Controller 4685 T420-4085 SFP+ Unified Wire Storage Controller 4686 T440-4086 10Gbase-T Unified Wire Storage Controller 4687 T440T-4087 Unified Wire Storage Controller + 4688 T440-4088 Unified Wire Storage Controller 4701 T420-CR Unified Wire Ethernet Controller 4702 T422-CR Unified Wire Ethernet Controller 4703 T440-CR Unified Wire Ethernet Controller @@ -13757,33 +15000,35 @@ 4781 T440F-4081 T440-FCoE Unified Wire Ethernet Controller 4782 T420-4082 Unified Wire Ethernet Controller 4783 T420X-4083 Unified Wire Ethernet Controller - 4784 T420-4084 Unified Wire Ethernet Controller + 4784 T440-4084 Unified Wire Ethernet Controller 4785 T420-4085 SFP+ Unified Wire Ethernet Controller 4786 T440-4086 10Gbase-T Unified Wire Ethernet Controller 4787 T440T-4087 Unified Wire Ethernet Controller - 4801 T420-CR Unified Wire Ethernet Controller - 4802 T422-CR Unified Wire Ethernet Controller - 4803 T440-CR Unified Wire Ethernet Controller - 4804 T420-BCH Unified Wire Ethernet Controller - 4805 T440-BCH Unified Wire Ethernet Controller - 4806 T440-CH Unified Wire Ethernet Controller - 4807 T420-SO Unified Wire Ethernet Controller - 4808 T420-CX Unified Wire Ethernet Controller - 4809 T420-BT Unified Wire Ethernet Controller - 480a T404-BT Unified Wire Ethernet Controller - 480b B420-SR Unified Wire Ethernet Controller - 480c B404-BT Unified Wire Ethernet Controller - 480d T480 Unified Wire Ethernet Controller - 480e T440-LP-CR Unified Wire Ethernet Controller - 480f T440 [Amsterdam] Unified Wire Ethernet Controller - 4880 T480-4080 T480 Unified Wire Ethernet Controller - 4881 T440F-4081 T440-FCoE Unified Wire Ethernet Controller - 4882 T420-4082 Unified Wire Ethernet Controller - 4883 T420X-4083 Unified Wire Ethernet Controller - 4884 T420-4084 Unified Wire Ethernet Controller - 4885 T420-4085 SFP+ Unified Wire Ethernet Controller - 4886 T440-4086 10Gbase-T Unified Wire Ethernet Controller - 4887 T440T-4087 Unified Wire Ethernet Controller + 4788 T440-4088 Unified Wire Ethernet Controller + 4801 T420-CR Unified Wire Ethernet Controller [VF] + 4802 T422-CR Unified Wire Ethernet Controller [VF] + 4803 T440-CR Unified Wire Ethernet Controller [VF] + 4804 T420-BCH Unified Wire Ethernet Controller [VF] + 4805 T440-BCH Unified Wire Ethernet Controller [VF] + 4806 T440-CH Unified Wire Ethernet Controller [VF] + 4807 T420-SO Unified Wire Ethernet Controller [VF] + 4808 T420-CX Unified Wire Ethernet Controller [VF] + 4809 T420-BT Unified Wire Ethernet Controller [VF] + 480a T404-BT Unified Wire Ethernet Controller [VF] + 480b B420-SR Unified Wire Ethernet Controller [VF] + 480c B404-BT Unified Wire Ethernet Controller [VF] + 480d T480 Unified Wire Ethernet Controller [VF] + 480e T440-LP-CR Unified Wire Ethernet Controller [VF] + 480f T440 [Amsterdam] Unified Wire Ethernet Controller [VF] + 4880 T480-4080 T480 Unified Wire Ethernet Controller [VF] + 4881 T440F-4081 T440-FCoE Unified Wire Ethernet Controller [VF] + 4882 T420-4082 Unified Wire Ethernet Controller [VF] + 4883 T420X-4083 Unified Wire Ethernet Controller [VF] + 4884 T440-4084 Unified Wire Ethernet Controller [VF] + 4885 T420-4085 SFP+ Unified Wire Ethernet Controller [VF] + 4886 T440-4086 10Gbase-T Unified Wire Ethernet Controller [VF] + 4887 T440T-4087 Unified Wire Ethernet Controller [VF] + 4888 T440-4088 Unified Wire Ethernet Controller [VF] 5001 T520-CR Unified Wire Ethernet Controller 5002 T522-CR Unified Wire Ethernet Controller 5003 T540-CR Unified Wire Ethernet Controller @@ -13802,7 +15047,14 @@ 5010 T580-LP-CR Unified Wire Ethernet Controller 5011 T520-LL-CR Unified Wire Ethernet Controller 5012 T560-CR Unified Wire Ethernet Controller - 5013 T580-CR Unified Wire Ethernet Controller + 5013 T580-CHR Unified Wire Ethernet Controller + 5014 T580-LP-SO-CR Unified Wire Ethernet Controller + 5015 T502-BT Unified Wire Ethernet Controller + 5080 T540-5080 Unified Wire Ethernet Controller + 5081 T540-5081 Unified Wire Ethernet Controller + 5083 T540-5083 Unified Wire Ethernet Controller + 5084 T580-5084 Unified Wire Ethernet Controller + 5085 T580-5085 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -13821,7 +15073,14 @@ 5410 T580-LP-CR Unified Wire Ethernet Controller 5411 T520-LL-CR Unified Wire Ethernet Controller 5412 T560-CR Unified Wire Ethernet Controller - 5413 T580-CR Unified Wire Ethernet Controller + 5413 T580-CHR Unified Wire Ethernet Controller + 5414 T580-LP-SO-CR Unified Wire Ethernet Controller + 5415 T502-BT Unified Wire Ethernet Controller + 5480 T540-5080 Unified Wire Ethernet Controller + 5481 T540-5081 Unified Wire Ethernet Controller + 5483 T540-5083 Unified Wire Ethernet Controller + 5484 T580-5084 Unified Wire Ethernet Controller + 5485 T580-5085 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -13840,7 +15099,14 @@ 5510 T580-LP-CR Unified Wire Storage Controller 5511 T520-LL-CR Unified Wire Storage Controller 5512 T560-CR Unified Wire Storage Controller - 5513 T580-CR Unified Wire Storage Controller + 5513 T580-CHR Unified Wire Storage Controller + 5514 T580-LP-SO-CR Unified Wire Storage Controller + 5515 T502-BT Unified Wire Storage Controller + 5580 T540-5080 Unified Wire Storage Controller + 5581 T540-5081 Unified Wire Storage Controller + 5583 T540-5083 Unified Wire Storage Controller + 5584 T580-5084 Unified Wire Storage Controller + 5585 T580-5085 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -13859,7 +15125,14 @@ 5610 T580-LP-CR Unified Wire Storage Controller 5611 T520-LL-CR Unified Wire Storage Controller 5612 T560-CR Unified Wire Storage Controller - 5613 T580-CR Unified Wire Storage Controller + 5613 T580-CHR Unified Wire Storage Controller + 5614 T580-LP-SO-CR Unified Wire Storage Controller + 5615 T502-BT Unified Wire Storage Controller + 5680 T540-5080 Unified Wire Storage Controller + 5681 T540-5081 Unified Wire Storage Controller + 5683 T540-5083 Unified Wire Storage Controller + 5684 T580-5084 Unified Wire Storage Controller + 5685 T580-5085 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -13879,25 +15152,39 @@ 5711 T520-LL-CR Unified Wire Ethernet Controller 5712 T560-CR Unified Wire Ethernet Controller 5713 T580-CR Unified Wire Ethernet Controller - 5801 T520-CR Unified Wire Ethernet Controller - 5802 T522-CR Unified Wire Ethernet Controller - 5803 T540-CR Unified Wire Ethernet Controller - 5804 T520-BCH Unified Wire Ethernet Controller - 5805 T540-BCH Unified Wire Ethernet Controller - 5806 T540-CH Unified Wire Ethernet Controller - 5807 T520-SO Unified Wire Ethernet Controller - 5808 T520-CX Unified Wire Ethernet Controller - 5809 T520-BT Unified Wire Ethernet Controller - 580a T504-BT Unified Wire Ethernet Controller - 580b B520-SR Unified Wire Ethernet Controller - 580c B504-BT Unified Wire Ethernet Controller - 580d T580-CR Unified Wire Ethernet Controller - 580e T540-LP-CR Unified Wire Ethernet Controller - 580f T540 [Amsterdam] Unified Wire Ethernet Controller - 5810 T580-LP-CR Unified Wire Ethernet Controller - 5811 T520-LL-CR Unified Wire Ethernet Controller - 5812 T560-CR Unified Wire Ethernet Controller - 5813 T580-CR Unified Wire Ethernet Controller + 5714 T580-LP-SO-CR Unified Wire Ethernet Controller + 5715 T502-BT Unified Wire Ethernet Controller + 5780 T540-5080 Unified Wire Ethernet Controller + 5781 T540-5081 Unified Wire Ethernet Controller + 5783 T540-5083 Unified Wire Ethernet Controller + 5784 T580-5084 Unified Wire Ethernet Controller + 5785 T580-5085 Unified Wire Ethernet Controller + 5801 T520-CR Unified Wire Ethernet Controller [VF] + 5802 T522-CR Unified Wire Ethernet Controller [VF] + 5803 T540-CR Unified Wire Ethernet Controller [VF] + 5804 T520-BCH Unified Wire Ethernet Controller [VF] + 5805 T540-BCH Unified Wire Ethernet Controller [VF] + 5806 T540-CH Unified Wire Ethernet Controller [VF] + 5807 T520-SO Unified Wire Ethernet Controller [VF] + 5808 T520-CX Unified Wire Ethernet Controller [VF] + 5809 T520-BT Unified Wire Ethernet Controller [VF] + 580a T504-BT Unified Wire Ethernet Controller [VF] + 580b B520-SR Unified Wire Ethernet Controller [VF] + 580c B504-BT Unified Wire Ethernet Controller [VF] + 580d T580-CR Unified Wire Ethernet Controller [VF] + 580e T540-LP-CR Unified Wire Ethernet Controller [VF] + 580f T540 [Amsterdam] Unified Wire Ethernet Controller [VF] + 5810 T580-LP-CR Unified Wire Ethernet Controller [VF] + 5811 T520-LL-CR Unified Wire Ethernet Controller [VF] + 5812 T560-CR Unified Wire Ethernet Controller [VF] + 5813 T580-CHR Unified Wire Ethernet Controller [VF] + 5814 T580-LP-SO-CR Unified Wire Ethernet Controller [VF] + 5815 T502-BT Unified Wire Ethernet Controller [VF] + 5880 T540-5080 Unified Wire Ethernet Controller [VF] + 5881 T540-5081 Unified Wire Ethernet Controller [VF] + 5883 T540-5083 Unified Wire Ethernet Controller [VF] + 5884 T580-5084 Unified Wire Ethernet Controller [VF] + 5885 T580-5085 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -13965,6 +15252,12 @@ 144b Verint Systems Inc. 144c Catalina Research Inc 144d Samsung Electronics Co Ltd + 1600 Apple PCIe SSD + a800 XP941 PCIe SSD + a820 NVMe SSD Controller 171X + 1028 1f95 Express Flash NVMe XS1715 SSD 400GB + 1028 1f96 Express Flash NVMe XS1715 SSD 800GB + 1028 1f97 Express Flash NVMe XS1715 SSD 1600GB 144e OLITEC 144f Askey Computer Corp. 1450 Octave Communications Ind. @@ -13990,7 +15283,7 @@ a836 M115 DVB-T, PAL/SECAM/NTSC Tuner e836 M115S Hybrid Analog/DVB PAL/SECAM/NTSC Tuner f436 AVerTV Hybrid+FM -1462 Micro-Star International Co., Ltd. +1462 Micro-Star International Co., Ltd. [MSI] 1463 Fast Corporation 1464 Interactive Circuits & Systems Ltd 1465 GN NETTEST Telecom DIV. @@ -13998,7 +15291,11 @@ 1467 DIGICOM SPA 1468 AMBIT Microsystem Corp. 1469 Cleveland Motion Controls -146a IFR +# formerly IFR. +146a Aeroflex +# 1.5 GHz to 3.0 GHz x 1Hz + 3010 3010 RF Synthesizer + 3a11 3011A PXI RF Synthesizer 146b Parascan Technologies Ltd 146c Ruby Tech Corp. 1430 FE-1430TX Fast Ethernet PCI Adapter @@ -14040,6 +15337,7 @@ 1003 HCF 56k Data/Fax Modem 148e OSI Plus Corporation 148f Plant Equipment, Inc. + 5370 Dexlink AUWL15I1 1490 Stone Microsystems PTY Ltd. 1491 ZEAL Corporation 1492 Time Logic Corporation @@ -14133,6 +15431,7 @@ 103c 1240 Myrinet M2L-PCI64/2-3.0 LANai 7.4 (HP OEM) 14c2 DTK Computer 14c3 MEDIATEK Corp. + 7630 MT7630e 802.11bgn Wireless Network Adapter 14c4 IWASAKI Information Systems Co Ltd 14c5 Automation Products AB 14c6 Data Race Inc @@ -14449,6 +15748,15 @@ 168d NetXtreme II BCM57840 10/20 Gigabit Ethernet 168e NetXtreme II BCM57810 10 Gigabit Ethernet 103c 1798 Flex-10 10Gb 2-port 530FLB Adapter [Meru] + 103c 17a5 HP Flex-10 10Gb 2-port 530M Adapter + 103c 18d3 HP Ethernet 10Gb 2-port 530T Adapter + 103c 1930 HP FlexFabric 10Gb 2-port 534FLR-SFP+ Adapter + 103c 1931 HP StoreFabric CN1100R Dual Port Converged Network Adapter + 103c 1932 HP FlexFabric 10Gb 2-port 534FLB Adapter + 103c 1933 HP FlexFabric 10Gb 2-port 534M Adapter + 103c 193a HP FlexFabric 10Gb 2-port 533FLR-T Adapter + 103c 3382 HP Ethernet 10Gb 2-port 530FLR-SFP+ Adapter + 103c 339d HP Ethernet 10Gb 2-port 530SFP+ Adapter 1690 NetXtreme BCM57760 Gigabit Ethernet PCIe 1691 NetLink BCM57788 Gigabit Ethernet PCIe 1028 04aa XPS 8300 @@ -14474,7 +15782,12 @@ 16a0 NetLink BCM5785 Fast Ethernet 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet + 103c 1916 HP FlexFabric 20Gb 2-port 630FLB Adapter + 103c 1917 HP FlexFabric 20Gb 2-port 630M Adapter + 16a3 NetXtreme BCM57786 Gigabit Ethernet PCIe 16a4 BCM57840 NetXtreme II Ethernet Multi Function + 103c 1916 HP NPAR 20Gb 2-port 630FLB Adapter + 103c 1917 HP NPAR 20Gb 2-port 630M Adapter # The Broadcom 57800 device has two 1Gig ports and two 10Gig ports. The subsystem information can be used to differentiate. 16a5 NetXtreme II BCM57800 1/10 Gigabit Ethernet Multi Function 1028 1f5c NetXtreme II BCM57800 10-Gigabit Ethernet Multi Function @@ -14518,10 +15831,33 @@ 103c 703b NC373i Integrated Multifunction Gigabit Server Adapter 103c 703d NC373F PCI Express Multifunction Gigabit Server Adapter 16ad NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function + 103c 1916 HP FlexFabric 20Gb 2-port 630FLB Adapter + 103c 1917 HP FlexFabric 20Gb 2-port 630M Adapter 16ae NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function + 103c 1798 HP NPAR 10Gb 2-port 530FLB Adapter + 103c 17a5 HP NPAR 10Gb 2-port 530M Adapter + 103c 18d3 HP NPAR 10Gb 2-port 530T Adapter + 103c 1930 HP NPAR 10Gb 2-port 534FLR-SFP+ Adapter + 103c 1931 HP NPAR CN1100R Dual Port Converged Network Adapter + 103c 1932 HP NPAR 10Gb 2-port 534FLB Adapter + 103c 1933 HP NPAR 10Gb 2-port 534M Adapter + 103c 193a HP NPAR 10Gb 2-port 533FLR-T Adapter + 103c 3382 HP NPAR 10Gb 2-port 530FLR-SFP+ Adapter + 103c 339d HP NPAR 10Gb 2-port 530SFP+ Adapter 16af NetXtreme II BCM57810 10 Gigabit Ethernet Virtual Function + 103c 1798 HP Flex-10 10Gb 2-port 530FLB Adapter + 103c 17a5 HP Flex-10 10Gb 2-port 530M Adapter + 103c 18d3 HP Ethernet 10Gb 2-port 530T Adapter + 103c 1930 HP FlexFabric 10Gb 2-port 534FLR-SFP+ Adapter + 103c 1931 HP StoreFabric CN1100R Dual Port Converged Network Adapter + 103c 1932 HP FlexFabric 10Gb 2-port 534FLB Adapter + 103c 1933 HP FlexFabric 10Gb 2-port 534M Adapter + 103c 193a HP FlexFabric 10Gb 2-port 533FLR-T Adapter + 103c 3382 HP Ethernet 10Gb 2-port 530FLR-SFP+ Adapter + 103c 339d HP Ethernet 10Gb 2-port 530SFP+ Adapter 16b0 NetXtreme BCM57761 Gigabit Ethernet PCIe 16b1 NetLink BCM57781 Gigabit Ethernet PCIe + 1849 96b1 Z77 Extreme4 motherboard 16b2 NetLink BCM57791 Gigabit Ethernet PCIe 16b3 NetXtreme BCM57786 Gigabit Ethernet PCIe 16b4 NetXtreme BCM57765 Gigabit Ethernet PCIe @@ -14736,9 +16072,12 @@ 4359 BCM43228 802.11a/b/g/n 1028 0011 Wireless 1530 Half-size Mini PCIe Card 103c 182c BCM943228HM4L 802.11a/b/g/n 2x2 Wi-Fi Adapter + 4360 BCM4360 802.11ac Wireless Network Adapter 4365 BCM43142 802.11b/g/n 1028 0016 Wireless 1704 802.11n + BT 4.0 43a0 BCM4360 802.11ac Wireless Network Adapter + 43a9 BCM43217 802.11b/g/n + 43aa BCM43131 802.11b/g/n 43b1 BCM4352 802.11ac Wireless Network Adapter 4401 BCM4401 100Base-T 1025 0035 TravelMate 660 @@ -14767,7 +16106,7 @@ 4712 BCM47xx V.92 56k modem 4713 Sentry5 Ethernet Controller 4714 BCM47xx Sentry5 External Interface - 4715 Sentry5 USB Controller + 4715 BCM47xx Sentry5 USB / Ethernet Controller 4716 BCM47xx Sentry5 USB Host Controller 4717 BCM47xx Sentry5 USB Device Controller 4718 Sentry5 Crypto Accelerator @@ -14865,6 +16204,7 @@ 1054 HCF 56k Data/Fax/Voice Modem (Worldwide) 1055 HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (Worldwide) 1056 HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide) + 122d 4035 MDP3900V-W 1057 HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide) 1059 HCF 56k Data/Fax/Voice Modem (Worldwide) 1063 HCF 56k Data/Fax Modem @@ -14985,6 +16325,7 @@ 0070 9600 WinTV 88x Video 0070 9802 WinTV-HVR1100 DVB-T/Hybrid (Low Profile) 1002 00f8 ATI TV Wonder Pro + 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder 1043 4823 ASUS PVR-416 107d 6611 Winfast TV 2000XP Expert @@ -15064,11 +16405,12 @@ 18ac db00 DVICO FusionHDTV DVB-T1 5654 2388 GoTView PCI Hybrid Audio Capture Device 8852 CX23885 PCI Video and Audio Decoder - 0070 8010 Hauppauge WinTV HVR-1400 ExpressCard + 0070 8010 WinTV HVR-1400 ExpressCard 107d 6f22 WinFast PxTV1200 1461 c039 AVerTV Hybrid Express (A577) 153b 117e Cinergy T PCIe Dual 18ac db78 FusionHDTV DVB-T Dual Express + 4254 9580 T9580 8880 CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb 0070 c108 WinTV-HVR-4400-HD model 1278 5654 2389 GoTView X5 DVD Hybrid PCI-E @@ -15252,6 +16594,10 @@ 1541 MACHONE Communications 1542 Concurrent Computer Corporation 9260 RCIM-II Real-Time Clock & Interrupt Module + 9272 Pulse Width Modulator Card + 9277 5 Volt Delta Sigma Converter Card + 9278 10 Volt Delta Sigma Converter Card + 9287 Analog Output Card 1543 SILICON Laboratories 3052 Intel 537 [Winmodem] 4c22 Si3036 MC'97 DAA @@ -15273,7 +16619,9 @@ 1553 CHICONY Electronics Co Ltd 1554 PROLINK Microsystems Corp 1555 GESYTEC GmBH -1556 PLD APPLICATIONS +1556 PLDA + 1100 PCI Express Core Reference Design + 110f PCI Express Core Reference Design Virtual Function 1557 MEDIASTAR Co Ltd 1558 CLEVO/KAPOK Computer 1559 SI LOGIC Ltd @@ -15403,11 +16751,13 @@ 0740 Virtual Machine Communication Interface 0770 USB2 EHCI Controller 0774 USB1.1 UHCI Controller - 0778 USB3 xHCI Controller + 0778 USB3 xHCI 0.96 Controller + 0779 USB3 xHCI 1.0 Controller 0790 PCI bridge 07a0 PCI Express Root Port 07b0 VMXNET3 Ethernet Controller 07c0 PVSCSI SCSI Controller + 07e0 SATA AHCI controller 0801 Virtual Machine Interface 15ad 0800 Hypervisor ROM Interface 1977 HD Audio Controller @@ -15421,11 +16771,10 @@ 01ff MT27600 Family [Connect-IB Flash Recovery] 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] - 1004 MT27500 Family [ConnectX-3 Virtual Function] + 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family 1007 MT27520 Family [ConnectX-3 Pro] - 1008 MT27520 Family [ConnectX-3 Pro Virtual Function] 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -15440,6 +16789,8 @@ 1014 MT27621 Family 1015 MT27630 Family 1016 MT27631 Family + 1017 MT27640 Family + 1018 MT27641 Family 5274 MT21108 InfiniBridge 5a44 MT23108 InfiniHost 5a45 MT23108 [Infinihost HCA Flash Recovery] @@ -15502,8 +16853,10 @@ 15bc Agilent Technologies 0100 HPFC-5600 Tachyon DX2+ FC 0103 QX4 PCI Express quad 4-gigabit Fibre Channel controller - 0105 Celerity FC-42XS Fibre Channel Adapter + 0105 Celerity FC-44XS/FC-42XS/FC-41XS/FC-44ES/FC-42ES/FC-41ES 117c 0022 Celerity FC-42XS Fibre Channel Adapter + 117c 0025 Celerity FC-44ES Fibre Channel Adapter + 117c 0026 Celerity FC-42ES Fibre Channel Adapter 1100 E8001-66442 PCI Express CIC 2922 64 Bit, 133MHz PCI-X Exerciser & Protocol Checker 2928 64 Bit, 66MHz PCI Exerciser & Analyzer @@ -15615,10 +16968,14 @@ 0620 FarSync T2U (2 port X.21/V.35/V.24) 0640 FarSync T4U (4 port X.21/V.35/V.24) 1610 FarSync TE1 (T1,E1) + 1612 FarSync TE1 PCI Express (T1,E1) 2610 FarSync DSL-S1 (SHDSL) 3640 FarSync T4E (4-port X.21/V.35/V.24) 4620 FarSync T2Ue PCI Express (2-port X.21/V.35/V.24) 4640 FarSync T4Ue PCI Express (4-port X.21/V.35/V.24) + 5621 FarSync T2Ee PCI Express (2 port X.21/V.35/V.24) + 5641 FarSync T4Ee PCI Express (4 port X.21/V.35/V.24) + 6620 FarSync T2U-PMC PCI Express (2 port X.21/V.35/V.24) 161f Rioworks 1626 TDK Semiconductor Corp. 8410 RTL81xx Fast Ethernet @@ -15648,16 +17005,20 @@ 103c 1743 HP 81B 8Gbps single port FC HBA 1657 0014 415/815 4Gbps/8Gbps single port PCIe FC HBA 0021 804 8Gbps FC HBA for HP Bladesystem c-class - 0022 1867/1860: 16Gbps/10Gbps Fabric Adapter +# AnyIO Adapter + 0022 1860 16Gbps/10Gbps Fabric Adapter 1657 0022 10Gbps CNA - FCOE 1657 0023 10Gbps CNA - LL 1657 0024 16Gbps FC HBA +# Mezz card for IBM + 0023 1867/1869 16Gbps FC HBA # Same Device_ID used for 410 (1port) and 420 (2 port) HBAs. 0646 400 4Gbps PCIe FC HBA 165a Epix Inc c100 PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232] d200 PIXCI(R) D2X Digital Video Capture Board [custom QL5232] d300 PIXCI(R) D3X Digital Video Capture Board [custom QL5232] + eb01 PIXCI(R) EB1 PCI Camera Link Video Capture Board 165d Hsing Tech. Enterprise Co., Ltd. 165f Linux Media Labs, LLC 1020 LMLM4 MPEG-4 encoder @@ -15881,6 +17242,7 @@ 103c 3040 U98Z062.12 802.11bgn Wireless Half-size Mini PCIe Card 105b e017 T77H126.00 802.11bgn Wireless Half-size Mini PCIe Card 105b e023 T77H121.04 802.11bgn Wireless Half-size Mini PCIe Card + 105b e025 T77H121.05 802.11bgn Wireless Half-size Mini PCIe Card 1113 e811 WN7811A (Toshiba PA3722U-1MPC) 802.11bgn Wireless Half-size Mini PCIe Card 185f 30af DNXA-95 802.11bgn Wireless Half-size Mini PCIe Card 1931 0023 Option GTM67x PCIe WiFi Adapter @@ -15901,13 +17263,18 @@ 103c 1838 AR9485/HB125 802.11bgn 11 Wi-Fi Adapter 0033 AR9580 Wireless Network Adapter 0034 AR9462 Wireless Network Adapter + 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter + 0037 AR9485 Wireless Network Adapter +# Also used as Gigabyte GC-WB150 on a PCIe-to-mini-PCIe converter + 1a3b 2100 AW-NB100H 802.11n Wireless Mini PCIe Card 003c QCA988x 802.11ac Wireless Network Adapter 0207 AR5210 Wireless Network Adapter [AR5000 802.11a] 1014 AR5212 802.11abg NIC 1014 058a ThinkPad 11a/b/g Wireless LAN Mini Express Adapter (AR5BXB6) 9013 AR5002X Wireless Network Adapter ff19 AR5006X Wireless Network Adapter + ff1b AR2425 Wireless Network Adapter [AR5007EG 802.11bg] ff1c AR5008 Wireless Network Adapter ff1d AR922x Wireless Network Adapter # Found in "AVM Fritz!Box FON WLAN 7270v3" @@ -15932,6 +17299,7 @@ 16b4 Aspex Semiconductor Ltd 16b8 Sonnet Technologies, Inc. 16be Creatix Polymedia GmbH +16c3 Synopsys, Inc. 16c6 Micrel-Kendin 8695 Centaur KS8695 ARM processor 8842 KSZ8842-PMQL 2-Port Ethernet Switch @@ -16036,6 +17404,7 @@ 0100 NSP2000-SSL crypto accelerator 170c YottaYotta Inc. 1719 EZChip Technologies + 1000 NPA Access Network Processor Family # Seems to be a 2nd ID for Vitesse Semiconductor 1725 Vitesse Semiconductor 7174 VSC7174 PCI/PCI-X Serial ATA Host Bus Controller @@ -16070,10 +17439,12 @@ 175c AudioScience Inc 175e Sanera Systems, Inc. 1760 TEDIA spol. s r. o. + 0101 PCD-7004 Digital Bi-Directional Ports PCI Card + 0102 PCD-7104 Digital Input & Output PCI Card 1771 InnoVISION Multimedia Ltd. # nee SBS Technologies 1775 GE Intelligent Platforms -177d Cavium Networks +177d Cavium, Inc. 0001 Nitrox XL N1 0003 Nitrox XL N1 Lite 0004 Octeon (and older) FIPS @@ -16093,6 +17464,53 @@ 0094 Octeon Fusion CNF71XX Cell processor 0095 Octeon III CN78XX Network Processor 0096 Octeon III CN70XX Network Processor + a001 THUNDERX MRML Bridge + a002 THUNDERX PCC Bridge + 177d a102 CN88XX PCC Bridge + a008 THUNDERX SMMU + 177d a108 CN88XX SMMU + a009 THUNDERX Generic Interrupt Controller + a00a THUNDERX GPIO Controller + a00b THUNDERX MPI / SPI Controller + a00c THUNDERX MIO-PTP Controller + a00d THUNDERX MIX Network Controller + a00e THUNDERX Reset Controller + a00f THUNDERX UART Controller + a010 THUNDERX eMMC/SD Controller + a011 THUNDERX MIO-BOOT Controller + a012 THUNDERX TWSI / I2C Controller + a013 THUNDERX CCPI (Multi-node connect) + a014 THUNDERX Voltage Regulator Module + a015 THUNDERX PCIe Switch Logic Interface + a016 THUNDERX Key Memory + a017 THUNDERX GTI (Global System Timers) + a018 THUNDERX Random Number Generator + a019 THUNDERX DFA + a01a THUNDERX Zip Coprocessor + a01b THUNDERX xHCI USB Controller + a01c THUNDERX AHCI SATA Controller + 177d a11c CN88XX AHCI SATA Controller + a01d THUNDERX RAID Coprocessor + a01e THUNDERX Network Interface Controller + a01f THUNDERX Traffic Network Switch + a020 THUNDERX PEM (PCI Express Interface) + a021 THUNDERX L2C (Level-2 Cache Controller) + a022 THUNDERX LMC (DRAM Controller) + a023 THUNDERX OCLA (On-Chip Logic Analyzer) + a024 THUNDERX OSM + a025 THUNDERX GSER (General Serializer/Deserializer) + a026 THUNDERX BGX (Common Ethernet Interface) + a027 THUNDERX IOBN + a029 THUNDERX NCSI (Network Controller Sideband Interface) + a02a THUNDERX SGP + a02b THUNDERX SMI / MDIO Controller + a02c THUNDERX DAP (Debug Access Port) + a02d THUNDERX PCIERC (PCIe Root Complex) + a02e THUNDERX L2C-TAD + a02f THUNDERX L2C-CBC + a030 THUNDERX L2C-MCI + a031 THUNDERX MIO-FUS (Fuse Access Controller) + a032 THUNDERX FUSF (Fuse Controller) 1787 Hightech Information System Ltd. 1789 Ennyah Technologies Corp. # also used by Struck Innovative Systeme for joint developments @@ -16116,6 +17534,14 @@ 6811 TW6816 multimedia video controller 6812 TW6816 multimedia video controller 6813 TW6816 multimedia video controller +# port 5 of 8 + 6814 TW6816 multimedia video controller +# port 6 of 8 + 6815 TW6816 multimedia video controller +# port 7 of 8 + 6816 TW6816 multimedia video controller +# channel 8 of 8 + 6817 TW6816 multimedia video controller 1799 Belkin 6001 F5D6001 Wireless PCI Card [Realtek RTL8180] 6020 F5D6020 v3000 Wireless PCMCIA Card [Realtek RTL8180] @@ -16307,6 +17733,7 @@ 0701 RT2760 Wireless 802.11n 1T/2R 1737 0074 WMP110 v2 802.11n RangePlus Wireless PCI Adapter 0781 RT2790 Wireless 802.11n 1T/2R PCIe + 1814 2790 RT2790 Wireless 802.11n 1T/2R PCIe 3060 RT3060 Wireless 802.11n 1T/1R 1186 3c04 DWA-525 Wireless N 150 Desktop Adapter (rev.A1) 3062 RT3062 Wireless 802.11n 2T/2R @@ -16315,15 +17742,20 @@ 3091 RT3091 Wireless 802.11n 1T/2R PCIe 3092 RT3092 Wireless 802.11n 2T/2R PCIe 3290 RT3290 Wireless 802.11n 1T/1R PCIe + 103c 18ec Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter 3298 RT3290 Bluetooth + 103c 18ec Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter 3592 RT3592 Wireless 802.11abgn 2T/2R PCIe + 359f RT3592 PCIe Wireless Network Adapter 5360 RT5360 Wireless 802.11n 1T/1R 1186 3c05 DWA-525 Wireless N 150 Desktop Adapter (rev.A2) 20f4 703a TEW-703PI N150 Wireless PCI Adapter 5390 RT5390 Wireless 802.11n 1T/1R PCIe 103c 1636 U98Z077.00 Half-size Mini PCIe Card + 5392 RT5392 PCIe Wireless Network Adapter 539f RT5390 [802.11 b/g/n 1T1R G-band PCI Express Single Chip] 103c 1637 Pavilion DM1Z-3000 PCIe wireless card + 5592 RT5592 PCIe Wireless Network Adapter e932 RT2560F 802.11 b/g PCI 1815 Devolo AG 1820 InfiniCon Systems Inc. @@ -16432,6 +17864,7 @@ 18d8 Dialogue Technology Corp. 18dd Artimi Inc 4c6f Artimi RTMI-100 UWB adapter +18df LeWiz Communications 18e6 MPL AG 0001 OSCI [Octal Serial Communication Interface] 18eb Advance Multimedia Internet Technology, Inc. @@ -16508,6 +17941,8 @@ 0115 NT20E2-PTP Network Adapter 2x10Gb 0125 NT4E2-4-PTP Network Adapter 4x1Gb 0135 NT20E2-PTP Network Adapter 2x10Gb + 0145 NT40E3-4-PTP Network Adapter 4x10Gb + 0155 NT100E3-1-PTP Network Adapter 1x100Gb 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -16643,6 +18078,16 @@ 1924 6904 SFN5111T-R4 10GBASE-T Server Adapter 1924 7104 SFN5161T-R4 10GBASE-T Server Adapter 1924 7904 SFN5151T-R4 10GBASE-T Server Adapter + 0903 SFC9120 + 1014 04cc SFN7122F-R2 2x10GbE SFP+ Flareon Ultra + 1924 8002 SFN7122F-R1 SFP+ Server Adapter + 1924 8003 SFN7x41Q-R1 Flareon Ultra 7000 Series 10/40G Adapter + 1924 8006 SFN7022F-R1 SFP+ Server Adapter + 1924 8007 SFN7322F-R2 Precision Time SFP+ Server Adapter + 1924 8009 SFN7x22F-R2 Flareon Ultra 7000 Series 10G Adapter + 1924 800a SFN7x02F-R2 Flareon 7000 Series 10G Adapter + 0923 SFC9140 + 1924 800b SFN7x42Q-R1 Flareon Ultra 7000 Series 10/40G Adapter 1803 SFC9020 Virtual Function [Solarstorm] 1813 SFL9021 Virtual Function [Solarstorm] 6703 SFC4000 rev A iSCSI/Onload [Solarstorm] @@ -16672,6 +18117,8 @@ 0364 AHA364-PCIe 0367 AHA367-PCIe 0370 AHA370-PCIe + 3641 AHA3641 + 3642 AHA3642 1942 ClearSpeed Technology plc e511 Advance X620 accelerator card e521 Advance e620 accelerator card @@ -16723,10 +18170,14 @@ 0082 MPC8347E TBGA 0083 MPC8347 TBGA 0084 MPC8347E PBGA + 110a 4074 SIMATIC NET CP 1628 0085 MPC8347 PBGA + 110a 4046 SIMATIC NET CP 1623 0086 MPC8343E 0087 MPC8343 00b4 MPC8315E + 00b6 MPC8314E + 1a56 1101 Killer Xeno Pro Gigabit Ethernet Controller 00c2 MPC8379E 00c3 MPC8379 00c4 MPC8378E @@ -16755,6 +18206,8 @@ 7010 MPC8641 PCI Host Bridge 7011 MPC8641D PCI Host Bridge 7018 MPC8610 + c006 MPC8308 + 1a56 1201 Killer E2100 Gigabit Ethernet Controller 1958 Faster Technology, LLC. 1959 PA Semi, Inc a000 PA6T Core @@ -16783,6 +18236,7 @@ 1062 AR8132 Fast Ethernet 1063 AR8131 Gigabit Ethernet 1458 e000 GA-G31M-ES2L Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 1066 Attansic L2c Gigabit Ethernet 1067 Attansic L1c Gigabit Ethernet 1073 AR8151 v1.0 Gigabit Ethernet @@ -16795,7 +18249,8 @@ 2048 Attansic L2 Fast Ethernet 2060 AR8152 v1.1 Fast Ethernet 2062 AR8152 v2.0 Fast Ethernet - e091 Killer E2200 Gigabit Ethernet Controller +# E2200, E2201, E2205 + e091 Killer E220x Gigabit Ethernet Controller 196a Sensory Networks Inc. 0101 NodalCore C-1000 Content Classification Accelerator 0102 NodalCore C-2000 Content Classification Accelerator @@ -16876,9 +18331,11 @@ 103c 3340 NC552SFP 2-port 10Gb Server Adapter 103c 3341 NC552m 10Gb 2-port FlexFabric Converged Network Adapter 103c 3345 NC553m 10Gb 2-port FlexFabric Converged Network Adapter + 103c 337b NC554FLB 10Gb 2-port FlexFabric Converged Network Adapter 0712 OneConnect 10Gb iSCSI Initiator (be3) 0714 OneConnect 10Gb FCoE Initiator (be3) 103c 3315 NC553i 10Gb 2-port FlexFabric Converged Network Adapter + 103c 337b NC554FLB 10Gb 2-port FlexFabric Converged Network Adapter 19a8 DAQDATA GmbH 19ac Kasten Chase Applied Research 0001 ACA2400 Crypto Accelerator @@ -16924,6 +18381,8 @@ 1a1e 3Leaf Systems, Inc. 1a22 Ambric Inc. 1a29 Fortinet, Inc. + 4338 CP8 Content Processor ASIC + 4e36 NP6 Network Processor 1a2b Ascom AG 0000 GESP v1.2 0001 GESP v1.3 @@ -16931,6 +18390,11 @@ 0005 ETP v1.4 000a ETP-104 v1.1 000e DSLP-104 v1.1 +# nee Metalink Ltd. +1a30 Lantiq + 0680 MtW8171 [Hyperion II] + 0700 Wave300 PSB8224 [Hyperion III] + 0710 Wave300 PSB8231 [Hyperion III] 1a32 Quanta Microsystems, Inc 1a3b AzureWave 1112 AR9285 Wireless Network Adapter (PCI-Express) @@ -16938,11 +18402,13 @@ 0001 TILE64 processor 0002 TILEPro processor 0200 TILE-Gx processor - 2000 TILE-Gx PCI Express Bridge + 0201 TILE-Gx Processor Virtual Function + 2000 TILE-Gx PCI Express Root Port 1a4a SLAC National Accelerator Lab PPA-REG 1000 MCOR Power Supply Controller 1010 AMC EVR - Stockholm Timing Board 2000 PGPCard - 4 Lane + 2001 PGPCard - 8 Lane Plus EVR 2010 PCI-Express EVR 1a51 Hectronic AB 1a55 Rohde & Schwarz DVS GmbH @@ -16975,7 +18441,7 @@ 1a76 Wavesat 1a77 Lightfleet Corporation 1a78 Virident Systems Inc. - 0031 Virident FlashMAX Drive + 0031 FlashMAX Drive 1a78 0034 FlashMAX PCIe SSD [rev 3] 1a78 0037 FlashMAX PCIe SSD [rev 3D] 1a78 0038 FlashMAX PCIe SSD [rev 4] @@ -16983,6 +18449,7 @@ 0040 FlashMAX II 0041 FlashMAX II 0042 FlashMAX II + 0050 FlashMAX III 1a84 Commex Technologies 0001 Vulcan SP HT6210 10-Gigabit Ethernet (rev 02) 1a88 MEN Mikro Elektronik @@ -17003,6 +18470,7 @@ 4005 Accelerated Virtual Video Adapter 4006 Memory Ballooning Controller 1ab9 Espia Srl +1ac8 Aeroflex Gaisler 1acc Point of View BV 1ad7 Spectracom Corporation 8000 TSync-PCIe Time Code Processor @@ -17037,6 +18505,9 @@ 1007 ioXtreme Pro 1008 ioXtreme-2 2001 ioDrive2 + 3001 ioMemory FHHL + 3002 ioMemory HHHL + 3003 ioMemory Mezzanine 1aee Caustic Graphics Inc. # nee Qumranet, Inc. 1af4 Red Hat, Inc @@ -17047,6 +18518,10 @@ 1004 Virtio SCSI 1005 Virtio RNG 1009 Virtio filesystem + 1010 Virtio GPU + 1012 Virtio input device + 1110 Inter-VM shared memory + 1af4 1100 QEMU Virtual Machine 1af5 Netezza Corp. 1afa J & W Electronics Co., Ltd. 1b03 Magnum Semiconductor, Inc, @@ -17059,10 +18534,26 @@ 1b21 ASMedia Technology Inc. 0611 ASM1061 SATA IDE Controller 0612 ASM1062 Serial ATA Controller + 1849 0612 Motherboard 1042 ASM1042 SuperSpeed USB Host Controller + 1043 8488 P8B WS Motherboard + 1849 1042 Motherboard 1080 ASM1083/1085 PCIe to PCI Bridge + 1849 1080 Motherboard + 1142 ASM1042A USB 3.0 Host Controller 1b2c Opal-RT Technologies Inc. 1b36 Red Hat, Inc. + 0001 QEMU PCI-PCI bridge + 0002 QEMU PCI 16550A Adapter + 1af4 1100 QEMU Virtual Machine + 0003 QEMU PCI Dual-port 16550A Adapter + 1af4 1100 QEMU Virtual Machine + 0004 QEMU PCI Quad-port 16550A Adapter + 1af4 1100 QEMU Virtual Machine + 0005 QEMU PCI Test Device + 1af4 1100 QEMU Virtual Machine + 0100 QXL paravirtual graphic card + 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB 0014 ADQ412 1b3a Westar Display Technologies @@ -17085,13 +18576,20 @@ 9130 88SE9128 PCIe SATA 6 Gb/s RAID controller with HyperDuo 1043 8438 P8P67 Deluxe Motherboard 9172 88SE9172 SATA 6Gb/s Controller + 9178 88SE9170 PCIe SATA 6Gb/s Controller 917a 88SE9172 SATA III 6Gb/s RAID Controller + 9183 88SS9183 PCIe SSD Controller 9192 88SE9172 SATA III 6Gb/s RAID Controller - 91a0 88SE91A0 SATA 6Gb/s Controller + 91a0 88SE912x SATA 6Gb/s Controller [IDE mode] 91a4 88SE912x IDE Controller + 9220 88SE9220 PCIe 2.0 x2 2-port SATA 6 Gb/s RAID Controller 9230 88SE9230 PCIe SATA 6Gb/s Controller + 9235 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller + 9445 88SE9445 PCIe 2.0 x4 4-Port SAS/SATA 6 Gbps RAID Controller 9480 88SE9480 SAS/SATA 6Gb/s RAID controller + 9485 88SE9485 SAS/SATA 6Gb/s controller 1b55 NetUP Inc. + 18f6 Dual DVB Universal CI card 2a2c Dual DVB-S2-CI card e2e4 Dual DVB-T/C-CI RF card # 2xHDMI and 2xHD-SDI inputs @@ -17134,11 +18632,23 @@ 0003 MAX3 0004 MAX4 1bf4 VTI Instruments Corporation + 0001 SentinelEX +1bfd EeeTOP 1c1c Symphony 0001 82C101 1c2c Fiberblaze + 000a Capture + 000f SmartNIC + 00a0 FBC4G Capture 4x1Gb + 00a1 FBC4XG Capture 4x10Gb + 00a2 FBC8XG Capture 8x10Gb + 00a3 FBC2XG Capture 2x10Gb + 00a4 FBC4XGG3 Capture 4x10Gb + 00a5 FBC2XLG Capture 2x40Gb + 00a6 FBC1CG Capture 1x100Gb # Used on V120 VME Crate Controller 1c32 Highland Technology, Inc. +1c33 Daktronics, Inc 1c3b Accensus, LLC 0200 Telas2 # http://www.accensusllc.com/accensustelas2.html @@ -17150,6 +18660,14 @@ 1c8a TSF5 Corporation 0001 Hunter PCI Express 1cb1 Collion UG & Co.KG +1cc5 Embedded Intelligence, Inc. + 0100 CAN-PCIe-02 +1ce4 Exablaze + 0001 ExaNIC X4 + 0002 ExaNIC X2 +1cf7 Subspace Dynamics +# CEM Solutions Pvt. Ltd. +1d21 Allo 1d44 DPT a400 PM2x24/PM3224 1d5c Fantasia Trading LLC @@ -17352,6 +18870,7 @@ 416c Aladdin Knowledge Systems 0100 AladdinCARD 0200 CPC +4254 DVBSky 4321 Tata Power Strategic Electronics Division 434e CAST Navigation LLC 4444 Internext Compression Inc @@ -17530,7 +19049,6 @@ 5053 Voyetra Technologies 2010 Daytona Audio Adapter 50b2 TerraTec Electronic GmbH - 1111 Terratec XLerate 5136 S S Technologies 5143 Qualcomm Inc 5145 Ensoniq (Old) @@ -17733,6 +19251,10 @@ 1025 16 photo couple 16 relay Card 4000 WatchDog Card 6688 Zycoo Co., Ltd + 1200 CooVox TDM Analog Module + 1400 CooVOX TDM GSM Module + 1600 CooVOX TDM E1/T1 Module + 1800 CooVOX TDM BRI Module # nee Qumranet 6900 Red Hat, Inc. 7063 pcHDTV @@ -17760,9 +19282,14 @@ 0044 Core Processor DRAM Controller 1025 0347 Aspire 7740G 1025 0487 TravelMate 5742 + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 0045 Core Processor PCI Express x16 Root Port + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 0046 Core Processor Integrated Graphics Controller + 144d c06a R730 Laptop + 17c0 10d9 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 0047 Core Processor Secondary PCI Express Root Port 0048 Core Processor DRAM Controller @@ -17824,12 +19351,13 @@ 8086 5226 Centrino Advanced-N 6230 ABG 0100 2nd Generation Core Processor Family DRAM Controller 1028 04aa XPS 8300 - 1043 844d P8P67 Deluxe Motherboard + 1043 844d P8P67/P8H67 Series Motherboard 0101 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 1028 04b2 Vostro 3350 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0102 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04aa XPS 8300 + 1043 0102 P8H67 Series Motherboard 0104 2nd Generation Core Processor Family DRAM Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 @@ -17852,31 +19380,43 @@ 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 15d9 0624 X9SCM-F Motherboard + 1849 0150 Motherboard 0151 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port 1043 1477 N56VZ + 1043 844d P8 series motherboard 1043 84ca P8H77-I Motherboard + 8086 2010 Server Board S1200BTS 0152 Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller 1043 84ca P8H77-I Motherboard 0153 3rd Gen Core Processor Thermal Subsystem 1043 1517 Zenbook Prime UX31A 0154 3rd Gen Core processor DRAM Controller + 1025 0813 Aspire R7-571 103c 17f6 ProBook 4540s 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 0155 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port + 8086 2010 Server Board S1200BTS 0156 3rd Gen Core processor Graphics Controller 0158 Xeon E3-1200 v2/Ivy Bridge DRAM Controller + 1043 844d P8 series motherboard + 8086 2010 Server Board S1200BTS 0159 Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port 015a Xeon E3-1200 v2/Ivy Bridge Graphics Controller 015c Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 015d Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port + 1043 844d P8 series motherboard 015e Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller 0162 Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller + 1043 84ca P8 series motherboard + 1849 0162 Motherboard 0166 3rd Gen Core processor Graphics Controller 1043 1517 Zenbook Prime UX31A 1043 2103 N56VZ 016a Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller + 1043 844d P8B WS Motherboard 0172 Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller 0176 3rd Gen Core processor Graphics Controller 0309 80303 I/O Processor PCI-to-PCI Bridge @@ -17909,7 +19449,9 @@ 040a Xeon E3-1200 v3 Processor Integrated Graphics Controller 0412 Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller 0416 4th Gen Core Processor Integrated Graphics Controller + 17aa 220e ThinkPad T440p 041a Xeon E3-1200 v3 Processor Integrated Graphics Controller + 041e 4th Generation Core Processor Family Integrated Graphics Controller 0433 Coleto Creek ACC - ME/CPM interface 0435 Coleto Creek PCIe Endpoint 0436 DH8900CC Null Device @@ -18126,12 +19668,86 @@ 8086 0270 Dual Band Wireless-AC 3160 # Wilkins Peak 1 1x1 80Mhz + BT - lenovo/HP 8086 8270 Dual Band Wireless AC 3160 +# PowerVR SGX 545 + 08cf Atom Processor Z2760 Integrated Graphics Controller + 095a Wireless 7265 +# Stone Peak 2 AC + 8086 1010 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 5000 Dual Band Wireless-N 7265 +# Stone Peak 2 BGN + 8086 5002 Wireless-N 7265 +# Stone Peak 2 AGN + 8086 500a Dual Band Wireless-N 7265 +# Stone Peak 2 AC + 8086 5010 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 5012 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 5020 Dual Band Wireless-N 7265 +# Stone Peak 2 AGN + 8086 502a Dual Band Wireless-N 7265 +# Maple Peak AC + 8086 5090 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 5100 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 510a Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 5110 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 5112 Dual Band Wireless-AC 7265 +# Maple Peak AC + 8086 5190 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 5400 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 5410 Dual Band Wireless-AC 7265 +# Stone Peak 2 AGN + 8086 5420 Dual Band Wireless-N 7265 +# Maple Peak AC + 8086 5490 Dual Band Wireless-AC 7265 +# Maple Peak AC + 8086 5590 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9010 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9012 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9110 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9112 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9210 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9310 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9410 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 9510 Dual Band Wireless-AC 7265 + 095b Wireless 7265 +# Stone Peak 2 AGN + 8086 5200 Dual Band Wireless-N 7265 +# Stone Peak 2 BGN + 8086 5202 Wireless-N 7265 +# Stone Peak 2 AC + 8086 5210 Dual Band Wireless-AC 7265 +# Maple Peak AC + 8086 5290 Dual Band Wireless-AC 7265 +# Stone Peak 2 BGN + 8086 5302 Dual Band Wireless-AC 7265 +# Stone Peak 2 AC + 8086 5310 Dual Band Wireless-AC 7265 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge 0a04 Haswell-ULT DRAM Controller + 17aa 2214 ThinkPad X240 0a06 Haswell-ULT Integrated Graphics Controller + 0a0c Haswell-ULT HD Audio Controller + 17aa 2214 ThinkPad X240 0a16 Haswell-ULT Integrated Graphics Controller + 17aa 2214 ThinkPad X240 0a22 Haswell-ULT Integrated Graphics Controller 0a26 Haswell-ULT Integrated Graphics Controller 0a2a Haswell-ULT Integrated Graphics Controller @@ -18164,10 +19780,13 @@ 0c00 4th Gen Core Processor DRAM Controller 0c01 Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller 0c04 Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 0c05 Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller 0c08 Xeon E3-1200 v3 Processor DRAM Controller 0c09 Xeon E3-1200 v3/4th Gen Core Processor PCI Express x4 Controller 0c0c Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller + 17aa 220e ThinkPad T440p 0c46 Atom Processor S1200 PCI Express Root Port 1 0c47 Atom Processor S1200 PCI Express Root Port 2 0c48 Atom Processor S1200 PCI Express Root Port 3 @@ -18209,201 +19828,168 @@ 0d16 Crystal Well Integrated Graphics Controller 0d26 Crystal Well Integrated Graphics Controller 0d36 Crystal Well Integrated Graphics Controller - 0e00 Ivytown DMI2 - 0e01 Ivytown PCI Express Root Port in DMI2 Mode - 0e02 Ivytown PCI Express Root Port 1a - 0e03 Ivytown PCI Express Root Port 1b - 0e04 Ivytown PCI Express Root Port 2a - 0e05 Ivytown PCI Express Root Port 2b - 0e06 Ivytown PCI Express Root Port 2c - 0e07 Ivytown PCI Express Root Port 2d - 0e08 Ivytown PCI Express Root Port 3a - 0e09 Ivytown PCI Express Root Port 3b - 0e0a Ivytown PCI Express Root Port 3c - 0e0b Ivytown PCI Express Root Port 3d - 0e1c Ivytown Debug and Error Injection Related Registers - 0e1d Ivytown R2PCIe - 0e1e Ivytown Semaphore and Scratchpad Configuration Registers - 0e1f Ivytown Semaphore and Scratchpad Configuration Registers - 0e20 Ivytown Crystal Beach DMA Channel 0 - 0e21 Ivytown Crystal Beach DMA Channel 1 - 0e22 Ivytown Crystal Beach DMA Channel 2 - 0e23 Ivytown Crystal Beach DMA Channel 3 - 0e24 Ivytown Crystal Beach DMA Channel 4 - 0e25 Ivytown Crystal Beach DMA Channel 5 - 0e26 Ivytown Crystal Beach DMA Channel 6 - 0e27 Ivytown Crystal Beach DMA Channel 7 - 0e28 Ivytown VTd/Memory Map/Misc - 0e29 Ivytown Memory Hotplug - 0e2a Ivytown IIO RAS - 0e2c Ivytown IOAPIC - 0e2e Ivytown CBDMA - 0e2f Ivytown CBDMA - 0e30 Ivytown Home Agent 0 - 0e32 Ivytown QPI Link 0 - 0e33 Ivytown QPI Link 1 - 0e34 Ivytown PCI Express Ring Performance Monitoring - 0e36 Ivytown QPI Ring Performance Ring Monitoring - 0e37 Ivytown QPI Ring Performance Ring Monitoring - 0e38 Ivytown Home Agent 1 - 0e3a Ivytown QPI Link 2 - 0e3e Ivytown QPI Ring Performance Ring Monitoring - 0e3f Ivytown QPI Ring Performance Ring Monitoring - 0e40 Ivytown QPI Link 2 - 0e41 Ivytown QPI Ring Registers - 0e43 Ivytown QPI Link Reut 2 - 0e44 Ivytown QPI Link Reut 2 - 0e60 Ivytown Home Agent 1 - 0e68 Ivytown Integrated Memory Controller 1 Target Address/Thermal Registers - 0e6a Ivytown Integrated Memory Controller 1 Channel Target Address Decoder Registers - 0e6b Ivytown Integrated Memory Controller 1 Channel Target Address Decoder Registers - 0e6c Ivytown Integrated Memory Controller 1 Channel Target Address Decoder Registers - 0e6d Ivytown Integrated Memory Controller 1 Channel Target Address Decoder Registers - 0e71 Ivytown Integrated Memory Controller 0 RAS Registers - 0e79 Ivytown Integrated Memory Controller 1 RAS Registers - 0e80 Ivytown QPI Link 0 - 0e81 Ivytown QPI Ring Registers - 0e83 Ivytown QPI Link Reut 0 - 0e84 Ivytown QPI Link Reut 0 - 0e90 Ivytown QPI Link 1 - 0e93 Ivytown QPI Link 1 - 0e94 Ivytown QPI Link Reut 1 - 0ea0 Ivytown Home Agent 0 - 0ea8 Ivytown Integrated Memory Controller 0 Target Address/Thermal Registers - 0eaa Ivytown Integrated Memory Controller 0 Channel Target Address Decoder Registers - 0eab Ivytown Integrated Memory Controller 0 Channel Target Address Decoder Registers - 0eac Ivytown Integrated Memory Controller 0 Channel Target Address Decoder Registers - 0ead Ivytown Integrated Memory Controller 0 Channel Target Address Decoder Registers - 0eb0 Ivytown Integrated Memory Controller 1 Channel 0-3 Thermal Control 0 - 0eb1 Ivytown Integrated Memory Controller 1 Channel 0-3 Thermal Control 1 - 0eb2 Ivytown Integrated Memory Controller 1 Channel 0-3 ERROR Registers 0 - 0eb3 Ivytown Integrated Memory Controller 1 Channel 0-3 ERROR Registers 1 - 0eb4 Ivytown Integrated Memory Controller 1 Channel 0-3 Thermal Control 2 - 0eb5 Ivytown Integrated Memory Controller 1 Channel 0-3 Thermal Control 3 - 0eb6 Ivytown Integrated Memory Controller 1 Channel 0-3 ERROR Registers 2 - 0eb7 Ivytown Integrated Memory Controller 1 Channel 0-3 ERROR Registers 3 - 0ec0 Ivytown Power Control Unit 0 - 0ec1 Ivytown Power Control Unit 1 - 0ec2 Ivytown Power Control Unit 2 - 0ec3 Ivytown Power Control Unit 3 - 0ec4 Ivytown Power Control Unit 4 - 0ec8 Ivytown System Address Decoder - 0ec9 Ivytown Broadcast Registers - 0eca Ivytown Broadcast Registers - 0ed8 Ivytown DDRIO - 0ed9 Ivytown DDRIO - 0edc Ivytown DDRIO - 0edd Ivytown DDRIO - 0ede Ivytown DDRIO - 0edf Ivytown DDRIO - 0ee0 Ivytown Unicast Registers - 0ee1 Ivytown Unicast Registers - 0ee2 Ivytown Unicast Registers - 0ee3 Ivytown Unicast Registers - 0ee4 Ivytown Unicast Registers - 0ee5 Ivytown Unicast Registers - 0ee6 Ivytown Unicast Registers - 0ee7 Ivytown Unicast Registers - 0ee8 Ivytown Unicast Registers - 0ee9 Ivytown Unicast Registers - 0eea Ivytown Unicast Registers - 0eeb Ivytown Unicast Registers - 0eec Ivytown Unicast Registers - 0eed Ivytown Unicast Registers - 0eee Ivytown Unicast Registers - 0ef0 Ivytown Integrated Memory Controller 0 Channel 0-3 Thermal Control 0 - 0ef1 Ivytown Integrated Memory Controller 0 Channel 0-3 Thermal Control 1 - 0ef2 Ivytown Integrated Memory Controller 0 Channel 0-3 ERROR Registers 0 - 0ef3 Ivytown Integrated Memory Controller 0 Channel 0-3 ERROR Registers 1 - 0ef4 Ivytown Integrated Memory Controller 0 Channel 0-3 Thermal Control 2 - 0ef5 Ivytown Integrated Memory Controller 0 Channel 0-3 Thermal Control 3 - 0ef6 Ivytown Integrated Memory Controller 0 Channel 0-3 ERROR Registers 2 - 0ef7 Ivytown Integrated Memory Controller 0 Channel 0-3 ERROR Registers 3 - 0ef8 Ivytown DDRIO - 0ef9 Ivytown DDRIO - 0efa Ivytown DDRIO - 0efb Ivytown DDRIO - 0efc Ivytown DDRIO - 0efd Ivytown DDRIO - 0f00 ValleyView SSA-CUnit - 0f01 ValleyView SSA-CUnit - 0f02 ValleyView SSA-CUnit - 0f03 ValleyView SSA-CUnit - 0f04 ValleyView High Definition Audio Controller - 0f05 ValleyView High Definition Audio Controller - 0f06 ValleyView LPIO1 DMA Controller - 0f07 ValleyView LPIO1 DMA Controller - 0f08 ValleyView LPIO1 PWM Controller - 0f09 ValleyView LPIO1 PWM Controller - 0f0a ValleyView LPIO1 HSUART Controller #1 - 0f0b ValleyView LPIO1 HSUART Controller #1 - 0f0c ValleyView LPIO1 HSUART Controller #2 - 0f0d ValleyView LPIO1 HSUART Controller #2 - 0f0e ValleyView LPIO1 SPI Controller - 0f0f ValleyView LPIO1 SPI Controller - 0f10 ValleyView LPIO1 Controller - 0f11 ValleyView LPIO1 Controller - 0f12 ValleyView SMBus Controller - 0f13 ValleyView SMBus Controller - 0f14 ValleyView SDIO Controller - 0f15 ValleyView SDIO Controller - 0f16 ValleyView SDIO Controller - 0f17 ValleyView SDIO Controller - 0f18 ValleyView SEC - 0f19 ValleyView SEC - 0f1a ValleyView SEC - 0f1b ValleyView SEC - 0f1c ValleyView Power Control Unit - 0f1d ValleyView Power Control Unit - 0f1e ValleyView Power Control Unit - 0f1f ValleyView Power Control Unit - 0f20 ValleyView 4-Port SATA Storage Controller - 0f21 ValleyView 4-Port SATA Storage Controller - 0f22 ValleyView 6-Port SATA AHCI Controller - 0f23 ValleyView 6-Port SATA AHCI Controller - 0f24 ValleyView SATA RAID Storage Controller - 0f25 ValleyView SATA RAID Storage Controller - 0f26 ValleyView 2-Port SATA Storage Controller - 0f27 ValleyView 2-Port SATA Storage Controller - 0f28 ValleyView LPE Audio Controller - 0f29 ValleyView LPE Audio Controller - 0f2a ValleyView LPE Audio Controller - 0f2b ValleyView LPE Audio Controller - 0f2e ValleyView SATA RAID Storage Controller - 0f2f ValleyView SATA RAID Storage Controller - 0f30 ValleyView Gen7 - 0f31 ValleyView Gen7 - 0f32 ValleyView Gen7 - 0f33 ValleyView Gen7 - 0f34 ValleyView USB Enhanced Host Controller - 0f35 ValleyView USB xHCI Host Controller - 0f36 ValleyView USB xHCI Host Controller - 0f37 ValleyView OTG - 0f38 ValleyView ISP - 0f39 ValleyView ISP - 0f3a ValleyView ISP - 0f3b ValleyView ISP - 0f3c ValleyView ISP - 0f3d ValleyView ISP - 0f3e ValleyView ISP - 0f3f ValleyView ISP - 0f40 ValleyView LPIO2 DMA Controller - 0f41 ValleyView LPIO2 I2C Controller #1 - 0f42 ValleyView LPIO2 I2C Controller #2 - 0f43 ValleyView LPIO2 I2C Controller #3 - 0f44 ValleyView LPIO2 I2C Controller #4 - 0f45 ValleyView LPIO2 I2C Controller #5 - 0f46 ValleyView LPIO2 I2C Controller #6 - 0f47 ValleyView LPIO2 I2C Controller #7 - 0f48 ValleyView PCI Express Root Port - 0f49 ValleyView PCI Express Root Port - 0f4a ValleyView PCI Express Root Port - 0f4b ValleyView PCI Express Root Port - 0f4c ValleyView PCI Express Root Port - 0f4d ValleyView PCI Express Root Port - 0f4e ValleyView PCI Express Root Port - 0f4f ValleyView PCI Express Root Port - 0f50 ValleyView MIPI-HSI Controller + 0e00 Xeon E7 v2/Xeon E5 v2/Core i7 DMI2 + 0e01 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port in DMI2 Mode + 0e02 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 1a + 0e03 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 1b + 0e04 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 2a + 0e05 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 2b + 0e06 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 2c + 0e07 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 2d + 0e08 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3a + 0e09 Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3b + 0e0a Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3c + 0e0b Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3d + 0e10 Xeon E7 v2/Xeon E5 v2/Core i7 IIO Configuration Registers + 0e13 Xeon E7 v2/Xeon E5 v2/Core i7 IIO Configuration Registers + 0e17 Xeon E7 v2/Xeon E5 v2/Core i7 IIO Configuration Registers + 0e18 Xeon E7 v2/Xeon E5 v2/Core i7 IIO Configuration Registers + 0e1c Xeon E7 v2/Xeon E5 v2/Core i7 IIO Configuration Registers + 0e1d Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe + 0e1e Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers + 0e1f Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers + 0e20 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 0 + 0e21 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 1 + 0e22 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 2 + 0e23 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 3 + 0e24 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 4 + 0e25 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 5 + 0e26 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 6 + 0e27 Xeon E7 v2/Xeon E5 v2/Core i7 Crystal Beach DMA Channel 7 + 0e28 Xeon E7 v2/Xeon E5 v2/Core i7 VTd/Memory Map/Misc + 0e29 Xeon E7 v2/Xeon E5 v2/Core i7 Memory Hotplug + 0e2a Xeon E7 v2/Xeon E5 v2/Core i7 IIO RAS + 0e2c Xeon E7 v2/Xeon E5 v2/Core i7 IOAPIC + 0e2e Xeon E7 v2/Xeon E5 v2/Core i7 CBDMA + 0e2f Xeon E7 v2/Xeon E5 v2/Core i7 CBDMA + 0e30 Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0 + 0e32 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 0 + 0e33 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1 + 0e34 Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe + 0e36 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring + 0e37 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring + 0e38 Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 1 + 0e3a Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 2 + 0e3e Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring + 0e3f Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring + 0e40 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 2 + 0e41 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers + 0e43 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Reut 2 + 0e44 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Reut 2 + 0e45 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Agent Register + 0e47 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Agent Register + 0e60 Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 1 + 0e68 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Target Address/Thermal Registers + 0e6a Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel Target Address Decoder Registers + 0e6b Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel Target Address Decoder Registers + 0e6c Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel Target Address Decoder Registers + 0e6d Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel Target Address Decoder Registers + 0e71 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 RAS Registers + 0e74 Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe + 0e75 Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe + 0e77 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers + 0e79 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 RAS Registers + 0e7d Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers + 0e7f Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers + 0e80 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 0 + 0e81 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers + 0e83 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Reut 0 + 0e84 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Reut 0 + 0e85 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Agent Register + 0e87 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Registers + 0e90 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1 + 0e93 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1 + 0e94 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Reut 1 + 0e95 Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link Agent Register + 0ea0 Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0 + 0ea8 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Target Address/Thermal Registers + 0eaa Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers + 0eab Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers + 0eac Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers + 0ead Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers + 0eae Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO Registers + 0eaf Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO Registers + 0eb0 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 0 + 0eb1 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 1 + 0eb2 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 0 + 0eb3 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 1 + 0eb4 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 2 + 0eb5 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 3 + 0eb6 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 2 + 0eb7 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 3 + 0ebc Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO Registers + 0ebe Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO Registers + 0ebf Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO Registers + 0ec0 Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 0 + 0ec1 Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 1 + 0ec2 Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 2 + 0ec3 Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 3 + 0ec4 Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 4 + 0ec8 Xeon E7 v2/Xeon E5 v2/Core i7 System Address Decoder + 0ec9 Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers + 0eca Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers + 0ed8 Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0ed9 Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0edc Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0edd Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0ede Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0edf Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0ee0 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee1 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee2 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee3 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee4 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee5 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee6 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee7 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee8 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ee9 Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0eea Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0eeb Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0eec Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0eed Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0eee Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers + 0ef0 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 Thermal Control 0 + 0ef1 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 Thermal Control 1 + 0ef2 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 ERROR Registers 0 + 0ef3 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 ERROR Registers 1 + 0ef4 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 Thermal Control 2 + 0ef5 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 Thermal Control 3 + 0ef6 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 ERROR Registers 2 + 0ef7 Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel 0-3 ERROR Registers 3 + 0ef8 Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0ef9 Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0efa Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0efb Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0efc Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0efd Xeon E7 v2/Xeon E5 v2/Core i7 DDRIO + 0f00 Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register + 0f04 Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller + 0f06 Atom Processor Z36xxx/Z37xxx Series LPIO1 DMA Controller + 0f08 Atom Processor Z36xxx/Z37xxx Series LPIO1 PWM Controller + 0f09 Atom Processor Z36xxx/Z37xxx Series LPIO1 PWM Controller + 0f0a Atom Processor Z36xxx/Z37xxx Series LPIO1 HSUART Controller #1 + 0f0c Atom Processor Z36xxx/Z37xxx Series LPIO1 HSUART Controller #2 + 0f0e Atom Processor Z36xxx/Z37xxx Series LPIO1 SPI Controller + 0f14 Atom Processor Z36xxx/Z37xxx Series SDIO Controller + 0f15 Atom Processor Z36xxx/Z37xxx Series SDIO Controller + 0f16 Atom Processor Z36xxx/Z37xxx Series SDIO Controller + 0f18 Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine + 0f1c Atom Processor Z36xxx/Z37xxx Series Power Control Unit + 0f28 Atom Processor Z36xxx/Z37xxx Series LPE Audio Controller + 0f31 Atom Processor Z36xxx/Z37xxx Series Graphics & Display + 0f34 Atom Processor Z36xxx/Z37xxx Series USB EHCI + 0f35 Atom Processor Z36xxx/Z37xxx Series USB xHCI + 0f37 Atom Processor Z36xxx/Z37xxx Series OTG USB Device + 0f38 Atom Processor Z36xxx/Z37xxx Series Camera ISP + 0f40 Atom Processor Z36xxx/Z37xxx Series LPIO2 DMA Controller + 0f41 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #1 + 0f42 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #2 + 0f43 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #3 + 0f44 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #4 + 0f45 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #5 + 0f46 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #6 + 0f47 Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #7 1000 82542 Gigabit Ethernet Controller (Fiber) 0e11 b0df NC6132 Gigabit Ethernet Adapter (1000-SX) 0e11 b0e0 NC6133 Gigabit Ethernet Adapter (1000-LX) @@ -18454,6 +20040,7 @@ 1028 0134 PowerEdge 600SC 1028 0151 Optiplex GX270 107b 8920 PRO/1000 MT Desktop Adapter + 1af4 1100 QEMU Virtual Machine 8086 001e PRO/1000 MT Desktop Adapter 8086 002e PRO/1000 MT Desktop Adapter 8086 1376 PRO/1000 GT Desktop Adapter @@ -18517,6 +20104,7 @@ 1179 0001 PRO/1000 MT Mobile Connection 8086 101e PRO/1000 MT Mobile Connection 1026 82545GM Gigabit Ethernet Controller + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 8086 1000 PRO/1000 MT Server Connection 8086 1001 PRO/1000 MT Server Adapter @@ -18601,6 +20189,7 @@ 103c 704e Dual Port 1000Base-T (PCIe) [AD337A] 1775 1100 CR11/VR11 Single Board Computer 1775 6003 Telum GE-QT + 18df 1214 2x 1GbE, PCIe x1, dual Intel 82571EB chips 8086 005e PRO/1000 PT Dual Port Server Connection 8086 105e PRO/1000 PT Dual Port Network Connection 8086 10d5 82571PT Gigabit PT Quad Port Server ExpressModule @@ -18694,6 +20283,7 @@ 108f Active Management Technology - SOL 1091 PRO/100 VM Network Connection 1092 PRO/100 VE Network Connection + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 1093 PRO/100 VM Network Connection 1094 PRO/100 VE Network Connection 1095 PRO/100 VE Network Connection @@ -18708,7 +20298,7 @@ 109a 82573L Gigabit Ethernet Controller 1179 ff10 PRO/1000 PL 17aa 2001 ThinkPad T60 - 17aa 207e ThinkPad X60s + 17aa 207e ThinkPad X60/X60s 8086 109a PRO/1000 PL Network Connection 8086 309c Desktop Board D945GTP 8086 30a5 Desktop Board D975XBX @@ -18786,9 +20376,13 @@ 10ce 82567V-2 Gigabit Network Connection 10d3 82574L Gigabit Network Connection 103c 3250 NC112T PCI Express single Port Gigabit Server Adapter + 1043 8369 Motherboard + 1093 76e9 PCIe-8233 Ethernet Adapter 10a9 8029 Prism XL Single Port Gigabit Ethernet 15d9 060a X7SPA-H/X7SPA-HF Motherboard + 15d9 060d C7SIM-Q Motherboard 8086 0001 Gigabit CT2 Desktop Adapter + 8086 357a Server Board S1200BTS 8086 a01f Gigabit CT Desktop Adapter e4bf 50c1 PC1-GROOVE e4bf 50c2 PC2-LIMBO @@ -18831,6 +20425,7 @@ 10ed 82599 Ethernet Controller Virtual Function 10ef 82578DM Gigabit Network Connection 1028 02da OptiPlex 980 + 15d9 060d C7SIM-Q Motherboard 10f0 82578DC Gigabit Network Connection 10f1 82598EB 10-Gigabit AF Dual Port Network Connection 8086 a20f 10-Gigabit AF DA Dual Port Server Adapter @@ -18849,15 +20444,17 @@ 103c 18d0 Ethernet 10Gb 2-port 560FLB Adapter 8086 000c Ethernet X520 10GbE Dual Port KX4-KR Mezz 10f9 82599 10 Gigabit Dual Port Network Connection - 10fb 82599EB 10-Gigabit SFI/SFP+ Network Connection + 10fb 82599ES 10-Gigabit SFI/SFP+ Network Connection 1028 1f72 Ethernet 10G 4P X520/I350 rNDC 103c 17d0 Ethernet 10Gb 2-port 560FLR-SFP+ Adapter 103c 17d2 Ethernet 10Gb 2-port 560M Adapter 103c 17d3 Ethernet 10Gb 2-port 560SFP+ Adapter 103c 211b Ethernet 10Gb 1-port P560FLR-SFP+ Adapter 103c 2147 Ethernet 10Gb 1-port 561i Adapter + 103c 2159 Ethernet 10Gb 2-port 562i Adapter 108e 7b11 Ethernet Server Adapter X520-2 1734 11a9 10 Gigabit Dual Port Network Connection + 17aa 1071 ThinkServer X520-2 AnyFabric 8086 0002 Ethernet Server Adapter X520-DA2 8086 0003 Ethernet Server Adapter X520-2 8086 0006 Ethernet Server Adapter X520-1 @@ -18890,6 +20487,7 @@ 172a 0000 AEP SSL Accelerator 1209 8255xER/82551IT Fast Ethernet Controller 140b 0610 PMC610 quad Ethernet board + 1af4 1100 QEMU Virtual Machine 4c53 1050 CT7 mainboard 4c53 1051 CE7 mainboard 4c53 1070 PC6 mainboard @@ -18972,6 +20570,7 @@ 1668 1100 EtherExpress PRO/100B (TX) (MiniPCI Ethernet+Modem) 1775 1100 CR11/VR11 Single Board Computer 1775 ce90 CE9 + 1af4 1100 QEMU Virtual Machine 4c53 1080 CT8 mainboard 4c53 10e0 PSL09 PrPMC 8086 0001 EtherExpress PRO/100B (TX) @@ -19090,6 +20689,7 @@ 1501 82567V-3 Gigabit Network Connection 1502 82579LM Gigabit Network Connection 1028 04a3 Precision M4600 + 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard 1507 Ethernet Express Module X520-P2 @@ -19122,15 +20722,24 @@ 108e 7b13 Dual 10GBASE-T LP 1520 I350 Ethernet Controller Virtual Function 1521 I350 Gigabit Network Connection - 1028 1f60 Intel GbE 4P I350crNDC - 1028 1f62 Intel GbE 2P I350crNDC + 1028 0602 Gigabit 2P I350-t LOM + 1028 1f60 Gigabit 4P I350-t rNDC + 1028 1f62 Gigabit 4P X540/I350 rNDC + 1028 ff9a Gigabit 4P X710/I350 rNDC 103c 17d1 Ethernet 1Gb 4-port 366FLR Adapter + 103c 2003 Ethernet 1Gb 2-port 367i Adapter + 103c 2226 Ethernet 1Gb 1-port 364i Adapter 103c 337f Ethernet 1Gb 2-port 361i Adapter 103c 3380 Ethernet 1Gb 4-port 366i Adapter 103c 339e Ethernet 1Gb 2-port 361T Adapter 108e 7b16 Quad Port GbE PCIe 2.0 ExpressModule, UTP 108e 7b18 Quad Port GbE PCIe 2.0 Low Profile Adapter, UTP + 1093 7648 PCIe-8237R Ethernet Adapter + 1093 7649 PCIe-8236 Ethernet Adapter + 1093 76b1 PCIe-8237R-S Ethernet Adapter + 1093 775b PCIe-8237 Ethernet Adapter 10a9 802a UV2-BaseIO dual-port GbE + 17aa 1074 ThinkServer I350-T4 AnyFabric 8086 0001 Ethernet Server Adapter I350-T4 8086 0002 Ethernet Server Adapter I350-T2 8086 00a1 Ethernet Server Adapter I350-T4 @@ -19148,8 +20757,11 @@ 8086 00a3 Ethernet Server Adapter I350-F4 8086 00a4 Ethernet Server Adapter I350-F2 1523 I350 Gigabit Backplane Connection + 1028 0060 Gigabit 2P I350 LOM + 1028 1f9b Gigabit 4P I350-t bNDC 103c 1784 Ethernet 1Gb 2-port 361FLB Adapter 103c 18d1 Ethernet 1Gb 2-port 361FLB Adapter + 103c 1989 Ethernet 1Gb 2-port 363i Adapter 103c 339f Ethernet 1Gb 4-port 366M Adapter 8086 1f52 1GbE 4P I350 Mezz 1524 I350 Gigabit Connection @@ -19163,10 +20775,12 @@ 1528 Ethernet Controller 10-Gigabit X540-AT2 1028 1f61 Ethernet 10G 4P X540/I350 rNDC 103c 192d 561FLR-T 2-port 10Gb Ethernet Adapter + 103c 2004 Ethernet 10Gb 2-port 561i Adapter 103c 211a Ethernet 10Gb 2-port 561T Adapter 108e 7b14 Sun Dual Port 10 GbE PCIe 2.0 ExpressModule, Base-T 108e 7b15 Sun Dual Port 10 GbE PCIe 2.0 Low Profile Adapter, Base-T 1137 00bf Ethernet Converged Network Adapter X540-T2 + 17aa 1073 ThinkServer X540-T2 AnyFabric 8086 0001 Ethernet Converged Network Adapter X540-T2 8086 0002 Ethernet Converged Network Adapter X540-T1 8086 001a Ethernet Converged Network Adapter X540-T2 @@ -19176,15 +20790,19 @@ 1529 82599 10 Gigabit Dual Port Network Connection with FCoE 152a 82599 10 Gigabit Dual Port Backplane Connection with FCoE 1533 I210 Gigabit Network Connection - 103c 0003 Ethernet Server Adapter I210-T1 + 103c 0003 Ethernet I210-T1 GbE NIC + 1093 7706 Compact Vision System Ethernet Adapter + 10a9 802c UV300 BaseIO single-port GbE + 17aa 1100 ThinkServer Ethernet Server Adapter 8086 0001 Ethernet Server Adapter I210-T1 8086 0002 Ethernet Server Adapter I210-T1 - 1534 I210 Gigabit Network Connection 1536 I210 Gigabit Fiber Network Connection 1537 I210 Gigabit Backplane Connection 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 153b Ethernet Connection I217-V 1547 DSL3510 Thunderbolt Port [Cactus Ridge] 1549 DSL3510 Thunderbolt Controller [Cactus Ridge] @@ -19192,22 +20810,95 @@ 8086 011a Ethernet Converged Network Adapter X520-4 8086 011b Ethernet Converged Network Adapter X520-4 8086 011c Ethernet Converged Network Adapter X520-4 + 154c XL710/X710 Virtual Function 154d Ethernet 10G 2P X520 Adapter 8086 7b11 10GbE 2P X520 Adapter 1557 82599 10 Gigabit Network Connection 8086 0001 Ethernet OCP Server Adapter X520-1 + 1558 Ethernet Converged Network Adapter X520-Q1 + 8086 011a Ethernet Converged Network Adapter X520-Q1 + 8086 011b Ethernet Converged Network Adapter X520-Q1 1559 Ethernet Connection I218-V 155a Ethernet Connection I218-LM + 17aa 2214 ThinkPad X240 155c Ethernet Server Bypass Adapter 8086 0001 Ethernet Server Bypass Adapter X540-T2 155d Ethernet Server Bypass Adapter 8086 0001 Ethernet Server Bypass Adapter X520-SR2 - 1560 Ethernet Controller X540-AT1 + 8086 0002 Ethernet Server Bypass Adapter X520-LR2 + 1560 Ethernet Controller X540 + 156f Ethernet Connection I219-LM + 1570 Ethernet Connection I219-V + 1571 XL710/X710 Virtual Function + 1572 Ethernet Controller X710 for 10GbE SFP+ + 1028 1f99 Ethernet 10G 4P X710/I350 rNDC + 8086 0000 Ethernet Converged Network Adapter X710 + 8086 0001 Ethernet Converged Network Adapter X710-4 + 8086 0002 Ethernet Converged Network Adapter X710-4 + 8086 0004 Ethernet Converged Network Adapter X710-4 + 8086 0005 Ethernet 10G 4P X710 Adapter + 8086 0006 Ethernet 10G 2P X710 Adapter + 8086 0007 Ethernet Converged Network Adapter X710-2 + 8086 0008 Ethernet Converged Network Adapter X710-2 157b I210 Gigabit Network Connection + 157c I210 Gigabit Backplane Connection + 1580 Ethernet Controller XL710 for 40GbE backplane + 1581 Ethernet Controller X710 for 10GbE backplane + 1028 1f98 Ethernet 10G 4P X710-k bNDC + 1583 Ethernet Controller XL710 for 40GbE QSFP+ + 8086 0000 Ethernet Converged Network Adapter XL710-Q2 + 8086 0001 Ethernet Converged Network Adapter XL710-Q2 + 8086 0002 Ethernet Converged Network Adapter XL710-Q2 + 8086 0003 Ethernet I/O Module XL710-Q2 + 1584 Ethernet Controller XL710 for 40GbE QSFP+ + 8086 0000 Ethernet Converged Network Adapter XL710-Q1 + 8086 0001 Ethernet Converged Network Adapter XL710-Q1 + 8086 0002 Ethernet Converged Network Adapter XL710-Q1 + 8086 0003 Ethernet I/O Module XL710-Q1 + 1585 Ethernet Controller XL710 for 10GbE QSFP+ 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM 15a3 Ethernet Connection (3) I218-V + 15b7 Ethernet Connection (2) I219-LM + 15b8 Ethernet Connection (2) I219-V + 1600 Broadwell-U Host Bridge -OPI + 1601 Broadwell-U PCI Express x16 Controller + 1602 Broadwell-U Integrated Graphics + 1603 Broadwell-U Camarillo Device + 1604 Broadwell-U Host Bridge -OPI + 1605 Broadwell-U PCI Express x8 Controller + 1606 Broadwell-U Integrated Graphics + 1607 Broadwell-U CHAPS Device + 1608 Broadwell-U Host Bridge -OPI + 1609 Broadwell-U x4 PCIe + 160a Broadwell-U Integrated Graphics + 160b Broadwell-U Integrated Graphics + 160c Broadwell-U Audio Controller + 160d Broadwell-U Integrated Graphics + 160e Broadwell-U Integrated Graphics + 160f Broadwell-U SoftSKU + 1610 Broadwell-U Host Bridge - DMI + 1612 Broadwell-U Integrated Graphics + 1614 Broadwell-U Host Bridge - DMI + 1616 Broadwell-U Integrated Graphics + 1618 Broadwell-U Host Bridge - DMI + 161a Broadwell-U Integrated Graphics + 161b Broadwell-U Integrated Graphics + 161d Broadwell-U Integrated Graphics + 161e Broadwell-U Integrated Graphics + 1622 Broadwell-U Integrated Graphics + 1626 Broadwell-U Integrated Graphics + 162a Broadwell-U Integrated Graphics + 162b Broadwell-U Integrated Graphics + 162d Broadwell-U Integrated Graphics + 162e Broadwell-U Integrated Graphics + 1632 Broadwell-U Integrated Graphics + 1636 Broadwell-U Integrated Graphics + 163a Broadwell-U Integrated Graphics + 163b Broadwell-U Integrated Graphics + 163d Broadwell-U Integrated Graphics + 163e Broadwell-U Integrated Graphics 1960 80960RP (i960RP) Microprocessor 101e 0431 MegaRAID 431 RAID Controller 101e 0438 MegaRAID 438 Ultra2 LVD RAID Controller @@ -19255,7 +20946,8 @@ 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller 1028 04aa XPS 8300 - 1043 844d P8P67 Deluxe Motherboard + 1043 844d P8 series motherboard + 8086 7270 Server Board S1200BTS 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 @@ -19268,7 +20960,8 @@ 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 - 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] + 1043 844d P8 series motherboard + 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -19279,10 +20972,13 @@ 1028 04aa XPS 8300 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 + 1043 844d P8 series motherboard 1c1c 6 Series/C200 Series Chipset Family PCI Express Root Port 7 1c1e 6 Series/C200 Series Chipset Family PCI Express Root Port 8 + 1043 844d P8 series motherboard 1c20 6 Series/C200 Series Chipset Family High Definition Audio Controller 1028 0490 Alienware M17x R3 1028 04a3 Precision M4600 @@ -19290,6 +20986,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard + 1043 841b P8H67 Series Motherboard # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -19298,8 +20995,8 @@ 1028 04aa XPS 8300 1028 04b2 Vostro 3350 1028 04da Vostro 3750 - 1043 844d P8P67 Deluxe Motherboard - 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] + 1043 844d P8 series motherboard + 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge 1c26 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 @@ -19307,8 +21004,8 @@ 1028 04aa XPS 8300 1028 04b2 Vostro 3350 1028 04da Vostro 3750 - 1043 844d P8P67 Deluxe Motherboard - 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] + 1043 844d P8 series motherboard + 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c2c 6 Series/C200 Series Chipset Family USB Universal Host Controller #5 @@ -19318,8 +21015,8 @@ 1028 04aa XPS 8300 1028 04b2 Vostro 3350 1028 04da Vostro 3750 - 1043 844d P8P67 Deluxe Motherboard - 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] + 1043 844d P8 series motherboard + 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller 1c3a 6 Series/C200 Series Chipset Family MEI Controller #1 @@ -19327,7 +21024,7 @@ 1028 04aa XPS 8300 1028 04b2 Vostro 3350 1028 04da Vostro 3750 - 1043 844d P8P67 Deluxe Motherboard + 1043 844d P8 series motherboard 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -19346,6 +21043,7 @@ 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c4a H67 Express Chipset Family LPC Controller 1028 04aa XPS 8300 + 1043 844d P8H67 Series Motherboard 1c4b HM67 Express Chipset Family LPC Controller 1028 04b2 Vostro 3350 1028 04da Vostro 3750 @@ -19357,10 +21055,12 @@ 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller + 8086 7270 Server Board S1200BTS 1c53 6 Series/C200 Series Chipset Family LPC Controller 1c54 C204 Chipset Family LPC Controller 1c55 6 Series/C200 Series Chipset Family LPC Controller 1c56 C206 Chipset Family LPC Controller + 1043 844d P8B WS Motherboard 1c57 6 Series/C200 Series Chipset Family LPC Controller 1c58 Upgraded B65 Express Chipset Family LPC Controller 1c59 Upgraded HM67 Express Chipset Family LPC Controller @@ -19437,7 +21137,8 @@ 1e00 7 Series/C210 Series Chipset Family 4-port SATA Controller [IDE mode] 1e01 7 Series Chipset Family 4-port SATA Controller [IDE mode] 1e02 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e02 Motherboard 1e03 7 Series Chipset Family 6-port SATA Controller [AHCI mode] 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A @@ -19452,45 +21153,58 @@ 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 84ca P8H77-I Motherboard + 1849 1e10 Motherboard 1e12 7 Series/C210 Series Chipset Family PCI Express Root Port 2 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1e14 7 Series/C210 Series Chipset Family PCI Express Root Port 3 1e16 7 Series/C210 Series Chipset Family PCI Express Root Port 4 1043 1477 N56VZ + 1849 1618 Z77 Extreme4 motherboard 1e18 7 Series/C210 Series Chipset Family PCI Express Root Port 5 1043 84ca P8H77-I Motherboard + 1849 1e18 Motherboard 1e1a 7 Series/C210 Series Chipset Family PCI Express Root Port 6 + 1849 1e1a Motherboard 1e1c 7 Series/C210 Series Chipset Family PCI Express Root Port 7 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 + 1849 1e1e Motherboard 1e20 7 Series/C210 Series Chipset Family High Definition Audio Controller 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard + 1043 8445 ASUS P8Z77-V LX Motherboard + 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C210 Series Chipset Family SMBus Controller 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e22 Motherboard 1e24 7 Series/C210 Series Chipset Family Thermal Management Controller 1043 1517 Zenbook Prime UX31A 1e25 7 Series/C210 Series Chipset Family DMI to PCI Bridge 1e26 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e26 Motherboard 1e2d 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e2d Motherboard 1e31 7 Series/C210 Series Chipset Family USB xHCI Host Controller + 103c 17ab ProBook 6570b 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e31 Motherboard 1e33 7 Series/C210 Series Chipset Family LAN Controller 1e3a 7 Series/C210 Series Chipset Family MEI Controller #1 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A - 1043 84ca P8H77-I Motherboard + 1043 84ca P8 series motherboard + 1849 1e3a Motherboard 1e3b 7 Series/C210 Series Chipset Family MEI Controller #2 1e3c 7 Series/C210 Series Chipset Family IDE-r Controller 1e3d 7 Series/C210 Series Chipset Family KT Controller @@ -19498,6 +21212,8 @@ 1e42 7 Series Chipset Family LPC Controller 1e43 7 Series Chipset Family LPC Controller 1e44 Z77 Express Chipset LPC Controller + 1043 84ca P8 series motherboard + 1849 1e44 Motherboard 1e45 7 Series Chipset Family LPC Controller 1e46 Z75 Express Chipset LPC Controller 1e47 Q77 Express Chipset LPC Controller @@ -19528,66 +21244,67 @@ 1e5d HM75 Express Chipset LPC Controller 1e5e 7 Series Chipset Family LPC Controller 1e5f 7 Series Chipset Family LPC Controller - 1f00 Avoton SSA-Cunit - 1f01 Avoton SSA-Cunit - 1f02 Avoton SSA-Cunit - 1f03 Avoton SSA-Cunit - 1f04 Avoton SSA-Cunit - 1f05 Avoton SSA-Cunit - 1f06 Avoton SSA-Cunit - 1f07 Avoton SSA-Cunit - 1f08 Avoton SSA-Cunit - 1f09 Avoton SSA-Cunit - 1f0a Avoton SSA-Cunit - 1f0b Avoton SSA-Cunit - 1f0c Avoton SSA-Cunit - 1f0d Avoton SSA-Cunit - 1f0e Avoton SSA-Cunit - 1f0f Avoton SSA-Cunit - 1f10 Avoton PCIe Root Port 1 - 1f11 Avoton PCIe Root Port 2 - 1f12 Avoton PCIe Root Port 3 - 1f13 Avoton PCIe Root Port 4 - 1f14 Avoton RAS - 1f15 Avoton SMBus 2.0 - 1f16 Avoton RCEC - 1f18 Avoton nCPM - 1f19 Avoton nCPM - 1f20 Avoton 4-Port IDE SATA2 Controller - 1f21 Avoton 4-Port IDE SATA2 Controller - 1f22 Avoton AHCI SATA2 Controller - 1f23 Avoton AHCI SATA2 Controller - 1f24 Avoton RAID SATA2 Controller - 1f25 Avoton RAID SATA2 Controller - 1f26 Avoton RAID SATA2 Controller - 1f27 Avoton RAID SATA2 Controller - 1f2c Avoton USB Enhanced Host Controller - 1f2e Avoton RAID SATA2 Controller - 1f2f Avoton RAID SATA2 Controller - 1f30 Avoton 2-Port IDE SATA3 Controller - 1f31 Avoton 2-Port IDE SATA3 Controller - 1f32 Avoton AHCI SATA3 Controller - 1f33 Avoton AHCI SATA3 Controller - 1f34 Avoton RAID SATA3 Controller - 1f35 Avoton RAID SATA3 Controller - 1f36 Avoton RAID SATA3 Controller - 1f37 Avoton RAID SATA3 Controller - 1f38 Avoton PCU - 1f39 Avoton PCU - 1f3a Avoton PCU - 1f3b Avoton PCU - 1f3c Avoton PCU SMBus - 1f3d Avoton PCU SMBus - 1f3e Avoton RAID SATA3 Controller - 1f3f Avoton RAID SATA3 Controller + 1f00 Atom processor C2000 SoC Transaction Router + 1f01 Atom processor C2000 SoC Transaction Router + 1f02 Atom processor C2000 SoC Transaction Router + 1f03 Atom processor C2000 SoC Transaction Router + 1f04 Atom processor C2000 SoC Transaction Router + 1f05 Atom processor C2000 SoC Transaction Router + 1f06 Atom processor C2000 SoC Transaction Router + 1f07 Atom processor C2000 SoC Transaction Router + 1f08 Atom processor C2000 SoC Transaction Router + 1f09 Atom processor C2000 SoC Transaction Router + 1f0a Atom processor C2000 SoC Transaction Router + 1f0b Atom processor C2000 SoC Transaction Router + 1f0c Atom processor C2000 SoC Transaction Router + 1f0d Atom processor C2000 SoC Transaction Router + 1f0e Atom processor C2000 SoC Transaction Router + 1f0f Atom processor C2000 SoC Transaction Router + 1f10 Atom processor C2000 PCIe Root Port 1 + 1f11 Atom processor C2000 PCIe Root Port 2 + 1f12 Atom processor C2000 PCIe Root Port 3 + 1f13 Atom processor C2000 PCIe Root Port 4 + 1f14 Atom processor C2000 RAS + 1f15 Atom processor C2000 SMBus 2.0 + 1f16 Atom processor C2000 RCEC + 1f18 Atom processor C2000 nCPM + 1f19 Atom processor C2000 nCPM + 1f20 Atom processor C2000 4-Port IDE SATA2 Controller + 1f21 Atom processor C2000 4-Port IDE SATA2 Controller + 1f22 Atom processor C2000 AHCI SATA2 Controller + 1f23 Atom processor C2000 AHCI SATA2 Controller + 1f24 Atom processor C2000 RAID SATA2 Controller + 1f25 Atom processor C2000 RAID SATA2 Controller + 1f26 Atom processor C2000 RAID SATA2 Controller + 1f27 Atom processor C2000 RAID SATA2 Controller + 1f2c Atom processor C2000 USB Enhanced Host Controller + 1f2e Atom processor C2000 RAID SATA2 Controller + 1f2f Atom processor C2000 RAID SATA2 Controller + 1f30 Atom processor C2000 2-Port IDE SATA3 Controller + 1f31 Atom processor C2000 2-Port IDE SATA3 Controller + 1f32 Atom processor C2000 AHCI SATA3 Controller + 1f33 Atom processor C2000 AHCI SATA3 Controller + 1f34 Atom processor C2000 RAID SATA3 Controller + 1f35 Atom processor C2000 RAID SATA3 Controller + 1f36 Atom processor C2000 RAID SATA3 Controller + 1f37 Atom processor C2000 RAID SATA3 Controller + 1f38 Atom processor C2000 PCU + 1f39 Atom processor C2000 PCU + 1f3a Atom processor C2000 PCU + 1f3b Atom processor C2000 PCU + 1f3c Atom processor C2000 PCU SMBus + 1f3e Atom processor C2000 RAID SATA3 Controller + 1f3f Atom processor C2000 RAID SATA3 Controller 1f40 Ethernet Connection I354 1.0 GbE Backplane + 1028 05f1 Ethernet Connection I354 1.0 GbE Backplane 1f41 Ethernet Connection I354 - 1f42 Avoton GbE - 1f44 Avoton GbE Virtual Function + 1f42 Atom processor C2000 GbE + 1f44 Atom processor C2000 GbE Virtual Function 1f45 Ethernet Connection I354 2.5 GbE Backplane 2250 Xeon Phi coprocessor 5100 series 225c Xeon Phi coprocessor SE10/7120 series 225d Xeon Phi coprocessor 3120 series + 225e Xeon Phi coprocessor 31S1 2310 DH89xxCC LPC Controller 2323 DH89xxCC 4 Port SATA AHCI Controller 2330 DH89xxCC SMBus Controller @@ -19638,6 +21355,7 @@ 11d4 0048 SoundMAX Integrated Digital Audio 11d4 5340 SoundMAX Integrated Digital Audio 1734 1025 Activy 3xx + 1af4 1100 QEMU Virtual Machine 2416 82801AA AC'97 Modem Controller 2418 82801AA PCI Bridge 2420 82801AB ISA Bridge (LPC) @@ -19712,11 +21430,15 @@ 103c 30c1 Compaq 6910p 104d 902d VAIO VGN-NR120E 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c00c P30 notebook + 144d c06a R730 Laptop 144d c072 Notebook N150P 1458 5000 GA-D525TUD 1734 1055 Amilo M1420 - 17aa 20ae ThinkPad T61 + 17aa 20ae ThinkPad T61/R61 + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 8086 544b Desktop Board D425KT e4bf cc47 CCG-RUMBA 2449 82801BA/BAM/CA/CAM Ethernet Controller @@ -19741,6 +21463,7 @@ 1179 ff01 PRO/100 VE Network Connection 1186 7801 EtherExpress PRO/100 VE 144d 2602 HomePNA 1M CNR + 1af4 1100 QEMU Virtual Machine 8086 3010 EtherExpress PRO/100 VE 8086 3011 EtherExpress PRO/100 VM 8086 3012 82562EH based Phoneline @@ -19772,13 +21495,18 @@ 1028 0211 Optiplex 755 1028 02da OptiPlex 980 103c 2a3b Pavilion A1512X + 103c 2a6f Asus IPIBL-LB Motherboard 103c 31fe ProLiant DL140 G3 103c 330b ProLiant ML150 G6 Server # same ID possibly also on other ASUS boards 1043 8277 P5K PRO Motherboard + 1043 844d P8 series motherboard 1458 5000 Motherboard + 1462 7418 Wind PC MS-7418 + 15d9 060d C7SIM-Q Motherboard 15d9 9680 X7DBN Motherboard 1775 11cc CC11/CL11 + 8086 7270 Server Board S1200BTS 2450 82801E ISA Bridge (LPC) 2452 82801E USB Controller 2453 82801E SMBus Controller @@ -19916,7 +21644,7 @@ 24c5 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller 0e11 00b8 Analog Devices Inc. codec [SoundMAX] 1014 0267 NetVista A30p - 1014 0537 ThinkPad T41 + 1014 0537 ThinkPad T4x Series 1014 055f Thinkpad R50e model 1634 1025 005a TravelMate 290 1028 0139 Latitude D400 @@ -19940,7 +21668,7 @@ 1734 1055 Amilo M1420 8086 24c5 Dell Dimension 2400 24c6 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller - 1014 0524 ThinkPad T41 + 1014 0524 ThinkPad T4x Series 1014 0525 ThinkPad 1014 0559 ThinkPad R50e 1025 003c Aspire 2001WLCi (Compal CL50 motherboard) implementation @@ -20032,12 +21760,14 @@ 1509 1968 Averatec 5110H 1734 1004 D1451 Mainboard (SCENIC N300, i845GV) 1734 1055 Amilo M1420 + 1af4 1100 QEMU Virtual Machine 4c53 1090 Cx9 / Vx9 mainboard 8086 24c2 Latitude X300 e4bf 0cc9 CC9-SAMBA e4bf 0cd2 CD2-BEBOP 24d0 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge 24d1 82801EB (ICH5) SATA Controller + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 019a PowerEdge SC1425 103c 12bc d530 CMT (DG746A) @@ -20055,6 +21785,7 @@ 24d2 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 1014 02dd eServer xSeries server mainboard 1014 02ed eServer xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 016c PowerEdge 1850 onboard UHCI 1028 016d PowerEdge 2850 onboard UHCI @@ -20078,6 +21809,7 @@ 1014 02dd eServer xSeries server mainboard 1014 02ed eServer xSeries server mainboard 1028 0156 Precision 360 + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 103c 12bc d330 uT 103c 3208 ProLiant DL140 G2 @@ -20095,6 +21827,7 @@ 24d4 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 1014 02dd eServer xSeries server mainboard 1014 02ed eServer xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 016c PowerEdge 1850 onboard UHCI 1028 016d PowerEdge 2850 onboard UHCI @@ -20117,6 +21850,7 @@ 8086 524c D865PERL mainboard 24d5 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller 100a 147b Abit IS7-E motherboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 103c 006a NX9500 103c 12bc d330 uT @@ -20134,6 +21868,7 @@ 103c 006a NX9500 24d7 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 1014 02ed xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 016c PowerEdge 1850 onboard UHCI 1028 016d PowerEdge 2850 onboard UHCI @@ -20155,6 +21890,7 @@ 24db 82801EB/ER (ICH5/ICH5R) IDE Controller 1014 02dd eServer xSeries server mainboard 1014 02ed eServer xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 016c PowerEdge 1850 IDE Controller 1028 016d PowerEdge 2850 IDE Controller @@ -20179,6 +21915,7 @@ 24dd 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller 1014 02dd eServer xSeries server mainboard 1014 02ed eServer xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1028 016c PowerEdge 1850 onboard EHCI 1028 016d PowerEdge 2850 onboard EHCI @@ -20198,6 +21935,7 @@ 8086 524c D865PERL mainboard 24de 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 1014 02ed xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 1043 80a6 P4P800/P5P800 series motherboard 1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE) @@ -20211,6 +21949,13 @@ 8086 4c43 Desktop Board D865GLC 8086 524c D865PERL mainboard 24df 82801ER (ICH5R) SATA Controller + 1028 0168 Precision Workstation 670 Mainboard + 24f3 Wireless 8260 +# Snow Field Peak AC + 8086 0010 Dual Band Wireless-AC 8260 + 24f4 Wireless 8260 +# Snow Field Peak AC + 8086 0030 Dual Band Wireless-AC 8260 2500 82820 820 (Camino) Chipset Host Bridge (MCH) 1028 0095 Precision Workstation 220 Chipset 1043 801c P3C-2000 system chipset @@ -20368,6 +22113,7 @@ 1775 10d0 V5D Single Board Computer 1775 1100 CR11/VR11 Single Board Computer 1775 ce90 CE9 + 1af4 1100 QEMU Virtual Machine 4c53 10b0 CL9 mainboard 4c53 10d0 Telum ASLP10 Processor AMC 4c53 10e0 PSL09 PrPMC @@ -20586,6 +22332,7 @@ 1043 1173 Asus A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 + 1af4 1100 QEMU Virtual Machine 266a 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 @@ -20695,10 +22442,12 @@ 103c 2a3b Pavilion A1512X 1043 817a P5LD2-VM Mainboard 107b 5048 E4500 + 1462 7418 Wind PC MS-7418 8086 544e DeskTop Board D945GTP 2771 82945G/GZ/P/PL PCI Express Root Port 2772 82945G/GZ Integrated Graphics Controller 103c 2a3b Pavilion A1512X + 1462 7418 Wind PC MS-7418 8086 544e DeskTop Board D945GTP 8086 d605 Intel Desktop Board D945GCCR 2774 82955X Memory Controller Hub @@ -20728,19 +22477,21 @@ 103c 30a1 NC2400 103c 30a3 Compaq nw8440 1043 1237 A6J-Q008 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 17aa 2015 ThinkPad T60 - 17aa 2017 ThinkPad T60/R60 series + 17aa 2017 ThinkPad R60/T60/X60 series 27a1 Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port 103c 309f Compaq nx9420 Notebook 103c 30a3 Compaq nw8440 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 27a2 Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 103c 30a1 NC2400 - 17aa 201a ThinkPad T60/R60 series + 17aa 201a ThinkPad R60/T60/X60 series 9902 1584 CCE MPL-D10H120F 27a6 Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller 103c 30a1 NC2400 1775 11cc CC11/CL11 integrated graphics (secondary) - 17aa 201a ThinkPad T60/R60 series + 17aa 201a ThinkPad R60/T60/X60 series 27ac Mobile 945GSE Express Memory Controller Hub 1775 11cc CC11/CL11 27ad Mobile 945GSE Express PCI Express Root Port @@ -20753,6 +22504,7 @@ 1028 01e6 PowerEdge 860 1043 8179 P5KPL-VM Motherboard 107b 5048 E4500 + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544e DeskTop Board D945GTP 27b9 82801GBM (ICH7-M) LPC Interface Bridge @@ -20760,8 +22512,9 @@ 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 10f7 8338 Panasonic CF-Y5 laptop - 17aa 2009 ThinkPad T60/R60 series + 17aa 2009 ThinkPad R60/T60/X60 series 27bc NM10 Family LPC Controller 105b 0d7c D270S/D250S Motherboard 144d c072 Notebook N150P @@ -20778,6 +22531,7 @@ 107b 5048 E4500 1462 2310 MSI Hetis 945 1462 7236 945P Neo3-F Rev. 2.2 motherboard + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544b Desktop Board D425KT 8086 544e DeskTop Board D945GTP @@ -20796,11 +22550,12 @@ 27c4 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] 1025 006c 9814 WKMI 1028 01d7 XPS M1210 - 17aa 200e Thinkpad T60 model 2007 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] + 17aa 200e ThinkPad T60 27c5 82801GBM/GHM (ICH7-M Family) SATA Controller [AHCI mode] 103c 309f Compaq nx9420 Notebook 103c 30a3 Compaq nw8440 - 17aa 200d ThinkPad T60/R60 series + 17aa 200d ThinkPad R60/T60/X60 series 27c6 82801GHM (ICH7-M DH) SATA Controller [RAID mode] 27c8 NM10/ICH7 Family USB UHCI Controller #1 1025 006c 9814 WKMI @@ -20815,11 +22570,13 @@ 1043 1237 A6J-Q008 1043 8179 P5KPL-VM,P5LD2-VM Mainboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 107b 5048 E4500 144d c072 Notebook N150P 1458 5004 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200a ThinkPad T60/R60 series + 17aa 200a ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544b Desktop Board D425KT 8086 544e DeskTop Board D945GTP @@ -20836,11 +22593,13 @@ 1043 1237 A6J-Q008 1043 8179 P5KPL-VM,P5LD2-VM Mainboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 107b 5048 E4500 144d c072 Notebook N150P 1458 5004 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200a ThinkPad T60/R60 series + 17aa 200a ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544b Desktop Board D425KT 8086 544e DeskTop Board D945GTP @@ -20857,11 +22616,13 @@ 1043 1237 A6J-Q008 1043 8179 P5KPL-VM,P5LD2-VM Mainboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 107b 5048 E4500 144d c072 Notebook N150P 1458 5004 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200a ThinkPad T60/R60 series + 17aa 200a ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544e DeskTop Board D945GTP 27cb NM10/ICH7 Family USB UHCI Controller #4 @@ -20876,11 +22637,13 @@ 1043 1237 A6J-Q008 1043 8179 P5KPL-VM,P5LD2-VM Mainboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 107b 5048 E4500 144d c072 Notebook N150P 1458 5004 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200a ThinkPad T60/R60 series + 17aa 200a ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544e DeskTop Board D945GTP 27cc NM10/ICH7 Family USB2 EHCI Controller @@ -20896,33 +22659,43 @@ 1043 1237 A6J-Q008 1043 8179 P5KPL-VM,P5LD2-VM Mainboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c072 Notebook N150P 1458 5006 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200b ThinkPad T60/R60 series + 17aa 200b ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544b Desktop Board D425KT 8086 544e DeskTop Board D945GTP 27d0 NM10/ICH7 Family PCI Express Port 1 103c 309f Compaq nx9420 Notebook 103c 30a3 Compaq nw8440 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c072 Notebook N150P 1458 5001 GA-D525TUD + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544b Desktop Board D425KT 27d2 NM10/ICH7 Family PCI Express Port 2 103c 309f Compaq nx9420 Notebook 103c 30a3 Compaq nw8440 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c072 Notebook N150P + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544b Desktop Board D425KT 27d4 NM10/ICH7 Family PCI Express Port 3 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c072 Notebook N150P + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544b Desktop Board D425KT 27d6 NM10/ICH7 Family PCI Express Port 4 103c 30a3 Compaq nw8440 + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 144d c072 Notebook N150P + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 8086 544b Desktop Board D425KT 27d8 NM10/ICH7 Family High Definition Audio Controller @@ -20938,6 +22711,7 @@ 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard 105b 0d7c D270S/D250S Motherboard + 1071 8207 Medion MIM 2240 Notebook PC [MD98100] 107b 5048 E4500 10f7 8338 Panasonic CF-Y5 laptop 1179 ff10 Toshiba Satellite A100-796 audio (Realtek ALC861) @@ -20946,9 +22720,10 @@ 144d c072 Notebook N150P 1458 a002 GA-D525TUD (Realtek ALC887) 1458 a102 GA-8I945PG-RH Mainboard + 1462 7418 Wind PC MS-7418 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP - 17aa 2010 ThinkPad T60/R60 series + 17aa 2010 ThinkPad R60/T60/X60 series 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP @@ -20963,11 +22738,13 @@ 103c 2a3b Pavilion A1512X 1043 8179 P5KPL-VM Motherboard 105b 0d7c D270S/D250S Motherboard + 1071 8209 Medion MIM 2240 Notebook PC [MD98100] 10f7 8338 Panasonic CF-Y5 laptop 144d c072 Notebook N150P 1458 5001 GA-8I945PG-RH/GA-D525TUD Mainboard + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200f ThinkPad T60/R60 series + 17aa 200f ThinkPad R60/T60/X60 series 8086 4f4d DeskTop Board D510MO 8086 544b Desktop Board D425KT 8086 544e DeskTop Board D945GTP @@ -20991,8 +22768,9 @@ 1043 8179 P5KPL-VM Motherboard 107b 5048 E4500 10f7 8338 Panasonic CF-Y5 laptop + 1462 7418 Wind PC MS-7418 1775 11cc CC11/CL11 - 17aa 200c ThinkPad T60/R60 series + 17aa 200c ThinkPad R60/T60/X60 series 8086 544e DeskTop Board D945GTP 27e0 82801GR/GH/GHM (ICH7 Family) PCI Express Port 5 1775 11cc CC11/CL11 @@ -21002,7 +22780,7 @@ 1043 81ec P5B 2811 82801HEM (ICH8M-E) LPC Interface Controller 103c 30c1 Compaq 6910p - 17aa 20b6 T61 + 17aa 20b6 ThinkPad T61/R61 e4bf cc47 CCG-RUMBA 2812 82801HH (ICH8DH) LPC Interface Controller 2814 82801HO (ICH8DO) LPC Interface Controller @@ -21014,12 +22792,14 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 1462 7235 P965 Neo MS-7235 mainboard 2821 82801HR/HO/HH (ICH8R/DO/DH) 6 port SATA Controller [AHCI mode] 2822 82801 SATA Controller [RAID mode] 1028 020d Inspiron 530 + 103c 2a6f Asus IPIBL-LB Motherboard 2823 Wellsburg sSATA RAID Controller 2824 82801HB (ICH8) 4 port SATA Controller [AHCI mode] 1043 81ec P5B @@ -21040,7 +22820,8 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E - 17aa 20a7 ThinkPad T61 + 17aa 20a7 ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 282a 82801 Mobile SATA Controller [RAID mode] 1028 040b Latitude E6510 @@ -21057,7 +22838,8 @@ 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard - 17aa 20aa ThinkPad T61 + 17aa 20aa ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2831 82801H (ICH8 Family) USB UHCI Controller #2 1025 0121 Aspire 5920G @@ -21071,7 +22853,8 @@ 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard - 17aa 20aa ThinkPad T61 + 17aa 20aa ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2832 82801H (ICH8 Family) USB UHCI Controller #3 1025 0121 Aspire 5920G @@ -21084,7 +22867,8 @@ 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E - 17aa 20aa ThinkPad T61 + 17aa 20aa ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2833 82801H (ICH8 Family) USB UHCI Controller #4 1043 81ec P5B @@ -21099,7 +22883,8 @@ 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard - 17aa 20aa ThinkPad T61 + 17aa 20aa ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 1025 0121 Acer Aspire 5920G @@ -21111,7 +22896,8 @@ 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E - 17aa 20aa ThinkPad T60 + 17aa 20aa Thinkpad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2836 82801H (ICH8 Family) USB2 EHCI Controller #1 1025 0121 Aspire 5920G @@ -21125,7 +22911,8 @@ 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard - 17aa 20ab ThinkPad T61 + 17aa 20ab ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 1025 0121 Acer Aspire 5920G @@ -21137,7 +22924,8 @@ 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E - 17aa 20ab ThinkPad T61 + 17aa 20ab ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283e 82801H (ICH8 Family) SMBus Controller 1025 0121 Aspire 5920G @@ -21149,26 +22937,32 @@ 104d 9008 Vaio VGN-SZ79SN_C 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard - 17aa 20a9 ThinkPad T61 + 17aa 20a9 ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283f 82801H (ICH8 Family) PCI Express Port 1 1028 01da OptiPlex 745 103c 30c1 Compaq 6910p 104d 902d VAIO VGN-NR120E - 17aa 20ad ThinkPad T61 + 17aa 20ad ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2841 82801H (ICH8 Family) PCI Express Port 2 103c 30c1 Compaq 6910p 104d 902d VAIO VGN-NR120E - 17aa 20ad ThinkPad T61 + 17aa 20ad ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2843 82801H (ICH8 Family) PCI Express Port 3 104d 902d VAIO VGN-NR120E - 17aa 20ad ThinkPad T61 + 17aa 20ad ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2845 82801H (ICH8 Family) PCI Express Port 4 - 17aa 20ad ThinkPad T61 + 17aa 20ad ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2847 82801H (ICH8 Family) PCI Express Port 5 1028 01da OptiPlex 745 103c 30c1 Compaq 6910p - 17aa 20ad ThinkPad T61 + 17aa 20ad ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2849 82801H (ICH8 Family) PCI Express Port 6 284b 82801H (ICH8 Family) HD Audio Controller 1025 011f Realtek ALC268 audio codec @@ -21190,7 +22984,8 @@ 104d 9016 Sony VAIO VGN-AR51M 104d 902d VAIO VGN-NR120E 14f1 5051 Presario C700 - 17aa 20ac ThinkPad T61 + 17aa 20ac ThinkPad T61/R61 + 17c0 4088 Medion WIM 2210 Notebook PC [MD96850] 8384 7616 Dell Vostro 1400 e4bf cc47 CCG-RUMBA 284f 82801H (ICH8 Family) Thermal Reporting Device @@ -21203,13 +22998,15 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E - 17aa 20a6 ThinkPad T61 + 17aa 20a6 ThinkPad T61/R61 + 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2912 82801IH (ICH9DH) LPC Interface Controller 2914 82801IO (ICH9DO) LPC Interface Controller 1028 0211 Optiplex 755 2916 82801IR (ICH9R) LPC Interface Controller 1028 020d Inspiron 530 + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 8086 5044 Desktop Board DP35DP 2917 ICH9M-E LPC Interface Controller @@ -21217,6 +23014,7 @@ 2918 82801IB (ICH9) LPC Interface Controller 1028 0236 PowerEdge R610 82801IB (ICH9) LPC Interface Controller 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 2919 ICH9M LPC Interface Controller 2920 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] 1028 020d Inspiron 530 @@ -21231,6 +23029,7 @@ 1028 0237 PowerEdge T610 SATA IDE Controller 1462 7360 G33/P35 Neo 2922 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP 2923 82801IB (ICH9) 4 port SATA Controller [AHCI mode] 2925 82801IR/IO (ICH9R/DO) SATA Controller [RAID mode] @@ -21253,9 +23052,11 @@ 2930 82801I (ICH9 Family) SMBus Controller 1028 020d Inspiron 530 1028 0211 Optiplex 755 + 103c 2a6f Asus IPIBL-LB Motherboard 103c 3628 dv6-1190en 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 2932 82801I (ICH9 Family) Thermal Subsystem @@ -21272,8 +23073,10 @@ 1028 0287 PowerEdge M610 onboard UHCI 1028 029c PowerEdge M710 USB UHCI Controller 1028 2011 Optiplex 755 + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 2935 82801I (ICH9 Family) USB UHCI Controller #2 @@ -21287,8 +23090,10 @@ 1028 023c PowerEdge R200 onboard UHCI 1028 0287 PowerEdge M610 onboard UHCI 1028 029c PowerEdge M710 USB UHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 2936 82801I (ICH9 Family) USB UHCI Controller #3 @@ -21300,8 +23105,10 @@ 1028 023c PowerEdge R200 onboard UHCI 1028 0287 PowerEdge M610 onboard UHCI 1028 029c PowerEdge M710 USB UHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 2937 82801I (ICH9 Family) USB UHCI Controller #4 @@ -21313,8 +23120,10 @@ 1028 0287 PowerEdge M610 onboard UHCI 1028 029c PowerEdge M710 USB UHCI Controller 1028 2011 Optiplex 755 + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 2937 Optiplex 755 8086 2942 828011 (ICH9 Family ) USB UHCI Controller 8086 5044 Desktop Board DP35DP @@ -21327,8 +23136,10 @@ 1028 0237 PowerEdge T610 USB UHCI Controller 1028 0287 PowerEdge M610 onboard UHCI 1028 029c PowerEdge M710 USB UHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 2938 Optiplex 755 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE @@ -21336,8 +23147,10 @@ 1028 020d Inspiron 530 1028 0210 PowerEdge T300 onboard UHCI 1028 0237 PowerEdge T610 USB UHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 293a 82801I (ICH9 Family) USB2 EHCI Controller #1 @@ -21351,8 +23164,10 @@ 1028 023c PowerEdge R200 onboard EHCI 1028 0287 PowerEdge M610 onboard EHCI 1028 029c PowerEdge M710 USB EHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 293c 82801I (ICH9 Family) USB2 EHCI Controller #2 @@ -21363,23 +23178,28 @@ 1028 0237 PowerEdge T610 USB EHCI Controller 1028 0287 PowerEdge M610 onboard EHCI 1028 029c PowerEdge M710 USB EHCI Controller + 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 293c Optiplex 755 8086 5044 Desktop Board DP35DP e4bf cc4d CCM-BOOGIE 293e 82801I (ICH9 Family) HD Audio Controller 1028 020d Inspiron 530 1028 0211 Optiplex 755 + 103c 2a6f Asus IPIBL-LB Motherboard 103c 3628 dv6-1190en 1043 829f P5K PRO Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 293e Optiplex 755 8086 2940 Optiplex 755 e4bf cc4d CCM-BOOGIE 2940 82801I (ICH9 Family) PCI Express Port 1 1028 020d Inspiron 530 1028 0211 Optiplex 755 + 103c 2a6f Asus IPIBL-LB Motherboard # same ID possibly also on other ASUS boards 1043 8277 P5K PRO Motherboard 8086 2940 Optiplex 755 @@ -21387,6 +23207,7 @@ 1028 020d Inspiron 530 2944 82801I (ICH9 Family) PCI Express Port 3 1028 020d Inspiron 530 + 103c 2a6f Asus IPIBL-LB Motherboard 2946 82801I (ICH9 Family) PCI Express Port 4 1028 020d Inspiron 530 2948 82801I (ICH9 Family) PCI Express Port 5 @@ -21449,10 +23270,12 @@ 1028 0211 OptiPlex 755 29c0 82G33/G31/P35/P31 Express DRAM Controller 1028 020d Inspiron 530 + 103c 2a6f Asus IPIBL-LB Motherboard # same ID possibly also on other ASUS boards 1043 8276 P5K PRO Motherboard 1043 82b0 P5KPL-VM Motherboard 1462 7360 G33/P35 Neo + 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP 29c1 82G33/G31/P35/P31 Express PCI Express Root Port 1028 020d Inspiron 530 @@ -21503,6 +23326,7 @@ 104d 902d VAIO VGN-NR120E 17aa 20b1 ThinkPad T61 17aa 20b3 ThinkPad T61/R61 + 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a01 Mobile PM965/GM965/GL960 PCI Express Root Port 2a02 Mobile GM965/GL960 Integrated Graphics Controller (primary) @@ -21512,13 +23336,15 @@ 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E 17aa 20b5 ThinkPad T61/R61 + 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) - 1028 01f3 Dell Inspiron 1420 + 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E 17aa 20b5 ThinkPad T61/R61 + 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -21677,9 +23503,9 @@ 2cf3 Xeon C5500/C3500 Integrated Memory Controller Channel 2 Thermal Control 2d01 Core Processor QuickPath Architecture System Address Decoder 2d10 Core Processor QPI Link 0 - 2d11 Core Processor QPI Physical 0 - 2d12 Core Processor Reserved - 2d13 Core Processor Reserved + 2d11 1st Generation Core Processor QPI Physical 0 + 2d12 1st Generation Core Processor Reserved + 2d13 1st Generation Core Processor Reserved 2d81 Xeon 5600 Series QuickPath Architecture System Address Decoder 2d90 Xeon 5600 Series QPI Link 0 2d91 Xeon 5600 Series QPI Physical 0 @@ -21714,12 +23540,14 @@ 2e10 4 Series Chipset DRAM Controller 2e11 4 Series Chipset PCI Express Root Port 2e12 4 Series Chipset Integrated Graphics Controller + 17aa 3048 ThinkCentre M6258 2e13 4 Series Chipset Integrated Graphics Controller 2e14 4 Series Chipset HECI Controller 2e15 4 Series Chipset HECI Controller 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller + 1028 0283 Dell Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -21830,6 +23658,7 @@ 2f36 Haswell-E R3 QPI Link 0 & 1 Monitoring 2f37 Haswell-E R3 QPI Link 0 & 1 Monitoring 2f38 Haswell-E Home Agent 1 + 2f39 Haswell-E I/O Performance Monitoring 2f3a Haswell-E QPI Link 2 2f3e Haswell-E R3 QPI Link 2 Monitoring 2f3f Haswell-E R3 QPI Link 2 Monitoring @@ -22113,6 +23942,7 @@ 4c53 10d0 Telum ASLP10 Processor AMC 3591 E7525/E7520 Error Reporting Registers 1014 02dd eServer xSeries server mainboard + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 103c 3208 ProLiant DL140 G2 4c53 10d0 Telum ASLP10 Processor AMC @@ -22136,6 +23966,7 @@ 359b E7525/E7520/E7320 Extended Configuration Registers 1014 02dd eServer xSeries server mainboard 359e E7525 Memory Controller Hub + 1028 0168 Precision Workstation 670 Mainboard 1028 0169 Precision 470 35b0 3100 Chipset Memory I/O Controller Hub 35b1 3100 DRAM Controller Error Reporting Registers @@ -22279,7 +24110,7 @@ 1028 028d PowerEdge T410 USB EHCI Controller 103c 330b ProLiant G6 series 1043 82d4 P5Q Deluxe Motherboard - 1458 5006 GA-EP45-DS5 Motherboard + 1458 5006 Motherboard 3a3e 82801JI (ICH10 Family) HD Audio Controller 1043 8311 P5Q Deluxe Motherboard 1458 a002 GA-EP45-UD3R Motherboard @@ -22340,8 +24171,11 @@ 3b08 5 Series Chipset LPC Interface Controller 3b09 Mobile 5 Series Chipset LPC Interface Controller 1025 0347 Aspire 7740G + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b0a 5 Series Chipset LPC Interface Controller 1028 02da OptiPlex 980 + 15d9 060d C7SIM-Q Motherboard 3b0b Mobile 5 Series Chipset LPC Interface Controller 3b0c 5 Series Chipset LPC Interface Controller 3b0d 5 Series/3400 Series Chipset LPC Interface Controller @@ -22367,14 +24201,22 @@ 3b21 5 Series/3400 Series Chipset 2 port SATA IDE Controller 3b22 5 Series/3400 Series Chipset 6 port SATA AHCI Controller 1028 02da OptiPlex 980 + 15d9 060d C7SIM-Q Motherboard 3b23 5 Series/3400 Series Chipset 4 port SATA AHCI Controller 3b25 5 Series/3400 Series Chipset SATA RAID Controller + 103c 3118 HP Smart Array B110i SATA RAID Controller 3b26 5 Series/3400 Series Chipset 2 port SATA IDE Controller 3b28 5 Series/3400 Series Chipset 4 port SATA IDE Controller + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b29 5 Series/3400 Series Chipset 4 port SATA AHCI Controller 1025 0347 Aspire 7740G + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b2c 5 Series/3400 Series Chipset SATA RAID Controller 3b2d 5 Series/3400 Series Chipset 2 port SATA IDE Controller + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b2e 5 Series/3400 Series Chipset 4 port SATA IDE Controller e4bf 50c1 PC1-GROOVE @@ -22385,13 +24227,21 @@ 1025 0347 Aspire 7740G 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b32 5 Series/3400 Series Chipset Thermal Subsystem 1025 0347 Aspire 7740G + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b34 5 Series/3400 Series Chipset USB2 Enhanced Host Controller 1025 0347 Aspire 7740G 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b36 5 Series/3400 Series Chipset USB Universal Host Controller 3b37 5 Series/3400 Series Chipset USB Universal Host Controller @@ -22403,6 +24253,9 @@ 1025 0347 Aspire 7740G 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b3e 5 Series/3400 Series Chipset USB Universal Host Controller 3b3f 5 Series/3400 Series Chipset USB Universal Host Controller @@ -22411,14 +24264,23 @@ 3b42 5 Series/3400 Series Chipset PCI Express Root Port 1 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b44 5 Series/3400 Series Chipset PCI Express Root Port 2 1028 040b Latitude E6510 + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b46 5 Series/3400 Series Chipset PCI Express Root Port 3 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b48 5 Series/3400 Series Chipset PCI Express Root Port 4 1028 040b Latitude E6510 + 144d c06a R730 Laptop 3b4a 5 Series/3400 Series Chipset PCI Express Root Port 5 1028 02da OptiPlex 980 + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] 3b4c 5 Series/3400 Series Chipset PCI Express Root Port 6 3b4e 5 Series/3400 Series Chipset PCI Express Root Port 7 3b50 5 Series/3400 Series Chipset PCI Express Root Port 8 @@ -22427,10 +24289,15 @@ 1025 0347 Aspire 7740G 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 144d c06a R730 Laptop + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b57 5 Series/3400 Series Chipset High Definition Audio 3b64 5 Series/3400 Series Chipset HECI Controller 1025 0347 Aspire 7740G + 15d9 060d C7SIM-Q Motherboard + 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] e4bf 50c1 PC1-GROOVE 3b65 5 Series/3400 Series Chipset HECI Controller 3b66 5 Series/3400 Series Chipset PT IDER Controller @@ -22555,7 +24422,7 @@ 4222 PRO/Wireless 3945ABG [Golan] Network Connection 103c 135c PRO/Wireless 3945ABG [Golan] Network Connection 8086 1000 PRO/Wireless 3945ABG Network Connection - 8086 1001 PRO/Wireless 3945ABG Network Connection + 8086 1001 WM3945ABG MOW2 8086 1005 PRO/Wireless 3945BG Network Connection 8086 1034 PRO/Wireless 3945BG Network Connection 8086 1044 PRO/Wireless 3945BG Network Connection @@ -22568,7 +24435,7 @@ 1351 103c Compaq NC6220 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection - 8086 1011 ThinkPad R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -22680,10 +24547,12 @@ 504a EP80579 Reserved 504b EP80579 Reserved 504c EP80579 Integrated Processor with QuickAssist TDM - 5200 EtherExpress PRO/100 Intelligent Server - 5201 EtherExpress PRO/100 Intelligent Server + 5200 EtherExpress PRO/100 Intelligent Server PCI Bridge + 5201 EtherExpress PRO/100 Intelligent Server Fast Ethernet Controller 8086 0001 EtherExpress PRO/100 Server Ethernet Adapter 530d 80310 (IOP) IO Processor + 5845 QEMU NVM Express Controller + 1af4 1100 QEMU Virtual Machine 65c0 5100 Chipset Memory Controller Hub 65e2 5100 Chipset PCI Express x4 Port 2 65e3 5100 Chipset PCI Express x4 Port 3 @@ -22704,12 +24573,173 @@ 65f9 5100 Chipset PCI Express x8 Port 6-7 65fa 5100 Chipset PCI Express x16 Port 4-7 65ff 5100 Chipset DMA Engine + 6f00 Broadwell DMI2 + 6f01 Broadwell PCI Express Root Port 0 + 6f02 Broadwell PCI Express Root Port 1 + 6f03 Broadwell PCI Express Root Port 1 + 6f04 Broadwell PCI Express Root Port 2 + 6f05 Broadwell PCI Express Root Port 2 + 6f06 Broadwell PCI Express Root Port 2 + 6f07 Broadwell PCI Express Root Port 2 + 6f08 Broadwell PCI Express Root Port 3 + 6f09 Broadwell PCI Express Root Port 3 + 6f0a Broadwell PCI Express Root Port 3 + 6f0b Broadwell PCI Express Root Port 3 + 6f10 Broadwell IIO Debug + 6f11 Broadwell IIO Debug + 6f12 Broadwell IIO Debug + 6f13 Broadwell IIO Debug + 6f14 Broadwell IIO Debug + 6f15 Broadwell IIO Debug + 6f16 Broadwell IIO Debug + 6f17 Broadwell IIO Debug + 6f18 Broadwell IIO Debug + 6f19 Broadwell IIO Debug + 6f1a Broadwell IIO Debug + 6f1b Broadwell IIO Debug + 6f1c Broadwell IIO Debug + 6f1d Broadwell R2PCIe Agent + 6f1e Broadwell Ubox + 6f1f Broadwell Ubox + 6f20 Broadwell-DE Crystal Beach DMA Channel 0 + 6f21 Broadwell-DE Crystal Beach DMA Channel 1 + 6f22 Broadwell-DE Crystal Beach DMA Channel 2 + 6f23 Broadwell-DE Crystal Beach DMA Channel 3 + 6f24 Broadwell-DE Crystal Beach DMA Channel 4 + 6f25 Broadwell-DE Crystal Beach DMA Channel 5 + 6f26 Broadwell-DE Crystal Beach DMA Channel 6 + 6f27 Broadwell-DE Crystal Beach DMA Channel 7 + 6f28 Broadwell Adress Map/VTd_Misc/System Management + 6f29 Broadwell IIO Hot Plug + 6f2a Broadwell IIO RAS/Control Status/Global Errors + 6f2c Broadwell I/O APIC + 6f30 Broadwell Home Agent 0 + 6f32 Broadwell QPI Link 0 + 6f33 Broadwell QPI Link 1 + 6f34 Broadwell R2PCIe Agent + 6f36 Broadwell R3 QPI Link 0/1 + 6f37 Broadwell R3 QPI Link 0/1 + 6f38 Broadwell Home Agent 1 + 6f39 Broadwell IO Performance Monitoring + 6f3a Broadwell QPI Link 2 + 6f3e Broadwell R3 QPI Link 2 + 6f3f Broadwell R3 QPI Link 2 + 6f40 Broadwell QPI Link 2 + 6f41 Broadwell R3 QPI Link 2 + 6f43 Broadwell QPI Link 2 + 6f45 Broadwell QPI Link 2 Debug + 6f46 Broadwell QPI Link 2 Debug + 6f47 Broadwell QPI Link 2 Debug + 6f60 Broadwell Home Agent 1 + 6f68 Broadwell Target Address/Thermal/RAS + 6f6a Broadwell Channel Target Address Decoder + 6f6b Broadwell Channel Target Address Decoder + 6f6c Broadwell Channel Target Address Decoder + 6f6d Broadwell Channel Target Address Decoder + 6f6e Broadwell DDRIO Channel 2/3 Broadcast + 6f6f Broadwell DDRIO Global Broadcast + 6f70 Broadwell Home Agent 0 Debug + 6f71 Broadwell Memory Controller 0 - Target Address/Thermal/RAS + 6f76 Broadwell R3 QPI Link Debug + 6f78 Broadwell Home Agent 1 Debug + 6f79 Broadwell Target Address/Thermal/RAS + 6f7d Broadwell Ubox + 6f7e Broadwell R3 QPI Link Debug + 6f80 Broadwell QPI Link 0 + 6f81 Broadwell R3 QPI Link 0/1 + 6f83 Broadwell QPI Link 0 + 6f85 Broadwell QPI Link 0 Debug + 6f86 Broadwell QPI Link 0 Debug + 6f87 Broadwell QPI Link 0 Debug + 6f88 Broadwell Power Control Unit + 6f8a Broadwell Power Control Unit + 6f90 Broadwell QPI Link 1 + 6f93 Broadwell QPI Link 1 + 6f95 Broadwell QPI Link 1 Debug + 6f96 Broadwell QPI Link 1 Debug + 6f98 Broadwell Power Control Unit + 6f99 Broadwell Power Control Unit + 6f9a Broadwell Power Control Unit + 6f9c Broadwell Power Control Unit + 6fa0 Broadwell Home Agent 0 + 6fa8 Broadwell Memory Controller 0 - Target Address/Thermal/RAS + 6faa Broadwell Memory Controller 0 - Channel Target Address Decoder + 6fab Broadwell Memory Controller 0 - Channel Target Address Decoder + 6fac Broadwell Memory Controller 0 - Channel Target Address Decoder + 6fad Broadwell Memory Controller 0 - Channel Target Address Decoder + 6fae Broadwell DDRIO Channel 0/1 Broadcast + 6faf Broadwell DDRIO Global Broadcast + 6fb0 Broadwell Memory Controller 0 - Channel 0 Thermal Control + 6fb1 Broadwell Memory Controller 0 - Channel 1 Thermal Control + 6fb2 Broadwell Memory Controller 0 - Channel 0 Error + 6fb3 Broadwell Memory Controller 0 - Channel 1 Error + 6fb4 Broadwell Memory Controller 0 - Channel 2 Thermal Control + 6fb5 Broadwell Memory Controller 0 - Channel 3 Thermal Control + 6fb6 Broadwell Memory Controller 0 - Channel 2 Error + 6fb7 Broadwell Memory Controller 0 - Channel 3 Error + 6fb8 Broadwell DDRIO Channel 2/3 Interface + 6fb9 Broadwell DDRIO Channel 2/3 Interface + 6fba Broadwell DDRIO Channel 2/3 Interface + 6fbb Broadwell DDRIO Channel 2/3 Interface + 6fbc Broadwell DDRIO Channel 0/1 Interface + 6fbd Broadwell DDRIO Channel 0/1 Interface + 6fbe Broadwell DDRIO Channel 0/1 Interface + 6fbf Broadwell DDRIO Channel 0/1 Interface + 6fc0 Broadwell Power Control Unit + 6fc1 Broadwell Power Control Unit + 6fc2 Broadwell Power Control Unit + 6fc3 Broadwell Power Control Unit + 6fc4 Broadwell Power Control Unit + 6fc5 Broadwell Power Control Unit + 6fc6 Broadwell Power Control Unit + 6fc7 Broadwell Power Control Unit + 6fc8 Broadwell Power Control Unit + 6fc9 Broadwell Power Control Unit + 6fca Broadwell Power Control Unit + 6fcb Broadwell Power Control Unit + 6fcc Broadwell Power Control Unit + 6fcd Broadwell Power Control Unit + 6fce Broadwell Power Control Unit + 6fcf Broadwell Power Control Unit + 6fd0 Broadwell Memory Controller 1 - Channel 0 Thermal Control + 6fd1 Broadwell Memory Controller 1 - Channel 1 Thermal Control + 6fd2 Broadwell Memory Controller 1 - Channel 0 Error + 6fd3 Broadwell Memory Controller 1 - Channel 1 Error + 6fd4 Broadwell Memory Controller 1 - Channel 2 Thermal Control + 6fd5 Broadwell Memory Controller 1 - Channel 3 Thermal Control + 6fd6 Broadwell Memory Controller 1 - Channel 2 Error + 6fd7 Broadwell Memory Controller 1 - Channel 3 Error + 6fe0 Broadwell Caching Agent + 6fe1 Broadwell Caching Agent + 6fe2 Broadwell Caching Agent + 6fe3 Broadwell Caching Agent + 6fe4 Broadwell Caching Agent + 6fe5 Broadwell Caching Agent + 6fe6 Broadwell Caching Agent + 6fe7 Broadwell Caching Agent + 6fe8 Broadwell Caching Agent + 6fe9 Broadwell Caching Agent + 6fea Broadwell Caching Agent + 6feb Broadwell Caching Agent + 6fec Broadwell Caching Agent + 6fed Broadwell Caching Agent + 6fee Broadwell Caching Agent + 6fef Broadwell Caching Agent + 6ff0 Broadwell Caching Agent + 6ff1 Broadwell Caching Agent + 6ff8 Broadwell Caching Agent + 6ff9 Broadwell Caching Agent + 6ffa Broadwell Caching Agent + 6ffb Broadwell Caching Agent + 6ffc Broadwell Caching Agent + 6ffd Broadwell Caching Agent + 6ffe Broadwell Caching Agent 7000 82371SB PIIX3 ISA [Natoma/Triton II] 1af4 1100 Qemu virtual machine 7010 82371SB PIIX3 IDE [Natoma/Triton II] 1af4 1100 Qemu virtual machine 7020 82371SB PIIX3 USB [Natoma/Triton II] - 1af4 1100 Qemu virtual machine + 1af4 1100 QEMU Virtual Machine 7030 430VX - 82437VX TVX [Triton VX] 7050 Intercast Video Capture Card 7051 PB 642365-003 (Business Video Conferencing Card) @@ -22720,6 +24750,7 @@ 15ad 1976 Virtual Machine Chipset 7112 82371AB/EB/MB PIIX4 USB 15ad 1976 Virtual Machine Chipset + 1af4 1100 QEMU Virtual Machine 7113 82371AB/EB/MB PIIX4 ACPI 15ad 1976 Virtual Machine Chipset 1af4 1100 Qemu virtual machine @@ -22857,6 +24888,8 @@ 8c01 8 Series Chipset Family 4-port SATA Controller 1 [IDE mode] - Mobile 8c02 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] 8c03 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c04 8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] 8c05 8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] 8c06 8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] @@ -22866,8 +24899,10 @@ 8c0e 8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] 8c0f 8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] 8c10 8 Series/C220 Series Chipset Family PCI Express Root Port #1 + 17aa 220e ThinkPad T440p 8c11 8 Series/C220 Series Chipset Family PCI Express Root Port #1 8c12 8 Series/C220 Series Chipset Family PCI Express Root Port #2 + 17aa 220e ThinkPad T440p 8c13 8 Series/C220 Series Chipset Family PCI Express Root Port #2 8c14 8 Series/C220 Series Chipset Family PCI Express Root Port #3 8c15 8 Series/C220 Series Chipset Family PCI Express Root Port #3 @@ -22882,16 +24917,28 @@ 8c1e 8 Series/C220 Series Chipset Family PCI Express Root Port #8 8c1f 8 Series/C220 Series Chipset Family PCI Express Root Port #8 8c20 8 Series/C220 Series Chipset High Definition Audio Controller + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c21 8 Series/C220 Series Chipset High Definition Audio Controller 8c22 8 Series/C220 Series Chipset Family SMBus Controller + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c23 8 Series Chipset Family CHAP Counters 8c24 8 Series Chipset Family Thermal Management Controller 8c26 8 Series/C220 Series Chipset Family USB EHCI #1 + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c2d 8 Series/C220 Series Chipset Family USB EHCI #2 + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c31 8 Series/C220 Series Chipset Family USB xHCI + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c33 8 Series/C220 Series Chipset Family LAN Controller 8c34 8 Series/C220 Series Chipset Family NAND Controller 8c3a 8 Series/C220 Series Chipset Family MEI Controller #1 + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c3b 8 Series/C220 Series Chipset Family MEI Controller #2 8c3c 8 Series/C220 Series Chipset Family IDE-r Controller 8c3d 8 Series/C220 Series Chipset Family KT Controller @@ -22911,6 +24958,8 @@ 8c4d 8 Series/C220 Series Chipset Family LPC Controller 8c4e Q87 Express LPC Controller 8c4f QM87 Express LPC Controller + 103c 1909 ZBook 15 + 17aa 220e ThinkPad T440p 8c50 B85 Express LPC Controller 8c51 8 Series/C220 Series Chipset Family LPC Controller 8c52 C222 Series Chipset Family Server Essential SKU LPC Controller @@ -22927,10 +24976,47 @@ 8c5d 8 Series/C220 Series Chipset Family LPC Controller 8c5e 8 Series/C220 Series Chipset Family LPC Controller 8c5f 8 Series/C220 Series Chipset Family LPC Controller + 8c80 9 Series Chipset Family SATA Controller [IDE Mode] + 8c81 9 Series Chipset Family SATA Controller [IDE Mode] + 8c82 9 Series Chipset Family SATA Controller [AHCI Mode] + 8c83 9 Series Chipset Family SATA Controller [AHCI Mode] + 8c84 9 Series Chipset Family SATA Controller [RAID Mode] + 8c85 9 Series Chipset Family SATA Controller [RAID Mode] + 8c86 9 Series Chipset Family SATA Controller [RAID Mode] + 8c87 9 Series Chipset Family SATA Controller [RAID Mode] + 8c88 9 Series Chipset Family SATA Controller [IDE Mode] + 8c89 9 Series Chipset Family SATA Controller [IDE Mode] + 8c8e 9 Series Chipset Family SATA Controller [RAID Mode] + 8c8f 9 Series Chipset Family SATA Controller [RAID Mode] + 8c90 9 Series Chipset Family PCI Express Root Port 1 + 8c92 9 Series Chipset Family PCI Express Root Port 2 + 8c94 9 Series Chipset Family PCI Express Root Port 3 + 8c96 9 Series Chipset Family PCI Express Root Port 4 + 8c98 9 Series Chipset Family PCI Express Root Port 5 + 8c9a 9 Series Chipset Family PCI Express Root Port 6 + 8c9c 9 Series Chipset Family PCI Express Root Port 7 + 8c9e 9 Series Chipset Family PCI Express Root Port 8 + 8ca0 9 Series Chipset Family HD Audio Controller + 8ca2 9 Series Chipset Family SMBus Controller + 8ca4 9 Series Chipset Family Thermal Controller + 8ca6 9 Series Chipset Family USB EHCI Controller #1 + 8cad 9 Series Chipset Family USB EHCI Controller #2 + 8cb1 9 Series Chipset Family USB xHCI Controller + 8cb3 9 Series Chipset Family LAN Controller + 8cba 9 Series Chipset Family ME Interface #1 + 8cbb 9 Series Chipset Family ME Interface #2 + 8cbc 9 Series Chipset Family IDE-R Controller + 8cbd 9 Series Chipset Family KT Controller + 8cc1 9 Series Chipset Family LPC Controller + 8cc2 9 Series Chipset Family LPC Controller + 8cc3 9 Series Chipset Family HM97 LPC Controller + 8cc4 9 Series Chipset Family Z97 LPC Controller + 8cc6 9 Series Chipset Family H97 Controller 8d00 Wellsburg 4-port SATA Controller [IDE mode] 8d02 Wellsburg 6-Port SATA Controller [AHCI mode] 8d04 Wellsburg SATA Controller [RAID mode] 8d06 Wellsburg SATA Controller [RAID mode] + 17aa 1031 ThinkServer RAID 110i 8d08 Wellsburg 2-port SATA Controller [IDE mode] 8d0e Wellsburg SATA Controller [RAID mode] 8d10 Wellsburg PCI Express Root Port #1 @@ -22984,7 +25070,7 @@ 8d66 Wellsburg sSATA Controller [RAID mode] 8d68 Wellsburg sSATA Controller [IDE mode] 8d6e Wellsburg sSATA Controller [RAID mode] - 8d7c Wellsburg EPSS + 8d7c Wellsburg SPSR 8d7d Wellsburg MS SMBus 0 8d7e Wellsburg MS SMBus 1 8d7f Wellsburg MS SMBus 2 @@ -22996,67 +25082,109 @@ 9622 Integrated RAID 9641 Integrated RAID 96a1 Integrated RAID - 9c00 Lynx Point-LP SATA Controller 1 [IDE mode] - 9c01 Lynx Point-LP SATA Controller 1 [IDE mode] - 9c02 Lynx Point-LP SATA Controller 1 [AHCI mode] - 9c03 Lynx Point-LP SATA Controller 1 [AHCI mode] - 9c04 Lynx Point-LP SATA Controller 1 [RAID mode] - 9c05 Lynx Point-LP SATA Controller 1 [RAID mode] - 9c06 Lynx Point-LP SATA Controller 1 [RAID mode] - 9c07 Lynx Point-LP SATA Controller 1 [RAID mode] - 9c08 Lynx Point-LP SATA Controller 2 [IDE mode] - 9c09 Lynx Point-LP SATA Controller 2 [IDE mode] - 9c0a LynxPoint-LP SATA Controller [Reserved] - 9c0b LynxPoint-LP SATA Controller [Reserved] - 9c0c LynxPoint-LP SATA Controller [Reserved] - 9c0d LynxPoint-LP SATA Controller [Reserved] - 9c0e Lynx Point-LP SATA Controller 1 [RAID mode] - 9c0f Lynx Point-LP SATA Controller 1 [RAID mode] - 9c10 Lynx Point-LP PCI Express Root Port 1 - 9c11 Lynx Point-LP PCI Express Root Port 1 - 9c12 Lynx Point-LP PCI Express Root Port 2 - 9c13 Lynx Point-LP PCI Express Root Port 2 - 9c14 Lynx Point-LP PCI Express Root Port 3 - 9c15 Lynx Point-LP PCI Express Root Port 3 - 9c16 Lynx Point-LP PCI Express Root Port 4 - 9c17 Lynx Point-LP PCI Express Root Port 4 - 9c18 Lynx Point-LP PCI Express Root Port 5 - 9c19 Lynx Point-LP PCI Express Root Port 5 - 9c1a Lynx Point-LP PCI Express Root Port 6 - 9c1b Lynx Point-LP PCI Express Root Port 6 - 9c1c Lynx Point-LP PCI Express Root Port 7 - 9c1d Lynx Point-LP PCI Express Root Port 7 - 9c1e Lynx Point-LP PCI Express Root Port 8 - 9c1f Lynx Point-LP PCI Express Root Port 8 - 9c20 Lynx Point-LP HD Audio Controller - 9c21 Lynx Point-LP HD Audio Controller - 9c22 Lynx Point-LP SMBus Controller - 9c23 Lynx Point-LP CHAP Counters - 9c24 Lynx Point-LP Thermal - 9c26 Lynx Point-LP USB EHCI #1 - 9c2d Lynx Point-LP USB EHCI #2 - 9c31 Lynx Point-LP USB xHCI HC - 9c35 Lynx Point-LP SDIO Controller - 9c36 Lynx Point-LP Audio DSP Controller - 9c3a Lynx Point-LP HECI #0 - 9c3b Lynx Point-LP HECI #1 - 9c3c Lynx Point-LP HECI IDER - 9c3d Lynx Point-LP HECI KT - 9c40 Lynx Point-LP LPC Controller - 9c41 Lynx Point-LP LPC Controller - 9c42 Lynx Point-LP LPC Controller - 9c43 Lynx Point-LP LPC Controller - 9c44 Lynx Point-LP LPC Controller - 9c45 Lynx Point-LP LPC Controller - 9c46 Lynx Point-LP LPC Controller - 9c47 Lynx Point-LP LPC Controller - 9c60 Lynx Point-LP Low Power Sub-System DMA - 9c61 Lynx Point-LP I2C Controller #0 - 9c62 Lynx Point-LP I2C Controller #1 - 9c63 Lynx Point-LP UART Controller #0 - 9c64 Lynx Point-LP UART Controller #1 - 9c65 Lynx Point-LP SPI Controller #0 - 9c66 Lynx Point-LP SPI Controller #1 + 9c00 8 Series SATA Controller 1 [IDE mode] + 9c01 8 Series SATA Controller 1 [IDE mode] + 9c02 8 Series SATA Controller 1 [AHCI mode] + 9c03 8 Series SATA Controller 1 [AHCI mode] + 17aa 2214 ThinkPad X240 + 9c04 8 Series SATA Controller 1 [RAID mode] + 9c05 8 Series SATA Controller 1 [RAID mode] + 9c06 8 Series SATA Controller 1 [RAID mode] + 9c07 8 Series SATA Controller 1 [RAID mode] + 9c08 8 Series SATA Controller 2 [IDE mode] + 9c09 8 Series SATA Controller 2 [IDE mode] + 9c0a 8 Series SATA Controller [Reserved] + 9c0b 8 Series SATA Controller [Reserved] + 9c0c 8 Series SATA Controller [Reserved] + 9c0d 8 Series SATA Controller [Reserved] + 9c0e 8 Series SATA Controller 1 [RAID mode] + 9c0f 8 Series SATA Controller 1 [RAID mode] + 9c10 8 Series PCI Express Root Port 1 + 9c11 8 Series PCI Express Root Port 1 + 9c12 8 Series PCI Express Root Port 2 + 9c13 8 Series PCI Express Root Port 2 + 9c14 8 Series PCI Express Root Port 3 + 9c15 8 Series PCI Express Root Port 3 + 9c16 8 Series PCI Express Root Port 4 + 9c17 8 Series PCI Express Root Port 4 + 9c18 8 Series PCI Express Root Port 5 + 9c19 8 Series PCI Express Root Port 5 + 9c1a 8 Series PCI Express Root Port 6 + 9c1b 8 Series PCI Express Root Port 6 + 9c1c 8 Series PCI Express Root Port 7 + 9c1d 8 Series PCI Express Root Port 7 + 9c1e 8 Series PCI Express Root Port 8 + 9c1f 8 Series PCI Express Root Port 8 + 9c20 8 Series HD Audio Controller + 17aa 2214 ThinkPad X240 + 9c21 8 Series HD Audio Controller + 9c22 8 Series SMBus Controller + 17aa 2214 ThinkPad X240 + 9c23 8 Series CHAP Counters + 9c24 8 Series Thermal + 9c26 8 Series USB EHCI #1 + 17aa 2214 ThinkPad X240 + 9c2d 8 Series USB EHCI #2 + 9c31 8 Series USB xHCI HC + 17aa 2214 ThinkPad X240 + 9c35 8 Series SDIO Controller + 9c36 8 Series Audio DSP Controller + 9c3a 8 Series HECI #0 + 17aa 2214 ThinkPad X240 + 9c3b 8 Series HECI #1 + 9c3c 8 Series HECI IDER + 9c3d 8 Series HECI KT + 9c40 8 Series LPC Controller + 9c41 8 Series LPC Controller + 9c42 8 Series LPC Controller + 9c43 8 Series LPC Controller + 17aa 2214 ThinkPad X240 + 9c44 8 Series LPC Controller + 9c45 8 Series LPC Controller + 9c46 8 Series LPC Controller + 9c47 8 Series LPC Controller + 9c60 8 Series Low Power Sub-System DMA + 9c61 8 Series I2C Controller #0 + 9c62 8 Series I2C Controller #1 + 9c63 8 Series UART Controller #0 + 9c64 8 Series UART Controller #1 + 9c65 8 Series SPI Controller #0 + 9c66 8 Series SPI Controller #1 + 9c83 Wildcat Point-LP SATA Controller [AHCI Mode] + 9c85 Wildcat Point-LP SATA Controller [RAID Mode] + 9c87 Wildcat Point-LP SATA Controller [RAID Mode] + 9c8f Wildcat Point-LP SATA Controller [RAID Mode] + 9c90 Wildcat Point-LP PCI Express Root Port #1 + 9c92 Wildcat Point-LP PCI Express Root Port #2 + 9c94 Wildcat Point-LP PCI Express Root Port #3 + 9c96 Wildcat Point-LP PCI Express Root Port #4 + 9c98 Wildcat Point-LP PCI Express Root Port #5 + 9c9a Wildcat Point-LP PCI Express Root Port #6 + 9ca0 Wildcat Point-LP High Definition Audio Controller + 9ca2 Wildcat Point-LP SMBus Controller + 9ca4 Wildcat Point-LP Thermal Management Controller + 9ca6 Wildcat Point-LP USB EHCI Controller + 9cb1 Wildcat Point-LP USB xHCI Controller + 9cb5 Wildcat Point-LP Secure Digital IO Controller + 9cb6 Wildcat Point-LP Smart Sound Technology Controller + 9cba Wildcat Point-LP MEI Controller #1 + 9cbb Wildcat Point-LP MEI Controller #2 + 9cbc Wildcat Point-LP IDE-r Controller + 9cbd Wildcat Point-LP KT Controller + 9cc1 Wildcat Point-LP LPC Controller + 9cc2 Wildcat Point-LP LPC Controller + 9cc3 Wildcat Point-LP LPC Controller + 9cc5 Wildcat Point-LP LPC Controller + 9cc6 Wildcat Point-LP LPC Controller + 9cc7 Wildcat Point-LP LPC Controller + 9cc9 Wildcat Point-LP LPC Controller + 9ce0 Wildcat Point-LP Serial IO DMA Controller + 9ce1 Wildcat Point-LP Serial IO I2C Controller #0 + 9ce2 Wildcat Point-LP Serial IO I2C Controller #1 + 9ce3 Wildcat Point-LP Serial IO UART Controller #0 + 9ce4 Wildcat Point-LP Serial IO UART Controller #1 + 9ce5 Wildcat Point-LP Serial IO GSPI Controller #0 + 9ce6 Wildcat Point-LP Serial IO GSPI Controller #1 a000 Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge 1458 5000 GA-D525TUD 8086 4f4d DeskTop Board D510MO @@ -23089,6 +25217,7 @@ d130 Core Processor DMI d131 Core Processor DMI 1028 02da OptiPlex 980 + 15d9 060d C7SIM-Q Motherboard d132 Core Processor DMI 1028 040b Latitude E6510 d133 Core Processor DMI @@ -23099,6 +25228,7 @@ d138 Core Processor PCI Express Root Port 1 1028 02da OptiPlex 980 1028 040b Latitude E6510 + 15d9 060d C7SIM-Q Motherboard d139 Core Processor PCI Express Root Port 2 d13a Core Processor PCI Express Root Port 3 d13b Core Processor PCI Express Root Port 4 @@ -23311,7 +25441,7 @@ 1028 0287 PowerEdge Expandable RAID Controller 320/DC 1028 0291 CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) 103c 3227 AAR-2610SA - 108e 0286 STK RAID INT + 108e 0286 Sun StorageTek SAS RAID HBA, Internal 108e 0287 STK RAID EXT 108e 7aac STK RAID REM 108e 7aae STK RAID EX @@ -23488,6 +25618,7 @@ 8088 PMC-Sierra PM8018 SAS HBA [Series 7H] 8089 PMC-Sierra PM8019 SAS encryption HBA [Series 7He] 808f AIC-7901 U320 w/HostRAID + 1028 0168 Precision Workstation 670 Mainboard 8090 ASC-39320 U320 w/HostRAID 8091 ASC-39320D U320 w/HostRAID 8092 ASC-29320 U320 w/HostRAID @@ -23536,8 +25667,10 @@ 9904 4-Port PCIe Serial Adapter # 2-port Serial 1-port Parallel Adaptor 9912 PCIe 9912 Multi-I/O Controller - 9922 PCIe 9922 Multi-I/O Controller + 9922 MCS9922 PCIe Multi-I/O Controller 9990 MCS9990 PCIe to 4-Port USB 2.0 Host Controller +# Subsystem ID on a 3c985B-SX network card +9850 3Com (wrong ID) 9902 Stargen Inc. 0001 SG2010 PCI over Starfabric Bridge 0002 SG2010 PCI to Starfabric Gateway @@ -23551,6 +25684,22 @@ a304 Sony a727 3Com Corporation 0013 3CRPAG175 Wireless PC Card 6803 3CRDAG675B Wireless 11a/b/g Adapter +aa00 iTuner +aa01 iTuner +aa02 iTuner +aa03 iTuner +aa04 iTuner +aa05 iTuner +aa06 iTuner +aa07 iTuner +aa08 iTuner +aa09 iTuner +aa0a iTuner +aa0b iTuner +aa0c iTuner +aa0d iTuner +aa0e iTuner +aa0f iTuner aa42 Scitex Digital Video aa55 Ncomputing X300 PCI-Engine aaaa Adnaco Technology Inc. @@ -23575,6 +25724,7 @@ b1d9 ATCOM Technology co., LTD. # Pinnacle should be 11bd, but they got it wrong several times --mj bd11 Pinnacle Systems, Inc. (Wrong ID) bdbd Blackmagic Design + a106 Multibridge Extreme a117 Intensity Pro a11a DeckLink HD Extreme 2 a11b DeckLink SDI/Duo/Quad @@ -23582,9 +25732,16 @@ bdbd Blackmagic Design a11d DeckLink Studio a11e DeckLink Optical Fibre a121 DeckLink HD Extreme 3D/3D+ + a124 Intensity Extreme + a126 Intensity Shuttle + a127 UltraStudio Express + a129 UltraStudio Mini Monitor + a12a UltraStudio Mini Recorder + a12d UltraStudio 4K a12e DeckLink 4K Extreme a12f DeckLink Mini Monitor a130 DeckLink Mini Recorder + a132 UltraStudio 4K c001 TSI Telsys c0a9 Micron/Crucial Technology c0de Motorola @@ -23617,6 +25774,7 @@ d161 Digium, Inc. 1220 Wildcard TE220 dual-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen) 1405 Wildcard TE405P/TE407P quad-span T1/E1/J1 card 5.0V (u1) 1420 Wildcard TE420 quad-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen) + 1820 Wildcard TE820 octal-span T1/E1/J1 card 3.3V (PCI-Express) 2400 Wildcard TDM2400P 24-port analog card 3400 Wildcard TC400P transcoder base card 8000 Wildcard TE121 single-span T1/E1/J1 card (PCI-Express) @@ -23630,19 +25788,43 @@ d161 Digium, Inc. 8008 Hx8 Series 8-port Base Card (PCI-Express) 800a Wildcard TE133 single-span T1/E1/J1 card (PCI Express) 800b Wildcard TE134 single-span T1/E1/J1 card + 800c Wildcard A8A 8-port analog card + 800d Wildcard A8B 8-port analog card (PCI-Express) + 800e Wildcard TE235/TE435 quad-span T1/E1/J1 card (PCI-Express) + 800f Wildcard A4A 4-port analog card + 8010 Wildcard A4B 4-port analog card (PCI-Express) + 8013 Wildcard TE236/TE436 quad-span T1/E1/J1 card b410 Wildcard B410 quad-BRI card d4d4 Dy4 Systems Inc 0601 PCI Mezzanine Card d531 I+ME ACTIA GmbH d84d Exsys dada Datapath Limited + 0133 VisionRGB-X2 + 0139 VisionRGB-E1 + 0144 VisionSD8 + 0150 VisionRGB-E2 + 0151 VisionSD4+1 + 0159 VisionAV + 0161 DGC161 + 0165 DGC165 + 0167 DGC167 + 0168 DGC168 + 1139 VisionRGB-E1S + 1150 VisionRGB-E2S + 1151 VisionSD4+1S + 1153 VisionDVI-DL + 1154 VisionSDI2 db10 Diablo Technologies dcba Dynamic Engineering - 0046 PCIeAlteraCycloneIV + 0046 PCIe Altera Cyclone IV # VPX format Receiver Controller Board 0047 VPX-RCB # PMC Format FPGA design with 8 high speed UART channels 0048 PMC-Biserial-III-BAE9 + 004e PC104p-Biserial-III-NVY5 + 004f PC104p-Biserial-III-NVY6 + 0052 PCIeBiSerialDb37 BA22 LVDS IO dd01 Digital Devices GmbH 0003 Octopus DVB Adapter dd01 0001 Octopus DVB adapter @@ -23685,6 +25867,7 @@ e4bf EKF Elektronik GmbH 53c1 SC1-ALLEGRO cc47 CCG-RUMBA cc4d CCM-BOOGIE +e4e4 Xorcom e55e Essence Technology, Inc. ea01 Eagle Technology 000a PCI-773 Temperature Card diff --git a/include/crt/_mingw.h b/include/crt/_mingw.h index 4ee69fcb46b..203ac566271 100644 --- a/include/crt/_mingw.h +++ b/include/crt/_mingw.h @@ -217,7 +217,8 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ #ifndef DECLSPEC_HOTPATCH -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__clang__) +/* FIXME: http://llvm.org/bugs/show_bug.cgi?id=20888 */ #define DECLSPEC_HOTPATCH #else #define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__)) diff --git a/include/crt/crtdefs.h b/include/crt/crtdefs.h index b76dbf5682b..d2934f9daa1 100644 --- a/include/crt/crtdefs.h +++ b/include/crt/crtdefs.h @@ -126,7 +126,7 @@ #endif #ifndef UNALIGNED -#if defined(__ia64__) || defined(__x86_64) +#if defined(__ia64__) || defined(__x86_64) || defined(__arm__) #define UNALIGNED __unaligned #else #define UNALIGNED diff --git a/include/crt/mingw32/intrin_x86.h b/include/crt/mingw32/intrin_x86.h index d9dcced3002..87e38414da2 100644 --- a/include/crt/mingw32/intrin_x86.h +++ b/include/crt/mingw32/intrin_x86.h @@ -190,17 +190,19 @@ __INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Desti } #ifndef __clang__ + __INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand) { return __sync_val_compare_and_swap(Destination, Comperand, Exchange); } -#endif __INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand) { return (void *)__sync_val_compare_and_swap(Destination, Comperand, Exchange); } +#endif + __INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char Value) { /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */ @@ -215,6 +217,8 @@ __INTRIN_INLINE short _InterlockedExchange16(volatile short * const Target, cons return __sync_lock_test_and_set(Target, Value); } +#ifndef __clang__ + __INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value) { /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */ @@ -222,6 +226,15 @@ __INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const lo return __sync_lock_test_and_set(Target, Value); } +__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value) +{ + /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */ + __sync_synchronize(); + return (void *)__sync_lock_test_and_set(Target, Value); +} + +#endif + #if defined(_M_AMD64) __INTRIN_INLINE long long _InterlockedExchange64(volatile long long * const Target, const long long Value) { @@ -231,13 +244,6 @@ __INTRIN_INLINE long long _InterlockedExchange64(volatile long long * const Targ } #endif -__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value) -{ - /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */ - __sync_synchronize(); - return (void *)__sync_lock_test_and_set(Target, Value); -} - __INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value) { return __sync_fetch_and_add(Addend, Value); @@ -678,9 +684,9 @@ __INTRIN_INLINE long _InterlockedAddLargeStatistic(volatile long long * const Ad { __asm__ ( - "lock; add %[Value], %[Lo32];" + "lock; addl %[Value], %[Lo32];" "jae LABEL%=;" - "lock; adc $0, %[Hi32];" + "lock; adcl $0, %[Hi32];" "LABEL%=:;" : [Lo32] "+m" (*((volatile long *)(Addend) + 0)), [Hi32] "+m" (*((volatile long *)(Addend) + 1)) : [Value] "ir" (Value) : diff --git a/include/crt/stdlib.h b/include/crt/stdlib.h index cd197283ecc..d1d3c22daff 100644 --- a/include/crt/stdlib.h +++ b/include/crt/stdlib.h @@ -1202,6 +1202,7 @@ extern "C" { _In_ int _Shift); #if _INTEGRAL_MAX_BITS >= 64 + _Check_return_ __MINGW_EXTENSION unsigned __int64 __cdecl @@ -1217,6 +1218,7 @@ extern "C" { _In_ int _Shift); #if _INTEGRAL_MAX_BITS >= 64 + _Check_return_ __MINGW_EXTENSION unsigned __int64 __cdecl diff --git a/include/ddk/ntstrsafe.h b/include/ddk/ntstrsafe.h index b2a199cec47..c28e19f52fd 100644 --- a/include/ddk/ntstrsafe.h +++ b/include/ddk/ntstrsafe.h @@ -919,21 +919,21 @@ RtlStringCbVPrintfW( return RtlStringVPrintfWorkerW(pszDest,cchDest,pszFormat,argList); } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -950,7 +950,7 @@ RtlStringCchPrintfA( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -967,21 +967,21 @@ RtlStringCchPrintfW( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -998,7 +998,7 @@ RtlStringCbPrintfA( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, @@ -1016,7 +1016,7 @@ RtlStringCbPrintfW( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfExA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -1026,7 +1026,7 @@ RtlStringCchPrintfExA( _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfExW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -1036,7 +1036,7 @@ RtlStringCchPrintfExW( _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfExA( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, @@ -1056,7 +1056,7 @@ RtlStringCchPrintfExA( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCchPrintfExW( _Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, @@ -1077,7 +1077,7 @@ RtlStringCchPrintfExW( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfExA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -1087,7 +1087,7 @@ RtlStringCbPrintfExA( _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfExW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, @@ -1097,7 +1097,7 @@ RtlStringCbPrintfExW( _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat, ...); -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfExA( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, @@ -1130,7 +1130,7 @@ RtlStringCbPrintfExA( return Status; } -NTSTRSAFEAPI +static __inline NTSTATUS RtlStringCbPrintfExW( _Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 8d040604b0c..9c0d6347c63 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -235,51 +235,6 @@ inline int IsEqualGUIDAligned(REFGUID guid1, REFGUID guid2) /****************************************************************************** * INTERLOCKED Functions * ******************************************************************************/ -// -// Intrinsics (note: taken from our winnt.h) -// FIXME: 64-bit -// -#if defined(__GNUC__) - -static __inline__ BOOLEAN -InterlockedBitTestAndSet( - _Inout_updates_bytes_((Bit+7)/8) _Interlocked_operand_ LONG volatile *Base, - _In_ LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btsl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedOr(Base, 1 << Bit) >> Bit) & 1; -#endif -} - -static __inline__ BOOLEAN -InterlockedBitTestAndReset( - _Inout_updates_bytes_((Bit+7)/8) _Interlocked_operand_ LONG volatile *Base, - _In_ LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btrl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedAnd(Base, ~(1 << Bit)) >> Bit) & 1; -#endif -} - -#endif /* defined(__GNUC__) */ #define BitScanForward _BitScanForward #define BitScanReverse _BitScanReverse @@ -16136,6 +16091,7 @@ typedef struct _TRANSACTIONMANAGER_RECOVERY_INFORMATION { ULONGLONG LastRecoveredLsn; } TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION; + typedef struct _TRANSACTION_PROPERTIES_INFORMATION { ULONG IsolationLevel; ULONG IsolationFlags; @@ -16184,7 +16140,7 @@ typedef enum _KTMOBJECT_TYPE { typedef struct _KTMOBJECT_CURSOR { GUID LastQuery; - ULONG ObjectIdCount; + unsigned long ObjectIdCount; GUID ObjectIds[1]; } KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR; @@ -16192,14 +16148,14 @@ typedef enum _TRANSACTION_INFORMATION_CLASS { TransactionBasicInformation, TransactionPropertiesInformation, TransactionEnlistmentInformation, - TransactionSuperiorEnlistmentInformation + TransactionSuperiorEnlistmentInformation, } TRANSACTION_INFORMATION_CLASS; typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS { TransactionManagerBasicInformation, TransactionManagerLogInformation, TransactionManagerLogPathInformation, - TransactionManagerRecoveryInformation = 4 + TransactionManagerRecoveryInformation = 4, } TRANSACTIONMANAGER_INFORMATION_CLASS; typedef enum _RESOURCEMANAGER_INFORMATION_CLASS { diff --git a/include/ndk/inbvfuncs.h b/include/ndk/inbvfuncs.h index 173604fe258..61855e9054c 100644 --- a/include/ndk/inbvfuncs.h +++ b/include/ndk/inbvfuncs.h @@ -94,8 +94,8 @@ NTAPI InbvSetScrollRegion( _In_ ULONG Left, _In_ ULONG Top, - _In_ ULONG Width, - _In_ ULONG Height + _In_ ULONG Right, + _In_ ULONG Bottom ); VOID @@ -109,8 +109,8 @@ NTAPI InbvSolidColorFill( _In_ ULONG Left, _In_ ULONG Top, - _In_ ULONG Width, - _In_ ULONG Height, + _In_ ULONG Right, + _In_ ULONG Bottom, _In_ ULONG Color ); diff --git a/include/psdk/intsafe.h b/include/psdk/intsafe.h index 9b9557cfa13..8b03bb12fa3 100644 --- a/include/psdk/intsafe.h +++ b/include/psdk/intsafe.h @@ -264,13 +264,11 @@ C_ASSERT(sizeof(UINT_PTR) == sizeof(ULONG_PTR)); #define UCHAR_ERROR '\0' #define CHAR_ERROR '\0' - /* 32 bit x 32 bit to 64 bit unsigned multiplication */ #ifndef UInt32x32To64 -#define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b)) +#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) #endif - /* Convert unsigned to signed or unsigned */ #define DEFINE_SAFE_CONVERT_UTOX(_Name, _TypeFrom, _TypeTo) \ _Must_inspect_result_ \ diff --git a/include/psdk/ntdef.h b/include/psdk/ntdef.h index d713c81b6fe..6b1d0933094 100644 --- a/include/psdk/ntdef.h +++ b/include/psdk/ntdef.h @@ -84,6 +84,30 @@ extern "C" { #endif #endif /* NULL */ +#define ARGUMENT_PRESENT(ArgumentPointer) \ + ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL) + +#if defined(_MANAGED) + #define FASTCALL __stdcall +#elif defined(_M_IX86) + #define FASTCALL __fastcall +#else + #define FASTCALL +#endif /* _MANAGED */ + +/* min/max helper macros */ +#ifndef NOMINMAX +# ifndef min +# define min(a,b) (((a) < (b)) ? (a) : (b)) +# endif +# ifndef max +# define max(a,b) (((a) > (b)) ? (a) : (b)) +# endif +#endif /* NOMINMAX */ + +/* Tell windef.h that we have defined some basic types */ +#define BASETYPES + /* Defines the "size" of an any-size array */ #ifndef ANYSIZE_ARRAY #define ANYSIZE_ARRAY 1 @@ -91,162 +115,151 @@ extern "C" { /* Helper macro to enable gcc's extension. */ #ifndef __GNU_EXTENSION -#ifdef __GNUC__ -#define __GNU_EXTENSION __extension__ -#else -#define __GNU_EXTENSION -#endif -#endif + #ifdef __GNUC__ + #define __GNU_EXTENSION __extension__ + #else + #define __GNU_EXTENSION + #endif +#endif /* __GNU_EXTENSION */ #ifndef DUMMYUNIONNAME -#if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) -#define _ANONYMOUS_UNION -#define _UNION_NAME(x) x -#define DUMMYUNIONNAME u -#define DUMMYUNIONNAME1 u1 -#define DUMMYUNIONNAME2 u2 -#define DUMMYUNIONNAME3 u3 -#define DUMMYUNIONNAME4 u4 -#define DUMMYUNIONNAME5 u5 -#define DUMMYUNIONNAME6 u6 -#define DUMMYUNIONNAME7 u7 -#define DUMMYUNIONNAME8 u8 -#define DUMMYUNIONNAME9 u9 -#else -#define _ANONYMOUS_UNION __GNU_EXTENSION -#define _UNION_NAME(x) -#define DUMMYUNIONNAME -#define DUMMYUNIONNAME1 -#define DUMMYUNIONNAME2 -#define DUMMYUNIONNAME3 -#define DUMMYUNIONNAME4 -#define DUMMYUNIONNAME5 -#define DUMMYUNIONNAME6 -#define DUMMYUNIONNAME7 -#define DUMMYUNIONNAME8 -#define DUMMYUNIONNAME9 -#endif /* NONAMELESSUNION */ + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_UNION + #define _UNION_NAME(x) x + #define DUMMYUNIONNAME u + #define DUMMYUNIONNAME1 u1 + #define DUMMYUNIONNAME2 u2 + #define DUMMYUNIONNAME3 u3 + #define DUMMYUNIONNAME4 u4 + #define DUMMYUNIONNAME5 u5 + #define DUMMYUNIONNAME6 u6 + #define DUMMYUNIONNAME7 u7 + #define DUMMYUNIONNAME8 u8 + #define DUMMYUNIONNAME9 u9 + #else + #define _ANONYMOUS_UNION __GNU_EXTENSION + #define _UNION_NAME(x) + #define DUMMYUNIONNAME + #define DUMMYUNIONNAME1 + #define DUMMYUNIONNAME2 + #define DUMMYUNIONNAME3 + #define DUMMYUNIONNAME4 + #define DUMMYUNIONNAME5 + #define DUMMYUNIONNAME6 + #define DUMMYUNIONNAME7 + #define DUMMYUNIONNAME8 + #define DUMMYUNIONNAME9 + #endif /* NONAMELESSUNION */ #endif /* !DUMMYUNIONNAME */ #ifndef DUMMYSTRUCTNAME -#if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) -#define _ANONYMOUS_STRUCT -#define _STRUCT_NAME(x) x -#define DUMMYSTRUCTNAME s -#define DUMMYSTRUCTNAME1 s1 -#define DUMMYSTRUCTNAME2 s2 -#define DUMMYSTRUCTNAME3 s3 -#define DUMMYSTRUCTNAME4 s4 -#define DUMMYSTRUCTNAME5 s5 -#else -#define _ANONYMOUS_STRUCT __GNU_EXTENSION -#define _STRUCT_NAME(x) -#define DUMMYSTRUCTNAME -#define DUMMYSTRUCTNAME1 -#define DUMMYSTRUCTNAME2 -#define DUMMYSTRUCTNAME3 -#define DUMMYSTRUCTNAME4 -#define DUMMYSTRUCTNAME5 -#endif /* NONAMELESSUNION */ + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_STRUCT + #define _STRUCT_NAME(x) x + #define DUMMYSTRUCTNAME s + #define DUMMYSTRUCTNAME1 s1 + #define DUMMYSTRUCTNAME2 s2 + #define DUMMYSTRUCTNAME3 s3 + #define DUMMYSTRUCTNAME4 s4 + #define DUMMYSTRUCTNAME5 s5 + #else + #define _ANONYMOUS_STRUCT __GNU_EXTENSION + #define _STRUCT_NAME(x) + #define DUMMYSTRUCTNAME + #define DUMMYSTRUCTNAME1 + #define DUMMYSTRUCTNAME2 + #define DUMMYSTRUCTNAME3 + #define DUMMYSTRUCTNAME4 + #define DUMMYSTRUCTNAME5 + #endif /* NONAMELESSUNION */ #endif /* DUMMYSTRUCTNAME */ #if defined(STRICT_GS_ENABLED) -#pragma strict_gs_check(push, on) + #pragma strict_gs_check(push, on) #endif #if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM) -#define ALIGNMENT_MACHINE -#define UNALIGNED __unaligned -#if defined(_WIN64) -#define UNALIGNED64 __unaligned + #define ALIGNMENT_MACHINE + #define UNALIGNED __unaligned + #if defined(_WIN64) + #define UNALIGNED64 __unaligned + #else + #define UNALIGNED64 + #endif #else -#define UNALIGNED64 -#endif -#else -#undef ALIGNMENT_MACHINE -#define UNALIGNED -#define UNALIGNED64 + #undef ALIGNMENT_MACHINE + #define UNALIGNED + #define UNALIGNED64 #endif #if defined(_WIN64) || defined(_M_ALPHA) -#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) -#define MEMORY_ALLOCATION_ALIGNMENT 16 + #define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) + #define MEMORY_ALLOCATION_ALIGNMENT 16 #else -#define MAX_NATURAL_ALIGNMENT sizeof(ULONG) -#define MEMORY_ALLOCATION_ALIGNMENT 8 + #define MAX_NATURAL_ALIGNMENT sizeof(ULONG) + #define MEMORY_ALLOCATION_ALIGNMENT 8 #endif -#if defined(_M_MRX000) && !(defined(MIDL_PASS) || defined(RC_INVOKED)) && defined(ENABLE_RESTRICTED) -#define RESTRICTED_POINTER __restrict +/* C99 restrict support */ +#if defined(ENABLE_RESTRICTED) && defined(_M_MRX000) && !defined(MIDL_PASS) && !defined(RC_INVOKED) + #define RESTRICTED_POINTER __restrict #else -#define RESTRICTED_POINTER + #define RESTRICTED_POINTER #endif -#define ARGUMENT_PRESENT(ArgumentPointer) \ - ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL) - /* Returns the base address of a structure from a structure member */ #ifndef CONTAINING_RECORD -#define CONTAINING_RECORD(address, type, field) \ - ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) + #define CONTAINING_RECORD(address, type, field) \ + ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) #endif /* Returns the byte offset of the specified structure's member */ #ifndef __GNUC__ -#define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field)) + #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field)) #else -#define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field)) -#endif + #define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field)) +#endif /* __GNUC__ */ /* Returns the type's alignment */ #if defined(_MSC_VER) -#define TYPE_ALIGNMENT(t) __alignof(t) + #define TYPE_ALIGNMENT(t) __alignof(t) #else -#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) -#endif + #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) +#endif /* _MSC_VER */ #if defined(_AMD64_) || defined(_X86_) -#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG) + #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG) #elif defined(_IA64_) || defined(_ARM_) -#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG)) + #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG)) #else -#error "unknown architecture" + #error "unknown architecture" #endif #if defined(_WIN64) -#define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG) -#endif + #define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG) +#endif /* _WIN64 */ #ifdef __cplusplus -#define EXTERN_C extern "C" + #define EXTERN_C extern "C" #else -#define EXTERN_C extern -#endif - -/* Calling Conventions */ -#if defined(_MANAGED) -#define FASTCALL __stdcall -#elif defined(_M_IX86) -#define FASTCALL __fastcall -#else -#define FASTCALL -#endif + #define EXTERN_C extern +#endif /* __cplusplus */ #define NTAPI __stdcall #ifndef STDMETHODCALLTYPE -#define STDMETHODCALLTYPE __stdcall -#define STDMETHODVCALLTYPE __cdecl -#define STDAPICALLTYPE __stdcall -#define STDAPIVCALLTYPE __cdecl -#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE -#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE -#define STDMETHODIMP HRESULT STDMETHODCALLTYPE -#define STDMETHODIMP_(t) t STDMETHODCALLTYPE -#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE -#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE -#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE -#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE + #define STDMETHODCALLTYPE __stdcall + #define STDMETHODVCALLTYPE __cdecl + #define STDAPICALLTYPE __stdcall + #define STDAPIVCALLTYPE __cdecl + #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE + #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE + #define STDMETHODIMP HRESULT STDMETHODCALLTYPE + #define STDMETHODIMP_(t) t STDMETHODCALLTYPE + #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE + #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE + #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE + #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE #endif /* !STDMETHODCALLTYPE */ #define STDOVERRIDEMETHODIMP __override STDMETHODIMP @@ -258,147 +271,155 @@ extern "C" { #define IFACEMETHODIMPV __override STDMETHODIMPV #define IFACEMETHODIMPV_(t) __override STDMETHODIMPV_(t) - /* Import and Export Specifiers */ /* Done the same way as in windef.h for now */ -#define DECLSPEC_IMPORT __declspec(dllimport) +#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? #define DECLSPEC_NORETURN __declspec(noreturn) #ifndef DECLSPEC_ADDRSAFE -#if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64)) -#define DECLSPEC_ADDRSAFE __declspec(address_safe) -#else -#define DECLSPEC_ADDRSAFE -#endif + #if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64)) + #define DECLSPEC_ADDRSAFE __declspec(address_safe) + #else + #define DECLSPEC_ADDRSAFE + #endif #endif /* DECLSPEC_ADDRSAFE */ #ifndef DECLSPEC_NOTHROW -#if !defined(MIDL_PASS) -#define DECLSPEC_NOTHROW __declspec(nothrow) -#else -#define DECLSPEC_NOTHROW -#endif -#endif + #if !defined(MIDL_PASS) + #define DECLSPEC_NOTHROW __declspec(nothrow) + #else + #define DECLSPEC_NOTHROW + #endif +#endif /* DECLSPEC_NOTHROW */ #ifndef NOP_FUNCTION -#if defined(_MSC_VER) -#define NOP_FUNCTION __noop -#else -#define NOP_FUNCTION (void)0 -#endif -#endif + #if defined(_MSC_VER) + #define NOP_FUNCTION __noop + #else + #define NOP_FUNCTION (void)0 + #endif +#endif /* NOP_FUNCTION */ #if !defined(_NTSYSTEM_) -#define NTSYSAPI DECLSPEC_IMPORT -#define NTSYSCALLAPI DECLSPEC_IMPORT + #define NTSYSAPI DECLSPEC_IMPORT + #define NTSYSCALLAPI DECLSPEC_IMPORT #else -#define NTSYSAPI -#if defined(_NTDLLBUILD_) -#define NTSYSCALLAPI -#else -#define NTSYSCALLAPI DECLSPEC_ADDRSAFE -#endif -#endif + #define NTSYSAPI + #if defined(_NTDLLBUILD_) + #define NTSYSCALLAPI + #else + #define NTSYSCALLAPI DECLSPEC_ADDRSAFE + #endif +#endif /* _NTSYSTEM_ */ /* Inlines */ #ifndef FORCEINLINE -#if defined(_MSC_VER) -#define FORCEINLINE __forceinline -#elif ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) -# define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__)) -#else -# define FORCEINLINE extern __inline__ __attribute__((__always_inline__)) -#endif + #if defined(_MSC_VER) + #define FORCEINLINE __forceinline + #elif ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) + #define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__)) + #else + #define FORCEINLINE extern __inline__ __attribute__((__always_inline__)) + #endif #endif /* FORCEINLINE */ #ifndef DECLSPEC_NOINLINE -#if (_MSC_VER >= 1300) -#define DECLSPEC_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) -#define DECLSPEC_NOINLINE __attribute__((noinline)) -#else -#define DECLSPEC_NOINLINE -#endif + #if (_MSC_VER >= 1300) + #define DECLSPEC_NOINLINE __declspec(noinline) + #elif defined(__GNUC__) + #define DECLSPEC_NOINLINE __attribute__((noinline)) + #else + #define DECLSPEC_NOINLINE + #endif #endif /* DECLSPEC_NOINLINE */ #if !defined(_M_CEE_PURE) -#define NTAPI_INLINE NTAPI + #define NTAPI_INLINE NTAPI #else -#define NTAPI_INLINE -#endif + #define NTAPI_INLINE +#endif /* _M_CEE_PURE */ -/* Use to specify structure alignment */ +/* Use to specify structure alignment. Note: VS and GCC behave slightly + different. Therefore it is important to stick to the following rules: + - If you want a struct to be aligned, put DECLSPEC_ALIGN after "struct": + "typedef struct DECLSPEC_ALIGN(16) _FOO { ... } FOO, *PFOO;" + _alignof(PFOO) is sizeof(void*) here as usual. + - If you don't want the struct, but only the typedef to be aligned, + use an extra typedef. + struct _BAR { ... }; + typedef DECLSPEC_ALIGN(16) struct _BAR BAR, *ALIGNEDPBAR; + _alignof(ALIGNEDPBAR) is 16 now! */ #ifndef DECLSPEC_ALIGN -#if defined(_MSC_VER) && !defined(MIDL_PASS) -#define DECLSPEC_ALIGN(x) __declspec(align(x)) -#elif defined(__GNUC__) -#define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__(x))) -#else -#define DECLSPEC_ALIGN(x) -#endif + #if defined(_MSC_VER) && !defined(MIDL_PASS) + #define DECLSPEC_ALIGN(x) __declspec(align(x)) + #elif defined(__GNUC__) + #define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) + #else + #define DECLSPEC_ALIGN(x) + #endif #endif /* DECLSPEC_ALIGN */ #ifndef SYSTEM_CACHE_ALIGNMENT_SIZE -#if defined(_AMD64_) || defined(_X86_) -#define SYSTEM_CACHE_ALIGNMENT_SIZE 64 -#else -#define SYSTEM_CACHE_ALIGNMENT_SIZE 128 -#endif -#endif + #if defined(_AMD64_) || defined(_X86_) + #define SYSTEM_CACHE_ALIGNMENT_SIZE 64 + #else + #define SYSTEM_CACHE_ALIGNMENT_SIZE 128 + #endif +#endif /* SYSTEM_CACHE_ALIGNMENT_SIZE */ #ifndef DECLSPEC_CACHEALIGN -#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE) -#endif + #define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE) +#endif /* DECLSPEC_CACHEALIGN */ #ifndef DECLSPEC_UUID -#if defined(_MSC_VER) && defined(__cplusplus) -#define DECLSPEC_UUID(x) __declspec(uuid(x)) -#else -#define DECLSPEC_UUID(x) -#endif -#endif + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_UUID(x) __declspec(uuid(x)) + #else + #define DECLSPEC_UUID(x) + #endif +#endif /* DECLSPEC_UUID */ #ifndef DECLSPEC_NOVTABLE -#if defined(_MSC_VER) && defined(__cplusplus) -#define DECLSPEC_NOVTABLE __declspec(novtable) -#else -#define DECLSPEC_NOVTABLE -#endif -#endif + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_NOVTABLE __declspec(novtable) + #else + #define DECLSPEC_NOVTABLE + #endif +#endif /* DECLSPEC_NOVTABLE */ #ifndef DECLSPEC_SELECTANY -#if defined(_MSC_VER) || defined(__GNUC__) -#define DECLSPEC_SELECTANY __declspec(selectany) -#else -#define DECLSPEC_SELECTANY -#endif -#endif + #if defined(_MSC_VER) || defined(__GNUC__) + #define DECLSPEC_SELECTANY __declspec(selectany) + #else + #define DECLSPEC_SELECTANY + #endif +#endif /* DECLSPEC_SELECTANY */ #ifndef DECLSPEC_DEPRECATED -#if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS) -#define DECLSPEC_DEPRECATED __declspec(deprecated) -#define DEPRECATE_SUPPORTED -#else -#define DECLSPEC_DEPRECATED -#undef DEPRECATE_SUPPORTED -#endif -#endif + #if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS) + #define DECLSPEC_DEPRECATED __declspec(deprecated) + #define DEPRECATE_SUPPORTED + #else + #define DECLSPEC_DEPRECATED + #undef DEPRECATE_SUPPORTED + #endif +#endif /* DECLSPEC_DEPRECATED */ #ifdef DEPRECATE_DDK_FUNCTIONS -#ifdef _NTDDK_ -#define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED -#ifdef DEPRECATE_SUPPORTED -#define PRAGMA_DEPRECATED_DDK 1 -#endif + #ifdef _NTDDK_ + #define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED + #ifdef DEPRECATE_SUPPORTED + #define PRAGMA_DEPRECATED_DDK 1 + #endif + #else + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 1 + #endif #else -#define DECLSPEC_DEPRECATED_DDK -#define PRAGMA_DEPRECATED_DDK 1 -#endif -#else -#define DECLSPEC_DEPRECATED_DDK -#define PRAGMA_DEPRECATED_DDK 0 -#endif + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 0 +#endif /* DEPRECATE_DDK_FUNCTIONS */ /* Use to silence unused variable warnings when it is intentional */ #define UNREFERENCED_PARAMETER(P) {(P)=(P);} @@ -406,22 +427,6 @@ extern "C" { #define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);} #define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) -/* min/max helper macros */ -#ifndef NOMINMAX - -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif - -#endif /* NOMINMAX */ - -/* Tell windef.h that we have defined some basic types */ -#define BASETYPES - /* Void Pointers */ typedef void *PVOID; typedef void * POINTER_64 PVOID64; @@ -429,24 +434,27 @@ typedef void * POINTER_64 PVOID64; /* Handle Type */ typedef void *HANDLE, **PHANDLE;; #ifdef STRICT -#define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n + #define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n #else -#define DECLARE_HANDLE(n) typedef HANDLE n + #define DECLARE_HANDLE(n) typedef HANDLE n #endif /* Upper-Case Versions of Some Standard C Types */ #ifndef VOID -#define VOID void -typedef char CHAR; -typedef short SHORT; -typedef long LONG; -#if !defined(MIDL_PASS) -typedef int INT; -#endif -#endif + #define VOID void + typedef char CHAR; + typedef short SHORT; -/* Avoid redefinition in windef.h */ -#define BASETYPES + #if defined(__ROS_LONG64__) && !defined(_M_AMD64) + typedef int LONG; + #else + typedef long LONG; + #endif + + #if !defined(MIDL_PASS) + typedef int INT; + #endif /* !MIDL_PASS */ +#endif /* VOID */ /* Unsigned Types */ typedef unsigned char UCHAR, *PUCHAR; @@ -474,9 +482,9 @@ typedef _Return_type_success_(return >= 0) LONG NTSTATUS, *PNTSTATUS;; typedef signed char SCHAR, *PSCHAR; #ifndef _HRESULT_DEFINED -#define _HRESULT_DEFINED -typedef _Return_type_success_(return >= 0) LONG HRESULT; -#endif + #define _HRESULT_DEFINED + typedef _Return_type_success_(return >= 0) LONG HRESULT; +#endif /* _HRESULT_DEFINED */ /* 64-bit types */ #define _ULONGLONG_ @@ -527,62 +535,64 @@ typedef WCHAR UNALIGNED *PUNZWCH; typedef CONST WCHAR UNALIGNED *PCUNZWCH; #if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS)) -typedef CONST WCHAR *LPCWCHAR, *PCWCHAR; -typedef CONST WCHAR UNALIGNED *LPCUWCHAR, *PCUWCHAR; -typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR; -typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR; -typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR; -typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR; -#define UCSCHAR_INVALID_CHARACTER (0xffffffff) -#define MIN_UCSCHAR (0) -#define MAX_UCSCHAR (0x0010FFFF) + typedef CONST WCHAR *LPCWCHAR, *PCWCHAR; + typedef CONST WCHAR UNALIGNED *LPCUWCHAR, *PCUWCHAR; + typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR; + typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR; + typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR; + typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR; + #define UCSCHAR_INVALID_CHARACTER (0xffffffff) + #define MIN_UCSCHAR (0) + #define MAX_UCSCHAR (0x0010FFFF) #endif /* _WIN32_WINNT >= 0x0600 */ #ifdef UNICODE -#ifndef _TCHAR_DEFINED -typedef WCHAR TCHAR, *PTCHAR; -typedef WCHAR TUCHAR, *PTUCHAR; -#define _TCHAR_DEFINED -#endif /* !_TCHAR_DEFINED */ -typedef LPWCH LPTCH, PTCH; -typedef LPCWCH LPCTCH, PCTCH; -typedef LPWSTR PTSTR, LPTSTR; -typedef LPCWSTR PCTSTR, LPCTSTR; -typedef LPUWSTR PUTSTR, LPUTSTR; -typedef LPCUWSTR PCUTSTR, LPCUTSTR; -typedef LPWSTR LP; -typedef PZZWSTR PZZTSTR; -typedef PCZZWSTR PCZZTSTR; -typedef PUZZWSTR PUZZTSTR; -typedef PCUZZWSTR PCUZZTSTR; -typedef PZPWSTR PZPTSTR; -typedef PNZWCH PNZTCH; -typedef PCNZWCH PCNZTCH; -typedef PUNZWCH PUNZTCH; -typedef PCUNZWCH PCUNZTCH; -#define __TEXT(quote) L##quote + #ifndef _TCHAR_DEFINED + typedef WCHAR TCHAR, *PTCHAR; + typedef WCHAR TUCHAR, *PTUCHAR; + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + + typedef LPWCH LPTCH, PTCH; + typedef LPCWCH LPCTCH, PCTCH; + typedef LPWSTR PTSTR, LPTSTR; + typedef LPCWSTR PCTSTR, LPCTSTR; + typedef LPUWSTR PUTSTR, LPUTSTR; + typedef LPCUWSTR PCUTSTR, LPCUTSTR; + typedef LPWSTR LP; + typedef PZZWSTR PZZTSTR; + typedef PCZZWSTR PCZZTSTR; + typedef PUZZWSTR PUZZTSTR; + typedef PCUZZWSTR PCUZZTSTR; + typedef PZPWSTR PZPTSTR; + typedef PNZWCH PNZTCH; + typedef PCNZWCH PCNZTCH; + typedef PUNZWCH PUNZTCH; + typedef PCUNZWCH PCUNZTCH; + #define __TEXT(quote) L##quote #else /* UNICODE */ -#ifndef _TCHAR_DEFINED -typedef char TCHAR, *PTCHAR; -typedef unsigned char TUCHAR, *PTUCHAR; -#define _TCHAR_DEFINED -#endif /* !_TCHAR_DEFINED */ -typedef LPCH LPTCH, PTCH; -typedef LPCCH LPCTCH, PCTCH; -typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; -typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; -typedef PZZSTR PZZTSTR, PUZZTSTR; -typedef PCZZSTR PCZZTSTR, PCUZZTSTR; -typedef PZPSTR PZPTSTR; -typedef PNZCH PNZTCH, PUNZTCH; -typedef PCNZCH PCNZTCH, PCUNZTCH; -#define __TEXT(quote) quote // r_winnt + #ifndef _TCHAR_DEFINED + typedef char TCHAR, *PTCHAR; + typedef unsigned char TUCHAR, *PTUCHAR; + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + typedef LPCH LPTCH, PTCH; + typedef LPCCH LPCTCH, PCTCH; + typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; + typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; + typedef PZZSTR PZZTSTR, PUZZTSTR; + typedef PCZZSTR PCZZTSTR, PCUZZTSTR; + typedef PZPSTR PZPTSTR; + typedef PNZCH PNZTCH, PUNZTCH; + typedef PCNZCH PCNZTCH, PCUNZTCH; + #define __TEXT(quote) quote -#endif /* UNICODE */ // r_winnt -#define TEXT(quote) __TEXT(quote) // r_winnt +#endif /* UNICODE */ + +#define TEXT(quote) __TEXT(quote) /* Cardinal Data Types */ typedef char CCHAR; @@ -591,8 +601,8 @@ typedef short CSHORT, *PCSHORT; typedef ULONG CLONG, *PCLONG; /* NLS basics (Locale and Language Ids) */ -typedef unsigned long LCID, *PLCID; -typedef unsigned short LANGID; +typedef ULONG LCID, *PLCID; +typedef USHORT LANGID; #ifndef __COMPARTMENT_ID_DEFINED__ #define __COMPARTMENT_ID_DEFINED__ @@ -603,20 +613,28 @@ typedef enum } COMPARTMENT_ID, *PCOMPARTMENT_ID; #endif /* __COMPARTMENT_ID_DEFINED__ */ +#ifndef __OBJECTID_DEFINED +#define __OBJECTID_DEFINED +typedef struct _OBJECTID { + GUID Lineage; + ULONG Uniquifier; +} OBJECTID; +#endif /* __OBJECTID_DEFINED */ + #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4201) + #pragma warning(push) + #pragma warning(disable:4201) // nameless struct / union #endif -/* Used to store a non-float 8 byte aligned structure */ -typedef struct _QUAD -{ - _ANONYMOUS_UNION union - { - __GNU_EXTENSION __int64 UseThisFieldToCopy; - double DoNotUseThisField; - } DUMMYUNIONNAME; -} QUAD, *PQUAD, UQUAD, *PUQUAD; +typedef struct +#if defined(_M_IA64) +DECLSPEC_ALIGN(16) +#endif +_FLOAT128 { + __int64 LowPart; + __int64 HighPart; +} FLOAT128; +typedef FLOAT128 *PFLOAT128; /* Large Integer Unions */ #if defined(MIDL_PASS) @@ -659,163 +677,30 @@ typedef union _ULARGE_INTEGER { #pragma warning(pop) /* disable:4201 */ #endif -/* Physical Addresses are always treated as 64-bit wide */ -typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; - /* Locally Unique Identifier */ -typedef struct _LUID { +typedef struct _LUID +{ ULONG LowPart; LONG HighPart; } LUID, *PLUID; +#define APPLICATION_ERROR_MASK 0x20000000 +#define ERROR_SEVERITY_SUCCESS 0x00000000 +#define ERROR_SEVERITY_INFORMATIONAL 0x40000000 +#define ERROR_SEVERITY_WARNING 0x80000000 +#define ERROR_SEVERITY_ERROR 0xC0000000 + /* Native API Return Value Macros */ #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) #define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1) #define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2) #define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3) -/* String Types */ -typedef struct _UNICODE_STRING { - USHORT Length; - USHORT MaximumLength; -#ifdef MIDL_PASS - [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer; -#else - _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer; -#endif -} UNICODE_STRING, *PUNICODE_STRING; -typedef const UNICODE_STRING* PCUNICODE_STRING; - +#define ANSI_NULL ((CHAR)0) #define UNICODE_NULL ((WCHAR)0) #define UNICODE_STRING_MAX_BYTES ((USHORT) 65534) #define UNICODE_STRING_MAX_CHARS (32767) -typedef struct _CSTRING { - USHORT Length; - USHORT MaximumLength; - CONST CHAR *Buffer; -} CSTRING, *PCSTRING; -#define ANSI_NULL ((CHAR)0) - -typedef struct _STRING { - USHORT Length; - USHORT MaximumLength; -#ifdef MIDL_PASS - [size_is(MaximumLength), length_is(Length) ] -#endif - _Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer; -} STRING, *PSTRING; - -typedef STRING ANSI_STRING; -typedef PSTRING PANSI_STRING; -typedef STRING OEM_STRING; -typedef PSTRING POEM_STRING; -typedef CONST STRING* PCOEM_STRING; -typedef STRING CANSI_STRING; -typedef PSTRING PCANSI_STRING; - -typedef struct _STRING32 { - USHORT Length; - USHORT MaximumLength; - ULONG Buffer; -} STRING32, *PSTRING32, - UNICODE_STRING32, *PUNICODE_STRING32, - ANSI_STRING32, *PANSI_STRING32; - -typedef struct _STRING64 { - USHORT Length; - USHORT MaximumLength; - ULONGLONG Buffer; -} STRING64, *PSTRING64, - UNICODE_STRING64, *PUNICODE_STRING64, - ANSI_STRING64, *PANSI_STRING64; - -/* Object Attributes */ -typedef struct _OBJECT_ATTRIBUTES { - ULONG Length; - HANDLE RootDirectory; - PUNICODE_STRING ObjectName; - ULONG Attributes; - PVOID SecurityDescriptor; - PVOID SecurityQualityOfService; -} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; -typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES; - -typedef struct _OBJECT_ATTRIBUTES32 { - ULONG Length; - ULONG RootDirectory; - ULONG ObjectName; - ULONG Attributes; - ULONG SecurityDescriptor; - ULONG SecurityQualityOfService; -} OBJECT_ATTRIBUTES32, *POBJECT_ATTRIBUTES32; -typedef CONST OBJECT_ATTRIBUTES32 *PCOBJECT_ATTRIBUTES32; - -typedef struct _OBJECT_ATTRIBUTES64 { - ULONG Length; - ULONG64 RootDirectory; - ULONG64 ObjectName; - ULONG Attributes; - ULONG64 SecurityDescriptor; - ULONG64 SecurityQualityOfService; -} OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64; -typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64; - -/* Values for the Attributes member */ -#define OBJ_INHERIT 0x00000002L -#define OBJ_PERMANENT 0x00000010L -#define OBJ_EXCLUSIVE 0x00000020L -#define OBJ_CASE_INSENSITIVE 0x00000040L -#define OBJ_OPENIF 0x00000080L -#define OBJ_OPENLINK 0x00000100L -#define OBJ_KERNEL_HANDLE 0x00000200L -#define OBJ_FORCE_ACCESS_CHECK 0x00000400L -#define OBJ_VALID_ATTRIBUTES 0x000007F2L - -/* Helper Macro */ -#define InitializeObjectAttributes(p,n,a,r,s) { \ - (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ - (p)->RootDirectory = (r); \ - (p)->ObjectName = (n); \ - (p)->Attributes = (a); \ - (p)->SecurityDescriptor = (s); \ - (p)->SecurityQualityOfService = NULL; \ -} - -#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \ - sizeof(OBJECT_ATTRIBUTES), \ - NULL, \ - RTL_CONST_CAST(PUNICODE_STRING)(n), \ - a, \ - NULL, \ - NULL \ -} - -#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ - RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) - -/* Product Types */ -typedef enum _NT_PRODUCT_TYPE { - NtProductWinNt = 1, - NtProductLanManNt, - NtProductServer -} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE; - -typedef enum _EVENT_TYPE { - NotificationEvent, - SynchronizationEvent -} EVENT_TYPE; - -typedef enum _TIMER_TYPE { - NotificationTimer, - SynchronizationTimer -} TIMER_TYPE; - -typedef enum _WAIT_TYPE { - WaitAll, - WaitAny -} WAIT_TYPE; - /* Doubly Linked Lists */ typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; @@ -849,9 +734,9 @@ typedef struct _PROCESSOR_NUMBER { #define ALL_PROCESSOR_GROUPS 0xffff +typedef _IRQL_requires_same_ _Function_class_(EXCEPTION_ROUTINE) -typedef EXCEPTION_DISPOSITION NTAPI EXCEPTION_ROUTINE( @@ -873,24 +758,6 @@ typedef struct _GROUP_AFFINITY { #define RTL_FIELD_TYPE(type, field) (((type*)0)->field) #define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8) #define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field))) - -#ifdef __cplusplus -extern "C++" template struct _RTL_remove_const_template; -extern "C++" template struct _RTL_remove_const_template { typedef _Type type; }; -#define _RTL_CONSTANT_STRING_remove_const_macro(s) \ - (const_cast<_RTL_remove_const_template::type*>(s)) -extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template; -extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template { typedef char type; }; -#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template::type -#else -#define _RTL_CONSTANT_STRING_remove_const_macro(s) (s) -char _RTL_CONSTANT_STRING_type_check(const void *s); -#endif -#define RTL_CONSTANT_STRING(s) { \ - sizeof(s)-sizeof((s)[0]), \ - sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \ - _RTL_CONSTANT_STRING_remove_const_macro(s) } - #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) #define RTL_SIZEOF_THROUGH_FIELD(type, field) \ @@ -902,19 +769,20 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) #ifdef __GNUC__ -#define RTL_NUMBER_OF_V2(A) \ - (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \ - RTL_NUMBER_OF_V1(A)) + #define RTL_NUMBER_OF_V2(A) \ + (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \ + RTL_NUMBER_OF_V1(A)) #else -/// \todo implement security checks for cplusplus / MSVC -#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) + /// \todo implement security checks for cplusplus / MSVC + #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) #endif #ifdef ENABLE_RTL_NUMBER_OF_V2 -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) #else -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) #endif + #define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) #define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A) @@ -927,9 +795,9 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2))) #if defined(__cplusplus) -#define RTL_CONST_CAST(type) const_cast + #define RTL_CONST_CAST(type) const_cast #else -#define RTL_CONST_CAST(type) (type) + #define RTL_CONST_CAST(type) (type) #endif /* Type Limits */ @@ -951,14 +819,14 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) /* Use native math */ -#define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) -#define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) -#define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b)) + #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) + #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) + #define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b)) #else /* Use intrinsics */ -#define Int64ShllMod32(a,b) __ll_lshift(a,b) -#define Int64ShraMod32(a,b) __ll_rshift(a,b) -#define Int64ShrlMod32(a,b) __ull_rshift(a,b) + #define Int64ShllMod32(a,b) __ll_lshift(a,b) + #define Int64ShraMod32(a,b) __ll_rshift(a,b) + #define Int64ShrlMod32(a,b) __ull_rshift(a,b) #endif #define RotateLeft32 _rotl @@ -967,10 +835,10 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define RotateRight64 _rotr64 #if defined(_M_AMD64) -#define RotateLeft8 _rotl8 -#define RotateLeft16 _rotl16 -#define RotateRight8 _rotr8 -#define RotateRight16 _rotr16 + #define RotateLeft8 _rotl8 + #define RotateLeft16 _rotl16 + #define RotateRight8 _rotr8 + #define RotateRight16 _rotr16 #endif /* _M_AMD64 */ /* C_ASSERT Definition */ @@ -978,11 +846,11 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); /* Eliminate Microsoft C/C++ compiler warning 4715 */ #if defined(_MSC_VER) -# define DEFAULT_UNREACHABLE default: __assume(0) + #define DEFAULT_UNREACHABLE default: __assume(0) #elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) -# define DEFAULT_UNREACHABLE default: __builtin_unreachable() + #define DEFAULT_UNREACHABLE default: __builtin_unreachable() #else -# define DEFAULT_UNREACHABLE default: break + #define DEFAULT_UNREACHABLE default: break #endif #define VER_WORKSTATION_NT 0x40000000 @@ -1004,6 +872,7 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define VER_SUITE_COMPUTE_SERVER 0x00004000 #define VER_SUITE_WH_SERVER 0x00008000 +/* Product types */ #define PRODUCT_UNDEFINED 0x00000000 #define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_HOME_BASIC 0x00000002 @@ -1104,7 +973,7 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff) #define SUBLANGID(lgid) ((USHORT)(lgid) >> 10) #define MAKELCID(lgid, srtid) ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) | \ - ((ULONG)((USHORT)(lgid))))) + ((ULONG)((USHORT)(lgid))))) #define MAKESORTLCID(lgid, srtid, ver) \ ((ULONG)((MAKELCID(lgid, srtid)) | \ (((ULONG)((USHORT)(ver))) << 20))) @@ -1132,9 +1001,9 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define LANG_BASQUE 0x2d #define LANG_BELARUSIAN 0x23 #define LANG_BENGALI 0x45 -#define LANG_BRETON 0x7e #define LANG_BOSNIAN 0x1a #define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_BRETON 0x7e #define LANG_BULGARIAN 0x02 #define LANG_CATALAN 0x03 #define LANG_CENTRAL_KURDISH 0x92 @@ -1521,8 +1390,8 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define SORT_GEORGIAN_TRADITIONAL 0x0 #define SORT_GEORGIAN_MODERN 0x1 -#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT)) -#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)) +#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT) +#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) #define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT) #define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT) @@ -1532,6 +1401,188 @@ char _RTL_CONSTANT_STRING_type_check(const void *s); #define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT) #define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) +/* Physical Addresses are always treated as 64-bit wide */ +typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; + +/* Used to store a non-float 8 byte aligned structure */ +typedef struct _QUAD +{ + _ANONYMOUS_UNION union + { + __GNU_EXTENSION __int64 UseThisFieldToCopy; + double DoNotUseThisField; + } DUMMYUNIONNAME; +} QUAD, *PQUAD, UQUAD, *PUQUAD; + +/* String Types */ +typedef struct _STRING { + USHORT Length; + USHORT MaximumLength; +#ifdef MIDL_PASS + [size_is(MaximumLength), length_is(Length) ] +#endif + _Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer; +} STRING, *PSTRING, + ANSI_STRING, *PANSI_STRING, + OEM_STRING, *POEM_STRING; + +typedef CONST STRING* PCOEM_STRING; +typedef STRING CANSI_STRING; +typedef PSTRING PCANSI_STRING; + +typedef struct _STRING32 { + USHORT Length; + USHORT MaximumLength; + ULONG Buffer; +} STRING32, *PSTRING32, + UNICODE_STRING32, *PUNICODE_STRING32, + ANSI_STRING32, *PANSI_STRING32; + +typedef struct _STRING64 { + USHORT Length; + USHORT MaximumLength; + ULONGLONG Buffer; +} STRING64, *PSTRING64, + UNICODE_STRING64, *PUNICODE_STRING64, + ANSI_STRING64, *PANSI_STRING64; + +typedef struct _CSTRING { + USHORT Length; + USHORT MaximumLength; + CONST CHAR *Buffer; +} CSTRING, *PCSTRING; + +typedef struct _UNICODE_STRING { + USHORT Length; + USHORT MaximumLength; +#ifdef MIDL_PASS + [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer; +#else + _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer; +#endif +} UNICODE_STRING, *PUNICODE_STRING; +typedef const UNICODE_STRING* PCUNICODE_STRING; + +typedef USHORT RTL_STRING_LENGTH_TYPE; + +#ifdef __cplusplus +extern "C++" template struct _RTL_remove_const_template; +extern "C++" template struct _RTL_remove_const_template { typedef _Type type; }; +#define _RTL_CONSTANT_STRING_remove_const_macro(s) \ + (const_cast<_RTL_remove_const_template::type*>(s)) +extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template; +extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template { typedef char type; }; +#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template::type +#else +# define _RTL_CONSTANT_STRING_remove_const_macro(s) (s) +char _RTL_CONSTANT_STRING_type_check(const void *s); +#endif +#define RTL_CONSTANT_STRING(s) { \ + sizeof(s)-sizeof((s)[0]), \ + sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \ + _RTL_CONSTANT_STRING_remove_const_macro(s) } + +#define DECLARE_UNICODE_STRING_SIZE(_var, _size) \ + WCHAR _var ## _buffer[_size]; \ + __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \ + UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer } \ + __pragma(warning(pop)) + +#define DECLARE_CONST_UNICODE_STRING(_var, _string) \ + const WCHAR _var##_buffer[] = _string; \ + __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \ + const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer } \ + __pragma(warning(pop)) + +#define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str) \ + extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str) + +/* Object Attributes */ +typedef struct _OBJECT_ATTRIBUTES { + ULONG Length; + HANDLE RootDirectory; + PUNICODE_STRING ObjectName; + ULONG Attributes; + PVOID SecurityDescriptor; + PVOID SecurityQualityOfService; +} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; +typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES; + +typedef struct _OBJECT_ATTRIBUTES32 { + ULONG Length; + ULONG RootDirectory; + ULONG ObjectName; + ULONG Attributes; + ULONG SecurityDescriptor; + ULONG SecurityQualityOfService; +} OBJECT_ATTRIBUTES32, *POBJECT_ATTRIBUTES32; +typedef CONST OBJECT_ATTRIBUTES32 *PCOBJECT_ATTRIBUTES32; + +typedef struct _OBJECT_ATTRIBUTES64 { + ULONG Length; + ULONG64 RootDirectory; + ULONG64 ObjectName; + ULONG Attributes; + ULONG64 SecurityDescriptor; + ULONG64 SecurityQualityOfService; +} OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64; +typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64; + +/* Values for the Attributes member */ +#define OBJ_INHERIT 0x00000002L +#define OBJ_PERMANENT 0x00000010L +#define OBJ_EXCLUSIVE 0x00000020L +#define OBJ_CASE_INSENSITIVE 0x00000040L +#define OBJ_OPENIF 0x00000080L +#define OBJ_OPENLINK 0x00000100L +#define OBJ_KERNEL_HANDLE 0x00000200L +#define OBJ_FORCE_ACCESS_CHECK 0x00000400L +#define OBJ_VALID_ATTRIBUTES 0x000007F2L + +/* Helper Macro */ +#define InitializeObjectAttributes(p,n,a,r,s) { \ + (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ + (p)->RootDirectory = (r); \ + (p)->ObjectName = (n); \ + (p)->Attributes = (a); \ + (p)->SecurityDescriptor = (s); \ + (p)->SecurityQualityOfService = NULL; \ +} + +#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \ + sizeof(OBJECT_ATTRIBUTES), \ + NULL, \ + RTL_CONST_CAST(PUNICODE_STRING)(n), \ + a, \ + NULL, \ + NULL \ +} + +#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ + RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) + +/* Product Types */ +typedef enum _NT_PRODUCT_TYPE { + NtProductWinNt = 1, + NtProductLanManNt, + NtProductServer +} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE; + +typedef enum _EVENT_TYPE { + NotificationEvent, + SynchronizationEvent +} EVENT_TYPE; + +typedef enum _TIMER_TYPE { + NotificationTimer, + SynchronizationTimer +} TIMER_TYPE; + +typedef enum _WAIT_TYPE { + WaitAll, + WaitAny +} WAIT_TYPE; + #ifdef __cplusplus } // extern "C" #endif diff --git a/include/psdk/winbase.h b/include/psdk/winbase.h index d6f9da628a2..e4540dea9ed 100644 --- a/include/psdk/winbase.h +++ b/include/psdk/winbase.h @@ -371,6 +371,8 @@ extern "C" { #define MOVEFILE_COPY_ALLOWED 2 #define MOVEFILE_DELAY_UNTIL_REBOOT 4 #define MOVEFILE_WRITE_THROUGH 8 +#define MOVEFILE_CREATE_HARDLINK 16 +#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 32 #define MAXIMUM_WAIT_OBJECTS 64 #define MAXIMUM_SUSPEND_COUNT 0x7F #define WAIT_OBJECT_0 0 diff --git a/include/psdk/wincon.h b/include/psdk/wincon.h index 2df5ef345a0..e34a8f6f7ca 100644 --- a/include/psdk/wincon.h +++ b/include/psdk/wincon.h @@ -27,9 +27,6 @@ extern "C" { // These codes are answered by GetConsoleDisplayMode #define CONSOLE_WINDOWED 0 #define CONSOLE_FULLSCREEN 1 -#if (_WIN32_WINNT >= 0x0600) -#define CONSOLE_OVERSTRIKE 1 -#endif #define CONSOLE_FULLSCREEN_HARDWARE 2 // These codes should be given to SetConsoleDisplayMode @@ -103,12 +100,16 @@ extern "C" { #define CONSOLE_MOUSE_DOWN 0x0008 /* - * History duplicate flags + * History information and mode flags */ #if (_WIN32_WINNT >= 0x0600) +// For Get/SetConsoleHistoryInfo #define HISTORY_NO_DUP_FLAG 0x0001 +// For SetConsoleCommandHistoryMode +#define CONSOLE_OVERSTRIKE 0x0001 #endif + /* * Read input flags */ diff --git a/include/psdk/winnt.h b/include/psdk/winnt.h index ed716378f5f..f847726bd84 100644 --- a/include/psdk/winnt.h +++ b/include/psdk/winnt.h @@ -1,70 +1,1334 @@ -#ifndef _WINNT_ +/* + * winnt.h + * + * Windows NT native definitions for user mode + * + * This file is part of the ReactOS PSDK package. + * + * This file is auto-generated from ReactOS XDK. + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#pragma once #define _WINNT_ +/* We require WDK / VS 2008 or newer */ +#if defined(_MSC_VER) && (_MSC_VER < 1500) +#error Compiler too old! +#endif + +/* HACK for wine code */ #if !defined(__ROS_LONG64__) #ifdef __WINESRC__ #define __ROS_LONG64__ #endif #endif -#ifdef __GNUC__ +#include +//#include #include +#include +#include + +#include +#include +#include +#include + +#undef __need_wchar_t +#include +#include +#include +#ifndef RC_INVOKED +#include #endif -#ifndef __ANONYMOUS_DEFINED -#define __ANONYMOUS_DEFINED -#ifndef NONAMELESSUNION +/* Silence some MSVC warnings */ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4201) +#pragma warning(disable:4214) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Defines the "size" of an any-size array */ +#ifndef ANYSIZE_ARRAY +#define ANYSIZE_ARRAY 1 +#endif + +/* Helper macro to enable gcc's extension. */ +#ifndef __GNU_EXTENSION + #ifdef __GNUC__ + #define __GNU_EXTENSION __extension__ + #else + #define __GNU_EXTENSION + #endif +#endif /* __GNU_EXTENSION */ + +#ifndef DUMMYUNIONNAME + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_UNION + #define _UNION_NAME(x) x + #define DUMMYUNIONNAME u + #define DUMMYUNIONNAME1 u1 + #define DUMMYUNIONNAME2 u2 + #define DUMMYUNIONNAME3 u3 + #define DUMMYUNIONNAME4 u4 + #define DUMMYUNIONNAME5 u5 + #define DUMMYUNIONNAME6 u6 + #define DUMMYUNIONNAME7 u7 + #define DUMMYUNIONNAME8 u8 + #define DUMMYUNIONNAME9 u9 + #else + #define _ANONYMOUS_UNION __GNU_EXTENSION + #define _UNION_NAME(x) + #define DUMMYUNIONNAME + #define DUMMYUNIONNAME1 + #define DUMMYUNIONNAME2 + #define DUMMYUNIONNAME3 + #define DUMMYUNIONNAME4 + #define DUMMYUNIONNAME5 + #define DUMMYUNIONNAME6 + #define DUMMYUNIONNAME7 + #define DUMMYUNIONNAME8 + #define DUMMYUNIONNAME9 + #endif /* NONAMELESSUNION */ +#endif /* !DUMMYUNIONNAME */ + +#ifndef DUMMYSTRUCTNAME + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_STRUCT + #define _STRUCT_NAME(x) x + #define DUMMYSTRUCTNAME s + #define DUMMYSTRUCTNAME1 s1 + #define DUMMYSTRUCTNAME2 s2 + #define DUMMYSTRUCTNAME3 s3 + #define DUMMYSTRUCTNAME4 s4 + #define DUMMYSTRUCTNAME5 s5 + #else + #define _ANONYMOUS_STRUCT __GNU_EXTENSION + #define _STRUCT_NAME(x) + #define DUMMYSTRUCTNAME + #define DUMMYSTRUCTNAME1 + #define DUMMYSTRUCTNAME2 + #define DUMMYSTRUCTNAME3 + #define DUMMYSTRUCTNAME4 + #define DUMMYSTRUCTNAME5 + #endif /* NONAMELESSUNION */ +#endif /* DUMMYSTRUCTNAME */ + +#if defined(STRICT_GS_ENABLED) + #pragma strict_gs_check(push, on) +#endif + +#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM) + #define ALIGNMENT_MACHINE + #define UNALIGNED __unaligned + #if defined(_WIN64) + #define UNALIGNED64 __unaligned + #else + #define UNALIGNED64 + #endif +#else + #undef ALIGNMENT_MACHINE + #define UNALIGNED + #define UNALIGNED64 +#endif + +#if defined(_WIN64) || defined(_M_ALPHA) + #define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) + #define MEMORY_ALLOCATION_ALIGNMENT 16 +#else + #define MAX_NATURAL_ALIGNMENT sizeof(DWORD) + #define MEMORY_ALLOCATION_ALIGNMENT 8 +#endif + +/* C99 restrict support */ +#if defined(ENABLE_RESTRICTED) && defined(_M_MRX000) && !defined(MIDL_PASS) && !defined(RC_INVOKED) + #define RESTRICTED_POINTER __restrict +#else + #define RESTRICTED_POINTER +#endif + +/* Returns the base address of a structure from a structure member */ +#ifndef CONTAINING_RECORD + #define CONTAINING_RECORD(address, type, field) \ + ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) +#endif + +/* Returns the byte offset of the specified structure's member */ +#ifndef __GNUC__ + #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field)) +#else + #define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field)) +#endif /* __GNUC__ */ + +/* Returns the type's alignment */ +#if defined(_MSC_VER) + #define TYPE_ALIGNMENT(t) __alignof(t) +#else + #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) +#endif /* _MSC_VER */ + +#if defined(_AMD64_) || defined(_X86_) + #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD) +#elif defined(_IA64_) || defined(_ARM_) + #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(DWORD)) +#else + #error "unknown architecture" +#endif + +#if defined(_WIN64) + #define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(DWORD) +#endif /* _WIN64 */ + +#ifdef __cplusplus + #define EXTERN_C extern "C" +#else + #define EXTERN_C extern +#endif /* __cplusplus */ + +#define NTAPI __stdcall + +#ifndef STDMETHODCALLTYPE + #define STDMETHODCALLTYPE __stdcall + #define STDMETHODVCALLTYPE __cdecl + #define STDAPICALLTYPE __stdcall + #define STDAPIVCALLTYPE __cdecl + #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE + #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE + #define STDMETHODIMP HRESULT STDMETHODCALLTYPE + #define STDMETHODIMP_(t) t STDMETHODCALLTYPE + #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE + #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE + #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE + #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE +#endif /* !STDMETHODCALLTYPE */ + +#define STDOVERRIDEMETHODIMP __override STDMETHODIMP +#define STDOVERRIDEMETHODIMP_(t) __override STDMETHODIMP_(t) +#define IFACEMETHODIMP __override STDMETHODIMP +#define IFACEMETHODIMP_(t) __override STDMETHODIMP_(t) +#define STDOVERRIDEMETHODIMPV __override STDMETHODIMPV +#define STDOVERRIDEMETHODIMPV_(t) __override STDMETHODIMPV_(t) +#define IFACEMETHODIMPV __override STDMETHODIMPV +#define IFACEMETHODIMPV_(t) __override STDMETHODIMPV_(t) + +/* Import and Export Specifiers */ + +/* Done the same way as in windef.h for now */ +#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? +#define DECLSPEC_NORETURN __declspec(noreturn) + +#ifndef DECLSPEC_ADDRSAFE + #if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64)) + #define DECLSPEC_ADDRSAFE __declspec(address_safe) + #else + #define DECLSPEC_ADDRSAFE + #endif +#endif /* DECLSPEC_ADDRSAFE */ + +#ifndef DECLSPEC_NOTHROW + #if !defined(MIDL_PASS) + #define DECLSPEC_NOTHROW __declspec(nothrow) + #else + #define DECLSPEC_NOTHROW + #endif +#endif /* DECLSPEC_NOTHROW */ + +#ifndef NOP_FUNCTION + #if defined(_MSC_VER) + #define NOP_FUNCTION __noop + #else + #define NOP_FUNCTION (void)0 + #endif +#endif /* NOP_FUNCTION */ + +#if !defined(_NTSYSTEM_) + #define NTSYSAPI DECLSPEC_IMPORT + #define NTSYSCALLAPI DECLSPEC_IMPORT +#else + #define NTSYSAPI + #if defined(_NTDLLBUILD_) + #define NTSYSCALLAPI + #else + #define NTSYSCALLAPI DECLSPEC_ADDRSAFE + #endif +#endif /* _NTSYSTEM_ */ + +/* Inlines */ +#ifndef FORCEINLINE + #if defined(_MSC_VER) + #define FORCEINLINE __forceinline + #elif ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) + #define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__)) + #else + #define FORCEINLINE extern __inline__ __attribute__((__always_inline__)) + #endif +#endif /* FORCEINLINE */ + +#ifndef DECLSPEC_NOINLINE + #if (_MSC_VER >= 1300) + #define DECLSPEC_NOINLINE __declspec(noinline) + #elif defined(__GNUC__) + #define DECLSPEC_NOINLINE __attribute__((noinline)) + #else + #define DECLSPEC_NOINLINE + #endif +#endif /* DECLSPEC_NOINLINE */ + +#if !defined(_M_CEE_PURE) + #define NTAPI_INLINE NTAPI +#else + #define NTAPI_INLINE +#endif /* _M_CEE_PURE */ + +/* Use to specify structure alignment. Note: VS and GCC behave slightly + different. Therefore it is important to stick to the following rules: + - If you want a struct to be aligned, put DECLSPEC_ALIGN after "struct": + "typedef struct DECLSPEC_ALIGN(16) _FOO { ... } FOO, *PFOO;" + _alignof(PFOO) is sizeof(void*) here as usual. + - If you don't want the struct, but only the typedef to be aligned, + use an extra typedef. + struct _BAR { ... }; + typedef DECLSPEC_ALIGN(16) struct _BAR BAR, *ALIGNEDPBAR; + _alignof(ALIGNEDPBAR) is 16 now! */ +#ifndef DECLSPEC_ALIGN + #if defined(_MSC_VER) && !defined(MIDL_PASS) + #define DECLSPEC_ALIGN(x) __declspec(align(x)) + #elif defined(__GNUC__) + #define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) + #else + #define DECLSPEC_ALIGN(x) + #endif +#endif /* DECLSPEC_ALIGN */ + +#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE + #if defined(_AMD64_) || defined(_X86_) + #define SYSTEM_CACHE_ALIGNMENT_SIZE 64 + #else + #define SYSTEM_CACHE_ALIGNMENT_SIZE 128 + #endif +#endif /* SYSTEM_CACHE_ALIGNMENT_SIZE */ + +#ifndef DECLSPEC_CACHEALIGN + #define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE) +#endif /* DECLSPEC_CACHEALIGN */ + +#ifndef DECLSPEC_UUID + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_UUID(x) __declspec(uuid(x)) + #else + #define DECLSPEC_UUID(x) + #endif +#endif /* DECLSPEC_UUID */ + +#ifndef DECLSPEC_NOVTABLE + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_NOVTABLE __declspec(novtable) + #else + #define DECLSPEC_NOVTABLE + #endif +#endif /* DECLSPEC_NOVTABLE */ + +#ifndef DECLSPEC_SELECTANY + #if defined(_MSC_VER) || defined(__GNUC__) + #define DECLSPEC_SELECTANY __declspec(selectany) + #else + #define DECLSPEC_SELECTANY + #endif +#endif /* DECLSPEC_SELECTANY */ + +#ifndef DECLSPEC_DEPRECATED + #if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS) + #define DECLSPEC_DEPRECATED __declspec(deprecated) + #define DEPRECATE_SUPPORTED + #else + #define DECLSPEC_DEPRECATED + #undef DEPRECATE_SUPPORTED + #endif +#endif /* DECLSPEC_DEPRECATED */ + +#ifdef DEPRECATE_DDK_FUNCTIONS + #ifdef _NTDDK_ + #define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED + #ifdef DEPRECATE_SUPPORTED + #define PRAGMA_DEPRECATED_DDK 1 + #endif + #else + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 1 + #endif +#else + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 0 +#endif /* DEPRECATE_DDK_FUNCTIONS */ + +/* Use to silence unused variable warnings when it is intentional */ +#define UNREFERENCED_PARAMETER(P) {(P)=(P);} +#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) +#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);} +#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) + +/* Void Pointers */ +typedef void *PVOID; +typedef void * POINTER_64 PVOID64; + +/* Handle Type */ +typedef void *HANDLE, **PHANDLE;; +#ifdef STRICT + #define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n +#else + #define DECLARE_HANDLE(n) typedef HANDLE n +#endif + +/* Upper-Case Versions of Some Standard C Types */ +#ifndef VOID + #define VOID void + typedef char CHAR; + typedef short SHORT; + + #if defined(__ROS_LONG64__) && !defined(_M_AMD64) + typedef int LONG; + #else + typedef long LONG; + #endif + + #if !defined(MIDL_PASS) + typedef int INT; + #endif /* !MIDL_PASS */ +#endif /* VOID */ + + +/* Signed Types */ +typedef SHORT *PSHORT; +typedef LONG *PLONG; + +/* Flag types */ +typedef unsigned char FCHAR; +typedef unsigned short FSHORT; +typedef unsigned long FLONG; + +typedef unsigned char BOOLEAN, *PBOOLEAN; + +#ifndef _HRESULT_DEFINED + #define _HRESULT_DEFINED + typedef _Return_type_success_(return >= 0) LONG HRESULT; +#endif /* _HRESULT_DEFINED */ + +/* 64-bit types */ +#define _ULONGLONG_ +__GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG; +__GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG; +#define _DWORDLONG_ +typedef ULONGLONG DWORDLONG, *PDWORDLONG; + +/* Update Sequence Number */ +typedef LONGLONG USN; + +/* ANSI (Multi-byte Character) types */ +typedef CHAR *PCHAR, *LPCH, *PCH, *PNZCH; +typedef CONST CHAR *LPCCH, *PCCH, *PCNZCH; +typedef _Null_terminated_ CHAR *NPSTR, *LPSTR, *PSTR; +typedef _Null_terminated_ PSTR *PZPSTR; +typedef _Null_terminated_ CONST PSTR *PCZPSTR; +typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR; +typedef _Null_terminated_ PCSTR *PZPCSTR; + +typedef _NullNull_terminated_ CHAR *PZZSTR; +typedef _NullNull_terminated_ CONST CHAR *PCZZSTR; + + +/* UNICODE (Wide Character) types */ +typedef wchar_t WCHAR; +typedef WCHAR *PWCHAR, *LPWCH, *PWCH; +typedef CONST WCHAR *LPCWCH, *PCWCH; +typedef _Null_terminated_ WCHAR *NWPSTR, *LPWSTR, *PWSTR; +typedef _Null_terminated_ PWSTR *PZPWSTR; +typedef _Null_terminated_ CONST PWSTR *PCZPWSTR; +typedef _Null_terminated_ WCHAR UNALIGNED *LPUWSTR, *PUWSTR; +typedef _Null_terminated_ CONST WCHAR *LPCWSTR, *PCWSTR; +typedef _Null_terminated_ PCWSTR *PZPCWSTR; +typedef _Null_terminated_ CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR; + +typedef _NullNull_terminated_ WCHAR *PZZWSTR; +typedef _NullNull_terminated_ CONST WCHAR *PCZZWSTR; +typedef _NullNull_terminated_ WCHAR UNALIGNED *PUZZWSTR; +typedef _NullNull_terminated_ CONST WCHAR UNALIGNED *PCUZZWSTR; + +typedef WCHAR *PNZWCH; +typedef CONST WCHAR *PCNZWCH; +typedef WCHAR UNALIGNED *PUNZWCH; +typedef CONST WCHAR UNALIGNED *PCUNZWCH; + +#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS)) + typedef CONST WCHAR *LPCWCHAR, *PCWCHAR; + typedef CONST WCHAR UNALIGNED *LPCUWCHAR, *PCUWCHAR; + typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR; + typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR; + typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR; + typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR; + #define UCSCHAR_INVALID_CHARACTER (0xffffffff) + #define MIN_UCSCHAR (0) + #define MAX_UCSCHAR (0x0010FFFF) +#endif /* _WIN32_WINNT >= 0x0600 */ + +#ifdef UNICODE + + #ifndef _TCHAR_DEFINED + typedef WCHAR TCHAR, *PTCHAR; + typedef WCHAR TBYTE, *PTBYTE; + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + + typedef LPWCH LPTCH, PTCH; + typedef LPCWCH LPCTCH, PCTCH; + typedef LPWSTR PTSTR, LPTSTR; + typedef LPCWSTR PCTSTR, LPCTSTR; + typedef LPUWSTR PUTSTR, LPUTSTR; + typedef LPCUWSTR PCUTSTR, LPCUTSTR; + typedef LPWSTR LP; + typedef PZZWSTR PZZTSTR; + typedef PCZZWSTR PCZZTSTR; + typedef PUZZWSTR PUZZTSTR; + typedef PCUZZWSTR PCUZZTSTR; + typedef PZPWSTR PZPTSTR; + typedef PNZWCH PNZTCH; + typedef PCNZWCH PCNZTCH; + typedef PUNZWCH PUNZTCH; + typedef PCUNZWCH PCUNZTCH; + #define __TEXT(quote) L##quote + +#else /* UNICODE */ + + #ifndef _TCHAR_DEFINED + typedef char TCHAR, *PTCHAR; + typedef unsigned char TBYTE, *PTBYTE; + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + typedef LPCH LPTCH, PTCH; + typedef LPCCH LPCTCH, PCTCH; + typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; + typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; + typedef PZZSTR PZZTSTR, PUZZTSTR; + typedef PCZZSTR PCZZTSTR, PCUZZTSTR; + typedef PZPSTR PZPTSTR; + typedef PNZCH PNZTCH, PUNZTCH; + typedef PCNZCH PCNZTCH, PCUNZTCH; + #define __TEXT(quote) quote + +#endif /* UNICODE */ + +#define TEXT(quote) __TEXT(quote) + +/* Cardinal Data Types */ +typedef char CCHAR; + +/* NLS basics (Locale and Language Ids) */ +typedef DWORD LCID, *PLCID; +typedef WORD LANGID; + +#ifndef __COMPARTMENT_ID_DEFINED__ +#define __COMPARTMENT_ID_DEFINED__ +typedef enum +{ + UNSPECIFIED_COMPARTMENT_ID = 0, + DEFAULT_COMPARTMENT_ID +} COMPARTMENT_ID, *PCOMPARTMENT_ID; +#endif /* __COMPARTMENT_ID_DEFINED__ */ + +#ifndef __OBJECTID_DEFINED +#define __OBJECTID_DEFINED +typedef struct _OBJECTID { + GUID Lineage; + DWORD Uniquifier; +} OBJECTID; +#endif /* __OBJECTID_DEFINED */ + +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4201) // nameless struct / union +#endif + +typedef struct +#if defined(_M_IA64) +DECLSPEC_ALIGN(16) +#endif +_FLOAT128 { + __int64 LowPart; + __int64 HighPart; +} FLOAT128; +typedef FLOAT128 *PFLOAT128; + +/* Large Integer Unions */ +#if defined(MIDL_PASS) +typedef struct _LARGE_INTEGER { +#else +typedef union _LARGE_INTEGER { + _ANONYMOUS_STRUCT struct + { + DWORD LowPart; + LONG HighPart; + } DUMMYSTRUCTNAME; + struct + { + DWORD LowPart; + LONG HighPart; + } u; +#endif /* MIDL_PASS */ + LONGLONG QuadPart; +} LARGE_INTEGER, *PLARGE_INTEGER; + +#if defined(MIDL_PASS) +typedef struct _ULARGE_INTEGER { +#else +typedef union _ULARGE_INTEGER { + _ANONYMOUS_STRUCT struct + { + DWORD LowPart; + DWORD HighPart; + } DUMMYSTRUCTNAME; + struct + { + DWORD LowPart; + DWORD HighPart; + } u; +#endif /* MIDL_PASS */ + ULONGLONG QuadPart; +} ULARGE_INTEGER, *PULARGE_INTEGER; + +#ifdef _MSC_VER +#pragma warning(pop) /* disable:4201 */ +#endif + +/* Locally Unique Identifier */ +typedef struct _LUID +{ + DWORD LowPart; + LONG HighPart; +} LUID, *PLUID; + +#define APPLICATION_ERROR_MASK 0x20000000 +#define ERROR_SEVERITY_SUCCESS 0x00000000 +#define ERROR_SEVERITY_INFORMATIONAL 0x40000000 +#define ERROR_SEVERITY_WARNING 0x80000000 +#define ERROR_SEVERITY_ERROR 0xC0000000 + + +#define ANSI_NULL ((CHAR)0) +#define UNICODE_NULL ((WCHAR)0) +#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534) +#define UNICODE_STRING_MAX_CHARS (32767) + +/* Doubly Linked Lists */ +typedef struct _LIST_ENTRY { + struct _LIST_ENTRY *Flink; + struct _LIST_ENTRY *Blink; +} LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY; + +typedef struct LIST_ENTRY32 { + DWORD Flink; + DWORD Blink; +} LIST_ENTRY32, *PLIST_ENTRY32; + +typedef struct LIST_ENTRY64 { + ULONGLONG Flink; + ULONGLONG Blink; +} LIST_ENTRY64, *PLIST_ENTRY64; + +/* Singly Linked Lists */ +typedef struct _SINGLE_LIST_ENTRY { + struct _SINGLE_LIST_ENTRY *Next; +} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY; + + +typedef struct _PROCESSOR_NUMBER { + WORD Group; + BYTE Number; + BYTE Reserved; +} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER; + +#define ALL_PROCESSOR_GROUPS 0xffff + +typedef +_IRQL_requires_same_ +_Function_class_(EXCEPTION_ROUTINE) +EXCEPTION_DISPOSITION +NTAPI +EXCEPTION_ROUTINE( + _Inout_ struct _EXCEPTION_RECORD *ExceptionRecord, + _In_ PVOID EstablisherFrame, + _Inout_ struct _CONTEXT *ContextRecord, + _In_ PVOID DispatcherContext); + +typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE; + +typedef struct _GROUP_AFFINITY { + KAFFINITY Mask; + WORD Group; + WORD Reserved[3]; +} GROUP_AFFINITY, *PGROUP_AFFINITY; + +/* Helper Macros */ + +#define RTL_FIELD_TYPE(type, field) (((type*)0)->field) +#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8) +#define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field))) +#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) + +#define RTL_SIZEOF_THROUGH_FIELD(type, field) \ + (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field)) + +#define RTL_CONTAINS_FIELD(Struct, Size, Field) \ + ( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)) ) + +#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) + #ifdef __GNUC__ -#define _ANONYMOUS_UNION __extension__ -#define _ANONYMOUS_STRUCT __extension__ -#elif defined(__WATCOMC__) || defined(_MSC_VER) -#define _ANONYMOUS_UNION -#define _ANONYMOUS_STRUCT -#endif /* __GNUC__/__WATCOMC__ */ -#endif /* NONAMELESSUNION */ -#ifndef _ANONYMOUS_UNION -#define _ANONYMOUS_UNION -#define _UNION_NAME(x) x -#define DUMMYUNIONNAME u -#define DUMMYUNIONNAME1 u1 -#define DUMMYUNIONNAME2 u2 -#define DUMMYUNIONNAME3 u3 -#define DUMMYUNIONNAME4 u4 -#define DUMMYUNIONNAME5 u5 -#define DUMMYUNIONNAME6 u6 -#define DUMMYUNIONNAME7 u7 -#define DUMMYUNIONNAME8 u8 + #define RTL_NUMBER_OF_V2(A) \ + (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \ + RTL_NUMBER_OF_V1(A)) #else -#define _UNION_NAME(x) -#define DUMMYUNIONNAME -#define DUMMYUNIONNAME1 -#define DUMMYUNIONNAME2 -#define DUMMYUNIONNAME3 -#define DUMMYUNIONNAME4 -#define DUMMYUNIONNAME5 -#define DUMMYUNIONNAME6 -#define DUMMYUNIONNAME7 -#define DUMMYUNIONNAME8 + /// \todo implement security checks for cplusplus / MSVC + #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) #endif -#ifndef _ANONYMOUS_STRUCT -#define _ANONYMOUS_STRUCT -#define _STRUCT_NAME(x) x -#define DUMMYSTRUCTNAME s -#define DUMMYSTRUCTNAME1 s1 -#define DUMMYSTRUCTNAME2 s2 -#define DUMMYSTRUCTNAME3 s3 -#define DUMMYSTRUCTNAME4 s4 -#define DUMMYSTRUCTNAME5 s5 + +#ifdef ENABLE_RTL_NUMBER_OF_V2 + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) #else -#define _STRUCT_NAME(x) -#define DUMMYSTRUCTNAME -#define DUMMYSTRUCTNAME1 -#define DUMMYSTRUCTNAME2 -#define DUMMYSTRUCTNAME3 -#define DUMMYSTRUCTNAME4 -#define DUMMYSTRUCTNAME5 + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) #endif -#endif /* __ANONYMOUS_DEFINED */ + +#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) +#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A) + +#define RTL_NUMBER_OF_FIELD(type, field) \ + (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field))) + +#define RTL_PADDING_BETWEEN_FIELDS(type, field1, field2) \ + ((FIELD_OFFSET(type, field2) > FIELD_OFFSET(type, field1)) \ + ? (FIELD_OFFSET(type, field2) - FIELD_OFFSET(type, field1) - RTL_FIELD_SIZE(type, field1)) \ + : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2))) + +#if defined(__cplusplus) + #define RTL_CONST_CAST(type) const_cast +#else + #define RTL_CONST_CAST(type) (type) +#endif + +/* Type Limits */ +#define MINCHAR 0x80 +#define MAXCHAR 0x7f +#define MINSHORT 0x8000 +#define MAXSHORT 0x7fff +#define MINLONG 0x80000000 +#define MAXLONG 0x7fffffff +#define MAXBYTE 0xff +#define MAXWORD 0xffff +#define MAXDWORD 0xffffffff +#define MAXLONGLONG (0x7fffffffffffffffLL) + +/* Multiplication and Shift Operations. Note: we don't use inline + asm functions, the compiler can optimize this better. */ +#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) +#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) + +#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) +/* Use native math */ + #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) + #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) + #define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b)) +#else +/* Use intrinsics */ + #define Int64ShllMod32(a,b) __ll_lshift(a,b) + #define Int64ShraMod32(a,b) __ll_rshift(a,b) + #define Int64ShrlMod32(a,b) __ull_rshift(a,b) +#endif + +#define RotateLeft32 _rotl +#define RotateLeft64 _rotl64 +#define RotateRight32 _rotr +#define RotateRight64 _rotr64 + +#if defined(_M_AMD64) + #define RotateLeft8 _rotl8 + #define RotateLeft16 _rotl16 + #define RotateRight8 _rotr8 + #define RotateRight16 _rotr16 +#endif /* _M_AMD64 */ + +/* C_ASSERT Definition */ +#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] + +/* Eliminate Microsoft C/C++ compiler warning 4715 */ +#if defined(_MSC_VER) + #define DEFAULT_UNREACHABLE default: __assume(0) +#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) + #define DEFAULT_UNREACHABLE default: __builtin_unreachable() +#else + #define DEFAULT_UNREACHABLE default: break +#endif + +#define VER_WORKSTATION_NT 0x40000000 +#define VER_SERVER_NT 0x80000000 +#define VER_SUITE_SMALLBUSINESS 0x00000001 +#define VER_SUITE_ENTERPRISE 0x00000002 +#define VER_SUITE_BACKOFFICE 0x00000004 +#define VER_SUITE_COMMUNICATIONS 0x00000008 +#define VER_SUITE_TERMINAL 0x00000010 +#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020 +#define VER_SUITE_EMBEDDEDNT 0x00000040 +#define VER_SUITE_DATACENTER 0x00000080 +#define VER_SUITE_SINGLEUSERTS 0x00000100 +#define VER_SUITE_PERSONAL 0x00000200 +#define VER_SUITE_BLADE 0x00000400 +#define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800 +#define VER_SUITE_SECURITY_APPLIANCE 0x00001000 +#define VER_SUITE_STORAGE_SERVER 0x00002000 +#define VER_SUITE_COMPUTE_SERVER 0x00004000 +#define VER_SUITE_WH_SERVER 0x00008000 + +/* Product types */ +#define PRODUCT_UNDEFINED 0x00000000 +#define PRODUCT_ULTIMATE 0x00000001 +#define PRODUCT_HOME_BASIC 0x00000002 +#define PRODUCT_HOME_PREMIUM 0x00000003 +#define PRODUCT_ENTERPRISE 0x00000004 +#define PRODUCT_HOME_BASIC_N 0x00000005 +#define PRODUCT_BUSINESS 0x00000006 +#define PRODUCT_STANDARD_SERVER 0x00000007 +#define PRODUCT_DATACENTER_SERVER 0x00000008 +#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +#define PRODUCT_ENTERPRISE_SERVER 0x0000000A +#define PRODUCT_STARTER 0x0000000B +#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C +#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D +#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E +#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F +#define PRODUCT_BUSINESS_N 0x00000010 +#define PRODUCT_WEB_SERVER 0x00000011 +#define PRODUCT_CLUSTER_SERVER 0x00000012 +#define PRODUCT_HOME_SERVER 0x00000013 +#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 +#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 +#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 +#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +#define PRODUCT_HOME_PREMIUM_N 0x0000001A +#define PRODUCT_ENTERPRISE_N 0x0000001B +#define PRODUCT_ULTIMATE_N 0x0000001C +#define PRODUCT_WEB_SERVER_CORE 0x0000001D +#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E +#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 +#define PRODUCT_SERVER_FOUNDATION 0x00000021 +#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_STANDARD_SERVER_V 0x00000024 +#define PRODUCT_DATACENTER_SERVER_V 0x00000025 +#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 +#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 +#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 +#define PRODUCT_HYPERV 0x0000002A +#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B +#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C +#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D +#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E +#define PRODUCT_STARTER_N 0x0000002F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 +#define PRODUCT_SB_SOLUTION_SERVER 0x00000032 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 +#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039 +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F +#define PRODUCT_CLUSTER_SERVER_V 0x00000040 +#define PRODUCT_EMBEDDED 0x00000041 +#define PRODUCT_STARTER_E 0x00000042 +#define PRODUCT_HOME_BASIC_E 0x00000043 +#define PRODUCT_HOME_PREMIUM_E 0x00000044 +#define PRODUCT_PROFESSIONAL_E 0x00000045 +#define PRODUCT_ENTERPRISE_E 0x00000046 +#define PRODUCT_ULTIMATE_E 0x00000047 +#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +#define PRODUCT_EMBEDDED_AUTOMOTIVE 0x00000055 +#define PRODUCT_EMBEDDED_INDUSTRY_A 0x00000056 +#define PRODUCT_THINPC 0x00000057 +#define PRODUCT_EMBEDDED_A 0x00000058 +#define PRODUCT_EMBEDDED_INDUSTRY 0x00000059 +#define PRODUCT_EMBEDDED_E 0x0000005A +#define PRODUCT_EMBEDDED_INDUSTRY_E 0x0000005B +#define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x0000005C +#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F +#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 +#define PRODUCT_CORE_ARM 0x00000061 +#define PRODUCT_CORE_N 0x00000062 +#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 +#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064 +#define PRODUCT_CORE 0x00000065 +#define PRODUCT_PROFESSIONAL_WMC 0x00000067 +#define PRODUCT_UNLICENSED 0xABCDABCD + +/* LangID and NLS */ +#define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p)) +#define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff) +#define SUBLANGID(lgid) ((USHORT)(lgid) >> 10) +#define MAKELCID(lgid, srtid) ((DWORD)((((DWORD)((USHORT)(srtid))) << 16) | \ + ((DWORD)((USHORT)(lgid))))) +#define MAKESORTLCID(lgid, srtid, ver) \ + ((DWORD)((MAKELCID(lgid, srtid)) | \ + (((DWORD)((USHORT)(ver))) << 20))) +#define LANGIDFROMLCID(lcid) ((USHORT)(lcid)) +#define SORTIDFROMLCID(lcid) ((USHORT)((((DWORD)(lcid)) >> 16) & 0xf)) +#define SORTVERSIONFROMLCID(lcid) ((USHORT)((((DWORD)(lcid)) >> 20) & 0xf)) + +#define NLS_VALID_LOCALE_MASK 0x000fffff +#define LOCALE_NAME_MAX_LENGTH 85 + +/* Primary language IDs. */ +#define LANG_NEUTRAL 0x00 +#define LANG_INVARIANT 0x7f +#define LANG_AFRIKAANS 0x36 +#define LANG_ALBANIAN 0x1c +#define LANG_ALSATIAN 0x84 +#define LANG_AMHARIC 0x5e +#define LANG_ARABIC 0x01 +#define LANG_ARMENIAN 0x2b +#define LANG_ASSAMESE 0x4d +#define LANG_AZERI 0x2c +#define LANG_AZERBAIJANI 0x2c +#define LANG_BANGLA 0x45 +#define LANG_BASHKIR 0x6d +#define LANG_BASQUE 0x2d +#define LANG_BELARUSIAN 0x23 +#define LANG_BENGALI 0x45 +#define LANG_BOSNIAN 0x1a +#define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_BRETON 0x7e +#define LANG_BULGARIAN 0x02 +#define LANG_CATALAN 0x03 +#define LANG_CENTRAL_KURDISH 0x92 +#define LANG_CHEROKEE 0x5c +#define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_CORSICAN 0x83 +#define LANG_CROATIAN 0x1a +#define LANG_CZECH 0x05 +#define LANG_DANISH 0x06 +#define LANG_DARI 0x8c +#define LANG_DIVEHI 0x65 +#define LANG_DUTCH 0x13 +#define LANG_ENGLISH 0x09 +#define LANG_ESTONIAN 0x25 +#define LANG_FAEROESE 0x38 +#define LANG_FARSI 0x29 +#define LANG_FILIPINO 0x64 +#define LANG_FINNISH 0x0b +#define LANG_FRENCH 0x0c +#define LANG_FRISIAN 0x62 +#define LANG_FULAH 0x67 +#define LANG_GALICIAN 0x56 +#define LANG_GEORGIAN 0x37 +#define LANG_GERMAN 0x07 +#define LANG_GREEK 0x08 +#define LANG_GREENLANDIC 0x6f +#define LANG_GUJARATI 0x47 +#define LANG_HAUSA 0x68 +#define LANG_HAWAIIAN 0x75 +#define LANG_HEBREW 0x0d +#define LANG_HINDI 0x39 +#define LANG_HUNGARIAN 0x0e +#define LANG_ICELANDIC 0x0f +#define LANG_IGBO 0x70 +#define LANG_INDONESIAN 0x21 +#define LANG_INUKTITUT 0x5d +#define LANG_IRISH 0x3c +#define LANG_ITALIAN 0x10 +#define LANG_JAPANESE 0x11 +#define LANG_KANNADA 0x4b +#define LANG_KASHMIRI 0x60 +#define LANG_KAZAK 0x3f +#define LANG_KHMER 0x53 +#define LANG_KICHE 0x86 +#define LANG_KINYARWANDA 0x87 +#define LANG_KONKANI 0x57 +#define LANG_KOREAN 0x12 +#define LANG_KYRGYZ 0x40 +#define LANG_LAO 0x54 +#define LANG_LATVIAN 0x26 +#define LANG_LITHUANIAN 0x27 +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_LUXEMBOURGISH 0x6e +#define LANG_MACEDONIAN 0x2f +#define LANG_MALAY 0x3e +#define LANG_MALAYALAM 0x4c +#define LANG_MALTESE 0x3a +#define LANG_MANIPURI 0x58 +#define LANG_MAORI 0x81 +#define LANG_MAPUDUNGUN 0x7a +#define LANG_MARATHI 0x4e +#define LANG_MOHAWK 0x7c +#define LANG_MONGOLIAN 0x50 +#define LANG_NEPALI 0x61 +#define LANG_NORWEGIAN 0x14 +#define LANG_OCCITAN 0x82 +#define LANG_ODIA 0x48 +#define LANG_ORIYA 0x48 +#define LANG_PASHTO 0x63 +#define LANG_PERSIAN 0x29 +#define LANG_POLISH 0x15 +#define LANG_PORTUGUESE 0x16 +#define LANG_PULAR 0x67 +#define LANG_PUNJABI 0x46 +#define LANG_QUECHUA 0x6b +#define LANG_ROMANIAN 0x18 +#define LANG_ROMANSH 0x17 +#define LANG_RUSSIAN 0x19 +#define LANG_SAKHA 0x85 +#define LANG_SAMI 0x3b +#define LANG_SANSKRIT 0x4f +#define LANG_SCOTTISH_GAELIC 0x91 +#define LANG_SERBIAN 0x1a +#define LANG_SERBIAN_NEUTRAL 0x7c1a +#define LANG_SINDHI 0x59 +#define LANG_SINHALESE 0x5b +#define LANG_SLOVAK 0x1b +#define LANG_SLOVENIAN 0x24 +#define LANG_SOTHO 0x6c +#define LANG_SPANISH 0x0a +#define LANG_SWAHILI 0x41 +#define LANG_SWEDISH 0x1d +#define LANG_SYRIAC 0x5a +#define LANG_TAJIK 0x28 +#define LANG_TAMAZIGHT 0x5f +#define LANG_TAMIL 0x49 +#define LANG_TATAR 0x44 +#define LANG_TELUGU 0x4a +#define LANG_THAI 0x1e +#define LANG_TIBETAN 0x51 +#define LANG_TIGRIGNA 0x73 +#define LANG_TIGRINYA 0x73 +#define LANG_TSWANA 0x32 +#define LANG_TURKISH 0x1f +#define LANG_TURKMEN 0x42 +#define LANG_UIGHUR 0x80 +#define LANG_UKRAINIAN 0x22 +#define LANG_UPPER_SORBIAN 0x2e +#define LANG_URDU 0x20 +#define LANG_UZBEK 0x43 +#define LANG_VALENCIAN 0x03 +#define LANG_VIETNAMESE 0x2a +#define LANG_WELSH 0x52 +#define LANG_WOLOF 0x88 +#define LANG_XHOSA 0x34 +#define LANG_YAKUT 0x85 +#define LANG_YI 0x78 +#define LANG_YORUBA 0x6a +#define LANG_ZULU 0x35 + +#define SUBLANG_NEUTRAL 0x00 +#define SUBLANG_DEFAULT 0x01 +#define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#define SUBLANG_ARABIC_IRAQ 0x02 +#define SUBLANG_ARABIC_EGYPT 0x03 +#define SUBLANG_ARABIC_LIBYA 0x04 +#define SUBLANG_ARABIC_ALGERIA 0x05 +#define SUBLANG_ARABIC_MOROCCO 0x06 +#define SUBLANG_ARABIC_TUNISIA 0x07 +#define SUBLANG_ARABIC_OMAN 0x08 +#define SUBLANG_ARABIC_YEMEN 0x09 +#define SUBLANG_ARABIC_SYRIA 0x0a +#define SUBLANG_ARABIC_JORDAN 0x0b +#define SUBLANG_ARABIC_LEBANON 0x0c +#define SUBLANG_ARABIC_KUWAIT 0x0d +#define SUBLANG_ARABIC_UAE 0x0e +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 +#define SUBLANG_AZERI_LATIN 0x01 +#define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02 +#define SUBLANG_BANGLA_INDIA 0x01 +#define SUBLANG_BANGLA_BANGLADESH 0x02 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01 +#define SUBLANG_CHEROKEE_CHEROKEE 0x01 +#define SUBLANG_CHINESE_TRADITIONAL 0x01 +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 +#define SUBLANG_CHINESE_HONGKONG 0x03 +#define SUBLANG_CHINESE_SINGAPORE 0x04 +#define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 +#define SUBLANG_DUTCH 0x01 +#define SUBLANG_DUTCH_BELGIAN 0x02 +#define SUBLANG_ENGLISH_US 0x01 +#define SUBLANG_ENGLISH_UK 0x02 +#define SUBLANG_ENGLISH_AUS 0x03 +#define SUBLANG_ENGLISH_CAN 0x04 +#define SUBLANG_ENGLISH_NZ 0x05 +#define SUBLANG_ENGLISH_EIRE 0x06 +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#define SUBLANG_ENGLISH_BELIZE 0x0a +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 +#define SUBLANG_FRENCH 0x01 +#define SUBLANG_FRENCH_BELGIAN 0x02 +#define SUBLANG_FRENCH_CANADIAN 0x03 +#define SUBLANG_FRENCH_SWISS 0x04 +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_FULAH_SENEGAL 0x02 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 +#define SUBLANG_GERMAN 0x01 +#define SUBLANG_GERMAN_SWISS 0x02 +#define SUBLANG_GERMAN_AUSTRIAN 0x03 +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HAWAIIAN_US 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 +#define SUBLANG_ITALIAN 0x01 +#define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 +#define SUBLANG_KASHMIRI_SASIA 0x02 +#define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 +#define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 +#define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 +#define SUBLANG_MALAY_MALAYSIA 0x01 +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_MONGOLIAN_PRC 0x02 +#define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NEPALI_NEPAL 0x01 +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ODIA_INDIA 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 +#define SUBLANG_PORTUGUESE 0x02 +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PULAR_SENEGAL 0x02 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_PUNJABI_PAKISTAN 0x02 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAKHA_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SCOTTISH_GAELIC 0x01 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b +#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c +#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09 +#define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a +#define SUBLANG_SERBIAN_CROATIA 0x01 +#define SUBLANG_SERBIAN_LATIN 0x02 +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 +#define SUBLANG_SPANISH 0x01 +#define SUBLANG_SPANISH_MEXICAN 0x02 +#define SUBLANG_SPANISH_MODERN 0x03 +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#define SUBLANG_SPANISH_PANAMA 0x06 +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#define SUBLANG_SPANISH_PERU 0x0a +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#define SUBLANG_SPANISH_ECUADOR 0x0c +#define SUBLANG_SPANISH_CHILE 0x0d +#define SUBLANG_SPANISH_URUGUAY 0x0e +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define SUBLANG_SPANISH_US 0x15 +#define SUBLANG_SWAHILI_KENYA 0x01 +#define SUBLANG_SWEDISH 0x01 +#define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TAMIL_SRI_LANKA 0x02 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ETHIOPIA 0x01 +#define SUBLANG_TSWANA_BOTSWANA 0x02 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 +#define SUBLANG_URDU_PAKISTAN 0x01 +#define SUBLANG_URDU_INDIA 0x02 +#define SUBLANG_UZBEK_LATIN 0x01 +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SUBLANG_VALENCIAN_VALENCIA 0x02 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 + +#define SORT_DEFAULT 0x0 +#define SORT_INVARIANT_MATH 0x1 +#define SORT_JAPANESE_XJIS 0x0 +#define SORT_JAPANESE_UNICODE 0x1 +#define SORT_JAPANESE_RADICALSTROKE 0x4 +#define SORT_CHINESE_BIG5 0x0 +#define SORT_CHINESE_PRCP 0x0 +#define SORT_CHINESE_UNICODE 0x1 +#define SORT_CHINESE_PRC 0x2 +#define SORT_CHINESE_BOPOMOFO 0x3 +#define SORT_CHINESE_RADICALSTROKE 0x4 +#define SORT_KOREAN_KSC 0x0 +#define SORT_KOREAN_UNICODE 0x1 +#define SORT_GERMAN_PHONE_BOOK 0x1 +#define SORT_HUNGARIAN_DEFAULT 0x0 +#define SORT_HUNGARIAN_TECHNICAL 0x1 +#define SORT_GEORGIAN_TRADITIONAL 0x0 +#define SORT_GEORGIAN_MODERN 0x1 + +#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT) +#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) + +#define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT) +#define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT) +#define LOCALE_CUSTOM_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT) +#define LOCALE_CUSTOM_UNSPECIFIED MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT) +#define LOCALE_CUSTOM_UI_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT) +#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT) +#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) #undef __C89_NAMELESS #undef __C89_NAMELESSSTRUCTNAME @@ -95,363 +1359,70 @@ #endif #ifdef __C89_NAMELESS -# define __C89_NAMELESSSTRUCTNAME -# define __C89_NAMELESSSTRUCTNAME1 -# define __C89_NAMELESSSTRUCTNAME2 -# define __C89_NAMELESSSTRUCTNAME3 -# define __C89_NAMELESSSTRUCTNAME4 -# define __C89_NAMELESSSTRUCTNAME5 -# define __C89_NAMELESSUNIONNAME -# define __C89_NAMELESSUNIONNAME1 -# define __C89_NAMELESSUNIONNAME2 -# define __C89_NAMELESSUNIONNAME3 -# define __C89_NAMELESSUNIONNAME4 -# define __C89_NAMELESSUNIONNAME5 -# define __C89_NAMELESSUNIONNAME6 -# define __C89_NAMELESSUNIONNAME7 -# define __C89_NAMELESSUNIONNAME8 +# define __C89_NAMELESSSTRUCTNAME +# define __C89_NAMELESSSTRUCTNAME1 +# define __C89_NAMELESSSTRUCTNAME2 +# define __C89_NAMELESSSTRUCTNAME3 +# define __C89_NAMELESSSTRUCTNAME4 +# define __C89_NAMELESSSTRUCTNAME5 +# define __C89_NAMELESSUNIONNAME +# define __C89_NAMELESSUNIONNAME1 +# define __C89_NAMELESSUNIONNAME2 +# define __C89_NAMELESSUNIONNAME3 +# define __C89_NAMELESSUNIONNAME4 +# define __C89_NAMELESSUNIONNAME5 +# define __C89_NAMELESSUNIONNAME6 +# define __C89_NAMELESSUNIONNAME7 +# define __C89_NAMELESSUNIONNAME8 #else -# define __C89_NAMELESS -# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME -# define __C89_NAMELESSSTRUCTNAME1 DUMMYSTRUCTNAME1 -# define __C89_NAMELESSSTRUCTNAME2 DUMMYSTRUCTNAME2 -# define __C89_NAMELESSSTRUCTNAME3 DUMMYSTRUCTNAME3 -# define __C89_NAMELESSSTRUCTNAME4 DUMMYSTRUCTNAME4 -# define __C89_NAMELESSSTRUCTNAME5 DUMMYSTRUCTNAME5 -# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME -# define __C89_NAMELESSUNIONNAME1 DUMMYUNIONNAME1 -# define __C89_NAMELESSUNIONNAME2 DUMMYUNIONNAME2 -# define __C89_NAMELESSUNIONNAME3 DUMMYUNIONNAME3 -# define __C89_NAMELESSUNIONNAME4 DUMMYUNIONNAME4 -# define __C89_NAMELESSUNIONNAME5 DUMMYUNIONNAME5 -# define __C89_NAMELESSUNIONNAME6 DUMMYUNIONNAME6 -# define __C89_NAMELESSUNIONNAME7 DUMMYUNIONNAME7 -# define __C89_NAMELESSUNIONNAME8 DUMMYUNIONNAME8 +# define __C89_NAMELESS +# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME +# define __C89_NAMELESSSTRUCTNAME1 DUMMYSTRUCTNAME1 +# define __C89_NAMELESSSTRUCTNAME2 DUMMYSTRUCTNAME2 +# define __C89_NAMELESSSTRUCTNAME3 DUMMYSTRUCTNAME3 +# define __C89_NAMELESSSTRUCTNAME4 DUMMYSTRUCTNAME4 +# define __C89_NAMELESSSTRUCTNAME5 DUMMYSTRUCTNAME5 +# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME +# define __C89_NAMELESSUNIONNAME1 DUMMYUNIONNAME1 +# define __C89_NAMELESSUNIONNAME2 DUMMYUNIONNAME2 +# define __C89_NAMELESSUNIONNAME3 DUMMYUNIONNAME3 +# define __C89_NAMELESSUNIONNAME4 DUMMYUNIONNAME4 +# define __C89_NAMELESSUNIONNAME5 DUMMYUNIONNAME5 +# define __C89_NAMELESSUNIONNAME6 DUMMYUNIONNAME6 +# define __C89_NAMELESSUNIONNAME7 DUMMYUNIONNAME7 +# define __C89_NAMELESSUNIONNAME8 DUMMYUNIONNAME8 #endif -#define UNREFERENCED_PARAMETER(P) {(P)=(P);} -#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) -#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);} -#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) - -#ifndef DECLSPEC_ALIGN -# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS) -# define DECLSPEC_ALIGN(x) __declspec(align(x)) -# elif defined(__GNUC__) -# define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) -# else -# define DECLSPEC_ALIGN(x) -# endif -#endif - -#ifndef NOP_FUNCTION -#if (_MSC_VER >= 1210) -#define NOP_FUNCTION __noop -#else -#define NOP_FUNCTION (void)0 -#endif -#endif - -# define DECLSPEC_HIDDEN - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#undef __need_wchar_t - -#include -#include -#include - -#ifndef RC_INVOKED -#include - -#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) -#define ALIGNMENT_MACHINE -#define UNALIGNED __unaligned -#if defined(_WIN64) -#define UNALIGNED64 __unaligned -#else -#define UNALIGNED64 -#endif -#else -#undef ALIGNMENT_MACHINE -#define UNALIGNED -#define UNALIGNED64 -#endif - -#if defined(_WIN64) || defined(_M_ALPHA) -#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) -#define MEMORY_ALLOCATION_ALIGNMENT 16 -#else -#define MAX_NATURAL_ALIGNMENT sizeof(ULONG) -#define MEMORY_ALLOCATION_ALIGNMENT 8 -#endif - -/* Returns the type's alignment */ -#if defined(_MSC_VER) && (_MSC_VER >= 1300) -#define TYPE_ALIGNMENT(t) __alignof(t) -#else -#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) -#endif - -#if defined(_AMD64_) || defined(_X86_) -#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG) -#elif defined(_IA64_) || defined(_ARM_) -#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG)) -#else -#error "unknown architecture" -#endif - -#ifndef DECLSPEC_NOVTABLE -# if defined(_MSC_VER) && (_MSC_VER >= 1100) && defined(__cplusplus) -# define DECLSPEC_NOVTABLE __declspec(novtable) -# else -# define DECLSPEC_NOVTABLE -# endif -#endif - -#ifndef DECLSPEC_SELECTANY -#if (_MSC_VER >= 1100) || defined(__GNUC__) -#define DECLSPEC_SELECTANY __declspec(selectany) -#else -#define DECLSPEC_SELECTANY -#endif -#endif - -#ifndef DECLSPEC_ADDRSAFE -#if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64)) -#define DECLSPEC_ADDRSAFE __declspec(address_safe) -#else -#define DECLSPEC_ADDRSAFE -#endif -#endif +#define DECLSPEC_HIDDEN /*#ifdef _WINE*/ #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) -#define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +# define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) #else -#define __WINE_ALLOC_SIZE(x) +# define __WINE_ALLOC_SIZE(x) #endif /*#endif*/ -#ifndef FORCEINLINE -#if (_MSC_VER >= 1200) -#define FORCEINLINE __forceinline -#elif (_MSC_VER) -#define FORCEINLINE __inline -#else -# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) -# define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__)) -# else -# define FORCEINLINE extern __inline__ __attribute__((__always_inline__)) -# endif -#endif -#endif - -#if !defined(_NTSYSTEM_) -#define NTSYSAPI DECLSPEC_IMPORT -#define NTSYSCALLAPI DECLSPEC_IMPORT -#else -#define NTSYSAPI -#if defined(_NTDLLBUILD_) -#define NTSYSCALLAPI -#else -#define NTSYSCALLAPI DECLSPEC_ADDRSAFE -#endif -#endif - -#ifndef VOID -#define VOID void -#endif -typedef char CHAR; -typedef short SHORT; -#if !defined(__ROS_LONG64__) || defined(_M_AMD64) -typedef long LONG; -#else -typedef int LONG; -#endif -typedef char CCHAR, *PCCHAR; -typedef void *PVOID; - -/* FIXME for __WIN64 */ -#ifndef __ptr64 -#define __ptr64 -#endif -typedef void* __ptr64 PVOID64; - -#ifdef __cplusplus -# define EXTERN_C extern "C" -#else -# define EXTERN_C extern -#endif - -#define STDMETHODCALLTYPE __stdcall -#define STDMETHODVCALLTYPE __cdecl -#define STDAPICALLTYPE __stdcall -#define STDAPIVCALLTYPE __cdecl - -#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE -#define STDAPI_(type) EXTERN_C type STDAPICALLTYPE -#define STDMETHODIMP HRESULT STDMETHODCALLTYPE -#define STDMETHODIMP_(type) type STDMETHODCALLTYPE -#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE -#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE -#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE -#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE - -/* C99 restrict support */ -#if defined(ENABLE_RESTRICTED) && !defined(MIDL_PASS) && !defined(RC_INVOKED) - #if defined(_MSC_VER) && defined(_M_MRX000) - #define RESTRICTED_POINTER __restrict - #elif defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))) - #define RESTRICTED_POINTER __restrict - #else - #define RESTRICTED_POINTER - #endif -#else - #define RESTRICTED_POINTER -#endif - -typedef wchar_t WCHAR; - -typedef _Null_terminated_ WCHAR *NWPSTR, *LPWSTR, *PWSTR; -typedef _Null_terminated_ PWSTR *PZPWSTR; -typedef _Null_terminated_ CONST PWSTR *PCZPWSTR; -typedef _Null_terminated_ WCHAR UNALIGNED *LPUWSTR, *PUWSTR; -typedef _Null_terminated_ CONST WCHAR *LPCWSTR, *PCWSTR; -typedef _Null_terminated_ PCWSTR *PZPCWSTR; -typedef _Null_terminated_ CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR; - -typedef _NullNull_terminated_ WCHAR *PZZWSTR; -typedef _NullNull_terminated_ CONST WCHAR *PCZZWSTR; -typedef _NullNull_terminated_ WCHAR UNALIGNED *PUZZWSTR; -typedef _NullNull_terminated_ CONST WCHAR UNALIGNED *PCUZZWSTR; - -typedef WCHAR *PWCHAR, *LPWCH, *PWCH; -typedef CONST WCHAR *LPCWCH, *PCWCH; -typedef CHAR *PCHAR, *LPCH, *PCH; -typedef CONST CHAR *LPCCH, *PCCH; - -typedef _Null_terminated_ CHAR *NPSTR, *LPSTR, *PSTR; -typedef _Null_terminated_ PSTR *PZPSTR; -typedef _Null_terminated_ CONST PSTR *PCZPSTR; -typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR; -typedef _Null_terminated_ PCSTR *PZPCSTR; - -typedef _NullNull_terminated_ CHAR *PZZSTR; -typedef _NullNull_terminated_ CONST CHAR *PCZZSTR; - -#ifdef UNICODE -#ifndef _TCHAR_DEFINED -#define _TCHAR_DEFINED - typedef WCHAR TCHAR,*PTCHAR; - typedef WCHAR TBYTE ,*PTBYTE; -#endif - typedef LPWSTR LPTCH,PTCH,PTSTR,LPTSTR,LP; - typedef LPCWSTR PCTSTR,LPCTSTR; - typedef LPUWSTR PUTSTR,LPUTSTR; - typedef LPCUWSTR PCUTSTR,LPCUTSTR; -#define __TEXT(quote) L##quote -#else -#ifndef _TCHAR_DEFINED -#define _TCHAR_DEFINED - typedef char TCHAR,*PTCHAR; - typedef unsigned char TBYTE ,*PTBYTE; -#endif - typedef LPSTR LPTCH,PTCH,PTSTR,LPTSTR,PUTSTR,LPUTSTR; - typedef LPCSTR PCTSTR,LPCTSTR,PCUTSTR,LPCUTSTR; -#define __TEXT(quote) quote -#endif - -#define TEXT(quote) __TEXT(quote) - -typedef SHORT *PSHORT; -typedef LONG *PLONG; -#ifdef STRICT -typedef void *HANDLE; -#define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n -#else -typedef PVOID HANDLE; -#define DECLARE_HANDLE(n) typedef HANDLE n -#endif -typedef HANDLE *PHANDLE; -typedef DWORD LCID; -typedef PDWORD PLCID; -typedef WORD LANGID; #ifdef __GNUC__ -#define _HAVE_INT64 -#ifndef _INTEGRAL_MAX_BITS -# define _INTEGRAL_MAX_BITS 64 -#endif -#undef __int64 -#define __int64 long long +# define _HAVE_INT64 +# ifndef _INTEGRAL_MAX_BITS +# define _INTEGRAL_MAX_BITS 64 +# endif +# undef __int64 +# define __int64 long long #elif (defined(__WATCOMC__) || defined(_MSC_VER)) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 ) -#define _HAVE_INT64 +# define _HAVE_INT64 #endif /* __GNUC__/__WATCOMC */ -#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64) -typedef __int64 LONGLONG; -typedef unsigned __int64 DWORDLONG; -#else -typedef double LONGLONG,DWORDLONG; -#endif -typedef LONGLONG *PLONGLONG; -typedef DWORDLONG *PDWORDLONG; -typedef DWORDLONG ULONGLONG,*PULONGLONG; -typedef LONGLONG USN; -#ifdef _HAVE_INT64 -#define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b)) -#define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b)) -#define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b)) -#define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b)) -#define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b)) -#endif -#define ANSI_NULL ((CHAR)0) -#define UNICODE_NULL ((WCHAR)0) -#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534) -#define UNICODE_STRING_MAX_CHARS (32767) -typedef BYTE BOOLEAN,*PBOOLEAN; -#endif -typedef BYTE FCHAR; -typedef WORD FSHORT; -typedef DWORD FLONG; - -#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] - -/* Eliminate Microsoft C/C++ compiler warning 4715 */ -#if defined(_MSC_VER) && (_MSC_VER > 1200) -# define DEFAULT_UNREACHABLE default: __assume(0) -#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) -# define DEFAULT_UNREACHABLE default: __builtin_unreachable() -#else -# define DEFAULT_UNREACHABLE default: break -#endif - -#include "intrin.h" - -#define NTAPI __stdcall -#include #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4201) -#pragma warning(disable:4214) -#pragma warning(disable:4820) +# pragma warning(push) +# pragma warning(disable:4201) +# pragma warning(disable:4214) +# pragma warning(disable:4820) #endif #define ACE_OBJECT_TYPE_PRESENT 0x00000001 #define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002 -#define APPLICATION_ERROR_MASK 0x20000000 -#define ERROR_SEVERITY_SUCCESS 0x00000000 -#define ERROR_SEVERITY_INFORMATIONAL 0x40000000 -#define ERROR_SEVERITY_WARNING 0x80000000 -#define ERROR_SEVERITY_ERROR 0xC0000000 #ifdef __cplusplus #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ @@ -465,7 +1436,7 @@ extern "C++" { \ inline ENUMTYPE operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ } #else -#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ +# define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ #endif /* also in ddk/ntifs.h */ @@ -480,27 +1451,26 @@ extern "C++" { \ #define SYSTEM_AUDIT_ACE_TYPE (0x2) #define SYSTEM_ALARM_ACE_TYPE (0x3) /*end ntifs.h */ -#define ANYSIZE_ARRAY 1 -#define OBJECT_INHERIT_ACE 1 -#define CONTAINER_INHERIT_ACE 2 -#define NO_PROPAGATE_INHERIT_ACE 4 -#define INHERIT_ONLY_ACE 8 -#define INHERITED_ACE 16 -#define VALID_INHERIT_FLAGS 0x1F -#define SUCCESSFUL_ACCESS_ACE_FLAG 64 -#define FAILED_ACCESS_ACE_FLAG 128 -#define DELETE 0x00010000L -#define READ_CONTROL 0x20000L -#define WRITE_DAC 0x40000L -#define WRITE_OWNER 0x80000L -#define SYNCHRONIZE 0x100000L -#define STANDARD_RIGHTS_REQUIRED 0xF0000 -#define STANDARD_RIGHTS_READ 0x20000 -#define STANDARD_RIGHTS_WRITE 0x20000 -#define STANDARD_RIGHTS_EXECUTE 0x20000 -#define STANDARD_RIGHTS_ALL 0x1F0000 -#define SPECIFIC_RIGHTS_ALL 0xFFFF -#define ACCESS_SYSTEM_SECURITY 0x1000000 +#define OBJECT_INHERIT_ACE 1 +#define CONTAINER_INHERIT_ACE 2 +#define NO_PROPAGATE_INHERIT_ACE 4 +#define INHERIT_ONLY_ACE 8 +#define INHERITED_ACE 16 +#define VALID_INHERIT_FLAGS 0x1F +#define SUCCESSFUL_ACCESS_ACE_FLAG 64 +#define FAILED_ACCESS_ACE_FLAG 128 +#define DELETE 0x00010000L +#define READ_CONTROL 0x20000L +#define WRITE_DAC 0x40000L +#define WRITE_OWNER 0x80000L +#define SYNCHRONIZE 0x100000L +#define STANDARD_RIGHTS_REQUIRED 0xF0000 +#define STANDARD_RIGHTS_READ 0x20000 +#define STANDARD_RIGHTS_WRITE 0x20000 +#define STANDARD_RIGHTS_EXECUTE 0x20000 +#define STANDARD_RIGHTS_ALL 0x1F0000 +#define SPECIFIC_RIGHTS_ALL 0xFFFF +#define ACCESS_SYSTEM_SECURITY 0x1000000 #define REG_STANDARD_FORMAT 1 #define REG_LATEST_FORMAT 2 @@ -555,82 +1525,82 @@ extern "C++" { \ #endif /* WIN32_NO_STATUS */ -#define MAXIMUM_ALLOWED 0x2000000 -#define GENERIC_READ 0x80000000 -#define GENERIC_WRITE 0x40000000 -#define GENERIC_EXECUTE 0x20000000 -#define GENERIC_ALL 0x10000000 +#define MAXIMUM_ALLOWED 0x2000000 +#define GENERIC_READ 0x80000000 +#define GENERIC_WRITE 0x40000000 +#define GENERIC_EXECUTE 0x20000000 +#define GENERIC_ALL 0x10000000 -#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) /* Also in ddk/winddk.h */ -#define FILE_LIST_DIRECTORY 0x00000001 -#define FILE_READ_DATA 0x00000001 -#define FILE_ADD_FILE 0x00000002 -#define FILE_WRITE_DATA 0x00000002 -#define FILE_ADD_SUBDIRECTORY 0x00000004 -#define FILE_APPEND_DATA 0x00000004 -#define FILE_CREATE_PIPE_INSTANCE 0x00000004 -#define FILE_READ_EA 0x00000008 -#define FILE_READ_PROPERTIES 0x00000008 -#define FILE_WRITE_EA 0x00000010 -#define FILE_WRITE_PROPERTIES 0x00000010 -#define FILE_EXECUTE 0x00000020 -#define FILE_TRAVERSE 0x00000020 -#define FILE_DELETE_CHILD 0x00000040 -#define FILE_READ_ATTRIBUTES 0x00000080 -#define FILE_WRITE_ATTRIBUTES 0x00000100 +#define FILE_LIST_DIRECTORY 0x00000001 +#define FILE_READ_DATA 0x00000001 +#define FILE_ADD_FILE 0x00000002 +#define FILE_WRITE_DATA 0x00000002 +#define FILE_ADD_SUBDIRECTORY 0x00000004 +#define FILE_APPEND_DATA 0x00000004 +#define FILE_CREATE_PIPE_INSTANCE 0x00000004 +#define FILE_READ_EA 0x00000008 +#define FILE_READ_PROPERTIES 0x00000008 +#define FILE_WRITE_EA 0x00000010 +#define FILE_WRITE_PROPERTIES 0x00000010 +#define FILE_EXECUTE 0x00000020 +#define FILE_TRAVERSE 0x00000020 +#define FILE_DELETE_CHILD 0x00000040 +#define FILE_READ_ATTRIBUTES 0x00000080 +#define FILE_WRITE_ATTRIBUTES 0x00000100 -#define FILE_SHARE_READ 0x00000001 -#define FILE_SHARE_WRITE 0x00000002 -#define FILE_SHARE_DELETE 0x00000004 -#define FILE_SHARE_VALID_FLAGS 0x00000007 +#define FILE_SHARE_READ 0x00000001 +#define FILE_SHARE_WRITE 0x00000002 +#define FILE_SHARE_DELETE 0x00000004 +#define FILE_SHARE_VALID_FLAGS 0x00000007 -#define FILE_ATTRIBUTE_READONLY 0x00000001 -#define FILE_ATTRIBUTE_HIDDEN 0x00000002 -#define FILE_ATTRIBUTE_SYSTEM 0x00000004 -#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 -#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 -#define FILE_ATTRIBUTE_DEVICE 0x00000040 -#define FILE_ATTRIBUTE_NORMAL 0x00000080 -#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 -#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200 -#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 -#define FILE_ATTRIBUTE_COMPRESSED 0x00000800 -#define FILE_ATTRIBUTE_OFFLINE 0x00001000 -#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 -#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000 -#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7 -#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7 +#define FILE_ATTRIBUTE_READONLY 0x00000001 +#define FILE_ATTRIBUTE_HIDDEN 0x00000002 +#define FILE_ATTRIBUTE_SYSTEM 0x00000004 +#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 +#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 +#define FILE_ATTRIBUTE_DEVICE 0x00000040 +#define FILE_ATTRIBUTE_NORMAL 0x00000080 +#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 +#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200 +#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 +#define FILE_ATTRIBUTE_COMPRESSED 0x00000800 +#define FILE_ATTRIBUTE_OFFLINE 0x00001000 +#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 +#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000 +#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7 +#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7 -#define FILE_COPY_STRUCTURED_STORAGE 0x00000041 -#define FILE_STRUCTURED_STORAGE 0x00000441 +#define FILE_COPY_STRUCTURED_STORAGE 0x00000041 +#define FILE_STRUCTURED_STORAGE 0x00000441 -#define FILE_VALID_OPTION_FLAGS 0x00ffffff -#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 -#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 -#define FILE_VALID_SET_FLAGS 0x00000036 +#define FILE_VALID_OPTION_FLAGS 0x00ffffff +#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 +#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 +#define FILE_VALID_SET_FLAGS 0x00000036 -#define FILE_DIRECTORY_FILE 0x00000001 -#define FILE_WRITE_THROUGH 0x00000002 -#define FILE_SEQUENTIAL_ONLY 0x00000004 -#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 -#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 -#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 -#define FILE_NON_DIRECTORY_FILE 0x00000040 -#define FILE_CREATE_TREE_CONNECTION 0x00000080 -#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 -#define FILE_NO_EA_KNOWLEDGE 0x00000200 -#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 -#define FILE_RANDOM_ACCESS 0x00000800 -#define FILE_DELETE_ON_CLOSE 0x00001000 -#define FILE_OPEN_BY_FILE_ID 0x00002000 -#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 -#define FILE_NO_COMPRESSION 0x00008000 -#define FILE_RESERVE_OPFILTER 0x00100000 -#define FILE_OPEN_REPARSE_POINT 0x00200000 -#define FILE_OPEN_NO_RECALL 0x00400000 -#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 +#define FILE_DIRECTORY_FILE 0x00000001 +#define FILE_WRITE_THROUGH 0x00000002 +#define FILE_SEQUENTIAL_ONLY 0x00000004 +#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 +#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 +#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 +#define FILE_NON_DIRECTORY_FILE 0x00000040 +#define FILE_CREATE_TREE_CONNECTION 0x00000080 +#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 +#define FILE_NO_EA_KNOWLEDGE 0x00000200 +#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 +#define FILE_RANDOM_ACCESS 0x00000800 +#define FILE_DELETE_ON_CLOSE 0x00001000 +#define FILE_OPEN_BY_FILE_ID 0x00002000 +#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 +#define FILE_NO_COMPRESSION 0x00008000 +#define FILE_RESERVE_OPFILTER 0x00100000 +#define FILE_OPEN_REPARSE_POINT 0x00200000 +#define FILE_OPEN_NO_RECALL 0x00400000 +#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 #define FILE_ALL_ACCESS \ (STANDARD_RIGHTS_REQUIRED | \ @@ -659,20 +1629,20 @@ extern "C++" { \ SYNCHRONIZE) /* end winddk.h */ /* also in ddk/ntifs.h */ -#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001 -#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002 -#define FILE_NOTIFY_CHANGE_NAME 0x00000003 -#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004 -#define FILE_NOTIFY_CHANGE_SIZE 0x00000008 -#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010 -#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020 -#define FILE_NOTIFY_CHANGE_CREATION 0x00000040 -#define FILE_NOTIFY_CHANGE_EA 0x00000080 -#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100 -#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200 -#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400 -#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800 -#define FILE_NOTIFY_VALID_MASK 0x00000fff +#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001 +#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002 +#define FILE_NOTIFY_CHANGE_NAME 0x00000003 +#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004 +#define FILE_NOTIFY_CHANGE_SIZE 0x00000008 +#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010 +#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020 +#define FILE_NOTIFY_CHANGE_CREATION 0x00000040 +#define FILE_NOTIFY_CHANGE_EA 0x00000080 +#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100 +#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200 +#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400 +#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800 +#define FILE_NOTIFY_VALID_MASK 0x00000fff #define FILE_CASE_SENSITIVE_SEARCH 0x00000001 #define FILE_CASE_PRESERVED_NAMES 0x00000002 @@ -695,45 +1665,45 @@ extern "C++" { \ /* end ntifs.h */ /* also in ddk/winddk.h */ -#define DUPLICATE_CLOSE_SOURCE 0x00000001 -#define DUPLICATE_SAME_ACCESS 0x00000002 +#define DUPLICATE_CLOSE_SOURCE 0x00000001 +#define DUPLICATE_SAME_ACCESS 0x00000002 /* end winddk.k */ -#define MAILSLOT_NO_MESSAGE ((DWORD)-1) -#define MAILSLOT_WAIT_FOREVER ((DWORD)-1) -#define PROCESS_TERMINATE 1 -#define PROCESS_CREATE_THREAD 2 -#define PROCESS_SET_SESSIONID 4 -#define PROCESS_VM_OPERATION 8 -#define PROCESS_VM_READ 16 -#define PROCESS_VM_WRITE 32 -#define PROCESS_CREATE_PROCESS 128 -#define PROCESS_SET_QUOTA 256 -#define PROCESS_SET_INFORMATION 512 -#define PROCESS_QUERY_INFORMATION 1024 -#define PROCESS_SUSPEND_RESUME 2048 +#define MAILSLOT_NO_MESSAGE ((DWORD)-1) +#define MAILSLOT_WAIT_FOREVER ((DWORD)-1) +#define PROCESS_TERMINATE 1 +#define PROCESS_CREATE_THREAD 2 +#define PROCESS_SET_SESSIONID 4 +#define PROCESS_VM_OPERATION 8 +#define PROCESS_VM_READ 16 +#define PROCESS_VM_WRITE 32 +#define PROCESS_CREATE_PROCESS 128 +#define PROCESS_SET_QUOTA 256 +#define PROCESS_SET_INFORMATION 512 +#define PROCESS_QUERY_INFORMATION 1024 +#define PROCESS_SUSPEND_RESUME 2048 #define PROCESS_QUERY_LIMITED_INFORMATION 0x1000 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF) -#define PROCESS_DUP_HANDLE 64 -#define THREAD_TERMINATE 1 -#define THREAD_SUSPEND_RESUME 2 -#define THREAD_GET_CONTEXT 8 -#define THREAD_SET_CONTEXT 16 -#define THREAD_SET_INFORMATION 32 -#define THREAD_QUERY_INFORMATION 64 -#define THREAD_SET_THREAD_TOKEN 128 -#define THREAD_IMPERSONATE 256 -#define THREAD_DIRECT_IMPERSONATION 0x200 +#define PROCESS_DUP_HANDLE 64 +#define THREAD_TERMINATE 1 +#define THREAD_SUSPEND_RESUME 2 +#define THREAD_GET_CONTEXT 8 +#define THREAD_SET_CONTEXT 16 +#define THREAD_SET_INFORMATION 32 +#define THREAD_QUERY_INFORMATION 64 +#define THREAD_SET_THREAD_TOKEN 128 +#define THREAD_IMPERSONATE 256 +#define THREAD_DIRECT_IMPERSONATION 0x200 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF) -#define MUTANT_QUERY_STATE 0x0001 -#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE) -#define TIMER_QUERY_STATE 0x0001 -#define TIMER_MODIFY_STATE 0x0002 -#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE) -#define THREAD_BASE_PRIORITY_LOWRT 15 -#define THREAD_BASE_PRIORITY_MAX 2 -#define THREAD_BASE_PRIORITY_MIN (-2) -#define THREAD_BASE_PRIORITY_IDLE (-15) +#define MUTANT_QUERY_STATE 0x0001 +#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE) +#define TIMER_QUERY_STATE 0x0001 +#define TIMER_MODIFY_STATE 0x0002 +#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE) +#define THREAD_BASE_PRIORITY_LOWRT 15 +#define THREAD_BASE_PRIORITY_MAX 2 +#define THREAD_BASE_PRIORITY_MIN (-2) +#define THREAD_BASE_PRIORITY_IDLE (-15) /* * To prevent gcc compiler warnings, bracket these defines when initialising * a SID_IDENTIFIER_AUTHORITY, eg. @@ -742,30 +1712,30 @@ extern "C++" { \ #define SID_MAX_SUB_AUTHORITIES 15 /* security entities */ -#define SECURITY_NULL_RID (0x00000000L) -#define SECURITY_WORLD_RID (0x00000000L) -#define SECURITY_LOCAL_RID (0X00000000L) +#define SECURITY_NULL_RID (0x00000000L) +#define SECURITY_WORLD_RID (0x00000000L) +#define SECURITY_LOCAL_RID (0X00000000L) -#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0} +#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0} /* S-1-1 */ -#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1} +#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1} /* S-1-2 */ -#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2} +#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2} /* S-1-3 */ -#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3} -#define SECURITY_CREATOR_OWNER_RID (0x00000000L) -#define SECURITY_CREATOR_GROUP_RID (0x00000001L) -#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L) -#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L) +#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3} +#define SECURITY_CREATOR_OWNER_RID (0x00000000L) +#define SECURITY_CREATOR_GROUP_RID (0x00000001L) +#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L) +#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L) /* S-1-4 */ -#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4} +#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4} /* S-1-5 */ -#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5} +#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5} #define SECURITY_DIALUP_RID 0x00000001L #define SECURITY_NETWORK_RID 0x00000002L #define SECURITY_BATCH_RID 0x00000003L @@ -932,36 +1902,36 @@ typedef enum { WinThisOrganizationCertificateSid = 82, } WELL_KNOWN_SID_TYPE; -#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege") -#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege") -#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege") -#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege") -#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege") +#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege") +#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege") +#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege") +#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege") +#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege") #define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege") -#define SE_TCB_NAME TEXT("SeTcbPrivilege") -#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege") -#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege") -#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege") -#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege") -#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege") -#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege") -#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege") +#define SE_TCB_NAME TEXT("SeTcbPrivilege") +#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege") +#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege") +#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege") +#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege") +#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege") +#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege") +#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege") #define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege") -#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege") +#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege") #define SE_BACKUP_NAME TEXT("SeBackupPrivilege") -#define SE_RESTORE_NAME TEXT("SeRestorePrivilege") -#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege") -#define SE_DEBUG_NAME TEXT("SeDebugPrivilege") -#define SE_AUDIT_NAME TEXT("SeAuditPrivilege") -#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege") -#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege") -#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege") -#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege") -#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege") -#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege") -#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege") -#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege") -#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege") +#define SE_RESTORE_NAME TEXT("SeRestorePrivilege") +#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege") +#define SE_DEBUG_NAME TEXT("SeDebugPrivilege") +#define SE_AUDIT_NAME TEXT("SeAuditPrivilege") +#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege") +#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege") +#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege") +#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege") +#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege") +#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege") +#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege") +#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege") +#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege") #define SE_GROUP_MANDATORY 0x00000001 #define SE_GROUP_ENABLED_BY_DEFAULT 0x00000002 @@ -974,225 +1944,6 @@ typedef enum { #define SE_GROUP_RESOURCE 0x20000000 #define SE_GROUP_VALID_ATTRIBUTES 0xE000007F -/* - * Product types - */ -#define PRODUCT_UNDEFINED 0x00000000 -#define PRODUCT_ULTIMATE 0x00000001 -#define PRODUCT_HOME_BASIC 0x00000002 -#define PRODUCT_HOME_PREMIUM 0x00000003 -#define PRODUCT_ENTERPRISE 0x00000004 -#define PRODUCT_HOME_BASIC_N 0x00000005 -#define PRODUCT_BUSINESS 0x00000006 -#define PRODUCT_STANDARD_SERVER 0x00000007 -#define PRODUCT_DATACENTER_SERVER 0x00000008 -#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 -#define PRODUCT_ENTERPRISE_SERVER 0x0000000A -#define PRODUCT_STARTER 0x0000000B -#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C -#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D -#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E -#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F -#define PRODUCT_BUSINESS_N 0x00000010 -#define PRODUCT_WEB_SERVER 0x00000011 -#define PRODUCT_CLUSTER_SERVER 0x00000012 -#define PRODUCT_HOME_SERVER 0x00000013 -#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 -#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 -#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 -#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 -#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 -#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 -#define PRODUCT_HOME_PREMIUM_N 0x0000001A -#define PRODUCT_ENTERPRISE_N 0x0000001B -#define PRODUCT_ULTIMATE_N 0x0000001C -#define PRODUCT_WEB_SERVER_CORE 0x0000001D -#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E -#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F -#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 -#define PRODUCT_SERVER_FOUNDATION 0x00000021 -#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022 -#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 -#define PRODUCT_STANDARD_SERVER_V 0x00000024 -#define PRODUCT_DATACENTER_SERVER_V 0x00000025 -#define PRODUCT_SERVER_V 0x00000025 -#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 -#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 -#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 -#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 -#define PRODUCT_HYPERV 0x0000002A -#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B -#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C -#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D -#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E -#define PRODUCT_STARTER_N 0x0000002F -#define PRODUCT_PROFESSIONAL 0x00000030 -#define PRODUCT_PROFESSIONAL_N 0x00000031 -#define PRODUCT_SB_SOLUTION_SERVER 0x00000032 -#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 -#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 -#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 -#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 -#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 -#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 -#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B -#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C -#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D -#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E -#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F -#define PRODUCT_CLUSTER_SERVER_V 0x00000040 -#define PRODUCT_EMBEDDED 0x00000041 -#define PRODUCT_STARTER_E 0x00000042 -#define PRODUCT_HOME_BASIC_E 0x00000043 -#define PRODUCT_HOME_PREMIUM_E 0x00000044 -#define PRODUCT_PROFESSIONAL_E 0x00000045 -#define PRODUCT_ENTERPRISE_E 0x00000046 -#define PRODUCT_ULTIMATE_E 0x00000047 -#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 -#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C -#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D -#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F -#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 -#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 -#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F -#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 -#define PRODUCT_CORE_ARM 0x00000061 -#define PRODUCT_CORE_N 0x00000062 -#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 -#define PRODUCT_CORE_LANGUAGESPECIFIC 0x00000064 -#define PRODUCT_CORE 0x00000065 -#define PRODUCT_PROFESSIONAL_WMC 0x00000067 -#define PRODUCT_UNLICENSED 0xABCDABCD - -#define LANG_NEUTRAL 0x00 -#define LANG_INVARIANT 0x7f -#define LANG_AFRIKAANS 0x36 -#define LANG_ALBANIAN 0x1c -#define LANG_ALSATIAN 0x84 -#define LANG_AMHARIC 0x5e -#define LANG_ARABIC 0x01 -#define LANG_ARMENIAN 0x2b -#define LANG_ASSAMESE 0x4d -#define LANG_AZERI 0x2c -#define LANG_BASHKIR 0x6d -#define LANG_BASQUE 0x2d -#define LANG_BELARUSIAN 0x23 -#define LANG_BENGALI 0x45 -#define LANG_BOSNIAN 0x1a -#define LANG_BRETON 0x7e -#define LANG_BULGARIAN 0x02 -#define LANG_CATALAN 0x03 -#define LANG_CHINESE 0x04 -#define LANG_CHINESE_SIMPLIFIED 0x04 -#define LANG_CHINESE_TRADITIONAL 0x7c04 -#define LANG_CORSICAN 0x83 -#define LANG_CROATIAN 0x1a -#define LANG_CROATIAN 0x1a -#define LANG_CZECH 0x05 -#define LANG_DANISH 0x06 -#define LANG_DARI 0x8c -#define LANG_DIVEHI 0x65 -#define LANG_DUTCH 0x13 -#define LANG_ENGLISH 0x09 -#define LANG_ESTONIAN 0x25 -#define LANG_FAEROESE 0x38 -#define LANG_FILIPINO 0x64 -#define LANG_FINNISH 0x0b -#define LANG_FRENCH 0x0c -#define LANG_FRISIAN 0x62 -#define LANG_GALICIAN 0x56 -#define LANG_GEORGIAN 0x37 -#define LANG_GERMAN 0x07 -#define LANG_GREEK 0x08 -#define LANG_GREENLANDIC 0x6f -#define LANG_GUJARATI 0x47 -#define LANG_HAUSA 0x68 -#define LANG_HEBREW 0x0d -#define LANG_HINDI 0x39 -#define LANG_HUNGARIAN 0x0e -#define LANG_ICELANDIC 0x0f -#define LANG_IGBO 0x70 -#define LANG_INDONESIAN 0x21 -#define LANG_INUKTITUT 0x5d -#define LANG_IRISH 0x3c -#define LANG_ITALIAN 0x10 -#define LANG_JAPANESE 0x11 -#define LANG_KANNADA 0x4b -#define LANG_KASHMIRI 0x60 -#define LANG_KAZAK 0x3f -#define LANG_KHMER 0x53 -#define LANG_KICHE 0x86 -#define LANG_KINYARWANDA 0x87 -#define LANG_KONKANI 0x57 -#define LANG_KOREAN 0x12 -#define LANG_KYRGYZ 0x40 -#define LANG_LAO 0x54 -#define LANG_LATVIAN 0x26 -#define LANG_LITHUANIAN 0x27 -#define LANG_LOWER_SORBIAN 0x2e -#define LANG_LUXEMBOURGISH 0x6e -#define LANG_MACEDONIAN 0x2f -#define LANG_MALAY 0x3e -#define LANG_MALAYALAM 0x4c -#define LANG_MALTESE 0x3a -#define LANG_MANIPURI 0x58 -#define LANG_MAORI 0x81 -#define LANG_MAPUDUNGUN 0x7a -#define LANG_MARATHI 0x4e -#define LANG_MOHAWK 0x7c -#define LANG_MONGOLIAN 0x50 -#define LANG_NEPALI 0x61 -#define LANG_NORWEGIAN 0x14 -#define LANG_OCCITAN 0x82 -#define LANG_ORIYA 0x48 -#define LANG_PASHTO 0x63 -#define LANG_FARSI 0x29 -#define LANG_PERSIAN 0x29 -#define LANG_POLISH 0x15 -#define LANG_PORTUGUESE 0x16 -#define LANG_PUNJABI 0x46 -#define LANG_QUECHUA 0x6b -#define LANG_ROMANIAN 0x18 -#define LANG_ROMANSH 0x17 -#define LANG_RUSSIAN 0x19 -#define LANG_SAMI 0x3b -#define LANG_SANSKRIT 0x4f -#define LANG_SCOTTISH_GAELIC 0x91 -#define LANG_SERBIAN 0x1a -#define LANG_SOTHO 0x6c -#define LANG_TSWANA 0x32 -#define LANG_SINDHI 0x59 -#define LANG_SINHALESE 0x5b -#define LANG_SLOVAK 0x1b -#define LANG_SLOVENIAN 0x24 -#define LANG_SPANISH 0x0a -#define LANG_SWAHILI 0x41 -#define LANG_SWEDISH 0x1d -#define LANG_SYRIAC 0x5a -#define LANG_TAJIK 0x28 -#define LANG_TAMAZIGHT 0x5f -#define LANG_TAMIL 0x49 -#define LANG_TATAR 0x44 -#define LANG_TELUGU 0x4a -#define LANG_THAI 0x1e -#define LANG_TIBETAN 0x51 -#define LANG_TIGRIGNA 0x73 -#define LANG_TURKISH 0x1f -#define LANG_TURKMEN 0x42 -#define LANG_UIGHUR 0x80 -#define LANG_UKRAINIAN 0x22 -#define LANG_UPPER_SORBIAN 0x2e -#define LANG_URDU 0x20 -#define LANG_UZBEK 0x43 -#define LANG_VIETNAMESE 0x2a -#define LANG_WELSH 0x52 -#define LANG_WOLOF 0x88 -#define LANG_XHOSA 0x34 -#define LANG_YAKUT 0x85 -#define LANG_YI 0x78 -#define LANG_YORUBA 0x6a -#define LANG_ZULU 0x35 - /* FIXME: non-standard */ #define LANG_ESPERANTO 0x8f #define LANG_WALON 0x90 @@ -1206,266 +1957,9 @@ typedef enum { #define LANG_TSONGA 0x31 #define LANG_VENDA 0x33 #define LANG_MANX_GAELIC 0x94 - -#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 -#define SUBLANG_CUSTOM_DEFAULT 0x03 -#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 -#define SUBLANG_NEUTRAL 0x00 -#define SUBLANG_SYS_DEFAULT 0x02 -#define SUBLANG_DEFAULT 0x01 -#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 -#define SUBLANG_ALBANIAN_ALBANIA 0x01 -#define SUBLANG_ALSATIAN_FRANCE 0x01 -#define SUBLANG_AMHARIC_ETHIOPIA 0x01 -#define SUBLANG_ARABIC_ALGERIA 0x05 -#define SUBLANG_ARABIC_BAHRAIN 0x0f -#define SUBLANG_ARABIC_EGYPT 0x03 -#define SUBLANG_ARABIC_IRAQ 0x02 -#define SUBLANG_ARABIC_JORDAN 0x0b -#define SUBLANG_ARABIC_KUWAIT 0x0d -#define SUBLANG_ARABIC_LEBANON 0x0c -#define SUBLANG_ARABIC_LIBYA 0x04 -#define SUBLANG_ARABIC_MOROCCO 0x06 -#define SUBLANG_ARABIC_OMAN 0x08 -#define SUBLANG_ARABIC_QATAR 0x10 -#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 -#define SUBLANG_ARABIC_SYRIA 0x0a -#define SUBLANG_ARABIC_TUNISIA 0x07 -#define SUBLANG_ARABIC_UAE 0x0e -#define SUBLANG_ARABIC_YEMEN 0x09 -#define SUBLANG_ARMENIAN_ARMENIA 0x01 -#define SUBLANG_ASSAMESE_INDIA 0x01 -#define SUBLANG_AZERI_CYRILLIC 0x02 -#define SUBLANG_AZERI_LATIN 0x01 -#define SUBLANG_BASHKIR_RUSSIA 0x01 -#define SUBLANG_BASQUE_BASQUE 0x01 -#define SUBLANG_BELARUSIAN_BELARUS 0x01 -#define SUBLANG_BENGALI_BANGLADESH 0x02 -#define SUBLANG_BENGALI_INDIA 0x01 -#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 -#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 -#define SUBLANG_BRETON_FRANCE 0x01 -#define SUBLANG_BULGARIAN_BULGARIA 0x01 -#define SUBLANG_CATALAN_CATALAN 0x01 -#define SUBLANG_CHINESE_HONGKONG 0x03 -#define SUBLANG_CHINESE_MACAU 0x05 -#define SUBLANG_CHINESE_SINGAPORE 0x04 -#define SUBLANG_CHINESE_SIMPLIFIED 0x02 -#define SUBLANG_CHINESE_TRADITIONAL 0x01 -#define SUBLANG_CORSICAN_FRANCE 0x01 -#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 -#define SUBLANG_CROATIAN_CROATIA 0x01 -#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 -#define SUBLANG_DANISH_DENMARK 0x01 -#define SUBLANG_DARI_AFGHANISTAN 0x01 -#define SUBLANG_DIVEHI_MALDIVES 0x01 -#define SUBLANG_DUTCH_BELGIAN 0x02 -#define SUBLANG_DUTCH 0x01 -#define SUBLANG_ENGLISH_AUS 0x03 -#define SUBLANG_ENGLISH_BELIZE 0x0a -#define SUBLANG_ENGLISH_CAN 0x04 -#define SUBLANG_ENGLISH_CARIBBEAN 0x09 -#define SUBLANG_ENGLISH_INDIA 0x10 -#define SUBLANG_ENGLISH_EIRE 0x06 -#define SUBLANG_ENGLISH_IRELAND 0x06 -#define SUBLANG_ENGLISH_JAMAICA 0x08 -#define SUBLANG_ENGLISH_MALAYSIA 0x11 -#define SUBLANG_ENGLISH_NZ 0x05 -#define SUBLANG_ENGLISH_PHILIPPINES 0x0d -#define SUBLANG_ENGLISH_SINGAPORE 0x12 -#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 -#define SUBLANG_ENGLISH_TRINIDAD 0x0b -#define SUBLANG_ENGLISH_UK 0x02 -#define SUBLANG_ENGLISH_US 0x01 -#define SUBLANG_ENGLISH_ZIMBABWE 0x0c -#define SUBLANG_ESTONIAN_ESTONIA 0x01 -#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 -#define SUBLANG_FILIPINO_PHILIPPINES 0x01 -#define SUBLANG_FINNISH_FINLAND 0x01 -#define SUBLANG_FRENCH_BELGIAN 0x02 -#define SUBLANG_FRENCH_CANADIAN 0x03 -#define SUBLANG_FRENCH 0x01 -#define SUBLANG_FRENCH_LUXEMBOURG 0x05 -#define SUBLANG_FRENCH_MONACO 0x06 -#define SUBLANG_FRENCH_SWISS 0x04 -#define SUBLANG_FRISIAN_NETHERLANDS 0x01 -#define SUBLANG_GALICIAN_GALICIAN 0x01 -#define SUBLANG_GEORGIAN_GEORGIA 0x01 -#define SUBLANG_GERMAN_AUSTRIAN 0x03 -#define SUBLANG_GERMAN 0x01 -#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 -#define SUBLANG_GERMAN_LUXEMBOURG 0x04 -#define SUBLANG_GERMAN_SWISS 0x02 -#define SUBLANG_GREEK_GREECE 0x01 -#define SUBLANG_GREENLANDIC_GREENLAND 0x01 -#define SUBLANG_GUJARATI_INDIA 0x01 -#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 -#define SUBLANG_HAUSA_NIGERIA 0x01 -#define SUBLANG_HEBREW_ISRAEL 0x01 -#define SUBLANG_HINDI_INDIA 0x01 -#define SUBLANG_HUNGARIAN_HUNGARY 0x01 -#define SUBLANG_ICELANDIC_ICELAND 0x01 -#define SUBLANG_IGBO_NIGERIA 0x01 -#define SUBLANG_INDONESIAN_INDONESIA 0x01 -#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 -#define SUBLANG_INUKTITUT_CANADA 0x01 -#define SUBLANG_IRISH_IRELAND 0x02 -#define SUBLANG_ITALIAN 0x01 -#define SUBLANG_ITALIAN_SWISS 0x02 -#define SUBLANG_JAPANESE_JAPAN 0x01 -#define SUBLANG_KANNADA_INDIA 0x01 -#define SUBLANG_KASHMIRI_INDIA 0x02 -#define SUBLANG_KASHMIRI_SASIA 0x02 -#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 -#define SUBLANG_KHMER_CAMBODIA 0x01 -#define SUBLANG_KICHE_GUATEMALA 0x01 -#define SUBLANG_KINYARWANDA_RWANDA 0x01 -#define SUBLANG_KONKANI_INDIA 0x01 -#define SUBLANG_KOREAN 0x01 -#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 -#define SUBLANG_LAO_LAO 0x01 -#define SUBLANG_LAO_LAO_PDR 0x01 -#define SUBLANG_LATVIAN_LATVIA 0x01 -#define SUBLANG_LITHUANIAN_LITHUANIA 0x01 -#define SUBLANG_LITHUANIAN 0x01 -#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 -#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 -#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 -#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 -#define SUBLANG_MALAY_MALAYSIA 0x01 -#define SUBLANG_MALAYALAM_INDIA 0x01 -#define SUBLANG_MALTESE_MALTA 0x01 -#define SUBLANG_MAORI_NEW_ZEALAND 0x01 -#define SUBLANG_MAPUDUNGUN_CHILE 0x01 -#define SUBLANG_MARATHI_INDIA 0x01 -#define SUBLANG_MOHAWK_MOHAWK 0x01 -#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 -#define SUBLANG_MONGOLIAN_PRC 0x02 -#define SUBLANG_NEPALI_NEPAL 0x01 -#define SUBLANG_NEPALI_INDIA 0x02 -#define SUBLANG_NORWEGIAN_BOKMAL 0x01 -#define SUBLANG_NORWEGIAN_NYNORSK 0x02 -#define SUBLANG_OCCITAN_FRANCE 0x01 -#define SUBLANG_ORIYA_INDIA 0x01 -#define SUBLANG_PASHTO_AFGHANISTAN 0x01 -#define SUBLANG_PERSIAN_IRAN 0x01 -#define SUBLANG_POLISH_POLAND 0x01 -#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 -#define SUBLANG_PORTUGUESE 0x02 #define SUBLANG_PORTUGUESE_PORTUGAL 0x02 -#define SUBLANG_PUNJABI_INDIA 0x01 -#define SUBLANG_QUECHUA_BOLIVIA 0x01 -#define SUBLANG_QUECHUA_ECUADOR 0x02 -#define SUBLANG_QUECHUA_PERU 0x03 -#define SUBLANG_ROMANIAN_ROMANIA 0x01 -#define SUBLANG_ROMANSH_SWITZERLAND 0x01 -#define SUBLANG_RUSSIAN_RUSSIA 0x01 -#define SUBLANG_SAMI_INARI_FINLAND 0x09 -#define SUBLANG_SAMI_LULE_NORWAY 0x04 -#define SUBLANG_SAMI_LULE_SWEDEN 0x05 -#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 -#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 -#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 -#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 -#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 -#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 -#define SUBLANG_SANSKRIT_INDIA 0x01 -#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 -#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 -#define SUBLANG_SERBIAN_CROATIA 0x01 -#define SUBLANG_SERBIAN_CYRILLIC 0x03 -#define SUBLANG_SERBIAN_LATIN 0x02 -#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09 -#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 -#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 -#define SUBLANG_SINDHI_AFGHANISTAN 0x02 -#define SUBLANG_SINDHI_PAKISTAN 0x01 -#define SUBLANG_SINHALESE_SRI_LANKA 0x01 -#define SUBLANG_SLOVAK_SLOVAKIA 0x01 -#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 -#define SUBLANG_SPANISH_ARGENTINA 0x0b -#define SUBLANG_SPANISH_BOLIVIA 0x10 -#define SUBLANG_SPANISH_CHILE 0x0d -#define SUBLANG_SPANISH_COLOMBIA 0x09 -#define SUBLANG_SPANISH_COSTA_RICA 0x05 -#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 -#define SUBLANG_SPANISH_ECUADOR 0x0c -#define SUBLANG_SPANISH_EL_SALVADOR 0x11 -#define SUBLANG_SPANISH_GUATEMALA 0x04 -#define SUBLANG_SPANISH_HONDURAS 0x12 -#define SUBLANG_SPANISH_MEXICAN 0x02 -#define SUBLANG_SPANISH_MODERN 0x03 -#define SUBLANG_SPANISH_NICARAGUA 0x13 -#define SUBLANG_SPANISH_PANAMA 0x06 -#define SUBLANG_SPANISH_PARAGUAY 0x0f -#define SUBLANG_SPANISH_PERU 0x0a -#define SUBLANG_SPANISH_PUERTO_RICO 0x14 -#define SUBLANG_SPANISH 0x01 -#define SUBLANG_SPANISH_US 0x15 -#define SUBLANG_SPANISH_URUGUAY 0x0e -#define SUBLANG_SPANISH_VENEZUELA 0x08 -#define SUBLANG_SWAHILI 0x01 -#define SUBLANG_SWAHILI_KENYA 0x01 -#define SUBLANG_SWEDISH_FINLAND 0x02 -#define SUBLANG_SWEDISH 0x01 -#define SUBLANG_SWEDISH_SWEDEN 0x01 -#define SUBLANG_SYRIAC 0x01 -#define SUBLANG_TAJIK_TAJIKISTAN 0x01 -#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 -#define SUBLANG_TAMIL_INDIA 0x01 -#define SUBLANG_TATAR_RUSSIA 0x01 -#define SUBLANG_TELUGU_INDIA 0x01 -#define SUBLANG_THAI_THAILAND 0x01 -#define SUBLANG_TIBETAN_PRC 0x01 -#define SUBLANG_TIGRIGNA_ERITREA 0x02 -#define SUBLANG_TURKISH_TURKEY 0x01 -#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 -#define SUBLANG_UIGHUR_PRC 0x01 -#define SUBLANG_UKRAINIAN_UKRAINE 0x01 -#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 -#define SUBLANG_URDU_INDIA 0x02 -#define SUBLANG_URDU_PAKISTAN 0x01 -#define SUBLANG_UZBEK_CYRILLIC 0x02 -#define SUBLANG_UZBEK_LATIN 0x01 -#define SUBLANG_VIETNAMESE_VIETNAM 0x01 -#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 -#define SUBLANG_WOLOF_SENEGAL 0x01 -#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 -#define SUBLANG_YAKUT_RUSSIA 0x01 -#define SUBLANG_YI_PRC 0x01 -#define SUBLANG_YORUBA_NIGERIA 0x01 -#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 -#define NLS_VALID_LOCALE_MASK 1048575 -#define SORT_DEFAULT 0 -#define SORT_JAPANESE_XJIS 0 -#define SORT_JAPANESE_UNICODE 1 -#define SORT_CHINESE_BIG5 0 -#define SORT_CHINESE_PRCP 0 -#define SORT_CHINESE_UNICODE 1 -#define SORT_CHINESE_PRC 2 -#define SORT_CHINESE_BOPOMOFO 3 -#define SORT_KOREAN_KSC 0 -#define SORT_KOREAN_UNICODE 1 -#define SORT_GERMAN_PHONE_BOOK 1 -#define SORT_HUNGARIAN_DEFAULT 0 -#define SORT_HUNGARIAN_TECHNICAL 1 -#define SORT_GEORGIAN_TRADITIONAL 0 -#define SORT_GEORGIAN_MODERN 1 -#define MAKELANGID(p,s) ((((WORD)(s))<<10)|(WORD)(p)) -#define MAKELCID(l,s) ((DWORD)((((DWORD)((WORD)(s)))<<16)|((DWORD)((WORD)(l))))) -#define PRIMARYLANGID(l) ((WORD)(l)&0x3ff) -#define SORTIDFROMLCID(l) ((WORD)((((DWORD)(l))&NLS_VALID_LOCALE_MASK)>>16)) -#define SORTVERSIONFROMLCID(l) ((WORD)((((DWORD)(l))>>20)&0xf)) -#define SUBLANGID(l) ((WORD)(l)>>10) -#define LANGIDFROMLCID(l) ((WORD)(l)) -#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT) -#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT) -#define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT) -#define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT) -#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT) -#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) -#define LOCALE_NAME_MAX_LENGTH 85 -#define ACL_REVISION 2 + +#define ACL_REVISION 2 #define ACL_REVISION_DS 4 #define ACL_REVISION1 1 #define ACL_REVISION2 2 @@ -1473,16 +1967,6 @@ typedef enum { #define ACL_REVISION4 4 #define MIN_ACL_REVISION 2 #define MAX_ACL_REVISION 4 -#define MINCHAR 0x80 -#define MAXCHAR 0x7f -#define MINSHORT 0x8000 -#define MAXSHORT 0x7fff -#define MINLONG 0x80000000 -#define MAXLONG 0x7fffffff -#define MAXBYTE 0xff -#define MAXWORD 0xffff -#define MAXDWORD 0xffffffff -#define MAXLONGLONG (((LONGLONG)0x7fffffff << 32) | 0xffffffff) #define PROCESSOR_INTEL_386 386 #define PROCESSOR_INTEL_486 486 #define PROCESSOR_INTEL_PENTIUM 586 @@ -1573,17 +2057,17 @@ typedef enum { #define KEY_EXECUTE 0x20019 #define KEY_READ 0x20019 #define KEY_ALL_ACCESS 0xf003f -#define REG_WHOLE_HIVE_VOLATILE 1 -#define REG_REFRESH_HIVE 2 -#define REG_NO_LAZY_FLUSH 4 -#define REG_FORCE_RESTORE 8 -#define REG_OPTION_RESERVED 0 -#define REG_OPTION_NON_VOLATILE 0 -#define REG_OPTION_VOLATILE 1 -#define REG_OPTION_CREATE_LINK 2 -#define REG_OPTION_BACKUP_RESTORE 4 -#define REG_OPTION_OPEN_LINK 8 -#define REG_LEGAL_OPTION 15 +#define REG_WHOLE_HIVE_VOLATILE 1 +#define REG_REFRESH_HIVE 2 +#define REG_NO_LAZY_FLUSH 4 +#define REG_FORCE_RESTORE 8 +#define REG_OPTION_RESERVED 0 +#define REG_OPTION_NON_VOLATILE 0 +#define REG_OPTION_VOLATILE 1 +#define REG_OPTION_CREATE_LINK 2 +#define REG_OPTION_BACKUP_RESTORE 4 +#define REG_OPTION_OPEN_LINK 8 +#define REG_LEGAL_OPTION 15 #define OWNER_SECURITY_INFORMATION 1 #define GROUP_SECURITY_INFORMATION 2 #define DACL_SECURITY_INFORMATION 4 @@ -1593,17 +2077,17 @@ typedef enum { #define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000 #define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000 #define MAXIMUM_PROCESSORS 32 -#define PAGE_NOACCESS 0x0001 -#define PAGE_READONLY 0x0002 -#define PAGE_READWRITE 0x0004 -#define PAGE_WRITECOPY 0x0008 -#define PAGE_EXECUTE 0x0010 -#define PAGE_EXECUTE_READ 0x0020 -#define PAGE_EXECUTE_READWRITE 0x0040 -#define PAGE_EXECUTE_WRITECOPY 0x0080 -#define PAGE_GUARD 0x0100 -#define PAGE_NOCACHE 0x0200 -#define PAGE_WRITECOMBINE 0x0400 +#define PAGE_NOACCESS 0x0001 +#define PAGE_READONLY 0x0002 +#define PAGE_READWRITE 0x0004 +#define PAGE_WRITECOPY 0x0008 +#define PAGE_EXECUTE 0x0010 +#define PAGE_EXECUTE_READ 0x0020 +#define PAGE_EXECUTE_READWRITE 0x0040 +#define PAGE_EXECUTE_WRITECOPY 0x0080 +#define PAGE_GUARD 0x0100 +#define PAGE_NOCACHE 0x0200 +#define PAGE_WRITECOMBINE 0x0400 #define MEM_COMMIT 0x1000 #define MEM_RESERVE 0x2000 #define MEM_DECOMMIT 0x4000 @@ -1613,17 +2097,17 @@ typedef enum { #define MEM_MAPPED 0x40000 #define MEM_RESET 0x80000 #define MEM_TOP_DOWN 0x100000 -#define MEM_WRITE_WATCH 0x200000 /* 98/Me */ -#define MEM_PHYSICAL 0x400000 +#define MEM_WRITE_WATCH 0x200000 /* 98/Me */ +#define MEM_PHYSICAL 0x400000 #define MEM_4MB_PAGES 0x80000000 #define MEM_IMAGE SEC_IMAGE -#define SEC_NO_CHANGE 0x00400000 -#define SEC_FILE 0x00800000 -#define SEC_IMAGE 0x01000000 -#define SEC_VLM 0x02000000 -#define SEC_RESERVE 0x04000000 -#define SEC_COMMIT 0x08000000 -#define SEC_NOCACHE 0x10000000 +#define SEC_NO_CHANGE 0x00400000 +#define SEC_FILE 0x00800000 +#define SEC_IMAGE 0x01000000 +#define SEC_VLM 0x02000000 +#define SEC_RESERVE 0x04000000 +#define SEC_COMMIT 0x08000000 +#define SEC_NOCACHE 0x10000000 #define SEC_WRITECOMBINE 0x40000000 #define SEC_LARGE_PAGES 0x80000000 #define SECTION_MAP_EXECUTE_EXPLICIT 0x0020 @@ -1638,81 +2122,23 @@ typedef enum { #define RTL_CRITSECT_TYPE 0 #define RTL_RESOURCE_TYPE 1 -#define RTL_FIELD_TYPE(type, field) (((type*)0)->field) -#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8) -#define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field))) - -/* Also in winddk.h */ -#if !defined(__GNUC__) -#define FIELD_OFFSET(t,f) ((LONG)(LONG_PTR)&(((t*) 0)->f)) -#else -#define FIELD_OFFSET(t,f) ((LONG)__builtin_offsetof(t,f)) -#endif -#ifndef CONTAINING_RECORD -#define CONTAINING_RECORD(address, type, field) \ - ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) -#endif - -#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) -#define RTL_SIZEOF_THROUGH_FIELD(type, field) \ - (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field)) -#define RTL_CONTAINS_FIELD(Struct, Size, Field) \ - ((((PCHAR) (&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR) (Struct)) + (Size))) -#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) - -#if defined(__cplusplus) && \ - !defined(MIDL_PASS) && \ - !defined(RC_INVOKED) && \ - !defined(_PREFAST_) && \ - (_MSC_FULL_VER >= 13009466) && \ - !defined(SORTPP_PASS) -#define RTL_NUMBER_OF_V2(A) (sizeof(*RtlpNumberOf(A))) -#else -#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) -#endif - -#ifdef ENABLE_RTL_NUMBER_OF_V2 -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) -#else -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) -#endif -//#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) -//#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A) - -#define RTL_FIELD_TYPE(type, field) (((type*)0)->field) -#define RTL_NUMBER_OF_FIELD(type, field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field))) -#define RTL_PADDING_BETWEEN_FIELDS(T, F1, F2) \ - ((FIELD_OFFSET(T, F2) > FIELD_OFFSET(T, F1)) \ - ? (FIELD_OFFSET(T, F2) - FIELD_OFFSET(T, F1) - RTL_FIELD_SIZE(T, F1)) \ - : (FIELD_OFFSET(T, F1) - FIELD_OFFSET(T, F2) - RTL_FIELD_SIZE(T, F2))) - -#if defined(__cplusplus) -#define RTL_CONST_CAST(type) const_cast -#else -#define RTL_CONST_CAST(type) (type) -#endif - -#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8) -#define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field))) - -/* end winddk.h */ -#define IMAGE_SIZEOF_FILE_HEADER 20 -#define IMAGE_FILE_RELOCS_STRIPPED 1 -#define IMAGE_FILE_EXECUTABLE_IMAGE 2 -#define IMAGE_FILE_LINE_NUMS_STRIPPED 4 -#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8 -#define IMAGE_FILE_AGGRESIVE_WS_TRIM 16 -#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32 -#define IMAGE_FILE_BYTES_REVERSED_LO 128 -#define IMAGE_FILE_32BIT_MACHINE 256 -#define IMAGE_FILE_DEBUG_STRIPPED 512 -#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024 -#define IMAGE_FILE_NET_RUN_FROM_SWAP 2048 -#define IMAGE_FILE_SYSTEM 4096 -#define IMAGE_FILE_DLL 8192 -#define IMAGE_FILE_UP_SYSTEM_ONLY 16384 -#define IMAGE_FILE_BYTES_REVERSED_HI 32768 -#define IMAGE_FILE_MACHINE_UNKNOWN 0 +#define IMAGE_SIZEOF_FILE_HEADER 20 +#define IMAGE_FILE_RELOCS_STRIPPED 1 +#define IMAGE_FILE_EXECUTABLE_IMAGE 2 +#define IMAGE_FILE_LINE_NUMS_STRIPPED 4 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8 +#define IMAGE_FILE_AGGRESIVE_WS_TRIM 16 +#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32 +#define IMAGE_FILE_BYTES_REVERSED_LO 128 +#define IMAGE_FILE_32BIT_MACHINE 256 +#define IMAGE_FILE_DEBUG_STRIPPED 512 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024 +#define IMAGE_FILE_NET_RUN_FROM_SWAP 2048 +#define IMAGE_FILE_SYSTEM 4096 +#define IMAGE_FILE_DLL 8192 +#define IMAGE_FILE_UP_SYSTEM_ONLY 16384 +#define IMAGE_FILE_BYTES_REVERSED_HI 32768 +#define IMAGE_FILE_MACHINE_UNKNOWN 0 #define IMAGE_FILE_MACHINE_AM33 0x1d3 #define IMAGE_FILE_MACHINE_AMD64 0x8664 @@ -1747,17 +2173,17 @@ typedef enum { /* Wine extension */ #define IMAGE_FILE_MACHINE_ARM64 0x1c5 -#define IMAGE_FILE_EXPORT_DIRECTORY 0 -#define IMAGE_FILE_IMPORT_DIRECTORY 1 -#define IMAGE_FILE_RESOURCE_DIRECTORY 2 -#define IMAGE_FILE_EXCEPTION_DIRECTORY 3 -#define IMAGE_FILE_SECURITY_DIRECTORY 4 -#define IMAGE_FILE_BASE_RELOCATION_TABLE 5 -#define IMAGE_FILE_DEBUG_DIRECTORY 6 -#define IMAGE_FILE_DESCRIPTION_STRING 7 -#define IMAGE_FILE_MACHINE_VALUE 8 /* Mips */ -#define IMAGE_FILE_THREAD_LOCAL_STORAGE 9 -#define IMAGE_FILE_CALLBACK_DIRECTORY 10 +#define IMAGE_FILE_EXPORT_DIRECTORY 0 +#define IMAGE_FILE_IMPORT_DIRECTORY 1 +#define IMAGE_FILE_RESOURCE_DIRECTORY 2 +#define IMAGE_FILE_EXCEPTION_DIRECTORY 3 +#define IMAGE_FILE_SECURITY_DIRECTORY 4 +#define IMAGE_FILE_BASE_RELOCATION_TABLE 5 +#define IMAGE_FILE_DEBUG_DIRECTORY 6 +#define IMAGE_FILE_DESCRIPTION_STRING 7 +#define IMAGE_FILE_MACHINE_VALUE 8 /* Mips */ +#define IMAGE_FILE_THREAD_LOCAL_STORAGE 9 +#define IMAGE_FILE_CALLBACK_DIRECTORY 10 #define IMAGE_DOS_SIGNATURE 0x5A4D #define IMAGE_OS2_SIGNATURE 0x454E @@ -1810,21 +2236,21 @@ typedef enum { #define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 #define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 #define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) -#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 -#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 -#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 -#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 -#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 -#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 -#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 -#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 -#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 -#define IMAGE_DIRECTORY_ENTRY_TLS 9 -#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 -#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 -#define IMAGE_DIRECTORY_ENTRY_IAT 12 -#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13 -#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14 +#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 +#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 +#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 +#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 +#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 +#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 +#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 +#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 +#define IMAGE_DIRECTORY_ENTRY_TLS 9 +#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 +#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 +#define IMAGE_DIRECTORY_ENTRY_IAT 12 +#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13 +#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14 #define IMAGE_SCN_TYPE_REG 0 #define IMAGE_SCN_TYPE_DSECT 1 //#define IMAGE_SCN_TYPE_NOLOAD 2 @@ -1857,9 +2283,9 @@ typedef enum { #define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 #define IMAGE_SCN_MEM_WRITE 0x80000000 -#define IMAGE_SYM_UNDEFINED 0 +#define IMAGE_SYM_UNDEFINED 0 #define IMAGE_SYM_ABSOLUTE (-1) -#define IMAGE_SYM_DEBUG (-2) +#define IMAGE_SYM_DEBUG (-2) #define IMAGE_SYM_TYPE_NULL 0 #define IMAGE_SYM_TYPE_VOID 1 #define IMAGE_SYM_TYPE_CHAR 2 @@ -1881,7 +2307,7 @@ typedef enum { #define IMAGE_SYM_DTYPE_POINTER 1 #define IMAGE_SYM_DTYPE_FUNCTION 2 #define IMAGE_SYM_DTYPE_ARRAY 3 -#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1) +#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1) #define IMAGE_SYM_CLASS_NULL 0 #define IMAGE_SYM_CLASS_AUTOMATIC 1 #define IMAGE_SYM_CLASS_EXTERNAL 2 @@ -2112,12 +2538,12 @@ typedef enum { #define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE) #define TOKEN_SOURCE_LENGTH 8 /* end ddk/ntifs.h */ -#define DLL_PROCESS_DETACH 0 -#define DLL_PROCESS_ATTACH 1 -#define DLL_THREAD_ATTACH 2 -#define DLL_THREAD_DETACH 3 +#define DLL_PROCESS_DETACH 0 +#define DLL_PROCESS_ATTACH 1 +#define DLL_THREAD_ATTACH 2 +#define DLL_THREAD_DETACH 3 #ifdef __WINESRC__ -#define DLL_WINE_PREATTACH 8 /* Never called, but defined for compatibility with Wine source */ +#define DLL_WINE_PREATTACH 8 /* Never called, but defined for compatibility with Wine source */ #endif #define TAPE_ABSOLUTE_POSITION 0 #define TAPE_LOGICAL_POSITION 1 @@ -2188,13 +2614,13 @@ typedef enum { #define TAPE_DRIVE_FORMAT 0xA0000000 #define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000 #define TAPE_DRIVE_HIGH_FEATURES 0x80000000 -#define TAPE_FIXED_PARTITIONS 0 -#define TAPE_INITIATOR_PARTITIONS 2 -#define TAPE_SELECT_PARTITIONS 1 -#define TAPE_FILEMARKS 1 -#define TAPE_LONG_FILEMARKS 3 -#define TAPE_SETMARKS 0 -#define TAPE_SHORT_FILEMARKS 2 +#define TAPE_FIXED_PARTITIONS 0 +#define TAPE_INITIATOR_PARTITIONS 2 +#define TAPE_SELECT_PARTITIONS 1 +#define TAPE_FILEMARKS 1 +#define TAPE_LONG_FILEMARKS 3 +#define TAPE_SETMARKS 0 +#define TAPE_SHORT_FILEMARKS 2 #define TAPE_ERASE_LONG 1 #define TAPE_ERASE_SHORT 0 #define TAPE_LOAD 0 @@ -2220,30 +2646,14 @@ typedef enum { #define VER_AND 6 #define VER_OR 7 #endif -#define VER_SERVER_NT 0x80000000 -#define VER_WORKSTATION_NT 0x40000000 + #define VER_PLATFORM_WIN32s 0 #define VER_PLATFORM_WIN32_WINDOWS 1 #define VER_PLATFORM_WIN32_NT 2 #define VER_NT_WORKSTATION 1 #define VER_NT_DOMAIN_CONTROLLER 2 #define VER_NT_SERVER 3 -#define VER_SUITE_SMALLBUSINESS 1 -#define VER_SUITE_ENTERPRISE 2 -#define VER_SUITE_BACKOFFICE 4 -#define VER_SUITE_COMMUNICATIONS 8 -#define VER_SUITE_TERMINAL 16 -#define VER_SUITE_SMALLBUSINESS_RESTRICTED 32 -#define VER_SUITE_EMBEDDEDNT 64 -#define VER_SUITE_DATACENTER 128 -#define VER_SUITE_SINGLEUSERTS 256 -#define VER_SUITE_PERSONAL 512 -#define VER_SUITE_BLADE 1024 -#define VER_SUITE_EMBEDDED_RESTRICTED 2048 -#define VER_SUITE_SECURITY_APPLIANCE 4096 -#define VER_SUITE_STORAGE_SERVER 8192 -#define VER_SUITE_COMPUTE_SERVER 16384 -#define VER_SUITE_WH_SERVER 32768 + #define WT_EXECUTEDEFAULT 0x00000000 #define WT_EXECUTEINIOTHREAD 0x00000001 #define WT_EXECUTEINUITHREAD 0x00000002 @@ -2298,10 +2708,10 @@ typedef DWORD ACCESS_MASK, *PACCESS_MASK; #if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in basetyps.h */ #define GUID_DEFINED typedef struct _GUID { - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; } GUID, *REFGUID, *LPGUID; #endif /* GUID_DEFINED */ @@ -2503,19 +2913,6 @@ typedef struct _ACL_SIZE_INFORMATION { DWORD AclBytesFree; } ACL_SIZE_INFORMATION, *PACL_SIZE_INFORMATION; -typedef -_IRQL_requires_same_ -_Function_class_(EXCEPTION_ROUTINE) -EXCEPTION_DISPOSITION -NTAPI -EXCEPTION_ROUTINE( - _Inout_ struct _EXCEPTION_RECORD *ExceptionRecord, - _In_ PVOID EstablisherFrame, - _Inout_ struct _CONTEXT *ContextRecord, - _In_ PVOID DispatcherContext); - -typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE; - #ifndef _LDT_ENTRY_DEFINED #define _LDT_ENTRY_DEFINED @@ -2548,16 +2945,16 @@ typedef struct _LDT_ENTRY { /* FIXME: add more machines */ #if defined(_X86_) && !defined(__PowerPC__) -#define SIZE_OF_80387_REGISTERS 80 -#define CONTEXT_i386 0x10000 -#define CONTEXT_i486 0x10000 -#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) -#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) -#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) -#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) -#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) +#define SIZE_OF_80387_REGISTERS 80 +#define CONTEXT_i386 0x10000 +#define CONTEXT_i486 0x10000 +#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) +#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) +#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) #define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) -#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) #define MAXIMUM_SUPPORTED_EXTENSION 512 #define EXCEPTION_READ_FAULT 0 @@ -2799,13 +3196,13 @@ typedef struct _RUNTIME_FUNCTION { typedef struct _UNWIND_HISTORY_TABLE_ENTRY { - ULONG64 ImageBase; + DWORD64 ImageBase; PRUNTIME_FUNCTION FunctionEntry; } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; typedef struct _UNWIND_HISTORY_TABLE { - ULONG Count; + DWORD Count; UCHAR Search; ULONG64 LowAddress; ULONG64 HighAddress; @@ -2881,206 +3278,206 @@ RtlVirtualUnwind( _Inout_opt_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers); #elif defined(_PPC_) -#define CONTEXT_CONTROL 1L -#define CONTEXT_FLOATING_POINT 2L -#define CONTEXT_INTEGER 4L -#define CONTEXT_DEBUG_REGISTERS 8L +#define CONTEXT_CONTROL 1L +#define CONTEXT_FLOATING_POINT 2L +#define CONTEXT_INTEGER 4L +#define CONTEXT_DEBUG_REGISTERS 8L #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER) typedef struct _FLOATING_SAVE_AREA { - double Fpr0; - double Fpr1; - double Fpr2; - double Fpr3; - double Fpr4; - double Fpr5; - double Fpr6; - double Fpr7; - double Fpr8; - double Fpr9; - double Fpr10; - double Fpr11; - double Fpr12; - double Fpr13; - double Fpr14; - double Fpr15; - double Fpr16; - double Fpr17; - double Fpr18; - double Fpr19; - double Fpr20; - double Fpr21; - double Fpr22; - double Fpr23; - double Fpr24; - double Fpr25; - double Fpr26; - double Fpr27; - double Fpr28; - double Fpr29; - double Fpr30; - double Fpr31; - double Fpscr; + double Fpr0; + double Fpr1; + double Fpr2; + double Fpr3; + double Fpr4; + double Fpr5; + double Fpr6; + double Fpr7; + double Fpr8; + double Fpr9; + double Fpr10; + double Fpr11; + double Fpr12; + double Fpr13; + double Fpr14; + double Fpr15; + double Fpr16; + double Fpr17; + double Fpr18; + double Fpr19; + double Fpr20; + double Fpr21; + double Fpr22; + double Fpr23; + double Fpr24; + double Fpr25; + double Fpr26; + double Fpr27; + double Fpr28; + double Fpr29; + double Fpr30; + double Fpr31; + double Fpscr; } FLOATING_SAVE_AREA; typedef struct _CONTEXT { FLOATING_SAVE_AREA FloatSave; - DWORD Gpr0; - DWORD Gpr1; - DWORD Gpr2; - DWORD Gpr3; - DWORD Gpr4; - DWORD Gpr5; - DWORD Gpr6; - DWORD Gpr7; - DWORD Gpr8; - DWORD Gpr9; - DWORD Gpr10; - DWORD Gpr11; - DWORD Gpr12; - DWORD Gpr13; - DWORD Gpr14; - DWORD Gpr15; - DWORD Gpr16; - DWORD Gpr17; - DWORD Gpr18; - DWORD Gpr19; - DWORD Gpr20; - DWORD Gpr21; - DWORD Gpr22; - DWORD Gpr23; - DWORD Gpr24; - DWORD Gpr25; - DWORD Gpr26; - DWORD Gpr27; - DWORD Gpr28; - DWORD Gpr29; - DWORD Gpr30; - DWORD Gpr31; - DWORD Cr; - DWORD Xer; - DWORD Msr; - DWORD Iar; - DWORD Lr; - DWORD Ctr; - DWORD ContextFlags; - DWORD Fill[3]; - DWORD Dr0; - DWORD Dr1; - DWORD Dr2; - DWORD Dr3; - DWORD Dr4; - DWORD Dr5; - DWORD Dr6; - DWORD Dr7; + DWORD Gpr0; + DWORD Gpr1; + DWORD Gpr2; + DWORD Gpr3; + DWORD Gpr4; + DWORD Gpr5; + DWORD Gpr6; + DWORD Gpr7; + DWORD Gpr8; + DWORD Gpr9; + DWORD Gpr10; + DWORD Gpr11; + DWORD Gpr12; + DWORD Gpr13; + DWORD Gpr14; + DWORD Gpr15; + DWORD Gpr16; + DWORD Gpr17; + DWORD Gpr18; + DWORD Gpr19; + DWORD Gpr20; + DWORD Gpr21; + DWORD Gpr22; + DWORD Gpr23; + DWORD Gpr24; + DWORD Gpr25; + DWORD Gpr26; + DWORD Gpr27; + DWORD Gpr28; + DWORD Gpr29; + DWORD Gpr30; + DWORD Gpr31; + DWORD Cr; + DWORD Xer; + DWORD Msr; + DWORD Iar; + DWORD Lr; + DWORD Ctr; + DWORD ContextFlags; + DWORD Fill[3]; + DWORD Dr0; + DWORD Dr1; + DWORD Dr2; + DWORD Dr3; + DWORD Dr4; + DWORD Dr5; + DWORD Dr6; + DWORD Dr7; } CONTEXT; #elif defined(_ALPHA_) -#define CONTEXT_ALPHA 0x20000 -#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L) -#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L) -#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L) -#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER) +#define CONTEXT_ALPHA 0x20000 +#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L) +#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L) +#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L) +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER) typedef struct _CONTEXT { - ULONGLONG FltF0; - ULONGLONG FltF1; - ULONGLONG FltF2; - ULONGLONG FltF3; - ULONGLONG FltF4; - ULONGLONG FltF5; - ULONGLONG FltF6; - ULONGLONG FltF7; - ULONGLONG FltF8; - ULONGLONG FltF9; - ULONGLONG FltF10; - ULONGLONG FltF11; - ULONGLONG FltF12; - ULONGLONG FltF13; - ULONGLONG FltF14; - ULONGLONG FltF15; - ULONGLONG FltF16; - ULONGLONG FltF17; - ULONGLONG FltF18; - ULONGLONG FltF19; - ULONGLONG FltF20; - ULONGLONG FltF21; - ULONGLONG FltF22; - ULONGLONG FltF23; - ULONGLONG FltF24; - ULONGLONG FltF25; - ULONGLONG FltF26; - ULONGLONG FltF27; - ULONGLONG FltF28; - ULONGLONG FltF29; - ULONGLONG FltF30; - ULONGLONG FltF31; - ULONGLONG IntV0; - ULONGLONG IntT0; - ULONGLONG IntT1; - ULONGLONG IntT2; - ULONGLONG IntT3; - ULONGLONG IntT4; - ULONGLONG IntT5; - ULONGLONG IntT6; - ULONGLONG IntT7; - ULONGLONG IntS0; - ULONGLONG IntS1; - ULONGLONG IntS2; - ULONGLONG IntS3; - ULONGLONG IntS4; - ULONGLONG IntS5; - ULONGLONG IntFp; - ULONGLONG IntA0; - ULONGLONG IntA1; - ULONGLONG IntA2; - ULONGLONG IntA3; - ULONGLONG IntA4; - ULONGLONG IntA5; - ULONGLONG IntT8; - ULONGLONG IntT9; - ULONGLONG IntT10; - ULONGLONG IntT11; - ULONGLONG IntRa; - ULONGLONG IntT12; - ULONGLONG IntAt; - ULONGLONG IntGp; - ULONGLONG IntSp; - ULONGLONG IntZero; - ULONGLONG Fpcr; - ULONGLONG SoftFpcr; - ULONGLONG Fir; - DWORD Psr; - DWORD ContextFlags; - DWORD Fill[4]; + ULONGLONG FltF0; + ULONGLONG FltF1; + ULONGLONG FltF2; + ULONGLONG FltF3; + ULONGLONG FltF4; + ULONGLONG FltF5; + ULONGLONG FltF6; + ULONGLONG FltF7; + ULONGLONG FltF8; + ULONGLONG FltF9; + ULONGLONG FltF10; + ULONGLONG FltF11; + ULONGLONG FltF12; + ULONGLONG FltF13; + ULONGLONG FltF14; + ULONGLONG FltF15; + ULONGLONG FltF16; + ULONGLONG FltF17; + ULONGLONG FltF18; + ULONGLONG FltF19; + ULONGLONG FltF20; + ULONGLONG FltF21; + ULONGLONG FltF22; + ULONGLONG FltF23; + ULONGLONG FltF24; + ULONGLONG FltF25; + ULONGLONG FltF26; + ULONGLONG FltF27; + ULONGLONG FltF28; + ULONGLONG FltF29; + ULONGLONG FltF30; + ULONGLONG FltF31; + ULONGLONG IntV0; + ULONGLONG IntT0; + ULONGLONG IntT1; + ULONGLONG IntT2; + ULONGLONG IntT3; + ULONGLONG IntT4; + ULONGLONG IntT5; + ULONGLONG IntT6; + ULONGLONG IntT7; + ULONGLONG IntS0; + ULONGLONG IntS1; + ULONGLONG IntS2; + ULONGLONG IntS3; + ULONGLONG IntS4; + ULONGLONG IntS5; + ULONGLONG IntFp; + ULONGLONG IntA0; + ULONGLONG IntA1; + ULONGLONG IntA2; + ULONGLONG IntA3; + ULONGLONG IntA4; + ULONGLONG IntA5; + ULONGLONG IntT8; + ULONGLONG IntT9; + ULONGLONG IntT10; + ULONGLONG IntT11; + ULONGLONG IntRa; + ULONGLONG IntT12; + ULONGLONG IntAt; + ULONGLONG IntGp; + ULONGLONG IntSp; + ULONGLONG IntZero; + ULONGLONG Fpcr; + ULONGLONG SoftFpcr; + ULONGLONG Fir; + DWORD Psr; + DWORD ContextFlags; + DWORD Fill[4]; } CONTEXT; #elif defined(SHx) /* These are the debug or break registers on the SH3 */ typedef struct _DEBUG_REGISTERS { - ULONG BarA; - UCHAR BasrA; - UCHAR BamrA; - USHORT BbrA; - ULONG BarB; - UCHAR BasrB; - UCHAR BamrB; - USHORT BbrB; - ULONG BdrB; - ULONG BdmrB; - USHORT Brcr; - USHORT Align; + DWORD BarA; + UCHAR BasrA; + UCHAR BamrA; + USHORT BbrA; + DWORD BarB; + UCHAR BasrB; + UCHAR BamrB; + USHORT BbrB; + DWORD BdrB; + DWORD BdmrB; + USHORT Brcr; + USHORT Align; } DEBUG_REGISTERS, *PDEBUG_REGISTERS; /* The following flags control the contents of the CONTEXT structure. */ -#define CONTEXT_SH3 0x00000040 -#define CONTEXT_SH4 0x000000c0 /* CONTEXT_SH3 | 0x80 - must contain the SH3 bits */ +#define CONTEXT_SH3 0x00000040 +#define CONTEXT_SH4 0x000000c0 /* CONTEXT_SH3 | 0x80 - must contain the SH3 bits */ #ifdef SH3 #define CONTEXT_CONTROL (CONTEXT_SH3 | 0x00000001L) #define CONTEXT_INTEGER (CONTEXT_SH3 | 0x00000002L) #define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH3 | 0x00000008L) #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS) -#else /* SH4 */ +#else /* SH4 */ #define CONTEXT_CONTROL (CONTEXT_SH4 | 0x00000001L) #define CONTEXT_INTEGER (CONTEXT_SH4 | 0x00000002L) #define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH4 | 0x00000008L) @@ -3094,72 +3491,72 @@ typedef struct _DEBUG_REGISTERS { /* Thread structure for CPUs which have no floating point support. */ typedef struct _CONTEXT { - /* The flags values within this flag control the contents of */ - /* a CONTEXT record. */ + /* The flags values within this flag control the contents of */ + /* a CONTEXT record. */ - /* If the context record is used as an input parameter, then */ - /* for each portion of the context record controlled by a flag */ - /* whose value is set, it is assumed that that portion of the */ - /* context record contains valid context. If the context record */ - /* is being used to modify a thread's context, then only that */ - /* portion of the threads context will be modified. */ + /* If the context record is used as an input parameter, then */ + /* for each portion of the context record controlled by a flag */ + /* whose value is set, it is assumed that that portion of the */ + /* context record contains valid context. If the context record */ + /* is being used to modify a thread's context, then only that */ + /* portion of the threads context will be modified. */ - /* If the context record is used as an IN OUT parameter to capture */ - /* the context of a thread, then only those portions of the thread's */ - /* context corresponding to set flags will be returned. */ + /* If the context record is used as an IN OUT parameter to capture */ + /* the context of a thread, then only those portions of the thread's */ + /* context corresponding to set flags will be returned. */ - /* The context record is never used as an OUT only parameter. */ + /* The context record is never used as an OUT only parameter. */ - ULONG ContextFlags; + DWORD ContextFlags; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_INTEGER. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_INTEGER. */ - /* N.B. The registers RA and R15 are defined in this section, but are */ - /* considered part of the control context rather than part of the integer */ - /* context. */ + /* N.B. The registers RA and R15 are defined in this section, but are */ + /* considered part of the control context rather than part of the integer */ + /* context. */ - ULONG PR; - ULONG MACH; - ULONG MACL; - ULONG GBR; - ULONG R0; - ULONG R1; - ULONG R2; - ULONG R3; - ULONG R4; - ULONG R5; - ULONG R6; - ULONG R7; - ULONG R8; - ULONG R9; - ULONG R10; - ULONG R11; - ULONG R12; - ULONG R13; - ULONG R14; - ULONG R15; + DWORD PR; + DWORD MACH; + DWORD MACL; + DWORD GBR; + DWORD R0; + DWORD R1; + DWORD R2; + DWORD R3; + DWORD R4; + DWORD R5; + DWORD R6; + DWORD R7; + DWORD R8; + DWORD R9; + DWORD R10; + DWORD R11; + DWORD R12; + DWORD R13; + DWORD R14; + DWORD R15; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_CONTROL. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_CONTROL. */ - /* N.B. The registers r15 and ra are defined in the integer section, */ - /* but are considered part of the control context rather than part of */ - /* the integer context. */ + /* N.B. The registers r15 and ra are defined in the integer section, */ + /* but are considered part of the control context rather than part of */ + /* the integer context. */ - ULONG Fir; - ULONG Psr; + DWORD Fir; + DWORD Psr; #if !defined(SH3e) && !defined(SH4) - ULONG OldStuff[2]; - DEBUG_REGISTERS DebugRegisters; + DWORD OldStuff[2]; + DEBUG_REGISTERS DebugRegisters; #else - ULONG Fpscr; - ULONG Fpul; - ULONG FRegs[16]; + DWORD Fpscr; + DWORD Fpul; + DWORD FRegs[16]; #if defined(SH4) - ULONG xFRegs[16]; + DWORD xFRegs[16]; #endif #endif } CONTEXT; @@ -3191,125 +3588,125 @@ typedef struct _CONTEXT { typedef struct _CONTEXT { - /* This section is always present and is used as an argument build */ - /* area. */ + /* This section is always present and is used as an argument build */ + /* area. */ - DWORD Argument[4]; + DWORD Argument[4]; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_FLOATING_POINT. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_FLOATING_POINT. */ - DWORD FltF0; - DWORD FltF1; - DWORD FltF2; - DWORD FltF3; - DWORD FltF4; - DWORD FltF5; - DWORD FltF6; - DWORD FltF7; - DWORD FltF8; - DWORD FltF9; - DWORD FltF10; - DWORD FltF11; - DWORD FltF12; - DWORD FltF13; - DWORD FltF14; - DWORD FltF15; - DWORD FltF16; - DWORD FltF17; - DWORD FltF18; - DWORD FltF19; - DWORD FltF20; - DWORD FltF21; - DWORD FltF22; - DWORD FltF23; - DWORD FltF24; - DWORD FltF25; - DWORD FltF26; - DWORD FltF27; - DWORD FltF28; - DWORD FltF29; - DWORD FltF30; - DWORD FltF31; + DWORD FltF0; + DWORD FltF1; + DWORD FltF2; + DWORD FltF3; + DWORD FltF4; + DWORD FltF5; + DWORD FltF6; + DWORD FltF7; + DWORD FltF8; + DWORD FltF9; + DWORD FltF10; + DWORD FltF11; + DWORD FltF12; + DWORD FltF13; + DWORD FltF14; + DWORD FltF15; + DWORD FltF16; + DWORD FltF17; + DWORD FltF18; + DWORD FltF19; + DWORD FltF20; + DWORD FltF21; + DWORD FltF22; + DWORD FltF23; + DWORD FltF24; + DWORD FltF25; + DWORD FltF26; + DWORD FltF27; + DWORD FltF28; + DWORD FltF29; + DWORD FltF30; + DWORD FltF31; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_INTEGER. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_INTEGER. */ - /* N.B. The registers gp, sp, and ra are defined in this section, but are */ - /* considered part of the control context rather than part of the integer */ - /* context. */ + /* N.B. The registers gp, sp, and ra are defined in this section, but are */ + /* considered part of the control context rather than part of the integer */ + /* context. */ - /* N.B. Register zero is not stored in the frame. */ + /* N.B. Register zero is not stored in the frame. */ - DWORD IntZero; - DWORD IntAt; - DWORD IntV0; - DWORD IntV1; - DWORD IntA0; - DWORD IntA1; - DWORD IntA2; - DWORD IntA3; - DWORD IntT0; - DWORD IntT1; - DWORD IntT2; - DWORD IntT3; - DWORD IntT4; - DWORD IntT5; - DWORD IntT6; - DWORD IntT7; - DWORD IntS0; - DWORD IntS1; - DWORD IntS2; - DWORD IntS3; - DWORD IntS4; - DWORD IntS5; - DWORD IntS6; - DWORD IntS7; - DWORD IntT8; - DWORD IntT9; - DWORD IntK0; - DWORD IntK1; - DWORD IntGp; - DWORD IntSp; - DWORD IntS8; - DWORD IntRa; - DWORD IntLo; - DWORD IntHi; + DWORD IntZero; + DWORD IntAt; + DWORD IntV0; + DWORD IntV1; + DWORD IntA0; + DWORD IntA1; + DWORD IntA2; + DWORD IntA3; + DWORD IntT0; + DWORD IntT1; + DWORD IntT2; + DWORD IntT3; + DWORD IntT4; + DWORD IntT5; + DWORD IntT6; + DWORD IntT7; + DWORD IntS0; + DWORD IntS1; + DWORD IntS2; + DWORD IntS3; + DWORD IntS4; + DWORD IntS5; + DWORD IntS6; + DWORD IntS7; + DWORD IntT8; + DWORD IntT9; + DWORD IntK0; + DWORD IntK1; + DWORD IntGp; + DWORD IntSp; + DWORD IntS8; + DWORD IntRa; + DWORD IntLo; + DWORD IntHi; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_FLOATING_POINT. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_FLOATING_POINT. */ - DWORD Fsr; + DWORD Fsr; - /* This section is specified/returned if the ContextFlags word contains */ - /* the flag CONTEXT_CONTROL. */ + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_CONTROL. */ - /* N.B. The registers gp, sp, and ra are defined in the integer section, */ - /* but are considered part of the control context rather than part of */ - /* the integer context. */ + /* N.B. The registers gp, sp, and ra are defined in the integer section, */ + /* but are considered part of the control context rather than part of */ + /* the integer context. */ - DWORD Fir; - DWORD Psr; + DWORD Fir; + DWORD Psr; - /* The flags values within this flag control the contents of */ - /* a CONTEXT record. */ + /* The flags values within this flag control the contents of */ + /* a CONTEXT record. */ - /* If the context record is used as an input parameter, then */ - /* for each portion of the context record controlled by a flag */ - /* whose value is set, it is assumed that that portion of the */ - /* context record contains valid context. If the context record */ - /* is being used to modify a thread's context, then only that */ - /* portion of the threads context will be modified. */ + /* If the context record is used as an input parameter, then */ + /* for each portion of the context record controlled by a flag */ + /* whose value is set, it is assumed that that portion of the */ + /* context record contains valid context. If the context record */ + /* is being used to modify a thread's context, then only that */ + /* portion of the threads context will be modified. */ - /* If the context record is used as an IN OUT parameter to capture */ - /* the context of a thread, then only those portions of the thread's */ - /* context corresponding to set flags will be returned. */ + /* If the context record is used as an IN OUT parameter to capture */ + /* the context of a thread, then only those portions of the thread's */ + /* context corresponding to set flags will be returned. */ - /* The context record is never used as an OUT only parameter. */ + /* The context record is never used as an OUT only parameter. */ - DWORD ContextFlags; + DWORD ContextFlags; - DWORD Fill[2]; + DWORD Fill[2]; } CONTEXT; #elif defined(_ARM_) @@ -3327,44 +3724,44 @@ typedef struct _CONTEXT { #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) typedef struct _CONTEXT { - /* The flags values within this flag control the contents of - a CONTEXT record. + /* The flags values within this flag control the contents of + a CONTEXT record. - If the context record is used as an input parameter, then - for each portion of the context record controlled by a flag - whose value is set, it is assumed that that portion of the - context record contains valid context. If the context record - is being used to modify a thread's context, then only that - portion of the threads context will be modified. + If the context record is used as an input parameter, then + for each portion of the context record controlled by a flag + whose value is set, it is assumed that that portion of the + context record contains valid context. If the context record + is being used to modify a thread's context, then only that + portion of the threads context will be modified. - If the context record is used as an IN OUT parameter to capture - the context of a thread, then only those portions of the thread's - context corresponding to set flags will be returned. + If the context record is used as an IN OUT parameter to capture + the context of a thread, then only those portions of the thread's + context corresponding to set flags will be returned. - The context record is never used as an OUT only parameter. */ + The context record is never used as an OUT only parameter. */ - ULONG ContextFlags; + DWORD ContextFlags; - /* This section is specified/returned if the ContextFlags word contains - the flag CONTEXT_INTEGER. */ - ULONG R0; - ULONG R1; - ULONG R2; - ULONG R3; - ULONG R4; - ULONG R5; - ULONG R6; - ULONG R7; - ULONG R8; - ULONG R9; - ULONG R10; - ULONG R11; - ULONG R12; + /* This section is specified/returned if the ContextFlags word contains + the flag CONTEXT_INTEGER. */ + DWORD R0; + DWORD R1; + DWORD R2; + DWORD R3; + DWORD R4; + DWORD R5; + DWORD R6; + DWORD R7; + DWORD R8; + DWORD R9; + DWORD R10; + DWORD R11; + DWORD R12; - ULONG Sp; - ULONG Lr; - ULONG Pc; - ULONG Psr; + DWORD Sp; + DWORD Lr; + DWORD Pc; + DWORD Psr; } CONTEXT; #else @@ -3420,38 +3817,6 @@ typedef struct _EXCEPTION_POINTERS { PCONTEXT ContextRecord; } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS; -#ifdef _M_PPC -#define LARGE_INTEGER_ORDER(x) x HighPart; DWORD LowPart; -#else -#define LARGE_INTEGER_ORDER(x) DWORD LowPart; x HighPart; -#endif - -typedef union _LARGE_INTEGER { -#if ! defined(NONAMELESSUNION) || defined(__cplusplus) - _ANONYMOUS_STRUCT struct { - LARGE_INTEGER_ORDER(LONG) - }; -#endif /* NONAMELESSUNION */ - struct { - LARGE_INTEGER_ORDER(LONG) - } u; - LONGLONG QuadPart; -} LARGE_INTEGER, *PLARGE_INTEGER; -typedef union _ULARGE_INTEGER { -#if ! defined(NONAMELESSUNION) || defined(__cplusplus) - _ANONYMOUS_STRUCT struct { - LARGE_INTEGER_ORDER(DWORD) - }; -#endif /* NONAMELESSUNION */ - struct { - LARGE_INTEGER_ORDER(DWORD) - } u; - ULONGLONG QuadPart; -} ULARGE_INTEGER, *PULARGE_INTEGER; -typedef struct _LUID { - LARGE_INTEGER_ORDER(LONG) -} LUID, *PLUID; - #include typedef struct _LUID_AND_ATTRIBUTES { @@ -3470,9 +3835,9 @@ typedef struct _PRIVILEGE_SET { } PRIVILEGE_SET,*PPRIVILEGE_SET; typedef struct _SECURITY_ATTRIBUTES { - DWORD nLength; - LPVOID lpSecurityDescriptor; - BOOL bInheritHandle; + DWORD nLength; + LPVOID lpSecurityDescriptor; + BOOL bInheritHandle; } SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES; typedef enum _SECURITY_IMPERSONATION_LEVEL { @@ -3575,8 +3940,8 @@ typedef struct _TOKEN_PRIVILEGES { } TOKEN_PRIVILEGES,*PTOKEN_PRIVILEGES,*LPTOKEN_PRIVILEGES; typedef enum tagTOKEN_TYPE { - TokenPrimary = 1, - TokenImpersonation + TokenPrimary = 1, + TokenImpersonation } TOKEN_TYPE,*PTOKEN_TYPE; typedef enum _TOKEN_ELEVATION_TYPE { @@ -3689,6 +4054,14 @@ typedef struct _QUOTA_LIMITS { LARGE_INTEGER TimeLimit; } QUOTA_LIMITS,*PQUOTA_LIMITS; +typedef union _RATE_QUOTA_LIMIT { + DWORD RateData; + struct { + DWORD RatePercent : 7; + DWORD Reserved0 : 25; + } DUMMYSTRUCTNAME; +} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT; + typedef struct _QUOTA_LIMITS_EX { SIZE_T PagedPoolLimit; SIZE_T NonPagedPoolLimit; @@ -3700,8 +4073,8 @@ typedef struct _QUOTA_LIMITS_EX { SIZE_T Reserved2; SIZE_T Reserved3; SIZE_T Reserved4; - ULONG Flags; - ULONG Reserved5; + DWORD Flags; + RATE_QUOTA_LIMIT CpuRateLimit; } QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX; typedef struct _IO_COUNTERS { @@ -3748,8 +4121,8 @@ typedef struct _TAPE_GET_MEDIA_PARAMETERS { } TAPE_GET_MEDIA_PARAMETERS, *PTAPE_GET_MEDIA_PARAMETERS; typedef struct _TAPE_GET_POSITION { - ULONG Type; - ULONG Partition; + DWORD Type; + DWORD Partition; LARGE_INTEGER Offset; } TAPE_GET_POSITION, *PTAPE_GET_POSITION; @@ -3816,25 +4189,6 @@ typedef struct _MESSAGE_RESOURCE_DATA { MESSAGE_RESOURCE_BLOCK Blocks[1]; } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA; -typedef struct _LIST_ENTRY { - struct _LIST_ENTRY *Flink; - struct _LIST_ENTRY *Blink; -} LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY; - -typedef struct _LIST_ENTRY32 { - DWORD Flink; - DWORD Blink; -} LIST_ENTRY32,*PLIST_ENTRY32; - -typedef struct _LIST_ENTRY64 { - ULONGLONG Flink; - ULONGLONG Blink; -} LIST_ENTRY64,*PLIST_ENTRY64; - -typedef struct _SINGLE_LIST_ENTRY { - struct _SINGLE_LIST_ENTRY *Next; -} SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY; - // // Slist Header // @@ -4039,18 +4393,6 @@ typedef LONG struct _EXCEPTION_POINTERS *ExceptionInfo ); -typedef struct _PROCESSOR_NUMBER { - WORD Group; - BYTE Number; - BYTE Reserved; -} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER; - -typedef struct _GROUP_AFFINITY { - KAFFINITY Mask; - WORD Group; - WORD Reserved[3]; -} GROUP_AFFINITY, *PGROUP_AFFINITY; - typedef struct _EVENTLOGRECORD { DWORD Length; DWORD Reserved; @@ -4892,8 +5234,8 @@ typedef struct _REPARSE_GUID_DATA_BUFFER { } REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER; typedef struct _REPARSE_POINT_INFORMATION { - WORD ReparseDataLength; - WORD UnparsedNameLength; + WORD ReparseDataLength; + WORD UnparsedNameLength; } REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION; typedef union _FILE_SEGMENT_ELEMENT { @@ -5118,15 +5460,15 @@ typedef struct _POWER_ACTION_POLICY { #define POWER_USER_NOTIFY_SHUTDOWN 0x00000010 #define POWER_FORCE_TRIGGER_RESET 0x80000000 -#define DISCHARGE_POLICY_CRITICAL 0 -#define DISCHARGE_POLICY_LOW 1 -#define NUM_DISCHARGE_POLICIES 4 +#define DISCHARGE_POLICY_CRITICAL 0 +#define DISCHARGE_POLICY_LOW 1 +#define NUM_DISCHARGE_POLICIES 4 -#define PO_THROTTLE_NONE 0 -#define PO_THROTTLE_CONSTANT 1 -#define PO_THROTTLE_DEGRADE 2 -#define PO_THROTTLE_ADAPTIVE 3 -#define PO_THROTTLE_MAXIMUM 4 +#define PO_THROTTLE_NONE 0 +#define PO_THROTTLE_CONSTANT 1 +#define PO_THROTTLE_DEGRADE 2 +#define PO_THROTTLE_ADAPTIVE 3 +#define PO_THROTTLE_MAXIMUM 4 typedef struct _SYSTEM_POWER_LEVEL { BOOLEAN Enable; @@ -5218,16 +5560,17 @@ typedef struct _SYSTEM_BATTERY_STATE { DWORD DefaultAlert2; } SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE; +// FIXME: This should not be here! typedef struct _PROCESSOR_POWER_INFORMATION { - ULONG Number; - ULONG MaxMhz; - ULONG CurrentMhz; - ULONG MhzLimit; - ULONG MaxIdleState; - ULONG CurrentIdleState; + ULONG Number; + ULONG MaxMhz; + ULONG CurrentMhz; + ULONG MhzLimit; + ULONG MaxIdleState; + ULONG CurrentIdleState; } PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION; -typedef DWORD EXECUTION_STATE; +typedef DWORD EXECUTION_STATE, *PEXECUTION_STATE; typedef enum _POWER_INFORMATION_LEVEL { SystemPowerPolicyAc, @@ -5287,10 +5630,10 @@ typedef enum _POWER_INFORMATION_LEVEL { #if 1 /* (WIN32_WINNT >= 0x0500) */ typedef struct _SYSTEM_POWER_INFORMATION { - ULONG MaxIdlenessAllowed; - ULONG Idleness; - ULONG TimeRemaining; - UCHAR CoolingMode; + ULONG MaxIdlenessAllowed; + ULONG Idleness; + ULONG TimeRemaining; + UCHAR CoolingMode; } SYSTEM_POWER_INFORMATION,*PSYSTEM_POWER_INFORMATION; #endif @@ -5548,7 +5891,19 @@ FORCEINLINE PVOID GetCurrentFiber(VOID) #endif } #elif defined (_M_ARM) - PVOID WINAPI GetCurrentFiber(VOID); +#define CP15_PMSELR 15, 0, 9, 12, 5 +#define CP15_PMXEVCNTR 15, 0, 9, 13, 2 +#define CP15_TPIDRURW 15, 0, 13, 0, 2 +#define CP15_TPIDRURO 15, 0, 13, 0, 3 +#define CP15_TPIDRPRW 15, 0, 13, 0, 4 +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW); +} +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + return ((PNT_TIB )(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->FiberData; +} #elif defined(_M_PPC) FORCEINLINE unsigned long _read_teb_dword(const unsigned long Offset) { @@ -5572,56 +5927,45 @@ FORCEINLINE PVOID GetCurrentFiber(void) #error Unknown architecture #endif -static __inline PVOID GetFiberData(void) +FORCEINLINE PVOID GetFiberData(void) { - return *((PVOID *)GetCurrentFiber()); + return *((PVOID *)GetCurrentFiber()); } -#if defined(__GNUC__) - -static __inline__ BOOLEAN -InterlockedBitTestAndSet(IN LONG volatile *Base, - IN LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btsl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedOr(Base, 1 << Bit) >> Bit) & 1; -#endif -} - -static __inline__ BOOLEAN -InterlockedBitTestAndReset(IN LONG volatile *Base, - IN LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btrl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedAnd(Base, ~(1 << Bit)) >> Bit) & 1; -#endif -} - -#endif - #define BitScanForward _BitScanForward #define BitScanReverse _BitScanReverse +#define BitTest _bittest +#define BitTestAndComplement _bittestandcomplement +#define BitTestAndSet _bittestandset +#define BitTestAndReset _bittestandreset +#define InterlockedBitTestAndSet _interlockedbittestandset +#define InterlockedBitTestAndReset _interlockedbittestandreset +#define InterlockedAnd16 _InterlockedAnd16 +#define InterlockedCompareExchange16 _InterlockedCompareExchange16 +#define InterlockedOr16 _InterlockedOr16 +#define InterlockedIncrement16 _InterlockedIncrement16 +#define InterlockedDecrement16 _InterlockedDecrement16 + #ifdef _M_AMD64 #define BitScanForward64 _BitScanForward64 #define BitScanReverse64 _BitScanReverse64 + +#define InterlockedAnd _InterlockedAnd +#define InterlockedExchange _InterlockedExchange +#define InterlockedOr _InterlockedOr + +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 + +#define InterlockedBitTestAndSet64 _interlockedbittestandset64 +#define InterlockedBitTestAndReset64 _interlockedbittestandreset64 + +#endif + +#ifdef _WIN64 +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) +#else +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) #endif /* TODO: Other architectures than X86 */ @@ -5691,32 +6035,6 @@ DbgRaiseAssertionFailure(VOID) #error Unknown architecture #endif -#if defined(_AMD64_) -#if defined(_M_AMD64) - -#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) - -#define InterlockedAnd _InterlockedAnd -#define InterlockedExchange _InterlockedExchange -#define InterlockedOr _InterlockedOr - -#define InterlockedAnd64 _InterlockedAnd64 -#define InterlockedOr64 _InterlockedOr64 - -#define InterlockedBitTestAndSet _interlockedbittestandset -#define InterlockedBitTestAndSet64 _interlockedbittestandset64 -#define InterlockedBitTestAndReset _interlockedbittestandreset -#define InterlockedBitTestAndReset64 _interlockedbittestandreset64 - - -#endif - -#else - -#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) - -#endif - typedef struct _TP_POOL TP_POOL, *PTP_POOL; typedef struct _TP_WORK TP_WORK, *PTP_WORK; typedef struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE, *PTP_CALLBACK_INSTANCE; @@ -5796,6 +6114,5 @@ typedef struct _TP_CALLBACK_ENVIRON_V1 { #endif /* RC_INVOKED */ #ifdef __cplusplus -} -#endif +} // extern "C" #endif diff --git a/include/reactos/drivers/bootvid/bootvid.h b/include/reactos/drivers/bootvid/bootvid.h index 406d23407ff..8e9bd9d8792 100644 --- a/include/reactos/drivers/bootvid/bootvid.h +++ b/include/reactos/drivers/bootvid/bootvid.h @@ -11,22 +11,21 @@ VidResetDisplay(IN BOOLEAN HalReset); ULONG NTAPI -VidSetTextColor(ULONG Color); +VidSetTextColor(IN ULONG Color); VOID NTAPI -VidDisplayStringXY(PUCHAR String, - ULONG Left, - ULONG Top, - BOOLEAN Transparent); +VidDisplayStringXY(IN PUCHAR String, + IN ULONG Left, + IN ULONG Top, + IN BOOLEAN Transparent); VOID NTAPI -VidSetScrollRegion(ULONG x1, - ULONG y1, - ULONG x2, - ULONG y2); - +VidSetScrollRegion(IN ULONG Left, + IN ULONG Top, + IN ULONG Right, + IN ULONG Bottom); VOID NTAPI @@ -43,22 +42,22 @@ VidBufferToScreenBlt(IN PUCHAR Buffer, VOID NTAPI -VidDisplayString(PUCHAR String); +VidDisplayString(IN PUCHAR String); VOID NTAPI -VidBitBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top); +VidBitBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top); VOID NTAPI -VidScreenToBufferBlt(PUCHAR Buffer, - ULONG Left, - ULONG Top, - ULONG Width, - ULONG Height, - ULONG Delta); +VidScreenToBufferBlt(IN PUCHAR Buffer, + IN ULONG Left, + IN ULONG Top, + IN ULONG Width, + IN ULONG Height, + IN ULONG Delta); VOID NTAPI diff --git a/include/reactos/libs/gnutls/gmp.h b/include/reactos/libs/gnutls/gmp.h new file mode 100644 index 00000000000..c40699b7d08 --- /dev/null +++ b/include/reactos/libs/gnutls/gmp.h @@ -0,0 +1,2301 @@ +/* Definitions for GNU multiple precision functions. -*- mode: c -*- + +Copyright 1991, 1993-1997, 1999-2014 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + +or + + * 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. + +or both in parallel, as here. + +The GNU MP Library 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 copies of the GNU General Public License and the +GNU Lesser General Public License along with the GNU MP Library. If not, +see https://www.gnu.org/licenses/. */ + +#ifndef __GMP_H__ + +#if defined (__cplusplus) +#include /* for std::istream, std::ostream, std::string */ +#include +#endif + + +/* Instantiated by configure. */ +#if ! defined (__GMP_WITHIN_CONFIGURE) +#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 +#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 +#define GMP_LIMB_BITS 32 +#define GMP_NAIL_BITS 0 +#endif +#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) +#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) +#define GMP_NUMB_MAX GMP_NUMB_MASK +#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) + + +/* The following (everything under ifndef __GNU_MP__) must be identical in + gmp.h and mp.h to allow both to be included in an application or during + the library build. */ +#ifndef __GNU_MP__ +#define __GNU_MP__ 5 + +#include /* for size_t */ + +/* Instantiated by configure. */ +#if ! defined (__GMP_WITHIN_CONFIGURE) +/* #undef _LONG_LONG_LIMB */ +#define __GMP_LIBGMP_DLL 1 +#endif + + +/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in + all other circumstances. + + When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, + or when compiling for an application it's an import directive. The two + cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles + (and not defined from an application). + + __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX + indicates when building libgmpxx, and in that case libgmpxx functions are + exports, but libgmp functions which might get called are imports. + + Libtool DLL_EXPORT define is not used. + + There's no attempt to support GMP built both static and DLL. Doing so + would mean applications would have to tell us which of the two is going + to be used when linking, and that seems very tedious and error prone if + using GMP by hand, and equally tedious from a package since autoconf and + automake don't give much help. + + __GMP_DECLSPEC is required on all documented global functions and + variables, the various internals in gmp-impl.h etc can be left unadorned. + But internals used by the test programs or speed measuring programs + should have __GMP_DECLSPEC, and certainly constants or variables must + have it or the wrong address will be resolved. + + In gcc __declspec can go at either the start or end of a prototype. + + In Microsoft C __declspec must go at the start, or after the type like + void __declspec(...) *foo()". There's no __dllexport or anything to + guard against someone foolish #defining dllexport. _export used to be + available, but no longer. + + In Borland C _export still exists, but needs to go after the type, like + "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to + make use of that. Probably more trouble than it's worth. */ + +#if defined (__GNUC__) +#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) +#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) +#endif +#if defined (_MSC_VER) || defined (__BORLANDC__) +#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) +#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) +#endif +#ifdef __WATCOMC__ +#define __GMP_DECLSPEC_EXPORT __export +#define __GMP_DECLSPEC_IMPORT __import +#endif +#ifdef __IBMC__ +#define __GMP_DECLSPEC_EXPORT _Export +#define __GMP_DECLSPEC_IMPORT _Import +#endif + +#if __GMP_LIBGMP_DLL +#ifdef __GMP_WITHIN_GMP +/* compiling to go into a DLL libgmp */ +#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT +#else +/* compiling to go into an application which will link to a DLL libgmp */ +#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT +#endif +#else +/* all other cases */ +#define __GMP_DECLSPEC +#endif + + +#ifdef __GMP_SHORT_LIMB +typedef unsigned int mp_limb_t; +typedef int mp_limb_signed_t; +#else +#ifdef _LONG_LONG_LIMB +typedef unsigned long long int mp_limb_t; +typedef long long int mp_limb_signed_t; +#else +typedef unsigned long int mp_limb_t; +typedef long int mp_limb_signed_t; +#endif +#endif +typedef unsigned long int mp_bitcnt_t; + +/* For reference, note that the name __mpz_struct gets into C++ mangled + function names, which means although the "__" suggests an internal, we + must leave this name for binary compatibility. */ +typedef struct +{ + int _mp_alloc; /* Number of *limbs* allocated and pointed + to by the _mp_d field. */ + int _mp_size; /* abs(_mp_size) is the number of limbs the + last field points to. If _mp_size is + negative this is a negative number. */ + mp_limb_t *_mp_d; /* Pointer to the limbs. */ +} __mpz_struct; + +#endif /* __GNU_MP__ */ + + +typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ +typedef __mpz_struct mpz_t[1]; + +typedef mp_limb_t * mp_ptr; +typedef const mp_limb_t * mp_srcptr; +#if defined (_CRAY) && ! defined (_CRAYMPP) +/* plain `int' is much faster (48 bits) */ +#define __GMP_MP_SIZE_T_INT 1 +typedef int mp_size_t; +typedef int mp_exp_t; +#else +#define __GMP_MP_SIZE_T_INT 0 +typedef long int mp_size_t; +typedef long int mp_exp_t; +#endif + +typedef struct +{ + __mpz_struct _mp_num; + __mpz_struct _mp_den; +} __mpq_struct; + +typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ +typedef __mpq_struct mpq_t[1]; + +typedef struct +{ + int _mp_prec; /* Max precision, in number of `mp_limb_t's. + Set by mpf_init and modified by + mpf_set_prec. The area pointed to by the + _mp_d field contains `prec' + 1 limbs. */ + int _mp_size; /* abs(_mp_size) is the number of limbs the + last field points to. If _mp_size is + negative this is a negative number. */ + mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ + mp_limb_t *_mp_d; /* Pointer to the limbs. */ +} __mpf_struct; + +/* typedef __mpf_struct MP_FLOAT; */ +typedef __mpf_struct mpf_t[1]; + +/* Available random number generation algorithms. */ +typedef enum +{ + GMP_RAND_ALG_DEFAULT = 0, + GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ +} gmp_randalg_t; + +/* Random state struct. */ +typedef struct +{ + mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ + gmp_randalg_t _mp_alg; /* Currently unused. */ + union { + void *_mp_lc; /* Pointer to function pointers structure. */ + } _mp_algdata; +} __gmp_randstate_struct; +typedef __gmp_randstate_struct gmp_randstate_t[1]; + +/* Types for function declarations in gmp files. */ +/* ??? Should not pollute user name space with these ??? */ +typedef const __mpz_struct *mpz_srcptr; +typedef __mpz_struct *mpz_ptr; +typedef const __mpf_struct *mpf_srcptr; +typedef __mpf_struct *mpf_ptr; +typedef const __mpq_struct *mpq_srcptr; +typedef __mpq_struct *mpq_ptr; + + +/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common + section. */ +#if __GMP_LIBGMP_DLL +#ifdef __GMP_WITHIN_GMPXX +/* compiling to go into a DLL libgmpxx */ +#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT +#else +/* compiling to go into a application which will link to a DLL libgmpxx */ +#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT +#endif +#else +/* all other cases */ +#define __GMP_DECLSPEC_XX +#endif + + +#ifndef __MPN +#define __MPN(x) __gmpn_##x +#endif + +/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, + defines EOF but not FILE. */ +#if defined (FILE) \ + || defined (H_STDIO) \ + || defined (_H_STDIO) /* AIX */ \ + || defined (_STDIO_H) /* glibc, Sun, SCO */ \ + || defined (_STDIO_H_) /* BSD, OSF */ \ + || defined (__STDIO_H) /* Borland */ \ + || defined (__STDIO_H__) /* IRIX */ \ + || defined (_STDIO_INCLUDED) /* HPUX */ \ + || defined (__dj_include_stdio_h_) /* DJGPP */ \ + || defined (_FILE_DEFINED) /* Microsoft */ \ + || defined (__STDIO__) /* Apple MPW MrC */ \ + || defined (_MSL_STDIO_H) /* Metrowerks */ \ + || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ + || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ + || defined (__STDIO_LOADED) /* VMS */ +#define _GMP_H_HAVE_FILE 1 +#endif + +/* In ISO C, if a prototype involving "struct obstack *" is given without + that structure defined, then the struct is scoped down to just the + prototype, causing a conflict if it's subsequently defined for real. So + only give prototypes if we've got obstack.h. */ +#if defined (_OBSTACK_H) /* glibc */ +#define _GMP_H_HAVE_OBSTACK 1 +#endif + +/* The prototypes for gmp_vprintf etc are provided only if va_list is defined, + via an application having included . Usually va_list is a typedef + so can't be tested directly, but C99 specifies that va_start is a macro. + + will define some sort of va_list for vprintf and vfprintf, but + let's not bother trying to use that since it's not standard and since + application uses for gmp_vprintf etc will almost certainly require the + whole anyway. */ + +#ifdef va_start +#define _GMP_H_HAVE_VA_LIST 1 +#endif + +/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ +#if defined (__GNUC__) && defined (__GNUC_MINOR__) +#define __GMP_GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +#define __GMP_GNUC_PREREQ(maj, min) 0 +#endif + +/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically + it means a function does nothing but examine its arguments and memory + (global or via arguments) to generate a return value, but changes nothing + and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets + tune/common.c etc turn this off when trying to write timing loops. */ +#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) +#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +#define __GMP_ATTRIBUTE_PURE +#endif + + +/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean + to "g++ -Wold-style-cast". + + Casts in "extern inline" code within an extern "C" block don't induce + these warnings, so __GMP_CAST only needs to be used on documented + macros. */ + +#ifdef __cplusplus +#define __GMP_CAST(type, expr) (static_cast (expr)) +#else +#define __GMP_CAST(type, expr) ((type) (expr)) +#endif + + +/* An empty "throw ()" means the function doesn't throw any C++ exceptions, + this can save some stack frame info in applications. + + Currently it's given only on functions which never divide-by-zero etc, + don't allocate memory, and are expected to never need to allocate memory. + This leaves open the possibility of a C++ throw from a future GMP + exceptions scheme. + + mpz_set_ui etc are omitted to leave open the lazy allocation scheme + described in doc/tasks.html. mpz_get_d etc are omitted to leave open + exceptions for float overflows. + + Note that __GMP_NOTHROW must be given on any inlines the same as on their + prototypes (for g++ at least, where they're used together). Note also + that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like + __GMP_ATTRIBUTE_PURE. */ + +#if defined (__cplusplus) +#define __GMP_NOTHROW throw () +#else +#define __GMP_NOTHROW +#endif + + +/* PORTME: What other compilers have a useful "extern inline"? "static + inline" would be an acceptable substitute if the compiler (or linker) + discards unused statics. */ + + /* gcc has __inline__ in all modes, including strict ansi. Give a prototype + for an inline too, so as to correctly specify "dllimport" on windows, in + case the function is called rather than inlined. + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. */ +#ifdef __GNUC__ +#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ + || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) +#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) +#else +#define __GMP_EXTERN_INLINE extern __inline__ +#endif +#define __GMP_INLINE_PROTOTYPES 1 +#endif + +/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 + strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 + mode, which is the default), but an unnecessary local copy of foo is + emitted unless -O is used. "extern __inline" is accepted, but the + "extern" appears to be ignored, ie. it becomes a plain global function + but which is inlined within its file. Don't know if all old versions of + DEC C supported __inline, but as a start let's do the right thing for + current versions. */ +#ifdef __DECC +#define __GMP_EXTERN_INLINE static __inline +#endif + +/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict + ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes + place under -O. Without -O "foo" seems to be emitted whether it's used + or not, which is wasteful. "extern inline foo()" isn't useful, the + "extern" is apparently ignored, so foo is inlined if possible but also + emitted as a global, which causes multiple definition errors when + building a shared libgmp. */ +#ifdef __SCO_VERSION__ +#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ + && ! defined (__GMP_EXTERN_INLINE) +#define __GMP_EXTERN_INLINE static inline +#endif +#endif + +/* Microsoft's C compiler accepts __inline */ +#ifdef _MSC_VER +#define __GMP_EXTERN_INLINE __inline +#endif + +/* Recent enough Sun C compilers want "inline" */ +#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ + && ! defined (__GMP_EXTERN_INLINE) +#define __GMP_EXTERN_INLINE inline +#endif + +/* Somewhat older Sun C compilers want "static inline" */ +#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ + && ! defined (__GMP_EXTERN_INLINE) +#define __GMP_EXTERN_INLINE static inline +#endif + + +/* C++ always has "inline" and since it's a normal feature the linker should + discard duplicate non-inlined copies, or if it doesn't then that's a + problem for everyone, not just GMP. */ +#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) +#define __GMP_EXTERN_INLINE inline +#endif + +/* Don't do any inlining within a configure run, since if the compiler ends + up emitting copies of the code into the object file it can end up + demanding the various support routines (like mpn_popcount) for linking, + making the "alloca" test and perhaps others fail. And on hppa ia64 a + pre-release gcc 3.2 was seen not respecting the "extern" in "extern + __inline__", triggering this problem too. */ +#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE +#undef __GMP_EXTERN_INLINE +#endif + +/* By default, don't give a prototype when there's going to be an inline + version. Note in particular that Cray C++ objects to the combination of + prototype and inline. */ +#ifdef __GMP_EXTERN_INLINE +#ifndef __GMP_INLINE_PROTOTYPES +#define __GMP_INLINE_PROTOTYPES 0 +#endif +#else +#define __GMP_INLINE_PROTOTYPES 1 +#endif + + +#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) +#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) + +/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted + to int by "~". It still needs to have the promoted type. */ +#define __GMP_UINT_MAX (~ (unsigned) 0) +#define __GMP_ULONG_MAX (~ (unsigned long) 0) +#define __GMP_USHRT_MAX (0 + (unsigned short) ~0) + + +/* __builtin_expect is in gcc 3.0, and not in 2.95. */ +#if __GMP_GNUC_PREREQ (3,0) +#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) +#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) +#else +#define __GMP_LIKELY(cond) (cond) +#define __GMP_UNLIKELY(cond) (cond) +#endif + +#ifdef _CRAY +#define __GMP_CRAY_Pragma(str) _Pragma (str) +#else +#define __GMP_CRAY_Pragma(str) +#endif + + +/* Allow direct user access to numerator and denominator of a mpq_t object. */ +#define mpq_numref(Q) (&((Q)->_mp_num)) +#define mpq_denref(Q) (&((Q)->_mp_den)) + + +#if defined (__cplusplus) +extern "C" { +using std::FILE; +#endif + +#define mp_set_memory_functions __gmp_set_memory_functions +__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), + void *(*) (void *, size_t, size_t), + void (*) (void *, size_t)) __GMP_NOTHROW; + +#define mp_get_memory_functions __gmp_get_memory_functions +__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), + void *(**) (void *, size_t, size_t), + void (**) (void *, size_t)) __GMP_NOTHROW; + +#define mp_bits_per_limb __gmp_bits_per_limb +__GMP_DECLSPEC extern const int mp_bits_per_limb; + +#define gmp_errno __gmp_errno +__GMP_DECLSPEC extern int gmp_errno; + +#define gmp_version __gmp_version +__GMP_DECLSPEC extern const char * const gmp_version; + + +/**************** Random number routines. ****************/ + +/* obsolete */ +#define gmp_randinit __gmp_randinit +__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); + +#define gmp_randinit_default __gmp_randinit_default +__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); + +#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp +__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); + +#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size +__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); + +#define gmp_randinit_mt __gmp_randinit_mt +__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); + +#define gmp_randinit_set __gmp_randinit_set +__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); + +#define gmp_randseed __gmp_randseed +__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); + +#define gmp_randseed_ui __gmp_randseed_ui +__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); + +#define gmp_randclear __gmp_randclear +__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); + +#define gmp_urandomb_ui __gmp_urandomb_ui +__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); + +#define gmp_urandomm_ui __gmp_urandomm_ui +__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); + + +/**************** Formatted output routines. ****************/ + +#define gmp_asprintf __gmp_asprintf +__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); + +#define gmp_fprintf __gmp_fprintf +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); +#endif + +#define gmp_obstack_printf __gmp_obstack_printf +#if defined (_GMP_H_HAVE_OBSTACK) +__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); +#endif + +#define gmp_obstack_vprintf __gmp_obstack_vprintf +#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); +#endif + +#define gmp_printf __gmp_printf +__GMP_DECLSPEC int gmp_printf (const char *, ...); + +#define gmp_snprintf __gmp_snprintf +__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); + +#define gmp_sprintf __gmp_sprintf +__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); + +#define gmp_vasprintf __gmp_vasprintf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); +#endif + +#define gmp_vfprintf __gmp_vfprintf +#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); +#endif + +#define gmp_vprintf __gmp_vprintf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); +#endif + +#define gmp_vsnprintf __gmp_vsnprintf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); +#endif + +#define gmp_vsprintf __gmp_vsprintf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); +#endif + + +/**************** Formatted input routines. ****************/ + +#define gmp_fscanf __gmp_fscanf +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); +#endif + +#define gmp_scanf __gmp_scanf +__GMP_DECLSPEC int gmp_scanf (const char *, ...); + +#define gmp_sscanf __gmp_sscanf +__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); + +#define gmp_vfscanf __gmp_vfscanf +#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); +#endif + +#define gmp_vscanf __gmp_vscanf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); +#endif + +#define gmp_vsscanf __gmp_vsscanf +#if defined (_GMP_H_HAVE_VA_LIST) +__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); +#endif + + +/**************** Integer (i.e. Z) routines. ****************/ + +#define _mpz_realloc __gmpz_realloc +#define mpz_realloc __gmpz_realloc +__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); + +#define mpz_abs __gmpz_abs +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) +__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); +#endif + +#define mpz_add __gmpz_add +__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_add_ui __gmpz_add_ui +__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_addmul __gmpz_addmul +__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_addmul_ui __gmpz_addmul_ui +__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_and __gmpz_and +__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_array_init __gmpz_array_init +__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); + +#define mpz_bin_ui __gmpz_bin_ui +__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_bin_uiui __gmpz_bin_uiui +__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); + +#define mpz_cdiv_q __gmpz_cdiv_q +__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp +__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui +__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_cdiv_qr __gmpz_cdiv_qr +__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui +__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_cdiv_r __gmpz_cdiv_r +__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp +__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui +__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_cdiv_ui __gmpz_cdiv_ui +__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; + +#define mpz_clear __gmpz_clear +__GMP_DECLSPEC void mpz_clear (mpz_ptr); + +#define mpz_clears __gmpz_clears +__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); + +#define mpz_clrbit __gmpz_clrbit +__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); + +#define mpz_cmp __gmpz_cmp +__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_cmp_d __gmpz_cmp_d +__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; + +#define _mpz_cmp_si __gmpz_cmp_si +__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define _mpz_cmp_ui __gmpz_cmp_ui +__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_cmpabs __gmpz_cmpabs +__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_cmpabs_d __gmpz_cmpabs_d +__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; + +#define mpz_cmpabs_ui __gmpz_cmpabs_ui +__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_com __gmpz_com +__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); + +#define mpz_combit __gmpz_combit +__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); + +#define mpz_congruent_p __gmpz_congruent_p +__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p +__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_congruent_ui_p __gmpz_congruent_ui_p +__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; + +#define mpz_divexact __gmpz_divexact +__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_divexact_ui __gmpz_divexact_ui +__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); + +#define mpz_divisible_p __gmpz_divisible_p +__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_divisible_ui_p __gmpz_divisible_ui_p +__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; + +#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p +__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_dump __gmpz_dump +__GMP_DECLSPEC void mpz_dump (mpz_srcptr); + +#define mpz_export __gmpz_export +__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); + +#define mpz_fac_ui __gmpz_fac_ui +__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); + +#define mpz_2fac_ui __gmpz_2fac_ui +__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); + +#define mpz_mfac_uiui __gmpz_mfac_uiui +__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); + +#define mpz_primorial_ui __gmpz_primorial_ui +__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); + +#define mpz_fdiv_q __gmpz_fdiv_q +__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp +__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui +__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_fdiv_qr __gmpz_fdiv_qr +__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui +__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_fdiv_r __gmpz_fdiv_r +__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp +__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui +__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_fdiv_ui __gmpz_fdiv_ui +__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; + +#define mpz_fib_ui __gmpz_fib_ui +__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); + +#define mpz_fib2_ui __gmpz_fib2_ui +__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); + +#define mpz_fits_sint_p __gmpz_fits_sint_p +__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_fits_slong_p __gmpz_fits_slong_p +__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_fits_sshort_p __gmpz_fits_sshort_p +__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_fits_uint_p __gmpz_fits_uint_p +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) +__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_fits_ulong_p __gmpz_fits_ulong_p +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) +__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_fits_ushort_p __gmpz_fits_ushort_p +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) +__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_gcd __gmpz_gcd +__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_gcd_ui __gmpz_gcd_ui +__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_gcdext __gmpz_gcdext +__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_get_d __gmpz_get_d +__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_get_d_2exp __gmpz_get_d_2exp +__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); + +#define mpz_get_si __gmpz_get_si +__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_get_str __gmpz_get_str +__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); + +#define mpz_get_ui __gmpz_get_ui +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) +__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_getlimbn __gmpz_getlimbn +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) +__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_hamdist __gmpz_hamdist +__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_import __gmpz_import +__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); + +#define mpz_init __gmpz_init +__GMP_DECLSPEC void mpz_init (mpz_ptr); + +#define mpz_init2 __gmpz_init2 +__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); + +#define mpz_inits __gmpz_inits +__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); + +#define mpz_init_set __gmpz_init_set +__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); + +#define mpz_init_set_d __gmpz_init_set_d +__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); + +#define mpz_init_set_si __gmpz_init_set_si +__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); + +#define mpz_init_set_str __gmpz_init_set_str +__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); + +#define mpz_init_set_ui __gmpz_init_set_ui +__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); + +#define mpz_inp_raw __gmpz_inp_raw +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); +#endif + +#define mpz_inp_str __gmpz_inp_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); +#endif + +#define mpz_invert __gmpz_invert +__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_ior __gmpz_ior +__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_jacobi __gmpz_jacobi +__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_kronecker mpz_jacobi /* alias */ + +#define mpz_kronecker_si __gmpz_kronecker_si +__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; + +#define mpz_kronecker_ui __gmpz_kronecker_ui +__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; + +#define mpz_si_kronecker __gmpz_si_kronecker +__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_ui_kronecker __gmpz_ui_kronecker +__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_lcm __gmpz_lcm +__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_lcm_ui __gmpz_lcm_ui +__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); + +#define mpz_legendre mpz_jacobi /* alias */ + +#define mpz_lucnum_ui __gmpz_lucnum_ui +__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); + +#define mpz_lucnum2_ui __gmpz_lucnum2_ui +__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); + +#define mpz_millerrabin __gmpz_millerrabin +__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; + +#define mpz_mod __gmpz_mod +__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ + +#define mpz_mul __gmpz_mul +__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_mul_2exp __gmpz_mul_2exp +__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_mul_si __gmpz_mul_si +__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); + +#define mpz_mul_ui __gmpz_mul_ui +__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_neg __gmpz_neg +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) +__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); +#endif + +#define mpz_nextprime __gmpz_nextprime +__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); + +#define mpz_out_raw __gmpz_out_raw +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); +#endif + +#define mpz_out_str __gmpz_out_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); +#endif + +#define mpz_perfect_power_p __gmpz_perfect_power_p +__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpz_perfect_square_p __gmpz_perfect_square_p +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) +__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_popcount __gmpz_popcount +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) +__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_pow_ui __gmpz_pow_ui +__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_powm __gmpz_powm +__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); + +#define mpz_powm_sec __gmpz_powm_sec +__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); + +#define mpz_powm_ui __gmpz_powm_ui +__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); + +#define mpz_probab_prime_p __gmpz_probab_prime_p +__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; + +#define mpz_random __gmpz_random +__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); + +#define mpz_random2 __gmpz_random2 +__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); + +#define mpz_realloc2 __gmpz_realloc2 +__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); + +#define mpz_remove __gmpz_remove +__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_root __gmpz_root +__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_rootrem __gmpz_rootrem +__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_rrandomb __gmpz_rrandomb +__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); + +#define mpz_scan0 __gmpz_scan0 +__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_scan1 __gmpz_scan1 +__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_set __gmpz_set +__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); + +#define mpz_set_d __gmpz_set_d +__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); + +#define mpz_set_f __gmpz_set_f +__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); + +#define mpz_set_q __gmpz_set_q +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) +__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); +#endif + +#define mpz_set_si __gmpz_set_si +__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); + +#define mpz_set_str __gmpz_set_str +__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); + +#define mpz_set_ui __gmpz_set_ui +__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); + +#define mpz_setbit __gmpz_setbit +__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); + +#define mpz_size __gmpz_size +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) +__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpz_sizeinbase __gmpz_sizeinbase +__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_sqrt __gmpz_sqrt +__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); + +#define mpz_sqrtrem __gmpz_sqrtrem +__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); + +#define mpz_sub __gmpz_sub +__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_sub_ui __gmpz_sub_ui +__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_ui_sub __gmpz_ui_sub +__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); + +#define mpz_submul __gmpz_submul +__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_submul_ui __gmpz_submul_ui +__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_swap __gmpz_swap +__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; + +#define mpz_tdiv_ui __gmpz_tdiv_ui +__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; + +#define mpz_tdiv_q __gmpz_tdiv_q +__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp +__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui +__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_tdiv_qr __gmpz_tdiv_qr +__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui +__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_tdiv_r __gmpz_tdiv_r +__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp +__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); + +#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui +__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); + +#define mpz_tstbit __gmpz_tstbit +__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpz_ui_pow_ui __gmpz_ui_pow_ui +__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); + +#define mpz_urandomb __gmpz_urandomb +__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); + +#define mpz_urandomm __gmpz_urandomm +__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); + +#define mpz_xor __gmpz_xor +#define mpz_eor __gmpz_xor +__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); + +#define mpz_limbs_read __gmpz_limbs_read +__GMP_DECLSPEC mp_srcptr mpz_limbs_read (mpz_srcptr); + +#define mpz_limbs_write __gmpz_limbs_write +__GMP_DECLSPEC mp_ptr mpz_limbs_write (mpz_ptr, mp_size_t); + +#define mpz_limbs_modify __gmpz_limbs_modify +__GMP_DECLSPEC mp_ptr mpz_limbs_modify (mpz_ptr, mp_size_t); + +#define mpz_limbs_finish __gmpz_limbs_finish +__GMP_DECLSPEC void mpz_limbs_finish (mpz_ptr, mp_size_t); + +#define mpz_roinit_n __gmpz_roinit_n +__GMP_DECLSPEC mpz_srcptr mpz_roinit_n (mpz_ptr, mp_srcptr, mp_size_t); + +#define MPZ_ROINIT_N(xp, xs) {{0, (xs),(xp) }} + +/**************** Rational (i.e. Q) routines. ****************/ + +#define mpq_abs __gmpq_abs +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) +__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); +#endif + +#define mpq_add __gmpq_add +__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); + +#define mpq_canonicalize __gmpq_canonicalize +__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); + +#define mpq_clear __gmpq_clear +__GMP_DECLSPEC void mpq_clear (mpq_ptr); + +#define mpq_clears __gmpq_clears +__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); + +#define mpq_cmp __gmpq_cmp +__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; + +#define _mpq_cmp_si __gmpq_cmp_si +__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; + +#define _mpq_cmp_ui __gmpq_cmp_ui +__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; + +#define mpq_div __gmpq_div +__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); + +#define mpq_div_2exp __gmpq_div_2exp +__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); + +#define mpq_equal __gmpq_equal +__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpq_get_num __gmpq_get_num +__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); + +#define mpq_get_den __gmpq_get_den +__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); + +#define mpq_get_d __gmpq_get_d +__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpq_get_str __gmpq_get_str +__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); + +#define mpq_init __gmpq_init +__GMP_DECLSPEC void mpq_init (mpq_ptr); + +#define mpq_inits __gmpq_inits +__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); + +#define mpq_inp_str __gmpq_inp_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); +#endif + +#define mpq_inv __gmpq_inv +__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); + +#define mpq_mul __gmpq_mul +__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); + +#define mpq_mul_2exp __gmpq_mul_2exp +__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); + +#define mpq_neg __gmpq_neg +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) +__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); +#endif + +#define mpq_out_str __gmpq_out_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); +#endif + +#define mpq_set __gmpq_set +__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); + +#define mpq_set_d __gmpq_set_d +__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); + +#define mpq_set_den __gmpq_set_den +__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); + +#define mpq_set_f __gmpq_set_f +__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); + +#define mpq_set_num __gmpq_set_num +__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); + +#define mpq_set_si __gmpq_set_si +__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); + +#define mpq_set_str __gmpq_set_str +__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); + +#define mpq_set_ui __gmpq_set_ui +__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); + +#define mpq_set_z __gmpq_set_z +__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); + +#define mpq_sub __gmpq_sub +__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); + +#define mpq_swap __gmpq_swap +__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; + + +/**************** Float (i.e. F) routines. ****************/ + +#define mpf_abs __gmpf_abs +__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); + +#define mpf_add __gmpf_add +__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); + +#define mpf_add_ui __gmpf_add_ui +__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); +#define mpf_ceil __gmpf_ceil +__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); + +#define mpf_clear __gmpf_clear +__GMP_DECLSPEC void mpf_clear (mpf_ptr); + +#define mpf_clears __gmpf_clears +__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); + +#define mpf_cmp __gmpf_cmp +__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_cmp_d __gmpf_cmp_d +__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; + +#define mpf_cmp_si __gmpf_cmp_si +__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_cmp_ui __gmpf_cmp_ui +__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_div __gmpf_div +__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); + +#define mpf_div_2exp __gmpf_div_2exp +__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); + +#define mpf_div_ui __gmpf_div_ui +__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); + +#define mpf_dump __gmpf_dump +__GMP_DECLSPEC void mpf_dump (mpf_srcptr); + +#define mpf_eq __gmpf_eq +__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_sint_p __gmpf_fits_sint_p +__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_slong_p __gmpf_fits_slong_p +__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_sshort_p __gmpf_fits_sshort_p +__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_uint_p __gmpf_fits_uint_p +__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_ulong_p __gmpf_fits_ulong_p +__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_fits_ushort_p __gmpf_fits_ushort_p +__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_floor __gmpf_floor +__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); + +#define mpf_get_d __gmpf_get_d +__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; + +#define mpf_get_d_2exp __gmpf_get_d_2exp +__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); + +#define mpf_get_default_prec __gmpf_get_default_prec +__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_get_prec __gmpf_get_prec +__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_get_si __gmpf_get_si +__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_get_str __gmpf_get_str +__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); + +#define mpf_get_ui __gmpf_get_ui +__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_init __gmpf_init +__GMP_DECLSPEC void mpf_init (mpf_ptr); + +#define mpf_init2 __gmpf_init2 +__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); + +#define mpf_inits __gmpf_inits +__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); + +#define mpf_init_set __gmpf_init_set +__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); + +#define mpf_init_set_d __gmpf_init_set_d +__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); + +#define mpf_init_set_si __gmpf_init_set_si +__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); + +#define mpf_init_set_str __gmpf_init_set_str +__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); + +#define mpf_init_set_ui __gmpf_init_set_ui +__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); + +#define mpf_inp_str __gmpf_inp_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); +#endif + +#define mpf_integer_p __gmpf_integer_p +__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_mul __gmpf_mul +__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); + +#define mpf_mul_2exp __gmpf_mul_2exp +__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); + +#define mpf_mul_ui __gmpf_mul_ui +__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); + +#define mpf_neg __gmpf_neg +__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); + +#define mpf_out_str __gmpf_out_str +#ifdef _GMP_H_HAVE_FILE +__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); +#endif + +#define mpf_pow_ui __gmpf_pow_ui +__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); + +#define mpf_random2 __gmpf_random2 +__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); + +#define mpf_reldiff __gmpf_reldiff +__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); + +#define mpf_set __gmpf_set +__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); + +#define mpf_set_d __gmpf_set_d +__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); + +#define mpf_set_default_prec __gmpf_set_default_prec +__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; + +#define mpf_set_prec __gmpf_set_prec +__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); + +#define mpf_set_prec_raw __gmpf_set_prec_raw +__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; + +#define mpf_set_q __gmpf_set_q +__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); + +#define mpf_set_si __gmpf_set_si +__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); + +#define mpf_set_str __gmpf_set_str +__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); + +#define mpf_set_ui __gmpf_set_ui +__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); + +#define mpf_set_z __gmpf_set_z +__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); + +#define mpf_size __gmpf_size +__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpf_sqrt __gmpf_sqrt +__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); + +#define mpf_sqrt_ui __gmpf_sqrt_ui +__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); + +#define mpf_sub __gmpf_sub +__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); + +#define mpf_sub_ui __gmpf_sub_ui +__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); + +#define mpf_swap __gmpf_swap +__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; + +#define mpf_trunc __gmpf_trunc +__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); + +#define mpf_ui_div __gmpf_ui_div +__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); + +#define mpf_ui_sub __gmpf_ui_sub +__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); + +#define mpf_urandomb __gmpf_urandomb +__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); + + +/************ Low level positive-integer (i.e. N) routines. ************/ + +/* This is ugly, but we need to make user calls reach the prefixed function. */ + +#define mpn_add __MPN(add) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) +__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); +#endif + +#define mpn_add_1 __MPN(add_1) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) +__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; +#endif + +#define mpn_add_n __MPN(add_n) +__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); + +#define mpn_addmul_1 __MPN(addmul_1) +__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_cmp __MPN(cmp) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) +__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +#endif + +#define mpn_divexact_by3(dst,src,size) \ + mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) + +#define mpn_divexact_by3c __MPN(divexact_by3c) +__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_divmod_1(qp,np,nsize,dlimb) \ + mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) + +#define mpn_divrem __MPN(divrem) +__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); + +#define mpn_divrem_1 __MPN(divrem_1) +__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_divrem_2 __MPN(divrem_2) +__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); + +#define mpn_div_qr_1 __MPN(div_qr_1) +__GMP_DECLSPEC mp_limb_t mpn_div_qr_1 (mp_ptr, mp_limb_t *, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_div_qr_2 __MPN(div_qr_2) +__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); + +#define mpn_gcd __MPN(gcd) +__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); + +#define mpn_gcd_1 __MPN(gcd_1) +__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_gcdext_1 __MPN(gcdext_1) +__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); + +#define mpn_gcdext __MPN(gcdext) +__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); + +#define mpn_get_str __MPN(get_str) +__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); + +#define mpn_hamdist __MPN(hamdist) +__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpn_lshift __MPN(lshift) +__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); + +#define mpn_mod_1 __MPN(mod_1) +__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_mul __MPN(mul) +__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); + +#define mpn_mul_1 __MPN(mul_1) +__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_mul_n __MPN(mul_n) +__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); + +#define mpn_sqr __MPN(sqr) +__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); + +#define mpn_neg __MPN(neg) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) +__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); +#endif + +#define mpn_com __MPN(com) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) +__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); +#endif + +#define mpn_perfect_square_p __MPN(perfect_square_p) +__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_perfect_power_p __MPN(perfect_power_p) +__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_popcount __MPN(popcount) +__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; + +#define mpn_pow_1 __MPN(pow_1) +__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); + +/* undocumented now, but retained here for upward compatibility */ +#define mpn_preinv_mod_1 __MPN(preinv_mod_1) +__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_random __MPN(random) +__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); + +#define mpn_random2 __MPN(random2) +__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); + +#define mpn_rshift __MPN(rshift) +__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); + +#define mpn_scan0 __MPN(scan0) +__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_scan1 __MPN(scan1) +__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_set_str __MPN(set_str) +__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); + +#define mpn_sizeinbase __MPN(sizeinbase) +__GMP_DECLSPEC size_t mpn_sizeinbase (mp_srcptr, mp_size_t, int); + +#define mpn_sqrtrem __MPN(sqrtrem) +__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); + +#define mpn_sub __MPN(sub) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) +__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); +#endif + +#define mpn_sub_1 __MPN(sub_1) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) +__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; +#endif + +#define mpn_sub_n __MPN(sub_n) +__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); + +#define mpn_submul_1 __MPN(submul_1) +__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); + +#define mpn_tdiv_qr __MPN(tdiv_qr) +__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); + +#define mpn_and_n __MPN(and_n) +__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_andn_n __MPN(andn_n) +__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_nand_n __MPN(nand_n) +__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_ior_n __MPN(ior_n) +__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_iorn_n __MPN(iorn_n) +__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_nior_n __MPN(nior_n) +__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_xor_n __MPN(xor_n) +__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_xnor_n __MPN(xnor_n) +__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); + +#define mpn_copyi __MPN(copyi) +__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); +#define mpn_copyd __MPN(copyd) +__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); +#define mpn_zero __MPN(zero) +__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); + +#define mpn_cnd_add_n __MPN(cnd_add_n) +__GMP_DECLSPEC mp_limb_t mpn_cnd_add_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +#define mpn_cnd_sub_n __MPN(cnd_sub_n) +__GMP_DECLSPEC mp_limb_t mpn_cnd_sub_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); + +#define mpn_sec_add_1 __MPN(sec_add_1) +__GMP_DECLSPEC mp_limb_t mpn_sec_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); +#define mpn_sec_add_1_itch __MPN(sec_add_1_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_add_1_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_sub_1 __MPN(sec_sub_1) +__GMP_DECLSPEC mp_limb_t mpn_sec_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); +#define mpn_sec_sub_1_itch __MPN(sec_sub_1_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_sub_1_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_mul __MPN(sec_mul) +__GMP_DECLSPEC void mpn_sec_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); +#define mpn_sec_mul_itch __MPN(sec_mul_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_mul_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_sqr __MPN(sec_sqr) +__GMP_DECLSPEC void mpn_sec_sqr (mp_ptr, mp_srcptr, mp_size_t, mp_ptr); +#define mpn_sec_sqr_itch __MPN(sec_sqr_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_sqr_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_powm __MPN(sec_powm) +__GMP_DECLSPEC void mpn_sec_powm (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_bitcnt_t, mp_srcptr, mp_size_t, mp_ptr); +#define mpn_sec_powm_itch __MPN(sec_powm_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_powm_itch (mp_size_t, mp_bitcnt_t, mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_tabselect __MPN(sec_tabselect) +__GMP_DECLSPEC void mpn_sec_tabselect (volatile mp_limb_t *, volatile const mp_limb_t *, mp_size_t, mp_size_t, mp_size_t); + +#define mpn_sec_div_qr __MPN(sec_div_qr) +__GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); +#define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; +#define mpn_sec_div_r __MPN(sec_div_r) +__GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); +#define mpn_sec_div_r_itch __MPN(sec_div_r_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; + +#define mpn_sec_invert __MPN(sec_invert) +__GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); +#define mpn_sec_invert_itch __MPN(sec_invert_itch) +__GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; + + +/**************** mpz inlines ****************/ + +/* The following are provided as inlines where possible, but always exist as + library functions too, for binary compatibility. + + Within gmp itself this inlining generally isn't relied on, since it + doesn't get done for all compilers, whereas if something is worth + inlining then it's worth arranging always. + + There are two styles of inlining here. When the same bit of code is + wanted for the inline as for the library version, then __GMP_FORCE_foo + arranges for that code to be emitted and the __GMP_EXTERN_INLINE + directive suppressed, eg. mpz_fits_uint_p. When a different bit of code + is wanted for the inline than for the library version, then + __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ + +#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) +__GMP_EXTERN_INLINE void +mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) +{ + if (__gmp_w != __gmp_u) + mpz_set (__gmp_w, __gmp_u); + __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); +} +#endif + +#if GMP_NAIL_BITS == 0 +#define __GMPZ_FITS_UTYPE_P(z,maxval) \ + mp_size_t __gmp_n = z->_mp_size; \ + mp_ptr __gmp_p = z->_mp_d; \ + return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); +#else +#define __GMPZ_FITS_UTYPE_P(z,maxval) \ + mp_size_t __gmp_n = z->_mp_size; \ + mp_ptr __gmp_p = z->_mp_d; \ + return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ + || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) +#if ! defined (__GMP_FORCE_mpz_fits_uint_p) +__GMP_EXTERN_INLINE +#endif +int +mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW +{ + __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) +#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) +__GMP_EXTERN_INLINE +#endif +int +mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW +{ + __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) +#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) +__GMP_EXTERN_INLINE +#endif +int +mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW +{ + __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) +#if ! defined (__GMP_FORCE_mpz_get_ui) +__GMP_EXTERN_INLINE +#endif +unsigned long +mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW +{ + mp_ptr __gmp_p = __gmp_z->_mp_d; + mp_size_t __gmp_n = __gmp_z->_mp_size; + mp_limb_t __gmp_l = __gmp_p[0]; + /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings + about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland + C++ 6.0 warnings about condition always true for something like + "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ +#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) + /* limb==long and no nails, or limb==longlong, one limb is enough */ + return (__gmp_n != 0 ? __gmp_l : 0); +#else + /* limb==long and nails, need two limbs when available */ + __gmp_n = __GMP_ABS (__gmp_n); + if (__gmp_n <= 1) + return (__gmp_n != 0 ? __gmp_l : 0); + else + return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); +#endif +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) +#if ! defined (__GMP_FORCE_mpz_getlimbn) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW +{ + mp_limb_t __gmp_result = 0; + if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) + __gmp_result = __gmp_z->_mp_d[__gmp_n]; + return __gmp_result; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) +__GMP_EXTERN_INLINE void +mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) +{ + if (__gmp_w != __gmp_u) + mpz_set (__gmp_w, __gmp_u); + __gmp_w->_mp_size = - __gmp_w->_mp_size; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) +#if ! defined (__GMP_FORCE_mpz_perfect_square_p) +__GMP_EXTERN_INLINE +#endif +int +mpz_perfect_square_p (mpz_srcptr __gmp_a) +{ + mp_size_t __gmp_asize; + int __gmp_result; + + __gmp_asize = __gmp_a->_mp_size; + __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ + if (__GMP_LIKELY (__gmp_asize > 0)) + __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); + return __gmp_result; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) +#if ! defined (__GMP_FORCE_mpz_popcount) +__GMP_EXTERN_INLINE +#endif +mp_bitcnt_t +mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW +{ + mp_size_t __gmp_usize; + mp_bitcnt_t __gmp_result; + + __gmp_usize = __gmp_u->_mp_size; + __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); + if (__GMP_LIKELY (__gmp_usize > 0)) + __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); + return __gmp_result; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) +#if ! defined (__GMP_FORCE_mpz_set_q) +__GMP_EXTERN_INLINE +#endif +void +mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) +{ + mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) +#if ! defined (__GMP_FORCE_mpz_size) +__GMP_EXTERN_INLINE +#endif +size_t +mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW +{ + return __GMP_ABS (__gmp_z->_mp_size); +} +#endif + + +/**************** mpq inlines ****************/ + +#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) +__GMP_EXTERN_INLINE void +mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) +{ + if (__gmp_w != __gmp_u) + mpq_set (__gmp_w, __gmp_u); + __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); +} +#endif + +#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) +__GMP_EXTERN_INLINE void +mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) +{ + if (__gmp_w != __gmp_u) + mpq_set (__gmp_w, __gmp_u); + __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; +} +#endif + + +/**************** mpn inlines ****************/ + +/* The comments with __GMPN_ADD_1 below apply here too. + + The test for FUNCTION returning 0 should predict well. If it's assumed + {yp,ysize} will usually have a random number of bits then the high limb + won't be full and a carry out will occur a good deal less than 50% of the + time. + + ysize==0 isn't a documented feature, but is used internally in a few + places. + + Producing cout last stops it using up a register during the main part of + the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" + doesn't seem able to move the true and false legs of the conditional up + to the two places cout is generated. */ + +#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ + do { \ + mp_size_t __gmp_i; \ + mp_limb_t __gmp_x; \ + \ + /* ASSERT ((ysize) >= 0); */ \ + /* ASSERT ((xsize) >= (ysize)); */ \ + /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ + /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ + \ + __gmp_i = (ysize); \ + if (__gmp_i != 0) \ + { \ + if (FUNCTION (wp, xp, yp, __gmp_i)) \ + { \ + do \ + { \ + if (__gmp_i >= (xsize)) \ + { \ + (cout) = 1; \ + goto __gmp_done; \ + } \ + __gmp_x = (xp)[__gmp_i]; \ + } \ + while (TEST); \ + } \ + } \ + if ((wp) != (xp)) \ + __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ + (cout) = 0; \ + __gmp_done: \ + ; \ + } while (0) + +#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ + __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ + (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) +#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ + __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ + (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) + + +/* The use of __gmp_i indexing is designed to ensure a compile time src==dst + remains nice and clear to the compiler, so that __GMPN_COPY_REST can + disappear, and the load/add/store gets a chance to become a + read-modify-write on CISC CPUs. + + Alternatives: + + Using a pair of pointers instead of indexing would be possible, but gcc + isn't able to recognise compile-time src==dst in that case, even when the + pointers are incremented more or less together. Other compilers would + very likely have similar difficulty. + + gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or + similar to detect a compile-time src==dst. This works nicely on gcc + 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems + to be always false, for a pointer p. But the current code form seems + good enough for src==dst anyway. + + gcc on x86 as usual doesn't give particularly good flags handling for the + carry/borrow detection. It's tempting to want some multi instruction asm + blocks to help it, and this was tried, but in truth there's only a few + instructions to save and any gain is all too easily lost by register + juggling setting up for the asm. */ + +#if GMP_NAIL_BITS == 0 +#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ + do { \ + mp_size_t __gmp_i; \ + mp_limb_t __gmp_x, __gmp_r; \ + \ + /* ASSERT ((n) >= 1); */ \ + /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ + \ + __gmp_x = (src)[0]; \ + __gmp_r = __gmp_x OP (v); \ + (dst)[0] = __gmp_r; \ + if (CB (__gmp_r, __gmp_x, (v))) \ + { \ + (cout) = 1; \ + for (__gmp_i = 1; __gmp_i < (n);) \ + { \ + __gmp_x = (src)[__gmp_i]; \ + __gmp_r = __gmp_x OP 1; \ + (dst)[__gmp_i] = __gmp_r; \ + ++__gmp_i; \ + if (!CB (__gmp_r, __gmp_x, 1)) \ + { \ + if ((src) != (dst)) \ + __GMPN_COPY_REST (dst, src, n, __gmp_i); \ + (cout) = 0; \ + break; \ + } \ + } \ + } \ + else \ + { \ + if ((src) != (dst)) \ + __GMPN_COPY_REST (dst, src, n, 1); \ + (cout) = 0; \ + } \ + } while (0) +#endif + +#if GMP_NAIL_BITS >= 1 +#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ + do { \ + mp_size_t __gmp_i; \ + mp_limb_t __gmp_x, __gmp_r; \ + \ + /* ASSERT ((n) >= 1); */ \ + /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ + \ + __gmp_x = (src)[0]; \ + __gmp_r = __gmp_x OP (v); \ + (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ + if (__gmp_r >> GMP_NUMB_BITS != 0) \ + { \ + (cout) = 1; \ + for (__gmp_i = 1; __gmp_i < (n);) \ + { \ + __gmp_x = (src)[__gmp_i]; \ + __gmp_r = __gmp_x OP 1; \ + (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ + ++__gmp_i; \ + if (__gmp_r >> GMP_NUMB_BITS == 0) \ + { \ + if ((src) != (dst)) \ + __GMPN_COPY_REST (dst, src, n, __gmp_i); \ + (cout) = 0; \ + break; \ + } \ + } \ + } \ + else \ + { \ + if ((src) != (dst)) \ + __GMPN_COPY_REST (dst, src, n, 1); \ + (cout) = 0; \ + } \ + } while (0) +#endif + +#define __GMPN_ADDCB(r,x,y) ((r) < (y)) +#define __GMPN_SUBCB(r,x,y) ((x) < (y)) + +#define __GMPN_ADD_1(cout, dst, src, n, v) \ + __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) +#define __GMPN_SUB_1(cout, dst, src, n, v) \ + __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) + + +/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or + negative. size==0 is allowed. On random data usually only one limb will + need to be examined to get a result, so it's worth having it inline. */ +#define __GMPN_CMP(result, xp, yp, size) \ + do { \ + mp_size_t __gmp_i; \ + mp_limb_t __gmp_x, __gmp_y; \ + \ + /* ASSERT ((size) >= 0); */ \ + \ + (result) = 0; \ + __gmp_i = (size); \ + while (--__gmp_i >= 0) \ + { \ + __gmp_x = (xp)[__gmp_i]; \ + __gmp_y = (yp)[__gmp_i]; \ + if (__gmp_x != __gmp_y) \ + { \ + /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ + (result) = (__gmp_x > __gmp_y ? 1 : -1); \ + break; \ + } \ + } \ + } while (0) + + +#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) +#define __GMPN_COPY_REST(dst, src, size, start) \ + do { \ + /* ASSERT ((start) >= 0); */ \ + /* ASSERT ((start) <= (size)); */ \ + __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ + } while (0) +#endif + +/* Copy {src,size} to {dst,size}, starting at "start". This is designed to + keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, + __GMPN_ADD, etc. */ +#if ! defined (__GMPN_COPY_REST) +#define __GMPN_COPY_REST(dst, src, size, start) \ + do { \ + mp_size_t __gmp_j; \ + /* ASSERT ((size) >= 0); */ \ + /* ASSERT ((start) >= 0); */ \ + /* ASSERT ((start) <= (size)); */ \ + /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ + __GMP_CRAY_Pragma ("_CRI ivdep"); \ + for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ + (dst)[__gmp_j] = (src)[__gmp_j]; \ + } while (0) +#endif + +/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use + mpn_copyi if there's a native version, and if we don't mind demanding + binary compatibility for it (on targets which use it). */ + +#if ! defined (__GMPN_COPY) +#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) +#endif + + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) +#if ! defined (__GMP_FORCE_mpn_add) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) +{ + mp_limb_t __gmp_c; + __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); + return __gmp_c; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) +#if ! defined (__GMP_FORCE_mpn_add_1) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW +{ + mp_limb_t __gmp_c; + __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); + return __gmp_c; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) +#if ! defined (__GMP_FORCE_mpn_cmp) +__GMP_EXTERN_INLINE +#endif +int +mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW +{ + int __gmp_result; + __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); + return __gmp_result; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) +#if ! defined (__GMP_FORCE_mpn_sub) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) +{ + mp_limb_t __gmp_c; + __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); + return __gmp_c; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) +#if ! defined (__GMP_FORCE_mpn_sub_1) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW +{ + mp_limb_t __gmp_c; + __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); + return __gmp_c; +} +#endif + +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) +#if ! defined (__GMP_FORCE_mpn_neg) +__GMP_EXTERN_INLINE +#endif +mp_limb_t +mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) +{ + mp_limb_t __gmp_ul, __gmp_cy; + __gmp_cy = 0; + do { + __gmp_ul = *__gmp_up++; + *__gmp_rp++ = -__gmp_ul - __gmp_cy; + __gmp_cy |= __gmp_ul != 0; + } while (--__gmp_n != 0); + return __gmp_cy; +} +#endif + +#if defined (__cplusplus) +} +#endif + + +/* Allow faster testing for negative, zero, and positive. */ +#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) +#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) +#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) + +/* When using GCC, optimize certain common comparisons. */ +#if defined (__GNUC__) && __GNUC__ >= 2 +#define mpz_cmp_ui(Z,UI) \ + (__builtin_constant_p (UI) && (UI) == 0 \ + ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) +#define mpz_cmp_si(Z,SI) \ + (__builtin_constant_p ((SI) >= 0) && (SI) >= 0 \ + ? mpz_cmp_ui (Z, __GMP_CAST (unsigned long, SI)) \ + : _mpz_cmp_si (Z,SI)) +#define mpq_cmp_ui(Q,NUI,DUI) \ + (__builtin_constant_p (NUI) && (NUI) == 0 ? mpq_sgn (Q) \ + : __builtin_constant_p ((NUI) == (DUI)) && (NUI) == (DUI) \ + ? mpz_cmp (mpq_numref (Q), mpq_denref (Q)) \ + : _mpq_cmp_ui (Q,NUI,DUI)) +#define mpq_cmp_si(q,n,d) \ + (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ + ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ + : _mpq_cmp_si (q, n, d)) +#else +#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) +#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) +#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) +#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) +#endif + + +/* Using "&" rather than "&&" means these can come out branch-free. Every + mpz_t has at least one limb allocated, so fetching the low limb is always + allowed. */ +#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) +#define mpz_even_p(z) (! mpz_odd_p (z)) + + +/**************** C++ routines ****************/ + +#ifdef __cplusplus +__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); +__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); +__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); +__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); +__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); +__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); +#endif + + +/* Source-level compatibility with GMP 2 and earlier. */ +#define mpn_divmod(qp,np,nsize,dp,dsize) \ + mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) + +/* Source-level compatibility with GMP 1. */ +#define mpz_mdiv mpz_fdiv_q +#define mpz_mdivmod mpz_fdiv_qr +#define mpz_mmod mpz_fdiv_r +#define mpz_mdiv_ui mpz_fdiv_q_ui +#define mpz_mdivmod_ui(q,r,n,d) \ + (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) +#define mpz_mmod_ui(r,n,d) \ + (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) + +/* Useful synonyms, but not quite compatible with GMP 1. */ +#define mpz_div mpz_fdiv_q +#define mpz_divmod mpz_fdiv_qr +#define mpz_div_ui mpz_fdiv_q_ui +#define mpz_divmod_ui mpz_fdiv_qr_ui +#define mpz_div_2exp mpz_fdiv_q_2exp +#define mpz_mod_2exp mpz_fdiv_r_2exp + +enum +{ + GMP_ERROR_NONE = 0, + GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, + GMP_ERROR_DIVISION_BY_ZERO = 2, + GMP_ERROR_SQRT_OF_NEGATIVE = 4, + GMP_ERROR_INVALID_ARGUMENT = 8 +}; + +/* Define CC and CFLAGS which were used to build this version of GMP */ +#define __GMP_CC "i686-w64-mingw32-gcc -std=gnu99" +#define __GMP_CFLAGS "-m32 -O2 -pedantic -fomit-frame-pointer" + +/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ +#define __GNU_MP_VERSION 6 +#define __GNU_MP_VERSION_MINOR 0 +#define __GNU_MP_VERSION_PATCHLEVEL 0 +#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) + +#define __GMP_H__ +#endif /* __GMP_H__ */ diff --git a/include/reactos/libs/gnutls/gnutls/abstract.h b/include/reactos/libs/gnutls/gnutls/abstract.h new file mode 100644 index 00000000000..4f52bdd234e --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/abstract.h @@ -0,0 +1,454 @@ +/* + * Copyright (C) 2010-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef __GNUTLS_ABSTRACT_H +#define __GNUTLS_ABSTRACT_H + +#include +#include +#include +#include +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +/* Public key operations */ + +#define GNUTLS_PUBKEY_VERIFY_FLAG_TLS_RSA GNUTLS_PUBKEY_VERIFY_FLAG_TLS1_RSA +/** + * gnutls_pubkey_flags: + * @GNUTLS_PUBKEY_VERIFY_FLAG_TLS1_RSA: This indicates that a (raw) RSA signature is provided + * as in the TLS 1.0 protocol. + * @GNUTLS_PUBKEY_DISABLE_CALLBACKS: The following flag disables call to PIN callbacks. Only + * relevant to TPM keys. + * @GNUTLS_PUBKEY_GET_OPENPGP_FINGERPRINT: request an OPENPGP fingerprint instead of the default. + * + * Enumeration of different certificate import flags. + */ +typedef enum gnutls_pubkey_flags { + GNUTLS_PUBKEY_VERIFY_FLAG_TLS1_RSA = 1, + GNUTLS_PUBKEY_DISABLE_CALLBACKS = 1 << 2, + GNUTLS_PUBKEY_GET_OPENPGP_FINGERPRINT = 1 << 3, +} gnutls_pubkey_flags_t; + +typedef int (*gnutls_privkey_sign_func) (gnutls_privkey_t key, + void *userdata, + const gnutls_datum_t * + raw_data, + gnutls_datum_t * signature); +typedef int (*gnutls_privkey_decrypt_func) (gnutls_privkey_t key, + void *userdata, + const gnutls_datum_t * + ciphertext, + gnutls_datum_t * plaintext); + +typedef void (*gnutls_privkey_deinit_func) (gnutls_privkey_t key, + void *userdata); + +int gnutls_pubkey_init(gnutls_pubkey_t * key); +void gnutls_pubkey_deinit(gnutls_pubkey_t key); + +void gnutls_pubkey_set_pin_function(gnutls_pubkey_t key, + gnutls_pin_callback_t fn, + void *userdata); + +int gnutls_pubkey_get_pk_algorithm(gnutls_pubkey_t key, + unsigned int *bits); + +int gnutls_pubkey_import_x509(gnutls_pubkey_t key, + gnutls_x509_crt_t crt, unsigned int flags); +int gnutls_pubkey_import_x509_crq(gnutls_pubkey_t key, + gnutls_x509_crq_t crq, + unsigned int flags); +int gnutls_pubkey_import_pkcs11(gnutls_pubkey_t key, + gnutls_pkcs11_obj_t obj, + unsigned int flags); +int gnutls_pubkey_import_openpgp(gnutls_pubkey_t key, + gnutls_openpgp_crt_t crt, + unsigned int flags); + +int gnutls_pubkey_import_openpgp_raw(gnutls_pubkey_t pkey, + const gnutls_datum_t * data, + gnutls_openpgp_crt_fmt_t + format, + const gnutls_openpgp_keyid_t + keyid, unsigned int flags); +int gnutls_pubkey_import_x509_raw(gnutls_pubkey_t pkey, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); + +int +gnutls_pubkey_import_privkey(gnutls_pubkey_t key, + gnutls_privkey_t pkey, + unsigned int usage, unsigned int flags); + +int +gnutls_pubkey_import_tpm_url(gnutls_pubkey_t pkey, + const char *url, + const char *srk_password, unsigned int flags); + +int +gnutls_pubkey_import_url(gnutls_pubkey_t key, const char *url, + unsigned int flags); + +int +gnutls_pubkey_import_tpm_raw(gnutls_pubkey_t pkey, + const gnutls_datum_t * fdata, + gnutls_tpmkey_fmt_t format, + const char *srk_password, unsigned int flags); + +int gnutls_pubkey_get_preferred_hash_algorithm(gnutls_pubkey_t key, + gnutls_digest_algorithm_t + * hash, unsigned int *mand); + +int gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key, + gnutls_datum_t * m, gnutls_datum_t * e); +int gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, gnutls_datum_t * y); +int gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key, + gnutls_ecc_curve_t * curve, + gnutls_datum_t * x, gnutls_datum_t * y); +int gnutls_pubkey_get_pk_ecc_x962(gnutls_pubkey_t key, + gnutls_datum_t * parameters, + gnutls_datum_t * ecpoint); + +int gnutls_pubkey_export(gnutls_pubkey_t key, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); + +int gnutls_pubkey_export2(gnutls_pubkey_t key, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +int gnutls_pubkey_get_key_id(gnutls_pubkey_t key, + unsigned int flags, + unsigned char *output_data, + size_t * output_data_size); + +int +gnutls_pubkey_get_openpgp_key_id(gnutls_pubkey_t key, + unsigned int flags, + unsigned char *output_data, + size_t * output_data_size, + unsigned int *subkey); + +int gnutls_pubkey_get_key_usage(gnutls_pubkey_t key, unsigned int *usage); +int gnutls_pubkey_set_key_usage(gnutls_pubkey_t key, unsigned int usage); + +int gnutls_pubkey_import(gnutls_pubkey_t key, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); + + +int gnutls_pubkey_import_pkcs11_url(gnutls_pubkey_t key, + const char *url, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ + ); +int gnutls_pubkey_import_dsa_raw(gnutls_pubkey_t key, + const gnutls_datum_t * p, + const gnutls_datum_t * q, + const gnutls_datum_t * g, + const gnutls_datum_t * y); +int gnutls_pubkey_import_rsa_raw(gnutls_pubkey_t key, + const gnutls_datum_t * m, + const gnutls_datum_t * e); + +int +gnutls_pubkey_import_ecc_x962(gnutls_pubkey_t key, + const gnutls_datum_t * parameters, + const gnutls_datum_t * ecpoint); + +int +gnutls_pubkey_import_ecc_raw(gnutls_pubkey_t key, + gnutls_ecc_curve_t curve, + const gnutls_datum_t * x, + const gnutls_datum_t * y); + +int +gnutls_pubkey_encrypt_data(gnutls_pubkey_t key, + unsigned int flags, + const gnutls_datum_t * plaintext, + gnutls_datum_t * ciphertext); + +int gnutls_x509_crt_set_pubkey(gnutls_x509_crt_t crt, gnutls_pubkey_t key); + +int gnutls_x509_crq_set_pubkey(gnutls_x509_crq_t crq, gnutls_pubkey_t key); + +int +gnutls_pubkey_verify_hash2(gnutls_pubkey_t key, + gnutls_sign_algorithm_t algo, + unsigned int flags, + const gnutls_datum_t * hash, + const gnutls_datum_t * signature); + +int +gnutls_pubkey_get_verify_algorithm(gnutls_pubkey_t key, + const gnutls_datum_t * + signature, + gnutls_digest_algorithm_t * hash); + +int +gnutls_pubkey_verify_data2(gnutls_pubkey_t pubkey, + gnutls_sign_algorithm_t algo, + unsigned int flags, + const gnutls_datum_t * data, + const gnutls_datum_t * signature); + +/* Private key operations */ + +int gnutls_privkey_init(gnutls_privkey_t * key); +void gnutls_privkey_deinit(gnutls_privkey_t key); + +void gnutls_privkey_set_pin_function(gnutls_privkey_t key, + gnutls_pin_callback_t fn, + void *userdata); + +int gnutls_privkey_get_pk_algorithm(gnutls_privkey_t key, + unsigned int *bits); +gnutls_privkey_type_t gnutls_privkey_get_type(gnutls_privkey_t key); +int gnutls_privkey_status(gnutls_privkey_t key); + +/** + * gnutls_privkey_flags: + * @GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA: Make an RSA signature on the hashed data as in the TLS protocol. + * @GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE: When importing a private key, automatically + * release it when the structure it was imported is released. + * @GNUTLS_PRIVKEY_IMPORT_COPY: Copy required values during import. + * @GNUTLS_PRIVKEY_DISABLE_CALLBACKS: The following flag disables call to PIN callbacks etc. + * Only relevant to TPM keys. + * + * Enumeration of different certificate import flags. + */ +typedef enum gnutls_privkey_flags { + GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE = 1, + GNUTLS_PRIVKEY_IMPORT_COPY = 1 << 1, + GNUTLS_PRIVKEY_DISABLE_CALLBACKS = 1 << 2, + GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA = 1 << 4, +} gnutls_privkey_flags_t; + +int gnutls_privkey_import_pkcs11(gnutls_privkey_t pkey, + gnutls_pkcs11_privkey_t key, + unsigned int flags); +int gnutls_privkey_import_x509(gnutls_privkey_t pkey, + gnutls_x509_privkey_t key, + unsigned int flags); +int gnutls_privkey_import_openpgp(gnutls_privkey_t pkey, + gnutls_openpgp_privkey_t key, + unsigned int flags); + +int gnutls_privkey_import_openpgp_raw(gnutls_privkey_t pkey, + const gnutls_datum_t * data, + gnutls_openpgp_crt_fmt_t + format, + const gnutls_openpgp_keyid_t + keyid, const char *password); + +int gnutls_privkey_import_x509_raw(gnutls_privkey_t pkey, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + const char *password, + unsigned int flags); + +int +gnutls_privkey_import_tpm_raw(gnutls_privkey_t pkey, + const gnutls_datum_t * fdata, + gnutls_tpmkey_fmt_t format, + const char *srk_password, + const char *key_password, + unsigned int flags); + +int +gnutls_privkey_import_tpm_url(gnutls_privkey_t pkey, + const char *url, + const char *srk_password, + const char *key_password, + unsigned int flags); + +int gnutls_privkey_import_url(gnutls_privkey_t key, + const char *url, unsigned int flags); + +int gnutls_privkey_import_pkcs11_url(gnutls_privkey_t key, + const char *url); + +int +gnutls_privkey_import_ext(gnutls_privkey_t pkey, + gnutls_pk_algorithm_t pk, + void *userdata, + gnutls_privkey_sign_func sign_func, + gnutls_privkey_decrypt_func + decrypt_func, unsigned int flags); + +int +gnutls_privkey_import_ext2(gnutls_privkey_t pkey, + gnutls_pk_algorithm_t pk, + void *userdata, + gnutls_privkey_sign_func sign_func, + gnutls_privkey_decrypt_func + decrypt_func, + gnutls_privkey_deinit_func deinit_func, + unsigned int flags); + +int gnutls_privkey_sign_data(gnutls_privkey_t signer, + gnutls_digest_algorithm_t hash, + unsigned int flags, + const gnutls_datum_t * data, + gnutls_datum_t * signature); + +int gnutls_privkey_sign_hash(gnutls_privkey_t signer, + gnutls_digest_algorithm_t hash_algo, + unsigned int flags, + const gnutls_datum_t * hash_data, + gnutls_datum_t * signature); + + +int gnutls_privkey_decrypt_data(gnutls_privkey_t key, + unsigned int flags, + const gnutls_datum_t * ciphertext, + gnutls_datum_t * plaintext); + +int gnutls_x509_crt_privkey_sign(gnutls_x509_crt_t crt, + gnutls_x509_crt_t issuer, + gnutls_privkey_t issuer_key, + gnutls_digest_algorithm_t dig, + unsigned int flags); + +int gnutls_x509_crl_privkey_sign(gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer, + gnutls_privkey_t issuer_key, + gnutls_digest_algorithm_t dig, + unsigned int flags); + +int gnutls_x509_crq_privkey_sign(gnutls_x509_crq_t crq, + gnutls_privkey_t key, + gnutls_digest_algorithm_t dig, + unsigned int flags); + +/** + * gnutls_pcert_st: + * @pubkey: public key of parsed certificate. + * @cert: certificate itself of parsed certificate + * @type: type of certificate, a #gnutls_certificate_type_t type. + * + * A parsed certificate. + */ +typedef struct gnutls_pcert_st { + gnutls_pubkey_t pubkey; + gnutls_datum_t cert; + gnutls_certificate_type_t type; +} gnutls_pcert_st; + +/* Do not initialize the "cert" element of + * the certificate */ +#define GNUTLS_PCERT_NO_CERT 1 + +int gnutls_pcert_import_x509(gnutls_pcert_st * pcert, + gnutls_x509_crt_t crt, unsigned int flags); + +int +gnutls_pcert_list_import_x509_raw(gnutls_pcert_st * pcerts, + unsigned int *pcert_max, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); + +int gnutls_pcert_import_x509_raw(gnutls_pcert_st * pcert, + const gnutls_datum_t * cert, + gnutls_x509_crt_fmt_t format, + unsigned int flags); + +int gnutls_pcert_import_openpgp_raw(gnutls_pcert_st * pcert, + const gnutls_datum_t * cert, + gnutls_openpgp_crt_fmt_t + format, + gnutls_openpgp_keyid_t keyid, + unsigned int flags); + +int gnutls_pcert_import_openpgp(gnutls_pcert_st * pcert, + gnutls_openpgp_crt_t crt, + unsigned int flags); + +void gnutls_pcert_deinit(gnutls_pcert_st * pcert); + +/* For certificate credentials */ + /* This is the same as gnutls_certificate_retrieve_function() + * but retrieves a gnutls_pcert_st which requires much less processing + * within the library. + */ +typedef int gnutls_certificate_retrieve_function2(gnutls_session_t, + const + gnutls_datum_t * + req_ca_rdn, + int nreqs, const + gnutls_pk_algorithm_t + * pk_algos, + int + pk_algos_length, + gnutls_pcert_st + **, unsigned int + *pcert_length, + gnutls_privkey_t + * privkey); + + +void gnutls_certificate_set_retrieve_function2 + (gnutls_certificate_credentials_t cred, + gnutls_certificate_retrieve_function2 * func); + +int +gnutls_certificate_set_key(gnutls_certificate_credentials_t res, + const char **names, + int names_size, + gnutls_pcert_st * pcert_list, + int pcert_list_size, gnutls_privkey_t key); + +#include + +int gnutls_pubkey_verify_data(gnutls_pubkey_t pubkey, + unsigned int flags, + const gnutls_datum_t * data, + const gnutls_datum_t * + signature) _GNUTLS_GCC_ATTR_DEPRECATED; + +int gnutls_pubkey_verify_hash(gnutls_pubkey_t key, + unsigned int flags, + const gnutls_datum_t * hash, + const gnutls_datum_t * + signature) _GNUTLS_GCC_ATTR_DEPRECATED; + +int +gnutls_pubkey_print(gnutls_pubkey_t pubkey, + gnutls_certificate_print_formats_t format, + gnutls_datum_t * out); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif diff --git a/include/reactos/libs/gnutls/gnutls/compat.h b/include/reactos/libs/gnutls/gnutls/compat.h new file mode 100644 index 00000000000..7fa7a914404 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/compat.h @@ -0,0 +1,401 @@ +/* + * Copyright (C) 2008-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* Typedefs for more compatibility with older GnuTLS. */ + +#ifndef _GNUTLS_COMPAT_H +#define _GNUTLS_COMPAT_H + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#ifdef __GNUC__ + +#define _GNUTLS_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) + +#if !defined GNUTLS_INTERNAL_BUILD +#if _GNUTLS_GCC_VERSION >= 30100 +#define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) +#endif +#endif + +#endif /* __GNUC__ */ + +#ifndef _GNUTLS_GCC_ATTR_DEPRECATED +#define _GNUTLS_GCC_ATTR_DEPRECATED +#endif + +/* gnutls_connection_end_t was made redundant in 2.99.0 */ +typedef unsigned int gnutls_connection_end_t _GNUTLS_GCC_ATTR_DEPRECATED; + +/* Stuff deprected in 2.x */ +typedef gnutls_cipher_algorithm_t gnutls_cipher_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_kx_algorithm_t gnutls_kx_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_mac_algorithm_t gnutls_mac_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_digest_algorithm_t gnutls_digest_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_compression_method_t gnutls_compression_method + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_connection_end_t gnutls_connection_end + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_crt_fmt_t gnutls_x509_crt_fmt + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_pk_algorithm_t gnutls_pk_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_sign_algorithm_t gnutls_sign_algorithm + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_close_request_t gnutls_close_request + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_certificate_request_t gnutls_certificate_request + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_certificate_status_t gnutls_certificate_status + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_session_t gnutls_session _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_alert_level_t gnutls_alert_level + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_alert_description_t gnutls_alert_description + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_subject_alt_name_t gnutls_x509_subject_alt_name + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_openpgp_privkey_t gnutls_openpgp_privkey + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_openpgp_keyring_t gnutls_openpgp_keyring + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_crt_t gnutls_x509_crt _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_privkey_t gnutls_x509_privkey + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_crl_t gnutls_x509_crl _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_x509_crq_t gnutls_x509_crq _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_certificate_credentials_t + gnutls_certificate_credentials _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_anon_server_credentials_t + gnutls_anon_server_credentials _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_anon_client_credentials_t + gnutls_anon_client_credentials _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_srp_client_credentials_t + gnutls_srp_client_credentials _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_srp_server_credentials_t + gnutls_srp_server_credentials _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_dh_params_t gnutls_dh_params _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_rsa_params_t gnutls_rsa_params _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_params_type_t gnutls_params_type + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_credentials_type_t gnutls_credentials_type + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_certificate_type_t gnutls_certificate_type + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_datum_t gnutls_datum _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_transport_ptr_t gnutls_transport_ptr + _GNUTLS_GCC_ATTR_DEPRECATED; + +/* Old SRP alerts removed in 2.1.x because the TLS-SRP RFC was + modified to use the PSK alert. */ +#define GNUTLS_A_MISSING_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY +#define GNUTLS_A_UNKNOWN_SRP_USERNAME GNUTLS_A_UNKNOWN_PSK_IDENTITY + +/* OpenPGP stuff renamed in 2.1.x. */ +#define GNUTLS_OPENPGP_KEY GNUTLS_OPENPGP_CERT +#define GNUTLS_OPENPGP_KEY_FINGERPRINT GNUTLS_OPENPGP_CERT_FINGERPRINT +#define gnutls_openpgp_send_key gnutls_openpgp_send_cert +typedef gnutls_openpgp_crt_status_t gnutls_openpgp_key_status_t + _GNUTLS_GCC_ATTR_DEPRECATED; +typedef gnutls_openpgp_crt_t gnutls_openpgp_key_t + _GNUTLS_GCC_ATTR_DEPRECATED; +#define gnutls_openpgp_key_init gnutls_openpgp_crt_init +#define gnutls_openpgp_key_deinit gnutls_openpgp_crt_deinit +#define gnutls_openpgp_key_import gnutls_openpgp_crt_import +#define gnutls_openpgp_key_export gnutls_openpgp_crt_export +#define gnutls_openpgp_key_get_key_usage gnutls_openpgp_crt_get_key_usage +#define gnutls_openpgp_key_get_fingerprint gnutls_openpgp_crt_get_fingerprint +#define gnutls_openpgp_key_get_pk_algorithm gnutls_openpgp_crt_get_pk_algorithm +#define gnutls_openpgp_key_get_name gnutls_openpgp_crt_get_name +#define gnutls_openpgp_key_get_version gnutls_openpgp_crt_get_version +#define gnutls_openpgp_key_get_creation_time gnutls_openpgp_crt_get_creation_time +#define gnutls_openpgp_key_get_expiration_time gnutls_openpgp_crt_get_expiration_time +#define gnutls_openpgp_key_get_id gnutls_openpgp_crt_get_id +#define gnutls_openpgp_key_check_hostname gnutls_openpgp_crt_check_hostname + +/* OpenPGP stuff renamed in 2.3.x. */ +#define gnutls_openpgp_crt_get_id gnutls_openpgp_crt_get_key_id + +/* New better names renamed in 2.3.x, add these for backwards + compatibility with old poor names.*/ +#define GNUTLS_X509_CRT_FULL GNUTLS_CRT_PRINT_FULL +#define GNUTLS_X509_CRT_ONELINE GNUTLS_CRT_PRINT_ONELINE +#define GNUTLS_X509_CRT_UNSIGNED_FULL GNUTLS_CRT_PRINT_UNSIGNED_FULL + +/* Namespace problems. */ +#define LIBGNUTLS_VERSION GNUTLS_VERSION +#define LIBGNUTLS_VERSION_MAJOR GNUTLS_VERSION_MAJOR +#define LIBGNUTLS_VERSION_MINOR GNUTLS_VERSION_MINOR +#define LIBGNUTLS_VERSION_PATCH GNUTLS_VERSION_PATCH +#define LIBGNUTLS_VERSION_NUMBER GNUTLS_VERSION_NUMBER +#define LIBGNUTLS_EXTRA_VERSION GNUTLS_VERSION + +/* The gnutls_retr_st was deprecated by gnutls_certificate_retrieve_function() + * and gnutls_retr2_st. + */ +typedef struct gnutls_retr_st { + gnutls_certificate_type_t type; + union { + gnutls_x509_crt_t *x509; + gnutls_openpgp_crt_t pgp; + } cert; + unsigned int ncerts; /* one for pgp keys */ + + union { + gnutls_x509_privkey_t x509; + gnutls_openpgp_privkey_t pgp; + } key; + + unsigned int deinit_all; /* if non zero all keys will be deinited */ +} gnutls_retr_st; + +typedef int +gnutls_certificate_client_retrieve_function(gnutls_session_t, + const + gnutls_datum_t * + req_ca_rdn, + int nreqs, const + gnutls_pk_algorithm_t + * pk_algos, int + pk_algos_length, + gnutls_retr_st *); +typedef int +gnutls_certificate_server_retrieve_function(gnutls_session_t, + gnutls_retr_st *); + +void gnutls_certificate_client_set_retrieve_function + (gnutls_certificate_credentials_t cred, + gnutls_certificate_client_retrieve_function * + func) _GNUTLS_GCC_ATTR_DEPRECATED; +void + gnutls_certificate_server_set_retrieve_function + (gnutls_certificate_credentials_t cred, + gnutls_certificate_server_retrieve_function * + func) _GNUTLS_GCC_ATTR_DEPRECATED; + + /* External signing callback. No longer supported because it + * was deprecated by the PKCS #11 API or gnutls_privkey_import_ext. */ +typedef int (*gnutls_sign_func) (gnutls_session_t session, + void *userdata, + gnutls_certificate_type_t + cert_type, + const gnutls_datum_t * cert, + const gnutls_datum_t * hash, + gnutls_datum_t * signature); + +void +gnutls_sign_callback_set(gnutls_session_t session, + gnutls_sign_func sign_func, + void *userdata) _GNUTLS_GCC_ATTR_DEPRECATED; +gnutls_sign_func +gnutls_sign_callback_get(gnutls_session_t session, + void **userdata) _GNUTLS_GCC_ATTR_DEPRECATED; + +/* This is a very dangerous and error-prone function. + * Use gnutls_privkey_sign_hash() instead. + */ +int gnutls_x509_privkey_sign_hash(gnutls_x509_privkey_t key, + const gnutls_datum_t * hash, + gnutls_datum_t * signature) + _GNUTLS_GCC_ATTR_DEPRECATED; + +int gnutls_openpgp_privkey_sign_hash(gnutls_openpgp_privkey_t key, + const gnutls_datum_t * hash, + gnutls_datum_t * signature) + _GNUTLS_GCC_ATTR_DEPRECATED; + +/* we support the gnutls_privkey_sign_data() instead. + */ +int gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t key, + gnutls_digest_algorithm_t digest, + unsigned int flags, + const gnutls_datum_t * data, + void *signature, + size_t * signature_size) + _GNUTLS_GCC_ATTR_DEPRECATED; + + /* gnutls_pubkey_verify_data() */ +int gnutls_x509_crt_verify_data(gnutls_x509_crt_t crt, + unsigned int flags, + const gnutls_datum_t * data, + const gnutls_datum_t * signature) + _GNUTLS_GCC_ATTR_DEPRECATED; + + + /* gnutls_pubkey_verify_hash() */ +int gnutls_x509_crt_verify_hash(gnutls_x509_crt_t crt, + unsigned int flags, + const gnutls_datum_t * hash, + const gnutls_datum_t * signature) + _GNUTLS_GCC_ATTR_DEPRECATED; + + /* gnutls_pubkey_get_verify_algorithm() */ +int gnutls_x509_crt_get_verify_algorithm(gnutls_x509_crt_t crt, + const gnutls_datum_t * + signature, + gnutls_digest_algorithm_t + * hash) + _GNUTLS_GCC_ATTR_DEPRECATED; + + /* gnutls_pubkey_get_preferred_hash_algorithm() */ +int gnutls_x509_crt_get_preferred_hash_algorithm(gnutls_x509_crt_t + crt, + gnutls_digest_algorithm_t + * hash, unsigned int + *mand) + _GNUTLS_GCC_ATTR_DEPRECATED; + + /* gnutls_x509_crq_privkey_sign() */ +int gnutls_x509_crq_sign(gnutls_x509_crq_t crq, + gnutls_x509_privkey_t key) + _GNUTLS_GCC_ATTR_DEPRECATED; + + + + /* gnutls_x509_crl_privkey_sign */ +int gnutls_x509_crl_sign(gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key) + _GNUTLS_GCC_ATTR_DEPRECATED; + + /* functions to set priority of cipher suites + */ +int gnutls_cipher_set_priority(gnutls_session_t session, + const int *list) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_mac_set_priority(gnutls_session_t session, + const int *list) _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_compression_set_priority(gnutls_session_t session, + const int *list) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_kx_set_priority(gnutls_session_t session, + const int *list) _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_protocol_set_priority(gnutls_session_t session, + const int *list) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_certificate_type_set_priority(gnutls_session_t session, + const int *list) + _GNUTLS_GCC_ATTR_DEPRECATED; + +/* RSA params + */ +int gnutls_rsa_params_init(gnutls_rsa_params_t * + rsa_params) _GNUTLS_GCC_ATTR_DEPRECATED; +void gnutls_rsa_params_deinit(gnutls_rsa_params_t rsa_params) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_params_cpy(gnutls_rsa_params_t dst, + gnutls_rsa_params_t src) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_params_import_raw(gnutls_rsa_params_t rsa_params, + const gnutls_datum_t * m, + const gnutls_datum_t * e, + const gnutls_datum_t * d, + const gnutls_datum_t * p, + const gnutls_datum_t * q, + const gnutls_datum_t * u); +int gnutls_rsa_params_generate2(gnutls_rsa_params_t params, + unsigned int bits) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_params_export_raw(gnutls_rsa_params_t rsa, + gnutls_datum_t * m, + gnutls_datum_t * e, + gnutls_datum_t * d, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * u, + unsigned int *bits) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_params_export_pkcs1(gnutls_rsa_params_t params, + gnutls_x509_crt_fmt_t format, + unsigned char *params_data, + size_t * + params_data_size) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_params_import_pkcs1(gnutls_rsa_params_t params, + const gnutls_datum_t * + pkcs1_params, + gnutls_x509_crt_fmt_t format) + _GNUTLS_GCC_ATTR_DEPRECATED; + +int gnutls_rsa_export_get_pubkey(gnutls_session_t session, + gnutls_datum_t * exponent, + gnutls_datum_t * + modulus) _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_rsa_export_get_modulus_bits(gnutls_session_t session) + _GNUTLS_GCC_ATTR_DEPRECATED; +int gnutls_set_default_export_priority(gnutls_session_t session) + _GNUTLS_GCC_ATTR_DEPRECATED; + +void gnutls_certificate_set_rsa_export_params + (gnutls_certificate_credentials_t res, + gnutls_rsa_params_t rsa_params) _GNUTLS_GCC_ATTR_DEPRECATED; + + /* use gnutls_privkey_sign_hash() with the GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA flag */ +int gnutls_privkey_sign_raw_data(gnutls_privkey_t key, + unsigned flags, + const gnutls_datum_t * data, + gnutls_datum_t * + signature) _GNUTLS_GCC_ATTR_DEPRECATED; + +#ifdef _ISOC99_SOURCE +/* we provide older functions for compatibility as inline functions that + * depend on gnutls_session_get_random. */ + +static inline const void +*gnutls_session_get_server_random(gnutls_session_t session) + _GNUTLS_GCC_ATTR_DEPRECATED; +static inline const void +*gnutls_session_get_server_random(gnutls_session_t session) +{ + gnutls_datum_t rnd; + gnutls_session_get_random(session, NULL, &rnd); /*doc-skip */ + return rnd.data; +} + +static inline const void +*gnutls_session_get_client_random(gnutls_session_t session) + _GNUTLS_GCC_ATTR_DEPRECATED; +static inline const void +*gnutls_session_get_client_random(gnutls_session_t session) +{ + gnutls_datum_t rnd; + gnutls_session_get_random(session, &rnd, NULL); /*doc-skip */ + return rnd.data; +} +#endif + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* _GNUTLS_COMPAT_H */ diff --git a/include/reactos/libs/gnutls/gnutls/crypto.h b/include/reactos/libs/gnutls/gnutls/crypto.h new file mode 100644 index 00000000000..bb589df5c5e --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/crypto.h @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2008-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef GNUTLS_CRYPTO_H +#define GNUTLS_CRYPTO_H + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +typedef struct api_cipher_hd_st *gnutls_cipher_hd_t; + +int gnutls_cipher_init(gnutls_cipher_hd_t * handle, + gnutls_cipher_algorithm_t cipher, + const gnutls_datum_t * key, + const gnutls_datum_t * iv); +int gnutls_cipher_encrypt(const gnutls_cipher_hd_t handle, + void *text, size_t textlen); +int gnutls_cipher_decrypt(const gnutls_cipher_hd_t handle, + void *ciphertext, size_t ciphertextlen); +int gnutls_cipher_decrypt2(gnutls_cipher_hd_t handle, + const void *ciphertext, + size_t ciphertextlen, void *text, + size_t textlen); +int gnutls_cipher_encrypt2(gnutls_cipher_hd_t handle, + const void *text, size_t textlen, + void *ciphertext, size_t ciphertextlen); + +void gnutls_cipher_set_iv(gnutls_cipher_hd_t handle, void *iv, + size_t ivlen); + +int gnutls_cipher_tag(gnutls_cipher_hd_t handle, void *tag, + size_t tag_size); +int gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, + const void *text, size_t text_size); + +void gnutls_cipher_deinit(gnutls_cipher_hd_t handle); +int gnutls_cipher_get_block_size(gnutls_cipher_algorithm_t algorithm); +int gnutls_cipher_get_iv_size(gnutls_cipher_algorithm_t algorithm); +int gnutls_cipher_get_tag_size(gnutls_cipher_algorithm_t algorithm); + +typedef struct hash_hd_st *gnutls_hash_hd_t; +typedef struct hmac_hd_st *gnutls_hmac_hd_t; + +size_t gnutls_mac_get_nonce_size(gnutls_mac_algorithm_t algorithm); +int gnutls_hmac_init(gnutls_hmac_hd_t * dig, + gnutls_mac_algorithm_t algorithm, + const void *key, size_t keylen); +void gnutls_hmac_set_nonce(gnutls_hmac_hd_t handle, + const void *nonce, size_t nonce_len); +int gnutls_hmac(gnutls_hmac_hd_t handle, const void *text, size_t textlen); +void gnutls_hmac_output(gnutls_hmac_hd_t handle, void *digest); +void gnutls_hmac_deinit(gnutls_hmac_hd_t handle, void *digest); +int gnutls_hmac_get_len(gnutls_mac_algorithm_t algorithm); +int gnutls_hmac_fast(gnutls_mac_algorithm_t algorithm, + const void *key, size_t keylen, + const void *text, size_t textlen, void *digest); + +int gnutls_hash_init(gnutls_hash_hd_t * dig, + gnutls_digest_algorithm_t algorithm); +int gnutls_hash(gnutls_hash_hd_t handle, const void *text, size_t textlen); +void gnutls_hash_output(gnutls_hash_hd_t handle, void *digest); +void gnutls_hash_deinit(gnutls_hash_hd_t handle, void *digest); +int gnutls_hash_get_len(gnutls_digest_algorithm_t algorithm); +int gnutls_hash_fast(gnutls_digest_algorithm_t algorithm, + const void *text, size_t textlen, void *digest); + +/* register ciphers */ + + +/** + * gnutls_rnd_level_t: + * @GNUTLS_RND_NONCE: Non-predictable random number. Fatal in parts + * of session if broken, i.e., vulnerable to statistical analysis. + * @GNUTLS_RND_RANDOM: Pseudo-random cryptographic random number. + * Fatal in session if broken. + * @GNUTLS_RND_KEY: Fatal in many sessions if broken. + * + * Enumeration of random quality levels. + */ +typedef enum gnutls_rnd_level { + GNUTLS_RND_NONCE = 0, + GNUTLS_RND_RANDOM = 1, + GNUTLS_RND_KEY = 2 +} gnutls_rnd_level_t; + +int gnutls_rnd(gnutls_rnd_level_t level, void *data, size_t len); + +void gnutls_rnd_refresh(void); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif diff --git a/include/reactos/libs/gnutls/gnutls/dtls.h b/include/reactos/libs/gnutls/gnutls/dtls.h new file mode 100644 index 00000000000..46d0b591fad --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/dtls.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2011-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* This file contains the types and prototypes for the X.509 + * certificate and CRL handling functions. + */ + +#ifndef GNUTLS_DTLS_H +#define GNUTLS_DTLS_H + +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#define GNUTLS_COOKIE_KEY_SIZE 16 + +void gnutls_dtls_set_timeouts(gnutls_session_t session, + unsigned int retrans_timeout, + unsigned int total_timeout); + +unsigned int gnutls_dtls_get_mtu(gnutls_session_t session); +unsigned int gnutls_dtls_get_data_mtu(gnutls_session_t session); + +void gnutls_dtls_set_mtu(gnutls_session_t session, unsigned int mtu); +int gnutls_dtls_set_data_mtu(gnutls_session_t session, unsigned int mtu); + +unsigned int gnutls_dtls_get_timeout(gnutls_session_t session); + +/** + * gnutls_dtls_prestate_st: + * @record_seq: record sequence number + * @hsk_read_seq: handshake read sequence number + * @hsk_write_seq: handshake write sequence number + * + * DTLS cookie prestate struct. This is usually never modified by + * the application, it is used to carry the cookie data between + * gnutls_dtls_cookie_send(), gnutls_dtls_cookie_verify() and + * gnutls_dtls_prestate_set(). + */ +typedef struct { + unsigned int record_seq; + unsigned int hsk_read_seq; + unsigned int hsk_write_seq; +} gnutls_dtls_prestate_st; + +int gnutls_dtls_cookie_send(gnutls_datum_t * key, + void *client_data, + size_t client_data_size, + gnutls_dtls_prestate_st * prestate, + gnutls_transport_ptr_t ptr, + gnutls_push_func push_func); + +int gnutls_dtls_cookie_verify(gnutls_datum_t * key, + void *client_data, + size_t client_data_size, void *_msg, + size_t msg_size, + gnutls_dtls_prestate_st * prestate); + +void gnutls_dtls_prestate_set(gnutls_session_t session, + gnutls_dtls_prestate_st * prestate); + +unsigned int gnutls_record_get_discarded(gnutls_session_t session); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif /* GNUTLS_DTLS_H */ diff --git a/include/reactos/libs/gnutls/gnutls/gnutls.h b/include/reactos/libs/gnutls/gnutls/gnutls.h new file mode 100644 index 00000000000..d5023281f18 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/gnutls.h @@ -0,0 +1,2299 @@ +/* -*- c -*- + * Copyright (C) 2000-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* This file contains the types and prototypes for all the + * high level functionality of the gnutls main library. + * + * If the optional C++ binding was built, it is available in + * gnutls/gnutlsxx.h. + * + * The openssl compatibility layer (which is under the GNU GPL + * license) is in gnutls/openssl.h. + * + * The low level cipher functionality is in gnutls/crypto.h. + */ + + +#ifndef GNUTLS_H +#define GNUTLS_H + +/* Get size_t. */ +#include +/* Get ssize_t. */ +#ifndef HAVE_SSIZE_T +#define HAVE_SSIZE_T +/* *INDENT-OFF* */ +#include +/* *INDENT-ON* */ +#endif +/* Get time_t. */ +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#define GNUTLS_VERSION "3.2.16" + +#define GNUTLS_VERSION_MAJOR 3 +#define GNUTLS_VERSION_MINOR 2 +#define GNUTLS_VERSION_PATCH 16 + +#define GNUTLS_VERSION_NUMBER 0x030210 + +#define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC +#define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC +#define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC +#define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128 + +/** + * gnutls_cipher_algorithm_t: + * @GNUTLS_CIPHER_UNKNOWN: Unknown algorithm. + * @GNUTLS_CIPHER_NULL: NULL algorithm. + * @GNUTLS_CIPHER_ARCFOUR_128: ARCFOUR stream cipher with 128-bit keys. + * @GNUTLS_CIPHER_3DES_CBC: 3DES in CBC mode. + * @GNUTLS_CIPHER_AES_128_CBC: AES in CBC mode with 128-bit keys. + * @GNUTLS_CIPHER_AES_192_CBC: AES in CBC mode with 192-bit keys. + * @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys. + * @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys. + * @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys. + * @GNUTLS_CIPHER_DES_CBC: DES in CBC mode (56-bit keys). + * @GNUTLS_CIPHER_AES_128_GCM: AES in GCM mode with 128-bit keys. + * @GNUTLS_CIPHER_AES_256_GCM: AES in GCM mode with 256-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_128_GCM: CAMELLIA in GCM mode with 128-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_256_GCM: CAMELLIA in GCM mode with 256-bit keys. + * @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode. + * @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode. + * @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode. + * @GNUTLS_CIPHER_BLOWFISH_PGP_CFB: Blowfish in CFB mode. + * @GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: Safer-SK in CFB mode with 128-bit keys. + * @GNUTLS_CIPHER_AES128_PGP_CFB: AES in CFB mode with 128-bit keys. + * @GNUTLS_CIPHER_AES192_PGP_CFB: AES in CFB mode with 192-bit keys. + * @GNUTLS_CIPHER_AES256_PGP_CFB: AES in CFB mode with 256-bit keys. + * @GNUTLS_CIPHER_TWOFISH_PGP_CFB: Twofish in CFB mode. + * + * Enumeration of different symmetric encryption algorithms. + */ +typedef enum gnutls_cipher_algorithm { + GNUTLS_CIPHER_UNKNOWN = 0, + GNUTLS_CIPHER_NULL = 1, + GNUTLS_CIPHER_ARCFOUR_128 = 2, + GNUTLS_CIPHER_3DES_CBC = 3, + GNUTLS_CIPHER_AES_128_CBC = 4, + GNUTLS_CIPHER_AES_256_CBC = 5, + GNUTLS_CIPHER_ARCFOUR_40 = 6, + GNUTLS_CIPHER_CAMELLIA_128_CBC = 7, + GNUTLS_CIPHER_CAMELLIA_256_CBC = 8, + GNUTLS_CIPHER_RC2_40_CBC = 90, + GNUTLS_CIPHER_DES_CBC = 91, + GNUTLS_CIPHER_AES_192_CBC = 92, + GNUTLS_CIPHER_AES_128_GCM = 93, + GNUTLS_CIPHER_AES_256_GCM = 94, + GNUTLS_CIPHER_CAMELLIA_192_CBC = 95, + GNUTLS_CIPHER_SALSA20_256 = 96, + GNUTLS_CIPHER_ESTREAM_SALSA20_256 = 97, + GNUTLS_CIPHER_CAMELLIA_128_GCM = 98, + GNUTLS_CIPHER_CAMELLIA_256_GCM = 99, + + /* used only for PGP internals. Ignored in TLS/SSL + */ + GNUTLS_CIPHER_IDEA_PGP_CFB = 200, + GNUTLS_CIPHER_3DES_PGP_CFB = 201, + GNUTLS_CIPHER_CAST5_PGP_CFB = 202, + GNUTLS_CIPHER_BLOWFISH_PGP_CFB = 203, + GNUTLS_CIPHER_SAFER_SK128_PGP_CFB = 204, + GNUTLS_CIPHER_AES128_PGP_CFB = 205, + GNUTLS_CIPHER_AES192_PGP_CFB = 206, + GNUTLS_CIPHER_AES256_PGP_CFB = 207, + GNUTLS_CIPHER_TWOFISH_PGP_CFB = 208 +} gnutls_cipher_algorithm_t; + +/** + * gnutls_kx_algorithm_t: + * @GNUTLS_KX_UNKNOWN: Unknown key-exchange algorithm. + * @GNUTLS_KX_RSA: RSA key-exchange algorithm. + * @GNUTLS_KX_DHE_DSS: DHE-DSS key-exchange algorithm. + * @GNUTLS_KX_DHE_RSA: DHE-RSA key-exchange algorithm. + * @GNUTLS_KX_ECDHE_RSA: ECDHE-RSA key-exchange algorithm. + * @GNUTLS_KX_ECDHE_ECDSA: ECDHE-ECDSA key-exchange algorithm. + * @GNUTLS_KX_ANON_DH: Anon-DH key-exchange algorithm. + * @GNUTLS_KX_ANON_ECDH: Anon-ECDH key-exchange algorithm. + * @GNUTLS_KX_SRP: SRP key-exchange algorithm. + * @GNUTLS_KX_RSA_EXPORT: RSA-EXPORT key-exchange algorithm (defunc). + * @GNUTLS_KX_SRP_RSA: SRP-RSA key-exchange algorithm. + * @GNUTLS_KX_SRP_DSS: SRP-DSS key-exchange algorithm. + * @GNUTLS_KX_PSK: PSK key-exchange algorithm. + * @GNUTLS_KX_DHE_PSK: DHE-PSK key-exchange algorithm. + * @GNUTLS_KX_ECDHE_PSK: ECDHE-PSK key-exchange algorithm. + * @GNUTLS_KX_RSA_PSK: RSA-PSK key-exchange algorithm. + * + * Enumeration of different key exchange algorithms. + */ +typedef enum { + GNUTLS_KX_UNKNOWN = 0, + GNUTLS_KX_RSA = 1, + GNUTLS_KX_DHE_DSS = 2, + GNUTLS_KX_DHE_RSA = 3, + GNUTLS_KX_ANON_DH = 4, + GNUTLS_KX_SRP = 5, + GNUTLS_KX_RSA_EXPORT = 6, + GNUTLS_KX_SRP_RSA = 7, + GNUTLS_KX_SRP_DSS = 8, + GNUTLS_KX_PSK = 9, + GNUTLS_KX_DHE_PSK = 10, + GNUTLS_KX_ANON_ECDH = 11, + GNUTLS_KX_ECDHE_RSA = 12, + GNUTLS_KX_ECDHE_ECDSA = 13, + GNUTLS_KX_ECDHE_PSK = 14, + GNUTLS_KX_RSA_PSK = 15, +} gnutls_kx_algorithm_t; + +/** + * gnutls_params_type_t: + * @GNUTLS_PARAMS_RSA_EXPORT: Session RSA-EXPORT parameters (defunc). + * @GNUTLS_PARAMS_DH: Session Diffie-Hellman parameters. + * @GNUTLS_PARAMS_ECDH: Session Elliptic-Curve Diffie-Hellman parameters. + * + * Enumeration of different TLS session parameter types. + */ +typedef enum { + GNUTLS_PARAMS_RSA_EXPORT = 1, + GNUTLS_PARAMS_DH = 2, + GNUTLS_PARAMS_ECDH = 3, +} gnutls_params_type_t; + +/** + * gnutls_credentials_type_t: + * @GNUTLS_CRD_CERTIFICATE: Certificate credential. + * @GNUTLS_CRD_ANON: Anonymous credential. + * @GNUTLS_CRD_SRP: SRP credential. + * @GNUTLS_CRD_PSK: PSK credential. + * @GNUTLS_CRD_IA: IA credential. + * + * Enumeration of different credential types. + */ +typedef enum { + GNUTLS_CRD_CERTIFICATE = 1, + GNUTLS_CRD_ANON, + GNUTLS_CRD_SRP, + GNUTLS_CRD_PSK, + GNUTLS_CRD_IA +} gnutls_credentials_type_t; + +#define GNUTLS_MAC_SHA GNUTLS_MAC_SHA1 +#define GNUTLS_DIG_SHA GNUTLS_DIG_SHA1 + +/** + * gnutls_mac_algorithm_t: + * @GNUTLS_MAC_UNKNOWN: Unknown MAC algorithm. + * @GNUTLS_MAC_NULL: NULL MAC algorithm (empty output). + * @GNUTLS_MAC_MD5: HMAC-MD5 algorithm. + * @GNUTLS_MAC_SHA1: HMAC-SHA-1 algorithm. + * @GNUTLS_MAC_RMD160: HMAC-RMD160 algorithm. + * @GNUTLS_MAC_MD2: HMAC-MD2 algorithm. + * @GNUTLS_MAC_SHA256: HMAC-SHA-256 algorithm. + * @GNUTLS_MAC_SHA384: HMAC-SHA-384 algorithm. + * @GNUTLS_MAC_SHA512: HMAC-SHA-512 algorithm. + * @GNUTLS_MAC_SHA224: HMAC-SHA-224 algorithm. + * @GNUTLS_MAC_AEAD: MAC implicit through AEAD cipher. + * @GNUTLS_MAC_UMAC_96: The UMAC-96 MAC algorithm. + * @GNUTLS_MAC_UMAC_128: The UMAC-128 MAC algorithm. + * + * Enumeration of different Message Authentication Code (MAC) + * algorithms. + */ +typedef enum { + GNUTLS_MAC_UNKNOWN = 0, + GNUTLS_MAC_NULL = 1, + GNUTLS_MAC_MD5 = 2, + GNUTLS_MAC_SHA1 = 3, + GNUTLS_MAC_RMD160 = 4, + GNUTLS_MAC_MD2 = 5, + GNUTLS_MAC_SHA256 = 6, + GNUTLS_MAC_SHA384 = 7, + GNUTLS_MAC_SHA512 = 8, + GNUTLS_MAC_SHA224 = 9, + /* If you add anything here, make sure you align with + gnutls_digest_algorithm_t. */ + GNUTLS_MAC_AEAD = 200, /* indicates that MAC is on the cipher */ + GNUTLS_MAC_UMAC_96 = 201, + GNUTLS_MAC_UMAC_128 = 202, +} gnutls_mac_algorithm_t; + +/** + * gnutls_digest_algorithm_t: + * @GNUTLS_DIG_UNKNOWN: Unknown hash algorithm. + * @GNUTLS_DIG_NULL: NULL hash algorithm (empty output). + * @GNUTLS_DIG_MD5: MD5 algorithm. + * @GNUTLS_DIG_SHA1: SHA-1 algorithm. + * @GNUTLS_DIG_RMD160: RMD160 algorithm. + * @GNUTLS_DIG_MD2: MD2 algorithm. + * @GNUTLS_DIG_SHA256: SHA-256 algorithm. + * @GNUTLS_DIG_SHA384: SHA-384 algorithm. + * @GNUTLS_DIG_SHA512: SHA-512 algorithm. + * @GNUTLS_DIG_SHA224: SHA-224 algorithm. + * + * Enumeration of different digest (hash) algorithms. + */ +typedef enum { + GNUTLS_DIG_UNKNOWN = GNUTLS_MAC_UNKNOWN, + GNUTLS_DIG_NULL = GNUTLS_MAC_NULL, + GNUTLS_DIG_MD5 = GNUTLS_MAC_MD5, + GNUTLS_DIG_SHA1 = GNUTLS_MAC_SHA1, + GNUTLS_DIG_RMD160 = GNUTLS_MAC_RMD160, + GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2, + GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256, + GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384, + GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512, + GNUTLS_DIG_SHA224 = GNUTLS_MAC_SHA224 + /* If you add anything here, make sure you align with + gnutls_mac_algorithm_t. */ +} gnutls_digest_algorithm_t; + + /* exported for other gnutls headers. This is the maximum number of + * algorithms (ciphers, kx or macs). + */ +#define GNUTLS_MAX_ALGORITHM_NUM 32 + +/** + * gnutls_compression_method_t: + * @GNUTLS_COMP_UNKNOWN: Unknown compression method. + * @GNUTLS_COMP_NULL: The NULL compression method (no compression). + * @GNUTLS_COMP_DEFLATE: The DEFLATE compression method from zlib. + * @GNUTLS_COMP_ZLIB: Same as %GNUTLS_COMP_DEFLATE. + * + * Enumeration of different TLS compression methods. + */ +typedef enum { + GNUTLS_COMP_UNKNOWN = 0, + GNUTLS_COMP_NULL = 1, + GNUTLS_COMP_DEFLATE = 2, + GNUTLS_COMP_ZLIB = GNUTLS_COMP_DEFLATE, +} gnutls_compression_method_t; + + /* + * Flags for gnutls_init() + * + * @GNUTLS_SERVER: Connection end is a server. + * @GNUTLS_CLIENT: Connection end is a client. + * @GNUTLS_DATAGRAM: Connection is datagram oriented (DTLS). + * @GNUTLS_NONBLOCK: Connection should not block (DTLS). + * @GNUTLS_NO_EXTENSIONS: Do not enable any TLS extensions by default. + * @GNUTLS_NO_REPLAY_PROTECTION: Disable any replay protection in DTLS. + * + */ +#define GNUTLS_SERVER 1 +#define GNUTLS_CLIENT (1<<1) +#define GNUTLS_DATAGRAM (1<<2) +#define GNUTLS_NONBLOCK (1<<3) +#define GNUTLS_NO_EXTENSIONS (1<<4) +#define GNUTLS_NO_REPLAY_PROTECTION (1<<5) + +/** + * gnutls_alert_level_t: + * @GNUTLS_AL_WARNING: Alert of warning severity. + * @GNUTLS_AL_FATAL: Alert of fatal severity. + * + * Enumeration of different TLS alert severities. + */ +typedef enum { + GNUTLS_AL_WARNING = 1, + GNUTLS_AL_FATAL +} gnutls_alert_level_t; + +/** + * gnutls_alert_description_t: + * @GNUTLS_A_CLOSE_NOTIFY: Close notify. + * @GNUTLS_A_UNEXPECTED_MESSAGE: Unexpected message. + * @GNUTLS_A_BAD_RECORD_MAC: Bad record MAC. + * @GNUTLS_A_DECRYPTION_FAILED: Decryption failed. + * @GNUTLS_A_RECORD_OVERFLOW: Record overflow. + * @GNUTLS_A_DECOMPRESSION_FAILURE: Decompression failed. + * @GNUTLS_A_HANDSHAKE_FAILURE: Handshake failed. + * @GNUTLS_A_SSL3_NO_CERTIFICATE: No certificate. + * @GNUTLS_A_BAD_CERTIFICATE: Certificate is bad. + * @GNUTLS_A_UNSUPPORTED_CERTIFICATE: Certificate is not supported. + * @GNUTLS_A_CERTIFICATE_REVOKED: Certificate was revoked. + * @GNUTLS_A_CERTIFICATE_EXPIRED: Certificate is expired. + * @GNUTLS_A_CERTIFICATE_UNKNOWN: Unknown certificate. + * @GNUTLS_A_ILLEGAL_PARAMETER: Illegal parameter. + * @GNUTLS_A_UNKNOWN_CA: CA is unknown. + * @GNUTLS_A_ACCESS_DENIED: Access was denied. + * @GNUTLS_A_DECODE_ERROR: Decode error. + * @GNUTLS_A_DECRYPT_ERROR: Decrypt error. + * @GNUTLS_A_EXPORT_RESTRICTION: Export restriction. + * @GNUTLS_A_PROTOCOL_VERSION: Error in protocol version. + * @GNUTLS_A_INSUFFICIENT_SECURITY: Insufficient security. + * @GNUTLS_A_USER_CANCELED: User canceled. + * @GNUTLS_A_INTERNAL_ERROR: Internal error. + * @GNUTLS_A_NO_RENEGOTIATION: No renegotiation is allowed. + * @GNUTLS_A_CERTIFICATE_UNOBTAINABLE: Could not retrieve the + * specified certificate. + * @GNUTLS_A_UNSUPPORTED_EXTENSION: An unsupported extension was + * sent. + * @GNUTLS_A_UNRECOGNIZED_NAME: The server name sent was not + * recognized. + * @GNUTLS_A_UNKNOWN_PSK_IDENTITY: The SRP/PSK username is missing + * or not known. + * + * Enumeration of different TLS alerts. + */ +typedef enum { + GNUTLS_A_CLOSE_NOTIFY, + GNUTLS_A_UNEXPECTED_MESSAGE = 10, + GNUTLS_A_BAD_RECORD_MAC = 20, + GNUTLS_A_DECRYPTION_FAILED, + GNUTLS_A_RECORD_OVERFLOW, + GNUTLS_A_DECOMPRESSION_FAILURE = 30, + GNUTLS_A_HANDSHAKE_FAILURE = 40, + GNUTLS_A_SSL3_NO_CERTIFICATE = 41, + GNUTLS_A_BAD_CERTIFICATE = 42, + GNUTLS_A_UNSUPPORTED_CERTIFICATE, + GNUTLS_A_CERTIFICATE_REVOKED, + GNUTLS_A_CERTIFICATE_EXPIRED, + GNUTLS_A_CERTIFICATE_UNKNOWN, + GNUTLS_A_ILLEGAL_PARAMETER, + GNUTLS_A_UNKNOWN_CA, + GNUTLS_A_ACCESS_DENIED, + GNUTLS_A_DECODE_ERROR = 50, + GNUTLS_A_DECRYPT_ERROR, + GNUTLS_A_EXPORT_RESTRICTION = 60, + GNUTLS_A_PROTOCOL_VERSION = 70, + GNUTLS_A_INSUFFICIENT_SECURITY, + GNUTLS_A_INTERNAL_ERROR = 80, + GNUTLS_A_USER_CANCELED = 90, + GNUTLS_A_NO_RENEGOTIATION = 100, + GNUTLS_A_UNSUPPORTED_EXTENSION = 110, + GNUTLS_A_CERTIFICATE_UNOBTAINABLE = 111, + GNUTLS_A_UNRECOGNIZED_NAME = 112, + GNUTLS_A_UNKNOWN_PSK_IDENTITY = 115, + GNUTLS_A_NO_APPLICATION_PROTOCOL = 120, +} gnutls_alert_description_t; + +/** + * gnutls_handshake_description_t: + * @GNUTLS_HANDSHAKE_HELLO_REQUEST: Hello request. + * @GNUTLS_HANDSHAKE_HELLO_VERIFY_REQUEST: DTLS Hello verify request. + * @GNUTLS_HANDSHAKE_CLIENT_HELLO: Client hello. + * @GNUTLS_HANDSHAKE_SERVER_HELLO: Server hello. + * @GNUTLS_HANDSHAKE_NEW_SESSION_TICKET: New session ticket. + * @GNUTLS_HANDSHAKE_CERTIFICATE_PKT: Certificate packet. + * @GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE: Server key exchange. + * @GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST: Certificate request. + * @GNUTLS_HANDSHAKE_SERVER_HELLO_DONE: Server hello done. + * @GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY: Certificate verify. + * @GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE: Client key exchange. + * @GNUTLS_HANDSHAKE_FINISHED: Finished. + * @GNUTLS_HANDSHAKE_CERTIFICATE_STATUS: Certificate status (OCSP). + * @GNUTLS_HANDSHAKE_SUPPLEMENTAL: Supplemental. + * @GNUTLS_HANDSHAKE_CHANGE_CIPHER_SPEC: Change Cipher Spec. + * @GNUTLS_HANDSHAKE_CLIENT_HELLO_V2: SSLv2 Client Hello. + * + * Enumeration of different TLS handshake packets. + */ +typedef enum { + GNUTLS_HANDSHAKE_HELLO_REQUEST = 0, + GNUTLS_HANDSHAKE_CLIENT_HELLO = 1, + GNUTLS_HANDSHAKE_SERVER_HELLO = 2, + GNUTLS_HANDSHAKE_HELLO_VERIFY_REQUEST = 3, + GNUTLS_HANDSHAKE_NEW_SESSION_TICKET = 4, + GNUTLS_HANDSHAKE_CERTIFICATE_PKT = 11, + GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE = 12, + GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST = 13, + GNUTLS_HANDSHAKE_SERVER_HELLO_DONE = 14, + GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY = 15, + GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE = 16, + GNUTLS_HANDSHAKE_FINISHED = 20, + GNUTLS_HANDSHAKE_CERTIFICATE_STATUS = 22, + GNUTLS_HANDSHAKE_SUPPLEMENTAL = 23, + GNUTLS_HANDSHAKE_CHANGE_CIPHER_SPEC = 254, + GNUTLS_HANDSHAKE_CLIENT_HELLO_V2 = 1024, +} gnutls_handshake_description_t; + +#define GNUTLS_HANDSHAKE_ANY ((unsigned int)-1) + +const char + *gnutls_handshake_description_get_name(gnutls_handshake_description_t + type); + +/** + * gnutls_certificate_status_t: + * @GNUTLS_CERT_INVALID: The certificate is not signed by one of the + * known authorities or the signature is invalid (deprecated by the flags + * %GNUTLS_CERT_SIGNATURE_FAILURE and %GNUTLS_CERT_SIGNER_NOT_FOUND). + * @GNUTLS_CERT_SIGNATURE_FAILURE: The signature verification failed. + * @GNUTLS_CERT_REVOKED: Certificate is revoked by its authority. In X.509 this will be + * set only if CRLs are checked. + * @GNUTLS_CERT_SIGNER_NOT_FOUND: The certificate's issuer is not known. + * This is the case if the issuer is not included in the trusted certificate list. + * @GNUTLS_CERT_SIGNER_NOT_CA: The certificate's signer was not a CA. This + * may happen if this was a version 1 certificate, which is common with + * some CAs, or a version 3 certificate without the basic constrains extension. + * @GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE: The certificate's signer constraints were + * violated. + * @GNUTLS_CERT_INSECURE_ALGORITHM: The certificate was signed using an insecure + * algorithm such as MD2 or MD5. These algorithms have been broken and + * should not be trusted. + * @GNUTLS_CERT_NOT_ACTIVATED: The certificate is not yet activated. + * @GNUTLS_CERT_EXPIRED: The certificate has expired. + * @GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED: The revocation data are old and have been superseded. + * @GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE: The revocation data have a future issue date. + * @GNUTLS_CERT_UNEXPECTED_OWNER: The owner is not the expected one. + * @GNUTLS_CERT_MISMATCH: The certificate presented isn't the expected one (TOFU) + * + * Enumeration of certificate status codes. Note that the status + * bits may have different meanings in OpenPGP keys and X.509 + * certificate verification. + */ +typedef enum { + GNUTLS_CERT_INVALID = 1 << 1, + GNUTLS_CERT_REVOKED = 1 << 5, + GNUTLS_CERT_SIGNER_NOT_FOUND = 1 << 6, + GNUTLS_CERT_SIGNER_NOT_CA = 1 << 7, + GNUTLS_CERT_INSECURE_ALGORITHM = 1 << 8, + GNUTLS_CERT_NOT_ACTIVATED = 1 << 9, + GNUTLS_CERT_EXPIRED = 1 << 10, + GNUTLS_CERT_SIGNATURE_FAILURE = 1 << 11, + GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED = 1 << 12, + GNUTLS_CERT_UNEXPECTED_OWNER = 1 << 14, + GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE = 1 << 15, + GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE = 1 << 16, + GNUTLS_CERT_MISMATCH = 1 << 17, +} gnutls_certificate_status_t; + +/** + * gnutls_certificate_request_t: + * @GNUTLS_CERT_IGNORE: Ignore certificate. + * @GNUTLS_CERT_REQUEST: Request certificate. + * @GNUTLS_CERT_REQUIRE: Require certificate. + * + * Enumeration of certificate request types. + */ +typedef enum { + GNUTLS_CERT_IGNORE = 0, + GNUTLS_CERT_REQUEST = 1, + GNUTLS_CERT_REQUIRE = 2 +} gnutls_certificate_request_t; + +/** + * gnutls_openpgp_crt_status_t: + * @GNUTLS_OPENPGP_CERT: Send entire certificate. + * @GNUTLS_OPENPGP_CERT_FINGERPRINT: Send only certificate fingerprint. + * + * Enumeration of ways to send OpenPGP certificate. + */ +typedef enum { + GNUTLS_OPENPGP_CERT = 0, + GNUTLS_OPENPGP_CERT_FINGERPRINT = 1 +} gnutls_openpgp_crt_status_t; + +/** + * gnutls_close_request_t: + * @GNUTLS_SHUT_RDWR: Disallow further receives/sends. + * @GNUTLS_SHUT_WR: Disallow further sends. + * + * Enumeration of how TLS session should be terminated. See gnutls_bye(). + */ +typedef enum { + GNUTLS_SHUT_RDWR = 0, + GNUTLS_SHUT_WR = 1 +} gnutls_close_request_t; + +/** + * gnutls_protocol_t: + * @GNUTLS_SSL3: SSL version 3.0. + * @GNUTLS_TLS1_0: TLS version 1.0. + * @GNUTLS_TLS1: Same as %GNUTLS_TLS1_0. + * @GNUTLS_TLS1_1: TLS version 1.1. + * @GNUTLS_TLS1_2: TLS version 1.2. + * @GNUTLS_DTLS1_0: DTLS version 1.0. + * @GNUTLS_DTLS1_2: DTLS version 1.2. + * @GNUTLS_DTLS0_9: DTLS version 0.9 (Cisco AnyConnect / OpenSSL 0.9.8e). + * @GNUTLS_VERSION_MAX: Maps to the highest supported TLS version. + * @GNUTLS_VERSION_UNKNOWN: Unknown SSL/TLS version. + * + * Enumeration of different SSL/TLS protocol versions. + */ +typedef enum { + GNUTLS_SSL3 = 1, + GNUTLS_TLS1_0 = 2, + GNUTLS_TLS1 = GNUTLS_TLS1_0, + GNUTLS_TLS1_1 = 3, + GNUTLS_TLS1_2 = 4, + GNUTLS_DTLS0_9 = 6, /* FIXME: at some point change it to 200 */ + GNUTLS_DTLS1_0 = 5, /* 201 */ + GNUTLS_DTLS1_2 = 202, + GNUTLS_DTLS_VERSION_MIN = GNUTLS_DTLS1_0, + GNUTLS_DTLS_VERSION_MAX = GNUTLS_DTLS1_2, + GNUTLS_TLS_VERSION_MAX = GNUTLS_TLS1_2, + GNUTLS_VERSION_UNKNOWN = 0xff /* change it to 0xffff */ +} gnutls_protocol_t; + +/** + * gnutls_certificate_type_t: + * @GNUTLS_CRT_UNKNOWN: Unknown certificate type. + * @GNUTLS_CRT_X509: X.509 Certificate. + * @GNUTLS_CRT_OPENPGP: OpenPGP certificate. + * @GNUTLS_CRT_RAW: Raw public key (SubjectPublicKey) + * + * Enumeration of different certificate types. + */ +typedef enum { + GNUTLS_CRT_UNKNOWN = 0, + GNUTLS_CRT_X509 = 1, + GNUTLS_CRT_OPENPGP = 2, + GNUTLS_CRT_RAW = 3 +} gnutls_certificate_type_t; + +/** + * gnutls_x509_crt_fmt_t: + * @GNUTLS_X509_FMT_DER: X.509 certificate in DER format (binary). + * @GNUTLS_X509_FMT_PEM: X.509 certificate in PEM format (text). + * + * Enumeration of different certificate encoding formats. + */ +typedef enum { + GNUTLS_X509_FMT_DER = 0, + GNUTLS_X509_FMT_PEM = 1 +} gnutls_x509_crt_fmt_t; + +/** + * gnutls_certificate_print_formats_t: + * @GNUTLS_CRT_PRINT_FULL: Full information about certificate. + * @GNUTLS_CRT_PRINT_FULL_NUMBERS: Full information about certificate and include easy to parse public key parameters. + * @GNUTLS_CRT_PRINT_COMPACT: Information about certificate name in one line, plus identification of the public key. + * @GNUTLS_CRT_PRINT_ONELINE: Information about certificate in one line. + * @GNUTLS_CRT_PRINT_UNSIGNED_FULL: All info for an unsigned certificate. + * + * Enumeration of different certificate printing variants. + */ +typedef enum gnutls_certificate_print_formats { + GNUTLS_CRT_PRINT_FULL = 0, + GNUTLS_CRT_PRINT_ONELINE = 1, + GNUTLS_CRT_PRINT_UNSIGNED_FULL = 2, + GNUTLS_CRT_PRINT_COMPACT = 3, + GNUTLS_CRT_PRINT_FULL_NUMBERS = 4, +} gnutls_certificate_print_formats_t; + +#define GNUTLS_PK_ECC GNUTLS_PK_EC +/** + * gnutls_pk_algorithm_t: + * @GNUTLS_PK_UNKNOWN: Unknown public-key algorithm. + * @GNUTLS_PK_RSA: RSA public-key algorithm. + * @GNUTLS_PK_DSA: DSA public-key algorithm. + * @GNUTLS_PK_DH: Diffie-Hellman algorithm. Used to generate parameters. + * @GNUTLS_PK_EC: Elliptic curve algorithm. Used to generate parameters. + * + * Enumeration of different public-key algorithms. + */ +typedef enum { + GNUTLS_PK_UNKNOWN = 0, + GNUTLS_PK_RSA = 1, + GNUTLS_PK_DSA = 2, + GNUTLS_PK_DH = 3, + GNUTLS_PK_EC = 4, +} gnutls_pk_algorithm_t; + +const char *gnutls_pk_algorithm_get_name(gnutls_pk_algorithm_t algorithm); + +/** + * gnutls_sign_algorithm_t: + * @GNUTLS_SIGN_UNKNOWN: Unknown signature algorithm. + * @GNUTLS_SIGN_RSA_SHA1: Digital signature algorithm RSA with SHA-1 + * @GNUTLS_SIGN_RSA_SHA: Same as %GNUTLS_SIGN_RSA_SHA1. + * @GNUTLS_SIGN_DSA_SHA1: Digital signature algorithm DSA with SHA-1 + * @GNUTLS_SIGN_DSA_SHA224: Digital signature algorithm DSA with SHA-224 + * @GNUTLS_SIGN_DSA_SHA256: Digital signature algorithm DSA with SHA-256 + * @GNUTLS_SIGN_DSA_SHA: Same as %GNUTLS_SIGN_DSA_SHA1. + * @GNUTLS_SIGN_RSA_MD5: Digital signature algorithm RSA with MD5. + * @GNUTLS_SIGN_RSA_MD2: Digital signature algorithm RSA with MD2. + * @GNUTLS_SIGN_RSA_RMD160: Digital signature algorithm RSA with RMD-160. + * @GNUTLS_SIGN_RSA_SHA256: Digital signature algorithm RSA with SHA-256. + * @GNUTLS_SIGN_RSA_SHA384: Digital signature algorithm RSA with SHA-384. + * @GNUTLS_SIGN_RSA_SHA512: Digital signature algorithm RSA with SHA-512. + * @GNUTLS_SIGN_RSA_SHA224: Digital signature algorithm RSA with SHA-224. + * @GNUTLS_SIGN_ECDSA_SHA1: ECDSA with SHA1. + * @GNUTLS_SIGN_ECDSA_SHA256: Digital signature algorithm ECDSA with SHA-256. + * @GNUTLS_SIGN_ECDSA_SHA384: Digital signature algorithm ECDSA with SHA-384. + * @GNUTLS_SIGN_ECDSA_SHA512: Digital signature algorithm ECDSA with SHA-512. + * @GNUTLS_SIGN_ECDSA_SHA224: Digital signature algorithm ECDSA with SHA-224. + * + * Enumeration of different digital signature algorithms. + */ +typedef enum { + GNUTLS_SIGN_UNKNOWN = 0, + GNUTLS_SIGN_RSA_SHA1 = 1, + GNUTLS_SIGN_RSA_SHA = GNUTLS_SIGN_RSA_SHA1, + GNUTLS_SIGN_DSA_SHA1 = 2, + GNUTLS_SIGN_DSA_SHA = GNUTLS_SIGN_DSA_SHA1, + GNUTLS_SIGN_RSA_MD5 = 3, + GNUTLS_SIGN_RSA_MD2 = 4, + GNUTLS_SIGN_RSA_RMD160 = 5, + GNUTLS_SIGN_RSA_SHA256 = 6, + GNUTLS_SIGN_RSA_SHA384 = 7, + GNUTLS_SIGN_RSA_SHA512 = 8, + GNUTLS_SIGN_RSA_SHA224 = 9, + GNUTLS_SIGN_DSA_SHA224 = 10, + GNUTLS_SIGN_DSA_SHA256 = 11, + GNUTLS_SIGN_ECDSA_SHA1 = 12, + GNUTLS_SIGN_ECDSA_SHA224 = 13, + GNUTLS_SIGN_ECDSA_SHA256 = 14, + GNUTLS_SIGN_ECDSA_SHA384 = 15, + GNUTLS_SIGN_ECDSA_SHA512 = 16, +} gnutls_sign_algorithm_t; + +/** + * gnutls_ecc_curve_t: + * @GNUTLS_ECC_CURVE_INVALID: Cannot be known + * @GNUTLS_ECC_CURVE_SECP192R1: the SECP192R1 curve + * @GNUTLS_ECC_CURVE_SECP224R1: the SECP224R1 curve + * @GNUTLS_ECC_CURVE_SECP256R1: the SECP256R1 curve + * @GNUTLS_ECC_CURVE_SECP384R1: the SECP384R1 curve + * @GNUTLS_ECC_CURVE_SECP521R1: the SECP521R1 curve + * + * Enumeration of ECC curves. + */ +typedef enum { + GNUTLS_ECC_CURVE_INVALID = 0, + GNUTLS_ECC_CURVE_SECP224R1, + GNUTLS_ECC_CURVE_SECP256R1, + GNUTLS_ECC_CURVE_SECP384R1, + GNUTLS_ECC_CURVE_SECP521R1, + GNUTLS_ECC_CURVE_SECP192R1, +} gnutls_ecc_curve_t; + +/* macros to allow specifying a specific curve in gnutls_privkey_generate() + * and gnutls_x509_privkey_generate() */ +#define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)((1<<31)|(curve)) +#define GNUTLS_BITS_TO_CURVE(bits) ((bits) & 0x7FFFFFFF) +#define GNUTLS_BITS_ARE_CURVE(bits) ((bits) & 0x80000000) + +/** + * gnutls_sec_param_t: + * @GNUTLS_SEC_PARAM_UNKNOWN: Cannot be known + * @GNUTLS_SEC_PARAM_INSECURE: Less than 42 bits of security + * @GNUTLS_SEC_PARAM_EXPORT: 42 bits of security + * @GNUTLS_SEC_PARAM_VERY_WEAK: 64 bits of security + * @GNUTLS_SEC_PARAM_WEAK: 72 bits of security + * @GNUTLS_SEC_PARAM_LOW: 80 bits of security + * @GNUTLS_SEC_PARAM_LEGACY: 96 bits of security + * @GNUTLS_SEC_PARAM_NORMAL: 112 bits of security + * @GNUTLS_SEC_PARAM_HIGH: 128 bits of security + * @GNUTLS_SEC_PARAM_ULTRA: 192 bits of security + * + * Enumeration of security parameters for passive attacks. + */ +typedef enum { + GNUTLS_SEC_PARAM_INSECURE = -20, + GNUTLS_SEC_PARAM_EXPORT = -15, + GNUTLS_SEC_PARAM_VERY_WEAK = -12, + GNUTLS_SEC_PARAM_WEAK = -10, + GNUTLS_SEC_PARAM_UNKNOWN = 0, + GNUTLS_SEC_PARAM_LOW = 1, + GNUTLS_SEC_PARAM_LEGACY = 2, + GNUTLS_SEC_PARAM_NORMAL = 3, + GNUTLS_SEC_PARAM_HIGH = 4, + GNUTLS_SEC_PARAM_ULTRA = 5, +} gnutls_sec_param_t; + +/** + * gnutls_channel_binding_t: + * @GNUTLS_CB_TLS_UNIQUE: "tls-unique" (RFC 5929) channel binding + * + * Enumeration of support channel binding types. + */ +typedef enum { + GNUTLS_CB_TLS_UNIQUE +} gnutls_channel_binding_t; + + +/* If you want to change this, then also change the define in + * gnutls_int.h, and recompile. + */ +typedef void *gnutls_transport_ptr_t; + +struct gnutls_session_int; +typedef struct gnutls_session_int *gnutls_session_t; + +struct gnutls_dh_params_int; +typedef struct gnutls_dh_params_int *gnutls_dh_params_t; + +struct gnutls_ecdh_params_int; +typedef struct gnutls_ecdh_params_int *gnutls_ecdh_params_t; + + /* XXX ugly. */ +struct gnutls_x509_privkey_int; +typedef struct gnutls_x509_privkey_int *gnutls_rsa_params_t; + +struct gnutls_priority_st; +typedef struct gnutls_priority_st *gnutls_priority_t; + +typedef struct { + unsigned char *data; + unsigned int size; +} gnutls_datum_t; + + +typedef struct gnutls_params_st { + gnutls_params_type_t type; + union params { + gnutls_dh_params_t dh; + gnutls_ecdh_params_t ecdh; + gnutls_rsa_params_t rsa_export; + } params; + int deinit; +} gnutls_params_st; + +typedef int gnutls_params_function(gnutls_session_t, gnutls_params_type_t, + gnutls_params_st *); + +/* internal functions */ + +int gnutls_init(gnutls_session_t * session, unsigned int flags); +void gnutls_deinit(gnutls_session_t session); +#define _gnutls_deinit(x) gnutls_deinit(x) + +int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how); + +int gnutls_handshake(gnutls_session_t session); + +#define GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT ((unsigned int)-1) +void gnutls_handshake_set_timeout(gnutls_session_t session, + unsigned int ms); +int gnutls_rehandshake(gnutls_session_t session); + +gnutls_alert_description_t gnutls_alert_get(gnutls_session_t session); +int gnutls_alert_send(gnutls_session_t session, + gnutls_alert_level_t level, + gnutls_alert_description_t desc); +int gnutls_alert_send_appropriate(gnutls_session_t session, int err); +const char *gnutls_alert_get_name(gnutls_alert_description_t alert); +const char *gnutls_alert_get_strname(gnutls_alert_description_t alert); + +gnutls_sec_param_t gnutls_pk_bits_to_sec_param(gnutls_pk_algorithm_t algo, + unsigned int bits); +const char *gnutls_sec_param_get_name(gnutls_sec_param_t param); +unsigned int gnutls_sec_param_to_pk_bits(gnutls_pk_algorithm_t algo, + gnutls_sec_param_t param); + +/* Elliptic curves */ +const char *gnutls_ecc_curve_get_name(gnutls_ecc_curve_t curve); +int gnutls_ecc_curve_get_size(gnutls_ecc_curve_t curve); +gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); + +/* get information on the current session */ +gnutls_cipher_algorithm_t gnutls_cipher_get(gnutls_session_t session); +gnutls_kx_algorithm_t gnutls_kx_get(gnutls_session_t session); +gnutls_mac_algorithm_t gnutls_mac_get(gnutls_session_t session); +gnutls_compression_method_t +gnutls_compression_get(gnutls_session_t session); +gnutls_certificate_type_t +gnutls_certificate_type_get(gnutls_session_t session); + +int gnutls_sign_algorithm_get(gnutls_session_t session); +int gnutls_sign_algorithm_get_client(gnutls_session_t session); + +int gnutls_sign_algorithm_get_requested(gnutls_session_t session, + size_t indx, + gnutls_sign_algorithm_t * algo); + +/* the name of the specified algorithms */ +const char *gnutls_cipher_get_name(gnutls_cipher_algorithm_t algorithm); +const char *gnutls_mac_get_name(gnutls_mac_algorithm_t algorithm); +const char *gnutls_digest_get_name(gnutls_digest_algorithm_t algorithm); +const char *gnutls_compression_get_name(gnutls_compression_method_t + algorithm); +const char *gnutls_kx_get_name(gnutls_kx_algorithm_t algorithm); +const char *gnutls_certificate_type_get_name(gnutls_certificate_type_t + type); +const char *gnutls_pk_get_name(gnutls_pk_algorithm_t algorithm); +const char *gnutls_sign_get_name(gnutls_sign_algorithm_t algorithm); + +size_t gnutls_cipher_get_key_size(gnutls_cipher_algorithm_t algorithm); +size_t gnutls_mac_get_key_size(gnutls_mac_algorithm_t algorithm); + +int gnutls_sign_is_secure(gnutls_sign_algorithm_t algorithm); +gnutls_digest_algorithm_t +gnutls_sign_get_hash_algorithm(gnutls_sign_algorithm_t sign); +gnutls_pk_algorithm_t +gnutls_sign_get_pk_algorithm(gnutls_sign_algorithm_t sign); +gnutls_sign_algorithm_t +gnutls_pk_to_sign(gnutls_pk_algorithm_t pk, + gnutls_digest_algorithm_t hash); + +#define gnutls_sign_algorithm_get_name gnutls_sign_get_name + +gnutls_mac_algorithm_t gnutls_mac_get_id(const char *name); +gnutls_digest_algorithm_t gnutls_digest_get_id(const char *name); +gnutls_compression_method_t gnutls_compression_get_id(const char *name); +gnutls_cipher_algorithm_t gnutls_cipher_get_id(const char *name); +gnutls_kx_algorithm_t gnutls_kx_get_id(const char *name); +gnutls_protocol_t gnutls_protocol_get_id(const char *name); +gnutls_certificate_type_t gnutls_certificate_type_get_id(const char *name); +gnutls_pk_algorithm_t gnutls_pk_get_id(const char *name); +gnutls_sign_algorithm_t gnutls_sign_get_id(const char *name); + + /* list supported algorithms */ +const gnutls_ecc_curve_t *gnutls_ecc_curve_list(void); +const gnutls_cipher_algorithm_t *gnutls_cipher_list(void); +const gnutls_mac_algorithm_t *gnutls_mac_list(void); +const gnutls_digest_algorithm_t *gnutls_digest_list(void); +const gnutls_compression_method_t *gnutls_compression_list(void); +const gnutls_protocol_t *gnutls_protocol_list(void); +const gnutls_certificate_type_t *gnutls_certificate_type_list(void); +const gnutls_kx_algorithm_t *gnutls_kx_list(void); +const gnutls_pk_algorithm_t *gnutls_pk_list(void); +const gnutls_sign_algorithm_t *gnutls_sign_list(void); +const char *gnutls_cipher_suite_info(size_t idx, + unsigned char *cs_id, + gnutls_kx_algorithm_t * kx, + gnutls_cipher_algorithm_t * cipher, + gnutls_mac_algorithm_t * mac, + gnutls_protocol_t * min_version); + + /* error functions */ +int gnutls_error_is_fatal(int error); +int gnutls_error_to_alert(int err, int *level); + +void gnutls_perror(int error); +const char *gnutls_strerror(int error); +const char *gnutls_strerror_name(int error); + +/* Semi-internal functions. + */ +void gnutls_handshake_set_private_extensions(gnutls_session_t session, + int allow); +int gnutls_handshake_set_random(gnutls_session_t session, + const gnutls_datum_t * random); + +gnutls_handshake_description_t +gnutls_handshake_get_last_out(gnutls_session_t session); +gnutls_handshake_description_t +gnutls_handshake_get_last_in(gnutls_session_t session); + +/* Record layer functions. + */ +#define GNUTLS_HEARTBEAT_WAIT 1 +int gnutls_heartbeat_ping(gnutls_session_t session, size_t data_size, + unsigned int max_tries, unsigned int flags); +int gnutls_heartbeat_pong(gnutls_session_t session, unsigned int flags); + +void gnutls_record_set_timeout(gnutls_session_t session, unsigned int ms); +void gnutls_record_disable_padding(gnutls_session_t session); + +void gnutls_record_cork(gnutls_session_t session); +#define GNUTLS_RECORD_WAIT 1 +int gnutls_record_uncork(gnutls_session_t session, unsigned int flags); + +typedef struct { + size_t low; + size_t high; +} gnutls_range_st; + +int gnutls_range_split(gnutls_session_t session, + const gnutls_range_st * orig, + gnutls_range_st * small_range, + gnutls_range_st * rem_range); + +ssize_t gnutls_record_send(gnutls_session_t session, const void *data, + size_t data_size); +ssize_t gnutls_record_send_range(gnutls_session_t session, + const void *data, size_t data_size, + const gnutls_range_st * range); +ssize_t gnutls_record_recv(gnutls_session_t session, void *data, + size_t data_size); +#define gnutls_read gnutls_record_recv +#define gnutls_write gnutls_record_send +ssize_t gnutls_record_recv_seq(gnutls_session_t session, void *data, + size_t data_size, unsigned char *seq); + +size_t gnutls_record_overhead_size(gnutls_session_t session); + +size_t gnutls_est_record_overhead_size(gnutls_protocol_t version, + gnutls_cipher_algorithm_t cipher, + gnutls_mac_algorithm_t mac, + gnutls_compression_method_t comp, + unsigned int flags); + +void gnutls_session_enable_compatibility_mode(gnutls_session_t session); +void gnutls_record_set_max_empty_records(gnutls_session_t session, + const unsigned int i); + +int gnutls_record_can_use_length_hiding(gnutls_session_t session); + +int gnutls_record_get_direction(gnutls_session_t session); + +size_t gnutls_record_get_max_size(gnutls_session_t session); +ssize_t gnutls_record_set_max_size(gnutls_session_t session, size_t size); + +size_t gnutls_record_check_pending(gnutls_session_t session); +size_t gnutls_record_check_corked(gnutls_session_t session); + +void gnutls_session_force_valid(gnutls_session_t session); + +int gnutls_prf(gnutls_session_t session, + size_t label_size, const char *label, + int server_random_first, + size_t extra_size, const char *extra, + size_t outsize, char *out); + +int gnutls_prf_raw(gnutls_session_t session, + size_t label_size, const char *label, + size_t seed_size, const char *seed, + size_t outsize, char *out); + +/** + * gnutls_server_name_type_t: + * @GNUTLS_NAME_DNS: Domain Name System name type. + * + * Enumeration of different server name types. + */ +typedef enum { + GNUTLS_NAME_DNS = 1 +} gnutls_server_name_type_t; + +int gnutls_server_name_set(gnutls_session_t session, + gnutls_server_name_type_t type, + const void *name, size_t name_length); + +int gnutls_server_name_get(gnutls_session_t session, + void *data, size_t * data_length, + unsigned int *type, unsigned int indx); + +unsigned int gnutls_heartbeat_get_timeout(gnutls_session_t session); +void gnutls_heartbeat_set_timeouts(gnutls_session_t session, + unsigned int retrans_timeout, + unsigned int total_timeout); + +#define GNUTLS_HB_PEER_ALLOWED_TO_SEND (1) +#define GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND (1<<1) + + /* Heartbeat */ +void gnutls_heartbeat_enable(gnutls_session_t session, unsigned int type); + +#define GNUTLS_HB_LOCAL_ALLOWED_TO_SEND (1<<2) +int gnutls_heartbeat_allowed(gnutls_session_t session, unsigned int type); + + /* Safe renegotiation */ +int gnutls_safe_renegotiation_status(gnutls_session_t session); + +/** + * gnutls_supplemental_data_format_type_t: + * @GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA: Supplemental user mapping data. + * + * Enumeration of different supplemental data types (RFC 4680). + */ +typedef enum { + GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0 +} gnutls_supplemental_data_format_type_t; + +const char +*gnutls_supplemental_get_name(gnutls_supplemental_data_format_type_t type); + + /* SessionTicket, RFC 5077. */ +int gnutls_session_ticket_key_generate(gnutls_datum_t * key); +int gnutls_session_ticket_enable_client(gnutls_session_t session); +int gnutls_session_ticket_enable_server(gnutls_session_t session, + const gnutls_datum_t * key); + + /* SRTP, RFC 5764 */ + +/** + * gnutls_srtp_profile_t: + * @GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80: 128 bit AES with a 80 bit HMAC-SHA1 + * @GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32: 128 bit AES with a 32 bit HMAC-SHA1 + * @GNUTLS_SRTP_NULL_HMAC_SHA1_80: NULL cipher with a 80 bit HMAC-SHA1 + * @GNUTLS_SRTP_NULL_HMAC_SHA1_32: NULL cipher with a 32 bit HMAC-SHA1 + * + * Enumeration of different SRTP protection profiles. + */ +typedef enum { + GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80 = 0x0001, + GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32 = 0x0002, + GNUTLS_SRTP_NULL_HMAC_SHA1_80 = 0x0005, + GNUTLS_SRTP_NULL_HMAC_SHA1_32 = 0x0006 +} gnutls_srtp_profile_t; + +int gnutls_srtp_set_profile(gnutls_session_t session, + gnutls_srtp_profile_t profile); +int gnutls_srtp_set_profile_direct(gnutls_session_t session, + const char *profiles, + const char **err_pos); +int gnutls_srtp_get_selected_profile(gnutls_session_t session, + gnutls_srtp_profile_t * profile); + +const char *gnutls_srtp_get_profile_name(gnutls_srtp_profile_t profile); +int gnutls_srtp_get_profile_id(const char *name, + gnutls_srtp_profile_t * profile); +int gnutls_srtp_get_keys(gnutls_session_t session, + void *key_material, + unsigned int key_material_size, + gnutls_datum_t * client_key, + gnutls_datum_t * client_salt, + gnutls_datum_t * server_key, + gnutls_datum_t * server_salt); + +int gnutls_srtp_set_mki(gnutls_session_t session, + const gnutls_datum_t * mki); +int gnutls_srtp_get_mki(gnutls_session_t session, gnutls_datum_t * mki); + +/* ALPN TLS extension */ +#define GNUTLS_ALPN_MAND 1 +int gnutls_alpn_get_selected_protocol(gnutls_session_t session, + gnutls_datum_t * protocol); +int gnutls_alpn_set_protocols(gnutls_session_t session, + const gnutls_datum_t * protocols, + unsigned protocols_size, unsigned flags); + +int gnutls_key_generate(gnutls_datum_t * key, unsigned int key_size); + +/* if you just want some defaults, use the following. + */ +int gnutls_priority_init(gnutls_priority_t * priority_cache, + const char *priorities, const char **err_pos); +void gnutls_priority_deinit(gnutls_priority_t priority_cache); +int gnutls_priority_get_cipher_suite_index(gnutls_priority_t pcache, + unsigned int idx, + unsigned int *sidx); + +int gnutls_priority_set(gnutls_session_t session, + gnutls_priority_t priority); +int gnutls_priority_set_direct(gnutls_session_t session, + const char *priorities, + const char **err_pos); + +int gnutls_priority_certificate_type_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_sign_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_protocol_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_compression_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_ecc_curve_list(gnutls_priority_t pcache, + const unsigned int **list); + +int gnutls_priority_kx_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_cipher_list(gnutls_priority_t pcache, + const unsigned int **list); +int gnutls_priority_mac_list(gnutls_priority_t pcache, + const unsigned int **list); + + /* for compatibility + */ +int gnutls_set_default_priority(gnutls_session_t session); + +/* Returns the name of a cipher suite */ +const char *gnutls_cipher_suite_get_name(gnutls_kx_algorithm_t + kx_algorithm, + gnutls_cipher_algorithm_t + cipher_algorithm, + gnutls_mac_algorithm_t + mac_algorithm); + +/* get the currently used protocol version */ +gnutls_protocol_t gnutls_protocol_get_version(gnutls_session_t session); + +const char *gnutls_protocol_get_name(gnutls_protocol_t version); + + +/* get/set session + */ +int gnutls_session_set_data(gnutls_session_t session, + const void *session_data, + size_t session_data_size); +int gnutls_session_get_data(gnutls_session_t session, void *session_data, + size_t * session_data_size); +int gnutls_session_get_data2(gnutls_session_t session, + gnutls_datum_t * data); +void gnutls_session_get_random(gnutls_session_t session, + gnutls_datum_t * client, + gnutls_datum_t * server); +char *gnutls_session_get_desc(gnutls_session_t session); + +int gnutls_session_set_premaster(gnutls_session_t session, + unsigned int entity, + gnutls_protocol_t version, + gnutls_kx_algorithm_t kx, + gnutls_cipher_algorithm_t cipher, + gnutls_mac_algorithm_t mac, + gnutls_compression_method_t comp, + const gnutls_datum_t * master, + const gnutls_datum_t * session_id); + +/* returns the session ID */ +#define GNUTLS_MAX_SESSION_ID 32 +int gnutls_session_get_id(gnutls_session_t session, void *session_id, + size_t * session_id_size); +int gnutls_session_get_id2(gnutls_session_t session, + gnutls_datum_t * session_id); + +int gnutls_session_set_id(gnutls_session_t session, + const gnutls_datum_t * sid); + +int gnutls_session_channel_binding(gnutls_session_t session, + gnutls_channel_binding_t cbtype, + gnutls_datum_t * cb); + +/* checks if this session is a resumed one + */ +int gnutls_session_is_resumed(gnutls_session_t session); +int gnutls_session_resumption_requested(gnutls_session_t session); + +typedef int (*gnutls_db_store_func) (void *, gnutls_datum_t key, + gnutls_datum_t data); +typedef int (*gnutls_db_remove_func) (void *, gnutls_datum_t key); +typedef gnutls_datum_t(*gnutls_db_retr_func) (void *, gnutls_datum_t key); + +void gnutls_db_set_cache_expiration(gnutls_session_t session, int seconds); +unsigned gnutls_db_get_default_cache_expiration(void); + +void gnutls_db_remove_session(gnutls_session_t session); +void gnutls_db_set_retrieve_function(gnutls_session_t session, + gnutls_db_retr_func retr_func); +void gnutls_db_set_remove_function(gnutls_session_t session, + gnutls_db_remove_func rem_func); +void gnutls_db_set_store_function(gnutls_session_t session, + gnutls_db_store_func store_func); +void gnutls_db_set_ptr(gnutls_session_t session, void *ptr); +void *gnutls_db_get_ptr(gnutls_session_t session); +int gnutls_db_check_entry(gnutls_session_t session, + gnutls_datum_t session_entry); +time_t gnutls_db_check_entry_time(gnutls_datum_t * entry); + + /** + * gnutls_handshake_hook_func: + * @session: the current session + * @htype: the type of the handshake message (%gnutls_handshake_description_t) + * @post: non zero if this is a post-process/generation call and zero otherwise + * @incoming: non zero if this is an incoming message and zero if this is an outgoing message + * + * Function prototype for handshake hooks. It is set using + * gnutls_handshake_set_hook_function(). + * + * Returns: Non zero on error. + */ +#define GNUTLS_HOOK_POST (1) +#define GNUTLS_HOOK_PRE (0) +#define GNUTLS_HOOK_BOTH (-1) + +typedef int (*gnutls_handshake_hook_func) (gnutls_session_t, + unsigned int htype, + unsigned post, + unsigned int incoming); +void gnutls_handshake_set_hook_function(gnutls_session_t session, + unsigned int htype, int post, + gnutls_handshake_hook_func func); + +typedef int (*gnutls_handshake_post_client_hello_func) (gnutls_session_t); +void +gnutls_handshake_set_post_client_hello_function(gnutls_session_t session, + gnutls_handshake_post_client_hello_func + func); + +void gnutls_handshake_set_max_packet_length(gnutls_session_t session, + size_t max); + +/* returns libgnutls version (call it with a NULL argument) + */ +const char *gnutls_check_version(const char *req_version); + +/* Functions for setting/clearing credentials + */ +void gnutls_credentials_clear(gnutls_session_t session); + +/* cred is a structure defined by the kx algorithm + */ +int gnutls_credentials_set(gnutls_session_t session, + gnutls_credentials_type_t type, void *cred); +#define gnutls_cred_set gnutls_credentials_set + +/* x.509 types */ + +struct gnutls_pubkey_st; +typedef struct gnutls_pubkey_st *gnutls_pubkey_t; + +struct gnutls_privkey_st; +typedef struct gnutls_privkey_st *gnutls_privkey_t; + +struct gnutls_x509_privkey_int; +typedef struct gnutls_x509_privkey_int *gnutls_x509_privkey_t; + +struct gnutls_x509_crl_int; +typedef struct gnutls_x509_crl_int *gnutls_x509_crl_t; + +struct gnutls_x509_crt_int; +typedef struct gnutls_x509_crt_int *gnutls_x509_crt_t; + +struct gnutls_x509_crq_int; +typedef struct gnutls_x509_crq_int *gnutls_x509_crq_t; + +struct gnutls_openpgp_keyring_int; +typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring_t; + + +/* Credential structures - used in gnutls_credentials_set(); */ + +struct gnutls_certificate_credentials_st; +typedef struct gnutls_certificate_credentials_st +*gnutls_certificate_credentials_t; +typedef gnutls_certificate_credentials_t + gnutls_certificate_server_credentials; +typedef gnutls_certificate_credentials_t + gnutls_certificate_client_credentials; + +typedef struct gnutls_anon_server_credentials_st +*gnutls_anon_server_credentials_t; +typedef struct gnutls_anon_client_credentials_st +*gnutls_anon_client_credentials_t; + +void gnutls_anon_free_server_credentials(gnutls_anon_server_credentials_t + sc); +int +gnutls_anon_allocate_server_credentials(gnutls_anon_server_credentials_t + * sc); + +void gnutls_anon_set_server_dh_params(gnutls_anon_server_credentials_t res, + gnutls_dh_params_t dh_params); + +void +gnutls_anon_set_server_params_function(gnutls_anon_server_credentials_t + res, gnutls_params_function * func); + +void +gnutls_anon_free_client_credentials(gnutls_anon_client_credentials_t sc); +int +gnutls_anon_allocate_client_credentials(gnutls_anon_client_credentials_t + * sc); + +/* CERTFILE is an x509 certificate in PEM form. + * KEYFILE is a pkcs-1 private key in PEM form (for RSA keys). + */ +void +gnutls_certificate_free_credentials(gnutls_certificate_credentials_t sc); +int +gnutls_certificate_allocate_credentials(gnutls_certificate_credentials_t + * res); + +int +gnutls_certificate_get_issuer(gnutls_certificate_credentials_t sc, + gnutls_x509_crt_t cert, + gnutls_x509_crt_t * issuer, + unsigned int flags); + +int gnutls_certificate_get_crt_raw(gnutls_certificate_credentials_t sc, + unsigned idx1, unsigned idx2, + gnutls_datum_t * cert); + +void gnutls_certificate_free_keys(gnutls_certificate_credentials_t sc); +void gnutls_certificate_free_cas(gnutls_certificate_credentials_t sc); +void gnutls_certificate_free_ca_names(gnutls_certificate_credentials_t sc); +void gnutls_certificate_free_crls(gnutls_certificate_credentials_t sc); + +void gnutls_certificate_set_dh_params(gnutls_certificate_credentials_t res, + gnutls_dh_params_t dh_params); +void gnutls_certificate_set_verify_flags(gnutls_certificate_credentials_t + res, unsigned int flags); +void gnutls_certificate_set_verify_limits(gnutls_certificate_credentials_t + res, unsigned int max_bits, + unsigned int max_depth); + +int +gnutls_certificate_set_x509_system_trust(gnutls_certificate_credentials_t + cred); + +int +gnutls_certificate_set_x509_trust_file(gnutls_certificate_credentials_t + cred, const char *cafile, + gnutls_x509_crt_fmt_t type); +int gnutls_certificate_set_x509_trust_mem(gnutls_certificate_credentials_t + res, const gnutls_datum_t * ca, + gnutls_x509_crt_fmt_t type); + +int +gnutls_certificate_set_x509_crl_file(gnutls_certificate_credentials_t + res, const char *crlfile, + gnutls_x509_crt_fmt_t type); +int gnutls_certificate_set_x509_crl_mem(gnutls_certificate_credentials_t + res, const gnutls_datum_t * CRL, + gnutls_x509_crt_fmt_t type); + +int +gnutls_certificate_set_x509_key_file(gnutls_certificate_credentials_t + res, const char *certfile, + const char *keyfile, + gnutls_x509_crt_fmt_t type); + +int +gnutls_certificate_set_x509_key_file2(gnutls_certificate_credentials_t + res, const char *certfile, + const char *keyfile, + gnutls_x509_crt_fmt_t type, + const char *pass, + unsigned int flags); + +int gnutls_certificate_set_x509_key_mem(gnutls_certificate_credentials_t + res, const gnutls_datum_t * cert, + const gnutls_datum_t * key, + gnutls_x509_crt_fmt_t type); + +int gnutls_certificate_set_x509_key_mem2(gnutls_certificate_credentials_t + res, const gnutls_datum_t * cert, + const gnutls_datum_t * key, + gnutls_x509_crt_fmt_t type, + const char *pass, + unsigned int flags); + +void gnutls_certificate_send_x509_rdn_sequence(gnutls_session_t session, + int status); + +int +gnutls_certificate_set_x509_simple_pkcs12_file +(gnutls_certificate_credentials_t res, const char *pkcs12file, + gnutls_x509_crt_fmt_t type, const char *password); +int +gnutls_certificate_set_x509_simple_pkcs12_mem +(gnutls_certificate_credentials_t res, const gnutls_datum_t * p12blob, + gnutls_x509_crt_fmt_t type, const char *password); + +/* New functions to allow setting already parsed X.509 stuff. + */ + +int gnutls_certificate_set_x509_key(gnutls_certificate_credentials_t res, + gnutls_x509_crt_t * cert_list, + int cert_list_size, + gnutls_x509_privkey_t key); +int gnutls_certificate_set_x509_trust(gnutls_certificate_credentials_t res, + gnutls_x509_crt_t * ca_list, + int ca_list_size); +int gnutls_certificate_set_x509_crl(gnutls_certificate_credentials_t res, + gnutls_x509_crl_t * crl_list, + int crl_list_size); + + /* OCSP status request extension, RFC 6066 */ +typedef int (*gnutls_status_request_ocsp_func) + (gnutls_session_t session, void *ptr, gnutls_datum_t * ocsp_response); + +void +gnutls_certificate_set_ocsp_status_request_function +(gnutls_certificate_credentials_t res, +gnutls_status_request_ocsp_func ocsp_func, void *ptr); + +int +gnutls_certificate_set_ocsp_status_request_file +(gnutls_certificate_credentials_t res, const char *response_file, + unsigned int flags); + +int gnutls_ocsp_status_request_enable_client(gnutls_session_t session, + gnutls_datum_t * responder_id, + size_t responder_id_size, + gnutls_datum_t * + request_extensions); + +int gnutls_ocsp_status_request_get(gnutls_session_t session, + gnutls_datum_t * response); + +int gnutls_ocsp_status_request_is_checked(gnutls_session_t session, + unsigned int flags); + +/* global state functions + */ +int gnutls_global_init(void); +void gnutls_global_deinit(void); + + /** + * gnutls_time_func: + * @t: where to store time. + * + * Function prototype for time()-like function. Set with + * gnutls_global_set_time_function(). + * + * Returns: Number of seconds since the epoch, or (time_t)-1 on errors. + */ +typedef time_t(*gnutls_time_func) (time_t * t); + +typedef int (*mutex_init_func) (void **mutex); +typedef int (*mutex_lock_func) (void **mutex); +typedef int (*mutex_unlock_func) (void **mutex); +typedef int (*mutex_deinit_func) (void **mutex); + +void gnutls_global_set_mutex(mutex_init_func init, + mutex_deinit_func deinit, + mutex_lock_func lock, + mutex_unlock_func unlock); + +typedef void *(*gnutls_alloc_function) (size_t); +typedef void *(*gnutls_calloc_function) (size_t, size_t); +typedef int (*gnutls_is_secure_function) (const void *); +typedef void (*gnutls_free_function) (void *); +typedef void *(*gnutls_realloc_function) (void *, size_t); + +void +gnutls_global_set_mem_functions(gnutls_alloc_function alloc_func, + gnutls_alloc_function secure_alloc_func, + gnutls_is_secure_function is_secure_func, + gnutls_realloc_function realloc_func, + gnutls_free_function free_func); + +void gnutls_global_set_time_function(gnutls_time_func time_func); + +/* For use in callbacks */ +extern gnutls_alloc_function gnutls_malloc; +extern gnutls_alloc_function gnutls_secure_malloc; +extern gnutls_realloc_function gnutls_realloc; +extern gnutls_calloc_function gnutls_calloc; +extern gnutls_free_function gnutls_free; + +extern char *(*gnutls_strdup) (const char *); + +typedef void (*gnutls_log_func) (int, const char *); +typedef void (*gnutls_audit_log_func) (gnutls_session_t, const char *); +void gnutls_global_set_log_function(gnutls_log_func log_func); +void gnutls_global_set_audit_log_function(gnutls_audit_log_func log_func); +void gnutls_global_set_log_level(int level); + +/* Diffie-Hellman parameter handling. + */ +int gnutls_dh_params_init(gnutls_dh_params_t * dh_params); +void gnutls_dh_params_deinit(gnutls_dh_params_t dh_params); +int gnutls_dh_params_import_raw(gnutls_dh_params_t dh_params, + const gnutls_datum_t * prime, + const gnutls_datum_t * generator); +int gnutls_dh_params_import_pkcs3(gnutls_dh_params_t params, + const gnutls_datum_t * pkcs3_params, + gnutls_x509_crt_fmt_t format); +int gnutls_dh_params_generate2(gnutls_dh_params_t params, + unsigned int bits); +int gnutls_dh_params_export_pkcs3(gnutls_dh_params_t params, + gnutls_x509_crt_fmt_t format, + unsigned char *params_data, + size_t * params_data_size); +int gnutls_dh_params_export2_pkcs3(gnutls_dh_params_t params, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); +int gnutls_dh_params_export_raw(gnutls_dh_params_t params, + gnutls_datum_t * prime, + gnutls_datum_t * generator, + unsigned int *bits); +int gnutls_dh_params_cpy(gnutls_dh_params_t dst, gnutls_dh_params_t src); + + + +/* Session stuff + */ +typedef struct { + void *iov_base; /* Starting address */ + size_t iov_len; /* Number of bytes to transfer */ +} giovec_t; + +typedef ssize_t(*gnutls_pull_func) (gnutls_transport_ptr_t, void *, + size_t); +typedef ssize_t(*gnutls_push_func) (gnutls_transport_ptr_t, const void *, + size_t); + +typedef int (*gnutls_pull_timeout_func) (gnutls_transport_ptr_t, + unsigned int ms); + +typedef ssize_t(*gnutls_vec_push_func) (gnutls_transport_ptr_t, + const giovec_t * iov, int iovcnt); + +typedef int (*gnutls_errno_func) (gnutls_transport_ptr_t); + +#if 0 + /* This will be defined as macro. */ + void gnutls_transport_set_int (gnutls_session_t session, int r); +#endif + +void gnutls_transport_set_int2(gnutls_session_t session, int r, int s); +#define gnutls_transport_set_int(s, i) gnutls_transport_set_int2(s, i, i) + +void gnutls_transport_get_int2(gnutls_session_t session, int *r, int *s); +int gnutls_transport_get_int(gnutls_session_t session); + +void gnutls_transport_set_ptr(gnutls_session_t session, + gnutls_transport_ptr_t ptr); +void gnutls_transport_set_ptr2(gnutls_session_t session, + gnutls_transport_ptr_t recv_ptr, + gnutls_transport_ptr_t send_ptr); + +gnutls_transport_ptr_t gnutls_transport_get_ptr(gnutls_session_t session); +void gnutls_transport_get_ptr2(gnutls_session_t session, + gnutls_transport_ptr_t * recv_ptr, + gnutls_transport_ptr_t * send_ptr); + +void gnutls_transport_set_vec_push_function(gnutls_session_t session, + gnutls_vec_push_func vec_func); +void gnutls_transport_set_push_function(gnutls_session_t session, + gnutls_push_func push_func); +void gnutls_transport_set_pull_function(gnutls_session_t session, + gnutls_pull_func pull_func); + +void gnutls_transport_set_pull_timeout_function(gnutls_session_t session, + gnutls_pull_timeout_func + func); + +void gnutls_transport_set_errno_function(gnutls_session_t session, + gnutls_errno_func errno_func); + +void gnutls_transport_set_errno(gnutls_session_t session, int err); + +/* session specific + */ +void gnutls_session_set_ptr(gnutls_session_t session, void *ptr); +void *gnutls_session_get_ptr(gnutls_session_t session); + +void gnutls_openpgp_send_cert(gnutls_session_t session, + gnutls_openpgp_crt_status_t status); + +/* This function returns the hash of the given data. + */ +int gnutls_fingerprint(gnutls_digest_algorithm_t algo, + const gnutls_datum_t * data, void *result, + size_t * result_size); + + /** + * gnutls_random_art_t: + * @GNUTLS_RANDOM_ART_OPENSSH: OpenSSH-style random art. + * + * Enumeration of different random art types. + */ +typedef enum gnutls_random_art { + GNUTLS_RANDOM_ART_OPENSSH = 1, +} gnutls_random_art_t; + +int gnutls_random_art(gnutls_random_art_t type, + const char *key_type, unsigned int key_size, + void *fpr, size_t fpr_size, gnutls_datum_t * art); + +/* SRP + */ + +typedef struct gnutls_srp_server_credentials_st +*gnutls_srp_server_credentials_t; +typedef struct gnutls_srp_client_credentials_st +*gnutls_srp_client_credentials_t; + +void +gnutls_srp_free_client_credentials(gnutls_srp_client_credentials_t sc); +int +gnutls_srp_allocate_client_credentials(gnutls_srp_client_credentials_t * + sc); +int gnutls_srp_set_client_credentials(gnutls_srp_client_credentials_t res, + const char *username, + const char *password); + +void +gnutls_srp_free_server_credentials(gnutls_srp_server_credentials_t sc); +int +gnutls_srp_allocate_server_credentials(gnutls_srp_server_credentials_t * + sc); +int gnutls_srp_set_server_credentials_file(gnutls_srp_server_credentials_t + res, const char *password_file, + const char *password_conf_file); + +const char *gnutls_srp_server_get_username(gnutls_session_t session); + +void gnutls_srp_set_prime_bits(gnutls_session_t session, + unsigned int bits); + +int gnutls_srp_verifier(const char *username, + const char *password, + const gnutls_datum_t * salt, + const gnutls_datum_t * generator, + const gnutls_datum_t * prime, + gnutls_datum_t * res); + +/* The static parameters defined in draft-ietf-tls-srp-05 + * Those should be used as input to gnutls_srp_verifier(). + */ +extern const gnutls_datum_t gnutls_srp_4096_group_prime; +extern const gnutls_datum_t gnutls_srp_4096_group_generator; + +extern const gnutls_datum_t gnutls_srp_3072_group_prime; +extern const gnutls_datum_t gnutls_srp_3072_group_generator; + +extern const gnutls_datum_t gnutls_srp_2048_group_prime; +extern const gnutls_datum_t gnutls_srp_2048_group_generator; + +extern const gnutls_datum_t gnutls_srp_1536_group_prime; +extern const gnutls_datum_t gnutls_srp_1536_group_generator; + +extern const gnutls_datum_t gnutls_srp_1024_group_prime; +extern const gnutls_datum_t gnutls_srp_1024_group_generator; + +typedef int gnutls_srp_server_credentials_function(gnutls_session_t, + const char *username, + gnutls_datum_t * salt, + gnutls_datum_t * + verifier, + gnutls_datum_t * + generator, + gnutls_datum_t * prime); +void +gnutls_srp_set_server_credentials_function(gnutls_srp_server_credentials_t + cred, + gnutls_srp_server_credentials_function + * func); + +typedef int gnutls_srp_client_credentials_function(gnutls_session_t, + char **, char **); +void +gnutls_srp_set_client_credentials_function(gnutls_srp_client_credentials_t + cred, + gnutls_srp_client_credentials_function + * func); + +int gnutls_srp_base64_encode(const gnutls_datum_t * data, char *result, + size_t * result_size); +int gnutls_srp_base64_encode_alloc(const gnutls_datum_t * data, + gnutls_datum_t * result); + +int gnutls_srp_base64_decode(const gnutls_datum_t * b64_data, char *result, + size_t * result_size); +int gnutls_srp_base64_decode_alloc(const gnutls_datum_t * b64_data, + gnutls_datum_t * result); + +/* PSK stuff */ +typedef struct gnutls_psk_server_credentials_st +*gnutls_psk_server_credentials_t; +typedef struct gnutls_psk_client_credentials_st +*gnutls_psk_client_credentials_t; + +/** + * gnutls_psk_key_flags: + * @GNUTLS_PSK_KEY_RAW: PSK-key in raw format. + * @GNUTLS_PSK_KEY_HEX: PSK-key in hex format. + * + * Enumeration of different PSK key flags. + */ +typedef enum gnutls_psk_key_flags { + GNUTLS_PSK_KEY_RAW = 0, + GNUTLS_PSK_KEY_HEX +} gnutls_psk_key_flags; + +void +gnutls_psk_free_client_credentials(gnutls_psk_client_credentials_t sc); +int +gnutls_psk_allocate_client_credentials(gnutls_psk_client_credentials_t * + sc); +int gnutls_psk_set_client_credentials(gnutls_psk_client_credentials_t res, + const char *username, + const gnutls_datum_t * key, + gnutls_psk_key_flags flags); + +void +gnutls_psk_free_server_credentials(gnutls_psk_server_credentials_t sc); +int +gnutls_psk_allocate_server_credentials(gnutls_psk_server_credentials_t * + sc); +int gnutls_psk_set_server_credentials_file(gnutls_psk_server_credentials_t + res, const char *password_file); + +int +gnutls_psk_set_server_credentials_hint(gnutls_psk_server_credentials_t + res, const char *hint); + +const char *gnutls_psk_server_get_username(gnutls_session_t session); +const char *gnutls_psk_client_get_hint(gnutls_session_t session); + +typedef int gnutls_psk_server_credentials_function(gnutls_session_t, + const char *username, + gnutls_datum_t * key); +void +gnutls_psk_set_server_credentials_function(gnutls_psk_server_credentials_t + cred, + gnutls_psk_server_credentials_function + * func); + +typedef int gnutls_psk_client_credentials_function(gnutls_session_t, + char **username, + gnutls_datum_t * key); +void +gnutls_psk_set_client_credentials_function(gnutls_psk_client_credentials_t + cred, + gnutls_psk_client_credentials_function + * func); + +int gnutls_hex_encode(const gnutls_datum_t * data, char *result, + size_t * result_size); +int gnutls_hex_decode(const gnutls_datum_t * hex_data, void *result, + size_t * result_size); + +void +gnutls_psk_set_server_dh_params(gnutls_psk_server_credentials_t res, + gnutls_dh_params_t dh_params); + +void +gnutls_psk_set_server_params_function(gnutls_psk_server_credentials_t + res, gnutls_params_function * func); + +/** + * gnutls_x509_subject_alt_name_t: + * @GNUTLS_SAN_DNSNAME: DNS-name SAN. + * @GNUTLS_SAN_RFC822NAME: E-mail address SAN. + * @GNUTLS_SAN_URI: URI SAN. + * @GNUTLS_SAN_IPADDRESS: IP address SAN. + * @GNUTLS_SAN_OTHERNAME: OtherName SAN. + * @GNUTLS_SAN_DN: DN SAN. + * @GNUTLS_SAN_OTHERNAME_XMPP: Virtual SAN, used by + * gnutls_x509_crt_get_subject_alt_othername_oid. + * + * Enumeration of different subject alternative names types. + */ +typedef enum gnutls_x509_subject_alt_name_t { + GNUTLS_SAN_DNSNAME = 1, + GNUTLS_SAN_RFC822NAME = 2, + GNUTLS_SAN_URI = 3, + GNUTLS_SAN_IPADDRESS = 4, + GNUTLS_SAN_OTHERNAME = 5, + GNUTLS_SAN_DN = 6, + /* The following are "virtual" subject alternative name types, in + that they are represented by an otherName value and an OID. + Used by gnutls_x509_crt_get_subject_alt_othername_oid. */ + GNUTLS_SAN_OTHERNAME_XMPP = 1000 +} gnutls_x509_subject_alt_name_t; + +struct gnutls_openpgp_crt_int; +typedef struct gnutls_openpgp_crt_int *gnutls_openpgp_crt_t; + +struct gnutls_openpgp_privkey_int; +typedef struct gnutls_openpgp_privkey_int *gnutls_openpgp_privkey_t; + +struct gnutls_pkcs11_privkey_st; +typedef struct gnutls_pkcs11_privkey_st *gnutls_pkcs11_privkey_t; + +/** + * gnutls_privkey_type_t: + * @GNUTLS_PRIVKEY_X509: X.509 private key, #gnutls_x509_privkey_t. + * @GNUTLS_PRIVKEY_OPENPGP: OpenPGP private key, #gnutls_openpgp_privkey_t. + * @GNUTLS_PRIVKEY_PKCS11: PKCS11 private key, #gnutls_pkcs11_privkey_t. + * @GNUTLS_PRIVKEY_EXT: External private key, operating using callbacks. + * + * Enumeration of different private key types. + */ +typedef enum { + GNUTLS_PRIVKEY_X509, + GNUTLS_PRIVKEY_OPENPGP, + GNUTLS_PRIVKEY_PKCS11, + GNUTLS_PRIVKEY_EXT +} gnutls_privkey_type_t; + +typedef struct gnutls_retr2_st { + gnutls_certificate_type_t cert_type; + gnutls_privkey_type_t key_type; + + union { + gnutls_x509_crt_t *x509; + gnutls_openpgp_crt_t pgp; + } cert; + unsigned int ncerts; /* one for pgp keys */ + + union { + gnutls_x509_privkey_t x509; + gnutls_openpgp_privkey_t pgp; + gnutls_pkcs11_privkey_t pkcs11; + } key; + + unsigned int deinit_all; /* if non zero all keys will be deinited */ +} gnutls_retr2_st; + + + /* Functions that allow auth_info_t structures handling + */ + +gnutls_credentials_type_t gnutls_auth_get_type(gnutls_session_t session); +gnutls_credentials_type_t +gnutls_auth_server_get_type(gnutls_session_t session); +gnutls_credentials_type_t +gnutls_auth_client_get_type(gnutls_session_t session); + + /* DH */ + +void gnutls_dh_set_prime_bits(gnutls_session_t session, unsigned int bits); +int gnutls_dh_get_secret_bits(gnutls_session_t session); +int gnutls_dh_get_peers_public_bits(gnutls_session_t session); +int gnutls_dh_get_prime_bits(gnutls_session_t session); + +int gnutls_dh_get_group(gnutls_session_t session, gnutls_datum_t * raw_gen, + gnutls_datum_t * raw_prime); +int gnutls_dh_get_pubkey(gnutls_session_t session, + gnutls_datum_t * raw_key); + + /* X509PKI */ + + + /* These are set on the credentials structure. + */ + + /* use gnutls_certificate_set_retrieve_function2() in abstract.h + * instead. It's much more efficient. + */ + +typedef int gnutls_certificate_retrieve_function(gnutls_session_t, + const + gnutls_datum_t * + req_ca_rdn, + int nreqs, + const + gnutls_pk_algorithm_t + * pk_algos, + int + pk_algos_length, + gnutls_retr2_st *); + + +void +gnutls_certificate_set_retrieve_function(gnutls_certificate_credentials_t + cred, + gnutls_certificate_retrieve_function + * func); + +typedef int gnutls_certificate_verify_function(gnutls_session_t); +void +gnutls_certificate_set_verify_function(gnutls_certificate_credentials_t + cred, + gnutls_certificate_verify_function + * func); + +void +gnutls_certificate_server_set_request(gnutls_session_t session, + gnutls_certificate_request_t req); + + /* get data from the session + */ +const gnutls_datum_t *gnutls_certificate_get_peers(gnutls_session_t + session, unsigned int + *list_size); +const gnutls_datum_t *gnutls_certificate_get_ours(gnutls_session_t + session); + +int gnutls_certificate_get_peers_subkey_id(gnutls_session_t session, + gnutls_datum_t * id); + +time_t gnutls_certificate_activation_time_peers(gnutls_session_t session); +time_t gnutls_certificate_expiration_time_peers(gnutls_session_t session); + +int gnutls_certificate_client_get_request_status(gnutls_session_t session); +int gnutls_certificate_verify_peers2(gnutls_session_t session, + unsigned int *status); +int gnutls_certificate_verify_peers3(gnutls_session_t session, + const char *hostname, + unsigned int *status); + +int gnutls_certificate_verification_status_print(unsigned int status, + gnutls_certificate_type_t + type, + gnutls_datum_t * out, + unsigned int flags); + +int gnutls_pem_base64_encode(const char *msg, const gnutls_datum_t * data, + char *result, size_t * result_size); +int gnutls_pem_base64_decode(const char *header, + const gnutls_datum_t * b64_data, + unsigned char *result, size_t * result_size); + +int gnutls_pem_base64_encode_alloc(const char *msg, + const gnutls_datum_t * data, + gnutls_datum_t * result); +int gnutls_pem_base64_decode_alloc(const char *header, + const gnutls_datum_t * b64_data, + gnutls_datum_t * result); + + /* key_usage will be an OR of the following values: + */ + + /* when the key is to be used for signing: */ +#define GNUTLS_KEY_DIGITAL_SIGNATURE 128 +#define GNUTLS_KEY_NON_REPUDIATION 64 + /* when the key is to be used for encryption: */ +#define GNUTLS_KEY_KEY_ENCIPHERMENT 32 +#define GNUTLS_KEY_DATA_ENCIPHERMENT 16 +#define GNUTLS_KEY_KEY_AGREEMENT 8 +#define GNUTLS_KEY_KEY_CERT_SIGN 4 +#define GNUTLS_KEY_CRL_SIGN 2 +#define GNUTLS_KEY_ENCIPHER_ONLY 1 +#define GNUTLS_KEY_DECIPHER_ONLY 32768 + +void +gnutls_certificate_set_params_function(gnutls_certificate_credentials_t + res, gnutls_params_function * func); +void gnutls_anon_set_params_function(gnutls_anon_server_credentials_t res, + gnutls_params_function * func); +void gnutls_psk_set_params_function(gnutls_psk_server_credentials_t res, + gnutls_params_function * func); + +int gnutls_hex2bin(const char *hex_data, size_t hex_size, + void *bin_data, size_t * bin_size); + + /* Trust on first use (or ssh like) functions */ + + /* stores the provided information to a database + */ +typedef int (*gnutls_tdb_store_func) (const char *db_name, + const char *host, + const char *service, + time_t expiration, + const gnutls_datum_t * pubkey); + +typedef int (*gnutls_tdb_store_commitment_func) (const char *db_name, + const char *host, + const char *service, + time_t expiration, + gnutls_digest_algorithm_t + hash_algo, + const gnutls_datum_t * + hash); + + /* searches for the provided host/service pair that match the + * provided public key in the database. */ +typedef int (*gnutls_tdb_verify_func) (const char *db_name, + const char *host, + const char *service, + const gnutls_datum_t * pubkey); + + +struct gnutls_tdb_int; +typedef struct gnutls_tdb_int *gnutls_tdb_t; + +int gnutls_tdb_init(gnutls_tdb_t * tdb); +void gnutls_tdb_set_store_func(gnutls_tdb_t tdb, + gnutls_tdb_store_func store); +void gnutls_tdb_set_store_commitment_func(gnutls_tdb_t tdb, + gnutls_tdb_store_commitment_func + cstore); +void gnutls_tdb_set_verify_func(gnutls_tdb_t tdb, + gnutls_tdb_verify_func verify); +void gnutls_tdb_deinit(gnutls_tdb_t tdb); + +int gnutls_verify_stored_pubkey(const char *db_name, + gnutls_tdb_t tdb, + const char *host, + const char *service, + gnutls_certificate_type_t cert_type, + const gnutls_datum_t * cert, + unsigned int flags); + +int gnutls_store_commitment(const char *db_name, + gnutls_tdb_t tdb, + const char *host, + const char *service, + gnutls_digest_algorithm_t hash_algo, + const gnutls_datum_t * hash, + time_t expiration, unsigned int flags); + +int gnutls_store_pubkey(const char *db_name, + gnutls_tdb_t tdb, + const char *host, + const char *service, + gnutls_certificate_type_t cert_type, + const gnutls_datum_t * cert, + time_t expiration, unsigned int flags); + + /* Other helper functions */ +int gnutls_load_file(const char *filename, gnutls_datum_t * data); + +int gnutls_url_is_supported(const char *url); + + /* PIN callback */ + +/** + * gnutls_pin_flag_t: + * @GNUTLS_PIN_USER: The PIN for the user. + * @GNUTLS_PIN_SO: The PIN for the security officer (admin). + * @GNUTLS_PIN_CONTEXT_SPECIFIC: The PIN is for a specific action and key like signing. + * @GNUTLS_PIN_FINAL_TRY: This is the final try before blocking. + * @GNUTLS_PIN_COUNT_LOW: Few tries remain before token blocks. + * @GNUTLS_PIN_WRONG: Last given PIN was not correct. + * + * Enumeration of different flags that are input to the PIN function. + */ +typedef enum { + GNUTLS_PIN_USER = (1 << 0), + GNUTLS_PIN_SO = (1 << 1), + GNUTLS_PIN_FINAL_TRY = (1 << 2), + GNUTLS_PIN_COUNT_LOW = (1 << 3), + GNUTLS_PIN_CONTEXT_SPECIFIC = (1 << 4), + GNUTLS_PIN_WRONG = (1 << 5), +} gnutls_pin_flag_t; + +#define GNUTLS_PKCS11_PIN_USER GNUTLS_PIN_USER +#define GNUTLS_PKCS11_PIN_SO GNUTLS_PIN_SO +#define GNUTLS_PKCS11_PIN_FINAL_TRY GNUTLS_PIN_FINAL_TRY +#define GNUTLS_PKCS11_PIN_COUNT_LOW GNUTLS_PIN_COUNT_LOW +#define GNUTLS_PKCS11_PIN_CONTEXT_SPECIFIC GNUTLS_PIN_CONTEXT_SPECIFIC +#define GNUTLS_PKCS11_PIN_WRONG GNUTLS_PIN_WRONG + +/** + * gnutls_pin_callback_t: + * @userdata: user-controlled data from gnutls_pkcs11_set_pin_function(). + * @attempt: pin-attempt counter, initially 0. + * @token_url: URL of token. + * @token_label: label of token. + * @flags: a #gnutls_pin_flag_t flag. + * @pin: buffer to hold PIN, of size @pin_max. + * @pin_max: size of @pin buffer. + * + * Callback function type for PKCS#11 or TPM PIN entry. It is set by + * functions like gnutls_pkcs11_set_pin_function(). + * + * The callback should provides the PIN code to unlock the token with + * label @token_label, specified by the URL @token_url. + * + * The PIN code, as a NUL-terminated ASCII string, should be copied + * into the @pin buffer (of maximum size @pin_max), and return 0 to + * indicate success. Alternatively, the callback may return a + * negative gnutls error code to indicate failure and cancel PIN entry + * (in which case, the contents of the @pin parameter are ignored). + * + * When a PIN is required, the callback will be invoked repeatedly + * (and indefinitely) until either the returned PIN code is correct, + * the callback returns failure, or the token refuses login (e.g. when + * the token is locked due to too many incorrect PINs!). For the + * first such invocation, the @attempt counter will have value zero; + * it will increase by one for each subsequent attempt. + * + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. + * + * Since: 2.12.0 + **/ +typedef int (*gnutls_pin_callback_t) (void *userdata, int attempt, + const char *token_url, + const char *token_label, + unsigned int flags, + char *pin, size_t pin_max); + +void gnutls_certificate_set_pin_function(gnutls_certificate_credentials_t, + gnutls_pin_callback_t fn, + void *userdata); + + /* Gnutls error codes. The mapping to a TLS alert is also shown in + * comments. + */ + +#define GNUTLS_E_SUCCESS 0 +#define GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM -3 +#define GNUTLS_E_UNKNOWN_CIPHER_TYPE -6 +#define GNUTLS_E_LARGE_PACKET -7 +#define GNUTLS_E_UNSUPPORTED_VERSION_PACKET -8 /* GNUTLS_A_PROTOCOL_VERSION */ +#define GNUTLS_E_UNEXPECTED_PACKET_LENGTH -9 /* GNUTLS_A_RECORD_OVERFLOW */ +#define GNUTLS_E_INVALID_SESSION -10 +#define GNUTLS_E_FATAL_ALERT_RECEIVED -12 +#define GNUTLS_E_UNEXPECTED_PACKET -15 /* GNUTLS_A_UNEXPECTED_MESSAGE */ +#define GNUTLS_E_WARNING_ALERT_RECEIVED -16 +#define GNUTLS_E_ERROR_IN_FINISHED_PACKET -18 +#define GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET -19 +#define GNUTLS_E_UNKNOWN_CIPHER_SUITE -21 /* GNUTLS_A_HANDSHAKE_FAILURE */ +#define GNUTLS_E_UNWANTED_ALGORITHM -22 +#define GNUTLS_E_MPI_SCAN_FAILED -23 +#define GNUTLS_E_DECRYPTION_FAILED -24 /* GNUTLS_A_DECRYPTION_FAILED, GNUTLS_A_BAD_RECORD_MAC */ +#define GNUTLS_E_MEMORY_ERROR -25 +#define GNUTLS_E_DECOMPRESSION_FAILED -26 /* GNUTLS_A_DECOMPRESSION_FAILURE */ +#define GNUTLS_E_COMPRESSION_FAILED -27 +#define GNUTLS_E_AGAIN -28 +#define GNUTLS_E_EXPIRED -29 +#define GNUTLS_E_DB_ERROR -30 +#define GNUTLS_E_SRP_PWD_ERROR -31 +#define GNUTLS_E_INSUFFICIENT_CREDENTIALS -32 +#define GNUTLS_E_INSUFICIENT_CREDENTIALS GNUTLS_E_INSUFFICIENT_CREDENTIALS /* for backwards compatibility only */ +#define GNUTLS_E_INSUFFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS +#define GNUTLS_E_INSUFICIENT_CRED GNUTLS_E_INSUFFICIENT_CREDENTIALS /* for backwards compatibility only */ + +#define GNUTLS_E_HASH_FAILED -33 +#define GNUTLS_E_BASE64_DECODING_ERROR -34 + +#define GNUTLS_E_MPI_PRINT_FAILED -35 +#define GNUTLS_E_REHANDSHAKE -37 /* GNUTLS_A_NO_RENEGOTIATION */ +#define GNUTLS_E_GOT_APPLICATION_DATA -38 +#define GNUTLS_E_RECORD_LIMIT_REACHED -39 +#define GNUTLS_E_ENCRYPTION_FAILED -40 + +#define GNUTLS_E_PK_ENCRYPTION_FAILED -44 +#define GNUTLS_E_PK_DECRYPTION_FAILED -45 +#define GNUTLS_E_PK_SIGN_FAILED -46 +#define GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION -47 +#define GNUTLS_E_KEY_USAGE_VIOLATION -48 +#define GNUTLS_E_NO_CERTIFICATE_FOUND -49 /* GNUTLS_A_BAD_CERTIFICATE */ +#define GNUTLS_E_INVALID_REQUEST -50 +#define GNUTLS_E_SHORT_MEMORY_BUFFER -51 +#define GNUTLS_E_INTERRUPTED -52 +#define GNUTLS_E_PUSH_ERROR -53 +#define GNUTLS_E_PULL_ERROR -54 +#define GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER -55 /* GNUTLS_A_ILLEGAL_PARAMETER */ +#define GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE -56 +#define GNUTLS_E_PKCS1_WRONG_PAD -57 +#define GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION -58 +#define GNUTLS_E_INTERNAL_ERROR -59 +#define GNUTLS_E_DH_PRIME_UNACCEPTABLE -63 +#define GNUTLS_E_FILE_ERROR -64 +#define GNUTLS_E_TOO_MANY_EMPTY_PACKETS -78 +#define GNUTLS_E_UNKNOWN_PK_ALGORITHM -80 +#define GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS -81 + + /* returned if you need to generate temporary RSA + * parameters. These are needed for export cipher suites. + */ +#define GNUTLS_E_NO_TEMPORARY_RSA_PARAMS -84 + +#define GNUTLS_E_NO_COMPRESSION_ALGORITHMS -86 +#define GNUTLS_E_NO_CIPHER_SUITES -87 + +#define GNUTLS_E_OPENPGP_GETKEY_FAILED -88 +#define GNUTLS_E_PK_SIG_VERIFY_FAILED -89 + +#define GNUTLS_E_ILLEGAL_SRP_USERNAME -90 +#define GNUTLS_E_SRP_PWD_PARSING_ERROR -91 +#define GNUTLS_E_NO_TEMPORARY_DH_PARAMS -93 + + /* For certificate and key stuff + */ +#define GNUTLS_E_ASN1_ELEMENT_NOT_FOUND -67 +#define GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND -68 +#define GNUTLS_E_ASN1_DER_ERROR -69 +#define GNUTLS_E_ASN1_VALUE_NOT_FOUND -70 +#define GNUTLS_E_ASN1_GENERIC_ERROR -71 +#define GNUTLS_E_ASN1_VALUE_NOT_VALID -72 +#define GNUTLS_E_ASN1_TAG_ERROR -73 +#define GNUTLS_E_ASN1_TAG_IMPLICIT -74 +#define GNUTLS_E_ASN1_TYPE_ANY_ERROR -75 +#define GNUTLS_E_ASN1_SYNTAX_ERROR -76 +#define GNUTLS_E_ASN1_DER_OVERFLOW -77 +#define GNUTLS_E_OPENPGP_UID_REVOKED -79 +#define GNUTLS_E_CERTIFICATE_ERROR -43 +#define GNUTLS_E_X509_CERTIFICATE_ERROR GNUTLS_E_CERTIFICATE_ERROR +#define GNUTLS_E_CERTIFICATE_KEY_MISMATCH -60 +#define GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE -61 /* GNUTLS_A_UNSUPPORTED_CERTIFICATE */ +#define GNUTLS_E_X509_UNKNOWN_SAN -62 +#define GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED -94 +#define GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE -95 +#define GNUTLS_E_UNKNOWN_HASH_ALGORITHM -96 +#define GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE -97 +#define GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE -98 +#define GNUTLS_E_INVALID_PASSWORD -99 +#define GNUTLS_E_MAC_VERIFY_FAILED -100 /* for PKCS #12 MAC */ +#define GNUTLS_E_CONSTRAINT_ERROR -101 + +#define GNUTLS_E_WARNING_IA_IPHF_RECEIVED -102 +#define GNUTLS_E_WARNING_IA_FPHF_RECEIVED -103 + +#define GNUTLS_E_IA_VERIFY_FAILED -104 +#define GNUTLS_E_UNKNOWN_ALGORITHM -105 +#define GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM -106 +#define GNUTLS_E_SAFE_RENEGOTIATION_FAILED -107 +#define GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED -108 +#define GNUTLS_E_UNKNOWN_SRP_USERNAME -109 +#define GNUTLS_E_PREMATURE_TERMINATION -110 + +#define GNUTLS_E_BASE64_ENCODING_ERROR -201 +#define GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY -202 /* obsolete */ +#define GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY -202 +#define GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY -203 + +#define GNUTLS_E_OPENPGP_KEYRING_ERROR -204 +#define GNUTLS_E_X509_UNSUPPORTED_OID -205 + +#define GNUTLS_E_RANDOM_FAILED -206 +#define GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR -207 + +#define GNUTLS_E_OPENPGP_SUBKEY_ERROR -208 + +#define GNUTLS_E_CRYPTO_ALREADY_REGISTERED -209 + +#define GNUTLS_E_HANDSHAKE_TOO_LARGE -210 + +#define GNUTLS_E_CRYPTODEV_IOCTL_ERROR -211 +#define GNUTLS_E_CRYPTODEV_DEVICE_ERROR -212 + +#define GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE -213 +#define GNUTLS_E_BAD_COOKIE -214 +#define GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR -215 +#define GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL -216 + +#define GNUTLS_E_HEARTBEAT_PONG_RECEIVED -292 +#define GNUTLS_E_HEARTBEAT_PING_RECEIVED -293 + +/* PKCS11 related */ +#define GNUTLS_E_PKCS11_ERROR -300 +#define GNUTLS_E_PKCS11_LOAD_ERROR -301 +#define GNUTLS_E_PARSING_ERROR -302 +#define GNUTLS_E_PKCS11_PIN_ERROR -303 + +#define GNUTLS_E_PKCS11_SLOT_ERROR -305 +#define GNUTLS_E_LOCKING_ERROR -306 +#define GNUTLS_E_PKCS11_ATTRIBUTE_ERROR -307 +#define GNUTLS_E_PKCS11_DEVICE_ERROR -308 +#define GNUTLS_E_PKCS11_DATA_ERROR -309 +#define GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR -310 +#define GNUTLS_E_PKCS11_KEY_ERROR -311 +#define GNUTLS_E_PKCS11_PIN_EXPIRED -312 +#define GNUTLS_E_PKCS11_PIN_LOCKED -313 +#define GNUTLS_E_PKCS11_SESSION_ERROR -314 +#define GNUTLS_E_PKCS11_SIGNATURE_ERROR -315 +#define GNUTLS_E_PKCS11_TOKEN_ERROR -316 +#define GNUTLS_E_PKCS11_USER_ERROR -317 + +#define GNUTLS_E_CRYPTO_INIT_FAILED -318 +#define GNUTLS_E_TIMEDOUT -319 +#define GNUTLS_E_USER_ERROR -320 +#define GNUTLS_E_ECC_NO_SUPPORTED_CURVES -321 +#define GNUTLS_E_ECC_UNSUPPORTED_CURVE -322 +#define GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE -323 +#define GNUTLS_E_CERTIFICATE_LIST_UNSORTED -324 +#define GNUTLS_E_ILLEGAL_PARAMETER -325 +#define GNUTLS_E_NO_PRIORITIES_WERE_SET -326 +#define GNUTLS_E_X509_UNSUPPORTED_EXTENSION -327 +#define GNUTLS_E_SESSION_EOF -328 + +#define GNUTLS_E_TPM_ERROR -329 +#define GNUTLS_E_TPM_KEY_PASSWORD_ERROR -330 +#define GNUTLS_E_TPM_SRK_PASSWORD_ERROR -331 +#define GNUTLS_E_TPM_SESSION_ERROR -332 +#define GNUTLS_E_TPM_KEY_NOT_FOUND -333 +#define GNUTLS_E_TPM_UNINITIALIZED -334 + +#define GNUTLS_E_NO_CERTIFICATE_STATUS -340 +#define GNUTLS_E_OCSP_RESPONSE_ERROR -341 +#define GNUTLS_E_RANDOM_DEVICE_ERROR -342 +#define GNUTLS_E_AUTH_ERROR -343 +#define GNUTLS_E_NO_APPLICATION_PROTOCOL -344 + +#define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 + + + +#define GNUTLS_E_APPLICATION_ERROR_MAX -65000 +#define GNUTLS_E_APPLICATION_ERROR_MIN -65500 + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#include + +#endif /* GNUTLS_H */ diff --git a/include/reactos/libs/gnutls/gnutls/gnutlsxx.h b/include/reactos/libs/gnutls/gnutls/gnutlsxx.h new file mode 100644 index 00000000000..1ed83fbd442 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/gnutlsxx.h @@ -0,0 +1,426 @@ +/* + * Copyright (C) 2006-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef GNUTLSXX_H +#define GNUTLSXX_H + +#include +#include +#include + +namespace gnutls { + + class noncopyable { + protected: + noncopyable() { + } ~noncopyable() { + } private: + // These are non-implemented. + noncopyable(const noncopyable &); + noncopyable & operator=(const noncopyable &); + }; + + + class exception:public std::exception { + public: + exception(int x); + const char *what() const throw(); + int get_code(); + protected: + int retcode; + }; + + + class dh_params:private noncopyable { + public: + dh_params(); + ~dh_params(); + void import_raw(const gnutls_datum_t & prime, + const gnutls_datum_t & generator); + void import_pkcs3(const gnutls_datum_t & pkcs3_params, + gnutls_x509_crt_fmt_t format); + void generate(unsigned int bits); + + void export_pkcs3(gnutls_x509_crt_fmt_t format, + unsigned char *params_data, + size_t * params_data_size); + void export_raw(gnutls_datum_t & prime, + gnutls_datum_t & generator); + + gnutls_dh_params_t get_params_t() const; + dh_params & operator=(const dh_params & src); + protected: + gnutls_dh_params_t params; + }; + + + class rsa_params:private noncopyable { + public: + rsa_params(); + ~rsa_params(); + void import_raw(const gnutls_datum_t & m, + const gnutls_datum_t & e, + const gnutls_datum_t & d, + const gnutls_datum_t & p, + const gnutls_datum_t & q, + const gnutls_datum_t & u); + void import_pkcs1(const gnutls_datum_t & pkcs1_params, + gnutls_x509_crt_fmt_t format); + void generate(unsigned int bits); + + void export_pkcs1(gnutls_x509_crt_fmt_t format, + unsigned char *params_data, + size_t * params_data_size); + void export_raw(gnutls_datum_t & m, gnutls_datum_t & e, + gnutls_datum_t & d, gnutls_datum_t & p, + gnutls_datum_t & q, gnutls_datum_t & u); + gnutls_rsa_params_t get_params_t() const; + rsa_params & operator=(const rsa_params & src); + + protected: + gnutls_rsa_params_t params; + }; + + class session:private noncopyable { + protected: + gnutls_session_t s; + public: + session(unsigned int); + virtual ~ session(); + + int bye(gnutls_close_request_t how); + int handshake(); + + gnutls_alert_description_t get_alert() const; + + int send_alert(gnutls_alert_level_t level, + gnutls_alert_description_t desc); + int send_appropriate_alert(int err); + + gnutls_cipher_algorithm_t get_cipher() const; + gnutls_kx_algorithm_t get_kx() const; + gnutls_mac_algorithm_t get_mac() const; + gnutls_compression_method_t get_compression() const; + gnutls_certificate_type_t get_certificate_type() const; + + // for the handshake + void set_private_extensions(bool allow); + + gnutls_handshake_description_t get_handshake_last_out() + const; + gnutls_handshake_description_t get_handshake_last_in() + const; + + ssize_t send(const void *data, size_t sizeofdata); + ssize_t recv(void *data, size_t sizeofdata); + + bool get_record_direction() const; + + // maximum packet size + size_t get_max_size() const; + void set_max_size(size_t size); + + size_t check_pending() const; + + void prf(size_t label_size, const char *label, + int server_random_first, + size_t extra_size, const char *extra, + size_t outsize, char *out); + + void prf_raw(size_t label_size, const char *label, + size_t seed_size, const char *seed, + size_t outsize, char *out); + + /* if you just want some defaults, use the following. + */ + void set_priority(const char *prio, const char **err_pos); + void set_priority(gnutls_priority_t p); + + gnutls_protocol_t get_protocol_version() const; + + // for resuming sessions + void set_data(const void *session_data, + size_t session_data_size); + void get_data(void *session_data, + size_t * session_data_size) const; + void get_data(gnutls_session_t session, + gnutls_datum_t & data) const; + void get_id(void *session_id, + size_t * session_id_size) const; + + bool is_resumed() const; + + void set_max_handshake_packet_length(size_t max); + + void clear_credentials(); + void set_credentials(class credentials & cred); + + void set_transport_ptr(gnutls_transport_ptr_t ptr); + void set_transport_ptr(gnutls_transport_ptr_t recv_ptr, + gnutls_transport_ptr_t send_ptr); + gnutls_transport_ptr_t get_transport_ptr() const; + void get_transport_ptr(gnutls_transport_ptr_t & recv_ptr, + gnutls_transport_ptr_t & send_ptr) + const; + + void set_transport_lowat(size_t num); + void set_transport_push_function(gnutls_push_func + push_func); + void set_transport_vec_push_function(gnutls_vec_push_func + vec_push_func); + void set_transport_pull_function(gnutls_pull_func + pull_func); + + void set_user_ptr(void *ptr); + void *get_user_ptr() const; + + void send_openpgp_cert(gnutls_openpgp_crt_status_t status); + + gnutls_credentials_type_t get_auth_type() const; + gnutls_credentials_type_t get_server_auth_type() const; + gnutls_credentials_type_t get_client_auth_type() const; + + // informational stuff + void set_dh_prime_bits(unsigned int bits); + unsigned int get_dh_secret_bits() const; + unsigned int get_dh_peers_public_bits() const; + unsigned int get_dh_prime_bits() const; + void get_dh_group(gnutls_datum_t & gen, + gnutls_datum_t & prime) const; + void get_dh_pubkey(gnutls_datum_t & raw_key) const; + void get_rsa_export_pubkey(gnutls_datum_t & exponent, + gnutls_datum_t & modulus) const; + unsigned int get_rsa_export_modulus_bits() const; + + void get_our_certificate(gnutls_datum_t & cert) const; + bool get_peers_certificate(std::vector < gnutls_datum_t > + &out_certs) const; + bool get_peers_certificate(const gnutls_datum_t ** certs, + unsigned int *certs_size) const; + + time_t get_peers_certificate_activation_time() const; + time_t get_peers_certificate_expiration_time() const; + void verify_peers_certificate(unsigned int &status) const; + + }; + +// interface for databases + class DB:private noncopyable { + public: + virtual ~ DB() = 0; + virtual bool store(const gnutls_datum_t & key, + const gnutls_datum_t & data) = 0; + virtual bool retrieve(const gnutls_datum_t & key, + gnutls_datum_t & data) = 0; + virtual bool remove(const gnutls_datum_t & key) = 0; + }; + + class server_session:public session { + public: + server_session(); + ~server_session(); + void db_remove() const; + + void set_db_cache_expiration(unsigned int seconds); + void set_db(const DB & db); + + // returns true if session is expired + bool db_check_entry(gnutls_datum_t & session_data) const; + + // server side only + const char *get_srp_username() const; + const char *get_psk_username() const; + + void get_server_name(void *data, size_t * data_length, + unsigned int *type, + unsigned int indx) const; + + int rehandshake(); + void set_certificate_request(gnutls_certificate_request_t); + }; + + class client_session:public session { + public: + client_session(); + ~client_session(); + + void set_server_name(gnutls_server_name_type_t type, + const void *name, size_t name_length); + + bool get_request_status(); + }; + + + class credentials:private noncopyable { + public: + virtual ~ credentials() { + } gnutls_credentials_type_t get_type() const; + protected: + friend class session; + credentials(gnutls_credentials_type_t t); + void *ptr() const; + void set_ptr(void *ptr); + gnutls_credentials_type_t type; + private: + void *cred; + }; + + class certificate_credentials:public credentials { + public: + ~certificate_credentials(); + certificate_credentials(); + + void free_keys(); + void free_cas(); + void free_ca_names(); + void free_crls(); + + void set_dh_params(const dh_params & params); + void set_rsa_export_params(const rsa_params & params); + void set_verify_flags(unsigned int flags); + void set_verify_limits(unsigned int max_bits, + unsigned int max_depth); + + void set_x509_trust_file(const char *cafile, + gnutls_x509_crt_fmt_t type); + void set_x509_trust(const gnutls_datum_t & CA, + gnutls_x509_crt_fmt_t type); + // FIXME: use classes instead of gnutls_x509_crt_t + void set_x509_trust(gnutls_x509_crt_t * ca_list, + int ca_list_size); + + void set_x509_crl_file(const char *crlfile, + gnutls_x509_crt_fmt_t type); + void set_x509_crl(const gnutls_datum_t & CRL, + gnutls_x509_crt_fmt_t type); + void set_x509_crl(gnutls_x509_crl_t * crl_list, + int crl_list_size); + + void set_x509_key_file(const char *certfile, + const char *KEYFILE, + gnutls_x509_crt_fmt_t type); + void set_x509_key(const gnutls_datum_t & CERT, + const gnutls_datum_t & KEY, + gnutls_x509_crt_fmt_t type); + // FIXME: use classes + void set_x509_key(gnutls_x509_crt_t * cert_list, + int cert_list_size, + gnutls_x509_privkey_t key); + + + void set_simple_pkcs12_file(const char *pkcs12file, + gnutls_x509_crt_fmt_t type, + const char *password); + + void set_retrieve_function + (gnutls_certificate_retrieve_function * func); + + protected: + gnutls_certificate_credentials_t cred; + }; + + class certificate_server_credentials:public certificate_credentials { + public: + void set_params_function(gnutls_params_function * func); + }; + + class certificate_client_credentials:public certificate_credentials { + public: + }; + + + + + class anon_server_credentials:public credentials { + public: + anon_server_credentials(); + ~anon_server_credentials(); + void set_dh_params(const dh_params & params); + void set_params_function(gnutls_params_function * func); + protected: + gnutls_anon_server_credentials_t cred; + }; + + class anon_client_credentials:public credentials { + public: + anon_client_credentials(); + ~anon_client_credentials(); + protected: + gnutls_anon_client_credentials_t cred; + }; + + + class srp_server_credentials:public credentials { + public: + srp_server_credentials(); + ~srp_server_credentials(); + void set_credentials_file(const char *password_file, + const char *password_conf_file); + void set_credentials_function + (gnutls_srp_server_credentials_function * func); + protected: + gnutls_srp_server_credentials_t cred; + }; + + class srp_client_credentials:public credentials { + public: + srp_client_credentials(); + ~srp_client_credentials(); + void set_credentials(const char *username, + const char *password); + void set_credentials_function + (gnutls_srp_client_credentials_function * func); + protected: + gnutls_srp_client_credentials_t cred; + }; + + + class psk_server_credentials:public credentials { + public: + psk_server_credentials(); + ~psk_server_credentials(); + void set_credentials_file(const char *password_file); + void set_credentials_function + (gnutls_psk_server_credentials_function * func); + void set_dh_params(const dh_params & params); + void set_params_function(gnutls_params_function * func); + protected: + gnutls_psk_server_credentials_t cred; + }; + + class psk_client_credentials:public credentials { + public: + psk_client_credentials(); + ~psk_client_credentials(); + void set_credentials(const char *username, + const gnutls_datum_t & key, + gnutls_psk_key_flags flags); + void set_credentials_function + (gnutls_psk_client_credentials_function * func); + protected: + gnutls_psk_client_credentials_t cred; + }; + + +} /* namespace */ + +#endif /* GNUTLSXX_H */ diff --git a/include/reactos/libs/gnutls/gnutls/ocsp.h b/include/reactos/libs/gnutls/gnutls/ocsp.h new file mode 100644 index 00000000000..2f8976f6922 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/ocsp.h @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2011-2012 Free Software Foundation, Inc. + * + * Author: Simon Josefsson + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* Online Certificate Status Protocol - RFC 2560 + */ + +#ifndef GNUTLS_OCSP_H +#define GNUTLS_OCSP_H + +#include +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#define GNUTLS_OCSP_NONCE "1.3.6.1.5.5.7.48.1.2" + +/** + * gnutls_ocsp_print_formats_t: + * @GNUTLS_OCSP_PRINT_FULL: Full information about OCSP request/response. + * @GNUTLS_OCSP_PRINT_COMPACT: More compact information about OCSP request/response. + * + * Enumeration of different OCSP printing variants. + */ +typedef enum gnutls_ocsp_print_formats_t { + GNUTLS_OCSP_PRINT_FULL = 0, + GNUTLS_OCSP_PRINT_COMPACT = 1, +} gnutls_ocsp_print_formats_t; + +/** + * gnutls_ocsp_resp_status_t: + * @GNUTLS_OCSP_RESP_SUCCESSFUL: Response has valid confirmations. + * @GNUTLS_OCSP_RESP_MALFORMEDREQUEST: Illegal confirmation request + * @GNUTLS_OCSP_RESP_INTERNALERROR: Internal error in issuer + * @GNUTLS_OCSP_RESP_TRYLATER: Try again later + * @GNUTLS_OCSP_RESP_SIGREQUIRED: Must sign the request + * @GNUTLS_OCSP_RESP_UNAUTHORIZED: Request unauthorized + * + * Enumeration of different OCSP response status codes. + */ +typedef enum gnutls_ocsp_resp_status_t { + GNUTLS_OCSP_RESP_SUCCESSFUL = 0, + GNUTLS_OCSP_RESP_MALFORMEDREQUEST = 1, + GNUTLS_OCSP_RESP_INTERNALERROR = 2, + GNUTLS_OCSP_RESP_TRYLATER = 3, + GNUTLS_OCSP_RESP_SIGREQUIRED = 5, + GNUTLS_OCSP_RESP_UNAUTHORIZED = 6 +} gnutls_ocsp_resp_status_t; + +/** + * gnutls_ocsp_cert_status_t: + * @GNUTLS_OCSP_CERT_GOOD: Positive response to status inquiry. + * @GNUTLS_OCSP_CERT_REVOKED: Certificate has been revoked. + * @GNUTLS_OCSP_CERT_UNKNOWN: The responder doesn't know about the + * certificate. + * + * Enumeration of different OCSP response certificate status codes. + */ +typedef enum gnutls_ocsp_cert_status_t { + GNUTLS_OCSP_CERT_GOOD = 0, + GNUTLS_OCSP_CERT_REVOKED = 1, + GNUTLS_OCSP_CERT_UNKNOWN = 2 +} gnutls_ocsp_cert_status_t; + +/** + * gnutls_x509_crl_reason_t: + * @GNUTLS_X509_CRLREASON_UNSPECIFIED: Unspecified reason. + * @GNUTLS_X509_CRLREASON_KEYCOMPROMISE: Private key compromised. + * @GNUTLS_X509_CRLREASON_CACOMPROMISE: CA compromised. + * @GNUTLS_X509_CRLREASON_AFFILIATIONCHANGED: Affiliation has changed. + * @GNUTLS_X509_CRLREASON_SUPERSEDED: Certificate superseded. + * @GNUTLS_X509_CRLREASON_CESSATIONOFOPERATION: Operation has ceased. + * @GNUTLS_X509_CRLREASON_CERTIFICATEHOLD: Certificate is on hold. + * @GNUTLS_X509_CRLREASON_REMOVEFROMCRL: Will be removed from delta CRL. + * @GNUTLS_X509_CRLREASON_PRIVILEGEWITHDRAWN: Privilege withdrawn. + * @GNUTLS_X509_CRLREASON_AACOMPROMISE: AA compromised. + * + * Enumeration of different reason codes. Note that this + * corresponds to the CRLReason ASN.1 enumeration type, and not the + * ReasonFlags ASN.1 bit string. + */ +typedef enum gnutls_x509_crl_reason_t { + GNUTLS_X509_CRLREASON_UNSPECIFIED = 0, + GNUTLS_X509_CRLREASON_KEYCOMPROMISE = 1, + GNUTLS_X509_CRLREASON_CACOMPROMISE = 2, + GNUTLS_X509_CRLREASON_AFFILIATIONCHANGED = 3, + GNUTLS_X509_CRLREASON_SUPERSEDED = 4, + GNUTLS_X509_CRLREASON_CESSATIONOFOPERATION = 5, + GNUTLS_X509_CRLREASON_CERTIFICATEHOLD = 6, + GNUTLS_X509_CRLREASON_REMOVEFROMCRL = 8, + GNUTLS_X509_CRLREASON_PRIVILEGEWITHDRAWN = 9, + GNUTLS_X509_CRLREASON_AACOMPROMISE = 10 +} gnutls_x509_crl_reason_t; + +/** + * gnutls_ocsp_verify_reason_t: + * @GNUTLS_OCSP_VERIFY_SIGNER_NOT_FOUND: Signer cert not found. + * @GNUTLS_OCSP_VERIFY_SIGNER_KEYUSAGE_ERROR: Signer keyusage bits incorrect. + * @GNUTLS_OCSP_VERIFY_UNTRUSTED_SIGNER: Signer is not trusted. + * @GNUTLS_OCSP_VERIFY_INSECURE_ALGORITHM: Signature using insecure algorithm. + * @GNUTLS_OCSP_VERIFY_SIGNATURE_FAILURE: Signature mismatch. + * @GNUTLS_OCSP_VERIFY_CERT_NOT_ACTIVATED: Signer cert is not yet activated. + * @GNUTLS_OCSP_VERIFY_CERT_EXPIRED: Signer cert has expired. + * + * Enumeration of OCSP verify status codes, used by + * gnutls_ocsp_resp_verify() and gnutls_ocsp_resp_verify_direct(). + */ +typedef enum gnutls_ocsp_verify_reason_t { + GNUTLS_OCSP_VERIFY_SIGNER_NOT_FOUND = 1, + GNUTLS_OCSP_VERIFY_SIGNER_KEYUSAGE_ERROR = 2, + GNUTLS_OCSP_VERIFY_UNTRUSTED_SIGNER = 4, + GNUTLS_OCSP_VERIFY_INSECURE_ALGORITHM = 8, + GNUTLS_OCSP_VERIFY_SIGNATURE_FAILURE = 16, + GNUTLS_OCSP_VERIFY_CERT_NOT_ACTIVATED = 32, + GNUTLS_OCSP_VERIFY_CERT_EXPIRED = 64 +} gnutls_ocsp_verify_reason_t; + +struct gnutls_ocsp_req_int; +typedef struct gnutls_ocsp_req_int *gnutls_ocsp_req_t; + +int gnutls_ocsp_req_init(gnutls_ocsp_req_t * req); +void gnutls_ocsp_req_deinit(gnutls_ocsp_req_t req); + +int gnutls_ocsp_req_import(gnutls_ocsp_req_t req, + const gnutls_datum_t * data); +int gnutls_ocsp_req_export(gnutls_ocsp_req_t req, gnutls_datum_t * data); +int gnutls_ocsp_req_print(gnutls_ocsp_req_t req, + gnutls_ocsp_print_formats_t format, + gnutls_datum_t * out); + +int gnutls_ocsp_req_get_version(gnutls_ocsp_req_t req); + +int gnutls_ocsp_req_get_cert_id(gnutls_ocsp_req_t req, + unsigned indx, + gnutls_digest_algorithm_t * digest, + gnutls_datum_t * issuer_name_hash, + gnutls_datum_t * issuer_key_hash, + gnutls_datum_t * serial_number); +int gnutls_ocsp_req_add_cert_id(gnutls_ocsp_req_t req, + gnutls_digest_algorithm_t digest, + const gnutls_datum_t * + issuer_name_hash, + const gnutls_datum_t * + issuer_key_hash, + const gnutls_datum_t * serial_number); +int gnutls_ocsp_req_add_cert(gnutls_ocsp_req_t req, + gnutls_digest_algorithm_t digest, + gnutls_x509_crt_t issuer, + gnutls_x509_crt_t cert); + +int gnutls_ocsp_req_get_extension(gnutls_ocsp_req_t req, + unsigned indx, + gnutls_datum_t * oid, + unsigned int *critical, + gnutls_datum_t * data); +int gnutls_ocsp_req_set_extension(gnutls_ocsp_req_t req, + const char *oid, + unsigned int critical, + const gnutls_datum_t * data); + +int gnutls_ocsp_req_get_nonce(gnutls_ocsp_req_t req, + unsigned int *critical, + gnutls_datum_t * nonce); +int gnutls_ocsp_req_set_nonce(gnutls_ocsp_req_t req, + unsigned int critical, + const gnutls_datum_t * nonce); +int gnutls_ocsp_req_randomize_nonce(gnutls_ocsp_req_t req); + +struct gnutls_ocsp_resp_int; +typedef struct gnutls_ocsp_resp_int *gnutls_ocsp_resp_t; + +int gnutls_ocsp_resp_init(gnutls_ocsp_resp_t * resp); +void gnutls_ocsp_resp_deinit(gnutls_ocsp_resp_t resp); + +int gnutls_ocsp_resp_import(gnutls_ocsp_resp_t resp, + const gnutls_datum_t * data); +int gnutls_ocsp_resp_export(gnutls_ocsp_resp_t resp, + gnutls_datum_t * data); +int gnutls_ocsp_resp_print(gnutls_ocsp_resp_t resp, + gnutls_ocsp_print_formats_t format, + gnutls_datum_t * out); + +int gnutls_ocsp_resp_get_status(gnutls_ocsp_resp_t resp); +int gnutls_ocsp_resp_get_response(gnutls_ocsp_resp_t resp, + gnutls_datum_t * + response_type_oid, + gnutls_datum_t * response); + +int gnutls_ocsp_resp_get_version(gnutls_ocsp_resp_t resp); +int gnutls_ocsp_resp_get_responder(gnutls_ocsp_resp_t resp, + gnutls_datum_t * dn); +time_t gnutls_ocsp_resp_get_produced(gnutls_ocsp_resp_t resp); +int gnutls_ocsp_resp_get_single(gnutls_ocsp_resp_t resp, + unsigned indx, + gnutls_digest_algorithm_t * digest, + gnutls_datum_t * issuer_name_hash, + gnutls_datum_t * issuer_key_hash, + gnutls_datum_t * serial_number, + unsigned int *cert_status, + time_t * this_update, + time_t * next_update, + time_t * revocation_time, + unsigned int *revocation_reason); +int gnutls_ocsp_resp_get_extension(gnutls_ocsp_resp_t resp, + unsigned indx, + gnutls_datum_t * oid, + unsigned int *critical, + gnutls_datum_t * data); +int gnutls_ocsp_resp_get_nonce(gnutls_ocsp_resp_t resp, + unsigned int *critical, + gnutls_datum_t * nonce); +int gnutls_ocsp_resp_get_signature_algorithm(gnutls_ocsp_resp_t resp); +int gnutls_ocsp_resp_get_signature(gnutls_ocsp_resp_t resp, + gnutls_datum_t * sig); +int gnutls_ocsp_resp_get_certs(gnutls_ocsp_resp_t resp, + gnutls_x509_crt_t ** certs, + size_t * ncerts); + +int gnutls_ocsp_resp_verify_direct(gnutls_ocsp_resp_t resp, + gnutls_x509_crt_t issuer, + unsigned int *verify, + unsigned int flags); +int gnutls_ocsp_resp_verify(gnutls_ocsp_resp_t resp, + gnutls_x509_trust_list_t trustlist, + unsigned int *verify, unsigned int flags); + +int gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp, + unsigned int indx, gnutls_x509_crt_t crt); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif /* GNUTLS_OCSP_H */ diff --git a/include/reactos/libs/gnutls/gnutls/openpgp.h b/include/reactos/libs/gnutls/gnutls/openpgp.h new file mode 100644 index 00000000000..1fee58fb497 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/openpgp.h @@ -0,0 +1,366 @@ +/* + * Copyright (C) 2003-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* This file contains the types and prototypes for the OpenPGP + * key and private key parsing functions. + */ + +#ifndef GNUTLS_OPENPGP_H +#define GNUTLS_OPENPGP_H + +#include +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +/* Openpgp certificate stuff + */ + +/** + * gnutls_openpgp_crt_fmt_t: + * @GNUTLS_OPENPGP_FMT_RAW: OpenPGP certificate in raw format. + * @GNUTLS_OPENPGP_FMT_BASE64: OpenPGP certificate in base64 format. + * + * Enumeration of different OpenPGP key formats. + */ +typedef enum gnutls_openpgp_crt_fmt { + GNUTLS_OPENPGP_FMT_RAW, + GNUTLS_OPENPGP_FMT_BASE64 +} gnutls_openpgp_crt_fmt_t; + +#define GNUTLS_OPENPGP_KEYID_SIZE 8 +#define GNUTLS_OPENPGP_V4_FINGERPRINT_SIZE 20 +typedef unsigned char + gnutls_openpgp_keyid_t[GNUTLS_OPENPGP_KEYID_SIZE]; + +/* gnutls_openpgp_cert_t should be defined in gnutls.h + */ + + /* initializes the memory for gnutls_openpgp_crt_t struct */ +int gnutls_openpgp_crt_init(gnutls_openpgp_crt_t * key); + /* frees all memory */ +void gnutls_openpgp_crt_deinit(gnutls_openpgp_crt_t key); + +int gnutls_openpgp_crt_import(gnutls_openpgp_crt_t key, + const gnutls_datum_t * data, + gnutls_openpgp_crt_fmt_t format); +int gnutls_openpgp_crt_export(gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, + void *output_data, + size_t * output_data_size); +int gnutls_openpgp_crt_export2(gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, + gnutls_datum_t * out); + +int gnutls_openpgp_crt_print(gnutls_openpgp_crt_t cert, + gnutls_certificate_print_formats_t + format, gnutls_datum_t * out); + +/* The key_usage flags are defined in gnutls.h. They are + * the GNUTLS_KEY_* definitions. + */ +#define GNUTLS_OPENPGP_MASTER_KEYID_IDX INT_MAX + +int gnutls_openpgp_crt_get_key_usage(gnutls_openpgp_crt_t key, + unsigned int *key_usage); +int gnutls_openpgp_crt_get_fingerprint(gnutls_openpgp_crt_t key, + void *fpr, size_t * fprlen); +int gnutls_openpgp_crt_get_subkey_fingerprint(gnutls_openpgp_crt_t + key, + unsigned int idx, + void *fpr, size_t * fprlen); + +int gnutls_openpgp_crt_get_name(gnutls_openpgp_crt_t key, + int idx, char *buf, size_t * sizeof_buf); + +gnutls_pk_algorithm_t +gnutls_openpgp_crt_get_pk_algorithm(gnutls_openpgp_crt_t key, + unsigned int *bits); + +int gnutls_openpgp_crt_get_version(gnutls_openpgp_crt_t key); + +time_t gnutls_openpgp_crt_get_creation_time(gnutls_openpgp_crt_t key); +time_t gnutls_openpgp_crt_get_expiration_time(gnutls_openpgp_crt_t key); + +int gnutls_openpgp_crt_get_key_id(gnutls_openpgp_crt_t key, + gnutls_openpgp_keyid_t keyid); + +int gnutls_openpgp_crt_check_hostname(gnutls_openpgp_crt_t key, + const char *hostname); + +int gnutls_openpgp_crt_get_revoked_status(gnutls_openpgp_crt_t key); + +int gnutls_openpgp_crt_get_subkey_count(gnutls_openpgp_crt_t key); +int gnutls_openpgp_crt_get_subkey_idx(gnutls_openpgp_crt_t key, + const gnutls_openpgp_keyid_t keyid); +int gnutls_openpgp_crt_get_subkey_revoked_status + (gnutls_openpgp_crt_t key, unsigned int idx); +gnutls_pk_algorithm_t +gnutls_openpgp_crt_get_subkey_pk_algorithm(gnutls_openpgp_crt_t + key, + unsigned int idx, + unsigned int *bits); +time_t + gnutls_openpgp_crt_get_subkey_creation_time + (gnutls_openpgp_crt_t key, unsigned int idx); +time_t + gnutls_openpgp_crt_get_subkey_expiration_time + (gnutls_openpgp_crt_t key, unsigned int idx); +int gnutls_openpgp_crt_get_subkey_id(gnutls_openpgp_crt_t key, + unsigned int idx, + gnutls_openpgp_keyid_t keyid); +int gnutls_openpgp_crt_get_subkey_usage(gnutls_openpgp_crt_t key, + unsigned int idx, + unsigned int *key_usage); + +int gnutls_openpgp_crt_get_subkey_pk_dsa_raw(gnutls_openpgp_crt_t + crt, unsigned int idx, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, + gnutls_datum_t * y); +int gnutls_openpgp_crt_get_subkey_pk_rsa_raw(gnutls_openpgp_crt_t + crt, unsigned int idx, + gnutls_datum_t * m, + gnutls_datum_t * e); +int gnutls_openpgp_crt_get_pk_dsa_raw(gnutls_openpgp_crt_t crt, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, + gnutls_datum_t * y); +int gnutls_openpgp_crt_get_pk_rsa_raw(gnutls_openpgp_crt_t crt, + gnutls_datum_t * m, + gnutls_datum_t * e); + +int gnutls_openpgp_crt_get_preferred_key_id(gnutls_openpgp_crt_t + key, + gnutls_openpgp_keyid_t keyid); +int +gnutls_openpgp_crt_set_preferred_key_id(gnutls_openpgp_crt_t key, + const + gnutls_openpgp_keyid_t keyid); + +/* privkey stuff. + */ +int gnutls_openpgp_privkey_init(gnutls_openpgp_privkey_t * key); +void gnutls_openpgp_privkey_deinit(gnutls_openpgp_privkey_t key); +gnutls_pk_algorithm_t + gnutls_openpgp_privkey_get_pk_algorithm + (gnutls_openpgp_privkey_t key, unsigned int *bits); + +gnutls_sec_param_t +gnutls_openpgp_privkey_sec_param(gnutls_openpgp_privkey_t key); +int gnutls_openpgp_privkey_import(gnutls_openpgp_privkey_t key, + const gnutls_datum_t * data, + gnutls_openpgp_crt_fmt_t format, + const char *password, + unsigned int flags); + +int gnutls_openpgp_privkey_get_fingerprint(gnutls_openpgp_privkey_t + key, void *fpr, + size_t * fprlen); +int gnutls_openpgp_privkey_get_subkey_fingerprint + (gnutls_openpgp_privkey_t key, unsigned int idx, void *fpr, + size_t * fprlen); +int gnutls_openpgp_privkey_get_key_id(gnutls_openpgp_privkey_t key, + gnutls_openpgp_keyid_t keyid); +int gnutls_openpgp_privkey_get_subkey_count(gnutls_openpgp_privkey_t key); +int gnutls_openpgp_privkey_get_subkey_idx(gnutls_openpgp_privkey_t + key, + const + gnutls_openpgp_keyid_t keyid); + +int gnutls_openpgp_privkey_get_subkey_revoked_status + (gnutls_openpgp_privkey_t key, unsigned int idx); + +int gnutls_openpgp_privkey_get_revoked_status + (gnutls_openpgp_privkey_t key); + +gnutls_pk_algorithm_t + gnutls_openpgp_privkey_get_subkey_pk_algorithm + (gnutls_openpgp_privkey_t key, unsigned int idx, unsigned int *bits); + +time_t + gnutls_openpgp_privkey_get_subkey_expiration_time + (gnutls_openpgp_privkey_t key, unsigned int idx); + +int gnutls_openpgp_privkey_get_subkey_id(gnutls_openpgp_privkey_t + key, unsigned int idx, + gnutls_openpgp_keyid_t keyid); + +time_t + gnutls_openpgp_privkey_get_subkey_creation_time + (gnutls_openpgp_privkey_t key, unsigned int idx); + +int gnutls_openpgp_privkey_export_subkey_dsa_raw + (gnutls_openpgp_privkey_t pkey, unsigned int idx, + gnutls_datum_t * p, gnutls_datum_t * q, gnutls_datum_t * g, + gnutls_datum_t * y, gnutls_datum_t * x); +int gnutls_openpgp_privkey_export_subkey_rsa_raw + (gnutls_openpgp_privkey_t pkey, unsigned int idx, + gnutls_datum_t * m, gnutls_datum_t * e, gnutls_datum_t * d, + gnutls_datum_t * p, gnutls_datum_t * q, gnutls_datum_t * u); + +int gnutls_openpgp_privkey_export_dsa_raw(gnutls_openpgp_privkey_t + pkey, gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, + gnutls_datum_t * y, + gnutls_datum_t * x); +int gnutls_openpgp_privkey_export_rsa_raw(gnutls_openpgp_privkey_t + pkey, gnutls_datum_t * m, + gnutls_datum_t * e, + gnutls_datum_t * d, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * u); + +int gnutls_openpgp_privkey_export(gnutls_openpgp_privkey_t key, + gnutls_openpgp_crt_fmt_t format, + const char *password, + unsigned int flags, + void *output_data, + size_t * output_data_size); +int gnutls_openpgp_privkey_export2(gnutls_openpgp_privkey_t key, + gnutls_openpgp_crt_fmt_t format, + const char *password, + unsigned int flags, + gnutls_datum_t * out); + +int gnutls_openpgp_privkey_set_preferred_key_id + (gnutls_openpgp_privkey_t key, const gnutls_openpgp_keyid_t keyid); +int gnutls_openpgp_privkey_get_preferred_key_id + (gnutls_openpgp_privkey_t key, gnutls_openpgp_keyid_t keyid); + +int gnutls_openpgp_crt_get_auth_subkey(gnutls_openpgp_crt_t crt, + gnutls_openpgp_keyid_t + keyid, unsigned int flag); + +/* Keyring stuff. + */ + +int gnutls_openpgp_keyring_init(gnutls_openpgp_keyring_t * keyring); +void gnutls_openpgp_keyring_deinit(gnutls_openpgp_keyring_t keyring); + +int gnutls_openpgp_keyring_import(gnutls_openpgp_keyring_t keyring, + const gnutls_datum_t * data, + gnutls_openpgp_crt_fmt_t format); + +int gnutls_openpgp_keyring_check_id(gnutls_openpgp_keyring_t ring, + const gnutls_openpgp_keyid_t + keyid, unsigned int flags); + + +int gnutls_openpgp_crt_verify_ring(gnutls_openpgp_crt_t key, + gnutls_openpgp_keyring_t + keyring, unsigned int flags, + unsigned int *verify + /* the output of the verification */ + ); + +int gnutls_openpgp_crt_verify_self(gnutls_openpgp_crt_t key, + unsigned int flags, + unsigned int *verify); + +int gnutls_openpgp_keyring_get_crt(gnutls_openpgp_keyring_t ring, + unsigned int idx, + gnutls_openpgp_crt_t * cert); + +int gnutls_openpgp_keyring_get_crt_count(gnutls_openpgp_keyring_t ring); + + + +/** + * gnutls_openpgp_recv_key_func: + * @session: a TLS session + * @keyfpr: key fingerprint + * @keyfpr_length: length of key fingerprint + * @key: output key. + * + * A callback of this type is used to retrieve OpenPGP keys. Only + * useful on the server, and will only be used if the peer send a key + * fingerprint instead of a full key. See also + * gnutls_openpgp_set_recv_key_function(). + * + * The variable @key must be allocated using gnutls_malloc(). + * + * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, + * otherwise an error code is returned. + */ +typedef int (*gnutls_openpgp_recv_key_func) (gnutls_session_t + session, + const unsigned char + *keyfpr, + unsigned int + keyfpr_length, + gnutls_datum_t * key); + +void +gnutls_openpgp_set_recv_key_function(gnutls_session_t session, + gnutls_openpgp_recv_key_func func); + + + +/* certificate authentication stuff. + */ +int gnutls_certificate_set_openpgp_key + (gnutls_certificate_credentials_t res, + gnutls_openpgp_crt_t crt, gnutls_openpgp_privkey_t pkey); + +int + gnutls_certificate_set_openpgp_key_file + (gnutls_certificate_credentials_t res, const char *certfile, + const char *keyfile, gnutls_openpgp_crt_fmt_t format); +int gnutls_certificate_set_openpgp_key_mem + (gnutls_certificate_credentials_t res, + const gnutls_datum_t * cert, const gnutls_datum_t * key, + gnutls_openpgp_crt_fmt_t format); + +int + gnutls_certificate_set_openpgp_key_file2 + (gnutls_certificate_credentials_t res, const char *certfile, + const char *keyfile, const char *subkey_id, + gnutls_openpgp_crt_fmt_t format); +int + gnutls_certificate_set_openpgp_key_mem2 + (gnutls_certificate_credentials_t res, + const gnutls_datum_t * cert, const gnutls_datum_t * key, + const char *subkey_id, gnutls_openpgp_crt_fmt_t format); + +int gnutls_certificate_set_openpgp_keyring_mem + (gnutls_certificate_credentials_t c, const unsigned char *data, + size_t dlen, gnutls_openpgp_crt_fmt_t format); + +int gnutls_certificate_set_openpgp_keyring_file + (gnutls_certificate_credentials_t c, const char *file, + gnutls_openpgp_crt_fmt_t format); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif /* GNUTLS_OPENPGP_H */ diff --git a/include/reactos/libs/gnutls/gnutls/pkcs11.h b/include/reactos/libs/gnutls/gnutls/pkcs11.h new file mode 100644 index 00000000000..77a410ffe0c --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/pkcs11.h @@ -0,0 +1,356 @@ +/* + * Copyright (C) 2010-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef __GNUTLS_PKCS11_H +#define __GNUTLS_PKCS11_H + + +#include +#include +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#define GNUTLS_PKCS11_MAX_PIN_LEN 32 + +/** + * gnutls_pkcs11_token_callback_t: + * @userdata: user-controlled data from gnutls_pkcs11_set_token_function(). + * @label: token label. + * @retry: retry counter, initially 0. + * + * Token callback function. The callback will be used to ask the user + * to re-insert the token with given (null terminated) label. The + * callback should return zero if token has been inserted by user and + * a negative error code otherwise. It might be called multiple times + * if the token is not detected and the retry counter will be + * increased. + * + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code + * on error. + * + * Since: 2.12.0 + **/ +typedef int (*gnutls_pkcs11_token_callback_t) (void *const + userdata, + const char *const + label, unsigned retry); + + +struct gnutls_pkcs11_obj_st; +typedef struct gnutls_pkcs11_obj_st *gnutls_pkcs11_obj_t; + + +#define GNUTLS_PKCS11_FLAG_MANUAL 0 /* Manual loading of libraries */ +#define GNUTLS_PKCS11_FLAG_AUTO 1 /* Automatically load libraries by reading /etc/gnutls/pkcs11.conf */ + +/* pkcs11.conf format: + * load = /lib/xxx-pkcs11.so + * load = /lib/yyy-pkcs11.so + */ + +int gnutls_pkcs11_init(unsigned int flags, + const char *deprecated_config_file); +int gnutls_pkcs11_reinit(void); +void gnutls_pkcs11_deinit(void); +void gnutls_pkcs11_set_token_function + (gnutls_pkcs11_token_callback_t fn, void *userdata); + +void gnutls_pkcs11_set_pin_function(gnutls_pin_callback_t fn, + void *userdata); + +gnutls_pin_callback_t gnutls_pkcs11_get_pin_function(void + **userdata); + +int gnutls_pkcs11_add_provider(const char *name, const char *params); +int gnutls_pkcs11_obj_init(gnutls_pkcs11_obj_t * obj); +void gnutls_pkcs11_obj_set_pin_function(gnutls_pkcs11_obj_t obj, + gnutls_pin_callback_t fn, + void *userdata); + +#define GNUTLS_PKCS11_OBJ_FLAG_LOGIN (1<<0) /* force login in the token for the operation */ +#define GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED (1<<1) /* object marked as trusted */ +#define GNUTLS_PKCS11_OBJ_FLAG_MARK_SENSITIVE (1<<2) /* object marked as sensitive (unexportable) */ +#define GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO (1<<3) /* force login as a security officer in the token for the operation */ +#define GNUTLS_PKCS11_OBJ_FLAG_MARK_PRIVATE (1<<4) /* marked as private (requires PIN to access) */ +#define GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_PRIVATE (1<<5) /* marked as not private */ +#define GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY (1<<6) /* No need for the object to be a trusted one */ +#define GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_TRUSTED (1<<7) /* The object must be marked as trusted + * in gnutls_pkcs11_crt_is_known() it implies GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_COMPARE */ +#define GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED (1<<8) /* The object must be marked as distrusted */ +#define GNUTLS_PKCS11_OBJ_FLAG_COMPARE (1<<9) /* The object must be fully compared */ +#define GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE (1<<10) /* The object must be present in a marked as trusted module */ + +/** + * gnutls_pkcs11_url_type_t: + * @GNUTLS_PKCS11_URL_GENERIC: A generic-purpose URL. + * @GNUTLS_PKCS11_URL_LIB: A URL that specifies the library used as well. + * @GNUTLS_PKCS11_URL_LIB_VERSION: A URL that specifies the library and its version. + * + * Enumeration of different URL extraction flags. + */ +typedef enum { + GNUTLS_PKCS11_URL_GENERIC, /* URL specifies the object on token level */ + GNUTLS_PKCS11_URL_LIB, /* URL specifies the object on module level */ + GNUTLS_PKCS11_URL_LIB_VERSION /* URL specifies the object on module and version level */ +} gnutls_pkcs11_url_type_t; + +int gnutls_pkcs11_obj_import_url(gnutls_pkcs11_obj_t obj, + const char *url, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ ); +int gnutls_pkcs11_obj_export_url(gnutls_pkcs11_obj_t obj, + gnutls_pkcs11_url_type_t detailed, + char **url); +void gnutls_pkcs11_obj_deinit(gnutls_pkcs11_obj_t obj); + +int gnutls_pkcs11_obj_export(gnutls_pkcs11_obj_t obj, + void *output_data, size_t * output_data_size); +int gnutls_pkcs11_obj_export2(gnutls_pkcs11_obj_t obj, + gnutls_datum_t * out); + +int gnutls_pkcs11_obj_export3(gnutls_pkcs11_obj_t obj, gnutls_x509_crt_fmt_t fmt, + gnutls_datum_t * out); + +int gnutls_pkcs11_get_raw_issuer(const char *url, gnutls_x509_crt_t cert, + gnutls_datum_t * issuer, + gnutls_x509_crt_fmt_t fmt, + unsigned int flags); + +int gnutls_pkcs11_copy_x509_crt(const char *token_url, + gnutls_x509_crt_t crt, + const char *label, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ ); +int gnutls_pkcs11_copy_x509_privkey(const char *token_url, + gnutls_x509_privkey_t key, + const char *label, + unsigned int key_usage + /*GNUTLS_KEY_* */ , + unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ + ); +int gnutls_pkcs11_delete_url(const char *object_url, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ ); + +int gnutls_pkcs11_copy_secret_key(const char *token_url, + gnutls_datum_t * key, + const char *label, unsigned int key_usage + /* GNUTLS_KEY_* */ , + unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ ); + +/** + * gnutls_pkcs11_obj_info_t: + * @GNUTLS_PKCS11_OBJ_ID_HEX: The object ID in hex. + * @GNUTLS_PKCS11_OBJ_LABEL: The object label. + * @GNUTLS_PKCS11_OBJ_TOKEN_LABEL: The token's label. + * @GNUTLS_PKCS11_OBJ_TOKEN_SERIAL: The token's serial number. + * @GNUTLS_PKCS11_OBJ_TOKEN_MANUFACTURER: The token's manufacturer. + * @GNUTLS_PKCS11_OBJ_TOKEN_MODEL: The token's model. + * @GNUTLS_PKCS11_OBJ_ID: The object ID. + * @GNUTLS_PKCS11_OBJ_LIBRARY_VERSION: The library's used to access the object version. + * @GNUTLS_PKCS11_OBJ_LIBRARY_DESCRIPTION: The library's used to access the object description (name). + * @GNUTLS_PKCS11_OBJ_LIBRARY_MANUFACTURER: The library's used to access the object manufacturer name. + * + * Enumeration of several object information types. + */ +typedef enum { + GNUTLS_PKCS11_OBJ_ID_HEX = 1, + GNUTLS_PKCS11_OBJ_LABEL, + GNUTLS_PKCS11_OBJ_TOKEN_LABEL, + GNUTLS_PKCS11_OBJ_TOKEN_SERIAL, + GNUTLS_PKCS11_OBJ_TOKEN_MANUFACTURER, + GNUTLS_PKCS11_OBJ_TOKEN_MODEL, + GNUTLS_PKCS11_OBJ_ID, + /* the pkcs11 provider library info */ + GNUTLS_PKCS11_OBJ_LIBRARY_VERSION, + GNUTLS_PKCS11_OBJ_LIBRARY_DESCRIPTION, + GNUTLS_PKCS11_OBJ_LIBRARY_MANUFACTURER +} gnutls_pkcs11_obj_info_t; + +int gnutls_pkcs11_obj_get_info(gnutls_pkcs11_obj_t crt, + gnutls_pkcs11_obj_info_t itype, + void *output, size_t * output_size); + +/** + * gnutls_pkcs11_obj_attr_t: + * @GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL: Specify all certificates. + * @GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED: Specify all certificates marked as trusted. + * @GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA: Specify all certificates marked as trusted and are CAs. + * @GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY: Specify all certificates with a corresponding private key. + * @GNUTLS_PKCS11_OBJ_ATTR_PUBKEY: Specify all public keys. + * @GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY: Specify all private keys. + * @GNUTLS_PKCS11_OBJ_ATTR_ALL: Specify all objects. + * + * Enumeration of several attributes for object enumeration. + */ +typedef enum { + GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL = 1, /* all certificates */ + GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED, /* certificates marked as trusted */ + GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY, /* certificates with corresponding private key */ + GNUTLS_PKCS11_OBJ_ATTR_PUBKEY, /* public keys */ + GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY, /* private keys */ + GNUTLS_PKCS11_OBJ_ATTR_ALL, /* everything! */ + GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA, /* CAs */ +} gnutls_pkcs11_obj_attr_t; + +/** + * gnutls_pkcs11_token_info_t: + * @GNUTLS_PKCS11_TOKEN_LABEL: The token's label (string) + * @GNUTLS_PKCS11_TOKEN_SERIAL: The token's serial number (string) + * @GNUTLS_PKCS11_TOKEN_MANUFACTURER: The token's manufacturer (string) + * @GNUTLS_PKCS11_TOKEN_MODEL: The token's model (string) + * @GNUTLS_PKCS11_TOKEN_TRUSTED: Whether the token is marked as trusted in p11-kit (unsigned int) + * + * Enumeration of types for retrieving token information. + */ +typedef enum { + GNUTLS_PKCS11_TOKEN_LABEL, + GNUTLS_PKCS11_TOKEN_SERIAL, + GNUTLS_PKCS11_TOKEN_MANUFACTURER, + GNUTLS_PKCS11_TOKEN_MODEL, +} gnutls_pkcs11_token_info_t; + +/** + * gnutls_pkcs11_obj_type_t: + * @GNUTLS_PKCS11_OBJ_UNKNOWN: Unknown PKCS11 object. + * @GNUTLS_PKCS11_OBJ_X509_CRT: X.509 certificate. + * @GNUTLS_PKCS11_OBJ_PUBKEY: Public key. + * @GNUTLS_PKCS11_OBJ_PRIVKEY: Private key. + * @GNUTLS_PKCS11_OBJ_SECRET_KEY: Secret key. + * @GNUTLS_PKCS11_OBJ_DATA: Data object. + * + * Enumeration of object types. + */ +typedef enum { + GNUTLS_PKCS11_OBJ_UNKNOWN, + GNUTLS_PKCS11_OBJ_X509_CRT, + GNUTLS_PKCS11_OBJ_PUBKEY, + GNUTLS_PKCS11_OBJ_PRIVKEY, + GNUTLS_PKCS11_OBJ_SECRET_KEY, + GNUTLS_PKCS11_OBJ_DATA +} gnutls_pkcs11_obj_type_t; + +int +gnutls_pkcs11_token_init(const char *token_url, + const char *so_pin, const char *label); + +int +gnutls_pkcs11_token_get_mechanism(const char *url, + unsigned int idx, + unsigned long *mechanism); + +int gnutls_pkcs11_token_set_pin(const char *token_url, const char *oldpin, const char *newpin, unsigned int flags /*gnutls_pin_flag_t */); + +int gnutls_pkcs11_token_get_url(unsigned int seq, + gnutls_pkcs11_url_type_t detailed, + char **url); +int gnutls_pkcs11_token_get_info(const char *url, + gnutls_pkcs11_token_info_t ttype, + void *output, size_t * output_size); + +#define GNUTLS_PKCS11_TOKEN_HW 1 +#define GNUTLS_PKCS11_TOKEN_TRUSTED (1<<1) /* p11-kit trusted */ +int gnutls_pkcs11_token_get_flags(const char *url, unsigned int *flags); + +int gnutls_pkcs11_obj_list_import_url(gnutls_pkcs11_obj_t * p_list, + unsigned int *const n_list, + const char *url, + gnutls_pkcs11_obj_attr_t + attrs, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ + ); + +int +gnutls_pkcs11_obj_list_import_url2(gnutls_pkcs11_obj_t ** p_list, + unsigned int *n_list, + const char *url, + gnutls_pkcs11_obj_attr_t attrs, + unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ + ); + +int gnutls_x509_crt_import_pkcs11(gnutls_x509_crt_t crt, + gnutls_pkcs11_obj_t pkcs11_crt); +int gnutls_x509_crt_import_pkcs11_url(gnutls_x509_crt_t crt, + const char *url, unsigned int flags + /* GNUTLS_PKCS11_OBJ_FLAG_* */ + ); + +gnutls_pkcs11_obj_type_t +gnutls_pkcs11_obj_get_type(gnutls_pkcs11_obj_t obj); +const char *gnutls_pkcs11_type_get_name(gnutls_pkcs11_obj_type_t type); + +int gnutls_x509_crt_list_import_pkcs11(gnutls_x509_crt_t * certs, + unsigned int cert_max, + gnutls_pkcs11_obj_t * + const objs, unsigned int flags + /* must be zero */ ); + +/* private key functions...*/ +int gnutls_pkcs11_privkey_init(gnutls_pkcs11_privkey_t * key); +void gnutls_pkcs11_privkey_set_pin_function(gnutls_pkcs11_privkey_t + key, + gnutls_pin_callback_t + fn, void *userdata); +void gnutls_pkcs11_privkey_deinit(gnutls_pkcs11_privkey_t key); +int gnutls_pkcs11_privkey_get_pk_algorithm(gnutls_pkcs11_privkey_t + key, unsigned int *bits); +int gnutls_pkcs11_privkey_get_info(gnutls_pkcs11_privkey_t pkey, + gnutls_pkcs11_obj_info_t itype, + void *output, size_t * output_size); + +int gnutls_pkcs11_privkey_import_url(gnutls_pkcs11_privkey_t pkey, + const char *url, unsigned int flags); + +int gnutls_pkcs11_privkey_export_url(gnutls_pkcs11_privkey_t key, + gnutls_pkcs11_url_type_t + detailed, char **url); +int gnutls_pkcs11_privkey_status(gnutls_pkcs11_privkey_t key); + +int gnutls_pkcs11_privkey_generate(const char *url, + gnutls_pk_algorithm_t pk, + unsigned int bits, + const char *label, unsigned int flags); + +int +gnutls_pkcs11_privkey_generate2(const char *url, + gnutls_pk_algorithm_t pk, + unsigned int bits, + const char *label, + gnutls_x509_crt_fmt_t fmt, + gnutls_datum_t * pubkey, + unsigned int flags); + +int +gnutls_pkcs11_token_get_random(const char *token_url, + void *data, size_t len); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif diff --git a/include/reactos/libs/gnutls/gnutls/pkcs12.h b/include/reactos/libs/gnutls/gnutls/pkcs12.h new file mode 100644 index 00000000000..8b024e502bb --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/pkcs12.h @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2003-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef GNUTLS_PKCS12_H +#define GNUTLS_PKCS12_H + +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + + /* PKCS12 structures handling + */ +struct gnutls_pkcs12_int; +typedef struct gnutls_pkcs12_int *gnutls_pkcs12_t; + +struct gnutls_pkcs12_bag_int; +typedef struct gnutls_pkcs12_bag_int *gnutls_pkcs12_bag_t; + +int gnutls_pkcs12_init(gnutls_pkcs12_t * pkcs12); +void gnutls_pkcs12_deinit(gnutls_pkcs12_t pkcs12); +int gnutls_pkcs12_import(gnutls_pkcs12_t pkcs12, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, unsigned int flags); +int gnutls_pkcs12_export(gnutls_pkcs12_t pkcs12, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_pkcs12_export2(gnutls_pkcs12_t pkcs12, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +int gnutls_pkcs12_get_bag(gnutls_pkcs12_t pkcs12, + int indx, gnutls_pkcs12_bag_t bag); +int gnutls_pkcs12_set_bag(gnutls_pkcs12_t pkcs12, gnutls_pkcs12_bag_t bag); + +int gnutls_pkcs12_generate_mac(gnutls_pkcs12_t pkcs12, const char *pass); +int gnutls_pkcs12_verify_mac(gnutls_pkcs12_t pkcs12, const char *pass); + +int gnutls_pkcs12_bag_decrypt(gnutls_pkcs12_bag_t bag, const char *pass); +int gnutls_pkcs12_bag_encrypt(gnutls_pkcs12_bag_t bag, + const char *pass, unsigned int flags); + +#define GNUTLS_PKCS12_SP_INCLUDE_SELF_SIGNED 1 +int gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12, + const char *password, + gnutls_x509_privkey_t * key, + gnutls_x509_crt_t ** chain, + unsigned int *chain_len, + gnutls_x509_crt_t ** extra_certs, + unsigned int *extra_certs_len, + gnutls_x509_crl_t * crl, + unsigned int flags); + +/** + * gnutls_pkcs12_bag_type_t: + * @GNUTLS_BAG_EMPTY: Empty PKCS-12 bag. + * @GNUTLS_BAG_PKCS8_ENCRYPTED_KEY: PKCS-12 bag with PKCS-8 encrypted key. + * @GNUTLS_BAG_PKCS8_KEY: PKCS-12 bag with PKCS-8 key. + * @GNUTLS_BAG_CERTIFICATE: PKCS-12 bag with certificate. + * @GNUTLS_BAG_CRL: PKCS-12 bag with CRL. + * @GNUTLS_BAG_SECRET: PKCS-12 bag with secret PKCS-9 keys. + * @GNUTLS_BAG_ENCRYPTED: Encrypted PKCS-12 bag. + * @GNUTLS_BAG_UNKNOWN: Unknown PKCS-12 bag. + * + * Enumeration of different PKCS 12 bag types. + */ +typedef enum gnutls_pkcs12_bag_type_t { + GNUTLS_BAG_EMPTY = 0, + GNUTLS_BAG_PKCS8_ENCRYPTED_KEY = 1, + GNUTLS_BAG_PKCS8_KEY = 2, + GNUTLS_BAG_CERTIFICATE = 3, + GNUTLS_BAG_CRL = 4, + GNUTLS_BAG_SECRET = 5, /* Secret data. Underspecified in pkcs-12, + * gnutls extension. We use the PKCS-9 + * random nonce ID 1.2.840.113549.1.9.25.3 + * to store randomly generated keys. + */ + GNUTLS_BAG_ENCRYPTED = 10, + GNUTLS_BAG_UNKNOWN = 20 +} gnutls_pkcs12_bag_type_t; + +gnutls_pkcs12_bag_type_t +gnutls_pkcs12_bag_get_type(gnutls_pkcs12_bag_t bag, int indx); +int gnutls_pkcs12_bag_get_data(gnutls_pkcs12_bag_t bag, int indx, + gnutls_datum_t * data); +int gnutls_pkcs12_bag_set_data(gnutls_pkcs12_bag_t bag, + gnutls_pkcs12_bag_type_t type, + const gnutls_datum_t * data); +int gnutls_pkcs12_bag_set_crl(gnutls_pkcs12_bag_t bag, + gnutls_x509_crl_t crl); +int gnutls_pkcs12_bag_set_crt(gnutls_pkcs12_bag_t bag, + gnutls_x509_crt_t crt); + +int gnutls_pkcs12_bag_init(gnutls_pkcs12_bag_t * bag); +void gnutls_pkcs12_bag_deinit(gnutls_pkcs12_bag_t bag); +int gnutls_pkcs12_bag_get_count(gnutls_pkcs12_bag_t bag); + +int gnutls_pkcs12_bag_get_key_id(gnutls_pkcs12_bag_t bag, int indx, + gnutls_datum_t * id); +int gnutls_pkcs12_bag_set_key_id(gnutls_pkcs12_bag_t bag, int indx, + const gnutls_datum_t * id); + +int gnutls_pkcs12_bag_get_friendly_name(gnutls_pkcs12_bag_t bag, + int indx, char **name); +int gnutls_pkcs12_bag_set_friendly_name(gnutls_pkcs12_bag_t bag, + int indx, const char *name); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif /* GNUTLS_PKCS12_H */ diff --git a/include/reactos/libs/gnutls/gnutls/tpm.h b/include/reactos/libs/gnutls/gnutls/tpm.h new file mode 100644 index 00000000000..17becf33f3a --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/tpm.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2010-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef __GNUTLS_TPM_H +#define __GNUTLS_TPM_H + +#include +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +struct tpm_key_list_st; +typedef struct tpm_key_list_st *gnutls_tpm_key_list_t; + +#define GNUTLS_TPM_KEY_SIGNING (1<<1) +#define GNUTLS_TPM_REGISTER_KEY (1<<2) +#define GNUTLS_TPM_KEY_USER (1<<3) + +/** + * gnutls_tpmkey_fmt_t: + * @GNUTLS_TPMKEY_FMT_RAW: The portable data format. + * @GNUTLS_TPMKEY_FMT_DER: An alias for the raw format. + * @GNUTLS_TPMKEY_FMT_CTK_PEM: A custom data format used by some TPM tools. + * + * Enumeration of different certificate encoding formats. + */ +typedef enum { + GNUTLS_TPMKEY_FMT_RAW = 0, + GNUTLS_TPMKEY_FMT_DER = GNUTLS_TPMKEY_FMT_RAW, + GNUTLS_TPMKEY_FMT_CTK_PEM = 1 +} gnutls_tpmkey_fmt_t; + +int +gnutls_tpm_privkey_generate(gnutls_pk_algorithm_t pk, + unsigned int bits, + const char *srk_password, + const char *key_password, + gnutls_tpmkey_fmt_t format, + gnutls_x509_crt_fmt_t pub_format, + gnutls_datum_t * privkey, + gnutls_datum_t * pubkey, unsigned int flags); + +void gnutls_tpm_key_list_deinit(gnutls_tpm_key_list_t list); +int gnutls_tpm_key_list_get_url(gnutls_tpm_key_list_t list, + unsigned int idx, char **url, + unsigned int flags); +int gnutls_tpm_get_registered(gnutls_tpm_key_list_t * list); +int gnutls_tpm_privkey_delete(const char *url, const char *srk_password); + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif diff --git a/include/reactos/libs/gnutls/gnutls/x509.h b/include/reactos/libs/gnutls/gnutls/x509.h new file mode 100644 index 00000000000..6da65a5ea0a --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/x509.h @@ -0,0 +1,1192 @@ +/* + * Copyright (C) 2003-2012 Free Software Foundation, Inc. + * + * Author: Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +/* This file contains the types and prototypes for the X.509 + * certificate and CRL handling functions. + */ + +#ifndef GNUTLS_X509_H +#define GNUTLS_X509_H + +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +/* Some OIDs usually found in Distinguished names, or + * in Subject Directory Attribute extensions. + */ +#define GNUTLS_OID_X520_COUNTRY_NAME "2.5.4.6" +#define GNUTLS_OID_X520_ORGANIZATION_NAME "2.5.4.10" +#define GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME "2.5.4.11" +#define GNUTLS_OID_X520_COMMON_NAME "2.5.4.3" +#define GNUTLS_OID_X520_LOCALITY_NAME "2.5.4.7" +#define GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME "2.5.4.8" + +#define GNUTLS_OID_X520_INITIALS "2.5.4.43" +#define GNUTLS_OID_X520_GENERATION_QUALIFIER "2.5.4.44" +#define GNUTLS_OID_X520_SURNAME "2.5.4.4" +#define GNUTLS_OID_X520_GIVEN_NAME "2.5.4.42" +#define GNUTLS_OID_X520_TITLE "2.5.4.12" +#define GNUTLS_OID_X520_DN_QUALIFIER "2.5.4.46" +#define GNUTLS_OID_X520_PSEUDONYM "2.5.4.65" +#define GNUTLS_OID_X520_POSTALCODE "2.5.4.17" +#define GNUTLS_OID_X520_NAME "2.5.4.41" + +#define GNUTLS_OID_LDAP_DC "0.9.2342.19200300.100.1.25" +#define GNUTLS_OID_LDAP_UID "0.9.2342.19200300.100.1.1" + +/* The following should not be included in DN. + */ +#define GNUTLS_OID_PKCS9_EMAIL "1.2.840.113549.1.9.1" + +#define GNUTLS_OID_PKIX_DATE_OF_BIRTH "1.3.6.1.5.5.7.9.1" +#define GNUTLS_OID_PKIX_PLACE_OF_BIRTH "1.3.6.1.5.5.7.9.2" +#define GNUTLS_OID_PKIX_GENDER "1.3.6.1.5.5.7.9.3" +#define GNUTLS_OID_PKIX_COUNTRY_OF_CITIZENSHIP "1.3.6.1.5.5.7.9.4" +#define GNUTLS_OID_PKIX_COUNTRY_OF_RESIDENCE "1.3.6.1.5.5.7.9.5" + +/* Key purpose Object Identifiers. + */ +#define GNUTLS_KP_TLS_WWW_SERVER "1.3.6.1.5.5.7.3.1" +#define GNUTLS_KP_TLS_WWW_CLIENT "1.3.6.1.5.5.7.3.2" +#define GNUTLS_KP_CODE_SIGNING "1.3.6.1.5.5.7.3.3" +#define GNUTLS_KP_MS_SMART_CARD_LOGON "1.3.6.1.4.1.311.20.2.2" +#define GNUTLS_KP_EMAIL_PROTECTION "1.3.6.1.5.5.7.3.4" +#define GNUTLS_KP_TIME_STAMPING "1.3.6.1.5.5.7.3.8" +#define GNUTLS_KP_OCSP_SIGNING "1.3.6.1.5.5.7.3.9" +#define GNUTLS_KP_IPSEC_IKE "1.3.6.1.5.5.7.3.17" +#define GNUTLS_KP_ANY "2.5.29.37.0" + +#define GNUTLS_OID_AIA "1.3.6.1.5.5.7.1.1" +#define GNUTLS_OID_AD_OCSP "1.3.6.1.5.5.7.48.1" +#define GNUTLS_OID_AD_CAISSUERS "1.3.6.1.5.5.7.48.2" + +#define GNUTLS_FSAN_SET 0 +#define GNUTLS_FSAN_APPEND 1 + +/* Certificate handling functions. + */ + +/** + * gnutls_certificate_import_flags: + * @GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED: Fail if the + * certificates in the buffer are more than the space allocated for + * certificates. The error code will be %GNUTLS_E_SHORT_MEMORY_BUFFER. + * @GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED: Fail if the certificates + * in the buffer are not ordered starting from subject to issuer. + * The error code will be %GNUTLS_E_CERTIFICATE_LIST_UNSORTED. + * + * Enumeration of different certificate import flags. + */ +typedef enum gnutls_certificate_import_flags { + GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED = 1, + GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED = 2 +} gnutls_certificate_import_flags; + +int gnutls_x509_crt_init(gnutls_x509_crt_t * cert); +void gnutls_x509_crt_deinit(gnutls_x509_crt_t cert); +int gnutls_x509_crt_import(gnutls_x509_crt_t cert, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); +int gnutls_x509_crt_list_import2(gnutls_x509_crt_t ** certs, + unsigned int *size, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); +int gnutls_x509_crt_list_import(gnutls_x509_crt_t * certs, + unsigned int *cert_max, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); +int gnutls_x509_crt_export(gnutls_x509_crt_t cert, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_x509_crt_export2(gnutls_x509_crt_t cert, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); +int gnutls_x509_crt_get_private_key_usage_period(gnutls_x509_crt_t + cert, + time_t * + activation, + time_t * + expiration, unsigned int + *critical); + +int gnutls_x509_crt_get_issuer_dn(gnutls_x509_crt_t cert, + char *buf, size_t * buf_size); +int gnutls_x509_crt_get_issuer_dn2(gnutls_x509_crt_t cert, + gnutls_datum_t * dn); +int gnutls_x509_crt_get_issuer_dn_oid(gnutls_x509_crt_t cert, + int indx, void *oid, + size_t * oid_size); +int gnutls_x509_crt_get_issuer_dn_by_oid(gnutls_x509_crt_t cert, + const char *oid, int indx, + unsigned int raw_flag, + void *buf, size_t * buf_size); +int gnutls_x509_crt_get_dn(gnutls_x509_crt_t cert, char *buf, + size_t * buf_size); +int gnutls_x509_crt_get_dn2(gnutls_x509_crt_t cert, gnutls_datum_t * dn); +int gnutls_x509_crt_get_dn_oid(gnutls_x509_crt_t cert, int indx, + void *oid, size_t * oid_size); +int gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt_t cert, + const char *oid, int indx, + unsigned int raw_flag, void *buf, + size_t * buf_size); +int gnutls_x509_crt_check_hostname(gnutls_x509_crt_t cert, + const char *hostname); + +int gnutls_x509_crt_get_signature_algorithm(gnutls_x509_crt_t cert); +int gnutls_x509_crt_get_signature(gnutls_x509_crt_t cert, + char *sig, size_t * sizeof_sig); +int gnutls_x509_crt_get_version(gnutls_x509_crt_t cert); +int gnutls_x509_crt_get_key_id(gnutls_x509_crt_t crt, + unsigned int flags, + unsigned char *output_data, + size_t * output_data_size); + +int gnutls_x509_crt_set_private_key_usage_period(gnutls_x509_crt_t + crt, + time_t activation, + time_t expiration); +int gnutls_x509_crt_set_authority_key_id(gnutls_x509_crt_t cert, + const void *id, size_t id_size); +int gnutls_x509_crt_get_authority_key_id(gnutls_x509_crt_t cert, + void *id, + size_t * id_size, + unsigned int *critical); +int gnutls_x509_crt_get_authority_key_gn_serial(gnutls_x509_crt_t + cert, + unsigned int seq, + void *alt, + size_t * alt_size, + unsigned int + *alt_type, + void *serial, + size_t * + serial_size, unsigned int + *critical); + +int gnutls_x509_crt_get_subject_key_id(gnutls_x509_crt_t cert, + void *ret, + size_t * ret_size, + unsigned int *critical); + +int gnutls_x509_crt_get_subject_unique_id(gnutls_x509_crt_t crt, + char *buf, size_t * buf_size); + +int gnutls_x509_crt_get_issuer_unique_id(gnutls_x509_crt_t crt, + char *buf, size_t * buf_size); + +void gnutls_x509_crt_set_pin_function(gnutls_x509_crt_t crt, + gnutls_pin_callback_t fn, + void *userdata); + + /** + * gnutls_info_access_what_t: + * @GNUTLS_IA_ACCESSMETHOD_OID: Get accessMethod OID. + * @GNUTLS_IA_ACCESSLOCATION_GENERALNAME_TYPE: Get accessLocation name type. + * @GNUTLS_IA_URI: Get accessLocation URI value. + * @GNUTLS_IA_OCSP_URI: get accessLocation URI value for OCSP. + * @GNUTLS_IA_CAISSUERS_URI: get accessLocation URI value for caIssuers. + * + * Enumeration of types for the @what parameter of + * gnutls_x509_crt_get_authority_info_access(). + */ +typedef enum gnutls_info_access_what_t { + GNUTLS_IA_ACCESSMETHOD_OID = 1, + GNUTLS_IA_ACCESSLOCATION_GENERALNAME_TYPE = 2, + /* use 100-108 for the generalName types, populate as needed */ + GNUTLS_IA_URI = 106, + /* quick-access variants that match both OID and name type. */ + GNUTLS_IA_OCSP_URI = 10006, + GNUTLS_IA_CAISSUERS_URI = 10106 +} gnutls_info_access_what_t; + +int gnutls_x509_crt_get_authority_info_access(gnutls_x509_crt_t + crt, + unsigned int seq, + int what, + gnutls_datum_t * + data, unsigned int + *critical); + +#define GNUTLS_CRL_REASON_SUPERSEEDED GNUTLS_CRL_REASON_SUPERSEDED, + /** + * gnutls_x509_crl_reason_flags_t: + * @GNUTLS_CRL_REASON_PRIVILEGE_WITHDRAWN: The privileges were withdrawn from the owner. + * @GNUTLS_CRL_REASON_CERTIFICATE_HOLD: The certificate is on hold. + * @GNUTLS_CRL_REASON_CESSATION_OF_OPERATION: The end-entity is no longer operating. + * @GNUTLS_CRL_REASON_SUPERSEDED: There is a newer certificate of the owner. + * @GNUTLS_CRL_REASON_AFFILIATION_CHANGED: The end-entity affiliation has changed. + * @GNUTLS_CRL_REASON_CA_COMPROMISE: The CA was compromised. + * @GNUTLS_CRL_REASON_KEY_COMPROMISE: The certificate's key was compromised. + * @GNUTLS_CRL_REASON_UNUSED: The key was never used. + * @GNUTLS_CRL_REASON_AA_COMPROMISE: AA compromised. + * + * Enumeration of types for the CRL revocation reasons. + */ +typedef enum gnutls_x509_crl_reason_flags_t { + GNUTLS_CRL_REASON_UNSPECIFIED = 0, + GNUTLS_CRL_REASON_PRIVILEGE_WITHDRAWN = 1, + GNUTLS_CRL_REASON_CERTIFICATE_HOLD = 2, + GNUTLS_CRL_REASON_CESSATION_OF_OPERATION = 4, + GNUTLS_CRL_REASON_SUPERSEDED = 8, + GNUTLS_CRL_REASON_AFFILIATION_CHANGED = 16, + GNUTLS_CRL_REASON_CA_COMPROMISE = 32, + GNUTLS_CRL_REASON_KEY_COMPROMISE = 64, + GNUTLS_CRL_REASON_UNUSED = 128, + GNUTLS_CRL_REASON_AA_COMPROMISE = 32768 +} gnutls_x509_crl_reason_flags_t; + +int gnutls_x509_crt_get_crl_dist_points(gnutls_x509_crt_t cert, + unsigned int seq, + void *ret, + size_t * ret_size, + unsigned int *reason_flags, + unsigned int *critical); +int gnutls_x509_crt_set_crl_dist_points2(gnutls_x509_crt_t crt, + gnutls_x509_subject_alt_name_t + type, const void *data, + unsigned int data_size, + unsigned int reason_flags); +int gnutls_x509_crt_set_crl_dist_points(gnutls_x509_crt_t crt, + gnutls_x509_subject_alt_name_t + type, + const void *data_string, + unsigned int reason_flags); +int gnutls_x509_crt_cpy_crl_dist_points(gnutls_x509_crt_t dst, + gnutls_x509_crt_t src); + +int gnutls_x509_crl_sign2(gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key, + gnutls_digest_algorithm_t dig, + unsigned int flags); + +time_t gnutls_x509_crt_get_activation_time(gnutls_x509_crt_t cert); + +#define GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION ((time_t)4294197631) + +time_t gnutls_x509_crt_get_expiration_time(gnutls_x509_crt_t cert); +int gnutls_x509_crt_get_serial(gnutls_x509_crt_t cert, + void *result, size_t * result_size); + +int gnutls_x509_crt_get_pk_algorithm(gnutls_x509_crt_t cert, + unsigned int *bits); +int gnutls_x509_crt_get_pk_rsa_raw(gnutls_x509_crt_t crt, + gnutls_datum_t * m, gnutls_datum_t * e); +int gnutls_x509_crt_get_pk_dsa_raw(gnutls_x509_crt_t crt, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, gnutls_datum_t * y); + +int gnutls_x509_crt_get_subject_alt_name(gnutls_x509_crt_t cert, + unsigned int seq, + void *san, + size_t * san_size, + unsigned int *critical); +int gnutls_x509_crt_get_subject_alt_name2(gnutls_x509_crt_t cert, + unsigned int seq, + void *san, + size_t * san_size, + unsigned int *san_type, + unsigned int *critical); + +int gnutls_x509_crt_get_subject_alt_othername_oid(gnutls_x509_crt_t + cert, + unsigned int seq, + void *oid, + size_t * oid_size); + +int gnutls_x509_crt_get_issuer_alt_name(gnutls_x509_crt_t cert, + unsigned int seq, + void *ian, + size_t * ian_size, + unsigned int *critical); +int gnutls_x509_crt_get_issuer_alt_name2(gnutls_x509_crt_t cert, + unsigned int seq, + void *ian, + size_t * ian_size, + unsigned int *ian_type, + unsigned int *critical); + +int gnutls_x509_crt_get_issuer_alt_othername_oid(gnutls_x509_crt_t + cert, + unsigned int seq, + void *ret, + size_t * ret_size); + +int gnutls_x509_crt_get_ca_status(gnutls_x509_crt_t cert, + unsigned int *critical); +int gnutls_x509_crt_get_basic_constraints(gnutls_x509_crt_t cert, + unsigned int *critical, + unsigned int *ca, int *pathlen); + +/* The key_usage flags are defined in gnutls.h. They are the + * GNUTLS_KEY_* definitions. + */ +int gnutls_x509_crt_get_key_usage(gnutls_x509_crt_t cert, + unsigned int *key_usage, + unsigned int *critical); +int gnutls_x509_crt_set_key_usage(gnutls_x509_crt_t crt, + unsigned int usage); +int gnutls_x509_crt_set_authority_info_access(gnutls_x509_crt_t + crt, int what, + gnutls_datum_t * data); + +int gnutls_x509_crt_get_proxy(gnutls_x509_crt_t cert, + unsigned int *critical, + int *pathlen, + char **policyLanguage, + char **policy, size_t * sizeof_policy); + +#define GNUTLS_MAX_QUALIFIERS 8 + + /** + * gnutls_x509_qualifier_t: + * @GNUTLS_X509_QUALIFIER_UNKNOWN: Unknown qualifier. + * @GNUTLS_X509_QUALIFIER_URI: A URL + * @GNUTLS_X509_QUALIFIER_NOICE: A text notice. + * + * Enumeration of types for the X.509 qualifiers, of the certificate policy extension. + */ +typedef enum gnutls_x509_qualifier_t { + GNUTLS_X509_QUALIFIER_UNKNOWN = 0, GNUTLS_X509_QUALIFIER_URI, + GNUTLS_X509_QUALIFIER_NOTICE +} gnutls_x509_qualifier_t; + +typedef struct gnutls_x509_policy_st { + char *oid; + unsigned int qualifiers; + struct { + gnutls_x509_qualifier_t type; + char *data; + unsigned int size; + } qualifier[GNUTLS_MAX_QUALIFIERS]; +} gnutls_x509_policy_st; + +void gnutls_x509_policy_release(struct gnutls_x509_policy_st + *policy); +int gnutls_x509_crt_get_policy(gnutls_x509_crt_t crt, int indx, struct gnutls_x509_policy_st + *policy, unsigned int *critical); +int gnutls_x509_crt_set_policy(gnutls_x509_crt_t crt, struct gnutls_x509_policy_st + *policy, unsigned int critical); + +int gnutls_x509_dn_oid_known(const char *oid); + +#define GNUTLS_X509_DN_OID_RETURN_OID 1 +const char *gnutls_x509_dn_oid_name(const char *oid, unsigned int flags); + + /* Read extensions by OID. */ +int gnutls_x509_crt_get_extension_oid(gnutls_x509_crt_t cert, + int indx, void *oid, + size_t * oid_size); +int gnutls_x509_crt_get_extension_by_oid(gnutls_x509_crt_t cert, + const char *oid, int indx, + void *buf, + size_t * buf_size, + unsigned int *critical); + + /* Read extensions by sequence number. */ +int gnutls_x509_crt_get_extension_info(gnutls_x509_crt_t cert, + int indx, void *oid, + size_t * oid_size, + unsigned int *critical); +int gnutls_x509_crt_get_extension_data(gnutls_x509_crt_t cert, + int indx, void *data, + size_t * sizeof_data); + +int gnutls_x509_crt_set_extension_by_oid(gnutls_x509_crt_t crt, + const char *oid, + const void *buf, + size_t sizeof_buf, + unsigned int critical); + +/* X.509 Certificate writing. + */ +int gnutls_x509_crt_set_dn(gnutls_x509_crt_t crt, const char *dn, + const char **err); + +int gnutls_x509_crt_set_dn_by_oid(gnutls_x509_crt_t crt, + const char *oid, + unsigned int raw_flag, + const void *name, + unsigned int sizeof_name); +int gnutls_x509_crt_set_issuer_dn_by_oid(gnutls_x509_crt_t crt, + const char *oid, + unsigned int raw_flag, + const void *name, + unsigned int sizeof_name); +int gnutls_x509_crt_set_issuer_dn(gnutls_x509_crt_t crt, + const char *dn, const char **err); + +int gnutls_x509_crt_set_version(gnutls_x509_crt_t crt, + unsigned int version); +int gnutls_x509_crt_set_key(gnutls_x509_crt_t crt, + gnutls_x509_privkey_t key); +int gnutls_x509_crt_set_ca_status(gnutls_x509_crt_t crt, unsigned int ca); +int gnutls_x509_crt_set_basic_constraints(gnutls_x509_crt_t crt, + unsigned int ca, + int pathLenConstraint); +int gnutls_x509_crt_set_subject_alternative_name(gnutls_x509_crt_t + crt, + gnutls_x509_subject_alt_name_t + type, const char + *data_string); +int gnutls_x509_crt_set_subject_alt_name(gnutls_x509_crt_t crt, + gnutls_x509_subject_alt_name_t + type, const void *data, + unsigned int data_size, + unsigned int flags); +int gnutls_x509_crt_sign(gnutls_x509_crt_t crt, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key); +int gnutls_x509_crt_sign2(gnutls_x509_crt_t crt, + gnutls_x509_crt_t issuer, + gnutls_x509_privkey_t issuer_key, + gnutls_digest_algorithm_t dig, + unsigned int flags); +int gnutls_x509_crt_set_activation_time(gnutls_x509_crt_t cert, + time_t act_time); +int gnutls_x509_crt_set_expiration_time(gnutls_x509_crt_t cert, + time_t exp_time); +int gnutls_x509_crt_set_serial(gnutls_x509_crt_t cert, + const void *serial, size_t serial_size); + +int gnutls_x509_crt_set_subject_key_id(gnutls_x509_crt_t cert, + const void *id, size_t id_size); + +int gnutls_x509_crt_set_proxy_dn(gnutls_x509_crt_t crt, + gnutls_x509_crt_t eecrt, + unsigned int raw_flag, + const void *name, + unsigned int sizeof_name); +int gnutls_x509_crt_set_proxy(gnutls_x509_crt_t crt, + int pathLenConstraint, + const char *policyLanguage, + const char *policy, size_t sizeof_policy); + +int gnutls_x509_crt_print(gnutls_x509_crt_t cert, + gnutls_certificate_print_formats_t + format, gnutls_datum_t * out); +int gnutls_x509_crl_print(gnutls_x509_crl_t crl, + gnutls_certificate_print_formats_t + format, gnutls_datum_t * out); + + /* Access to internal Certificate fields. + */ +int gnutls_x509_crt_get_raw_issuer_dn(gnutls_x509_crt_t cert, + gnutls_datum_t * start); +int gnutls_x509_crt_get_raw_dn(gnutls_x509_crt_t cert, + gnutls_datum_t * start); + +/* RDN handling. + */ +int gnutls_x509_rdn_get(const gnutls_datum_t * idn, + char *buf, size_t * sizeof_buf); +int gnutls_x509_rdn_get_oid(const gnutls_datum_t * idn, + int indx, void *buf, size_t * sizeof_buf); + +int gnutls_x509_rdn_get_by_oid(const gnutls_datum_t * idn, + const char *oid, int indx, + unsigned int raw_flag, void *buf, + size_t * sizeof_buf); + +typedef void *gnutls_x509_dn_t; + +typedef struct gnutls_x509_ava_st { + gnutls_datum_t oid; + gnutls_datum_t value; + unsigned long value_tag; +} gnutls_x509_ava_st; + +int gnutls_x509_crt_get_subject(gnutls_x509_crt_t cert, + gnutls_x509_dn_t * dn); +int gnutls_x509_crt_get_issuer(gnutls_x509_crt_t cert, + gnutls_x509_dn_t * dn); +int gnutls_x509_dn_get_rdn_ava(gnutls_x509_dn_t dn, int irdn, + int iava, gnutls_x509_ava_st * ava); + +int gnutls_x509_dn_init(gnutls_x509_dn_t * dn); + +int gnutls_x509_dn_import(gnutls_x509_dn_t dn, + const gnutls_datum_t * data); + +int gnutls_x509_dn_export(gnutls_x509_dn_t dn, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_x509_dn_export2(gnutls_x509_dn_t dn, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +void gnutls_x509_dn_deinit(gnutls_x509_dn_t dn); + + +/* CRL handling functions. + */ +int gnutls_x509_crl_init(gnutls_x509_crl_t * crl); +void gnutls_x509_crl_deinit(gnutls_x509_crl_t crl); + +int gnutls_x509_crl_import(gnutls_x509_crl_t crl, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); +int gnutls_x509_crl_export(gnutls_x509_crl_t crl, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_x509_crl_export2(gnutls_x509_crl_t crl, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +int +gnutls_x509_crl_get_raw_issuer_dn(gnutls_x509_crl_t crl, + gnutls_datum_t * dn); + +int gnutls_x509_crl_get_issuer_dn(gnutls_x509_crl_t crl, + char *buf, size_t * sizeof_buf); +int gnutls_x509_crl_get_issuer_dn2(gnutls_x509_crl_t crl, + gnutls_datum_t * dn); +int gnutls_x509_crl_get_issuer_dn_by_oid(gnutls_x509_crl_t crl, + const char *oid, int indx, + unsigned int raw_flag, + void *buf, size_t * sizeof_buf); +int gnutls_x509_crl_get_dn_oid(gnutls_x509_crl_t crl, int indx, + void *oid, size_t * sizeof_oid); + +int gnutls_x509_crl_get_signature_algorithm(gnutls_x509_crl_t crl); +int gnutls_x509_crl_get_signature(gnutls_x509_crl_t crl, + char *sig, size_t * sizeof_sig); +int gnutls_x509_crl_get_version(gnutls_x509_crl_t crl); + +time_t gnutls_x509_crl_get_this_update(gnutls_x509_crl_t crl); +time_t gnutls_x509_crl_get_next_update(gnutls_x509_crl_t crl); + +int gnutls_x509_crl_get_crt_count(gnutls_x509_crl_t crl); +int gnutls_x509_crl_get_crt_serial(gnutls_x509_crl_t crl, int indx, + unsigned char *serial, + size_t * serial_size, time_t * t); +#define gnutls_x509_crl_get_certificate_count gnutls_x509_crl_get_crt_count +#define gnutls_x509_crl_get_certificate gnutls_x509_crl_get_crt_serial + +int gnutls_x509_crl_check_issuer(gnutls_x509_crl_t crl, + gnutls_x509_crt_t issuer); + +int gnutls_x509_crl_list_import2(gnutls_x509_crl_t ** crls, + unsigned int *size, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); + +int gnutls_x509_crl_list_import(gnutls_x509_crl_t * crls, + unsigned int *crl_max, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + unsigned int flags); +/* CRL writing. + */ +int gnutls_x509_crl_set_version(gnutls_x509_crl_t crl, + unsigned int version); +int gnutls_x509_crl_set_this_update(gnutls_x509_crl_t crl, + time_t act_time); +int gnutls_x509_crl_set_next_update(gnutls_x509_crl_t crl, + time_t exp_time); +int gnutls_x509_crl_set_crt_serial(gnutls_x509_crl_t crl, + const void *serial, + size_t serial_size, + time_t revocation_time); +int gnutls_x509_crl_set_crt(gnutls_x509_crl_t crl, + gnutls_x509_crt_t crt, time_t revocation_time); + +int gnutls_x509_crl_get_authority_key_id(gnutls_x509_crl_t crl, + void *id, + size_t * id_size, + unsigned int *critical); +int gnutls_x509_crl_get_authority_key_gn_serial(gnutls_x509_crl_t + crl, + unsigned int seq, + void *alt, + size_t * alt_size, + unsigned int + *alt_type, + void *serial, + size_t * + serial_size, unsigned int + *critical); + +int gnutls_x509_crl_get_number(gnutls_x509_crl_t crl, void *ret, + size_t * ret_size, unsigned int *critical); + +int gnutls_x509_crl_get_extension_oid(gnutls_x509_crl_t crl, + int indx, void *oid, + size_t * sizeof_oid); + +int gnutls_x509_crl_get_extension_info(gnutls_x509_crl_t crl, + int indx, void *oid, + size_t * sizeof_oid, + unsigned int *critical); + +int gnutls_x509_crl_get_extension_data(gnutls_x509_crl_t crl, + int indx, void *data, + size_t * sizeof_data); + +int gnutls_x509_crl_set_authority_key_id(gnutls_x509_crl_t crl, + const void *id, size_t id_size); + +int gnutls_x509_crl_set_number(gnutls_x509_crl_t crl, + const void *nr, size_t nr_size); + + +/* PKCS7 structures handling + */ +struct gnutls_pkcs7_int; +typedef struct gnutls_pkcs7_int *gnutls_pkcs7_t; + +int gnutls_pkcs7_init(gnutls_pkcs7_t * pkcs7); +void gnutls_pkcs7_deinit(gnutls_pkcs7_t pkcs7); +int gnutls_pkcs7_import(gnutls_pkcs7_t pkcs7, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); +int gnutls_pkcs7_export(gnutls_pkcs7_t pkcs7, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_pkcs7_export2(gnutls_pkcs7_t pkcs7, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +int gnutls_pkcs7_get_crt_count(gnutls_pkcs7_t pkcs7); +int gnutls_pkcs7_get_crt_raw(gnutls_pkcs7_t pkcs7, int indx, + void *certificate, size_t * certificate_size); + +int gnutls_pkcs7_set_crt_raw(gnutls_pkcs7_t pkcs7, + const gnutls_datum_t * crt); +int gnutls_pkcs7_set_crt(gnutls_pkcs7_t pkcs7, gnutls_x509_crt_t crt); +int gnutls_pkcs7_delete_crt(gnutls_pkcs7_t pkcs7, int indx); + +int gnutls_pkcs7_get_crl_raw(gnutls_pkcs7_t pkcs7, + int indx, void *crl, size_t * crl_size); +int gnutls_pkcs7_get_crl_count(gnutls_pkcs7_t pkcs7); + +int gnutls_pkcs7_set_crl_raw(gnutls_pkcs7_t pkcs7, + const gnutls_datum_t * crl); +int gnutls_pkcs7_set_crl(gnutls_pkcs7_t pkcs7, gnutls_x509_crl_t crl); +int gnutls_pkcs7_delete_crl(gnutls_pkcs7_t pkcs7, int indx); + +/* X.509 Certificate verification functions. + */ + +/** + * gnutls_certificate_verify_flags: + * @GNUTLS_VERIFY_DISABLE_CA_SIGN: If set a signer does not have to be + * a certificate authority. This flag should normally be disabled, + * unless you know what this means. + * @GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS: If set a signer in the trusted + * list is never checked for expiration or activation. + * @GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT: Allow trusted CA certificates + * with version 1. This is safer than %GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT, + * and should be used instead. That way only signers in your trusted list + * will be allowed to have certificates of version 1. This is the default. + * @GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT: Do not allow trusted CA + * certificates that have version 1. This option is to be used + * to deprecate all certificates of version 1. + * @GNUTLS_VERIFY_DO_NOT_ALLOW_SAME: If a certificate is not signed by + * anyone trusted but exists in the trusted CA list do not treat it + * as trusted. + * @GNUTLS_VERIFY_ALLOW_UNSORTED_CHAIN: A certificate chain is tolerated + * if unsorted (the case with many TLS servers out there). This is the + * default since GnuTLS 3.1.4. + * @GNUTLS_VERIFY_DO_NOT_ALLOW_UNSORTED_CHAIN: Do not tolerate an unsorted + * certificate chain. + * @GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT: Allow CA certificates that + * have version 1 (both root and intermediate). This might be + * dangerous since those haven't the basicConstraints + * extension. Must be used in combination with + * %GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT. + * @GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2: Allow certificates to be signed + * using the broken MD2 algorithm. + * @GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5: Allow certificates to be signed + * using the broken MD5 algorithm. + * @GNUTLS_VERIFY_DISABLE_TIME_CHECKS: Disable checking of activation + * and expiration validity periods of certificate chains. Don't set + * this unless you understand the security implications. + * @GNUTLS_VERIFY_DISABLE_CRL_CHECKS: Disable checking for validity + * using certificate revocation lists or the available OCSP data. + * + * Enumeration of different certificate verify flags. + */ +typedef enum gnutls_certificate_verify_flags { + GNUTLS_VERIFY_DISABLE_CA_SIGN = 1 << 0, + GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT = 1 << 1, + GNUTLS_VERIFY_DO_NOT_ALLOW_SAME = 1 << 2, + GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT = 1 << 3, + GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD2 = 1 << 4, + GNUTLS_VERIFY_ALLOW_SIGN_RSA_MD5 = 1 << 5, + GNUTLS_VERIFY_DISABLE_TIME_CHECKS = 1 << 6, + GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS = 1 << 7, + GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT = 1 << 8, + GNUTLS_VERIFY_DISABLE_CRL_CHECKS = 1 << 9, + GNUTLS_VERIFY_ALLOW_UNSORTED_CHAIN = 1 << 10, + GNUTLS_VERIFY_DO_NOT_ALLOW_UNSORTED_CHAIN = 1 << 11, +} gnutls_certificate_verify_flags; + +int gnutls_x509_crt_check_issuer(gnutls_x509_crt_t cert, + gnutls_x509_crt_t issuer); + +int gnutls_x509_crt_list_verify(const gnutls_x509_crt_t * + cert_list, int cert_list_length, + const gnutls_x509_crt_t * CA_list, + int CA_list_length, + const gnutls_x509_crl_t * CRL_list, + int CRL_list_length, + unsigned int flags, unsigned int *verify); + +int gnutls_x509_crt_verify(gnutls_x509_crt_t cert, + const gnutls_x509_crt_t * CA_list, + int CA_list_length, unsigned int flags, + unsigned int *verify); +int gnutls_x509_crl_verify(gnutls_x509_crl_t crl, + const gnutls_x509_crt_t * CA_list, + int CA_list_length, unsigned int flags, + unsigned int *verify); + +int gnutls_x509_crt_check_revocation(gnutls_x509_crt_t cert, + const gnutls_x509_crl_t * + crl_list, int crl_list_length); + +int gnutls_x509_crt_get_fingerprint(gnutls_x509_crt_t cert, + gnutls_digest_algorithm_t algo, + void *buf, size_t * buf_size); + +int gnutls_x509_crt_get_key_purpose_oid(gnutls_x509_crt_t cert, + int indx, void *oid, + size_t * oid_size, + unsigned int *critical); +int gnutls_x509_crt_set_key_purpose_oid(gnutls_x509_crt_t cert, + const void *oid, + unsigned int critical); + +/* Private key handling. + */ + +/* Flags for the gnutls_x509_privkey_export_pkcs8() function. + */ + +#define GNUTLS_PKCS8_PLAIN GNUTLS_PKCS_PLAIN +#define GNUTLS_PKCS8_USE_PKCS12_3DES GNUTLS_PKCS_USE_PKCS12_3DES +#define GNUTLS_PKCS8_USE_PKCS12_ARCFOUR GNUTLS_PKCS_USE_PKCS12_ARCFOUR +#define GNUTLS_PKCS8_USE_PKCS12_RC2_40 GNUTLS_PKCS_USE_PKCS12_RC2_40 + +/** + * gnutls_pkcs_encrypt_flags_t: + * @GNUTLS_PKCS_PLAIN: Unencrypted private key. + * @GNUTLS_PKCS_NULL_PASSWORD: Some schemas distinguish between an empty and a NULL password. + * @GNUTLS_PKCS_USE_PKCS12_3DES: PKCS-12 3DES. + * @GNUTLS_PKCS_USE_PKCS12_ARCFOUR: PKCS-12 ARCFOUR. + * @GNUTLS_PKCS_USE_PKCS12_RC2_40: PKCS-12 RC2-40. + * @GNUTLS_PKCS_USE_PBES2_3DES: PBES2 3DES. + * @GNUTLS_PKCS_USE_PBES2_AES_128: PBES2 AES-128. + * @GNUTLS_PKCS_USE_PBES2_AES_192: PBES2 AES-192. + * @GNUTLS_PKCS_USE_PBES2_AES_256: PBES2 AES-256. + * + * Enumeration of different PKCS encryption flags. + */ +typedef enum gnutls_pkcs_encrypt_flags_t { + GNUTLS_PKCS_PLAIN = 1, + GNUTLS_PKCS_USE_PKCS12_3DES = 2, + GNUTLS_PKCS_USE_PKCS12_ARCFOUR = 4, + GNUTLS_PKCS_USE_PKCS12_RC2_40 = 8, + GNUTLS_PKCS_USE_PBES2_3DES = 16, + GNUTLS_PKCS_USE_PBES2_AES_128 = 32, + GNUTLS_PKCS_USE_PBES2_AES_192 = 64, + GNUTLS_PKCS_USE_PBES2_AES_256 = 128, + GNUTLS_PKCS_NULL_PASSWORD = 256 +} gnutls_pkcs_encrypt_flags_t; + +int gnutls_x509_privkey_init(gnutls_x509_privkey_t * key); +void gnutls_x509_privkey_deinit(gnutls_x509_privkey_t key); +gnutls_sec_param_t +gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key); +int gnutls_x509_privkey_cpy(gnutls_x509_privkey_t dst, + gnutls_x509_privkey_t src); +int gnutls_x509_privkey_import(gnutls_x509_privkey_t key, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); +int gnutls_x509_privkey_import_pkcs8(gnutls_x509_privkey_t key, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + const char *password, + unsigned int flags); +int gnutls_x509_privkey_import_openssl(gnutls_x509_privkey_t key, + const gnutls_datum_t * data, + const char *password); + +int gnutls_x509_privkey_import2(gnutls_x509_privkey_t key, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format, + const char *password, unsigned int flags); + +int gnutls_x509_privkey_import_rsa_raw(gnutls_x509_privkey_t key, + const gnutls_datum_t * m, + const gnutls_datum_t * e, + const gnutls_datum_t * d, + const gnutls_datum_t * p, + const gnutls_datum_t * q, + const gnutls_datum_t * u); +int gnutls_x509_privkey_import_rsa_raw2(gnutls_x509_privkey_t key, + const gnutls_datum_t * m, + const gnutls_datum_t * e, + const gnutls_datum_t * d, + const gnutls_datum_t * p, + const gnutls_datum_t * q, + const gnutls_datum_t * u, + const gnutls_datum_t * e1, + const gnutls_datum_t * e2); +int gnutls_x509_privkey_import_ecc_raw(gnutls_x509_privkey_t key, + gnutls_ecc_curve_t curve, + const gnutls_datum_t * x, + const gnutls_datum_t * y, + const gnutls_datum_t * k); + +int gnutls_x509_privkey_fix(gnutls_x509_privkey_t key); + +int gnutls_x509_privkey_export_dsa_raw(gnutls_x509_privkey_t key, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * g, + gnutls_datum_t * y, + gnutls_datum_t * x); +int gnutls_x509_privkey_import_dsa_raw(gnutls_x509_privkey_t key, + const gnutls_datum_t * p, + const gnutls_datum_t * q, + const gnutls_datum_t * g, + const gnutls_datum_t * y, + const gnutls_datum_t * x); + +int gnutls_x509_privkey_get_pk_algorithm(gnutls_x509_privkey_t key); +int gnutls_x509_privkey_get_pk_algorithm2(gnutls_x509_privkey_t + key, unsigned int *bits); +int gnutls_x509_privkey_get_key_id(gnutls_x509_privkey_t key, + unsigned int flags, + unsigned char *output_data, + size_t * output_data_size); + +int gnutls_x509_privkey_generate(gnutls_x509_privkey_t key, + gnutls_pk_algorithm_t algo, + unsigned int bits, unsigned int flags); +int gnutls_x509_privkey_verify_params(gnutls_x509_privkey_t key); + +int gnutls_x509_privkey_export(gnutls_x509_privkey_t key, + gnutls_x509_crt_fmt_t format, + void *output_data, + size_t * output_data_size); +int gnutls_x509_privkey_export2(gnutls_x509_privkey_t key, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); +int gnutls_x509_privkey_export_pkcs8(gnutls_x509_privkey_t key, + gnutls_x509_crt_fmt_t format, + const char *password, + unsigned int flags, + void *output_data, + size_t * output_data_size); +int gnutls_x509_privkey_export2_pkcs8(gnutls_x509_privkey_t key, + gnutls_x509_crt_fmt_t format, + const char *password, + unsigned int flags, + gnutls_datum_t * out); +int gnutls_x509_privkey_export_rsa_raw2(gnutls_x509_privkey_t key, + gnutls_datum_t * m, + gnutls_datum_t * e, + gnutls_datum_t * d, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * u, + gnutls_datum_t * e1, + gnutls_datum_t * e2); +int gnutls_x509_privkey_export_rsa_raw(gnutls_x509_privkey_t key, + gnutls_datum_t * m, + gnutls_datum_t * e, + gnutls_datum_t * d, + gnutls_datum_t * p, + gnutls_datum_t * q, + gnutls_datum_t * u); +int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key, + gnutls_ecc_curve_t * curve, + gnutls_datum_t * x, + gnutls_datum_t * y, + gnutls_datum_t * k); +/* Certificate request stuff. + */ + +int gnutls_x509_crq_sign2(gnutls_x509_crq_t crq, + gnutls_x509_privkey_t key, + gnutls_digest_algorithm_t dig, + unsigned int flags); + +int gnutls_x509_crq_print(gnutls_x509_crq_t crq, + gnutls_certificate_print_formats_t + format, gnutls_datum_t * out); + +int gnutls_x509_crq_verify(gnutls_x509_crq_t crq, unsigned int flags); + +int gnutls_x509_crq_init(gnutls_x509_crq_t * crq); +void gnutls_x509_crq_deinit(gnutls_x509_crq_t crq); +int gnutls_x509_crq_import(gnutls_x509_crq_t crq, + const gnutls_datum_t * data, + gnutls_x509_crt_fmt_t format); + +int gnutls_x509_crq_get_private_key_usage_period(gnutls_x509_crq_t + cert, + time_t * + activation, + time_t * + expiration, unsigned int + *critical); + +int gnutls_x509_crq_get_dn(gnutls_x509_crq_t crq, char *buf, + size_t * sizeof_buf); +int gnutls_x509_crq_get_dn2(gnutls_x509_crq_t crq, gnutls_datum_t * dn); +int gnutls_x509_crq_get_dn_oid(gnutls_x509_crq_t crq, int indx, + void *oid, size_t * sizeof_oid); +int gnutls_x509_crq_get_dn_by_oid(gnutls_x509_crq_t crq, + const char *oid, int indx, + unsigned int raw_flag, void *buf, + size_t * sizeof_buf); +int gnutls_x509_crq_set_dn(gnutls_x509_crq_t crq, const char *dn, + const char **err); +int gnutls_x509_crq_set_dn_by_oid(gnutls_x509_crq_t crq, + const char *oid, + unsigned int raw_flag, + const void *data, + unsigned int sizeof_data); +int gnutls_x509_crq_set_version(gnutls_x509_crq_t crq, + unsigned int version); +int gnutls_x509_crq_get_version(gnutls_x509_crq_t crq); +int gnutls_x509_crq_set_key(gnutls_x509_crq_t crq, + gnutls_x509_privkey_t key); + +int gnutls_x509_crq_set_challenge_password(gnutls_x509_crq_t crq, + const char *pass); +int gnutls_x509_crq_get_challenge_password(gnutls_x509_crq_t crq, + char *pass, + size_t * sizeof_pass); + +int gnutls_x509_crq_set_attribute_by_oid(gnutls_x509_crq_t crq, + const char *oid, + void *buf, size_t sizeof_buf); +int gnutls_x509_crq_get_attribute_by_oid(gnutls_x509_crq_t crq, + const char *oid, int indx, + void *buf, size_t * sizeof_buf); + +int gnutls_x509_crq_export(gnutls_x509_crq_t crq, + gnutls_x509_crt_fmt_t format, + void *output_data, size_t * output_data_size); +int gnutls_x509_crq_export2(gnutls_x509_crq_t crq, + gnutls_x509_crt_fmt_t format, + gnutls_datum_t * out); + +int gnutls_x509_crt_set_crq(gnutls_x509_crt_t crt, gnutls_x509_crq_t crq); +int gnutls_x509_crt_set_crq_extensions(gnutls_x509_crt_t crt, + gnutls_x509_crq_t crq); + +int gnutls_x509_crq_set_private_key_usage_period(gnutls_x509_crq_t + crq, + time_t activation, + time_t expiration); +int gnutls_x509_crq_set_key_rsa_raw(gnutls_x509_crq_t crq, + const gnutls_datum_t * m, + const gnutls_datum_t * e); +int gnutls_x509_crq_set_subject_alt_name(gnutls_x509_crq_t crq, + gnutls_x509_subject_alt_name_t + nt, const void *data, + unsigned int data_size, + unsigned int flags); + +int gnutls_x509_crq_set_key_usage(gnutls_x509_crq_t crq, + unsigned int usage); +int gnutls_x509_crq_set_basic_constraints(gnutls_x509_crq_t crq, + unsigned int ca, + int pathLenConstraint); +int gnutls_x509_crq_set_key_purpose_oid(gnutls_x509_crq_t crq, + const void *oid, + unsigned int critical); +int gnutls_x509_crq_get_key_purpose_oid(gnutls_x509_crq_t crq, + int indx, void *oid, + size_t * sizeof_oid, + unsigned int *critical); + +int gnutls_x509_crq_get_extension_data(gnutls_x509_crq_t crq, + int indx, void *data, + size_t * sizeof_data); +int gnutls_x509_crq_get_extension_info(gnutls_x509_crq_t crq, + int indx, void *oid, + size_t * sizeof_oid, + unsigned int *critical); +int gnutls_x509_crq_get_attribute_data(gnutls_x509_crq_t crq, + int indx, void *data, + size_t * sizeof_data); +int gnutls_x509_crq_get_attribute_info(gnutls_x509_crq_t crq, + int indx, void *oid, + size_t * sizeof_oid); +int gnutls_x509_crq_get_pk_algorithm(gnutls_x509_crq_t crq, + unsigned int *bits); + +int gnutls_x509_crq_get_key_id(gnutls_x509_crq_t crq, + unsigned int flags, + unsigned char *output_data, + size_t * output_data_size); +int gnutls_x509_crq_get_key_rsa_raw(gnutls_x509_crq_t crq, + gnutls_datum_t * m, + gnutls_datum_t * e); + +int gnutls_x509_crq_get_key_usage(gnutls_x509_crq_t crq, + unsigned int *key_usage, + unsigned int *critical); +int gnutls_x509_crq_get_basic_constraints(gnutls_x509_crq_t crq, + unsigned int *critical, + unsigned int *ca, int *pathlen); +int gnutls_x509_crq_get_subject_alt_name(gnutls_x509_crq_t crq, + unsigned int seq, + void *ret, + size_t * ret_size, + unsigned int *ret_type, + unsigned int *critical); +int gnutls_x509_crq_get_subject_alt_othername_oid(gnutls_x509_crq_t + crq, + unsigned int seq, + void *ret, + size_t * ret_size); + +int gnutls_x509_crq_get_extension_by_oid(gnutls_x509_crq_t crq, + const char *oid, int indx, + void *buf, + size_t * sizeof_buf, + unsigned int *critical); + +typedef struct gnutls_x509_trust_list_st *gnutls_x509_trust_list_t; + +int +gnutls_x509_trust_list_init(gnutls_x509_trust_list_t * list, + unsigned int size); + +void +gnutls_x509_trust_list_deinit(gnutls_x509_trust_list_t list, + unsigned int all); + +int gnutls_x509_trust_list_get_issuer(gnutls_x509_trust_list_t + list, gnutls_x509_crt_t cert, + gnutls_x509_crt_t * issuer, + unsigned int flags); + +int +gnutls_x509_trust_list_add_cas(gnutls_x509_trust_list_t list, + const gnutls_x509_crt_t * clist, + int clist_size, unsigned int flags); +int gnutls_x509_trust_list_remove_cas(gnutls_x509_trust_list_t + list, + const gnutls_x509_crt_t * + clist, int clist_size); + +int gnutls_x509_trust_list_add_named_crt(gnutls_x509_trust_list_t + list, + gnutls_x509_crt_t cert, + const void *name, + size_t name_size, + unsigned int flags); + +#define GNUTLS_TL_VERIFY_CRL 1 +int +gnutls_x509_trust_list_add_crls(gnutls_x509_trust_list_t list, + const gnutls_x509_crl_t * + crl_list, int crl_size, + unsigned int flags, + unsigned int verification_flags); + +typedef int gnutls_verify_output_function(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer, /* The issuer if verification failed + * because of him. might be null. + */ + gnutls_x509_crl_t crl, /* The CRL that caused verification failure + * if any. Might be null. + */ + unsigned int + verification_output); + +int gnutls_x509_trust_list_verify_named_crt + (gnutls_x509_trust_list_t list, gnutls_x509_crt_t cert, + const void *name, size_t name_size, unsigned int flags, + unsigned int *verify, gnutls_verify_output_function func); + +int +gnutls_x509_trust_list_verify_crt(gnutls_x509_trust_list_t list, + gnutls_x509_crt_t * cert_list, + unsigned int cert_list_size, + unsigned int flags, + unsigned int *verify, + gnutls_verify_output_function func); + + /* trust list convenience functions */ +int +gnutls_x509_trust_list_add_trust_mem(gnutls_x509_trust_list_t + list, + const gnutls_datum_t * cas, + const gnutls_datum_t * crls, + gnutls_x509_crt_fmt_t type, + unsigned int tl_flags, + unsigned int tl_vflags); + +int +gnutls_x509_trust_list_add_trust_file(gnutls_x509_trust_list_t + list, const char *ca_file, + const char *crl_file, + gnutls_x509_crt_fmt_t type, + unsigned int tl_flags, + unsigned int tl_vflags); + +int +gnutls_x509_trust_list_remove_trust_file(gnutls_x509_trust_list_t + list, + const char *ca_file, + gnutls_x509_crt_fmt_t type); + +int +gnutls_x509_trust_list_remove_trust_mem(gnutls_x509_trust_list_t + list, + const gnutls_datum_t * + cas, gnutls_x509_crt_fmt_t type); + +int +gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t + list, + unsigned int tl_flags, + unsigned int tl_vflags); + +void gnutls_certificate_set_trust_list + (gnutls_certificate_credentials_t res, + gnutls_x509_trust_list_t tlist, unsigned flags); + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ +#endif /* GNUTLS_X509_H */ diff --git a/include/reactos/libs/gnutls/gnutls/xssl.h b/include/reactos/libs/gnutls/gnutls/xssl.h new file mode 100644 index 00000000000..f9d2bce2fa6 --- /dev/null +++ b/include/reactos/libs/gnutls/gnutls/xssl.h @@ -0,0 +1,125 @@ +/* -*- c -*- + * Copyright (C) 2013 Nikos Mavrogiannopoulos + * + * This file is part of GnuTLS. + * + * The GnuTLS library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see + * + */ + +#ifndef GNUTLS_SBUF_H +#define GNUTLS_SBUF_H + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#include + +/* Buffered session I/O */ +typedef struct xssl_st *xssl_t; +typedef struct xssl_cred_st *xssl_cred_t; + +ssize_t xssl_printf(xssl_t sb, const char *fmt, ...) +#ifdef __GNUC__ + __attribute__ ((format(printf, 2, 3))) +#endif + ; + +ssize_t xssl_write(xssl_t sb, const void *data, size_t data_size); + +ssize_t xssl_flush(xssl_t sb); + +ssize_t xssl_read(xssl_t sb, void *data, size_t data_size); + +ssize_t +xssl_getdelim(xssl_t sbuf, char **lineptr, size_t * n, int delimiter); + +#define xssl_getline(sbuf, ptr, n) xssl_getdelim(sbuf, ptr, n, '\n') + +void xssl_deinit(xssl_t sb); + +#define GNUTLS_SBUF_WRITE_FLUSHES (1<<0) +int xssl_sinit(xssl_t * isb, gnutls_session_t session, unsigned int flags); + +gnutls_session_t xssl_get_session(xssl_t sb); + +int xssl_client_init(xssl_t * isb, const char *hostname, + const char *service, + gnutls_transport_ptr fd, + const char *priority, xssl_cred_t cred, + unsigned int *status, unsigned int flags); + +int xssl_server_init(xssl_t * isb, + gnutls_transport_ptr fd, + const char *priority, xssl_cred_t cred, + unsigned int *status, unsigned int flags); + +/* High level credential structures */ +typedef enum { + GNUTLS_VMETHOD_NO_AUTH = 0, + GNUTLS_VMETHOD_TOFU = 1 << 0, + GNUTLS_VMETHOD_GIVEN_CAS = 1 << 1, + GNUTLS_VMETHOD_SYSTEM_CAS = 1 << 2 +} gnutls_vmethod_t; + +typedef enum { + GNUTLS_CINPUT_TYPE_FILE = 0, + GNUTLS_CINPUT_TYPE_MEM = 1, + GNUTLS_CINPUT_TYPE_PIN_FUNC = 2, +} gnutls_cinput_type_t; + +typedef enum { + GNUTLS_CINPUT_CAS = 1, /* i1 contains the CAs */ + GNUTLS_CINPUT_CRLS = 2, /* i1 contains the CRLs */ + GNUTLS_CINPUT_TOFU_DB = 3, /* i1 contains the DB filename */ + GNUTLS_CINPUT_KEYPAIR = 4, /* i1 contains the certificate, i2 the key + * or i1.pin_fn contains the pin function, + * and i2.udata the user pointer */ +} gnutls_cinput_contents_t; + +typedef struct gnutls_cinput_st { + gnutls_cinput_type_t type; + gnutls_cinput_contents_t contents; + gnutls_x509_crt_fmt_t fmt; /* if applicable */ + + union { + gnutls_pin_callback_t pin_fn; + const char *file; + gnutls_datum_t mem; + } i1; + + union { + void *udata; + const char *file; + gnutls_datum_t mem; + } i2; + + unsigned long future_pad[8]; +} gnutls_cinput_st; + +int xssl_cred_init(xssl_cred_t * c, unsigned vflags, + gnutls_cinput_st * aux, unsigned aux_size); +void xssl_cred_deinit(xssl_cred_t cred); + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* GNUTLS_SBUF_H */ diff --git a/include/reactos/libs/gnutls/nettle/aes.h b/include/reactos/libs/gnutls/nettle/aes.h new file mode 100644 index 00000000000..422ed33f161 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/aes.h @@ -0,0 +1,80 @@ +/* aes.h + * + * The aes/rijndael block cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_AES_H_INCLUDED +#define NETTLE_AES_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define aes_set_encrypt_key nettle_aes_set_encrypt_key +#define aes_set_decrypt_key nettle_aes_set_decrypt_key +#define aes_invert_key nettle_aes_invert_key +#define aes_encrypt nettle_aes_encrypt +#define aes_decrypt nettle_aes_decrypt + +#define AES_BLOCK_SIZE 16 + +/* Variable key size between 128 and 256 bits. But the only valid + * values are 16 (128 bits), 24 (192 bits) and 32 (256 bits). */ +#define AES_MIN_KEY_SIZE 16 +#define AES_MAX_KEY_SIZE 32 + +#define AES_KEY_SIZE 32 + +/* FIXME: Change to put nrounds first, to make it possible to use a + truncated ctx struct, with less subkeys, for the shorter key + sizes? */ + struct aes_ctx { + uint32_t keys[60]; /* maximum size of key schedule */ + unsigned nrounds; /* number of rounds to use for our key size */ + }; + + void + aes_set_encrypt_key(struct aes_ctx *ctx, + unsigned length, const uint8_t * key); + + void + aes_set_decrypt_key(struct aes_ctx *ctx, + unsigned length, const uint8_t * key); + + void + aes_invert_key(struct aes_ctx *dst, const struct aes_ctx *src); + + void + aes_encrypt(const struct aes_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + void + aes_decrypt(const struct aes_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_AES_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/arcfour.h b/include/reactos/libs/gnutls/nettle/arcfour.h new file mode 100644 index 00000000000..d1796e81681 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/arcfour.h @@ -0,0 +1,63 @@ +/* arcfour.h + * + * The arcfour/rc4 stream cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_ARCFOUR_H_INCLUDED +#define NETTLE_ARCFOUR_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define arcfour_set_key nettle_arcfour_set_key +#define arcfour_crypt nettle_arcfour_crypt + +/* Minimum and maximum keysizes, and a reasonable default. In + * octets.*/ +#define ARCFOUR_MIN_KEY_SIZE 1 +#define ARCFOUR_MAX_KEY_SIZE 256 +#define ARCFOUR_KEY_SIZE 16 + + struct arcfour_ctx { + uint8_t S[256]; + uint8_t i; + uint8_t j; + }; + + void + arcfour_set_key(struct arcfour_ctx *ctx, + unsigned length, const uint8_t * key); + + void + arcfour_crypt(struct arcfour_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ARCFOUR_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/arctwo.h b/include/reactos/libs/gnutls/nettle/arctwo.h new file mode 100644 index 00000000000..e5108ea76eb --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/arctwo.h @@ -0,0 +1,84 @@ +/* arctwo.h + * + * The arctwo/rfc2268 block cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2004 Simon Josefsson + * Copyright (C) 2002, 2004 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_ARCTWO_H_INCLUDED +#define NETTLE_ARCTWO_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define arctwo_set_key nettle_arctwo_set_key +#define arctwo_set_key_ekb nettle_arctwo_set_key_ekb +#define arctwo_encrypt nettle_arctwo_encrypt +#define arctwo_decrypt nettle_arctwo_decrypt +#define arctwo_set_key_gutmann nettle_arctwo_set_key_gutmann + +#define ARCTWO_BLOCK_SIZE 8 + +/* Variable key size from 1 byte to 128 bytes. */ +#define ARCTWO_MIN_KEY_SIZE 1 +#define ARCTWO_MAX_KEY_SIZE 128 + +#define ARCTWO_KEY_SIZE 8 + + struct arctwo_ctx { + uint16_t S[64]; + }; + +/* Key expansion function that takes the "effective key bits", 1-1024, + as an explicit argument. 0 means maximum key bits. */ + void + arctwo_set_key_ekb(struct arctwo_ctx *ctx, + unsigned length, const uint8_t * key, + unsigned ekb); + +/* Equvivalent to arctwo_set_key_ekb, with ekb = 8 * length */ + void + arctwo_set_key(struct arctwo_ctx *ctx, unsigned length, + const uint8_t * key); + +/* Equvivalent to arctwo_set_key_ekb, with ekb = 1024 */ + void + arctwo_set_key_gutmann(struct arctwo_ctx *ctx, + unsigned length, const uint8_t * key); + + void + arctwo_encrypt(struct arctwo_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + void + arctwo_decrypt(struct arctwo_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ARCTWO_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/asn1.h b/include/reactos/libs/gnutls/nettle/asn1.h new file mode 100644 index 00000000000..bd9295fb91c --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/asn1.h @@ -0,0 +1,138 @@ +/* asn1.h + * + * Some very limited asn.1 support. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2005 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_ASN1_H_INCLUDED +#define NETTLE_ASN1_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define asn1_der_iterator_first nettle_asn1_der_iterator_first +#define asn1_der_iterator_next nettle_asn1_der_iterator_next +#define asn1_der_decode_constructed nettle_asn1_der_decode_constructed +#define asn1_der_decode_constructed_last nettle_asn1_der_decode_constructed_last +#define asn1_der_decode_bitstring nettle_asn1_der_decode_bitstring +#define asn1_der_decode_bitstring_last nettle_asn1_der_decode_bitstring_last +#define asn1_der_get_uint32 nettle_asn1_der_get_uint32 +#define asn1_der_get_bignum nettle_asn1_der_get_bignum + + +/* enum asn1_type keeps the class number and the constructive in bits + 13-14, and the constructive flag in bit 12. The remaining 14 bits + are the tag (although currently, only tags in the range 0-30 are + supported). */ + + enum { + ASN1_TYPE_CONSTRUCTED = 1 << 12, + + ASN1_CLASS_UNIVERSAL = 0, + ASN1_CLASS_APPLICATION = 1 << 13, + ASN1_CLASS_CONTEXT_SPECIFIC = 2 << 13, + ASN1_CLASS_PRIVATE = 3 << 13, + + ASN1_CLASS_MASK = 3 << 13, + ASN1_CLASS_SHIFT = 13, + }; + + enum asn1_type { + ASN1_BOOLEAN = 1, + ASN1_INTEGER = 2, + ASN1_BITSTRING = 3, + ASN1_OCTETSTRING = 4, + ASN1_NULL = 5, + ASN1_IDENTIFIER = 6, + ASN1_REAL = 9, + ASN1_ENUMERATED = 10, + ASN1_UTF8STRING = 12, + ASN1_SEQUENCE = 16 | ASN1_TYPE_CONSTRUCTED, + ASN1_SET = 17 | ASN1_TYPE_CONSTRUCTED, + ASN1_PRINTABLESTRING = 19, + ASN1_TELETEXSTRING = 20, + ASN1_IA5STRING = 22, + ASN1_UTC = 23, + ASN1_UNIVERSALSTRING = 28, + ASN1_BMPSTRING = 30, + }; + + enum asn1_iterator_result { + ASN1_ITERATOR_ERROR, + ASN1_ITERATOR_PRIMITIVE, + ASN1_ITERATOR_CONSTRUCTED, + ASN1_ITERATOR_END, + }; + +/* Parsing DER objects. */ + struct asn1_der_iterator { + unsigned buffer_length; + const uint8_t *buffer; + + /* Next object to parse. */ + unsigned pos; + + enum asn1_type type; + + /* Pointer to the current object */ + unsigned length; + const uint8_t *data; + }; + +/* Initializes the iterator. */ + enum asn1_iterator_result + asn1_der_iterator_first(struct asn1_der_iterator *iterator, + unsigned length, const uint8_t * input); + + enum asn1_iterator_result + asn1_der_iterator_next(struct asn1_der_iterator *iterator); + +/* Starts parsing of a constructed object. */ + enum asn1_iterator_result + asn1_der_decode_constructed(struct asn1_der_iterator *i, + struct asn1_der_iterator *contents); + +/* For the common case that we have a sequence at the end of the + object. Checks that the current object is the final one, and then + reinitializes the iterator to parse its ontents. */ + enum asn1_iterator_result + asn1_der_decode_constructed_last(struct asn1_der_iterator *i); + + enum asn1_iterator_result + asn1_der_decode_bitstring(struct asn1_der_iterator *i, + struct asn1_der_iterator *contents); + + enum asn1_iterator_result + asn1_der_decode_bitstring_last(struct asn1_der_iterator *i); + +/* All these functions return 1 on success, 0 on failure */ + int + asn1_der_get_uint32(struct asn1_der_iterator *i, uint32_t * x); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ASN1_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/base16.h b/include/reactos/libs/gnutls/nettle/base16.h new file mode 100644 index 00000000000..73a77799756 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/base16.h @@ -0,0 +1,100 @@ +/* base16.h + * + * Hex encoding and decoding, following spki conventions (i.e. + * allowing whitespace between digits). + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_BASE16_H_INCLUDED +#define NETTLE_BASE16_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define base16_encode_single nettle_base16_encode_single +#define base16_encode_update nettle_base16_encode_update +#define base16_decode_init nettle_base16_decode_init +#define base16_decode_single nettle_base16_decode_single +#define base16_decode_update nettle_base16_decode_update +#define base16_decode_final nettle_base16_decode_final + +/* Base16 encoding */ + +/* Maximum length of output for base16_encode_update. */ +#define BASE16_ENCODE_LENGTH(length) ((length) * 2) + +/* Encodes a single byte. Always stores two digits in dst[0] and dst[1]. */ + void + base16_encode_single(uint8_t * dst, uint8_t src); + +/* Always stores BASE16_ENCODE_LENGTH(length) digits in dst. */ + void + base16_encode_update(uint8_t * dst, + unsigned length, const uint8_t * src); + + +/* Base16 decoding */ + +/* Maximum length of output for base16_decode_update. */ +/* We have at most 4 buffered bits, and a total of (length + 1) * 4 bits. */ +#define BASE16_DECODE_LENGTH(length) (((length) + 1) / 2) + + struct base16_decode_ctx { + unsigned word; /* Leftover bits */ + unsigned bits; /* Number buffered bits */ + }; + + void + base16_decode_init(struct base16_decode_ctx *ctx); + +/* Decodes a single byte. Returns amount of output (0 or 1), or -1 on + * errors. */ + int + base16_decode_single(struct base16_decode_ctx *ctx, + uint8_t * dst, uint8_t src); + +/* Returns 1 on success, 0 on error. DST should point to an area of + * size at least BASE16_DECODE_LENGTH(length), and for sanity + * checking, *DST_LENGTH should be initialized to the size of that + * area before the call. *DST_LENGTH is updated to the amount of + * decoded output. */ + +/* Currently results in an assertion failure if *DST_LENGTH is + * too small. FIXME: Return some error instead? */ + int + base16_decode_update(struct base16_decode_ctx *ctx, + unsigned *dst_length, + uint8_t * dst, + unsigned src_length, const uint8_t * src); + +/* Returns 1 on success. */ + int + base16_decode_final(struct base16_decode_ctx *ctx); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_BASE16_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/base64.h b/include/reactos/libs/gnutls/nettle/base64.h new file mode 100644 index 00000000000..cee51c7e1a4 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/base64.h @@ -0,0 +1,146 @@ +/* base64.h + * + * "ASCII armor" codecs. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller, Dan Egnor + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_BASE64_H_INCLUDED +#define NETTLE_BASE64_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define base64_encode_init nettle_base64_encode_init +#define base64_encode_single nettle_base64_encode_single +#define base64_encode_update nettle_base64_encode_update +#define base64_encode_final nettle_base64_encode_final +#define base64_encode_raw nettle_base64_encode_raw +#define base64_encode_group nettle_base64_encode_group +#define base64_decode_init nettle_base64_decode_init +#define base64_decode_single nettle_base64_decode_single +#define base64_decode_update nettle_base64_decode_update +#define base64_decode_final nettle_base64_decode_final + +#define BASE64_BINARY_BLOCK_SIZE 3 +#define BASE64_TEXT_BLOCK_SIZE 4 + +/* Base64 encoding */ + +/* Maximum length of output for base64_encode_update. NOTE: Doesn't + * include any padding that base64_encode_final may add. */ +/* We have at most 4 buffered bits, and a total of (4 + length * 8) bits. */ +#define BASE64_ENCODE_LENGTH(length) (((length) * 8 + 4)/6) + +/* Maximum length of output generated by base64_encode_final. */ +#define BASE64_ENCODE_FINAL_LENGTH 3 + +/* Exact length of output generated by base64_encode_raw, including + * padding. */ +#define BASE64_ENCODE_RAW_LENGTH(length) ((((length) + 2)/3)*4) + + struct base64_encode_ctx { + unsigned word; /* Leftover bits */ + unsigned bits; /* Number of bits, always 0, 2, or 4. */ + }; + + void + base64_encode_init(struct base64_encode_ctx *ctx); + +/* Encodes a single byte. Returns amount of output (always 1 or 2). */ + unsigned + base64_encode_single(struct base64_encode_ctx *ctx, + uint8_t * dst, uint8_t src); + +/* Returns the number of output characters. DST should point to an + * area of size at least BASE64_ENCODE_LENGTH(length). */ + unsigned + base64_encode_update(struct base64_encode_ctx *ctx, + uint8_t * dst, + unsigned length, const uint8_t * src); + +/* DST should point to an area of size at least + * BASE64_ENCODE_FINAL_LENGTH */ + unsigned + base64_encode_final(struct base64_encode_ctx *ctx, uint8_t * dst); + +/* Lower level functions */ + +/* Encodes a string in one go, including any padding at the end. + * Generates exactly BASE64_ENCODE_RAW_LENGTH(length) bytes of output. + * Supports overlapped operation, if src <= dst. */ + void + base64_encode_raw(uint8_t * dst, unsigned length, + const uint8_t * src); + + void + base64_encode_group(uint8_t * dst, uint32_t group); + + +/* Base64 decoding */ + +/* Maximum length of output for base64_decode_update. */ +/* We have at most 6 buffered bits, and a total of (length + 1) * 6 bits. */ +#define BASE64_DECODE_LENGTH(length) ((((length) + 1) * 6) / 8) + + struct base64_decode_ctx { + unsigned word; /* Leftover bits */ + unsigned bits; /* Number buffered bits */ + + /* Number of padding characters encountered */ + unsigned padding; + }; + + void + base64_decode_init(struct base64_decode_ctx *ctx); + +/* Decodes a single byte. Returns amount of output (0 or 1), or -1 on + * errors. */ + int + base64_decode_single(struct base64_decode_ctx *ctx, + uint8_t * dst, uint8_t src); + +/* Returns 1 on success, 0 on error. DST should point to an area of + * size at least BASE64_DECODE_LENGTH(length), and for sanity + * checking, *DST_LENGTH should be initialized to the size of that + * area before the call. *DST_LENGTH is updated to the amount of + * decoded output. */ + +/* Currently results in an assertion failure if *DST_LENGTH is + * too small. FIXME: Return some error instead? */ + int + base64_decode_update(struct base64_decode_ctx *ctx, + unsigned *dst_length, + uint8_t * dst, + unsigned src_length, const uint8_t * src); + +/* Returns 1 on success. */ + int + base64_decode_final(struct base64_decode_ctx *ctx); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_BASE64_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/bignum.h b/include/reactos/libs/gnutls/nettle/bignum.h new file mode 100644 index 00000000000..1d2082dac30 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/bignum.h @@ -0,0 +1,124 @@ +/* bignum.h + * + * bignum operations that are missing from gmp. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_BIGNUM_H_INCLUDED +#define NETTLE_BIGNUM_H_INCLUDED + +#include "nettle-meta.h" + +#include +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Size needed for signed encoding, including extra sign byte if + * necessary. */ + unsigned + nettle_mpz_sizeinbase_256_s(const mpz_t x); + +/* Size needed for unsigned encoding */ + unsigned + nettle_mpz_sizeinbase_256_u(const mpz_t x); + +/* Writes an integer as length octets, using big endian byte order, + * and two's complement for negative numbers. */ + void + nettle_mpz_get_str_256(unsigned length, uint8_t * s, + const mpz_t x); + +/* Reads a big endian, two's complement, integer. */ + void + nettle_mpz_set_str_256_s(mpz_t x, + unsigned length, const uint8_t * s); + + void + nettle_mpz_init_set_str_256_s(mpz_t x, + unsigned length, const uint8_t * s); + +/* Similar, but for unsigned format. These function don't interpret + * the most significant bit as the sign. */ + void + nettle_mpz_set_str_256_u(mpz_t x, + unsigned length, const uint8_t * s); + + void + nettle_mpz_init_set_str_256_u(mpz_t x, + unsigned length, const uint8_t * s); + +/* Returns a uniformly distributed random number 0 <= x < 2^n */ + void + nettle_mpz_random_size(mpz_t x, + void *ctx, nettle_random_func * random, + unsigned bits); + +/* Returns a number x, almost uniformly random in the range + * 0 <= x < n. */ + void + nettle_mpz_random(mpz_t x, + void *ctx, nettle_random_func * random, + const mpz_t n); + + void + nettle_next_prime(mpz_t p, mpz_t n, unsigned count, + unsigned prime_limit, void *progress_ctx, + nettle_progress_func * progress); + + void + nettle_random_prime(mpz_t p, unsigned bits, int top_bits_set, + void *ctx, nettle_random_func * random, + void *progress_ctx, + nettle_progress_func * progress); + + void + _nettle_generate_pocklington_prime(mpz_t p, mpz_t r, + unsigned bits, + int top_bits_set, void *ctx, + nettle_random_func * random, + const mpz_t p0, const mpz_t q, + const mpz_t p0q); + +/* sexp parsing */ + struct sexp_iterator; + +/* If LIMIT is non-zero, the number must be at most LIMIT bits. + * Implies sexp_iterator_next. */ + int + nettle_mpz_set_sexp(mpz_t x, unsigned limit, + struct sexp_iterator *i); + + +/* der parsing */ + struct asn1_der_iterator; + + int + nettle_asn1_der_get_bignum(struct asn1_der_iterator *iterator, + mpz_t x, unsigned max_bits); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_BIGNUM_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/blowfish.h b/include/reactos/libs/gnutls/nettle/blowfish.h new file mode 100644 index 00000000000..e80a59c3a9a --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/blowfish.h @@ -0,0 +1,74 @@ +/* blowfish.h + * + * Blowfish block cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 1998, 2001 FSF, Ray Dassen, Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_BLOWFISH_H_INCLUDED +#define NETTLE_BLOWFISH_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define blowfish_set_key nettle_blowfish_set_key +#define blowfish_encrypt nettle_blowfish_encrypt +#define blowfish_decrypt nettle_blowfish_decrypt + +#define BLOWFISH_BLOCK_SIZE 8 + +/* Variable key size between 64 and 448 bits. */ +#define BLOWFISH_MIN_KEY_SIZE 8 +#define BLOWFISH_MAX_KEY_SIZE 56 + +/* Default to 128 bits */ +#define BLOWFISH_KEY_SIZE 16 + +#define _BLOWFISH_ROUNDS 16 + + struct blowfish_ctx { + uint32_t s[4][256]; + uint32_t p[_BLOWFISH_ROUNDS + 2]; + }; + +/* On success, returns 1 and sets ctx->status to BLOWFISH_OK (zero). + * On error, returns 0 and sets ctx->status to BLOWFISH_WEAK_KEY. */ + int + blowfish_set_key(struct blowfish_ctx *ctx, + unsigned length, const uint8_t * key); + + void + blowfish_encrypt(const struct blowfish_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + void + blowfish_decrypt(const struct blowfish_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_BLOWFISH_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/buffer.h b/include/reactos/libs/gnutls/nettle/buffer.h new file mode 100644 index 00000000000..73a0684d2c3 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/buffer.h @@ -0,0 +1,94 @@ +/* buffer.h + * + * A bare-bones string stream. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_BUFFER_H_INCLUDED +#define NETTLE_BUFFER_H_INCLUDED + +#include "realloc.h" + +#ifdef __cplusplus +extern "C" { +#endif + + struct nettle_buffer { + uint8_t *contents; + /* Allocated size */ + unsigned alloc; + + void *realloc_ctx; + nettle_realloc_func *realloc; + + /* Current size */ + unsigned size; + }; + +/* Initializes a buffer that uses plain realloc */ + void + nettle_buffer_init(struct nettle_buffer *buffer); + + void + nettle_buffer_init_realloc(struct nettle_buffer *buffer, + void *realloc_ctx, + nettle_realloc_func * realloc); + +/* Initializes a buffer of fix size */ + void + nettle_buffer_init_size(struct nettle_buffer *buffer, + unsigned length, uint8_t * space); + + void + nettle_buffer_clear(struct nettle_buffer *buffer); + +/* Resets the buffer, without freeing the buffer space. */ + void + nettle_buffer_reset(struct nettle_buffer *buffer); + + int + nettle_buffer_grow(struct nettle_buffer *buffer, unsigned length); + +#define NETTLE_BUFFER_PUTC(buffer, c) \ +( (((buffer)->size < (buffer)->alloc) || nettle_buffer_grow((buffer), 1)) \ + && ((buffer)->contents[(buffer)->size++] = (c), 1) ) + + int + nettle_buffer_write(struct nettle_buffer *buffer, + unsigned length, const uint8_t * data); + +/* Like nettle_buffer_write, but instead of copying data to the + * buffer, it returns a pointer to the area where the caller can copy + * the data. The pointer is valid only until the next call that can + * reallocate the buffer. */ + uint8_t *nettle_buffer_space(struct nettle_buffer *buffer, + unsigned length); + +/* Copy the contents of SRC to the end of DST. */ + int + nettle_buffer_copy(struct nettle_buffer *dst, + const struct nettle_buffer *src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_BUFFER_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/camellia.h b/include/reactos/libs/gnutls/nettle/camellia.h new file mode 100644 index 00000000000..03446de588f --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/camellia.h @@ -0,0 +1,80 @@ +/* camellia.h + * + * Copyright (C) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation). + * + * Copyright (C) 2010 Niels Möller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef NETTLE_CAMELLIA_H_INCLUDED +#define NETTLE_CAMELLIA_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define camellia_set_encrypt_key nettle_camellia_set_encrypt_key +#define camellia_set_decrypt_key nettle_camellia_set_decrypt_key +#define camellia_invert_key nettle_camellia_invert_key +#define camellia_crypt nettle_camellia_crypt +#define camellia_crypt nettle_camellia_crypt + +#define CAMELLIA_BLOCK_SIZE 16 +/* Valid key sizes are 128, 192 or 256 bits (16, 24 or 32 bytes) */ +#define CAMELLIA_MIN_KEY_SIZE 16 +#define CAMELLIA_MAX_KEY_SIZE 32 +#define CAMELLIA_KEY_SIZE 32 + + struct camellia_ctx { + /* Number of subkeys. */ + unsigned nkeys; + + /* For 128-bit keys, there are 18 regular rounds, pre- and + post-whitening, and two FL and FLINV rounds, using a total of 26 + subkeys, each of 64 bit. For 192- and 256-bit keys, there are 6 + additional regular rounds and one additional FL and FLINV, using + a total of 34 subkeys. */ + /* The clever combination of subkeys imply one of the pre- and + post-whitening keys is folded with the round keys, so that subkey + #1 and the last one (#25 or #33) is not used. The result is that + we have only 24 or 32 subkeys at the end of key setup. */ + uint64_t keys[32]; + }; + + void + camellia_set_encrypt_key(struct camellia_ctx *ctx, + unsigned length, const uint8_t * key); + + void + camellia_set_decrypt_key(struct camellia_ctx *ctx, + unsigned length, const uint8_t * key); + + void + camellia_invert_key(struct camellia_ctx *dst, + const struct camellia_ctx *src); + + void + camellia_crypt(const struct camellia_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_CAMELLIA_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/cast128.h b/include/reactos/libs/gnutls/nettle/cast128.h new file mode 100644 index 00000000000..fbefda49259 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/cast128.h @@ -0,0 +1,75 @@ +/* cast128.h + * + * The CAST-128 block cipher. + */ + +/* CAST-128 in C + * Written by Steve Reid + * 100% Public Domain - no warranty + * Released 1997.10.11 + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_CAST128_H_INCLUDED +#define NETTLE_CAST128_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define cast128_set_key nettle_cast128_set_key +#define cast128_encrypt nettle_cast128_encrypt +#define cast128_decrypt nettle_cast128_decrypt + +#define CAST128_BLOCK_SIZE 8 + +/* Variable key size between 40 and 128. */ +#define CAST128_MIN_KEY_SIZE 5 +#define CAST128_MAX_KEY_SIZE 16 + +#define CAST128_KEY_SIZE 16 + + struct cast128_ctx { + uint32_t keys[32]; /* Key, after expansion */ + unsigned rounds; /* Number of rounds to use, 12 or 16 */ + }; + + void + cast128_set_key(struct cast128_ctx *ctx, + unsigned length, const uint8_t * key); + + void + cast128_encrypt(const struct cast128_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + void + cast128_decrypt(const struct cast128_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_CAST128_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/cbc.h b/include/reactos/libs/gnutls/nettle/cbc.h new file mode 100644 index 00000000000..2a2b55eb0aa --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/cbc.h @@ -0,0 +1,73 @@ +/* cbc.h + * + * Cipher block chaining mode. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_CBC_H_INCLUDED +#define NETTLE_CBC_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define cbc_encrypt nettle_cbc_encrypt +#define cbc_decrypt nettle_cbc_decrypt + + void + cbc_encrypt(void *ctx, nettle_crypt_func * f, + unsigned block_size, uint8_t * iv, + unsigned length, uint8_t * dst, const uint8_t * src); + + void + cbc_decrypt(void *ctx, nettle_crypt_func * f, + unsigned block_size, uint8_t * iv, + unsigned length, uint8_t * dst, const uint8_t * src); + +#define CBC_CTX(type, size) \ +{ type ctx; uint8_t iv[size]; } + +#define CBC_SET_IV(ctx, data) \ +memcpy((ctx)->iv, (data), sizeof((ctx)->iv)) + +/* NOTE: Avoid using NULL, as we don't include anything defining it. */ +#define CBC_ENCRYPT(self, f, length, dst, src) \ +(0 ? ((f)(&(self)->ctx, 0, (void *)0, (void *)0)) \ + : cbc_encrypt((void *) &(self)->ctx, \ + (nettle_crypt_func *) (f), \ + sizeof((self)->iv), (self)->iv, \ + (length), (dst), (src))) + +#define CBC_DECRYPT(self, f, length, dst, src) \ +(0 ? ((f)(&(self)->ctx, 0, (void *)0, (void *)0)) \ + : cbc_decrypt((void *) &(self)->ctx, \ + (nettle_crypt_func *) (f), \ + sizeof((self)->iv), (self)->iv, \ + (length), (dst), (src))) + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_CBC_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/ctr.h b/include/reactos/libs/gnutls/nettle/ctr.h new file mode 100644 index 00000000000..63d72e59f0b --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/ctr.h @@ -0,0 +1,60 @@ +/* ctr.h + * + * Counter mode, using an network byte order incremented counter, + * matching the testcases of NIST 800-38A. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2005 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_CTR_H_INCLUDED +#define NETTLE_CTR_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define ctr_crypt nettle_ctr_crypt + + void + ctr_crypt(void *ctx, nettle_crypt_func * f, + unsigned block_size, uint8_t * ctr, + unsigned length, uint8_t * dst, const uint8_t * src); + +#define CTR_CTX(type, size) \ +{ type ctx; uint8_t ctr[size]; } + +#define CTR_SET_COUNTER(ctx, data) \ +memcpy((ctx)->ctr, (data), sizeof((ctx)->ctr)) + +#define CTR_CRYPT(self, f, length, dst, src) \ +(0 ? ((f)(&(self)->ctx, 0, NULL, NULL)) \ + : ctr_crypt((void *) &(self)->ctx, \ + (nettle_crypt_func *) (f), \ + sizeof((self)->ctr), (self)->ctr, \ + (length), (dst), (src))) + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_CTR_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/des-compat.h b/include/reactos/libs/gnutls/nettle/des-compat.h new file mode 100644 index 00000000000..08053f69b23 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/des-compat.h @@ -0,0 +1,151 @@ +/* des-compat.h + * + * The des block cipher, libdes/openssl-style interface. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_DES_COMPAT_H_INCLUDED +#define NETTLE_DES_COMPAT_H_INCLUDED + +/* According to Assar, des_set_key, des_set_key_odd_parity, + * des_is_weak_key, plus the encryption functions (des_*_encrypt and + * des_cbc_cksum) would be a pretty useful subset. */ + +/* NOTE: This is quite experimental, and not all functions are + * implemented. Contributions, in particular test cases are welcome. */ + +#include "des.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use some name mangling, to avoid collisions with either other + * nettle functions or with libcrypto. */ + +#define des_ecb3_encrypt nettle_openssl_des_ecb3_encrypt +#define des_cbc_cksum nettle_openssl_des_cbc_cksum +#define des_ncbc_encrypt nettle_openssl_des_ncbc_encrypt +#define des_cbc_encrypt nettle_openssl_des_cbc_encrypt +#define des_ecb_encrypt nettle_openssl_des_ecb_encrypt +#define des_ede3_cbc_encrypt nettle_openssl_des_ede3_cbc_encrypt +#define des_set_odd_parity nettle_openssl_des_set_odd_parity +#define des_check_key nettle_openssl_des_check_key +#define des_key_sched nettle_openssl_des_key_sched +#define des_is_weak_key nettle_openssl_des_is_weak_key + +/* An extra alias */ +#undef des_set_key +#define des_set_key nettle_openssl_des_key_sched + + enum { DES_DECRYPT = 0, DES_ENCRYPT = 1 }; + +/* Types */ + typedef uint32_t DES_LONG; + +/* Note: Typedef:ed arrays should be avoided, but they're used here + * for compatibility. */ + typedef struct des_ctx des_key_schedule[1]; + + typedef uint8_t des_cblock[DES_BLOCK_SIZE]; +/* Note: The proper definition, + + typedef const uint8_t const_des_cblock[DES_BLOCK_SIZE]; + + would have worked, *if* all the prototypes had used arguments like + foo(const_des_cblock src, des_cblock dst), letting argument arrays + "decay" into pointers of type uint8_t * and const uint8_t *. + + But since openssl's prototypes use *pointers* const_des_cblock *src, + des_cblock *dst, this ends up in type conflicts, and the workaround + is to not use const at all. +*/ +#define const_des_cblock des_cblock + +/* Aliases */ +#define des_ecb2_encrypt(i,o,k1,k2,e) \ + des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) + +#define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ + des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) + +/* Global flag */ + extern int des_check_key; + +/* Prototypes */ + +/* Typing is a little confusing. Since both des_cblock and + des_key_schedule are typedef:ed arrays, it automatically decay to + a pointers. + + But the functions are declared taking pointers to des_cblock, i.e. + pointers to arrays. And on the other hand, they take plain + des_key_schedule arguments, which is equivalent to pointers to + struct des_ctx. */ + void + des_ecb3_encrypt(const_des_cblock * src, des_cblock * dst, + des_key_schedule k1, + des_key_schedule k2, + des_key_schedule k3, int enc); + +/* des_cbc_cksum in libdes returns a 32 bit integer, representing the + * latter half of the output block, using little endian byte order. */ + uint32_t + des_cbc_cksum(const uint8_t * src, des_cblock * dst, + long length, des_key_schedule ctx, + const_des_cblock * iv); + +/* NOTE: Doesn't update iv. */ + void + des_cbc_encrypt(const_des_cblock * src, des_cblock * dst, + long length, des_key_schedule ctx, + const_des_cblock * iv, int enc); + +/* Similar, but updates iv. */ + void + des_ncbc_encrypt(const_des_cblock * src, des_cblock * dst, + long length, des_key_schedule ctx, + des_cblock * iv, int enc); + + void + des_ecb_encrypt(const_des_cblock * src, des_cblock * dst, + des_key_schedule ctx, int enc); + + void + des_ede3_cbc_encrypt(const_des_cblock * src, des_cblock * dst, + long length, des_key_schedule k1, + des_key_schedule k2, des_key_schedule k3, + des_cblock * iv, int enc); + + int + des_set_odd_parity(des_cblock * key); + + int + des_key_sched(const_des_cblock * key, des_key_schedule ctx); + + int + des_is_weak_key(const_des_cblock * key); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_DES_COMPAT_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/des.h b/include/reactos/libs/gnutls/nettle/des.h new file mode 100644 index 00000000000..9f01287e6a7 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/des.h @@ -0,0 +1,104 @@ +/* des.h + * + * The des block cipher. And triple des. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 1992, 2001, Dana L. How, Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* + * des - fast & portable DES encryption & decryption. + * Copyright (C) 1992 Dana L. How + * Please see the file `../lib/descore.README' for the complete copyright + * notice. + * + * Slightly edited by Niels Möller, 1997 + */ + +#ifndef NETTLE_DES_H_INCLUDED +#define NETTLE_DES_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Namespace mangling */ +#define des_set_key nettle_des_set_key +#define des_encrypt nettle_des_encrypt +#define des_decrypt nettle_des_decrypt +#define des_check_parity nettle_des_check_parity +#define des_fix_parity nettle_des_fix_parity +#define des3_set_key nettle_des3_set_key +#define des3_encrypt nettle_des3_encrypt +#define des3_decrypt nettle_des3_decrypt + +#define DES_KEY_SIZE 8 +#define DES_BLOCK_SIZE 8 + +/* Expanded key length */ +#define _DES_KEY_LENGTH 32 + + struct des_ctx { + uint32_t key[_DES_KEY_LENGTH]; + }; + +/* Returns 1 for good keys and 0 for weak keys. */ + int + des_set_key(struct des_ctx *ctx, const uint8_t * key); + + void + des_encrypt(const struct des_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + void + des_decrypt(const struct des_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + + int + des_check_parity(unsigned length, const uint8_t * key); + + void + des_fix_parity(unsigned length, uint8_t * dst, + const uint8_t * src); + +#define DES3_KEY_SIZE 24 +#define DES3_BLOCK_SIZE DES_BLOCK_SIZE + + struct des3_ctx { + struct des_ctx des[3]; + }; + + +/* Returns 1 for good keys and 0 for weak keys. */ + int + des3_set_key(struct des3_ctx *ctx, const uint8_t * key); + + void + des3_encrypt(const struct des3_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + void + des3_decrypt(const struct des3_ctx *ctx, + unsigned length, uint8_t * dst, const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_DES_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/dsa.h b/include/reactos/libs/gnutls/nettle/dsa.h new file mode 100644 index 00000000000..2f2305f5ea8 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/dsa.h @@ -0,0 +1,294 @@ +/* dsa.h + * + * The DSA publickey algorithm. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_DSA_H_INCLUDED +#define NETTLE_DSA_H_INCLUDED + +#include + +#include "nettle-types.h" + +#include "sha1.h" +#include "sha2.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define dsa_public_key_init nettle_dsa_public_key_init +#define dsa_public_key_clear nettle_dsa_public_key_clear +#define dsa_private_key_init nettle_dsa_private_key_init +#define dsa_private_key_clear nettle_dsa_private_key_clear +#define dsa_signature_init nettle_dsa_signature_init +#define dsa_signature_clear nettle_dsa_signature_clear +#define dsa_sha1_sign nettle_dsa_sha1_sign +#define dsa_sha1_verify nettle_dsa_sha1_verify +#define dsa_sha256_sign nettle_dsa_sha256_sign +#define dsa_sha256_verify nettle_dsa_sha256_verify +#define dsa_sha1_sign_digest nettle_dsa_sha1_sign_digest +#define dsa_sha1_verify_digest nettle_dsa_sha1_verify_digest +#define dsa_sha256_sign_digest nettle_dsa_sha256_sign_digest +#define dsa_sha256_verify_digest nettle_dsa_sha256_verify_digest +#define dsa_generate_keypair nettle_dsa_generate_keypair +#define dsa_signature_from_sexp nettle_dsa_signature_from_sexp +#define dsa_keypair_to_sexp nettle_dsa_keypair_to_sexp +#define dsa_keypair_from_sexp_alist nettle_dsa_keypair_from_sexp_alist +#define dsa_sha1_keypair_from_sexp nettle_dsa_sha1_keypair_from_sexp +#define dsa_sha256_keypair_from_sexp nettle_dsa_sha256_keypair_from_sexp +#define dsa_params_from_der_iterator nettle_dsa_params_from_der_iterator +#define dsa_public_key_from_der_iterator nettle_dsa_public_key_from_der_iterator +#define dsa_openssl_private_key_from_der_iterator nettle_dsa_openssl_private_key_from_der_iterator +#define dsa_openssl_private_key_from_der nettle_openssl_provate_key_from_der +#define _dsa_sign _nettle_dsa_sign +#define _dsa_verify _nettle_dsa_verify + +#define DSA_SHA1_MIN_P_BITS 512 +#define DSA_SHA1_Q_OCTETS 20 +#define DSA_SHA1_Q_BITS 160 + +#define DSA_SHA256_MIN_P_BITS 1024 +#define DSA_SHA256_Q_OCTETS 32 +#define DSA_SHA256_Q_BITS 256 + + struct dsa_public_key { + /* Modulo */ + mpz_t p; + + /* Group order */ + mpz_t q; + + /* Generator */ + mpz_t g; + + /* Public value */ + mpz_t y; + }; + + struct dsa_private_key { + /* Unlike an rsa public key, private key operations will need both + * the private and the public information. */ + mpz_t x; + }; + + struct dsa_signature { + mpz_t r; + mpz_t s; + }; + +/* Signing a message works as follows: + * + * Store the private key in a dsa_private_key struct. + * + * Initialize a hashing context, by callling + * sha1_init + * + * Hash the message by calling + * sha1_update + * + * Create the signature by calling + * dsa_sha1_sign + * + * The signature is represented as a struct dsa_signature. This call also + * resets the hashing context. + * + * When done with the key and signature, don't forget to call + * dsa_signature_clear. + */ + +/* Calls mpz_init to initialize bignum storage. */ + void + dsa_public_key_init(struct dsa_public_key *key); + +/* Calls mpz_clear to deallocate bignum storage. */ + void + dsa_public_key_clear(struct dsa_public_key *key); + + +/* Calls mpz_init to initialize bignum storage. */ + void + dsa_private_key_init(struct dsa_private_key *key); + +/* Calls mpz_clear to deallocate bignum storage. */ + void + dsa_private_key_clear(struct dsa_private_key *key); + +/* Calls mpz_init to initialize bignum storage. */ + void + dsa_signature_init(struct dsa_signature *signature); + +/* Calls mpz_clear to deallocate bignum storage. */ + void + dsa_signature_clear(struct dsa_signature *signature); + + + int + dsa_sha1_sign(const struct dsa_public_key *pub, + const struct dsa_private_key *key, + void *random_ctx, nettle_random_func * random, + struct sha1_ctx *hash, + struct dsa_signature *signature); + + int + dsa_sha256_sign(const struct dsa_public_key *pub, + const struct dsa_private_key *key, + void *random_ctx, nettle_random_func * random, + struct sha256_ctx *hash, + struct dsa_signature *signature); + + int + dsa_sha1_verify(const struct dsa_public_key *key, + struct sha1_ctx *hash, + const struct dsa_signature *signature); + + int + dsa_sha256_verify(const struct dsa_public_key *key, + struct sha256_ctx *hash, + const struct dsa_signature *signature); + + int + dsa_sha1_sign_digest(const struct dsa_public_key *pub, + const struct dsa_private_key *key, + void *random_ctx, + nettle_random_func * random, + const uint8_t * digest, + struct dsa_signature *signature); + int + dsa_sha256_sign_digest(const struct dsa_public_key *pub, + const struct dsa_private_key *key, + void *random_ctx, + nettle_random_func * random, + const uint8_t * digest, + struct dsa_signature *signature); + + int + dsa_sha1_verify_digest(const struct dsa_public_key *key, + const uint8_t * digest, + const struct dsa_signature *signature); + + int + dsa_sha256_verify_digest(const struct dsa_public_key *key, + const uint8_t * digest, + const struct dsa_signature *signature); + +/* Key generation */ + + int + dsa_generate_keypair(struct dsa_public_key *pub, + struct dsa_private_key *key, + void *random_ctx, + nettle_random_func * random, + void *progress_ctx, + nettle_progress_func * progress, + unsigned p_bits, unsigned q_bits); + +/* Keys in sexp form. */ + + struct nettle_buffer; + +/* Generates a public-key expression if PRIV is NULL .*/ + int + dsa_keypair_to_sexp(struct nettle_buffer *buffer, const char *algorithm_name, /* NULL means "dsa" */ + const struct dsa_public_key *pub, + const struct dsa_private_key *priv); + + struct sexp_iterator; + + int + dsa_signature_from_sexp(struct dsa_signature *rs, + struct sexp_iterator *i, unsigned q_bits); + + int + dsa_keypair_from_sexp_alist(struct dsa_public_key *pub, + struct dsa_private_key *priv, + unsigned p_max_bits, + unsigned q_bits, + struct sexp_iterator *i); + +/* If PRIV is NULL, expect a public-key expression. If PUB is NULL, + * expect a private key expression and ignore the parts not needed for + * the public key. */ +/* Keys must be initialized before calling this function, as usual. */ + int + dsa_sha1_keypair_from_sexp(struct dsa_public_key *pub, + struct dsa_private_key *priv, + unsigned p_max_bits, + unsigned length, const uint8_t * expr); + + int + dsa_sha256_keypair_from_sexp(struct dsa_public_key *pub, + struct dsa_private_key *priv, + unsigned p_max_bits, + unsigned length, + const uint8_t * expr); + +/* Keys in X.509 andd OpenSSL format. */ + struct asn1_der_iterator; + + int + dsa_params_from_der_iterator(struct dsa_public_key *pub, + unsigned p_max_bits, + struct asn1_der_iterator *i); + int + dsa_public_key_from_der_iterator(struct dsa_public_key *pub, + unsigned p_max_bits, + struct asn1_der_iterator *i); + + int + dsa_openssl_private_key_from_der_iterator(struct dsa_public_key + *pub, + struct dsa_private_key + *priv, + unsigned p_max_bits, + struct asn1_der_iterator + *i); + + int + dsa_openssl_private_key_from_der(struct dsa_public_key *pub, + struct dsa_private_key *priv, + unsigned p_max_bits, + unsigned length, + const uint8_t * data); + + +/* Internal functions. */ + int + _dsa_sign(const struct dsa_public_key *pub, + const struct dsa_private_key *key, + void *random_ctx, nettle_random_func * random, + unsigned digest_size, + const uint8_t * digest, + struct dsa_signature *signature); + + int + _dsa_verify(const struct dsa_public_key *key, + unsigned digest_size, + const uint8_t * digest, + const struct dsa_signature *signature); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_DSA_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/ecc-curve.h b/include/reactos/libs/gnutls/nettle/ecc-curve.h new file mode 100644 index 00000000000..a810f801eca --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/ecc-curve.h @@ -0,0 +1,44 @@ +/* ecc-curve.h */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2013 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Development of Nettle's ECC support was funded by the .SE Internet Fund. */ + +#ifndef NETTLE_ECC_CURVE_H_INCLUDED +#define NETTLE_ECC_CURVE_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +/* The contets of this struct is internal. */ + struct ecc_curve; + + extern const struct ecc_curve nettle_secp_192r1; + extern const struct ecc_curve nettle_secp_224r1; + extern const struct ecc_curve nettle_secp_256r1; + extern const struct ecc_curve nettle_secp_384r1; + extern const struct ecc_curve nettle_secp_521r1; + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ECC_CURVE_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/ecc.h b/include/reactos/libs/gnutls/nettle/ecc.h new file mode 100644 index 00000000000..38cea2a3fba --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/ecc.h @@ -0,0 +1,247 @@ +/* ecc.h */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2013 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Development of Nettle's ECC support was funded by the .SE Internet Fund. */ + +#ifndef NETTLE_ECC_H_INCLUDED +#define NETTLE_ECC_H_INCLUDED + +#include + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define ecc_point_init nettle_ecc_point_init +#define ecc_point_clear nettle_ecc_point_clear +#define ecc_point_set nettle_ecc_point_set +#define ecc_point_get nettle_ecc_point_get +#define ecc_point_mul nettle_ecc_point_mul +#define ecc_point_mul_g nettle_ecc_point_mul_g +#define ecc_scalar_init nettle_ecc_scalar_init +#define ecc_scalar_clear nettle_ecc_scalar_clear +#define ecc_scalar_set nettle_ecc_scalar_set +#define ecc_scalar_get nettle_ecc_scalar_get +#define ecc_scalar_random nettle_ecc_scalar_random +#define ecc_point_mul nettle_ecc_point_mul +#define ecc_size nettle_ecc_size +#define ecc_size_a nettle_ecc_size_a +#define ecc_size_j nettle_ecc_size_j +#define ecc_a_to_a_itch nettle_ecc_a_to_a_itch +#define ecc_a_to_a nettle_ecc_a_to_a +#define ecc_a_to_j nettle_ecc_a_to_j +#define ecc_j_to_a_itch nettle_ecc_j_to_a_itch +#define ecc_j_to_a nettle_ecc_j_to_a +#define ecc_dup_ja_itch nettle_ecc_dup_ja_itch +#define ecc_dup_ja nettle_ecc_dup_ja +#define ecc_dup_jj_itch nettle_ecc_dup_jj_itch +#define ecc_dup_jj nettle_ecc_dup_jj +#define ecc_add_jja_itch nettle_ecc_add_jja_itch +#define ecc_add_jja nettle_ecc_add_jja +#define ecc_add_jjj_itch nettle_ecc_add_jjj_itch +#define ecc_add_jjj nettle_ecc_add_jjj +#define ecc_mul_g_itch nettle_ecc_mul_g_itch +#define ecc_mul_g nettle_ecc_mul_g +#define ecc_mul_a_itch nettle_ecc_mul_a_itch +#define ecc_mul_a nettle_ecc_mul_a + + struct ecc_curve; + +/* High level interface, for ECDSA, DH, etc */ + +/* Represents a point on the ECC curve */ + struct ecc_point { + const struct ecc_curve *ecc; + /* Allocated using the same allocation function as GMP. */ + mp_limb_t *p; + }; + +/* Represents a non-zero scalar, an element of Z_q^*, where q is the + group order of the curve. */ + struct ecc_scalar { + const struct ecc_curve *ecc; + /* Allocated using the same allocation function as GMP. */ + mp_limb_t *p; + }; + + void + ecc_point_init(struct ecc_point *p, const struct ecc_curve *ecc); + void + ecc_point_clear(struct ecc_point *p); + +/* Fails and returns zero if the point is not on the curve. */ + int + ecc_point_set(struct ecc_point *p, const mpz_t x, const mpz_t y); + void + ecc_point_get(const struct ecc_point *p, mpz_t x, mpz_t y); + + void + ecc_scalar_init(struct ecc_scalar *s, + const struct ecc_curve *ecc); + void + ecc_scalar_clear(struct ecc_scalar *s); + +/* Fails and returns zero if the scalar is not in the proper range. */ + int + ecc_scalar_set(struct ecc_scalar *s, const mpz_t z); + void + ecc_scalar_get(const struct ecc_scalar *s, mpz_t z); +/* Generates a random scalar, suitable as an ECDSA private key or a + ECDH exponent. */ + void + ecc_scalar_random(struct ecc_scalar *s, + void *random_ctx, nettle_random_func * random); + +/* Computes r = n p */ + void + ecc_point_mul(struct ecc_point *r, const struct ecc_scalar *n, + const struct ecc_point *p); + +/* Computes r = n g */ + void + ecc_point_mul_g(struct ecc_point *r, const struct ecc_scalar *n); + + +/* Low-level interface */ + +/* Points on a curve are represented as arrays of mp_limb_t. For some + curves, point coordinates are represented in montgomery form. We + use either affine coordinates x,y, or Jacobian coordinates X, Y, Z, + where x = X/Z^2 and y = X/Z^2. + + Since we use additive notation for the groups, the infinity point + on the curve is denoted 0. The infinity point can be represented + with x = y = 0 in affine coordinates, and Z = 0 in Jacobian + coordinates. However, note that most of the ECC functions do *not* + support infinity as an input or output. +*/ + +/* FIXME: Also provided some compile time constants? */ + +/* Returns the size of a single coordinate. */ + mp_size_t ecc_size(const struct ecc_curve *ecc); + +/* Size of a point, using affine coordinates x, y. */ + mp_size_t ecc_size_a(const struct ecc_curve *ecc); + +/* Size of a point, using jacobian coordinates X, Y and Z. */ + mp_size_t ecc_size_j(const struct ecc_curve *ecc); + +/* FIXME: Rename the low-level (and side-channel silent) functions to + _ecc_*, and provide public ecc_* functions which handle the + infinity points properly? */ + +/* Converts the affine coordinates of a point into montgomery form, if + used for this curve. */ + mp_size_t ecc_a_to_a_itch(const struct ecc_curve *ecc); + void + ecc_a_to_a(const struct ecc_curve *ecc, + mp_limb_t * r, const mp_limb_t * p, + mp_limb_t * scratch); + +/* Converts a point P in affine coordinates into a point R in jacobian + coordinates. If INITIAL is non-zero, and the curve uses montgomery + coordinates, also convert coordinates to montgomery form. */ + void + ecc_a_to_j(const struct ecc_curve *ecc, + int initial, mp_limb_t * r, const mp_limb_t * p); + +/* Converts a point P in jacobian coordinates into a point R in affine + coordinates. If FLAGS has bit 0 set, and the curve uses montgomery + coordinates, also undo the montgomery conversion. If flags has bit + 1 set, produce x coordinate only. */ + mp_size_t ecc_j_to_a_itch(const struct ecc_curve *ecc); + void + ecc_j_to_a(const struct ecc_curve *ecc, + int flags, + mp_limb_t * r, const mp_limb_t * p, + mp_limb_t * scratch); + +/* Group operations */ + + +/* Point doubling, with jacobian output and affine input. Corner + cases: Correctly sets R = 0 (r_Z = 0) if p = 0 or 2p = 0. */ + mp_size_t ecc_dup_ja_itch(const struct ecc_curve *ecc); + void + ecc_dup_ja(const struct ecc_curve *ecc, + mp_limb_t * r, const mp_limb_t * p, + mp_limb_t * scratch); + +/* Point doubling, with jacobian input and output. Corner cases: + Correctly sets R = 0 (r_Z = 0) if p = 0 or 2p = 0. */ + mp_size_t ecc_dup_jj_itch(const struct ecc_curve *ecc); + void + ecc_dup_jj(const struct ecc_curve *ecc, + mp_limb_t * r, const mp_limb_t * p, + mp_limb_t * scratch); + + +/* Point addition, with jacobian output, one jacobian input and one + affine input. Corner cases: Fails for the cases + + P = Q != 0 Duplication of non-zero point + P = 0, Q != 0 or P != 0, Q = 0 One input zero + + Correctly gives R = 0 if P = Q = 0 or P = -Q. */ + mp_size_t ecc_add_jja_itch(const struct ecc_curve *ecc); + void + ecc_add_jja(const struct ecc_curve *ecc, + mp_limb_t * r, const mp_limb_t * p, + const mp_limb_t * q, mp_limb_t * scratch); + +/* Point addition with Jacobian input and output. */ + mp_size_t ecc_add_jjj_itch(const struct ecc_curve *ecc); + void + ecc_add_jjj(const struct ecc_curve *ecc, + mp_limb_t * r, const mp_limb_t * p, + const mp_limb_t * q, mp_limb_t * scratch); + + +/* Computes N * the group generator. N is an array of ecc_size() + limbs. It must be in the range 0 < N < group order, then R != 0, + and the algorithm can work without any intermediate values getting + to zero. */ + mp_size_t ecc_mul_g_itch(const struct ecc_curve *ecc); + void + ecc_mul_g(const struct ecc_curve *ecc, mp_limb_t * r, + const mp_limb_t * np, mp_limb_t * scratch); + +/* Computes N * P. The scalar N is the same as for ecc_mul_g. P is a + non-zero point on the curve, in affine coordinates. Pass a non-zero + INITIAL if the point coordinates have not previously been converted + to Montgomery representation. Output R is a non-zero point, in + Jacobian coordinates. */ + mp_size_t ecc_mul_a_itch(const struct ecc_curve *ecc); + void + ecc_mul_a(const struct ecc_curve *ecc, + int initial, mp_limb_t * r, + const mp_limb_t * np, const mp_limb_t * p, + mp_limb_t * scratch); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ECC_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/ecdsa.h b/include/reactos/libs/gnutls/nettle/ecdsa.h new file mode 100644 index 00000000000..4a1ef7ec904 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/ecdsa.h @@ -0,0 +1,90 @@ +/* ecdsa.h */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2013 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Development of Nettle's ECC support was funded by the .SE Internet Fund. */ + +#ifndef NETTLE_ECDSA_H_INCLUDED +#define NETTLE_ECDSA_H_INCLUDED + +#include "ecc.h" +#include "dsa.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define ecdsa_sign nettle_ecdsa_sign +#define ecdsa_verify nettle_ecdsa_verify +#define ecdsa_generate_keypair nettle_ecdsa_generate_keypair +#define ecc_ecdsa_sign nettle_ecc_ecdsa_sign +#define ecc_ecdsa_sign_itch nettle_ecc_ecdsa_sign_itch +#define ecc_ecdsa_verify nettle_ecc_ecdsa_verify +#define ecc_ecdsa_verify_itch nettle_ecc_ecdsa_verify_itch + +/* High level ECDSA functions. + * + * A public key is represented as a struct ecc_point, and a private + * key as a struct ecc_scalar. FIXME: Introduce some aliases? */ + void + ecdsa_sign(const struct ecc_scalar *key, + void *random_ctx, nettle_random_func * random, + unsigned digest_length, + const uint8_t * digest, + struct dsa_signature *signature); + + int + ecdsa_verify(const struct ecc_point *pub, + unsigned length, const uint8_t * digest, + const struct dsa_signature *signature); + + void + ecdsa_generate_keypair(struct ecc_point *pub, + struct ecc_scalar *key, + void *random_ctx, + nettle_random_func * random); + +/* Low-level ECDSA functions. */ + mp_size_t ecc_ecdsa_sign_itch(const struct ecc_curve *ecc); + + void + ecc_ecdsa_sign(const struct ecc_curve *ecc, const mp_limb_t * zp, + /* Random nonce, must be invertible mod ecc group + order. */ + const mp_limb_t * kp, + unsigned length, const uint8_t * digest, + mp_limb_t * rp, mp_limb_t * sp, + mp_limb_t * scratch); + + mp_size_t ecc_ecdsa_verify_itch(const struct ecc_curve *ecc); + + int + ecc_ecdsa_verify(const struct ecc_curve *ecc, const mp_limb_t * pp, /* Public key */ + unsigned length, const uint8_t * digest, + const mp_limb_t * rp, const mp_limb_t * sp, + mp_limb_t * scratch); + + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_ECDSA_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/gcm.h b/include/reactos/libs/gnutls/nettle/gcm.h new file mode 100644 index 00000000000..a30b52063ff --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/gcm.h @@ -0,0 +1,186 @@ +/* gcm.h + * + * Galois counter mode, specified by NIST, + * http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf + * + */ + +/* NOTE: Tentative interface, subject to change. No effort will be + made to avoid incompatible changes. */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2011 Niels Möller + * Copyright (C) 2011 Katholieke Universiteit Leuven + * + * Contributed by Nikos Mavrogiannopoulos + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_GCM_H_INCLUDED +#define NETTLE_GCM_H_INCLUDED + +#include "aes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define gcm_set_key nettle_gcm_set_key +#define gcm_set_iv nettle_gcm_set_iv +#define gcm_update nettle_gcm_update +#define gcm_encrypt nettle_gcm_encrypt +#define gcm_decrypt nettle_gcm_decrypt +#define gcm_digest nettle_gcm_digest + +#define gcm_aes_set_key nettle_gcm_aes_set_key +#define gcm_aes_set_iv nettle_gcm_aes_set_iv +#define gcm_aes_update nettle_gcm_aes_update +#define gcm_aes_encrypt nettle_gcm_aes_encrypt +#define gcm_aes_decrypt nettle_gcm_aes_decrypt +#define gcm_aes_digest nettle_gcm_aes_digest + +#define GCM_BLOCK_SIZE 16 +#define GCM_IV_SIZE (GCM_BLOCK_SIZE - 4) + +#define GCM_TABLE_BITS 8 + +/* To make sure that we have proper alignment. */ + union gcm_block { + uint8_t b[GCM_BLOCK_SIZE]; + unsigned long w[GCM_BLOCK_SIZE / sizeof(unsigned long)]; + }; + +/* Hashing subkey */ + struct gcm_key { + union gcm_block h[1 << GCM_TABLE_BITS]; + }; + +/* Per-message state, depending on the iv */ + struct gcm_ctx { + /* Original counter block */ + union gcm_block iv; + /* Updated for each block. */ + union gcm_block ctr; + /* Hashing state */ + union gcm_block x; + uint64_t auth_size; + uint64_t data_size; + }; + +/* FIXME: Should use const for the cipher context. Then needs const for + nettle_crypt_func, which also rules out using that abstraction for + arcfour. */ + void + gcm_set_key(struct gcm_key *key, + void *cipher, nettle_crypt_func * f); + + void + gcm_set_iv(struct gcm_ctx *ctx, const struct gcm_key *key, + unsigned length, const uint8_t * iv); + + void + gcm_update(struct gcm_ctx *ctx, const struct gcm_key *key, + unsigned length, const uint8_t * data); + + void + gcm_encrypt(struct gcm_ctx *ctx, const struct gcm_key *key, + void *cipher, nettle_crypt_func * f, + unsigned length, uint8_t * dst, const uint8_t * src); + + void + gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key, + void *cipher, nettle_crypt_func * f, + unsigned length, uint8_t * dst, const uint8_t * src); + + void + gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key, + void *cipher, nettle_crypt_func * f, + unsigned length, uint8_t * digest); + +/* Convenience macrology (not sure how useful it is) */ + +/* All-in-one context, with cipher, hash subkey, and message state. */ +#define GCM_CTX(type) \ +{ type cipher; struct gcm_key key; struct gcm_ctx gcm; } + +/* NOTE: Avoid using NULL, as we don't include anything defining it. */ +#define GCM_SET_KEY(ctx, set_key, encrypt, length, data) \ + do { \ + (set_key)(&(ctx)->cipher, (length), (data)); \ + if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \ + gcm_set_key(&(ctx)->key, &(ctx)->cipher, \ + (nettle_crypt_func *) (encrypt)); \ + } while (0) + +#define GCM_SET_IV(ctx, length, data) \ + gcm_set_iv(&(ctx)->gcm, &(ctx)->key, (length), (data)) + +#define GCM_UPDATE(ctx, length, data) \ + gcm_update(&(ctx)->gcm, &(ctx)->key, (length), (data)) + +#define GCM_ENCRYPT(ctx, encrypt, length, dst, src) \ + (0 ? (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0) \ + : gcm_encrypt(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, \ + (nettle_crypt_func *) (encrypt), \ + (length), (dst), (src))) + +#define GCM_DECRYPT(ctx, encrypt, length, dst, src) \ + (0 ? (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0) \ + : gcm_decrypt(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, \ + (nettle_crypt_func *) (encrypt), \ + (length), (dst), (src))) + +#define GCM_DIGEST(ctx, encrypt, length, digest) \ + (0 ? (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0) \ + : gcm_digest(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, \ + (nettle_crypt_func *) (encrypt), \ + (length), (digest))) + + struct gcm_aes_ctx GCM_CTX(struct aes_ctx); + + void + gcm_aes_set_key(struct gcm_aes_ctx *ctx, + unsigned length, const uint8_t * key); + + void + gcm_aes_set_iv(struct gcm_aes_ctx *ctx, + unsigned length, const uint8_t * iv); + + void + gcm_aes_update(struct gcm_aes_ctx *ctx, + unsigned length, const uint8_t * data); + + void + gcm_aes_encrypt(struct gcm_aes_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + + void + gcm_aes_decrypt(struct gcm_aes_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + + void + gcm_aes_digest(struct gcm_aes_ctx *ctx, unsigned length, + uint8_t * digest); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_GCM_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/gosthash94.h b/include/reactos/libs/gnutls/nettle/gosthash94.h new file mode 100644 index 00000000000..67335e7d081 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/gosthash94.h @@ -0,0 +1,86 @@ +/* gosthash94.h + * + * The GOST R 34.11-94 hash function, described in RFC 5831. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2012 Nikos Mavrogiannopoulos, Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Interface based on rhash gost.h. */ + +/* Copyright: 2009-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Ported to nettle by Nikos Mavrogiannopoulos. + */ + +#ifndef NETTLE_GOSTHASH94_H_INCLUDED +#define NETTLE_GOSTHASH94_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define gosthash94_init nettle_gosthash94_init +#define gosthash94_update nettle_gosthash94_update +#define gosthash94_digest nettle_gosthash94_digest + +#define GOSTHASH94_DATA_SIZE 32 +#define GOSTHASH94_DIGEST_SIZE 32 + + struct gosthash94_ctx { + uint32_t hash[8]; /* algorithm 256-bit state */ + uint32_t sum[8]; /* sum of processed message blocks */ + uint8_t message[GOSTHASH94_DATA_SIZE]; /* 256-bit buffer for leftovers */ + uint64_t length; /* number of processed bytes */ + }; + + void gosthash94_init(struct gosthash94_ctx *ctx); + void gosthash94_update(struct gosthash94_ctx *ctx, + unsigned length, const uint8_t * msg); + void gosthash94_digest(struct gosthash94_ctx *ctx, + unsigned length, uint8_t * result); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_GOSTHASH94_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/hmac.h b/include/reactos/libs/gnutls/nettle/hmac.h new file mode 100644 index 00000000000..54fed76095c --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/hmac.h @@ -0,0 +1,201 @@ +/* hmac.h + * + * HMAC message authentication code (RFC-2104). + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_HMAC_H_INCLUDED +#define NETTLE_HMAC_H_INCLUDED + +#include "nettle-meta.h" + +#include "md5.h" +#include "ripemd160.h" +#include "sha1.h" +#include "sha2.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Namespace mangling */ +#define hmac_set_key nettle_hmac_set_key +#define hmac_update nettle_hmac_update +#define hmac_digest nettle_hmac_digest +#define hmac_md5_set_key nettle_hmac_md5_set_key +#define hmac_md5_update nettle_hmac_md5_update +#define hmac_md5_digest nettle_hmac_md5_digest +#define hmac_ripemd160_set_key nettle_hmac_ripemd160_set_key +#define hmac_ripemd160_update nettle_hmac_ripemd160_update +#define hmac_ripemd160_digest nettle_hmac_ripemd160_digest +#define hmac_sha1_set_key nettle_hmac_sha1_set_key +#define hmac_sha1_update nettle_hmac_sha1_update +#define hmac_sha1_digest nettle_hmac_sha1_digest +#define hmac_sha224_set_key nettle_hmac_sha224_set_key +#define hmac_sha224_digest nettle_hmac_sha224_digest +#define hmac_sha256_set_key nettle_hmac_sha256_set_key +#define hmac_sha256_update nettle_hmac_sha256_update +#define hmac_sha256_digest nettle_hmac_sha256_digest +#define hmac_sha384_set_key nettle_hmac_sha384_set_key +#define hmac_sha384_digest nettle_hmac_sha384_digest +#define hmac_sha512_set_key nettle_hmac_sha512_set_key +#define hmac_sha512_update nettle_hmac_sha512_update +#define hmac_sha512_digest nettle_hmac_sha512_digest + + void + hmac_set_key(void *outer, void *inner, void *state, + const struct nettle_hash *hash, + unsigned length, const uint8_t * key); + +/* This function is not strictly needed, it's s just the same as the + * hash update function. */ + void + hmac_update(void *state, + const struct nettle_hash *hash, + unsigned length, const uint8_t * data); + + void + hmac_digest(const void *outer, const void *inner, void *state, + const struct nettle_hash *hash, + unsigned length, uint8_t * digest); + + +#define HMAC_CTX(type) \ +{ type outer; type inner; type state; } + +#define HMAC_SET_KEY(ctx, hash, length, key) \ + hmac_set_key( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, \ + (hash), (length), (key) ) + +#define HMAC_DIGEST(ctx, hash, length, digest) \ + hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, \ + (hash), (length), (digest) ) + +/* HMAC using specific hash functions */ + +/* hmac-md5 */ + struct hmac_md5_ctx HMAC_CTX(struct md5_ctx); + + void + hmac_md5_set_key(struct hmac_md5_ctx *ctx, + unsigned key_length, const uint8_t * key); + + void + hmac_md5_update(struct hmac_md5_ctx *ctx, + unsigned length, const uint8_t * data); + + void + hmac_md5_digest(struct hmac_md5_ctx *ctx, + unsigned length, uint8_t * digest); + + +/* hmac-ripemd160 */ + struct hmac_ripemd160_ctx HMAC_CTX(struct ripemd160_ctx); + + void + hmac_ripemd160_set_key(struct hmac_ripemd160_ctx *ctx, + unsigned key_length, const uint8_t * key); + + void + hmac_ripemd160_update(struct hmac_ripemd160_ctx *ctx, + unsigned length, const uint8_t * data); + + void + hmac_ripemd160_digest(struct hmac_ripemd160_ctx *ctx, + unsigned length, uint8_t * digest); + + +/* hmac-sha1 */ + struct hmac_sha1_ctx HMAC_CTX(struct sha1_ctx); + + void + hmac_sha1_set_key(struct hmac_sha1_ctx *ctx, + unsigned key_length, const uint8_t * key); + + void + hmac_sha1_update(struct hmac_sha1_ctx *ctx, + unsigned length, const uint8_t * data); + + void + hmac_sha1_digest(struct hmac_sha1_ctx *ctx, + unsigned length, uint8_t * digest); + +/* hmac-sha256 */ + struct hmac_sha256_ctx HMAC_CTX(struct sha256_ctx); + + void + hmac_sha256_set_key(struct hmac_sha256_ctx *ctx, + unsigned key_length, const uint8_t * key); + + void + hmac_sha256_update(struct hmac_sha256_ctx *ctx, + unsigned length, const uint8_t * data); + + void + hmac_sha256_digest(struct hmac_sha256_ctx *ctx, + unsigned length, uint8_t * digest); + +/* hmac-sha224 */ +#define hmac_sha224_ctx hmac_sha256_ctx + + void + hmac_sha224_set_key(struct hmac_sha224_ctx *ctx, + unsigned key_length, const uint8_t * key); + +#define hmac_sha224_update nettle_hmac_sha256_update + + void + hmac_sha224_digest(struct hmac_sha224_ctx *ctx, + unsigned length, uint8_t * digest); + +/* hmac-sha512 */ + struct hmac_sha512_ctx HMAC_CTX(struct sha512_ctx); + + void + hmac_sha512_set_key(struct hmac_sha512_ctx *ctx, + unsigned key_length, const uint8_t * key); + + void + hmac_sha512_update(struct hmac_sha512_ctx *ctx, + unsigned length, const uint8_t * data); + + void + hmac_sha512_digest(struct hmac_sha512_ctx *ctx, + unsigned length, uint8_t * digest); + +/* hmac-sha384 */ +#define hmac_sha384_ctx hmac_sha512_ctx + + void + hmac_sha384_set_key(struct hmac_sha512_ctx *ctx, + unsigned key_length, const uint8_t * key); + +#define hmac_sha384_update nettle_hmac_sha512_update + + void + hmac_sha384_digest(struct hmac_sha512_ctx *ctx, + unsigned length, uint8_t * digest); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_HMAC_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/knuth-lfib.h b/include/reactos/libs/gnutls/nettle/knuth-lfib.h new file mode 100644 index 00000000000..88dd14f7708 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/knuth-lfib.h @@ -0,0 +1,72 @@ +/* knuth-lfib.h + * + * A "lagged fibonacci" pseudorandomness generator. + * + * Described in Knuth, TAOCP, 3.6 + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* NOTE: This generator is totally inappropriate for cryptographic + * applications. It is useful for generating deterministic but + * random-looking test data, and is used by the Nettle testsuite. */ +#ifndef NETTLE_KNUTH_LFIB_H_INCLUDED +#define NETTLE_KNUTH_LFIB_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Namespace mangling */ +#define knuth_lfib_init nettle_knuth_lfib_init +#define knuth_lfib_get nettle_knuth_lfib_get +#define knuth_lfib_get_array nettle_knuth_lfib_get_array +#define knuth_lfib_random nettle_knuth_lfib_random + +#define _KNUTH_LFIB_KK 100 + + struct knuth_lfib_ctx { + uint32_t x[_KNUTH_LFIB_KK]; + unsigned index; + }; + + void + knuth_lfib_init(struct knuth_lfib_ctx *ctx, uint32_t seed); + +/* Get's a single number in the range 0 ... 2^30-1 */ + uint32_t knuth_lfib_get(struct knuth_lfib_ctx *ctx); + +/* Get an array of numbers */ + void + knuth_lfib_get_array(struct knuth_lfib_ctx *ctx, + unsigned n, uint32_t * a); + +/* Get an array of octets. */ + void + knuth_lfib_random(struct knuth_lfib_ctx *ctx, + unsigned n, uint8_t * dst); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_KNUTH_LFIB_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/macros.h b/include/reactos/libs/gnutls/nettle/macros.h new file mode 100644 index 00000000000..62ac924b6e8 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/macros.h @@ -0,0 +1,238 @@ +/* macros.h + * + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2010 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_MACROS_H_INCLUDED +#define NETTLE_MACROS_H_INCLUDED + +/* Reads a 64-bit integer, in network, big-endian, byte order */ +#define READ_UINT64(p) \ +( (((uint64_t) (p)[0]) << 56) \ + | (((uint64_t) (p)[1]) << 48) \ + | (((uint64_t) (p)[2]) << 40) \ + | (((uint64_t) (p)[3]) << 32) \ + | (((uint64_t) (p)[4]) << 24) \ + | (((uint64_t) (p)[5]) << 16) \ + | (((uint64_t) (p)[6]) << 8) \ + | ((uint64_t) (p)[7])) + +#define WRITE_UINT64(p, i) \ +do { \ + (p)[0] = ((i) >> 56) & 0xff; \ + (p)[1] = ((i) >> 48) & 0xff; \ + (p)[2] = ((i) >> 40) & 0xff; \ + (p)[3] = ((i) >> 32) & 0xff; \ + (p)[4] = ((i) >> 24) & 0xff; \ + (p)[5] = ((i) >> 16) & 0xff; \ + (p)[6] = ((i) >> 8) & 0xff; \ + (p)[7] = (i) & 0xff; \ +} while(0) + +/* Reads a 32-bit integer, in network, big-endian, byte order */ +#define READ_UINT32(p) \ +( (((uint32_t) (p)[0]) << 24) \ + | (((uint32_t) (p)[1]) << 16) \ + | (((uint32_t) (p)[2]) << 8) \ + | ((uint32_t) (p)[3])) + +#define WRITE_UINT32(p, i) \ +do { \ + (p)[0] = ((i) >> 24) & 0xff; \ + (p)[1] = ((i) >> 16) & 0xff; \ + (p)[2] = ((i) >> 8) & 0xff; \ + (p)[3] = (i) & 0xff; \ +} while(0) + +/* Analogous macros, for 24 and 16 bit numbers */ +#define READ_UINT24(p) \ +( (((uint32_t) (p)[0]) << 16) \ + | (((uint32_t) (p)[1]) << 8) \ + | ((uint32_t) (p)[2])) + +#define WRITE_UINT24(p, i) \ +do { \ + (p)[0] = ((i) >> 16) & 0xff; \ + (p)[1] = ((i) >> 8) & 0xff; \ + (p)[2] = (i) & 0xff; \ +} while(0) + +#define READ_UINT16(p) \ +( (((uint32_t) (p)[0]) << 8) \ + | ((uint32_t) (p)[1])) + +#define WRITE_UINT16(p, i) \ +do { \ + (p)[0] = ((i) >> 8) & 0xff; \ + (p)[1] = (i) & 0xff; \ +} while(0) + +/* And the other, little-endian, byteorder */ +#define LE_READ_UINT64(p) \ +( (((uint64_t) (p)[7]) << 56) \ + | (((uint64_t) (p)[6]) << 48) \ + | (((uint64_t) (p)[5]) << 40) \ + | (((uint64_t) (p)[4]) << 32) \ + | (((uint64_t) (p)[3]) << 24) \ + | (((uint64_t) (p)[2]) << 16) \ + | (((uint64_t) (p)[1]) << 8) \ + | ((uint64_t) (p)[0])) + +#define LE_WRITE_UINT64(p, i) \ +do { \ + (p)[7] = ((i) >> 56) & 0xff; \ + (p)[6] = ((i) >> 48) & 0xff; \ + (p)[5] = ((i) >> 40) & 0xff; \ + (p)[4] = ((i) >> 32) & 0xff; \ + (p)[3] = ((i) >> 24) & 0xff; \ + (p)[2] = ((i) >> 16) & 0xff; \ + (p)[1] = ((i) >> 8) & 0xff; \ + (p)[0] = (i) & 0xff; \ +} while (0) + +#define LE_READ_UINT32(p) \ +( (((uint32_t) (p)[3]) << 24) \ + | (((uint32_t) (p)[2]) << 16) \ + | (((uint32_t) (p)[1]) << 8) \ + | ((uint32_t) (p)[0])) + +#define LE_WRITE_UINT32(p, i) \ +do { \ + (p)[3] = ((i) >> 24) & 0xff; \ + (p)[2] = ((i) >> 16) & 0xff; \ + (p)[1] = ((i) >> 8) & 0xff; \ + (p)[0] = (i) & 0xff; \ +} while(0) + +/* Analogous macros, for 16 bit numbers */ +#define LE_READ_UINT16(p) \ + ( (((uint32_t) (p)[1]) << 8) \ + | ((uint32_t) (p)[0])) + +#define LE_WRITE_UINT16(p, i) \ + do { \ + (p)[1] = ((i) >> 8) & 0xff; \ + (p)[0] = (i) & 0xff; \ + } while(0) + +/* Macro to make it easier to loop over several blocks. */ +#define FOR_BLOCKS(length, dst, src, blocksize) \ + assert( !((length) % (blocksize))); \ + for (; (length); ((length) -= (blocksize), \ + (dst) += (blocksize), \ + (src) += (blocksize)) ) + +#define ROTL32(n,x) (((x)<<(n)) | ((x)>>(32-(n)))) + +#define ROTL64(n,x) (((x)<<(n)) | ((x)>>(64-(n)))) + +/* Requires that size > 0 */ +#define INCREMENT(size, ctr) \ + do { \ + unsigned increment_i = (size) - 1; \ + if (++(ctr)[increment_i] == 0) \ + while (increment_i > 0 \ + && ++(ctr)[--increment_i] == 0 ) \ + ; \ + } while (0) + + +/* Helper macro for Merkle-Damgård hash functions. Assumes the context + structs includes the following fields: + + xxx count_low, count_high; // Two word block count + uint8_t block[...]; // Buffer holding one block + unsigned int index; // Index into block +*/ + +/* FIXME: Should probably switch to using uint64_t for the count, but + due to alignment and byte order that may be an ABI change. */ + +#define MD_INCR(ctx) ((ctx)->count_high += !++(ctx)->count_low) + +/* Takes the compression function f as argument. NOTE: also clobbers + length and data. */ +#define MD_UPDATE(ctx, length, data, f, incr) \ + do { \ + if ((ctx)->index) \ + { \ + /* Try to fill partial block */ \ + unsigned __md_left = sizeof((ctx)->block) - (ctx)->index; \ + if ((length) < __md_left) \ + { \ + memcpy((ctx)->block + (ctx)->index, (data), (length)); \ + (ctx)->index += (length); \ + goto __md_done; /* Finished */ \ + } \ + else \ + { \ + memcpy((ctx)->block + (ctx)->index, (data), __md_left); \ + \ + f((ctx), (ctx)->block); \ + (incr); \ + \ + (data) += __md_left; \ + (length) -= __md_left; \ + } \ + } \ + while ((length) >= sizeof((ctx)->block)) \ + { \ + f((ctx), (data)); \ + (incr); \ + \ + (data) += sizeof((ctx)->block); \ + (length) -= sizeof((ctx)->block); \ + } \ + memcpy ((ctx)->block, (data), (length)); \ + (ctx)->index = (length); \ + __md_done: \ + ; \ + } while (0) + +/* Pads the block to a block boundary with the bit pattern 1 0*, + leaving size octets for the length field at the end. If needed, + compresses the block and starts a new one. */ +#define MD_PAD(ctx, size, f) \ + do { \ + unsigned __md_i; \ + __md_i = (ctx)->index; \ + \ + /* Set the first char of padding to 0x80. This is safe since there \ + is always at least one byte free */ \ + \ + assert(__md_i < sizeof((ctx)->block)); \ + (ctx)->block[__md_i++] = 0x80; \ + \ + if (__md_i > (sizeof((ctx)->block) - 2*sizeof((ctx)->count_low))) \ + { /* No room for length in this block. Process it and \ + pad with another one */ \ + memset((ctx)->block + __md_i, 0, sizeof((ctx)->block) - __md_i); \ + \ + f((ctx), (ctx)->block); \ + __md_i = 0; \ + } \ + memset((ctx)->block + __md_i, 0, \ + sizeof((ctx)->block) - (size) - __md_i); \ + \ + } while (0) + +#endif /* NETTLE_MACROS_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/md2.h b/include/reactos/libs/gnutls/nettle/md2.h new file mode 100644 index 00000000000..eff729ca1d8 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/md2.h @@ -0,0 +1,65 @@ +/* md2.h + * + * The MD2 hash function, described in RFC 1319. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2003 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_MD2_H_INCLUDED +#define NETTLE_MD2_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define md2_init nettle_md2_init +#define md2_update nettle_md2_update +#define md2_digest nettle_md2_digest + +#define MD2_DIGEST_SIZE 16 +#define MD2_DATA_SIZE 16 + + struct md2_ctx { + uint8_t C[MD2_DATA_SIZE]; + uint8_t X[3 * MD2_DATA_SIZE]; + uint8_t block[MD2_DATA_SIZE]; /* Block buffer */ + unsigned index; /* Into buffer */ + }; + + void + md2_init(struct md2_ctx *ctx); + + void + md2_update(struct md2_ctx *ctx, + unsigned length, const uint8_t * data); + + void + md2_digest(struct md2_ctx *ctx, + unsigned length, uint8_t * digest); + + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_MD2_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/md4.h b/include/reactos/libs/gnutls/nettle/md4.h new file mode 100644 index 00000000000..45d906ed6b3 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/md4.h @@ -0,0 +1,69 @@ +/* md4.h + * + * The MD4 hash function, described in RFC 1320. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2003 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_MD4_H_INCLUDED +#define NETTLE_MD4_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define md4_init nettle_md4_init +#define md4_update nettle_md4_update +#define md4_digest nettle_md4_digest + +#define MD4_DIGEST_SIZE 16 +#define MD4_DATA_SIZE 64 + +/* Digest is kept internally as 4 32-bit words. */ +#define _MD4_DIGEST_LENGTH 4 + +/* FIXME: Identical to md5_ctx */ + struct md4_ctx { + uint32_t state[_MD4_DIGEST_LENGTH]; + uint32_t count_low, count_high; /* Block count */ + uint8_t block[MD4_DATA_SIZE]; /* Block buffer */ + unsigned index; /* Into buffer */ + }; + + void + md4_init(struct md4_ctx *ctx); + + void + md4_update(struct md4_ctx *ctx, + unsigned length, const uint8_t * data); + + void + md4_digest(struct md4_ctx *ctx, + unsigned length, uint8_t * digest); + + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_MD4_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/md5-compat.h b/include/reactos/libs/gnutls/nettle/md5-compat.h new file mode 100644 index 00000000000..e5c8a0d4fa4 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/md5-compat.h @@ -0,0 +1,50 @@ +/* md5-compat.h + * + * The md5 hash function, RFC 1321-style interface. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_MD5_COMPAT_H_INCLUDED +#define NETTLE_MD5_COMPAT_H_INCLUDED + +#include "md5.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define MD5Init nettle_MD5Init +#define MD5Update nettle_MD5Update +#define MD5Final nettle_MD5Final + + typedef struct md5_ctx MD5_CTX; + + void MD5Init(MD5_CTX * ctx); + void MD5Update(MD5_CTX * ctx, const unsigned char *data, + unsigned int length); + void MD5Final(unsigned char *out, MD5_CTX * ctx); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_MD5_COMPAT_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/md5.h b/include/reactos/libs/gnutls/nettle/md5.h new file mode 100644 index 00000000000..fa1da78e387 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/md5.h @@ -0,0 +1,72 @@ +/* md5.h + * + * The MD5 hash function, described in RFC 1321. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_MD5_H_INCLUDED +#define NETTLE_MD5_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define md5_init nettle_md5_init +#define md5_update nettle_md5_update +#define md5_digest nettle_md5_digest + +#define MD5_DIGEST_SIZE 16 +#define MD5_DATA_SIZE 64 + +/* Digest is kept internally as 4 32-bit words. */ +#define _MD5_DIGEST_LENGTH 4 + + struct md5_ctx { + uint32_t state[_MD5_DIGEST_LENGTH]; + uint32_t count_low, count_high; /* Block count */ + uint8_t block[MD5_DATA_SIZE]; /* Block buffer */ + unsigned index; /* Into buffer */ + }; + + void + md5_init(struct md5_ctx *ctx); + + void + md5_update(struct md5_ctx *ctx, + unsigned length, const uint8_t * data); + + void + md5_digest(struct md5_ctx *ctx, + unsigned length, uint8_t * digest); + +/* Internal compression function. STATE points to 4 uint32_t words, + and DATA points to 64 bytes of input data, possibly unaligned. */ + void + _nettle_md5_compress(uint32_t * state, const uint8_t * data); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_MD5_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/memxor.h b/include/reactos/libs/gnutls/nettle/memxor.h new file mode 100644 index 00000000000..e212a93f54f --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/memxor.h @@ -0,0 +1,22 @@ +/* memxor.h + * + */ + +#ifndef NETTLE_MEMXOR_H_INCLUDED +#define NETTLE_MEMXOR_H_INCLUDED + +#include +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + + uint8_t *memxor(uint8_t * dst, const uint8_t * src, size_t n); + uint8_t *memxor3(uint8_t * dst, const uint8_t * a, + const uint8_t * b, size_t n); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_MEMXOR_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/nettle-meta.h b/include/reactos/libs/gnutls/nettle/nettle-meta.h new file mode 100644 index 00000000000..8c23f55dd07 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/nettle-meta.h @@ -0,0 +1,228 @@ +/* nettle-meta.h + * + * Information about algorithms. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_META_H_INCLUDED +#define NETTLE_META_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + + + struct nettle_cipher { + const char *name; + + unsigned context_size; + + /* Zero for stream ciphers */ + unsigned block_size; + + /* Suggested key size; other sizes are sometimes possible. */ + unsigned key_size; + + nettle_set_key_func *set_encrypt_key; + nettle_set_key_func *set_decrypt_key; + + nettle_crypt_func *encrypt; + nettle_crypt_func *decrypt; + }; + +#define _NETTLE_CIPHER(name, NAME, key_size) { \ + #name #key_size, \ + sizeof(struct name##_ctx), \ + NAME##_BLOCK_SIZE, \ + key_size / 8, \ + (nettle_set_key_func *) name##_set_key, \ + (nettle_set_key_func *) name##_set_key, \ + (nettle_crypt_func *) name##_encrypt, \ + (nettle_crypt_func *) name##_decrypt, \ +} + +#define _NETTLE_CIPHER_SEP(name, NAME, key_size) { \ + #name #key_size, \ + sizeof(struct name##_ctx), \ + NAME##_BLOCK_SIZE, \ + key_size / 8, \ + (nettle_set_key_func *) name##_set_encrypt_key, \ + (nettle_set_key_func *) name##_set_decrypt_key, \ + (nettle_crypt_func *) name##_encrypt, \ + (nettle_crypt_func *) name##_decrypt, \ +} + +#define _NETTLE_CIPHER_SEP_SET_KEY(name, NAME, key_size) {\ + #name #key_size, \ + sizeof(struct name##_ctx), \ + NAME##_BLOCK_SIZE, \ + key_size / 8, \ + (nettle_set_key_func *) name##_set_encrypt_key, \ + (nettle_set_key_func *) name##_set_decrypt_key, \ + (nettle_crypt_func *) name##_crypt, \ + (nettle_crypt_func *) name##_crypt, \ +} + +#define _NETTLE_CIPHER_FIX(name, NAME) { \ + #name, \ + sizeof(struct name##_ctx), \ + NAME##_BLOCK_SIZE, \ + NAME##_KEY_SIZE, \ + (nettle_set_key_func *) name##_set_key, \ + (nettle_set_key_func *) name##_set_key, \ + (nettle_crypt_func *) name##_encrypt, \ + (nettle_crypt_func *) name##_decrypt, \ +} + +/* null-terminated list of ciphers implemented by this version of nettle */ + extern const struct nettle_cipher *const nettle_ciphers[]; + + extern const struct nettle_cipher nettle_aes128; + extern const struct nettle_cipher nettle_aes192; + extern const struct nettle_cipher nettle_aes256; + + extern const struct nettle_cipher nettle_arcfour128; + + extern const struct nettle_cipher nettle_camellia128; + extern const struct nettle_cipher nettle_camellia192; + extern const struct nettle_cipher nettle_camellia256; + + extern const struct nettle_cipher nettle_cast128; + + extern const struct nettle_cipher nettle_serpent128; + extern const struct nettle_cipher nettle_serpent192; + extern const struct nettle_cipher nettle_serpent256; + + extern const struct nettle_cipher nettle_twofish128; + extern const struct nettle_cipher nettle_twofish192; + extern const struct nettle_cipher nettle_twofish256; + + extern const struct nettle_cipher nettle_arctwo40; + extern const struct nettle_cipher nettle_arctwo64; + extern const struct nettle_cipher nettle_arctwo128; + extern const struct nettle_cipher nettle_arctwo_gutmann128; + + struct nettle_hash { + const char *name; + + /* Size of the context struct */ + unsigned context_size; + + /* Size of digests */ + unsigned digest_size; + + /* Internal block size */ + unsigned block_size; + + nettle_hash_init_func *init; + nettle_hash_update_func *update; + nettle_hash_digest_func *digest; + }; + +#define _NETTLE_HASH(name, NAME) { \ + #name, \ + sizeof(struct name##_ctx), \ + NAME##_DIGEST_SIZE, \ + NAME##_DATA_SIZE, \ + (nettle_hash_init_func *) name##_init, \ + (nettle_hash_update_func *) name##_update, \ + (nettle_hash_digest_func *) name##_digest \ +} + +/* null-terminated list of digests implemented by this version of nettle */ + extern const struct nettle_hash *const nettle_hashes[]; + + extern const struct nettle_hash nettle_md2; + extern const struct nettle_hash nettle_md4; + extern const struct nettle_hash nettle_md5; + extern const struct nettle_hash nettle_gosthash94; + extern const struct nettle_hash nettle_ripemd160; + extern const struct nettle_hash nettle_sha1; + extern const struct nettle_hash nettle_sha224; + extern const struct nettle_hash nettle_sha256; + extern const struct nettle_hash nettle_sha384; + extern const struct nettle_hash nettle_sha512; + extern const struct nettle_hash nettle_sha3_224; + extern const struct nettle_hash nettle_sha3_256; + extern const struct nettle_hash nettle_sha3_384; + extern const struct nettle_hash nettle_sha3_512; + + struct nettle_armor { + const char *name; + unsigned encode_context_size; + unsigned decode_context_size; + + unsigned encode_final_length; + + nettle_armor_init_func *encode_init; + nettle_armor_length_func *encode_length; + nettle_armor_encode_update_func *encode_update; + nettle_armor_encode_final_func *encode_final; + + nettle_armor_init_func *decode_init; + nettle_armor_length_func *decode_length; + nettle_armor_decode_update_func *decode_update; + nettle_armor_decode_final_func *decode_final; + }; + +#define _NETTLE_ARMOR(name, NAME) { \ + #name, \ + sizeof(struct name##_encode_ctx), \ + sizeof(struct name##_decode_ctx), \ + NAME##_ENCODE_FINAL_LENGTH, \ + (nettle_armor_init_func *) name##_encode_init, \ + (nettle_armor_length_func *) name##_encode_length, \ + (nettle_armor_encode_update_func *) name##_encode_update, \ + (nettle_armor_encode_final_func *) name##_encode_final, \ + (nettle_armor_init_func *) name##_decode_init, \ + (nettle_armor_length_func *) name##_decode_length, \ + (nettle_armor_decode_update_func *) name##_decode_update, \ + (nettle_armor_decode_final_func *) name##_decode_final, \ +} + +#define _NETTLE_ARMOR_0(name, NAME) { \ + #name, \ + 0, \ + sizeof(struct name##_decode_ctx), \ + NAME##_ENCODE_FINAL_LENGTH, \ + (nettle_armor_init_func *) name##_encode_init, \ + (nettle_armor_length_func *) name##_encode_length, \ + (nettle_armor_encode_update_func *) name##_encode_update, \ + (nettle_armor_encode_final_func *) name##_encode_final, \ + (nettle_armor_init_func *) name##_decode_init, \ + (nettle_armor_length_func *) name##_decode_length, \ + (nettle_armor_decode_update_func *) name##_decode_update, \ + (nettle_armor_decode_final_func *) name##_decode_final, \ +} + +/* null-terminated list of armor schemes implemented by this version of nettle */ + extern const struct nettle_armor *const nettle_armors[]; + + extern const struct nettle_armor nettle_base64; + extern const struct nettle_armor nettle_base16; + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_META_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/nettle-stdint.h b/include/reactos/libs/gnutls/nettle/nettle-stdint.h new file mode 100644 index 00000000000..c2b255bf242 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/nettle-stdint.h @@ -0,0 +1,286 @@ +#ifndef __NETTLE_STDINT_H +#define __NETTLE_STDINT_H 1 +#ifndef _GENERATED_STDINT_H +#define _GENERATED_STDINT_H " " +/* generated using gnu compiler i686-w64-mingw32-gcc (GCC) 4.9.0 */ +#define _STDINT_HAVE_STDINT_H 1 + +/* ................... shortcircuit part ........................... */ + +#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H +#include +#else +#include + +/* .................... configured part ............................ */ + +/* whether we have a C99 compatible stdint header file */ +/* #undef _STDINT_HEADER_INTPTR */ +/* whether we have a C96 compatible inttypes header file */ +/* #undef _STDINT_HEADER_UINT32 */ +/* whether we have a BSD compatible inet types header */ +/* #undef _STDINT_HEADER_U_INT32 */ + +/* which 64bit typedef has been found */ +/* #undef _STDINT_HAVE_UINT64_T */ +/* #undef _STDINT_HAVE_U_INT64_T */ + +/* which type model has been detected */ +/* #undef _STDINT_CHAR_MODEL // skipped */ +/* #undef _STDINT_LONG_MODEL // skipped */ + +/* whether int_least types were detected */ +/* #undef _STDINT_HAVE_INT_LEAST32_T */ +/* whether int_fast types were detected */ +/* #undef _STDINT_HAVE_INT_FAST32_T */ +/* whether intmax_t type was detected */ +/* #undef _STDINT_HAVE_INTMAX_T */ + +/* .................... detections part ............................ */ + +/* whether we need to define bitspecific types from compiler base types */ +#ifndef _STDINT_HEADER_INTPTR +#ifndef _STDINT_HEADER_UINT32 +#ifndef _STDINT_HEADER_U_INT32 +#define _STDINT_NEED_INT_MODEL_T +#else +#define _STDINT_HAVE_U_INT_TYPES +#endif +#endif +#endif + +#ifdef _STDINT_HAVE_U_INT_TYPES +#undef _STDINT_NEED_INT_MODEL_T +#endif + +#ifdef _STDINT_CHAR_MODEL +#if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124 +#ifndef _STDINT_BYTE_MODEL +#define _STDINT_BYTE_MODEL 12 +#endif +#endif +#endif + +#ifndef _STDINT_HAVE_INT_LEAST32_T +#define _STDINT_NEED_INT_LEAST_T +#endif + +#ifndef _STDINT_HAVE_INT_FAST32_T +#define _STDINT_NEED_INT_FAST_T +#endif + +#ifndef _STDINT_HEADER_INTPTR +#define _STDINT_NEED_INTPTR_T +#ifndef _STDINT_HAVE_INTMAX_T +#define _STDINT_NEED_INTMAX_T +#endif +#endif + + +/* .................... definition part ............................ */ + +/* some system headers have good uint64_t */ +#ifndef _HAVE_UINT64_T +#if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T +#define _HAVE_UINT64_T +#elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T +#define _HAVE_UINT64_T +typedef u_int64_t uint64_t; +#endif +#endif + +#ifndef _HAVE_UINT64_T +/* .. here are some common heuristics using compiler runtime specifics */ +#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L +#define _HAVE_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; + +#elif !defined __STRICT_ANSI__ +#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ +#define _HAVE_UINT64_T +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ +/* note: all ELF-systems seem to have loff-support which needs 64-bit */ +#if !defined _NO_LONGLONG +#define _HAVE_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif + +#elif defined __alpha || (defined __mips && defined _ABIN32) +#if !defined _NO_LONGLONG +typedef long int64_t; +typedef unsigned long uint64_t; +#endif + /* compiler/cpu type to define int64_t */ +#endif +#endif +#endif + +#if defined _STDINT_HAVE_U_INT_TYPES +/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ +typedef u_int8_t uint8_t; +typedef u_int16_t uint16_t; +typedef u_int32_t uint32_t; + +/* glibc compatibility */ +#ifndef __int8_t_defined +#define __int8_t_defined +#endif +#endif + +#ifdef _STDINT_NEED_INT_MODEL_T +/* we must guess all the basic types. Apart from byte-adressable system, */ +/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ +/* (btw, those nibble-addressable systems are way off, or so we assume) */ + + +#if defined _STDINT_BYTE_MODEL +#if _STDINT_LONG_MODEL+0 == 242 +/* 2:4:2 = IP16 = a normal 16-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef long int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 +/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ +/* 4:4:4 = ILP32 = a normal 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 +/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ +/* 4:8:8 = LP64 = a normal 64-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* this system has a "long" of 64bit */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +typedef unsigned long uint64_t; +typedef long int64_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 448 +/* LLP64 a 64-bit system derived from a 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* assuming the system has a "long long" */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif +#else +#define _STDINT_NO_INT32_T +#endif +#else +#define _STDINT_NO_INT8_T +#define _STDINT_NO_INT32_T +#endif +#endif + +/* + * quote from SunOS-5.8 sys/inttypes.h: + * Use at your own risk. As of February 1996, the committee is squarely + * behind the fixed sized types; the "least" and "fast" types are still being + * discussed. The probability that the "fast" types may be removed before + * the standard is finalized is high enough that they are not currently + * implemented. + */ + +#if defined _STDINT_NEED_INT_LEAST_T +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_least64_t; +#endif + +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_least64_t; +#endif + /* least types */ +#endif + +#if defined _STDINT_NEED_INT_FAST_T +typedef int8_t int_fast8_t; +typedef int int_fast16_t; +typedef int32_t int_fast32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_fast64_t; +#endif + +typedef uint8_t uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef uint32_t uint_fast32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_fast64_t; +#endif + /* fast types */ +#endif + +#ifdef _STDINT_NEED_INTMAX_T +#ifdef _HAVE_UINT64_T +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; +#else +typedef long intmax_t; +typedef unsigned long uintmax_t; +#endif +#endif + +#ifdef _STDINT_NEED_INTPTR_T +#ifndef __intptr_t_defined +#define __intptr_t_defined +/* we encourage using "long" to store pointer values, never use "int" ! */ +#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 +typedef unsinged int uintptr_t; +typedef int intptr_t; +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 +typedef unsigned long uintptr_t; +typedef long intptr_t; +#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T +typedef uint64_t uintptr_t; +typedef int64_t intptr_t; +#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ +typedef unsigned long uintptr_t; +typedef long intptr_t; +#endif +#endif +#endif + + /* shortcircuit*/ +#endif + /* once */ +#endif +#endif diff --git a/include/reactos/libs/gnutls/nettle/nettle-types.h b/include/reactos/libs/gnutls/nettle/nettle-types.h new file mode 100644 index 00000000000..97dc98ccc6e --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/nettle-types.h @@ -0,0 +1,96 @@ +/* nettle-types.h */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2005 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_TYPES_H +#define NETTLE_TYPES_H + +/* Pretend these types always exists. Nettle doesn't use them. */ +#define _STDINT_HAVE_INT_FAST32_T 1 + +#include "nettle-stdint.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Randomness. Used by key generation and dsa signature creation. */ + typedef void nettle_random_func(void *ctx, + unsigned length, uint8_t * dst); + +/* Progress report function, mainly for key generation. */ + typedef void nettle_progress_func(void *ctx, int c); + +/* Realloc function, used by struct nettle_buffer. */ + typedef void *nettle_realloc_func(void *ctx, void *p, + unsigned length); + +/* Ciphers */ + typedef void nettle_set_key_func(void *ctx, + unsigned length, + const uint8_t * key); + +/* Uses a void * for cipher contexts. + + For block ciphers it would make sense with a const void * for the + context, but we use the same typedef for stream ciphers where the + internal state changes during the encryption. */ + + typedef void nettle_crypt_func(void *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +/* Hash algorithms */ + typedef void nettle_hash_init_func(void *ctx); + typedef void nettle_hash_update_func(void *ctx, + unsigned length, + const uint8_t * src); + typedef void nettle_hash_digest_func(void *ctx, + unsigned length, + uint8_t * dst); + +/* ASCII armor codecs. NOTE: Experimental and subject to change. */ + + typedef unsigned nettle_armor_length_func(unsigned length); + typedef void nettle_armor_init_func(void *ctx); + + typedef unsigned nettle_armor_encode_update_func(void *ctx, + uint8_t * dst, + unsigned + src_length, + const uint8_t * + src); + + typedef unsigned nettle_armor_encode_final_func(void *ctx, + uint8_t * dst); + + typedef int nettle_armor_decode_update_func(void *ctx, + unsigned *dst_length, + uint8_t * dst, + unsigned src_length, + const uint8_t * src); + + typedef int nettle_armor_decode_final_func(void *ctx); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_TYPES_H */ diff --git a/include/reactos/libs/gnutls/nettle/pbkdf2.h b/include/reactos/libs/gnutls/nettle/pbkdf2.h new file mode 100644 index 00000000000..d415689315d --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/pbkdf2.h @@ -0,0 +1,75 @@ +/* pbkdf2.h + * + * PKCS #5 password-based key derivation function PBKDF2, see RFC 2898. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2012 Simon Josefsson + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_PBKDF2_H_INCLUDED +#define NETTLE_PBKDF2_H_INCLUDED + +#include "nettle-meta.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Namespace mangling */ +#define pbkdf2 nettle_pbkdf2 +#define pbkdf2_hmac_sha1 nettle_pbkdf2_hmac_sha1 +#define pbkdf2_hmac_sha256 nettle_pbkdf2_hmac_sha256 + + void + pbkdf2(void *mac_ctx, + nettle_hash_update_func * update, + nettle_hash_digest_func * digest, + unsigned digest_size, unsigned iterations, + unsigned salt_length, const uint8_t * salt, + unsigned length, uint8_t * dst); + +#define PBKDF2(ctx, update, digest, digest_size, \ + iterations, salt_length, salt, length, dst) \ + (0 ? ((update)((ctx), 0, (uint8_t *) 0), \ + (digest)((ctx), 0, (uint8_t *) 0)) \ + : pbkdf2 ((ctx), \ + (nettle_hash_update_func *)(update), \ + (nettle_hash_digest_func *)(digest), \ + (digest_size), (iterations), \ + (salt_length), (salt), (length), (dst))) + +/* PBKDF2 with specific PRFs. */ + + void + pbkdf2_hmac_sha1(unsigned key_length, const uint8_t * key, + unsigned iterations, + unsigned salt_length, const uint8_t * salt, + unsigned length, uint8_t * dst); + + void + pbkdf2_hmac_sha256(unsigned key_length, const uint8_t * key, + unsigned iterations, + unsigned salt_length, const uint8_t * salt, + unsigned length, uint8_t * dst); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_PBKDF2_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/pgp.h b/include/reactos/libs/gnutls/nettle/pgp.h new file mode 100644 index 00000000000..2beedf75d3c --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/pgp.h @@ -0,0 +1,222 @@ +/* pgp.h + * + * PGP related functions. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_PGP_H_INCLUDED +#define NETTLE_PGP_H_INCLUDED + +#include + +#include "nettle-types.h" +#include "bignum.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define pgp_put_uint32 nettle_pgp_put_uint32 +#define pgp_put_uint16 nettle_pgp_put_uint16 +#define pgp_put_mpi nettle_pgp_put_mpi +#define pgp_put_string nettle_pgp_put_string +#define pgp_put_length nettle_pgp_put_length +#define pgp_put_header nettle_pgp_put_header +#define pgp_put_header_length nettle_pgp_put_header_length +#define pgp_sub_packet_start nettle_pgp_sub_packet_start +#define pgp_put_sub_packet nettle_pgp_put_sub_packet +#define pgp_sub_packet_end nettle_pgp_sub_packet_end +#define pgp_put_public_rsa_key nettle_pgp_put_public_rsa_key +#define pgp_put_rsa_sha1_signature nettle_pgp_put_rsa_sha1_signature +#define pgp_put_userid nettle_pgp_put_userid +#define pgp_crc24 nettle_pgp_crc24 +#define pgp_armor nettle_pgp_armor + + struct nettle_buffer; + struct rsa_public_key; + struct rsa_private_key; + struct sha1_ctx; + + int + pgp_put_uint32(struct nettle_buffer *buffer, uint32_t i); + + int + pgp_put_uint16(struct nettle_buffer *buffer, unsigned i); + + int + pgp_put_mpi(struct nettle_buffer *buffer, const mpz_t x); + + int + pgp_put_string(struct nettle_buffer *buffer, + unsigned length, const uint8_t * s); + + int + pgp_put_length(struct nettle_buffer *buffer, unsigned length); + + int + pgp_put_header(struct nettle_buffer *buffer, + unsigned tag, unsigned length); + + void + pgp_put_header_length(struct nettle_buffer *buffer, + /* start of the header */ + unsigned start, unsigned field_size); + + unsigned + pgp_sub_packet_start(struct nettle_buffer *buffer); + + int + pgp_put_sub_packet(struct nettle_buffer *buffer, + unsigned type, + unsigned length, const uint8_t * data); + + void + pgp_sub_packet_end(struct nettle_buffer *buffer, unsigned start); + + int + pgp_put_public_rsa_key(struct nettle_buffer *, + const struct rsa_public_key *key, + time_t timestamp); + + int + pgp_put_rsa_sha1_signature(struct nettle_buffer *buffer, + const struct rsa_private_key *key, + const uint8_t * keyid, + unsigned type, struct sha1_ctx *hash); + + int + pgp_put_userid(struct nettle_buffer *buffer, + unsigned length, const uint8_t * name); + + uint32_t pgp_crc24(unsigned length, const uint8_t * data); + + int + pgp_armor(struct nettle_buffer *buffer, + const char *tag, unsigned length, const uint8_t * data); + +/* Values that can be passed to pgp_put_header when the size of the + * length field, but not the length itself, is known. Also the minimum length + * for the given field size. */ + enum pgp_lengths { + PGP_LENGTH_ONE_OCTET = 0, + PGP_LENGTH_TWO_OCTETS = 192, + PGP_LENGTH_FOUR_OCTETS = 8384, + }; + + enum pgp_public_key_algorithm { + PGP_RSA = 1, + PGP_RSA_ENCRYPT = 2, + PGP_RSA_SIGN = 3, + PGP_EL_GAMAL_ENCRYPT = 16, + PGP_DSA = 17, + PGP_EL_GAMAL = 20, + }; + + enum pgp_symmetric_algorithm { + PGP_PLAINTEXT = 0, + PGP_IDEA = 1, + PGP_3DES = 2, + PGP_CAST5 = 3, + PGP_BLOWFISH = 4, + PGP_SAFER_SK = 5, + PGP_AES128 = 7, + PGP_AES192 = 8, + PGP_AES256 = 9, + }; + + enum pgp_compression_algorithm { + PGP_UNCOMPRESSED = 0, + PGP_ZIP = 1, + PGP_ZLIB = 2, + }; + + enum pgp_hash_algorithm { + PGP_MD5 = 1, + PGP_SHA1 = 2, + PGP_RIPEMD = 3, + PGP_MD2 = 5, + PGP_TIGER192 = 6, + PGP_HAVAL = 7, + }; + + enum pgp_tag { + PGP_TAG_PUBLIC_SESSION_KEY = 1, + PGP_TAG_SIGNATURE = 2, + PGP_TAG_SYMMETRIC_SESSION_KEY = 3, + PGP_TAG_ONE_PASS_SIGNATURE = 4, + PGP_TAG_SECRET_KEY = 5, + PGP_TAG_PUBLIC_KEY = 6, + PGP_TAG_SECRET_SUBKEY = 7, + PGP_TAG_COMPRESSED = 8, + PGP_TAG_ENCRYPTED = 9, + PGP_TAG_MARKER = 10, + PGP_TAG_LITERAL = 11, + PGP_TAG_TRUST = 12, + PGP_TAG_USERID = 13, + PGP_TAG_PUBLIC_SUBKEY = 14, + }; + + enum pgp_signature_type { + PGP_SIGN_BINARY = 0, + PGP_SIGN_TEXT = 1, + PGP_SIGN_STANDALONE = 2, + PGP_SIGN_CERTIFICATION = 0x10, + PGP_SIGN_CERTIFICATION_PERSONA = 0x11, + PGP_SIGN_CERTIFICATION_CASUAL = 0x12, + PGP_SIGN_CERTIFICATION_POSITIVE = 0x13, + PGP_SIGN_SUBKEY = 0x18, + PGP_SIGN_KEY = 0x1f, + PGP_SIGN_REVOCATION = 0x20, + PGP_SIGN_REVOCATION_SUBKEY = 0x28, + PGP_SIGN_REVOCATION_CERTIFICATE = 0x30, + PGP_SIGN_TIMESTAMP = 0x40, + }; + + enum pgp_subpacket_tag { + PGP_SUBPACKET_CREATION_TIME = 2, + PGP_SUBPACKET_SIGNATURE_EXPIRATION_TIME = 3, + PGP_SUBPACKET_EXPORTABLE_CERTIFICATION = 4, + PGP_SUBPACKET_TRUST_SIGNATURE = 5, + PGP_SUBPACKET_REGULAR_EXPRESSION = 6, + PGP_SUBPACKET_REVOCABLE = 7, + PGP_SUBPACKET_KEY_EXPIRATION_TIME = 9, + PGP_SUBPACKET_PLACEHOLDER = 10, + PGP_SUBPACKET_PREFERRED_SYMMETRIC_ALGORITHMS = 11, + PGP_SUBPACKET_REVOCATION_KEY = 12, + PGP_SUBPACKET_ISSUER_KEY_ID = 16, + PGP_SUBPACKET_NOTATION_DATA = 20, + PGP_SUBPACKET_PREFERRED_HASH_ALGORITHMS = 21, + PGP_SUBPACKET_PREFERRED_COMPRESSION_ALGORITHMS = 22, + PGP_SUBPACKET_KEY_SERVER_PREFERENCES = 23, + PGP_SUBPACKET_PREFERRED_KEY_SERVER = 24, + PGP_SUBPACKET_PRIMARY_USER_ID = 25, + PGP_SUBPACKET_POLICY_URL = 26, + PGP_SUBPACKET_KEY_FLAGS = 27, + PGP_SUBPACKET_SIGNERS_USER_ID = 28, + PGP_SUBPACKET_REASON_FOR_REVOCATION = 29, + }; + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_PGP_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/pkcs1.h b/include/reactos/libs/gnutls/nettle/pkcs1.h new file mode 100644 index 00000000000..ebbcf6f39ff --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/pkcs1.h @@ -0,0 +1,111 @@ +/* pkcs1.h + * + * PKCS1 embedding. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2003 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_PKCS1_H_INCLUDED +#define NETTLE_PKCS1_H_INCLUDED + +#include +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define _pkcs1_signature_prefix _nettle_pkcs1_signature_prefix +#define pkcs1_rsa_digest_encode nettle_pkcs1_rsa_digest_encode +#define pkcs1_rsa_md5_encode nettle_pkcs1_rsa_md5_encode +#define pkcs1_rsa_md5_encode_digest nettle_pkcs1_rsa_md5_encode_digest +#define pkcs1_rsa_sha1_encode nettle_pkcs1_rsa_sha1_encode +#define pkcs1_rsa_sha1_encode_digest nettle_pkcs1_rsa_sha1_encode_digest +#define pkcs1_rsa_sha256_encode nettle_pkcs1_rsa_sha256_encode +#define pkcs1_rsa_sha256_encode_digest nettle_pkcs1_rsa_sha256_encode_digest +#define pkcs1_rsa_sha512_encode nettle_pkcs1_rsa_sha512_encode +#define pkcs1_rsa_sha512_encode_digest nettle_pkcs1_rsa_sha512_encode_digest +#define pkcs1_encrypt nettle_pkcs1_encrypt +#define pkcs1_decrypt nettle_pkcs1_decrypt + + struct md5_ctx; + struct sha1_ctx; + struct sha256_ctx; + struct sha512_ctx; + + uint8_t *_pkcs1_signature_prefix(unsigned key_size, + uint8_t * buffer, + unsigned id_size, + const uint8_t * id, + unsigned digest_size); + + int + pkcs1_encrypt(unsigned key_size, + /* For padding */ + void *random_ctx, nettle_random_func * random, + unsigned length, const uint8_t * message, mpz_t m); + + int + pkcs1_decrypt(unsigned key_size, + const mpz_t m, unsigned *length, uint8_t * message); + + int + pkcs1_rsa_digest_encode(mpz_t m, unsigned key_size, + unsigned di_length, + const uint8_t * digest_info); + + int + pkcs1_rsa_md5_encode(mpz_t m, unsigned length, + struct md5_ctx *hash); + + int + pkcs1_rsa_md5_encode_digest(mpz_t m, unsigned length, + const uint8_t * digest); + + int + pkcs1_rsa_sha1_encode(mpz_t m, unsigned length, + struct sha1_ctx *hash); + + int + pkcs1_rsa_sha1_encode_digest(mpz_t m, unsigned length, + const uint8_t * digest); + + int + pkcs1_rsa_sha256_encode(mpz_t m, unsigned length, + struct sha256_ctx *hash); + + int + pkcs1_rsa_sha256_encode_digest(mpz_t m, unsigned length, + const uint8_t * digest); + + int + pkcs1_rsa_sha512_encode(mpz_t m, unsigned length, + struct sha512_ctx *hash); + + int + pkcs1_rsa_sha512_encode_digest(mpz_t m, unsigned length, + const uint8_t * digest); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_PKCS1_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/realloc.h b/include/reactos/libs/gnutls/nettle/realloc.h new file mode 100644 index 00000000000..3a3e18d956a --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/realloc.h @@ -0,0 +1,40 @@ +/* realloc.h + * + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_REALLOC_H_INCLUDED +#define NETTLE_REALLOC_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + + nettle_realloc_func nettle_realloc; + nettle_realloc_func nettle_xrealloc; + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_REALLOC_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/ripemd160.h b/include/reactos/libs/gnutls/nettle/ripemd160.h new file mode 100644 index 00000000000..64ebe8bc050 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/ripemd160.h @@ -0,0 +1,75 @@ +/* ripemd160.h + * + * RIPEMD-160 hash function. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2011 Andres Mejia + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_RIPEMD160_H_INCLUDED +#define NETTLE_RIPEMD160_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#include "nettle-types.h" + +/* Name mangling */ +#define ripemd160_init nettle_ripemd160_init +#define ripemd160_update nettle_ripemd160_update +#define ripemd160_digest nettle_ripemd160_digest + +/* RIPEMD160 */ + +#define RIPEMD160_DIGEST_SIZE 20 +#define RIPEMD160_DATA_SIZE 64 + +/* Digest is kept internally as 5 32-bit words. */ +#define _RIPEMD160_DIGEST_LENGTH 5 + + struct ripemd160_ctx { + uint32_t state[_RIPEMD160_DIGEST_LENGTH]; + uint32_t count_low, count_high; /* 64-bit block count */ + uint8_t block[RIPEMD160_DATA_SIZE]; + unsigned int index; + }; + + void + ripemd160_init(struct ripemd160_ctx *ctx); + + void + ripemd160_update(struct ripemd160_ctx *ctx, + unsigned length, const uint8_t * data); + + void + ripemd160_digest(struct ripemd160_ctx *ctx, + unsigned length, uint8_t * digest); + +/* Internal compression function. STATE points to 5 uint32_t words, + and DATA points to 64 bytes of input data, possibly unaligned. */ + void + _nettle_ripemd160_compress(uint32_t * state, + const uint8_t * data); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_RIPEMD160_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/rsa-compat.h b/include/reactos/libs/gnutls/nettle/rsa-compat.h new file mode 100644 index 00000000000..f2e8ce642ca --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/rsa-compat.h @@ -0,0 +1,121 @@ +/* rsa-compat.h + * + * The RSA publickey algorithm, RSAREF compatible interface. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_RSA_COMPAT_H_INCLUDED +#define NETTLE_RSA_COMPAT_H_INCLUDED + +#include "rsa.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define R_SignInit nettle_R_SignInit +#define R_SignUpdate nettle_R_SignUpdate +#define R_SignFinal nettle_R_SignFinal +#define R_VerifyInit nettle_R_VerifyInit +#define R_VerifyUpdate nettle_R_VerifyUpdate +#define R_VerifyFinal nettle_R_VerifyFinal + +/* 256 octets or 2048 bits */ +#define MAX_RSA_MODULUS_LEN 256 + + typedef struct { + unsigned bits; + uint8_t modulus[MAX_RSA_MODULUS_LEN]; + uint8_t exponent[MAX_RSA_MODULUS_LEN]; + } R_RSA_PUBLIC_KEY; + + typedef struct { + unsigned bits; + uint8_t modulus[MAX_RSA_MODULUS_LEN]; + uint8_t publicExponent[MAX_RSA_MODULUS_LEN]; + uint8_t exponent[MAX_RSA_MODULUS_LEN]; + uint8_t prime[2][MAX_RSA_MODULUS_LEN]; + uint8_t primeExponent[2][MAX_RSA_MODULUS_LEN]; + uint8_t coefficient[MAX_RSA_MODULUS_LEN]; + } R_RSA_PRIVATE_KEY; + +/* Only MD5 is supported for now */ + typedef struct { + struct md5_ctx hash; + } R_SIGNATURE_CTX; + +/* Digest algorithms */ +/* DA_MD2 not implemented */ + enum { DA_MD5 = 1 }; + +/* Return values */ + enum { + RE_SUCCESS = 0, + RE_CONTENT_ENCODING, /* encryptedContent has RFC 1421 encoding error */ + RE_DATA, /* other party's private value out of range */ + RE_DIGEST_ALGORITHM, /* message-digest algorithm is invalid */ + RE_ENCODING, /* encoded block has RFC 1421 encoding error */ + RE_ENCRYPTION_ALGORITHM, /* encryption algorithm is invalid */ + RE_KEY, /* recovered data encryption key cannot decrypt */ + RE_KEY_ENCODING, /* encrypted key has RFC 1421 encoding error */ + RE_LEN, /* signatureLen out of range */ + RE_MODULUS_LEN, /* modulus length invalid */ + RE_NEED_RANDOM, /* random structure is not seeded */ + RE_PRIVATE_KEY, /* private key cannot encrypt message digest, */ + RE_PUBLIC_KEY, /* publicKey cannot decrypt signature */ + RE_SIGNATURE, /* signature is incorrect */ + RE_SIGNATURE_ENCODING, /* encodedSignature has RFC 1421 encoding error */ + }; + + int + R_SignInit(R_SIGNATURE_CTX * ctx, int digestAlgorithm); + + int + R_SignUpdate(R_SIGNATURE_CTX * ctx, const uint8_t * data, + /* Length is an unsigned char according to rsaref.txt, + * but that must be a typo. */ + unsigned length); + + int + R_SignFinal(R_SIGNATURE_CTX * ctx, + uint8_t * signature, + unsigned *length, R_RSA_PRIVATE_KEY * key); + + int + R_VerifyInit(R_SIGNATURE_CTX * ctx, int digestAlgorithm); + + int + R_VerifyUpdate(R_SIGNATURE_CTX * ctx, const uint8_t * data, + /* Length is an unsigned char according to rsaref.txt, + * but that must be a typo. */ + unsigned length); + + int + R_VerifyFinal(R_SIGNATURE_CTX * ctx, + uint8_t * signature, + unsigned length, R_RSA_PUBLIC_KEY * key); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_RSA_COMPAT_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/rsa.h b/include/reactos/libs/gnutls/nettle/rsa.h new file mode 100644 index 00000000000..85565709ae3 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/rsa.h @@ -0,0 +1,403 @@ +/* rsa.h + * + * The RSA publickey algorithm. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_RSA_H_INCLUDED +#define NETTLE_RSA_H_INCLUDED + +#include +#include "nettle-types.h" + +#include "md5.h" +#include "sha1.h" +#include "sha2.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define rsa_public_key_init nettle_rsa_public_key_init +#define rsa_public_key_clear nettle_rsa_public_key_clear +#define rsa_public_key_prepare nettle_rsa_public_key_prepare +#define rsa_private_key_init nettle_rsa_private_key_init +#define rsa_private_key_clear nettle_rsa_private_key_clear +#define rsa_private_key_prepare nettle_rsa_private_key_prepare +#define rsa_pkcs1_verify nettle_rsa_pkcs1_verify +#define rsa_pkcs1_sign nettle_rsa_pkcs1_sign +#define rsa_pkcs1_sign_tr nettle_rsa_pkcs1_sign_tr +#define rsa_md5_sign nettle_rsa_md5_sign +#define rsa_md5_verify nettle_rsa_md5_verify +#define rsa_sha1_sign nettle_rsa_sha1_sign +#define rsa_sha1_verify nettle_rsa_sha1_verify +#define rsa_sha256_sign nettle_rsa_sha256_sign +#define rsa_sha256_verify nettle_rsa_sha256_verify +#define rsa_sha512_sign nettle_rsa_sha512_sign +#define rsa_sha512_verify nettle_rsa_sha512_verify +#define rsa_md5_sign_digest nettle_rsa_md5_sign_digest +#define rsa_md5_verify_digest nettle_rsa_md5_verify_digest +#define rsa_sha1_sign_digest nettle_rsa_sha1_sign_digest +#define rsa_sha1_verify_digest nettle_rsa_sha1_verify_digest +#define rsa_sha256_sign_digest nettle_rsa_sha256_sign_digest +#define rsa_sha256_verify_digest nettle_rsa_sha256_verify_digest +#define rsa_sha512_sign_digest nettle_rsa_sha512_sign_digest +#define rsa_sha512_verify_digest nettle_rsa_sha512_verify_digest +#define rsa_encrypt nettle_rsa_encrypt +#define rsa_decrypt nettle_rsa_decrypt +#define rsa_decrypt_tr nettle_rsa_decrypt_tr +#define rsa_compute_root nettle_rsa_compute_root +#define rsa_generate_keypair nettle_rsa_generate_keypair +#define rsa_keypair_to_sexp nettle_rsa_keypair_to_sexp +#define rsa_keypair_from_sexp_alist nettle_rsa_keypair_from_sexp_alist +#define rsa_keypair_from_sexp nettle_rsa_keypair_from_sexp +#define rsa_public_key_from_der_iterator nettle_rsa_public_key_from_der_iterator +#define rsa_private_key_from_der_iterator nettle_rsa_private_key_from_der_iterator +#define rsa_keypair_from_der nettle_rsa_keypair_from_der +#define rsa_keypair_to_openpgp nettle_rsa_keypair_to_openpgp +#define _rsa_verify _nettle_rsa_verify +#define _rsa_check_size _nettle_rsa_check_size +#define _rsa_blind _nettle_rsa_blind +#define _rsa_unblind _nettle_rsa_unblind + +/* This limit is somewhat arbitrary. Technically, the smallest modulo + which makes sense at all is 15 = 3*5, phi(15) = 8, size 4 bits. But + for ridiculously small keys, not all odd e are possible (e.g., for + 5 bits, the only possible modulo is 3*7 = 21, phi(21) = 12, and e = + 3 don't work). The smallest size that makes sense with pkcs#1, and + which allows RSA encryption of one byte messages, is 12 octets, 89 + bits. */ + +#define RSA_MINIMUM_N_OCTETS 12 +#define RSA_MINIMUM_N_BITS (8*RSA_MINIMUM_N_OCTETS - 7) + + struct rsa_public_key { + /* Size of the modulo, in octets. This is also the size of all + * signatures that are created or verified with this key. */ + unsigned size; + + /* Modulo */ + mpz_t n; + + /* Public exponent */ + mpz_t e; + }; + + struct rsa_private_key { + unsigned size; + + /* d is filled in by the key generation function; otherwise it's + * completely unused. */ + mpz_t d; + + /* The two factors */ + mpz_t p; + mpz_t q; + + /* d % (p-1), i.e. a e = 1 (mod (p-1)) */ + mpz_t a; + + /* d % (q-1), i.e. b e = 1 (mod (q-1)) */ + mpz_t b; + + /* modular inverse of q , i.e. c q = 1 (mod p) */ + mpz_t c; + }; + +/* Signing a message works as follows: + * + * Store the private key in a rsa_private_key struct. + * + * Call rsa_private_key_prepare. This initializes the size attribute + * to the length of a signature. + * + * Initialize a hashing context, by callling + * md5_init + * + * Hash the message by calling + * md5_update + * + * Create the signature by calling + * rsa_md5_sign + * + * The signature is represented as a mpz_t bignum. This call also + * resets the hashing context. + * + * When done with the key and signature, don't forget to call + * mpz_clear. + */ + +/* Calls mpz_init to initialize bignum storage. */ + void + rsa_public_key_init(struct rsa_public_key *key); + +/* Calls mpz_clear to deallocate bignum storage. */ + void + rsa_public_key_clear(struct rsa_public_key *key); + + int + rsa_public_key_prepare(struct rsa_public_key *key); + +/* Calls mpz_init to initialize bignum storage. */ + void + rsa_private_key_init(struct rsa_private_key *key); + +/* Calls mpz_clear to deallocate bignum storage. */ + void + rsa_private_key_clear(struct rsa_private_key *key); + + int + rsa_private_key_prepare(struct rsa_private_key *key); + + +/* PKCS#1 style signatures */ + int + rsa_pkcs1_sign(const struct rsa_private_key *key, + unsigned length, const uint8_t * digest_info, + mpz_t s); + + int + rsa_pkcs1_sign_tr(const struct rsa_public_key *pub, + const struct rsa_private_key *key, + void *random_ctx, nettle_random_func * random, + unsigned length, const uint8_t * digest_info, + mpz_t s); + int + rsa_pkcs1_verify(const struct rsa_public_key *key, + unsigned length, const uint8_t * digest_info, + const mpz_t signature); + + int + rsa_md5_sign(const struct rsa_private_key *key, + struct md5_ctx *hash, mpz_t signature); + + + int + rsa_md5_verify(const struct rsa_public_key *key, + struct md5_ctx *hash, const mpz_t signature); + + int + rsa_sha1_sign(const struct rsa_private_key *key, + struct sha1_ctx *hash, mpz_t signature); + + int + rsa_sha1_verify(const struct rsa_public_key *key, + struct sha1_ctx *hash, const mpz_t signature); + + int + rsa_sha256_sign(const struct rsa_private_key *key, + struct sha256_ctx *hash, mpz_t signature); + + int + rsa_sha256_verify(const struct rsa_public_key *key, + struct sha256_ctx *hash, const mpz_t signature); + + int + rsa_sha512_sign(const struct rsa_private_key *key, + struct sha512_ctx *hash, mpz_t signature); + + int + rsa_sha512_verify(const struct rsa_public_key *key, + struct sha512_ctx *hash, const mpz_t signature); + +/* Variants taking the digest as argument. */ + int + rsa_md5_sign_digest(const struct rsa_private_key *key, + const uint8_t * digest, mpz_t s); + + int + rsa_md5_verify_digest(const struct rsa_public_key *key, + const uint8_t * digest, + const mpz_t signature); + + int + rsa_sha1_sign_digest(const struct rsa_private_key *key, + const uint8_t * digest, mpz_t s); + + int + rsa_sha1_verify_digest(const struct rsa_public_key *key, + const uint8_t * digest, + const mpz_t signature); + + int + rsa_sha256_sign_digest(const struct rsa_private_key *key, + const uint8_t * digest, mpz_t s); + + int + rsa_sha256_verify_digest(const struct rsa_public_key *key, + const uint8_t * digest, + const mpz_t signature); + + int + rsa_sha512_sign_digest(const struct rsa_private_key *key, + const uint8_t * digest, mpz_t s); + + int + rsa_sha512_verify_digest(const struct rsa_public_key *key, + const uint8_t * digest, + const mpz_t signature); + + +/* RSA encryption, using PKCS#1 */ +/* These functions uses the v1.5 padding. What should the v2 (OAEP) + * functions be called? */ + +/* Returns 1 on success, 0 on failure, which happens if the + * message is too long for the key. */ + int + rsa_encrypt(const struct rsa_public_key *key, + /* For padding */ + void *random_ctx, nettle_random_func * random, + unsigned length, const uint8_t * cleartext, + mpz_t cipher); + +/* Message must point to a buffer of size *LENGTH. KEY->size is enough + * for all valid messages. On success, *LENGTH is updated to reflect + * the actual length of the message. Returns 1 on success, 0 on + * failure, which happens if decryption failed or if the message + * didn't fit. */ + int + rsa_decrypt(const struct rsa_private_key *key, + unsigned *length, uint8_t * cleartext, + const mpz_t ciphertext); + +/* Timing-resistant version, using randomized RSA blinding. */ + int + rsa_decrypt_tr(const struct rsa_public_key *pub, + const struct rsa_private_key *key, + void *random_ctx, nettle_random_func * random, + unsigned *length, uint8_t * message, + const mpz_t gibberish); + +/* Compute x, the e:th root of m. Calling it with x == m is allowed. */ + void + rsa_compute_root(const struct rsa_private_key *key, + mpz_t x, const mpz_t m); + + +/* Key generation */ + +/* Note that the key structs must be initialized first. */ + int + rsa_generate_keypair(struct rsa_public_key *pub, + struct rsa_private_key *key, + void *random_ctx, + nettle_random_func * random, + void *progress_ctx, + nettle_progress_func * progress, + /* Desired size of modulo, in bits */ + unsigned n_size, + /* Desired size of public exponent, in bits. If + * zero, the passed in value pub->e is used. */ + unsigned e_size); + + +#define RSA_SIGN(key, algorithm, ctx, length, data, signature) ( \ + algorithm##_update(ctx, length, data), \ + rsa_##algorithm##_sign(key, ctx, signature) \ +) + +#define RSA_VERIFY(key, algorithm, ctx, length, data, signature) ( \ + algorithm##_update(ctx, length, data), \ + rsa_##algorithm##_verify(key, ctx, signature) \ +) + + +/* Keys in sexp form. */ + + struct nettle_buffer; + +/* Generates a public-key expression if PRIV is NULL .*/ + int + rsa_keypair_to_sexp(struct nettle_buffer *buffer, const char *algorithm_name, /* NULL means "rsa" */ + const struct rsa_public_key *pub, + const struct rsa_private_key *priv); + + struct sexp_iterator; + + int + rsa_keypair_from_sexp_alist(struct rsa_public_key *pub, + struct rsa_private_key *priv, + unsigned limit, + struct sexp_iterator *i); + +/* If PRIV is NULL, expect a public-key expression. If PUB is NULL, + * expect a private key expression and ignore the parts not needed for + * the public key. */ +/* Keys must be initialized before calling this function, as usual. */ + int + rsa_keypair_from_sexp(struct rsa_public_key *pub, + struct rsa_private_key *priv, + unsigned limit, + unsigned length, const uint8_t * expr); + + +/* Keys in PKCS#1 format. */ + struct asn1_der_iterator; + + int + rsa_public_key_from_der_iterator(struct rsa_public_key *pub, + unsigned limit, + struct asn1_der_iterator *i); + + int + rsa_private_key_from_der_iterator(struct rsa_public_key *pub, + struct rsa_private_key *priv, + unsigned limit, + struct asn1_der_iterator *i); + +/* For public keys, use PRIV == NULL */ + int + rsa_keypair_from_der(struct rsa_public_key *pub, + struct rsa_private_key *priv, + unsigned limit, + unsigned length, const uint8_t * data); + +/* OpenPGP format. Experimental interface, subject to change. */ + int + rsa_keypair_to_openpgp(struct nettle_buffer *buffer, + const struct rsa_public_key *pub, + const struct rsa_private_key *priv, + /* A single user id. NUL-terminated utf8. */ + const char *userid); + +/* Internal functions. */ + int + _rsa_verify(const struct rsa_public_key *key, + const mpz_t m, const mpz_t s); + + unsigned + _rsa_check_size(mpz_t n); + + void + _rsa_blind(const struct rsa_public_key *pub, + void *random_ctx, nettle_random_func * random, + mpz_t c, mpz_t ri); + void + _rsa_unblind(const struct rsa_public_key *pub, mpz_t c, + const mpz_t ri); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_RSA_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/salsa20.h b/include/reactos/libs/gnutls/nettle/salsa20.h new file mode 100644 index 00000000000..1e9688fce0b --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/salsa20.h @@ -0,0 +1,92 @@ +/* salsa20.h + * + * The Salsa20 stream cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2012 Simon Josefsson + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SALSA20_H_INCLUDED +#define NETTLE_SALSA20_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define salsa20_set_key nettle_salsa20_set_key +#define salsa20_set_iv nettle_salsa20_set_iv +#define salsa20_crypt nettle_salsa20_crypt +#define _salsa20_core _nettle_salsa20_core + +#define salsa20r12_crypt nettle_salsa20r12_crypt + +/* Minimum and maximum keysizes, and a reasonable default. In + * octets.*/ +#define SALSA20_MIN_KEY_SIZE 16 +#define SALSA20_MAX_KEY_SIZE 32 +#define SALSA20_KEY_SIZE 32 +#define SALSA20_BLOCK_SIZE 64 + +#define SALSA20_IV_SIZE 8 + +#define _SALSA20_INPUT_LENGTH 16 + + struct salsa20_ctx { + /* Indices 1-4 and 11-14 holds the key (two identical copies for the + shorter key size), indices 0, 5, 10, 15 are constant, indices 6, 7 + are the IV, and indices 8, 9 are the block counter: + + C K K K + K C I I + B B C K + K K K C + */ + uint32_t input[_SALSA20_INPUT_LENGTH]; + }; + + void + salsa20_set_key(struct salsa20_ctx *ctx, + unsigned length, const uint8_t * key); + + void + salsa20_set_iv(struct salsa20_ctx *ctx, const uint8_t * iv); + + void + salsa20_crypt(struct salsa20_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + + void + salsa20r12_crypt(struct salsa20_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + + void + _salsa20_core(uint32_t * dst, const uint32_t * src, + unsigned rounds); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SALSA20_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/serpent.h b/include/reactos/libs/gnutls/nettle/serpent.h new file mode 100644 index 00000000000..d87dda66c73 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/serpent.h @@ -0,0 +1,79 @@ +/* serpent.h + * + * The serpent block cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Serpent is a 128-bit block cipher that accepts a key size of 256 + * bits, designed by Ross Anderson, Eli Biham, and Lars Knudsen. See + * http://www.cl.cam.ac.uk/~rja14/serpent.html for details. + */ + +#ifndef NETTLE_SERPENT_H_INCLUDED +#define NETTLE_SERPENT_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define serpent_set_key nettle_serpent_set_key +#define serpent_encrypt nettle_serpent_encrypt +#define serpent_decrypt nettle_serpent_decrypt + +#define SERPENT_BLOCK_SIZE 16 + +/* Other key lengths are possible, but the design of Serpent makes + * smaller key lengths quite pointless; they cheated with the AES + * requirements, using a 256-bit key length exclusively and just + * padding it out if the desired key length was less, so there really + * is no advantage to using key lengths less than 256 bits. */ +#define SERPENT_KEY_SIZE 32 + +/* Allow keys of size 128 <= bits <= 256 */ + +#define SERPENT_MIN_KEY_SIZE 16 +#define SERPENT_MAX_KEY_SIZE 32 + + struct serpent_ctx { + uint32_t keys[33][4]; /* key schedule */ + }; + + void + serpent_set_key(struct serpent_ctx *ctx, + unsigned length, const uint8_t * key); + + void + serpent_encrypt(const struct serpent_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + void + serpent_decrypt(const struct serpent_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SERPENT_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/sexp.h b/include/reactos/libs/gnutls/nettle/sexp.h new file mode 100644 index 00000000000..6c7dfd85d23 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/sexp.h @@ -0,0 +1,209 @@ +/* sexp.h + * + * Parsing s-expressions. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2002 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SEXP_H_INCLUDED +#define NETTLE_SEXP_H_INCLUDED + +#include +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define sexp_iterator_first nettle_sexp_iterator_first +#define sexp_transport_iterator_first nettle_sexp_transport_iterator_first +#define sexp_iterator_next nettle_sexp_iterator_next +#define sexp_iterator_enter_list nettle_sexp_iterator_enter_list +#define sexp_iterator_exit_list nettle_sexp_iterator_exit_list +#define sexp_iterator_subexpr nettle_sexp_iterator_subexpr +#define sexp_iterator_get_uint32 nettle_sexp_iterator_get_uint32 +#define sexp_iterator_check_type nettle_sexp_iterator_check_type +#define sexp_iterator_check_types nettle_sexp_iterator_check_types +#define sexp_iterator_assoc nettle_sexp_iterator_assoc +#define sexp_format nettle_sexp_format +#define sexp_vformat nettle_sexp_vformat +#define sexp_transport_format nettle_sexp_transport_format +#define sexp_transport_vformat nettle_sexp_transport_vformat +#define sexp_token_chars nettle_sexp_token_chars + + enum sexp_type { SEXP_ATOM, SEXP_LIST, SEXP_END }; + + struct sexp_iterator { + unsigned length; + const uint8_t *buffer; + + /* Points at the start of the current sub expression. */ + unsigned start; + /* If type is SEXP_LIST, pos points at the start of the current + * element. Otherwise, it points at the end. */ + unsigned pos; + unsigned level; + + enum sexp_type type; + + unsigned display_length; + const uint8_t *display; + + unsigned atom_length; + const uint8_t *atom; + }; + + +/* All these functions return 1 on success, 0 on failure */ + +/* Initializes the iterator. */ + int + sexp_iterator_first(struct sexp_iterator *iterator, + unsigned length, const uint8_t * input); + +/* NOTE: Decodes the input string in place */ + int + sexp_transport_iterator_first(struct sexp_iterator *iterator, + unsigned length, uint8_t * input); + + int + sexp_iterator_next(struct sexp_iterator *iterator); + +/* Current element must be a list. */ + int + sexp_iterator_enter_list(struct sexp_iterator *iterator); + +/* Skips the rest of the current list */ + int + sexp_iterator_exit_list(struct sexp_iterator *iterator); + +#if 0 +/* Skips out of as many lists as necessary to get back to the given + * level. */ + int + sexp_iterator_exit_lists(struct sexp_iterator *iterator, + unsigned level); +#endif + +/* Gets start and length of the current subexpression. Implies + * sexp_iterator_next. */ + const uint8_t *sexp_iterator_subexpr(struct sexp_iterator + *iterator, unsigned *length); + + int + sexp_iterator_get_uint32(struct sexp_iterator *iterator, + uint32_t * x); + + +/* Checks the type of the current expression, which should be a list + * + * ( ...) + */ + int + sexp_iterator_check_type(struct sexp_iterator *iterator, + const uint8_t * type); + + const uint8_t *sexp_iterator_check_types(struct sexp_iterator + *iterator, + unsigned ntypes, + const uint8_t * + const *types); + +/* Current element must be a list. Looks up element of type + * + * (key rest...) + * + * For a matching key, the corresponding iterator is initialized + * pointing at the start of REST. + * + * On success, exits the current list. + */ + int + sexp_iterator_assoc(struct sexp_iterator *iterator, + unsigned nkeys, + const uint8_t * const *keys, + struct sexp_iterator *values); + + +/* Output functions. What is a reasonable API for this? It seems + * ugly to have to reimplement string streams. */ + +/* Declared for real in buffer.h */ + struct nettle_buffer; + +/* Returns the number of output characters, or 0 on out of memory. If + * buffer == NULL, just compute length. + * + * Format strings can contained matched parentheses, tokens ("foo" in + * the format string is formatted as "3:foo"), whitespace (which + * separates tokens but is otherwise ignored) and the following + * formatting specifiers: + * + * %s String represented as unsigned length, const uint8_t *data. + * + * %t Optional display type, represented as + * unsigned display_length, const uint8_t *display, + * display == NULL means no display type. + * + * %i Non-negative small integer, uint32_t. + * + * %b Non-negative bignum, mpz_t. + * + * %l Literal string (no length added), typically a balanced + * subexpression. Represented as unsigned length, const uint8_t + * *data. + * + * %(, %) Allows insertion of unbalanced parenthesis. + * + * Modifiers: + * + * %0 For %s, %t and %l, says that there's no length argument, + * instead the string is NUL-terminated, and there's only one + * const uint8_t * argument. + */ + + unsigned + sexp_format(struct nettle_buffer *buffer, + const char *format, ...); + + unsigned + sexp_vformat(struct nettle_buffer *buffer, + const char *format, va_list args); + + unsigned + sexp_transport_format(struct nettle_buffer *buffer, + const char *format, ...); + + unsigned + sexp_transport_vformat(struct nettle_buffer *buffer, + const char *format, va_list args); + +/* Classification for advanced syntax. */ + extern const char + sexp_token_chars[0x80]; + +#define TOKEN_CHAR(c) ((c) < 0x80 && sexp_token_chars[(c)]) + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SEXP_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/sha.h b/include/reactos/libs/gnutls/nettle/sha.h new file mode 100644 index 00000000000..e80ddc39a47 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/sha.h @@ -0,0 +1,34 @@ +/* sha.h + * + * This file is deprecated, and provided only for backwards + * compatibility with earlier versions of Nettle. Please use sha1.h + * and/or sha2.h instead. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SHA_H_INCLUDED +#define NETTLE_SHA_H_INCLUDED + +#include "sha1.h" +#include "sha2.h" + +#endif /* NETTLE_SHA_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/sha1.h b/include/reactos/libs/gnutls/nettle/sha1.h new file mode 100644 index 00000000000..37e1c681685 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/sha1.h @@ -0,0 +1,74 @@ +/* sha1.h + * + * The sha1 hash function. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2012 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SHA1_H_INCLUDED +#define NETTLE_SHA1_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define sha1_init nettle_sha1_init +#define sha1_update nettle_sha1_update +#define sha1_digest nettle_sha1_digest + +/* SHA1 */ + +#define SHA1_DIGEST_SIZE 20 +#define SHA1_DATA_SIZE 64 + +/* Digest is kept internally as 5 32-bit words. */ +#define _SHA1_DIGEST_LENGTH 5 + + struct sha1_ctx { + uint32_t state[_SHA1_DIGEST_LENGTH]; /* State variables */ + uint32_t count_low, count_high; /* 64-bit block count */ + uint8_t block[SHA1_DATA_SIZE]; /* SHA1 data buffer */ + unsigned int index; /* index into buffer */ + }; + + void + sha1_init(struct sha1_ctx *ctx); + + void + sha1_update(struct sha1_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha1_digest(struct sha1_ctx *ctx, + unsigned length, uint8_t * digest); + +/* Internal compression function. STATE points to 5 uint32_t words, + and DATA points to 64 bytes of input data, possibly unaligned. */ + void + _nettle_sha1_compress(uint32_t * state, const uint8_t * data); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SHA1_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/sha2.h b/include/reactos/libs/gnutls/nettle/sha2.h new file mode 100644 index 00000000000..bc840a8f049 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/sha2.h @@ -0,0 +1,149 @@ +/* sha2.h + * + * The sha2 family of hash functions. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001, 2012 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SHA2_H_INCLUDED +#define NETTLE_SHA2_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define sha224_init nettle_sha224_init +#define sha224_digest nettle_sha224_digest +#define sha256_init nettle_sha256_init +#define sha256_update nettle_sha256_update +#define sha256_digest nettle_sha256_digest +#define sha384_init nettle_sha384_init +#define sha384_digest nettle_sha384_digest +#define sha512_init nettle_sha512_init +#define sha512_update nettle_sha512_update +#define sha512_digest nettle_sha512_digest + +/* SHA256 */ + +#define SHA256_DIGEST_SIZE 32 +#define SHA256_DATA_SIZE 64 + +/* Digest is kept internally as 8 32-bit words. */ +#define _SHA256_DIGEST_LENGTH 8 + + struct sha256_ctx { + uint32_t state[_SHA256_DIGEST_LENGTH]; /* State variables */ + uint32_t count_low, count_high; /* 64-bit block count */ + uint8_t block[SHA256_DATA_SIZE]; /* SHA256 data buffer */ + unsigned int index; /* index into buffer */ + }; + + void + sha256_init(struct sha256_ctx *ctx); + + void + sha256_update(struct sha256_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha256_digest(struct sha256_ctx *ctx, + unsigned length, uint8_t * digest); + +/* Internal compression function. STATE points to 8 uint32_t words, + DATA points to 64 bytes of input data, possibly unaligned, and K + points to the table of constants. */ + void + _nettle_sha256_compress(uint32_t * state, const uint8_t * data, + const uint32_t * k); + + +/* SHA224, a truncated SHA256 with different initial state. */ + +#define SHA224_DIGEST_SIZE 28 +#define SHA224_DATA_SIZE SHA256_DATA_SIZE +#define sha224_ctx sha256_ctx + + void + sha224_init(struct sha256_ctx *ctx); + +#define sha224_update nettle_sha256_update + + void + sha224_digest(struct sha256_ctx *ctx, + unsigned length, uint8_t * digest); + + +/* SHA512 */ + +#define SHA512_DIGEST_SIZE 64 +#define SHA512_DATA_SIZE 128 + +/* Digest is kept internally as 8 64-bit words. */ +#define _SHA512_DIGEST_LENGTH 8 + + struct sha512_ctx { + uint64_t state[_SHA512_DIGEST_LENGTH]; /* State variables */ + uint64_t count_low, count_high; /* 128-bit block count */ + uint8_t block[SHA512_DATA_SIZE]; /* SHA512 data buffer */ + unsigned int index; /* index into buffer */ + }; + + void + sha512_init(struct sha512_ctx *ctx); + + void + sha512_update(struct sha512_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha512_digest(struct sha512_ctx *ctx, + unsigned length, uint8_t * digest); + +/* Internal compression function. STATE points to 8 uint64_t words, + DATA points to 128 bytes of input data, possibly unaligned, and K + points to the table of constants. */ + void + _nettle_sha512_compress(uint64_t * state, const uint8_t * data, + const uint64_t * k); + + +/* SHA384, a truncated SHA512 with different initial state. */ + +#define SHA384_DIGEST_SIZE 48 +#define SHA384_DATA_SIZE SHA512_DATA_SIZE +#define sha384_ctx sha512_ctx + + void + sha384_init(struct sha512_ctx *ctx); + +#define sha384_update nettle_sha512_update + + void + sha384_digest(struct sha512_ctx *ctx, + unsigned length, uint8_t * digest); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SHA2_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/sha3.h b/include/reactos/libs/gnutls/nettle/sha3.h new file mode 100644 index 00000000000..2c42f5e91e1 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/sha3.h @@ -0,0 +1,161 @@ +/* sha3.h + * + * The sha3 hash function (aka Keccak). + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2012 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_SHA3_H_INCLUDED +#define NETTLE_SHA3_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define sha3_permute nettle_sha3_permute +#define _sha3_update _nettle_sha3_update +#define _sha3_pad _nettle_sha3_pad +#define sha3_224_init nettle_sha3_224_init +#define sha3_224_update nettle_sha3_224_update +#define sha3_224_digest nettle_sha3_224_digest +#define sha3_256_init nettle_sha3_256_init +#define sha3_256_update nettle_sha3_256_update +#define sha3_256_digest nettle_sha3_256_digest +#define sha3_384_init nettle_sha3_384_init +#define sha3_384_update nettle_sha3_384_update +#define sha3_384_digest nettle_sha3_384_digest +#define sha3_512_init nettle_sha3_512_init +#define sha3_512_update nettle_sha3_512_update +#define sha3_512_digest nettle_sha3_512_digest + +/* The sha3 state is a 5x5 matrix of 64-bit words. In the notation of + Keccak description, S[x,y] is element x + 5*y, so if x is + interpreted as the row index and y the column index, it is stored + in column-major order. */ +#define SHA3_STATE_LENGTH 25 + +/* The "width" is 1600 bits or 200 octets */ + struct sha3_state { + uint64_t a[SHA3_STATE_LENGTH]; + }; + + void + sha3_permute(struct sha3_state *state); + + unsigned + _sha3_update(struct sha3_state *state, + unsigned block_size, uint8_t * block, + unsigned pos, unsigned length, const uint8_t * data); + void + _sha3_pad(struct sha3_state *state, + unsigned block_size, uint8_t * block, unsigned pos); + +/* The "capacity" is set to 2*(digest size), 512 bits or 64 octets. + The "rate" is the width - capacity, or width - 2 * (digest + size). */ + +#define SHA3_224_DIGEST_SIZE 28 +#define SHA3_224_DATA_SIZE 144 + +#define SHA3_256_DIGEST_SIZE 32 +#define SHA3_256_DATA_SIZE 136 + +#define SHA3_384_DIGEST_SIZE 48 +#define SHA3_384_DATA_SIZE 104 + +#define SHA3_512_DIGEST_SIZE 64 +#define SHA3_512_DATA_SIZE 72 + + + struct sha3_224_ctx { + struct sha3_state state; + unsigned index; + uint8_t block[SHA3_224_DATA_SIZE]; + }; + + void + sha3_224_init(struct sha3_224_ctx *ctx); + + void + sha3_224_update(struct sha3_224_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha3_224_digest(struct sha3_224_ctx *ctx, + unsigned length, uint8_t * digest); + + struct sha3_256_ctx { + struct sha3_state state; + unsigned index; + uint8_t block[SHA3_256_DATA_SIZE]; + }; + + void + sha3_256_init(struct sha3_256_ctx *ctx); + + void + sha3_256_update(struct sha3_256_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha3_256_digest(struct sha3_256_ctx *ctx, + unsigned length, uint8_t * digest); + + struct sha3_384_ctx { + struct sha3_state state; + unsigned index; + uint8_t block[SHA3_384_DATA_SIZE]; + }; + + void + sha3_384_init(struct sha3_384_ctx *ctx); + + void + sha3_384_update(struct sha3_384_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha3_384_digest(struct sha3_384_ctx *ctx, + unsigned length, uint8_t * digest); + + struct sha3_512_ctx { + struct sha3_state state; + unsigned index; + uint8_t block[SHA3_512_DATA_SIZE]; + }; + + void + sha3_512_init(struct sha3_512_ctx *ctx); + + void + sha3_512_update(struct sha3_512_ctx *ctx, + unsigned length, const uint8_t * data); + + void + sha3_512_digest(struct sha3_512_ctx *ctx, + unsigned length, uint8_t * digest); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_SHA3_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/twofish.h b/include/reactos/libs/gnutls/nettle/twofish.h new file mode 100644 index 00000000000..81c93e2588c --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/twofish.h @@ -0,0 +1,76 @@ +/* twofish.h + * + * The twofish block cipher. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* + * Twofish is a 128-bit block cipher that accepts a variable-length + * key up to 256 bits, designed by Bruce Schneier and others. See + * http://www.counterpane.com/twofish.html for details. + */ + +#ifndef NETTLE_TWOFISH_H_INCLUDED +#define NETTLE_TWOFISH_H_INCLUDED + +#include "nettle-types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define twofish_set_key nettle_twofish_set_key +#define twofish_encrypt nettle_twofish_encrypt +#define twofish_decrypt nettle_twofish_decrypt + +#define TWOFISH_BLOCK_SIZE 16 + +/* Variable key size between 128 and 256 bits. But the only valid + * values are 16 (128 bits), 24 (192 bits) and 32 (256 bits). */ +#define TWOFISH_MIN_KEY_SIZE 16 +#define TWOFISH_MAX_KEY_SIZE 32 + +#define TWOFISH_KEY_SIZE 32 + + struct twofish_ctx { + uint32_t keys[40]; + uint32_t s_box[4][256]; + }; + + void + twofish_set_key(struct twofish_ctx *ctx, + unsigned length, const uint8_t * key); + + void + twofish_encrypt(const struct twofish_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + void + twofish_decrypt(const struct twofish_ctx *ctx, + unsigned length, uint8_t * dst, + const uint8_t * src); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_TWOFISH_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/umac.h b/include/reactos/libs/gnutls/nettle/umac.h new file mode 100644 index 00000000000..d3e9130bdf2 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/umac.h @@ -0,0 +1,238 @@ +/* umac.h + * + * UMAC message authentication code (RFC-4418). + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2013 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_UMAC_H_INCLUDED +#define NETTLE_UMAC_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +/* Namespace mangling */ +#define umac32_set_key nettle_umac32_set_key +#define umac64_set_key nettle_umac64_set_key +#define umac96_set_key nettle_umac96_set_key +#define umac128_set_key nettle_umac128_set_key +#define umac32_set_nonce nettle_umac32_set_nonce +#define umac64_set_nonce nettle_umac64_set_nonce +#define umac96_set_nonce nettle_umac96_set_nonce +#define umac128_set_nonce nettle_umac128_set_nonce +#define umac32_update nettle_umac32_update +#define umac64_update nettle_umac64_update +#define umac96_update nettle_umac96_update +#define umac128_update nettle_umac128_update +#define umac32_digest nettle_umac32_digest +#define umac64_digest nettle_umac64_digest +#define umac96_digest nettle_umac96_digest +#define umac128_digest nettle_umac128_digest +#define _umac_set_key _nettle_umac_set_key +#define _umac_nh _nettle_umac_nh +#define _umac_nh_n _nettle_umac_nh_n +#define _umac_poly64 _nettle_umac_poly64 +#define _umac_poly128 _nettle_umac_poly128 +#define _umac_l2_init _nettle_umac_l2_init +#define _umac_l2 _nettle_umac_l2 +#define _umac_l2_final _nettle_umac_l2_final +#define _umac_l3_init _nettle_umac_l3_init +#define _umac_l3 _nettle_umac_l3 + +#include "nettle-types.h" +#include "aes.h" + +#define UMAC_KEY_SIZE 16 +#define UMAC32_DIGEST_SIZE 4 +#define UMAC64_DIGEST_SIZE 8 +#define UMAC96_DIGEST_SIZE 12 +#define UMAC128_DIGEST_SIZE 16 +#define UMAC_DATA_SIZE 1024 + +/* Subkeys and state for UMAC with tag size 32*n bits. */ +#define _UMAC_STATE(n) \ + uint32_t l1_key[UMAC_DATA_SIZE/4 + 4*((n)-1)]; \ + /* Keys in 32-bit pieces, high first */ \ + uint32_t l2_key[6*(n)]; \ + uint64_t l3_key1[8*(n)]; \ + uint32_t l3_key2[(n)]; \ + /* AES cipher for encrypting the nonce */ \ + struct aes_ctx pdf_key; \ + /* The l2_state consists of 2*n uint64_t, for poly64 \ + and poly128 hashing, followed by n additional \ + uint64_t used as an input buffer. */ \ + uint64_t l2_state[3*(n)]; \ + /* Input to the pdf_key, zero-padded and low bits \ + cleared if appropriate. */ \ + uint8_t nonce[AES_BLOCK_SIZE]; \ + unsigned short nonce_length /* For incrementing */ + + /* Buffering */ +#define _UMAC_BUFFER \ + unsigned index; \ + /* Complete blocks processed */ \ + uint64_t count; \ + uint8_t block[UMAC_DATA_SIZE] + +#define _UMAC_NONCE_CACHED 0x80 + + struct umac32_ctx { + _UMAC_STATE(1); + /* Low bits and cache flag. */ + unsigned short nonce_low; + /* Previous padding block */ + uint32_t pad_cache[AES_BLOCK_SIZE / 4]; + _UMAC_BUFFER; + }; + + struct umac64_ctx { + _UMAC_STATE(2); + /* Low bit and cache flag. */ + unsigned short nonce_low; + /* Previous padding block */ + uint32_t pad_cache[AES_BLOCK_SIZE / 4]; + _UMAC_BUFFER; + }; + + struct umac96_ctx { + _UMAC_STATE(3); + _UMAC_BUFFER; + }; + + struct umac128_ctx { + _UMAC_STATE(4); + _UMAC_BUFFER; + }; + +/* The _set_key function initialize the nonce to zero. */ + void + umac32_set_key(struct umac32_ctx *ctx, const uint8_t * key); + void + umac64_set_key(struct umac64_ctx *ctx, const uint8_t * key); + void + umac96_set_key(struct umac96_ctx *ctx, const uint8_t * key); + void + umac128_set_key(struct umac128_ctx *ctx, const uint8_t * key); + +/* Optional, if not used, messages get incrementing nonces starting from zero. */ + void + umac32_set_nonce(struct umac32_ctx *ctx, + unsigned nonce_length, const uint8_t * nonce); + void + umac64_set_nonce(struct umac64_ctx *ctx, + unsigned nonce_length, const uint8_t * nonce); + void + umac96_set_nonce(struct umac96_ctx *ctx, + unsigned nonce_length, const uint8_t * nonce); + void + umac128_set_nonce(struct umac128_ctx *ctx, + unsigned nonce_length, const uint8_t * nonce); + + void + umac32_update(struct umac32_ctx *ctx, + unsigned length, const uint8_t * data); + void + umac64_update(struct umac64_ctx *ctx, + unsigned length, const uint8_t * data); + void + umac96_update(struct umac96_ctx *ctx, + unsigned length, const uint8_t * data); + void + umac128_update(struct umac128_ctx *ctx, + unsigned length, const uint8_t * data); + +/* The _digest functions increment the nonce */ + void + umac32_digest(struct umac32_ctx *ctx, + unsigned length, uint8_t * digest); + void + umac64_digest(struct umac64_ctx *ctx, + unsigned length, uint8_t * digest); + void + umac96_digest(struct umac96_ctx *ctx, + unsigned length, uint8_t * digest); + void + umac128_digest(struct umac128_ctx *ctx, + unsigned length, uint8_t * digest); + + +/* Internal functions */ +#define UMAC_POLY64_BLOCKS 16384 + +#define UMAC_P64_OFFSET 59 +#define UMAC_P64 (- (uint64_t) UMAC_P64_OFFSET) + +#define UMAC_P128_OFFSET 159 +#define UMAC_P128_HI (~(uint64_t) 0) +#define UMAC_P128_LO (-(uint64_t) UMAC_P128_OFFSET) + + void + _umac_set_key(uint32_t * l1_key, uint32_t * l2_key, + uint64_t * l3_key1, uint32_t * l3_key2, + struct aes_ctx *pad, const uint8_t * key, + unsigned n); + + uint64_t + _umac_nh(const uint32_t * key, unsigned length, + const uint8_t * msg); + +/* Equivalent to + + for (i = 0; i < n; i++) + out[i] = _umac_nh (key + 4*i, length, msg); + + but processing input only once. +*/ + void + _umac_nh_n(uint64_t * out, unsigned n, const uint32_t * key, + unsigned length, const uint8_t * msg); + +/* Returns y*k + m (mod p), including "marker" processing. Return + value is *not* in canonical representation, and must be normalized + before the output is used. */ + uint64_t + _umac_poly64(uint32_t kh, uint32_t kl, uint64_t y, uint64_t m); + + void + _umac_poly128(const uint32_t * k, uint64_t * y, uint64_t mh, + uint64_t ml); + + void + _umac_l2_init(unsigned size, uint32_t * k); + + void + _umac_l2(const uint32_t * key, uint64_t * state, unsigned n, + uint64_t count, const uint64_t * m); + + void + _umac_l2_final(const uint32_t * key, uint64_t * state, unsigned n, + uint64_t count); + + void + _umac_l3_init(unsigned size, uint64_t * k); + + uint32_t _umac_l3(const uint64_t * key, const uint64_t * m); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_UMAC_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/nettle/yarrow.h b/include/reactos/libs/gnutls/nettle/yarrow.h new file mode 100644 index 00000000000..185db566b28 --- /dev/null +++ b/include/reactos/libs/gnutls/nettle/yarrow.h @@ -0,0 +1,132 @@ +/* yarrow.h + * + * The yarrow pseudo-randomness generator. + */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2001 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +#ifndef NETTLE_YARROW_H_INCLUDED +#define NETTLE_YARROW_H_INCLUDED + +#include "aes.h" +#include "sha2.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Name mangling */ +#define yarrow256_init nettle_yarrow256_init +#define yarrow256_seed nettle_yarrow256_seed +#define yarrow256_update nettle_yarrow256_update +#define yarrow256_random nettle_yarrow256_random +#define yarrow256_is_seeded nettle_yarrow256_is_seeded +#define yarrow256_needed_sources nettle_yarrow256_needed_sources +#define yarrow256_fast_reseed nettle_yarrow256_fast_reseed +#define yarrow256_slow_reseed nettle_yarrow256_slow_reseed +#define yarrow_key_event_init nettle_yarrow_key_event_init +#define yarrow_key_event_estimate nettle_yarrow_key_event_estimate + +/* Obsolete alias for backwards compatibility. Will be deleted in some + later version. */ +#define yarrow256_force_reseed yarrow256_slow_reseed + + enum yarrow_pool_id { YARROW_FAST = 0, YARROW_SLOW = 1 }; + + struct yarrow_source { + /* Indexed by yarrow_pool_id */ + uint32_t estimate[2]; + + /* The pool next sample should go to. */ + enum yarrow_pool_id next; + }; + + +#define YARROW256_SEED_FILE_SIZE (2 * AES_BLOCK_SIZE) + +/* Yarrow-256, based on SHA-256 and AES-256 */ + struct yarrow256_ctx { + /* Indexed by yarrow_pool_id */ + struct sha256_ctx pools[2]; + + int seeded; + + /* The current key and counter block */ + struct aes_ctx key; + uint8_t counter[AES_BLOCK_SIZE]; + + /* The entropy sources */ + unsigned nsources; + struct yarrow_source *sources; + }; + + void + yarrow256_init(struct yarrow256_ctx *ctx, + unsigned nsources, struct yarrow_source *sources); + + void + yarrow256_seed(struct yarrow256_ctx *ctx, + unsigned length, const uint8_t * seed_file); + +/* Returns 1 on reseed */ + int + yarrow256_update(struct yarrow256_ctx *ctx, + unsigned source, unsigned entropy, + unsigned length, const uint8_t * data); + + void + yarrow256_random(struct yarrow256_ctx *ctx, unsigned length, + uint8_t * dst); + + int + yarrow256_is_seeded(struct yarrow256_ctx *ctx); + + unsigned + yarrow256_needed_sources(struct yarrow256_ctx *ctx); + + void + yarrow256_fast_reseed(struct yarrow256_ctx *ctx); + + void + yarrow256_slow_reseed(struct yarrow256_ctx *ctx); + + +/* Key event estimator */ +#define YARROW_KEY_EVENT_BUFFER 16 + + struct yarrow_key_event_ctx { + /* Counter for initial priming of the state */ + unsigned index; + unsigned chars[YARROW_KEY_EVENT_BUFFER]; + unsigned previous; + }; + + void + yarrow_key_event_init(struct yarrow_key_event_ctx *ctx); + + unsigned + yarrow_key_event_estimate(struct yarrow_key_event_ctx *ctx, + unsigned key, unsigned time); + +#ifdef __cplusplus +} +#endif +#endif /* NETTLE_YARROW_H_INCLUDED */ diff --git a/include/reactos/libs/gnutls/p11-kit/deprecated.h b/include/reactos/libs/gnutls/p11-kit/deprecated.h new file mode 100644 index 00000000000..ffe5d9d9bcf --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/deprecated.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013 Red Hat Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * * The names of contributors to this software may not be + * used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * Author: Stef Walter + */ + +#ifndef __P11_KIT_DEPRECATED_H__ +#define __P11_KIT_DEPRECATED_H__ + +#ifndef __P11_KIT_H__ +#error "Please include instead of this file." +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef P11_KIT_NO_DEPRECATIONS +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#define P11_KIT_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead"))) +#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#define P11_KIT_DEPRECATED_FOR(f) __attribute__((__deprecated__)) +#endif +#endif + +#ifndef P11_KIT_DEPRECATED_FOR +#define P11_KIT_DEPRECATED_FOR(f) +#endif + +#ifndef P11_KIT_DISABLE_DEPRECATED + +P11_KIT_DEPRECATED_FOR (p11_kit_modules_load) +CK_RV p11_kit_initialize_registered (void); + +P11_KIT_DEPRECATED_FOR (p11_kit_modules_release) +CK_RV p11_kit_finalize_registered (void); + +P11_KIT_DEPRECATED_FOR (p11_kit_modules_release) +CK_FUNCTION_LIST_PTR * p11_kit_registered_modules (void); + +P11_KIT_DEPRECATED_FOR (p11_kit_module_for_name) +CK_FUNCTION_LIST_PTR p11_kit_registered_name_to_module (const char *name); + +P11_KIT_DEPRECATED_FOR (p11_kit_module_get_name) +char * p11_kit_registered_module_to_name (CK_FUNCTION_LIST_PTR module); + +P11_KIT_DEPRECATED_FOR (p11_kit_config_option) +char * p11_kit_registered_option (CK_FUNCTION_LIST_PTR module, + const char *field); + +P11_KIT_DEPRECATED_FOR (module->C_Initialize) +CK_RV p11_kit_initialize_module (CK_FUNCTION_LIST_PTR module); + +P11_KIT_DEPRECATED_FOR (module->C_Finalize) +CK_RV p11_kit_finalize_module (CK_FUNCTION_LIST_PTR module); + +P11_KIT_DEPRECATED_FOR (p11_kit_module_load) +CK_RV p11_kit_load_initialize_module (const char *module_path, + CK_FUNCTION_LIST_PTR *module); + +#endif /* P11_KIT_DISABLE_DEPRECATED */ + +#undef P11_KIT_DEPRECATED_FOR + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __P11_KIT_DEPRECATED_H__ */ diff --git a/include/reactos/libs/gnutls/p11-kit/iter.h b/include/reactos/libs/gnutls/p11-kit/iter.h new file mode 100644 index 00000000000..33a6304b314 --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/iter.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2013 Red Hat, Inc + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * * The names of contributors to this software may not be + * used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * Author: Stef Walter + */ + +#ifndef P11_KIT_ITER_H +#define P11_KIT_ITER_H + +#include "p11-kit/p11-kit.h" +#include "p11-kit/pkcs11.h" +#include "p11-kit/uri.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef P11_KIT_FUTURE_UNSTABLE_API + +typedef struct p11_kit_iter P11KitIter; +typedef P11KitIter p11_kit_iter; + +typedef enum { + P11_KIT_ITER_BUSY_SESSIONS = 1 << 1, + P11_KIT_ITER_WANT_WRITABLE = 1 << 2, +} P11KitIterBehavior; + +typedef CK_RV (* p11_kit_iter_callback) (P11KitIter *iter, + CK_BBOOL *matches, + void *data); + +P11KitIter * p11_kit_iter_new (P11KitUri *uri, + P11KitIterBehavior behavior); + +void p11_kit_iter_free (P11KitIter *iter); + +void p11_kit_iter_add_callback (P11KitIter *iter, + p11_kit_iter_callback callback, + void *callback_data, + p11_kit_destroyer callback_destroy); + +void p11_kit_iter_add_filter (P11KitIter *iter, + CK_ATTRIBUTE *matching, + CK_ULONG count); + +void p11_kit_iter_set_uri (P11KitIter *iter, + P11KitUri *uri); + +void p11_kit_iter_begin (P11KitIter *iter, + CK_FUNCTION_LIST_PTR *modules); + +void p11_kit_iter_begin_with (P11KitIter *iter, + CK_FUNCTION_LIST_PTR module, + CK_SLOT_ID slot, + CK_SESSION_HANDLE session); + +CK_RV p11_kit_iter_next (P11KitIter *iter); + +CK_FUNCTION_LIST_PTR p11_kit_iter_get_module (P11KitIter *iter); + +CK_SLOT_ID p11_kit_iter_get_slot (P11KitIter *iter); + +CK_TOKEN_INFO * p11_kit_iter_get_token (P11KitIter *iter); + +CK_SESSION_HANDLE p11_kit_iter_get_session (P11KitIter *iter); + +CK_OBJECT_HANDLE p11_kit_iter_get_object (P11KitIter *iter); + +CK_RV p11_kit_iter_get_attributes (P11KitIter *iter, + CK_ATTRIBUTE *template, + CK_ULONG count); + +CK_RV p11_kit_iter_load_attributes (P11KitIter *iter, + CK_ATTRIBUTE *template, + CK_ULONG count); + +CK_SESSION_HANDLE p11_kit_iter_keep_session (P11KitIter *iter); + +CK_RV p11_kit_iter_destroy_object (P11KitIter *iter); + +#endif /* P11_KIT_FUTURE_UNSTABLE_API */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* P11_KIT_ITER_H */ diff --git a/include/reactos/libs/gnutls/p11-kit/p11-kit.h b/include/reactos/libs/gnutls/p11-kit/p11-kit.h new file mode 100644 index 00000000000..d5f0bd95592 --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/p11-kit.h @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2011 Collabora Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * * The names of contributors to this software may not be + * used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * Author: Stef Walter + */ + +#ifndef __P11_KIT_H__ +#define __P11_KIT_H__ + +#include "p11-kit/pkcs11.h" + +/* + * If the caller is using the PKCS#11 GNU calling convention, then we cater + * to that here. + */ +#ifdef CRYPTOKI_GNU +typedef ck_rv_t CK_RV; +typedef struct ck_function_list* CK_FUNCTION_LIST_PTR; +typedef struct ck_function_list CK_FUNCTION_LIST; +#endif + +#include "p11-kit/deprecated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + P11_KIT_MODULE_UNMANAGED = 1 << 0, + P11_KIT_MODULE_CRITICAL = 1 << 1, + P11_KIT_MODULE_TRUSTED = 1 << 2, +}; + +typedef void (* p11_kit_destroyer) (void *data); + +CK_FUNCTION_LIST ** p11_kit_modules_load (const char *reserved, + int flags); + +CK_RV p11_kit_modules_initialize (CK_FUNCTION_LIST **modules, + p11_kit_destroyer failure_callback); + +CK_FUNCTION_LIST ** p11_kit_modules_load_and_initialize (int flags); + +CK_RV p11_kit_modules_finalize (CK_FUNCTION_LIST **modules); + +void p11_kit_modules_release (CK_FUNCTION_LIST **modules); + +void p11_kit_modules_finalize_and_release (CK_FUNCTION_LIST **modules); + +CK_FUNCTION_LIST * p11_kit_module_for_name (CK_FUNCTION_LIST **modules, + const char *name); + +char * p11_kit_module_get_name (CK_FUNCTION_LIST *module); + +int p11_kit_module_get_flags (CK_FUNCTION_LIST *module); + +CK_FUNCTION_LIST * p11_kit_module_load (const char *module_path, + int flags); + +CK_RV p11_kit_module_initialize (CK_FUNCTION_LIST *module); + +CK_RV p11_kit_module_finalize (CK_FUNCTION_LIST *module); + +void p11_kit_module_release (CK_FUNCTION_LIST *module); + +char * p11_kit_config_option (CK_FUNCTION_LIST *module, + const char *option); + +const char* p11_kit_strerror (CK_RV rv); + +size_t p11_kit_space_strlen (const unsigned char *string, + size_t max_length); + +char* p11_kit_space_strdup (const unsigned char *string, + size_t max_length); + +#ifdef P11_KIT_FUTURE_UNSTABLE_API + +void p11_kit_set_progname (const char *progname); + +void p11_kit_be_quiet (void); + +void p11_kit_be_loud (void); + +#endif + +const char * p11_kit_message (void); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __P11_KIT_H__ */ diff --git a/include/reactos/libs/gnutls/p11-kit/pin.h b/include/reactos/libs/gnutls/p11-kit/pin.h new file mode 100644 index 00000000000..3b6806da82e --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/pin.h @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2011 Collabora Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * * The names of contributors to this software may not be + * used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * Author: Stef Walter + */ + +#ifndef P11_KIT_PIN_H +#define P11_KIT_PIN_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct p11_kit_pin P11KitPin; + +typedef enum { + P11_KIT_PIN_FLAGS_USER_LOGIN = 1<<0, + P11_KIT_PIN_FLAGS_SO_LOGIN = 1<<1, + P11_KIT_PIN_FLAGS_CONTEXT_LOGIN = 1<<2, + P11_KIT_PIN_FLAGS_RETRY = 1<<3, + P11_KIT_PIN_FLAGS_MANY_TRIES = 1<<4, + P11_KIT_PIN_FLAGS_FINAL_TRY = 1<<5 +} P11KitPinFlags; + +#define P11_KIT_PIN_FALLBACK "" + +typedef void (*p11_kit_pin_destroy_func) (void *data); + +P11KitPin* p11_kit_pin_new (const unsigned char *value, + size_t length); + +P11KitPin* p11_kit_pin_new_for_string (const char *value); + +P11KitPin* p11_kit_pin_new_for_buffer (unsigned char *buffer, + size_t length, + p11_kit_pin_destroy_func destroy); + +P11KitPin* p11_kit_pin_ref (P11KitPin *pin); + +void p11_kit_pin_unref (P11KitPin *pin); + +const unsigned char * p11_kit_pin_get_value (P11KitPin *pin, + size_t *length); + +size_t p11_kit_pin_get_length (P11KitPin *pin); + +typedef P11KitPin* (*p11_kit_pin_callback) (const char *pin_source, + P11KitUri *pin_uri, + const char *pin_description, + P11KitPinFlags pin_flags, + void *callback_data); + +int p11_kit_pin_register_callback (const char *pin_source, + p11_kit_pin_callback callback, + void *callback_data, + p11_kit_pin_destroy_func callback_destroy); + +void p11_kit_pin_unregister_callback (const char *pin_source, + p11_kit_pin_callback callback, + void *callback_data); + +P11KitPin* p11_kit_pin_request (const char *pin_source, + P11KitUri *pin_uri, + const char *pin_description, + P11KitPinFlags pin_flags); + +P11KitPin* p11_kit_pin_file_callback (const char *pin_source, + P11KitUri *pin_uri, + const char *pin_description, + P11KitPinFlags pin_flags, + void *callback_data); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* P11_KIT_URI_H */ diff --git a/include/reactos/libs/gnutls/p11-kit/pkcs11.h b/include/reactos/libs/gnutls/p11-kit/pkcs11.h new file mode 100644 index 00000000000..f8dc78e2088 --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/pkcs11.h @@ -0,0 +1,1398 @@ +/* pkcs11.h + Copyright 2006, 2007 g10 Code GmbH + Copyright 2006 Andreas Jellinghaus + + This file is free software; as a special exception the author gives + unlimited permission to copy and/or distribute it, with or without + modifications, as long as this notice is preserved. + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY, to the extent permitted by law; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. */ + +/* Please submit changes back to the Scute project at + http://www.scute.org/ (or send them to marcus@g10code.com), so that + they can be picked up by other projects from there as well. */ + +/* This file is a modified implementation of the PKCS #11 standard by + RSA Security Inc. It is mostly a drop-in replacement, with the + following change: + + This header file does not require any macro definitions by the user + (like CK_DEFINE_FUNCTION etc). In fact, it defines those macros + for you (if useful, some are missing, let me know if you need + more). + + There is an additional API available that does comply better to the + GNU coding standard. It can be switched on by defining + CRYPTOKI_GNU before including this header file. For this, the + following changes are made to the specification: + + All structure types are changed to a "struct ck_foo" where CK_FOO + is the type name in PKCS #11. + + All non-structure types are changed to ck_foo_t where CK_FOO is the + lowercase version of the type name in PKCS #11. The basic types + (CK_ULONG et al.) are removed without substitute. + + All members of structures are modified in the following way: Type + indication prefixes are removed, and underscore characters are + inserted before words. Then the result is lowercased. + + Note that function names are still in the original case, as they + need for ABI compatibility. + + CK_FALSE, CK_TRUE and NULL_PTR are removed without substitute. Use + . + + If CRYPTOKI_COMPAT is defined before including this header file, + then none of the API changes above take place, and the API is the + one defined by the PKCS #11 standard. */ + +#ifndef PKCS11_H +#define PKCS11_H 1 + +#if defined(__cplusplus) +extern "C" { +#endif + + +/* The version of cryptoki we implement. The revision is changed with + each modification of this file. If you do not use the "official" + version of this file, please consider deleting the revision macro + (you may use a macro with a different name to keep track of your + versions). */ +#define CRYPTOKI_VERSION_MAJOR 2 +#define CRYPTOKI_VERSION_MINOR 20 +#define CRYPTOKI_VERSION_REVISION 6 + + +/* Compatibility interface is default, unless CRYPTOKI_GNU is + given. */ +#ifndef CRYPTOKI_GNU +#ifndef CRYPTOKI_COMPAT +#define CRYPTOKI_COMPAT 1 +#endif +#endif + +/* System dependencies. */ + +#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) + +/* There is a matching pop below. */ +#pragma pack(push, cryptoki, 1) + +#ifdef CRYPTOKI_EXPORTS +#define CK_SPEC __declspec(dllexport) +#else +#define CK_SPEC __declspec(dllimport) +#endif + +#else + +#define CK_SPEC + +#endif + + +#ifdef CRYPTOKI_COMPAT + /* If we are in compatibility mode, switch all exposed names to the + PKCS #11 variant. There are corresponding #undefs below. */ + +#define ck_flags_t CK_FLAGS +#define ck_version _CK_VERSION + +#define ck_info _CK_INFO +#define cryptoki_version cryptokiVersion +#define manufacturer_id manufacturerID +#define library_description libraryDescription +#define library_version libraryVersion + +#define ck_notification_t CK_NOTIFICATION +#define ck_slot_id_t CK_SLOT_ID + +#define ck_slot_info _CK_SLOT_INFO +#define slot_description slotDescription +#define hardware_version hardwareVersion +#define firmware_version firmwareVersion + +#define ck_token_info _CK_TOKEN_INFO +#define serial_number serialNumber +#define max_session_count ulMaxSessionCount +#define session_count ulSessionCount +#define max_rw_session_count ulMaxRwSessionCount +#define rw_session_count ulRwSessionCount +#define max_pin_len ulMaxPinLen +#define min_pin_len ulMinPinLen +#define total_public_memory ulTotalPublicMemory +#define free_public_memory ulFreePublicMemory +#define total_private_memory ulTotalPrivateMemory +#define free_private_memory ulFreePrivateMemory +#define utc_time utcTime + +#define ck_session_handle_t CK_SESSION_HANDLE +#define ck_user_type_t CK_USER_TYPE +#define ck_state_t CK_STATE + +#define ck_session_info _CK_SESSION_INFO +#define slot_id slotID +#define device_error ulDeviceError + +#define ck_object_handle_t CK_OBJECT_HANDLE +#define ck_object_class_t CK_OBJECT_CLASS +#define ck_hw_feature_type_t CK_HW_FEATURE_TYPE +#define ck_key_type_t CK_KEY_TYPE +#define ck_certificate_type_t CK_CERTIFICATE_TYPE +#define ck_attribute_type_t CK_ATTRIBUTE_TYPE + +#define ck_attribute _CK_ATTRIBUTE +#define value pValue +#define value_len ulValueLen + +#define ck_date _CK_DATE + +#define ck_mechanism_type_t CK_MECHANISM_TYPE + +#define ck_mechanism _CK_MECHANISM +#define parameter pParameter +#define parameter_len ulParameterLen + +#define ck_mechanism_info _CK_MECHANISM_INFO +#define min_key_size ulMinKeySize +#define max_key_size ulMaxKeySize + +#define ck_rv_t CK_RV +#define ck_notify_t CK_NOTIFY + +#define ck_function_list _CK_FUNCTION_LIST + +#define ck_createmutex_t CK_CREATEMUTEX +#define ck_destroymutex_t CK_DESTROYMUTEX +#define ck_lockmutex_t CK_LOCKMUTEX +#define ck_unlockmutex_t CK_UNLOCKMUTEX + +#define ck_c_initialize_args _CK_C_INITIALIZE_ARGS +#define create_mutex CreateMutex +#define destroy_mutex DestroyMutex +#define lock_mutex LockMutex +#define unlock_mutex UnlockMutex +#define reserved pReserved + +#endif /* CRYPTOKI_COMPAT */ + + + +typedef unsigned long ck_flags_t; + +struct ck_version +{ + unsigned char major; + unsigned char minor; +}; + + +struct ck_info +{ + struct ck_version cryptoki_version; + unsigned char manufacturer_id[32]; + ck_flags_t flags; + unsigned char library_description[32]; + struct ck_version library_version; +}; + + +typedef unsigned long ck_notification_t; + +#define CKN_SURRENDER (0UL) + + +typedef unsigned long ck_slot_id_t; + + +struct ck_slot_info +{ + unsigned char slot_description[64]; + unsigned char manufacturer_id[32]; + ck_flags_t flags; + struct ck_version hardware_version; + struct ck_version firmware_version; +}; + + +#define CKF_TOKEN_PRESENT (1UL << 0) +#define CKF_REMOVABLE_DEVICE (1UL << 1) +#define CKF_HW_SLOT (1UL << 2) +#define CKF_ARRAY_ATTRIBUTE (1UL << 30) + + +struct ck_token_info +{ + unsigned char label[32]; + unsigned char manufacturer_id[32]; + unsigned char model[16]; + unsigned char serial_number[16]; + ck_flags_t flags; + unsigned long max_session_count; + unsigned long session_count; + unsigned long max_rw_session_count; + unsigned long rw_session_count; + unsigned long max_pin_len; + unsigned long min_pin_len; + unsigned long total_public_memory; + unsigned long free_public_memory; + unsigned long total_private_memory; + unsigned long free_private_memory; + struct ck_version hardware_version; + struct ck_version firmware_version; + unsigned char utc_time[16]; +}; + + +#define CKF_RNG (1UL << 0) +#define CKF_WRITE_PROTECTED (1UL << 1) +#define CKF_LOGIN_REQUIRED (1UL << 2) +#define CKF_USER_PIN_INITIALIZED (1UL << 3) +#define CKF_RESTORE_KEY_NOT_NEEDED (1UL << 5) +#define CKF_CLOCK_ON_TOKEN (1UL << 6) +#define CKF_PROTECTED_AUTHENTICATION_PATH (1UL << 8) +#define CKF_DUAL_CRYPTO_OPERATIONS (1UL << 9) +#define CKF_TOKEN_INITIALIZED (1UL << 10) +#define CKF_SECONDARY_AUTHENTICATION (1UL << 11) +#define CKF_USER_PIN_COUNT_LOW (1UL << 16) +#define CKF_USER_PIN_FINAL_TRY (1UL << 17) +#define CKF_USER_PIN_LOCKED (1UL << 18) +#define CKF_USER_PIN_TO_BE_CHANGED (1UL << 19) +#define CKF_SO_PIN_COUNT_LOW (1UL << 20) +#define CKF_SO_PIN_FINAL_TRY (1UL << 21) +#define CKF_SO_PIN_LOCKED (1UL << 22) +#define CKF_SO_PIN_TO_BE_CHANGED (1UL << 23) + +#define CK_UNAVAILABLE_INFORMATION ((unsigned long)-1L) +#define CK_EFFECTIVELY_INFINITE (0UL) + + +typedef unsigned long ck_session_handle_t; + +#define CK_INVALID_HANDLE (0UL) + + +typedef unsigned long ck_user_type_t; + +#define CKU_SO (0UL) +#define CKU_USER (1UL) +#define CKU_CONTEXT_SPECIFIC (2UL) + + +typedef unsigned long ck_state_t; + +#define CKS_RO_PUBLIC_SESSION (0UL) +#define CKS_RO_USER_FUNCTIONS (1UL) +#define CKS_RW_PUBLIC_SESSION (2UL) +#define CKS_RW_USER_FUNCTIONS (3UL) +#define CKS_RW_SO_FUNCTIONS (4UL) + + +struct ck_session_info +{ + ck_slot_id_t slot_id; + ck_state_t state; + ck_flags_t flags; + unsigned long device_error; +}; + +#define CKF_RW_SESSION (1UL << 1) +#define CKF_SERIAL_SESSION (1UL << 2) + + +typedef unsigned long ck_object_handle_t; + + +typedef unsigned long ck_object_class_t; + +#define CKO_DATA (0UL) +#define CKO_CERTIFICATE (1UL) +#define CKO_PUBLIC_KEY (2UL) +#define CKO_PRIVATE_KEY (3UL) +#define CKO_SECRET_KEY (4UL) +#define CKO_HW_FEATURE (5UL) +#define CKO_DOMAIN_PARAMETERS (6UL) +#define CKO_MECHANISM (7UL) +#define CKO_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + +typedef unsigned long ck_hw_feature_type_t; + +#define CKH_MONOTONIC_COUNTER (1UL) +#define CKH_CLOCK (2UL) +#define CKH_USER_INTERFACE (3UL) +#define CKH_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + +typedef unsigned long ck_key_type_t; + +#define CKK_RSA (0UL) +#define CKK_DSA (1UL) +#define CKK_DH (2UL) +#define CKK_ECDSA (3UL) +#define CKK_EC (3UL) +#define CKK_X9_42_DH (4UL) +#define CKK_KEA (5UL) +#define CKK_GENERIC_SECRET (0x10UL) +#define CKK_RC2 (0x11UL) +#define CKK_RC4 (0x12UL) +#define CKK_DES (0x13UL) +#define CKK_DES2 (0x14UL) +#define CKK_DES3 (0x15UL) +#define CKK_CAST (0x16UL) +#define CKK_CAST3 (0x17UL) +#define CKK_CAST128 (0x18UL) +#define CKK_RC5 (0x19UL) +#define CKK_IDEA (0x1aUL) +#define CKK_SKIPJACK (0x1bUL) +#define CKK_BATON (0x1cUL) +#define CKK_JUNIPER (0x1dUL) +#define CKK_CDMF (0x1eUL) +#define CKK_AES (0x1fUL) +#define CKK_BLOWFISH (0x20UL) +#define CKK_TWOFISH (0x21UL) +#define CKK_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + +typedef unsigned long ck_certificate_type_t; + +#define CKC_X_509 (0UL) +#define CKC_X_509_ATTR_CERT (1UL) +#define CKC_WTLS (2UL) +#define CKC_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + +typedef unsigned long ck_attribute_type_t; + +#define CKA_CLASS (0UL) +#define CKA_TOKEN (1UL) +#define CKA_PRIVATE (2UL) +#define CKA_LABEL (3UL) +#define CKA_APPLICATION (0x10UL) +#define CKA_VALUE (0x11UL) +#define CKA_OBJECT_ID (0x12UL) +#define CKA_CERTIFICATE_TYPE (0x80UL) +#define CKA_ISSUER (0x81UL) +#define CKA_SERIAL_NUMBER (0x82UL) +#define CKA_AC_ISSUER (0x83UL) +#define CKA_OWNER (0x84UL) +#define CKA_ATTR_TYPES (0x85UL) +#define CKA_TRUSTED (0x86UL) +#define CKA_CERTIFICATE_CATEGORY (0x87UL) +#define CKA_JAVA_MIDP_SECURITY_DOMAIN (0x88UL) +#define CKA_URL (0x89UL) +#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY (0x8aUL) +#define CKA_HASH_OF_ISSUER_PUBLIC_KEY (0x8bUL) +#define CKA_CHECK_VALUE (0x90UL) +#define CKA_KEY_TYPE (0x100UL) +#define CKA_SUBJECT (0x101UL) +#define CKA_ID (0x102UL) +#define CKA_SENSITIVE (0x103UL) +#define CKA_ENCRYPT (0x104UL) +#define CKA_DECRYPT (0x105UL) +#define CKA_WRAP (0x106UL) +#define CKA_UNWRAP (0x107UL) +#define CKA_SIGN (0x108UL) +#define CKA_SIGN_RECOVER (0x109UL) +#define CKA_VERIFY (0x10aUL) +#define CKA_VERIFY_RECOVER (0x10bUL) +#define CKA_DERIVE (0x10cUL) +#define CKA_START_DATE (0x110UL) +#define CKA_END_DATE (0x111UL) +#define CKA_MODULUS (0x120UL) +#define CKA_MODULUS_BITS (0x121UL) +#define CKA_PUBLIC_EXPONENT (0x122UL) +#define CKA_PRIVATE_EXPONENT (0x123UL) +#define CKA_PRIME_1 (0x124UL) +#define CKA_PRIME_2 (0x125UL) +#define CKA_EXPONENT_1 (0x126UL) +#define CKA_EXPONENT_2 (0x127UL) +#define CKA_COEFFICIENT (0x128UL) +#define CKA_PRIME (0x130UL) +#define CKA_SUBPRIME (0x131UL) +#define CKA_BASE (0x132UL) +#define CKA_PRIME_BITS (0x133UL) +#define CKA_SUB_PRIME_BITS (0x134UL) +#define CKA_VALUE_BITS (0x160UL) +#define CKA_VALUE_LEN (0x161UL) +#define CKA_EXTRACTABLE (0x162UL) +#define CKA_LOCAL (0x163UL) +#define CKA_NEVER_EXTRACTABLE (0x164UL) +#define CKA_ALWAYS_SENSITIVE (0x165UL) +#define CKA_KEY_GEN_MECHANISM (0x166UL) +#define CKA_MODIFIABLE (0x170UL) +#define CKA_ECDSA_PARAMS (0x180UL) +#define CKA_EC_PARAMS (0x180UL) +#define CKA_EC_POINT (0x181UL) +#define CKA_SECONDARY_AUTH (0x200UL) +#define CKA_AUTH_PIN_FLAGS (0x201UL) +#define CKA_ALWAYS_AUTHENTICATE (0x202UL) +#define CKA_WRAP_WITH_TRUSTED (0x210UL) +#define CKA_HW_FEATURE_TYPE (0x300UL) +#define CKA_RESET_ON_INIT (0x301UL) +#define CKA_HAS_RESET (0x302UL) +#define CKA_PIXEL_X (0x400UL) +#define CKA_PIXEL_Y (0x401UL) +#define CKA_RESOLUTION (0x402UL) +#define CKA_CHAR_ROWS (0x403UL) +#define CKA_CHAR_COLUMNS (0x404UL) +#define CKA_COLOR (0x405UL) +#define CKA_BITS_PER_PIXEL (0x406UL) +#define CKA_CHAR_SETS (0x480UL) +#define CKA_ENCODING_METHODS (0x481UL) +#define CKA_MIME_TYPES (0x482UL) +#define CKA_MECHANISM_TYPE (0x500UL) +#define CKA_REQUIRED_CMS_ATTRIBUTES (0x501UL) +#define CKA_DEFAULT_CMS_ATTRIBUTES (0x502UL) +#define CKA_SUPPORTED_CMS_ATTRIBUTES (0x503UL) +#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x211UL) +#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x212UL) +#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x600UL) +#define CKA_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + +struct ck_attribute +{ + ck_attribute_type_t type; + void *value; + unsigned long value_len; +}; + + +struct ck_date +{ + unsigned char year[4]; + unsigned char month[2]; + unsigned char day[2]; +}; + + +typedef unsigned long ck_mechanism_type_t; + +#define CKM_RSA_PKCS_KEY_PAIR_GEN (0UL) +#define CKM_RSA_PKCS (1UL) +#define CKM_RSA_9796 (2UL) +#define CKM_RSA_X_509 (3UL) +#define CKM_MD2_RSA_PKCS (4UL) +#define CKM_MD5_RSA_PKCS (5UL) +#define CKM_SHA1_RSA_PKCS (6UL) +#define CKM_RIPEMD128_RSA_PKCS (7UL) +#define CKM_RIPEMD160_RSA_PKCS (8UL) +#define CKM_RSA_PKCS_OAEP (9UL) +#define CKM_RSA_X9_31_KEY_PAIR_GEN (0xaUL) +#define CKM_RSA_X9_31 (0xbUL) +#define CKM_SHA1_RSA_X9_31 (0xcUL) +#define CKM_RSA_PKCS_PSS (0xdUL) +#define CKM_SHA1_RSA_PKCS_PSS (0xeUL) +#define CKM_DSA_KEY_PAIR_GEN (0x10UL) +#define CKM_DSA (0x11UL) +#define CKM_DSA_SHA1 (0x12UL) +#define CKM_DH_PKCS_KEY_PAIR_GEN (0x20UL) +#define CKM_DH_PKCS_DERIVE (0x21UL) +#define CKM_X9_42_DH_KEY_PAIR_GEN (0x30UL) +#define CKM_X9_42_DH_DERIVE (0x31UL) +#define CKM_X9_42_DH_HYBRID_DERIVE (0x32UL) +#define CKM_X9_42_MQV_DERIVE (0x33UL) +#define CKM_SHA256_RSA_PKCS (0x40UL) +#define CKM_SHA384_RSA_PKCS (0x41UL) +#define CKM_SHA512_RSA_PKCS (0x42UL) +#define CKM_SHA256_RSA_PKCS_PSS (0x43UL) +#define CKM_SHA384_RSA_PKCS_PSS (0x44UL) +#define CKM_SHA512_RSA_PKCS_PSS (0x45UL) +#define CKM_RC2_KEY_GEN (0x100UL) +#define CKM_RC2_ECB (0x101UL) +#define CKM_RC2_CBC (0x102UL) +#define CKM_RC2_MAC (0x103UL) +#define CKM_RC2_MAC_GENERAL (0x104UL) +#define CKM_RC2_CBC_PAD (0x105UL) +#define CKM_RC4_KEY_GEN (0x110UL) +#define CKM_RC4 (0x111UL) +#define CKM_DES_KEY_GEN (0x120UL) +#define CKM_DES_ECB (0x121UL) +#define CKM_DES_CBC (0x122UL) +#define CKM_DES_MAC (0x123UL) +#define CKM_DES_MAC_GENERAL (0x124UL) +#define CKM_DES_CBC_PAD (0x125UL) +#define CKM_DES2_KEY_GEN (0x130UL) +#define CKM_DES3_KEY_GEN (0x131UL) +#define CKM_DES3_ECB (0x132UL) +#define CKM_DES3_CBC (0x133UL) +#define CKM_DES3_MAC (0x134UL) +#define CKM_DES3_MAC_GENERAL (0x135UL) +#define CKM_DES3_CBC_PAD (0x136UL) +#define CKM_CDMF_KEY_GEN (0x140UL) +#define CKM_CDMF_ECB (0x141UL) +#define CKM_CDMF_CBC (0x142UL) +#define CKM_CDMF_MAC (0x143UL) +#define CKM_CDMF_MAC_GENERAL (0x144UL) +#define CKM_CDMF_CBC_PAD (0x145UL) +#define CKM_DES_OFB64 (0x150UL) +#define CKM_DES_OFB8 (0x151UL) +#define CKM_DES_CFB64 (0x152UL) +#define CKM_DES_CFB8 (0x153UL) +#define CKM_MD2 (0x200UL) +#define CKM_MD2_HMAC (0x201UL) +#define CKM_MD2_HMAC_GENERAL (0x202UL) +#define CKM_MD5 (0x210UL) +#define CKM_MD5_HMAC (0x211UL) +#define CKM_MD5_HMAC_GENERAL (0x212UL) +#define CKM_SHA_1 (0x220UL) +#define CKM_SHA_1_HMAC (0x221UL) +#define CKM_SHA_1_HMAC_GENERAL (0x222UL) +#define CKM_RIPEMD128 (0x230UL) +#define CKM_RIPEMD128_HMAC (0x231UL) +#define CKM_RIPEMD128_HMAC_GENERAL (0x232UL) +#define CKM_RIPEMD160 (0x240UL) +#define CKM_RIPEMD160_HMAC (0x241UL) +#define CKM_RIPEMD160_HMAC_GENERAL (0x242UL) +#define CKM_SHA256 (0x250UL) +#define CKM_SHA256_HMAC (0x251UL) +#define CKM_SHA256_HMAC_GENERAL (0x252UL) +#define CKM_SHA384 (0x260UL) +#define CKM_SHA384_HMAC (0x261UL) +#define CKM_SHA384_HMAC_GENERAL (0x262UL) +#define CKM_SHA512 (0x270UL) +#define CKM_SHA512_HMAC (0x271UL) +#define CKM_SHA512_HMAC_GENERAL (0x272UL) +#define CKM_CAST_KEY_GEN (0x300UL) +#define CKM_CAST_ECB (0x301UL) +#define CKM_CAST_CBC (0x302UL) +#define CKM_CAST_MAC (0x303UL) +#define CKM_CAST_MAC_GENERAL (0x304UL) +#define CKM_CAST_CBC_PAD (0x305UL) +#define CKM_CAST3_KEY_GEN (0x310UL) +#define CKM_CAST3_ECB (0x311UL) +#define CKM_CAST3_CBC (0x312UL) +#define CKM_CAST3_MAC (0x313UL) +#define CKM_CAST3_MAC_GENERAL (0x314UL) +#define CKM_CAST3_CBC_PAD (0x315UL) +#define CKM_CAST5_KEY_GEN (0x320UL) +#define CKM_CAST128_KEY_GEN (0x320UL) +#define CKM_CAST5_ECB (0x321UL) +#define CKM_CAST128_ECB (0x321UL) +#define CKM_CAST5_CBC (0x322UL) +#define CKM_CAST128_CBC (0x322UL) +#define CKM_CAST5_MAC (0x323UL) +#define CKM_CAST128_MAC (0x323UL) +#define CKM_CAST5_MAC_GENERAL (0x324UL) +#define CKM_CAST128_MAC_GENERAL (0x324UL) +#define CKM_CAST5_CBC_PAD (0x325UL) +#define CKM_CAST128_CBC_PAD (0x325UL) +#define CKM_RC5_KEY_GEN (0x330UL) +#define CKM_RC5_ECB (0x331UL) +#define CKM_RC5_CBC (0x332UL) +#define CKM_RC5_MAC (0x333UL) +#define CKM_RC5_MAC_GENERAL (0x334UL) +#define CKM_RC5_CBC_PAD (0x335UL) +#define CKM_IDEA_KEY_GEN (0x340UL) +#define CKM_IDEA_ECB (0x341UL) +#define CKM_IDEA_CBC (0x342UL) +#define CKM_IDEA_MAC (0x343UL) +#define CKM_IDEA_MAC_GENERAL (0x344UL) +#define CKM_IDEA_CBC_PAD (0x345UL) +#define CKM_GENERIC_SECRET_KEY_GEN (0x350UL) +#define CKM_CONCATENATE_BASE_AND_KEY (0x360UL) +#define CKM_CONCATENATE_BASE_AND_DATA (0x362UL) +#define CKM_CONCATENATE_DATA_AND_BASE (0x363UL) +#define CKM_XOR_BASE_AND_DATA (0x364UL) +#define CKM_EXTRACT_KEY_FROM_KEY (0x365UL) +#define CKM_SSL3_PRE_MASTER_KEY_GEN (0x370UL) +#define CKM_SSL3_MASTER_KEY_DERIVE (0x371UL) +#define CKM_SSL3_KEY_AND_MAC_DERIVE (0x372UL) +#define CKM_SSL3_MASTER_KEY_DERIVE_DH (0x373UL) +#define CKM_TLS_PRE_MASTER_KEY_GEN (0x374UL) +#define CKM_TLS_MASTER_KEY_DERIVE (0x375UL) +#define CKM_TLS_KEY_AND_MAC_DERIVE (0x376UL) +#define CKM_TLS_MASTER_KEY_DERIVE_DH (0x377UL) +#define CKM_TLS_PRF (0x378UL) +#define CKM_SSL3_MD5_MAC (0x380UL) +#define CKM_SSL3_SHA1_MAC (0x381UL) +#define CKM_MD5_KEY_DERIVATION (0x390UL) +#define CKM_MD2_KEY_DERIVATION (0x391UL) +#define CKM_SHA1_KEY_DERIVATION (0x392UL) +#define CKM_SHA256_KEY_DERIVATION (0x393UL) +#define CKM_SHA384_KEY_DERIVATION (0x394UL) +#define CKM_SHA512_KEY_DERIVATION (0x395UL) +#define CKM_PBE_MD2_DES_CBC (0x3a0UL) +#define CKM_PBE_MD5_DES_CBC (0x3a1UL) +#define CKM_PBE_MD5_CAST_CBC (0x3a2UL) +#define CKM_PBE_MD5_CAST3_CBC (0x3a3UL) +#define CKM_PBE_MD5_CAST5_CBC (0x3a4UL) +#define CKM_PBE_MD5_CAST128_CBC (0x3a4UL) +#define CKM_PBE_SHA1_CAST5_CBC (0x3a5UL) +#define CKM_PBE_SHA1_CAST128_CBC (0x3a5UL) +#define CKM_PBE_SHA1_RC4_128 (0x3a6UL) +#define CKM_PBE_SHA1_RC4_40 (0x3a7UL) +#define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8UL) +#define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9UL) +#define CKM_PBE_SHA1_RC2_128_CBC (0x3aaUL) +#define CKM_PBE_SHA1_RC2_40_CBC (0x3abUL) +#define CKM_PKCS5_PBKD2 (0x3b0UL) +#define CKM_PBA_SHA1_WITH_SHA1_HMAC (0x3c0UL) +#define CKM_WTLS_PRE_MASTER_KEY_GEN (0x3d0UL) +#define CKM_WTLS_MASTER_KEY_DERIVE (0x3d1UL) +#define CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC (0x3d2UL) +#define CKM_WTLS_PRF (0x3d3UL) +#define CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE (0x3d4UL) +#define CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE (0x3d5UL) +#define CKM_KEY_WRAP_LYNKS (0x400UL) +#define CKM_KEY_WRAP_SET_OAEP (0x401UL) +#define CKM_CMS_SIG (0x500UL) +#define CKM_SKIPJACK_KEY_GEN (0x1000UL) +#define CKM_SKIPJACK_ECB64 (0x1001UL) +#define CKM_SKIPJACK_CBC64 (0x1002UL) +#define CKM_SKIPJACK_OFB64 (0x1003UL) +#define CKM_SKIPJACK_CFB64 (0x1004UL) +#define CKM_SKIPJACK_CFB32 (0x1005UL) +#define CKM_SKIPJACK_CFB16 (0x1006UL) +#define CKM_SKIPJACK_CFB8 (0x1007UL) +#define CKM_SKIPJACK_WRAP (0x1008UL) +#define CKM_SKIPJACK_PRIVATE_WRAP (0x1009UL) +#define CKM_SKIPJACK_RELAYX (0x100aUL) +#define CKM_KEA_KEY_PAIR_GEN (0x1010UL) +#define CKM_KEA_KEY_DERIVE (0x1011UL) +#define CKM_FORTEZZA_TIMESTAMP (0x1020UL) +#define CKM_BATON_KEY_GEN (0x1030UL) +#define CKM_BATON_ECB128 (0x1031UL) +#define CKM_BATON_ECB96 (0x1032UL) +#define CKM_BATON_CBC128 (0x1033UL) +#define CKM_BATON_COUNTER (0x1034UL) +#define CKM_BATON_SHUFFLE (0x1035UL) +#define CKM_BATON_WRAP (0x1036UL) +#define CKM_ECDSA_KEY_PAIR_GEN (0x1040UL) +#define CKM_EC_KEY_PAIR_GEN (0x1040UL) +#define CKM_ECDSA (0x1041UL) +#define CKM_ECDSA_SHA1 (0x1042UL) +#define CKM_ECDH1_DERIVE (0x1050UL) +#define CKM_ECDH1_COFACTOR_DERIVE (0x1051UL) +#define CKM_ECMQV_DERIVE (0x1052UL) +#define CKM_JUNIPER_KEY_GEN (0x1060UL) +#define CKM_JUNIPER_ECB128 (0x1061UL) +#define CKM_JUNIPER_CBC128 (0x1062UL) +#define CKM_JUNIPER_COUNTER (0x1063UL) +#define CKM_JUNIPER_SHUFFLE (0x1064UL) +#define CKM_JUNIPER_WRAP (0x1065UL) +#define CKM_FASTHASH (0x1070UL) +#define CKM_AES_KEY_GEN (0x1080UL) +#define CKM_AES_ECB (0x1081UL) +#define CKM_AES_CBC (0x1082UL) +#define CKM_AES_MAC (0x1083UL) +#define CKM_AES_MAC_GENERAL (0x1084UL) +#define CKM_AES_CBC_PAD (0x1085UL) +#define CKM_BLOWFISH_KEY_GEN (0x1090UL) +#define CKM_BLOWFISH_CBC (0x1091UL) +#define CKM_TWOFISH_KEY_GEN (0x1092UL) +#define CKM_TWOFISH_CBC (0x1093UL) +#define CKM_DES_ECB_ENCRYPT_DATA (0x1100UL) +#define CKM_DES_CBC_ENCRYPT_DATA (0x1101UL) +#define CKM_DES3_ECB_ENCRYPT_DATA (0x1102UL) +#define CKM_DES3_CBC_ENCRYPT_DATA (0x1103UL) +#define CKM_AES_ECB_ENCRYPT_DATA (0x1104UL) +#define CKM_AES_CBC_ENCRYPT_DATA (0x1105UL) +#define CKM_DSA_PARAMETER_GEN (0x2000UL) +#define CKM_DH_PKCS_PARAMETER_GEN (0x2001UL) +#define CKM_X9_42_DH_PARAMETER_GEN (0x2002UL) +#define CKM_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + +/* Ammendments */ +#define CKM_SHA224 (0x255UL) +#define CKM_SHA224_HMAC (0x256UL) +#define CKM_SHA224_HMAC_GENERAL (0x257UL) +#define CKM_SHA224_RSA_PKCS (0x46UL) +#define CKM_SHA224_RSA_PKCS_PSS (0x47UL) +#define CKM_SHA224_KEY_DERIVATION (0x396UL) + +#define CKM_CAMELLIA_KEY_GEN (0x550UL) +#define CKM_CAMELLIA_ECB (0x551UL) +#define CKM_CAMELLIA_CBC (0x552UL) +#define CKM_CAMELLIA_MAC (0x553UL) +#define CKM_CAMELLIA_MAC_GENERAL (0x554UL) +#define CKM_CAMELLIA_CBC_PAD (0x555UL) +#define CKM_CAMELLIA_ECB_ENCRYPT_DATA (0x556UL) +#define CKM_CAMELLIA_CBC_ENCRYPT_DATA (0x557UL) + +struct ck_mechanism +{ + ck_mechanism_type_t mechanism; + void *parameter; + unsigned long parameter_len; +}; + + +struct ck_mechanism_info +{ + unsigned long min_key_size; + unsigned long max_key_size; + ck_flags_t flags; +}; + +#define CKF_HW (1UL << 0) +#define CKF_ENCRYPT (1UL << 8) +#define CKF_DECRYPT (1UL << 9) +#define CKF_DIGEST (1UL << 10) +#define CKF_SIGN (1UL << 11) +#define CKF_SIGN_RECOVER (1UL << 12) +#define CKF_VERIFY (1UL << 13) +#define CKF_VERIFY_RECOVER (1UL << 14) +#define CKF_GENERATE (1UL << 15) +#define CKF_GENERATE_KEY_PAIR (1UL << 16) +#define CKF_WRAP (1UL << 17) +#define CKF_UNWRAP (1UL << 18) +#define CKF_DERIVE (1UL << 19) +#define CKF_EXTENSION ((unsigned long) (1UL << 31)) + + +/* Flags for C_WaitForSlotEvent. */ +#define CKF_DONT_BLOCK (1UL) + + +typedef unsigned long ck_rv_t; + + +typedef ck_rv_t (*ck_notify_t) (ck_session_handle_t session, + ck_notification_t event, void *application); + +/* Forward reference. */ +struct ck_function_list; + +#define _CK_DECLARE_FUNCTION(name, args) \ +typedef ck_rv_t (*CK_ ## name) args; \ +ck_rv_t CK_SPEC name args + +_CK_DECLARE_FUNCTION (C_Initialize, (void *init_args)); +_CK_DECLARE_FUNCTION (C_Finalize, (void *reserved)); +_CK_DECLARE_FUNCTION (C_GetInfo, (struct ck_info *info)); +_CK_DECLARE_FUNCTION (C_GetFunctionList, + (struct ck_function_list **function_list)); + +_CK_DECLARE_FUNCTION (C_GetSlotList, + (unsigned char token_present, ck_slot_id_t *slot_list, + unsigned long *count)); +_CK_DECLARE_FUNCTION (C_GetSlotInfo, + (ck_slot_id_t slot_id, struct ck_slot_info *info)); +_CK_DECLARE_FUNCTION (C_GetTokenInfo, + (ck_slot_id_t slot_id, struct ck_token_info *info)); +_CK_DECLARE_FUNCTION (C_WaitForSlotEvent, + (ck_flags_t flags, ck_slot_id_t *slot, void *reserved)); +_CK_DECLARE_FUNCTION (C_GetMechanismList, + (ck_slot_id_t slot_id, + ck_mechanism_type_t *mechanism_list, + unsigned long *count)); +_CK_DECLARE_FUNCTION (C_GetMechanismInfo, + (ck_slot_id_t slot_id, ck_mechanism_type_t type, + struct ck_mechanism_info *info)); +_CK_DECLARE_FUNCTION (C_InitToken, + (ck_slot_id_t slot_id, unsigned char *pin, + unsigned long pin_len, unsigned char *label)); +_CK_DECLARE_FUNCTION (C_InitPIN, + (ck_session_handle_t session, unsigned char *pin, + unsigned long pin_len)); +_CK_DECLARE_FUNCTION (C_SetPIN, + (ck_session_handle_t session, unsigned char *old_pin, + unsigned long old_len, unsigned char *new_pin, + unsigned long new_len)); + +_CK_DECLARE_FUNCTION (C_OpenSession, + (ck_slot_id_t slot_id, ck_flags_t flags, + void *application, ck_notify_t notify, + ck_session_handle_t *session)); +_CK_DECLARE_FUNCTION (C_CloseSession, (ck_session_handle_t session)); +_CK_DECLARE_FUNCTION (C_CloseAllSessions, (ck_slot_id_t slot_id)); +_CK_DECLARE_FUNCTION (C_GetSessionInfo, + (ck_session_handle_t session, + struct ck_session_info *info)); +_CK_DECLARE_FUNCTION (C_GetOperationState, + (ck_session_handle_t session, + unsigned char *operation_state, + unsigned long *operation_state_len)); +_CK_DECLARE_FUNCTION (C_SetOperationState, + (ck_session_handle_t session, + unsigned char *operation_state, + unsigned long operation_state_len, + ck_object_handle_t encryption_key, + ck_object_handle_t authentiation_key)); +_CK_DECLARE_FUNCTION (C_Login, + (ck_session_handle_t session, ck_user_type_t user_type, + unsigned char *pin, unsigned long pin_len)); +_CK_DECLARE_FUNCTION (C_Logout, (ck_session_handle_t session)); + +_CK_DECLARE_FUNCTION (C_CreateObject, + (ck_session_handle_t session, + struct ck_attribute *templ, + unsigned long count, ck_object_handle_t *object)); +_CK_DECLARE_FUNCTION (C_CopyObject, + (ck_session_handle_t session, ck_object_handle_t object, + struct ck_attribute *templ, unsigned long count, + ck_object_handle_t *new_object)); +_CK_DECLARE_FUNCTION (C_DestroyObject, + (ck_session_handle_t session, + ck_object_handle_t object)); +_CK_DECLARE_FUNCTION (C_GetObjectSize, + (ck_session_handle_t session, + ck_object_handle_t object, + unsigned long *size)); +_CK_DECLARE_FUNCTION (C_GetAttributeValue, + (ck_session_handle_t session, + ck_object_handle_t object, + struct ck_attribute *templ, + unsigned long count)); +_CK_DECLARE_FUNCTION (C_SetAttributeValue, + (ck_session_handle_t session, + ck_object_handle_t object, + struct ck_attribute *templ, + unsigned long count)); +_CK_DECLARE_FUNCTION (C_FindObjectsInit, + (ck_session_handle_t session, + struct ck_attribute *templ, + unsigned long count)); +_CK_DECLARE_FUNCTION (C_FindObjects, + (ck_session_handle_t session, + ck_object_handle_t *object, + unsigned long max_object_count, + unsigned long *object_count)); +_CK_DECLARE_FUNCTION (C_FindObjectsFinal, + (ck_session_handle_t session)); + +_CK_DECLARE_FUNCTION (C_EncryptInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_Encrypt, + (ck_session_handle_t session, + unsigned char *data, unsigned long data_len, + unsigned char *encrypted_data, + unsigned long *encrypted_data_len)); +_CK_DECLARE_FUNCTION (C_EncryptUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len)); +_CK_DECLARE_FUNCTION (C_EncryptFinal, + (ck_session_handle_t session, + unsigned char *last_encrypted_part, + unsigned long *last_encrypted_part_len)); + +_CK_DECLARE_FUNCTION (C_DecryptInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_Decrypt, + (ck_session_handle_t session, + unsigned char *encrypted_data, + unsigned long encrypted_data_len, + unsigned char *data, unsigned long *data_len)); +_CK_DECLARE_FUNCTION (C_DecryptUpdate, + (ck_session_handle_t session, + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, unsigned long *part_len)); +_CK_DECLARE_FUNCTION (C_DecryptFinal, + (ck_session_handle_t session, + unsigned char *last_part, + unsigned long *last_part_len)); + +_CK_DECLARE_FUNCTION (C_DigestInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism)); +_CK_DECLARE_FUNCTION (C_Digest, + (ck_session_handle_t session, + unsigned char *data, unsigned long data_len, + unsigned char *digest, + unsigned long *digest_len)); +_CK_DECLARE_FUNCTION (C_DigestUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len)); +_CK_DECLARE_FUNCTION (C_DigestKey, + (ck_session_handle_t session, ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_DigestFinal, + (ck_session_handle_t session, + unsigned char *digest, + unsigned long *digest_len)); + +_CK_DECLARE_FUNCTION (C_SignInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_Sign, + (ck_session_handle_t session, + unsigned char *data, unsigned long data_len, + unsigned char *signature, + unsigned long *signature_len)); +_CK_DECLARE_FUNCTION (C_SignUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len)); +_CK_DECLARE_FUNCTION (C_SignFinal, + (ck_session_handle_t session, + unsigned char *signature, + unsigned long *signature_len)); +_CK_DECLARE_FUNCTION (C_SignRecoverInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_SignRecover, + (ck_session_handle_t session, + unsigned char *data, unsigned long data_len, + unsigned char *signature, + unsigned long *signature_len)); + +_CK_DECLARE_FUNCTION (C_VerifyInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_Verify, + (ck_session_handle_t session, + unsigned char *data, unsigned long data_len, + unsigned char *signature, + unsigned long signature_len)); +_CK_DECLARE_FUNCTION (C_VerifyUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len)); +_CK_DECLARE_FUNCTION (C_VerifyFinal, + (ck_session_handle_t session, + unsigned char *signature, + unsigned long signature_len)); +_CK_DECLARE_FUNCTION (C_VerifyRecoverInit, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t key)); +_CK_DECLARE_FUNCTION (C_VerifyRecover, + (ck_session_handle_t session, + unsigned char *signature, + unsigned long signature_len, + unsigned char *data, + unsigned long *data_len)); + +_CK_DECLARE_FUNCTION (C_DigestEncryptUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len)); +_CK_DECLARE_FUNCTION (C_DecryptDigestUpdate, + (ck_session_handle_t session, + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, + unsigned long *part_len)); +_CK_DECLARE_FUNCTION (C_SignEncryptUpdate, + (ck_session_handle_t session, + unsigned char *part, unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len)); +_CK_DECLARE_FUNCTION (C_DecryptVerifyUpdate, + (ck_session_handle_t session, + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, + unsigned long *part_len)); + +_CK_DECLARE_FUNCTION (C_GenerateKey, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + struct ck_attribute *templ, + unsigned long count, + ck_object_handle_t *key)); +_CK_DECLARE_FUNCTION (C_GenerateKeyPair, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + struct ck_attribute *public_key_template, + unsigned long public_key_attribute_count, + struct ck_attribute *private_key_template, + unsigned long private_key_attribute_count, + ck_object_handle_t *public_key, + ck_object_handle_t *private_key)); +_CK_DECLARE_FUNCTION (C_WrapKey, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t wrapping_key, + ck_object_handle_t key, + unsigned char *wrapped_key, + unsigned long *wrapped_key_len)); +_CK_DECLARE_FUNCTION (C_UnwrapKey, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t unwrapping_key, + unsigned char *wrapped_key, + unsigned long wrapped_key_len, + struct ck_attribute *templ, + unsigned long attribute_count, + ck_object_handle_t *key)); +_CK_DECLARE_FUNCTION (C_DeriveKey, + (ck_session_handle_t session, + struct ck_mechanism *mechanism, + ck_object_handle_t base_key, + struct ck_attribute *templ, + unsigned long attribute_count, + ck_object_handle_t *key)); + +_CK_DECLARE_FUNCTION (C_SeedRandom, + (ck_session_handle_t session, unsigned char *seed, + unsigned long seed_len)); +_CK_DECLARE_FUNCTION (C_GenerateRandom, + (ck_session_handle_t session, + unsigned char *random_data, + unsigned long random_len)); + +_CK_DECLARE_FUNCTION (C_GetFunctionStatus, (ck_session_handle_t session)); +_CK_DECLARE_FUNCTION (C_CancelFunction, (ck_session_handle_t session)); + + +struct ck_function_list +{ + struct ck_version version; + CK_C_Initialize C_Initialize; + CK_C_Finalize C_Finalize; + CK_C_GetInfo C_GetInfo; + CK_C_GetFunctionList C_GetFunctionList; + CK_C_GetSlotList C_GetSlotList; + CK_C_GetSlotInfo C_GetSlotInfo; + CK_C_GetTokenInfo C_GetTokenInfo; + CK_C_GetMechanismList C_GetMechanismList; + CK_C_GetMechanismInfo C_GetMechanismInfo; + CK_C_InitToken C_InitToken; + CK_C_InitPIN C_InitPIN; + CK_C_SetPIN C_SetPIN; + CK_C_OpenSession C_OpenSession; + CK_C_CloseSession C_CloseSession; + CK_C_CloseAllSessions C_CloseAllSessions; + CK_C_GetSessionInfo C_GetSessionInfo; + CK_C_GetOperationState C_GetOperationState; + CK_C_SetOperationState C_SetOperationState; + CK_C_Login C_Login; + CK_C_Logout C_Logout; + CK_C_CreateObject C_CreateObject; + CK_C_CopyObject C_CopyObject; + CK_C_DestroyObject C_DestroyObject; + CK_C_GetObjectSize C_GetObjectSize; + CK_C_GetAttributeValue C_GetAttributeValue; + CK_C_SetAttributeValue C_SetAttributeValue; + CK_C_FindObjectsInit C_FindObjectsInit; + CK_C_FindObjects C_FindObjects; + CK_C_FindObjectsFinal C_FindObjectsFinal; + CK_C_EncryptInit C_EncryptInit; + CK_C_Encrypt C_Encrypt; + CK_C_EncryptUpdate C_EncryptUpdate; + CK_C_EncryptFinal C_EncryptFinal; + CK_C_DecryptInit C_DecryptInit; + CK_C_Decrypt C_Decrypt; + CK_C_DecryptUpdate C_DecryptUpdate; + CK_C_DecryptFinal C_DecryptFinal; + CK_C_DigestInit C_DigestInit; + CK_C_Digest C_Digest; + CK_C_DigestUpdate C_DigestUpdate; + CK_C_DigestKey C_DigestKey; + CK_C_DigestFinal C_DigestFinal; + CK_C_SignInit C_SignInit; + CK_C_Sign C_Sign; + CK_C_SignUpdate C_SignUpdate; + CK_C_SignFinal C_SignFinal; + CK_C_SignRecoverInit C_SignRecoverInit; + CK_C_SignRecover C_SignRecover; + CK_C_VerifyInit C_VerifyInit; + CK_C_Verify C_Verify; + CK_C_VerifyUpdate C_VerifyUpdate; + CK_C_VerifyFinal C_VerifyFinal; + CK_C_VerifyRecoverInit C_VerifyRecoverInit; + CK_C_VerifyRecover C_VerifyRecover; + CK_C_DigestEncryptUpdate C_DigestEncryptUpdate; + CK_C_DecryptDigestUpdate C_DecryptDigestUpdate; + CK_C_SignEncryptUpdate C_SignEncryptUpdate; + CK_C_DecryptVerifyUpdate C_DecryptVerifyUpdate; + CK_C_GenerateKey C_GenerateKey; + CK_C_GenerateKeyPair C_GenerateKeyPair; + CK_C_WrapKey C_WrapKey; + CK_C_UnwrapKey C_UnwrapKey; + CK_C_DeriveKey C_DeriveKey; + CK_C_SeedRandom C_SeedRandom; + CK_C_GenerateRandom C_GenerateRandom; + CK_C_GetFunctionStatus C_GetFunctionStatus; + CK_C_CancelFunction C_CancelFunction; + CK_C_WaitForSlotEvent C_WaitForSlotEvent; +}; + + +typedef ck_rv_t (*ck_createmutex_t) (void **mutex); +typedef ck_rv_t (*ck_destroymutex_t) (void *mutex); +typedef ck_rv_t (*ck_lockmutex_t) (void *mutex); +typedef ck_rv_t (*ck_unlockmutex_t) (void *mutex); + + +struct ck_c_initialize_args +{ + ck_createmutex_t create_mutex; + ck_destroymutex_t destroy_mutex; + ck_lockmutex_t lock_mutex; + ck_unlockmutex_t unlock_mutex; + ck_flags_t flags; + void *reserved; +}; + + +#define CKF_LIBRARY_CANT_CREATE_OS_THREADS (1UL << 0) +#define CKF_OS_LOCKING_OK (1UL << 1) + +#define CKR_OK (0UL) +#define CKR_CANCEL (1UL) +#define CKR_HOST_MEMORY (2UL) +#define CKR_SLOT_ID_INVALID (3UL) +#define CKR_GENERAL_ERROR (5UL) +#define CKR_FUNCTION_FAILED (6UL) +#define CKR_ARGUMENTS_BAD (7UL) +#define CKR_NO_EVENT (8UL) +#define CKR_NEED_TO_CREATE_THREADS (9UL) +#define CKR_CANT_LOCK (0xaUL) +#define CKR_ATTRIBUTE_READ_ONLY (0x10UL) +#define CKR_ATTRIBUTE_SENSITIVE (0x11UL) +#define CKR_ATTRIBUTE_TYPE_INVALID (0x12UL) +#define CKR_ATTRIBUTE_VALUE_INVALID (0x13UL) +#define CKR_DATA_INVALID (0x20UL) +#define CKR_DATA_LEN_RANGE (0x21UL) +#define CKR_DEVICE_ERROR (0x30UL) +#define CKR_DEVICE_MEMORY (0x31UL) +#define CKR_DEVICE_REMOVED (0x32UL) +#define CKR_ENCRYPTED_DATA_INVALID (0x40UL) +#define CKR_ENCRYPTED_DATA_LEN_RANGE (0x41UL) +#define CKR_FUNCTION_CANCELED (0x50UL) +#define CKR_FUNCTION_NOT_PARALLEL (0x51UL) +#define CKR_FUNCTION_NOT_SUPPORTED (0x54UL) +#define CKR_KEY_HANDLE_INVALID (0x60UL) +#define CKR_KEY_SIZE_RANGE (0x62UL) +#define CKR_KEY_TYPE_INCONSISTENT (0x63UL) +#define CKR_KEY_NOT_NEEDED (0x64UL) +#define CKR_KEY_CHANGED (0x65UL) +#define CKR_KEY_NEEDED (0x66UL) +#define CKR_KEY_INDIGESTIBLE (0x67UL) +#define CKR_KEY_FUNCTION_NOT_PERMITTED (0x68UL) +#define CKR_KEY_NOT_WRAPPABLE (0x69UL) +#define CKR_KEY_UNEXTRACTABLE (0x6aUL) +#define CKR_MECHANISM_INVALID (0x70UL) +#define CKR_MECHANISM_PARAM_INVALID (0x71UL) +#define CKR_OBJECT_HANDLE_INVALID (0x82UL) +#define CKR_OPERATION_ACTIVE (0x90UL) +#define CKR_OPERATION_NOT_INITIALIZED (0x91UL) +#define CKR_PIN_INCORRECT (0xa0UL) +#define CKR_PIN_INVALID (0xa1UL) +#define CKR_PIN_LEN_RANGE (0xa2UL) +#define CKR_PIN_EXPIRED (0xa3UL) +#define CKR_PIN_LOCKED (0xa4UL) +#define CKR_SESSION_CLOSED (0xb0UL) +#define CKR_SESSION_COUNT (0xb1UL) +#define CKR_SESSION_HANDLE_INVALID (0xb3UL) +#define CKR_SESSION_PARALLEL_NOT_SUPPORTED (0xb4UL) +#define CKR_SESSION_READ_ONLY (0xb5UL) +#define CKR_SESSION_EXISTS (0xb6UL) +#define CKR_SESSION_READ_ONLY_EXISTS (0xb7UL) +#define CKR_SESSION_READ_WRITE_SO_EXISTS (0xb8UL) +#define CKR_SIGNATURE_INVALID (0xc0UL) +#define CKR_SIGNATURE_LEN_RANGE (0xc1UL) +#define CKR_TEMPLATE_INCOMPLETE (0xd0UL) +#define CKR_TEMPLATE_INCONSISTENT (0xd1UL) +#define CKR_TOKEN_NOT_PRESENT (0xe0UL) +#define CKR_TOKEN_NOT_RECOGNIZED (0xe1UL) +#define CKR_TOKEN_WRITE_PROTECTED (0xe2UL) +#define CKR_UNWRAPPING_KEY_HANDLE_INVALID (0xf0UL) +#define CKR_UNWRAPPING_KEY_SIZE_RANGE (0xf1UL) +#define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2UL) +#define CKR_USER_ALREADY_LOGGED_IN (0x100UL) +#define CKR_USER_NOT_LOGGED_IN (0x101UL) +#define CKR_USER_PIN_NOT_INITIALIZED (0x102UL) +#define CKR_USER_TYPE_INVALID (0x103UL) +#define CKR_USER_ANOTHER_ALREADY_LOGGED_IN (0x104UL) +#define CKR_USER_TOO_MANY_TYPES (0x105UL) +#define CKR_WRAPPED_KEY_INVALID (0x110UL) +#define CKR_WRAPPED_KEY_LEN_RANGE (0x112UL) +#define CKR_WRAPPING_KEY_HANDLE_INVALID (0x113UL) +#define CKR_WRAPPING_KEY_SIZE_RANGE (0x114UL) +#define CKR_WRAPPING_KEY_TYPE_INCONSISTENT (0x115UL) +#define CKR_RANDOM_SEED_NOT_SUPPORTED (0x120UL) +#define CKR_RANDOM_NO_RNG (0x121UL) +#define CKR_DOMAIN_PARAMS_INVALID (0x130UL) +#define CKR_BUFFER_TOO_SMALL (0x150UL) +#define CKR_SAVED_STATE_INVALID (0x160UL) +#define CKR_INFORMATION_SENSITIVE (0x170UL) +#define CKR_STATE_UNSAVEABLE (0x180UL) +#define CKR_CRYPTOKI_NOT_INITIALIZED (0x190UL) +#define CKR_CRYPTOKI_ALREADY_INITIALIZED (0x191UL) +#define CKR_MUTEX_BAD (0x1a0UL) +#define CKR_MUTEX_NOT_LOCKED (0x1a1UL) +#define CKR_FUNCTION_REJECTED (0x200UL) +#define CKR_VENDOR_DEFINED ((unsigned long) (1UL << 31)) + + + +/* Compatibility layer. */ + +#ifdef CRYPTOKI_COMPAT + +#undef CK_DEFINE_FUNCTION +#define CK_DEFINE_FUNCTION(retval, name) retval CK_SPEC name + +/* For NULL. */ +#include + +typedef unsigned char CK_BYTE; +typedef unsigned char CK_CHAR; +typedef unsigned char CK_UTF8CHAR; +typedef unsigned char CK_BBOOL; +typedef unsigned long int CK_ULONG; +typedef long int CK_LONG; +typedef CK_BYTE *CK_BYTE_PTR; +typedef CK_CHAR *CK_CHAR_PTR; +typedef CK_UTF8CHAR *CK_UTF8CHAR_PTR; +typedef CK_ULONG *CK_ULONG_PTR; +typedef void *CK_VOID_PTR; +typedef void **CK_VOID_PTR_PTR; +#define CK_FALSE 0 +#define CK_TRUE 1 +#ifndef CK_DISABLE_TRUE_FALSE +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#endif + +typedef struct ck_version CK_VERSION; +typedef struct ck_version *CK_VERSION_PTR; + +typedef struct ck_info CK_INFO; +typedef struct ck_info *CK_INFO_PTR; + +typedef ck_slot_id_t *CK_SLOT_ID_PTR; + +typedef struct ck_slot_info CK_SLOT_INFO; +typedef struct ck_slot_info *CK_SLOT_INFO_PTR; + +typedef struct ck_token_info CK_TOKEN_INFO; +typedef struct ck_token_info *CK_TOKEN_INFO_PTR; + +typedef ck_session_handle_t *CK_SESSION_HANDLE_PTR; + +typedef struct ck_session_info CK_SESSION_INFO; +typedef struct ck_session_info *CK_SESSION_INFO_PTR; + +typedef ck_object_handle_t *CK_OBJECT_HANDLE_PTR; + +typedef ck_object_class_t *CK_OBJECT_CLASS_PTR; + +typedef struct ck_attribute CK_ATTRIBUTE; +typedef struct ck_attribute *CK_ATTRIBUTE_PTR; + +typedef struct ck_date CK_DATE; +typedef struct ck_date *CK_DATE_PTR; + +typedef ck_mechanism_type_t *CK_MECHANISM_TYPE_PTR; + +typedef struct ck_mechanism CK_MECHANISM; +typedef struct ck_mechanism *CK_MECHANISM_PTR; + +typedef struct ck_mechanism_info CK_MECHANISM_INFO; +typedef struct ck_mechanism_info *CK_MECHANISM_INFO_PTR; + +typedef struct ck_function_list CK_FUNCTION_LIST; +typedef struct ck_function_list *CK_FUNCTION_LIST_PTR; +typedef struct ck_function_list **CK_FUNCTION_LIST_PTR_PTR; + +typedef struct ck_c_initialize_args CK_C_INITIALIZE_ARGS; +typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR; + +#define NULL_PTR NULL + +/* Delete the helper macros defined at the top of the file. */ +#undef ck_flags_t +#undef ck_version + +#undef ck_info +#undef cryptoki_version +#undef manufacturer_id +#undef library_description +#undef library_version + +#undef ck_notification_t +#undef ck_slot_id_t + +#undef ck_slot_info +#undef slot_description +#undef hardware_version +#undef firmware_version + +#undef ck_token_info +#undef serial_number +#undef max_session_count +#undef session_count +#undef max_rw_session_count +#undef rw_session_count +#undef max_pin_len +#undef min_pin_len +#undef total_public_memory +#undef free_public_memory +#undef total_private_memory +#undef free_private_memory +#undef utc_time + +#undef ck_session_handle_t +#undef ck_user_type_t +#undef ck_state_t + +#undef ck_session_info +#undef slot_id +#undef device_error + +#undef ck_object_handle_t +#undef ck_object_class_t +#undef ck_hw_feature_type_t +#undef ck_key_type_t +#undef ck_certificate_type_t +#undef ck_attribute_type_t + +#undef ck_attribute +#undef value +#undef value_len + +#undef ck_date + +#undef ck_mechanism_type_t + +#undef ck_mechanism +#undef parameter +#undef parameter_len + +#undef ck_mechanism_info +#undef min_key_size +#undef max_key_size + +#undef ck_rv_t +#undef ck_notify_t + +#undef ck_function_list + +#undef ck_createmutex_t +#undef ck_destroymutex_t +#undef ck_lockmutex_t +#undef ck_unlockmutex_t + +#undef ck_c_initialize_args +#undef create_mutex +#undef destroy_mutex +#undef lock_mutex +#undef unlock_mutex +#undef reserved + +#endif /* CRYPTOKI_COMPAT */ + + +/* System dependencies. */ +#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) +#pragma pack(pop, cryptoki) +#endif + +#if defined(__cplusplus) +} +#endif + +#endif /* PKCS11_H */ diff --git a/include/reactos/libs/gnutls/p11-kit/uri.h b/include/reactos/libs/gnutls/p11-kit/uri.h new file mode 100644 index 00000000000..64a8ec3b8c6 --- /dev/null +++ b/include/reactos/libs/gnutls/p11-kit/uri.h @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2011 Collabora Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * * The names of contributors to this software may not be + * used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * Author: Stef Walter + */ + +#ifndef P11_KIT_URI_H +#define P11_KIT_URI_H + +#include "p11-kit/pkcs11.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define P11_KIT_URI_SCHEME "pkcs11" +#define P11_KIT_URI_SCHEME_LEN 6 + +typedef enum { + P11_KIT_URI_OK = 0, + P11_KIT_URI_UNEXPECTED = -1, + P11_KIT_URI_BAD_SCHEME = -2, + P11_KIT_URI_BAD_ENCODING = -3, + P11_KIT_URI_BAD_SYNTAX = -4, + P11_KIT_URI_BAD_VERSION = -5, + P11_KIT_URI_NOT_FOUND = -6, +} P11KitUriResult; + +#define P11_KIT_URI_NO_MEMORY P11_KIT_URI_UNEXPECTED + +typedef enum { + P11_KIT_URI_FOR_OBJECT = (1 << 1), + P11_KIT_URI_FOR_TOKEN = (1 << 2), + P11_KIT_URI_FOR_MODULE = (1 << 3), + + P11_KIT_URI_FOR_MODULE_WITH_VERSION = + (1 << 4) | P11_KIT_URI_FOR_MODULE, + + P11_KIT_URI_FOR_OBJECT_ON_TOKEN = + P11_KIT_URI_FOR_OBJECT | P11_KIT_URI_FOR_TOKEN, + + P11_KIT_URI_FOR_OBJECT_ON_TOKEN_AND_MODULE = + P11_KIT_URI_FOR_OBJECT_ON_TOKEN | P11_KIT_URI_FOR_MODULE, + + P11_KIT_URI_FOR_ANY = 0x0000FFFF, +} P11KitUriType; + +/* + * If the caller is using the PKCS#11 GNU calling convention, then we cater + * to that here. + */ +#ifdef CRYPTOKI_GNU +typedef struct ck_info *CK_INFO_PTR; +typedef struct ck_token_info *CK_TOKEN_INFO_PTR; +typedef ck_attribute_type_t CK_ATTRIBUTE_TYPE; +typedef struct ck_attribute *CK_ATTRIBUTE_PTR; +typedef unsigned long int CK_ULONG; +typedef P11KitUriType p11_kit_uri_type_t; +typedef P11KitUriResult p11_kit_uri_result_t; +#endif + +typedef struct p11_kit_uri P11KitUri; +typedef struct p11_kit_uri p11_kit_uri; + +CK_INFO_PTR p11_kit_uri_get_module_info (P11KitUri *uri); + +int p11_kit_uri_match_module_info (P11KitUri *uri, + CK_INFO_PTR info); + +CK_TOKEN_INFO_PTR p11_kit_uri_get_token_info (P11KitUri *uri); + +int p11_kit_uri_match_token_info (P11KitUri *uri, + CK_TOKEN_INFO_PTR token_info); + +CK_ATTRIBUTE_PTR p11_kit_uri_get_attribute (P11KitUri *uri, + CK_ATTRIBUTE_TYPE attr_type); + +int p11_kit_uri_set_attribute (P11KitUri *uri, + CK_ATTRIBUTE_PTR attr); + +int p11_kit_uri_clear_attribute (P11KitUri *uri, + CK_ATTRIBUTE_TYPE attr_type); + +CK_ATTRIBUTE_PTR p11_kit_uri_get_attributes (P11KitUri *uri, + CK_ULONG *n_attrs); + +int p11_kit_uri_set_attributes (P11KitUri *uri, + CK_ATTRIBUTE_PTR attrs, + CK_ULONG n_attrs); + +void p11_kit_uri_clear_attributes (P11KitUri *uri); + +int p11_kit_uri_match_attributes (P11KitUri *uri, + CK_ATTRIBUTE_PTR attrs, + CK_ULONG n_attrs); + +const char* p11_kit_uri_get_pin_source (P11KitUri *uri); + +void p11_kit_uri_set_pin_source (P11KitUri *uri, + const char *pin_source); + +#ifndef P11_KIT_DISABLE_DEPRECATED + +const char* p11_kit_uri_get_pinfile (P11KitUri *uri); + +void p11_kit_uri_set_pinfile (P11KitUri *uri, + const char *pinfile); + +#endif /* P11_KIT_DISABLE_DEPRECATED */ + +void p11_kit_uri_set_unrecognized (P11KitUri *uri, + int unrecognized); + +int p11_kit_uri_any_unrecognized (P11KitUri *uri); + +P11KitUri* p11_kit_uri_new (void); + +int p11_kit_uri_format (P11KitUri *uri, + P11KitUriType uri_type, + char **string); + +int p11_kit_uri_parse (const char *string, + P11KitUriType uri_type, + P11KitUri *uri); + +void p11_kit_uri_free (P11KitUri *uri); + +const char* p11_kit_uri_message (int code); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* P11_KIT_URI_H */ diff --git a/include/reactos/libs/pseh/pseh2.h b/include/reactos/libs/pseh/pseh2.h index ff11f61d64b..ad3f1f2fbc8 100644 --- a/include/reactos/libs/pseh/pseh2.h +++ b/include/reactos/libs/pseh/pseh2.h @@ -37,7 +37,7 @@ #define _SEH2_LEAVE __leave #define _SEH2_VOLATILE -#elif defined(_USE_DUMMY_PSEH) || defined (__arm__) || defined(__clang__) || defined(_M_AMD64) +#elif defined(_USE_DUMMY_PSEH) || defined (__arm__) || defined(_M_AMD64) extern int _SEH2_Volatile0; extern int _SEH2_VolatileExceptionCode; diff --git a/include/reactos/libs/pseh/pseh3.h b/include/reactos/libs/pseh/pseh3.h index fee3b63fa8b..76eea6589f6 100644 --- a/include/reactos/libs/pseh/pseh3.h +++ b/include/reactos/libs/pseh/pseh3.h @@ -64,6 +64,9 @@ typedef struct _SEH3$_REGISTRATION_FRAME /* Except handler stores pointer to exception pointers here */ PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers; + /* Except handler stores the exception code here */ + unsigned long ExceptionCode; + /* Registers that we need to save */ unsigned long Esp; unsigned long Ebp; @@ -74,6 +77,9 @@ typedef struct _SEH3$_REGISTRATION_FRAME unsigned long Esi; unsigned long Edi; #endif +#ifdef __clang__ + void *ReturnAddress; +#endif } SEH3$_REGISTRATION_FRAME ,*PSEH3$_REGISTRATION_FRAME; /* Prevent gcc from inlining functions that use SEH. */ @@ -252,14 +258,14 @@ _SEH3$_AutoCleanup( /* Since we cannot use nested functions, we declare these globally as macros */ #define _abnormal_termination() (_SEH3$_TrylevelFrame.ExceptionPointers != 0) -#define _exception_code() (_SEH3$_TrylevelFrame.ExceptionPointers->ExceptionRecord->ExceptionCode) +#define _exception_code() (_SEH3$_TrylevelFrame.ExceptionCode) #define _exception_info() (_SEH3$_TrylevelFrame.ExceptionPointers) #else /* __cplusplus || __clang__ */ #define _SEH3$_DECLARE_EXCEPT_INTRINSICS() \ inline __attribute__((always_inline, gnu_inline)) \ - unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionPointers->ExceptionRecord->ExceptionCode; } + unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; } /* On GCC the filter function is a nested function with __fastcall calling convention. The eax register contains a base address the function uses @@ -284,7 +290,7 @@ _SEH3$_AutoCleanup( _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wshadow\"") \ inline __attribute__((always_inline, gnu_inline)) \ - unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionPointers->ExceptionRecord->ExceptionCode; } \ + unsigned long _exception_code() { return _SEH3$_TrylevelFrame.ExceptionCode; } \ inline __attribute__((always_inline, gnu_inline)) \ void * _exception_info() { return _SEH3$_TrylevelFrame.ExceptionPointers; } \ _Pragma("GCC diagnostic pop") \ diff --git a/include/reactos/subsys/win/basemsg.h b/include/reactos/subsys/win/basemsg.h index 620c7bcb0d2..a7be6805593 100644 --- a/include/reactos/subsys/win/basemsg.h +++ b/include/reactos/subsys/win/basemsg.h @@ -86,7 +86,7 @@ typedef struct _BASE_SXS_CREATEPROCESS_MSG UNICODE_STRING AssemblyName; } BASE_SXS_CREATEPROCESS_MSG, *PBASE_SXS_CREATEPROCESS_MSG; -typedef struct +typedef struct _BASE_CREATE_PROCESS { // // NT-type structure (BASE_CREATEPROCESS_MSG) @@ -104,23 +104,23 @@ typedef struct USHORT ProcessorArchitecture; } BASE_CREATE_PROCESS, *PBASE_CREATE_PROCESS; -typedef struct +typedef struct _BASE_CREATE_THREAD { HANDLE ThreadHandle; CLIENT_ID ClientId; } BASE_CREATE_THREAD, *PBASE_CREATE_THREAD; -typedef struct +typedef struct _BASE_GET_TEMP_FILE { UINT UniqueID; } BASE_GET_TEMP_FILE, *PBASE_GET_TEMP_FILE; -typedef struct +typedef struct _BASE_EXIT_PROCESS { UINT uExitCode; } BASE_EXIT_PROCESS, *PBASE_EXIT_PROCESS; -typedef struct +typedef struct _BASE_CHECK_VDM { ULONG iTask; HANDLE ConsoleHandle; @@ -152,7 +152,7 @@ typedef struct USHORT VDMState; } BASE_CHECK_VDM, *PBASE_CHECK_VDM; -typedef struct +typedef struct _BASE_UPDATE_VDM_ENTRY { ULONG iTask; ULONG BinaryType; @@ -163,7 +163,7 @@ typedef struct USHORT VDMCreationState; } BASE_UPDATE_VDM_ENTRY, *PBASE_UPDATE_VDM_ENTRY; -typedef struct +typedef struct _BASE_GET_NEXT_VDM_COMMAND { ULONG iTask; HANDLE ConsoleHandle; @@ -196,80 +196,80 @@ typedef struct ULONG fComingFromBat; } BASE_GET_NEXT_VDM_COMMAND, *PBASE_GET_NEXT_VDM_COMMAND; -typedef struct +typedef struct _BASE_EXIT_VDM { HANDLE ConsoleHandle; ULONG iWowTask; HANDLE WaitObjectForVDM; } BASE_EXIT_VDM, *PBASE_EXIT_VDM; -typedef struct +typedef struct _BASE_IS_FIRST_VDM { ULONG FirstVDM; } BASE_IS_FIRST_VDM, *PBASE_IS_FIRST_VDM; -typedef struct +typedef struct _BASE_GET_VDM_EXIT_CODE { HANDLE ConsoleHandle; HANDLE hParent; ULONG ExitCode; } BASE_GET_VDM_EXIT_CODE, *PBASE_GET_VDM_EXIT_CODE; -typedef struct +typedef struct _BASE_SET_REENTER_COUNT { HANDLE ConsoleHandle; ULONG fIncDec; } BASE_SET_REENTER_COUNT, *PBASE_SET_REENTER_COUNT; -typedef struct +typedef struct _BASE_GETSET_PROCESS_SHUTDOWN_PARAMS { ULONG ShutdownLevel; ULONG ShutdownFlags; } BASE_GETSET_PROCESS_SHUTDOWN_PARAMS, *PBASE_GETSET_PROCESS_SHUTDOWN_PARAMS; -typedef struct +typedef struct _BASE_GETSET_VDM_CURDIRS { HANDLE ConsoleHandle; PCHAR lpszzCurDirs; ULONG cchCurDirs; } BASE_GETSET_VDM_CURDIRS, *PBASE_GETSET_VDM_CURDIRS; -typedef struct +typedef struct _BASE_BAT_NOTIFICATION { HANDLE ConsoleHandle; ULONG fBeginEnd; } BASE_BAT_NOTIFICATION, *PBASE_BAT_NOTIFICATION; -typedef struct +typedef struct _BASE_REGISTER_WOWEXEC { HANDLE hwndWowExec; } BASE_REGISTER_WOWEXEC, *PBASE_REGISTER_WOWEXEC; -typedef struct +typedef struct _BASE_SOUND_SENTRY { ULONG VideoMode; } BASE_SOUND_SENTRY, *PBASE_SOUND_SENTRY; -typedef struct +typedef struct _BASE_REFRESH_INIFILE_MAPPING { UNICODE_STRING IniFileName; } BASE_REFRESH_INIFILE_MAPPING, *PBASE_REFRESH_INIFILE_MAPPING; -typedef struct +typedef struct _BASE_DEFINE_DOS_DEVICE { ULONG Flags; UNICODE_STRING DeviceName; UNICODE_STRING TargetPath; } BASE_DEFINE_DOS_DEVICE, *PBASE_DEFINE_DOS_DEVICE; -typedef struct +typedef struct _BASE_NLS_CREATE_SECTION { HANDLE SectionHandle; ULONG Type; ULONG LocaleId; } BASE_NLS_CREATE_SECTION, *PBASE_NLS_CREATE_SECTION; -typedef struct +typedef struct _BASE_NLS_GET_USER_INFO { PVOID /*PNLS_USER_INFO*/ NlsUserInfo; ULONG Size; diff --git a/include/reactos/subsys/win/conmsg.h b/include/reactos/subsys/win/conmsg.h index 1f047226d3d..42d83987d7f 100644 --- a/include/reactos/subsys/win/conmsg.h +++ b/include/reactos/subsys/win/conmsg.h @@ -119,6 +119,13 @@ typedef enum _CONSRV_API_NUMBER // typedef struct _CONSOLE_PROPERTIES { + INT IconIndex; + HICON hIcon; + HICON hIconSm; + DWORD dwHotKey; + DWORD dwStartupFlags; + + // NT_CONSOLE_PROPS WORD wFillAttribute; WORD wPopupFillAttribute; @@ -134,90 +141,88 @@ typedef struct _CONSOLE_PROPERTIES DWORD nFont; DWORD nInputBufferSize; COORD dwFontSize; - UINT uFontFamily; - UINT uFontWeight; + UINT uFontFamily; + UINT uFontWeight; WCHAR FaceName[LF_FACESIZE]; - UINT uCursorSize; - BOOL bFullScreen; - BOOL bQuickEdit; - BOOL bInsertMode; - BOOL bAutoPosition; - UINT uHistoryBufferSize; - UINT uNumberOfHistoryBuffers; - BOOL bHistoryNoDup; + UINT uCursorSize; + BOOL bFullScreen; + BOOL bQuickEdit; + BOOL bInsertMode; + BOOL bAutoPosition; + UINT uHistoryBufferSize; + UINT uNumberOfHistoryBuffers; + BOOL bHistoryNoDup; COLORREF ColorTable[16]; - //NT_FE_CONSOLE_PROPS + // NT_FE_CONSOLE_PROPS UINT uCodePage; } CONSOLE_PROPERTIES; -// -// To minimize code changes, some fields were put here even though they really only belong in -// CONSRV_API_CONNECTINFO. Do not change the ordering however, as it's required for Windows -// compatibility. -// typedef struct _CONSOLE_START_INFO -{ - INT IconIndex; - HICON IconHandle1; - HICON IconHandle2; - DWORD dwHotKey; - DWORD dwStartupFlags; - CONSOLE_PROPERTIES; - - BOOLEAN ConsoleNeeded; // Used for GUI apps only. - LPTHREAD_START_ROUTINE CtrlDispatcher; - LPTHREAD_START_ROUTINE ImeDispatcher; - LPTHREAD_START_ROUTINE PropDispatcher; - ULONG TitleLength; - WCHAR ConsoleTitle[MAX_PATH + 1]; // Console title or full path to the startup shortcut - ULONG DesktopLength; - PWCHAR DesktopPath; - ULONG AppNameLength; - WCHAR AppPath[128]; // Full path of the launched app - ULONG IconPathLength; - WCHAR IconPath[MAX_PATH + 1]; // Path to the file containing the icon -} CONSOLE_START_INFO, *PCONSOLE_START_INFO; - -typedef struct _CONSRV_API_CONNECTINFO { HANDLE ConsoleHandle; HANDLE InputWaitHandle; HANDLE InputHandle; HANDLE OutputHandle; HANDLE ErrorHandle; - HANDLE Event1; - HANDLE Event2; - /* Adapted from CONSOLE_ALLOCCONSOLE */ + HANDLE Events[2]; + + CONSOLE_PROPERTIES; +} CONSOLE_START_INFO, *PCONSOLE_START_INFO; + +#if defined(_M_IX86) +C_ASSERT(sizeof(CONSOLE_START_INFO) == 0xFC); +#endif + +typedef struct _CONSRV_API_CONNECTINFO +{ CONSOLE_START_INFO ConsoleStartInfo; + + BOOLEAN IsConsoleApp; + BOOLEAN IsWindowVisible; + + // USHORT Padding; + + LPTHREAD_START_ROUTINE CtrlRoutine; + LPTHREAD_START_ROUTINE PropRoutine; + LPTHREAD_START_ROUTINE ImeRoutine; + + ULONG TitleLength; + WCHAR ConsoleTitle[MAX_PATH + 1]; // Console title or full path to the startup shortcut + ULONG DesktopLength; + PWCHAR Desktop; + ULONG AppNameLength; + WCHAR AppName[128]; // Full path of the launched app + ULONG CurDirLength; + WCHAR CurDir[MAX_PATH + 1]; } CONSRV_API_CONNECTINFO, *PCONSRV_API_CONNECTINFO; #if defined(_M_IX86) C_ASSERT(sizeof(CONSRV_API_CONNECTINFO) == 0x638); #endif -typedef struct +typedef struct _CONSOLE_GETPROCESSLIST { HANDLE ConsoleHandle; ULONG ProcessCount; PDWORD ProcessIdsList; } CONSOLE_GETPROCESSLIST, *PCONSOLE_GETPROCESSLIST; -typedef struct +typedef struct _CONSOLE_GENERATECTRLEVENT { HANDLE ConsoleHandle; DWORD CtrlEvent; DWORD ProcessGroupId; } CONSOLE_GENERATECTRLEVENT, *PCONSOLE_GENERATECTRLEVENT; -typedef struct +typedef struct _CONSOLE_NOTIFYLASTCLOSE { HANDLE ConsoleHandle; } CONSOLE_NOTIFYLASTCLOSE, *PCONSOLE_NOTIFYLASTCLOSE; -typedef struct +typedef struct _CONSOLE_WRITECONSOLE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -236,7 +241,7 @@ typedef struct CHAR Reserved2[6]; } CONSOLE_WRITECONSOLE, *PCONSOLE_WRITECONSOLE; -typedef struct +typedef struct _CONSOLE_READCONSOLE { HANDLE ConsoleHandle; HANDLE InputHandle; @@ -255,37 +260,43 @@ typedef struct BOOLEAN Unicode; } CONSOLE_READCONSOLE, *PCONSOLE_READCONSOLE; -typedef struct +typedef struct _CONSOLE_ALLOCCONSOLE { PCONSOLE_START_INFO ConsoleStartInfo; - HANDLE ConsoleHandle; - HANDLE InputHandle; - HANDLE OutputHandle; - HANDLE ErrorHandle; - HANDLE InputWaitHandle; - LPTHREAD_START_ROUTINE CtrlDispatcher; - LPTHREAD_START_ROUTINE PropDispatcher; + ULONG TitleLength; + PWCHAR ConsoleTitle; // Console title or full path to the startup shortcut + ULONG DesktopLength; + PWCHAR Desktop; + ULONG AppNameLength; + PWCHAR AppName; // Full path of the launched app + ULONG CurDirLength; + PWCHAR CurDir; + + LPTHREAD_START_ROUTINE CtrlRoutine; + LPTHREAD_START_ROUTINE PropRoutine; } CONSOLE_ALLOCCONSOLE, *PCONSOLE_ALLOCCONSOLE; -typedef struct +typedef struct _CONSOLE_ATTACHCONSOLE { - DWORD ProcessId; // If ProcessId == ATTACH_PARENT_PROCESS == -1, then attach the current process to its parent process console. - HANDLE ConsoleHandle; - HANDLE InputHandle; - HANDLE OutputHandle; - HANDLE ErrorHandle; - HANDLE InputWaitHandle; - LPTHREAD_START_ROUTINE CtrlDispatcher; - LPTHREAD_START_ROUTINE PropDispatcher; + /* + * If ProcessId == ATTACH_PARENT_PROCESS == -1, then attach + * the current process to its parent process console. + */ + DWORD ProcessId; + + PCONSOLE_START_INFO ConsoleStartInfo; + + LPTHREAD_START_ROUTINE CtrlRoutine; + LPTHREAD_START_ROUTINE PropRoutine; } CONSOLE_ATTACHCONSOLE, *PCONSOLE_ATTACHCONSOLE; -typedef struct +typedef struct _CONSOLE_FREECONSOLE { HANDLE ConsoleHandle; } CONSOLE_FREECONSOLE, *PCONSOLE_FREECONSOLE; -typedef struct +typedef struct _CONSOLE_GETSCREENBUFFERINFO { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -297,14 +308,14 @@ typedef struct COORD MaximumViewSize; } CONSOLE_GETSCREENBUFFERINFO, *PCONSOLE_GETSCREENBUFFERINFO; -typedef struct +typedef struct _CONSOLE_SETCURSORPOSITION { HANDLE ConsoleHandle; HANDLE OutputHandle; COORD Position; } CONSOLE_SETCURSORPOSITION, *PCONSOLE_SETCURSORPOSITION; -typedef struct +typedef struct _CONSOLE_SHOWCURSOR { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -312,14 +323,14 @@ typedef struct INT RefCount; } CONSOLE_SHOWCURSOR, *PCONSOLE_SHOWCURSOR; -typedef struct +typedef struct _CONSOLE_SETCURSOR { HANDLE ConsoleHandle; HANDLE OutputHandle; HCURSOR CursorHandle; } CONSOLE_SETCURSOR, *PCONSOLE_SETCURSOR; -typedef struct +typedef struct _CONSOLE_GETSETCURSORINFO { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -330,33 +341,33 @@ typedef struct */ } CONSOLE_GETSETCURSORINFO, *PCONSOLE_GETSETCURSORINFO; -typedef struct +typedef struct _CONSOLE_GETMOUSEINFO { HANDLE ConsoleHandle; ULONG NumButtons; } CONSOLE_GETMOUSEINFO, *PCONSOLE_GETMOUSEINFO; -typedef struct +typedef struct _CONSOLE_SETTEXTATTRIB { HANDLE ConsoleHandle; HANDLE OutputHandle; WORD Attributes; } CONSOLE_SETTEXTATTRIB, *PCONSOLE_SETTEXTATTRIB; -typedef struct +typedef struct _CONSOLE_GETSETCONSOLEMODE { HANDLE ConsoleHandle; HANDLE Handle; DWORD Mode; } CONSOLE_GETSETCONSOLEMODE, *PCONSOLE_GETSETCONSOLEMODE; -typedef struct +typedef struct _CONSOLE_GETDISPLAYMODE { HANDLE ConsoleHandle; DWORD DisplayMode; // ModeFlags } CONSOLE_GETDISPLAYMODE, *PCONSOLE_GETDISPLAYMODE; -typedef struct +typedef struct _CONSOLE_SETDISPLAYMODE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -371,7 +382,7 @@ typedef struct #define CONSOLE_HARDWARE_STATE_GDI_MANAGED 0 #define CONSOLE_HARDWARE_STATE_DIRECT 1 -typedef struct +typedef struct _CONSOLE_GETSETHWSTATE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -381,7 +392,7 @@ typedef struct -typedef struct +typedef struct _CONSOLE_CREATESCREENBUFFER { HANDLE ConsoleHandle; DWORD DesiredAccess; @@ -399,20 +410,20 @@ typedef struct HANDLE OutputHandle; /* Handle to newly created screen buffer */ } CONSOLE_CREATESCREENBUFFER, *PCONSOLE_CREATESCREENBUFFER; -typedef struct +typedef struct _CONSOLE_SETACTIVESCREENBUFFER { HANDLE ConsoleHandle; HANDLE OutputHandle; /* Handle to screen buffer to switch to */ } CONSOLE_SETACTIVESCREENBUFFER, *PCONSOLE_SETACTIVESCREENBUFFER; -typedef struct +typedef struct _CONSOLE_INVALIDATEDIBITS { HANDLE ConsoleHandle; HANDLE OutputHandle; SMALL_RECT Region; } CONSOLE_INVALIDATEDIBITS, *PCONSOLE_INVALIDATEDIBITS; -typedef struct +typedef struct _CONSOLE_SETPALETTE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -420,7 +431,7 @@ typedef struct UINT Usage; } CONSOLE_SETPALETTE, *PCONSOLE_SETPALETTE; -typedef struct +typedef struct _CONSOLE_GETSETCONSOLETITLE { HANDLE ConsoleHandle; ULONG Length; @@ -428,13 +439,13 @@ typedef struct BOOLEAN Unicode; } CONSOLE_GETSETCONSOLETITLE, *PCONSOLE_GETSETCONSOLETITLE; -typedef struct +typedef struct _CONSOLE_FLUSHINPUTBUFFER { HANDLE ConsoleHandle; HANDLE InputHandle; } CONSOLE_FLUSHINPUTBUFFER, *PCONSOLE_FLUSHINPUTBUFFER; -typedef struct +typedef struct _CONSOLE_SCROLLSCREENBUFFER { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -466,7 +477,7 @@ typedef union _CODE_ELEMENT WORD Attribute; } CODE_ELEMENT; -typedef struct +typedef struct _CONSOLE_OUTPUTCODE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -487,7 +498,7 @@ typedef struct } CONSOLE_READOUTPUTCODE , *PCONSOLE_READOUTPUTCODE, CONSOLE_WRITEOUTPUTCODE, *PCONSOLE_WRITEOUTPUTCODE; -typedef struct +typedef struct _CONSOLE_FILLOUTPUTCODE { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -499,7 +510,7 @@ typedef struct ULONG NumCodes; } CONSOLE_FILLOUTPUTCODE, *PCONSOLE_FILLOUTPUTCODE; -typedef struct +typedef struct _CONSOLE_GETINPUT { HANDLE ConsoleHandle; HANDLE InputHandle; @@ -510,7 +521,7 @@ typedef struct BOOLEAN Unicode; } CONSOLE_GETINPUT, *PCONSOLE_GETINPUT; -typedef struct +typedef struct _CONSOLE_WRITEINPUT { HANDLE ConsoleHandle; HANDLE InputHandle; @@ -521,7 +532,7 @@ typedef struct BOOLEAN AppendToEnd; } CONSOLE_WRITEINPUT, *PCONSOLE_WRITEINPUT; -typedef struct +typedef struct _CONSOLE_READOUTPUT { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -533,7 +544,7 @@ typedef struct BOOLEAN Unicode; } CONSOLE_READOUTPUT, *PCONSOLE_READOUTPUT; -typedef struct +typedef struct _CONSOLE_WRITEOUTPUT { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -552,7 +563,7 @@ typedef struct BOOLEAN UseVirtualMemory; } CONSOLE_WRITEOUTPUT, *PCONSOLE_WRITEOUTPUT; -typedef struct +typedef struct _CONSOLE_GETNUMINPUTEVENTS { HANDLE ConsoleHandle; HANDLE InputHandle; @@ -561,20 +572,20 @@ typedef struct -typedef struct +typedef struct _CONSOLE_CLOSEHANDLE { HANDLE ConsoleHandle; HANDLE Handle; } CONSOLE_CLOSEHANDLE, *PCONSOLE_CLOSEHANDLE; -typedef struct +typedef struct _CONSOLE_VERIFYHANDLE { BOOL IsValid; HANDLE ConsoleHandle; HANDLE Handle; } CONSOLE_VERIFYHANDLE, *PCONSOLE_VERIFYHANDLE; -typedef struct +typedef struct _CONSOLE_DUPLICATEHANDLE { HANDLE ConsoleHandle; HANDLE SourceHandle; @@ -584,14 +595,14 @@ typedef struct HANDLE TargetHandle; } CONSOLE_DUPLICATEHANDLE, *PCONSOLE_DUPLICATEHANDLE; -typedef struct +typedef struct _CONSOLE_GETHANDLEINFO { HANDLE ConsoleHandle; HANDLE Handle; DWORD Flags; } CONSOLE_GETHANDLEINFO, *PCONSOLE_GETHANDLEINFO; -typedef struct +typedef struct _CONSOLE_SETHANDLEINFO { HANDLE ConsoleHandle; HANDLE Handle; @@ -608,7 +619,7 @@ typedef enum _CONSOLE_HANDLE_TYPE HANDLE_OUTPUT = 0x02 } CONSOLE_HANDLE_TYPE; -typedef struct +typedef struct _CONSOLE_OPENCONSOLE { HANDLE ConsoleHandle; CONSOLE_HANDLE_TYPE HandleType; @@ -620,14 +631,14 @@ typedef struct -typedef struct +typedef struct _CONSOLE_GETLARGESTWINDOWSIZE { HANDLE ConsoleHandle; HANDLE OutputHandle; COORD Size; } CONSOLE_GETLARGESTWINDOWSIZE, *PCONSOLE_GETLARGESTWINDOWSIZE; -typedef struct +typedef struct _CONSOLE_MENUCONTROL { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -636,13 +647,13 @@ typedef struct HMENU MenuHandle; } CONSOLE_MENUCONTROL, *PCONSOLE_MENUCONTROL; -typedef struct +typedef struct _CONSOLE_SETMENUCLOSE { HANDLE ConsoleHandle; BOOL Enable; } CONSOLE_SETMENUCLOSE, *PCONSOLE_SETMENUCLOSE; -typedef struct +typedef struct _CONSOLE_SETWINDOWINFO { HANDLE ConsoleHandle; HANDLE OutputHandle; @@ -651,13 +662,13 @@ typedef struct // or in the old window position frame (Absolute == FALSE). } CONSOLE_SETWINDOWINFO, *PCONSOLE_SETWINDOWINFO; -typedef struct +typedef struct _CONSOLE_GETWINDOW { HANDLE ConsoleHandle; HWND WindowHandle; } CONSOLE_GETWINDOW, *PCONSOLE_GETWINDOW; -typedef struct +typedef struct _CONSOLE_SETICON { HANDLE ConsoleHandle; HICON IconHandle; @@ -665,7 +676,7 @@ typedef struct -typedef struct +typedef struct _CONSOLE_ADDGETALIAS { HANDLE ConsoleHandle; USHORT SourceLength; @@ -678,7 +689,7 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_ADDGETALIAS, *PCONSOLE_ADDGETALIAS; -typedef struct +typedef struct _CONSOLE_GETALLALIASES { HANDLE ConsoleHandle; USHORT ExeLength; @@ -689,7 +700,7 @@ typedef struct PVOID AliasesBuffer; } CONSOLE_GETALLALIASES, *PCONSOLE_GETALLALIASES; -typedef struct +typedef struct _CONSOLE_GETALLALIASESLENGTH { HANDLE ConsoleHandle; USHORT ExeLength; @@ -699,7 +710,7 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_GETALLALIASESLENGTH, *PCONSOLE_GETALLALIASESLENGTH; -typedef struct +typedef struct _CONSOLE_GETALIASESEXES { HANDLE ConsoleHandle; ULONG Length ; // ExeLength; // ExesLength @@ -707,7 +718,7 @@ typedef struct BOOLEAN Unicode; } CONSOLE_GETALIASESEXES, *PCONSOLE_GETALIASESEXES; -typedef struct +typedef struct _CONSOLE_GETALIASESEXESLENGTH { HANDLE ConsoleHandle; ULONG Length; @@ -716,7 +727,7 @@ typedef struct -typedef struct +typedef struct _CONSOLE_GETCOMMANDHISTORY { HANDLE ConsoleHandle; ULONG HistoryLength; @@ -727,7 +738,7 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_GETCOMMANDHISTORY, *PCONSOLE_GETCOMMANDHISTORY; -typedef struct +typedef struct _CONSOLE_GETCOMMANDHISTORYLENGTH { HANDLE ConsoleHandle; ULONG HistoryLength; @@ -737,7 +748,7 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_GETCOMMANDHISTORYLENGTH, *PCONSOLE_GETCOMMANDHISTORYLENGTH; -typedef struct +typedef struct _CONSOLE_EXPUNGECOMMANDHISTORY { HANDLE ConsoleHandle; USHORT ExeLength; @@ -746,14 +757,14 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_EXPUNGECOMMANDHISTORY, *PCONSOLE_EXPUNGECOMMANDHISTORY; -typedef struct +typedef struct _CONSOLE_GETSETHISTORYINFO { UINT HistoryBufferSize; UINT NumberOfHistoryBuffers; DWORD dwFlags; } CONSOLE_GETSETHISTORYINFO, *PCONSOLE_GETSETHISTORYINFO; -typedef struct +typedef struct _CONSOLE_SETHISTORYNUMBERCOMMANDS { HANDLE ConsoleHandle; ULONG NumCommands; @@ -763,7 +774,7 @@ typedef struct BOOLEAN Unicode2; } CONSOLE_SETHISTORYNUMBERCOMMANDS, *PCONSOLE_SETHISTORYNUMBERCOMMANDS; -typedef struct +typedef struct _CONSOLE_SETHISTORYMODE { HANDLE ConsoleHandle; ULONG Mode; @@ -771,27 +782,27 @@ typedef struct -typedef struct +typedef struct _CONSOLE_SETSCREENBUFFERSIZE { HANDLE ConsoleHandle; HANDLE OutputHandle; COORD Size; } CONSOLE_SETSCREENBUFFERSIZE, *PCONSOLE_SETSCREENBUFFERSIZE; -typedef struct +typedef struct _CONSOLE_GETSELECTIONINFO { HANDLE ConsoleHandle; CONSOLE_SELECTION_INFO Info; } CONSOLE_GETSELECTIONINFO, *PCONSOLE_GETSELECTIONINFO; -typedef struct +typedef struct _CONSOLE_GETINPUTOUTPUTCP { HANDLE ConsoleHandle; UINT CodePage; BOOL OutputCP; // TRUE : Output Code Page ; FALSE : Input Code Page } CONSOLE_GETINPUTOUTPUTCP, *PCONSOLE_GETINPUTOUTPUTCP; -typedef struct +typedef struct _CONSOLE_SETINPUTOUTPUTCP { HANDLE ConsoleHandle; UINT CodePage; @@ -799,14 +810,14 @@ typedef struct HANDLE EventHandle; } CONSOLE_SETINPUTOUTPUTCP, *PCONSOLE_SETINPUTOUTPUTCP; -typedef struct +typedef struct _CONSOLE_GETKBDLAYOUTNAME { HANDLE ConsoleHandle; CHAR LayoutBuffer[KL_NAMELENGTH * sizeof(WCHAR)]; // Can hold up to 9 wchars BOOL Ansi; } CONSOLE_GETKBDLAYOUTNAME, *PCONSOLE_GETKBDLAYOUTNAME; -typedef struct +typedef struct _CONSOLE_REGISTERVDM { HANDLE ConsoleHandle; ULONG RegisterFlags; diff --git a/include/reactos/wine/config.h b/include/reactos/wine/config.h index 36bb5c2a0a1..25b7d071a31 100644 --- a/include/reactos/wine/config.h +++ b/include/reactos/wine/config.h @@ -2,7 +2,8 @@ /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ #ifndef DECLSPEC_HOTPATCH -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__clang__) +/* FIXME: http://llvm.org/bugs/show_bug.cgi?id=20888 */ #define DECLSPEC_HOTPATCH #else #define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__)) @@ -1226,7 +1227,7 @@ /* #undef SONAME_LIBGLU */ /* Define to the soname of the libgnutls library. */ -/* #unef SONAME_LIBGNUTLS */ +#define SONAME_LIBGNUTLS L"libgnutls-28.dll" /* Define to the soname of the libgsm library. */ /* #undef SONAME_LIBGSM */ diff --git a/include/reactos/wine/list.h b/include/reactos/wine/list.h index 0cbbdc68845..05b2df3fd4a 100644 --- a/include/reactos/wine/list.h +++ b/include/reactos/wine/list.h @@ -24,8 +24,8 @@ #ifdef __cplusplus #define __WINE_SERVER_LIST_INLINE inline #else -#if defined(__GNUC__) && !defined(__clang__) -#define __WINE_SERVER_LIST_INLINE extern __inline__ __attribute__((__always_inline__)) +#if defined(__GNUC__) +#define __WINE_SERVER_LIST_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) #elif defined(_MSC_VER) #define __WINE_SERVER_LIST_INLINE __inline #else diff --git a/include/xdk/generate.bat b/include/xdk/generate.bat index af0c9454ce5..fd1860183f5 100644 --- a/include/xdk/generate.bat +++ b/include/xdk/generate.bat @@ -4,3 +4,5 @@ hpp.exe wdm.template.h wdm.h hpp.exe ntddk.template.h ntddk.h hpp.exe ntifs.template.h ntifs.h hpp.exe devioctl.template.h devioctl.h +hpp.exe ntdef.template.h ..\psdk\ntdef.h +hpp.exe winnt.template.h ..\psdk\winnt.h diff --git a/include/xdk/interlocked.h b/include/xdk/interlocked.h index 346f1f1e3a5..d64920fc6f8 100644 --- a/include/xdk/interlocked.h +++ b/include/xdk/interlocked.h @@ -1,51 +1,6 @@ /****************************************************************************** * INTERLOCKED Functions * ******************************************************************************/ -// -// Intrinsics (note: taken from our winnt.h) -// FIXME: 64-bit -// -#if defined(__GNUC__) - -static __inline__ BOOLEAN -InterlockedBitTestAndSet( - _Inout_updates_bytes_((Bit+7)/8) _Interlocked_operand_ LONG volatile *Base, - _In_ LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btsl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedOr(Base, 1 << Bit) >> Bit) & 1; -#endif -} - -static __inline__ BOOLEAN -InterlockedBitTestAndReset( - _Inout_updates_bytes_((Bit+7)/8) _Interlocked_operand_ LONG volatile *Base, - _In_ LONG Bit) -{ -#if defined(_M_IX86) - LONG OldBit; - __asm__ __volatile__("lock " - "btrl %2,%1\n\t" - "sbbl %0,%0\n\t" - :"=r" (OldBit),"+m" (*Base) - :"Ir" (Bit) - : "memory"); - return OldBit; -#else - return (_InterlockedAnd(Base, ~(1 << Bit)) >> Bit) & 1; -#endif -} - -#endif /* defined(__GNUC__) */ #define BitScanForward _BitScanForward #define BitScanReverse _BitScanReverse diff --git a/include/xdk/ntbasedef.h b/include/xdk/ntbasedef.h new file mode 100644 index 00000000000..130742ab782 --- /dev/null +++ b/include/xdk/ntbasedef.h @@ -0,0 +1,1321 @@ +/* Defines the "size" of an any-size array */ +#ifndef ANYSIZE_ARRAY +#define ANYSIZE_ARRAY 1 +#endif + +/* Helper macro to enable gcc's extension. */ +#ifndef __GNU_EXTENSION + #ifdef __GNUC__ + #define __GNU_EXTENSION __extension__ + #else + #define __GNU_EXTENSION + #endif +#endif /* __GNU_EXTENSION */ + +#ifndef DUMMYUNIONNAME + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_UNION + #define _UNION_NAME(x) x + #define DUMMYUNIONNAME u + #define DUMMYUNIONNAME1 u1 + #define DUMMYUNIONNAME2 u2 + #define DUMMYUNIONNAME3 u3 + #define DUMMYUNIONNAME4 u4 + #define DUMMYUNIONNAME5 u5 + #define DUMMYUNIONNAME6 u6 + #define DUMMYUNIONNAME7 u7 + #define DUMMYUNIONNAME8 u8 + #define DUMMYUNIONNAME9 u9 + #else + #define _ANONYMOUS_UNION __GNU_EXTENSION + #define _UNION_NAME(x) + #define DUMMYUNIONNAME + #define DUMMYUNIONNAME1 + #define DUMMYUNIONNAME2 + #define DUMMYUNIONNAME3 + #define DUMMYUNIONNAME4 + #define DUMMYUNIONNAME5 + #define DUMMYUNIONNAME6 + #define DUMMYUNIONNAME7 + #define DUMMYUNIONNAME8 + #define DUMMYUNIONNAME9 + #endif /* NONAMELESSUNION */ +#endif /* !DUMMYUNIONNAME */ + +#ifndef DUMMYSTRUCTNAME + #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS) + #define _ANONYMOUS_STRUCT + #define _STRUCT_NAME(x) x + #define DUMMYSTRUCTNAME s + #define DUMMYSTRUCTNAME1 s1 + #define DUMMYSTRUCTNAME2 s2 + #define DUMMYSTRUCTNAME3 s3 + #define DUMMYSTRUCTNAME4 s4 + #define DUMMYSTRUCTNAME5 s5 + #else + #define _ANONYMOUS_STRUCT __GNU_EXTENSION + #define _STRUCT_NAME(x) + #define DUMMYSTRUCTNAME + #define DUMMYSTRUCTNAME1 + #define DUMMYSTRUCTNAME2 + #define DUMMYSTRUCTNAME3 + #define DUMMYSTRUCTNAME4 + #define DUMMYSTRUCTNAME5 + #endif /* NONAMELESSUNION */ +#endif /* DUMMYSTRUCTNAME */ + +#if defined(STRICT_GS_ENABLED) + #pragma strict_gs_check(push, on) +#endif + +#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM) + #define ALIGNMENT_MACHINE + #define UNALIGNED __unaligned + #if defined(_WIN64) + #define UNALIGNED64 __unaligned + #else + #define UNALIGNED64 + #endif +#else + #undef ALIGNMENT_MACHINE + #define UNALIGNED + #define UNALIGNED64 +#endif + +#if defined(_WIN64) || defined(_M_ALPHA) + #define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG) + #define MEMORY_ALLOCATION_ALIGNMENT 16 +#else + #define MAX_NATURAL_ALIGNMENT sizeof($ULONG) + #define MEMORY_ALLOCATION_ALIGNMENT 8 +#endif + +/* C99 restrict support */ +#if defined(ENABLE_RESTRICTED) && defined(_M_MRX000) && !defined(MIDL_PASS) && !defined(RC_INVOKED) + #define RESTRICTED_POINTER __restrict +#else + #define RESTRICTED_POINTER +#endif + +/* Returns the base address of a structure from a structure member */ +#ifndef CONTAINING_RECORD + #define CONTAINING_RECORD(address, type, field) \ + ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field)))) +#endif + +/* Returns the byte offset of the specified structure's member */ +#ifndef __GNUC__ + #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field)) +#else + #define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field)) +#endif /* __GNUC__ */ + +/* Returns the type's alignment */ +#if defined(_MSC_VER) + #define TYPE_ALIGNMENT(t) __alignof(t) +#else + #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test) +#endif /* _MSC_VER */ + +#if defined(_AMD64_) || defined(_X86_) + #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT($ULONG) +#elif defined(_IA64_) || defined(_ARM_) + #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT($ULONG)) +#else + #error "unknown architecture" +#endif + +#if defined(_WIN64) + #define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT($ULONG) +#endif /* _WIN64 */ + +#ifdef __cplusplus + #define EXTERN_C extern "C" +#else + #define EXTERN_C extern +#endif /* __cplusplus */ + +#define NTAPI __stdcall + +#ifndef STDMETHODCALLTYPE + #define STDMETHODCALLTYPE __stdcall + #define STDMETHODVCALLTYPE __cdecl + #define STDAPICALLTYPE __stdcall + #define STDAPIVCALLTYPE __cdecl + #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE + #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE + #define STDMETHODIMP HRESULT STDMETHODCALLTYPE + #define STDMETHODIMP_(t) t STDMETHODCALLTYPE + #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE + #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE + #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE + #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE +#endif /* !STDMETHODCALLTYPE */ + +#define STDOVERRIDEMETHODIMP __override STDMETHODIMP +#define STDOVERRIDEMETHODIMP_(t) __override STDMETHODIMP_(t) +#define IFACEMETHODIMP __override STDMETHODIMP +#define IFACEMETHODIMP_(t) __override STDMETHODIMP_(t) +#define STDOVERRIDEMETHODIMPV __override STDMETHODIMPV +#define STDOVERRIDEMETHODIMPV_(t) __override STDMETHODIMPV_(t) +#define IFACEMETHODIMPV __override STDMETHODIMPV +#define IFACEMETHODIMPV_(t) __override STDMETHODIMPV_(t) + +/* Import and Export Specifiers */ + +/* Done the same way as in windef.h for now */ +#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? +#define DECLSPEC_NORETURN __declspec(noreturn) + +#ifndef DECLSPEC_ADDRSAFE + #if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64)) + #define DECLSPEC_ADDRSAFE __declspec(address_safe) + #else + #define DECLSPEC_ADDRSAFE + #endif +#endif /* DECLSPEC_ADDRSAFE */ + +#ifndef DECLSPEC_NOTHROW + #if !defined(MIDL_PASS) + #define DECLSPEC_NOTHROW __declspec(nothrow) + #else + #define DECLSPEC_NOTHROW + #endif +#endif /* DECLSPEC_NOTHROW */ + +#ifndef NOP_FUNCTION + #if defined(_MSC_VER) + #define NOP_FUNCTION __noop + #else + #define NOP_FUNCTION (void)0 + #endif +#endif /* NOP_FUNCTION */ + +#if !defined(_NTSYSTEM_) + #define NTSYSAPI DECLSPEC_IMPORT + #define NTSYSCALLAPI DECLSPEC_IMPORT +#else + #define NTSYSAPI + #if defined(_NTDLLBUILD_) + #define NTSYSCALLAPI + #else + #define NTSYSCALLAPI DECLSPEC_ADDRSAFE + #endif +#endif /* _NTSYSTEM_ */ + +/* Inlines */ +#ifndef FORCEINLINE + #if defined(_MSC_VER) + #define FORCEINLINE __forceinline + #elif ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) + #define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__)) + #else + #define FORCEINLINE extern __inline__ __attribute__((__always_inline__)) + #endif +#endif /* FORCEINLINE */ + +#ifndef DECLSPEC_NOINLINE + #if (_MSC_VER >= 1300) + #define DECLSPEC_NOINLINE __declspec(noinline) + #elif defined(__GNUC__) + #define DECLSPEC_NOINLINE __attribute__((noinline)) + #else + #define DECLSPEC_NOINLINE + #endif +#endif /* DECLSPEC_NOINLINE */ + +#if !defined(_M_CEE_PURE) + #define NTAPI_INLINE NTAPI +#else + #define NTAPI_INLINE +#endif /* _M_CEE_PURE */ + +/* Use to specify structure alignment. Note: VS and GCC behave slightly + different. Therefore it is important to stick to the following rules: + - If you want a struct to be aligned, put DECLSPEC_ALIGN after "struct": + "typedef struct DECLSPEC_ALIGN(16) _FOO { ... } FOO, *PFOO;" + _alignof(PFOO) is sizeof(void*) here as usual. + - If you don't want the struct, but only the typedef to be aligned, + use an extra typedef. + struct _BAR { ... }; + typedef DECLSPEC_ALIGN(16) struct _BAR BAR, *ALIGNEDPBAR; + _alignof(ALIGNEDPBAR) is 16 now! */ +#ifndef DECLSPEC_ALIGN + #if defined(_MSC_VER) && !defined(MIDL_PASS) + #define DECLSPEC_ALIGN(x) __declspec(align(x)) + #elif defined(__GNUC__) + #define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) + #else + #define DECLSPEC_ALIGN(x) + #endif +#endif /* DECLSPEC_ALIGN */ + +#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE + #if defined(_AMD64_) || defined(_X86_) + #define SYSTEM_CACHE_ALIGNMENT_SIZE 64 + #else + #define SYSTEM_CACHE_ALIGNMENT_SIZE 128 + #endif +#endif /* SYSTEM_CACHE_ALIGNMENT_SIZE */ + +#ifndef DECLSPEC_CACHEALIGN + #define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE) +#endif /* DECLSPEC_CACHEALIGN */ + +#ifndef DECLSPEC_UUID + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_UUID(x) __declspec(uuid(x)) + #else + #define DECLSPEC_UUID(x) + #endif +#endif /* DECLSPEC_UUID */ + +#ifndef DECLSPEC_NOVTABLE + #if defined(_MSC_VER) && defined(__cplusplus) + #define DECLSPEC_NOVTABLE __declspec(novtable) + #else + #define DECLSPEC_NOVTABLE + #endif +#endif /* DECLSPEC_NOVTABLE */ + +#ifndef DECLSPEC_SELECTANY + #if defined(_MSC_VER) || defined(__GNUC__) + #define DECLSPEC_SELECTANY __declspec(selectany) + #else + #define DECLSPEC_SELECTANY + #endif +#endif /* DECLSPEC_SELECTANY */ + +#ifndef DECLSPEC_DEPRECATED + #if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS) + #define DECLSPEC_DEPRECATED __declspec(deprecated) + #define DEPRECATE_SUPPORTED + #else + #define DECLSPEC_DEPRECATED + #undef DEPRECATE_SUPPORTED + #endif +#endif /* DECLSPEC_DEPRECATED */ + +#ifdef DEPRECATE_DDK_FUNCTIONS + #ifdef _NTDDK_ + #define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED + #ifdef DEPRECATE_SUPPORTED + #define PRAGMA_DEPRECATED_DDK 1 + #endif + #else + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 1 + #endif +#else + #define DECLSPEC_DEPRECATED_DDK + #define PRAGMA_DEPRECATED_DDK 0 +#endif /* DEPRECATE_DDK_FUNCTIONS */ + +/* Use to silence unused variable warnings when it is intentional */ +#define UNREFERENCED_PARAMETER(P) {(P)=(P);} +#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) +#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);} +#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L)) + +/* Void Pointers */ +typedef void *PVOID; +typedef void * POINTER_64 PVOID64; + +/* Handle Type */ +typedef void *HANDLE, **PHANDLE;; +#ifdef STRICT + #define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n +#else + #define DECLARE_HANDLE(n) typedef HANDLE n +#endif + +/* Upper-Case Versions of Some Standard C Types */ +#ifndef VOID + #define VOID void + typedef char CHAR; + typedef short SHORT; + + #if defined(__ROS_LONG64__) && !defined(_M_AMD64) + typedef int LONG; + #else + typedef long LONG; + #endif + + #if !defined(MIDL_PASS) + typedef int INT; + #endif /* !MIDL_PASS */ +#endif /* VOID */ + +$if(_NTDEF_) +/* Unsigned Types */ +typedef unsigned char UCHAR, *PUCHAR; +typedef unsigned short USHORT, *PUSHORT; +typedef unsigned long ULONG, *PULONG; + +typedef CONST UCHAR *PCUCHAR; +typedef CONST USHORT *PCUSHORT; +typedef CONST ULONG *PCULONG; + +typedef double DOUBLE; +$endif(_NTDEF_) + +/* Signed Types */ +typedef SHORT *PSHORT; +typedef LONG *PLONG; + +/* Flag types */ +typedef unsigned char FCHAR; +typedef unsigned short FSHORT; +typedef unsigned long FLONG; + +typedef unsigned char BOOLEAN, *PBOOLEAN; +$if(_NTDEF_) +typedef ULONG LOGICAL, *PLOGICAL; +typedef _Return_type_success_(return >= 0) LONG NTSTATUS, *PNTSTATUS;; +typedef signed char SCHAR, *PSCHAR; +$endif(_NTDEF_) + +#ifndef _HRESULT_DEFINED + #define _HRESULT_DEFINED + typedef _Return_type_success_(return >= 0) LONG HRESULT; +#endif /* _HRESULT_DEFINED */ + +/* 64-bit types */ +#define _ULONGLONG_ +__GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG; +__GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG; +#define _DWORDLONG_ +typedef ULONGLONG DWORDLONG, *PDWORDLONG; + +/* Update Sequence Number */ +typedef LONGLONG USN; + +/* ANSI (Multi-byte Character) types */ +typedef CHAR *PCHAR, *LPCH, *PCH, *PNZCH; +typedef CONST CHAR *LPCCH, *PCCH, *PCNZCH; +typedef _Null_terminated_ CHAR *NPSTR, *LPSTR, *PSTR; +typedef _Null_terminated_ PSTR *PZPSTR; +typedef _Null_terminated_ CONST PSTR *PCZPSTR; +typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR; +typedef _Null_terminated_ PCSTR *PZPCSTR; + +typedef _NullNull_terminated_ CHAR *PZZSTR; +typedef _NullNull_terminated_ CONST CHAR *PCZZSTR; + +$if(_NTDEF_) +/* Pointer to an Asciiz string */ +typedef _Null_terminated_ CHAR *PSZ; +typedef _Null_terminated_ CONST char *PCSZ; +$endif(_NTDEF_) + +/* UNICODE (Wide Character) types */ +typedef wchar_t WCHAR; +typedef WCHAR *PWCHAR, *LPWCH, *PWCH; +typedef CONST WCHAR *LPCWCH, *PCWCH; +typedef _Null_terminated_ WCHAR *NWPSTR, *LPWSTR, *PWSTR; +typedef _Null_terminated_ PWSTR *PZPWSTR; +typedef _Null_terminated_ CONST PWSTR *PCZPWSTR; +typedef _Null_terminated_ WCHAR UNALIGNED *LPUWSTR, *PUWSTR; +typedef _Null_terminated_ CONST WCHAR *LPCWSTR, *PCWSTR; +typedef _Null_terminated_ PCWSTR *PZPCWSTR; +typedef _Null_terminated_ CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR; + +typedef _NullNull_terminated_ WCHAR *PZZWSTR; +typedef _NullNull_terminated_ CONST WCHAR *PCZZWSTR; +typedef _NullNull_terminated_ WCHAR UNALIGNED *PUZZWSTR; +typedef _NullNull_terminated_ CONST WCHAR UNALIGNED *PCUZZWSTR; + +typedef WCHAR *PNZWCH; +typedef CONST WCHAR *PCNZWCH; +typedef WCHAR UNALIGNED *PUNZWCH; +typedef CONST WCHAR UNALIGNED *PCUNZWCH; + +#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS)) + typedef CONST WCHAR *LPCWCHAR, *PCWCHAR; + typedef CONST WCHAR UNALIGNED *LPCUWCHAR, *PCUWCHAR; + typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR; + typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR; + typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR; + typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR; + #define UCSCHAR_INVALID_CHARACTER (0xffffffff) + #define MIN_UCSCHAR (0) + #define MAX_UCSCHAR (0x0010FFFF) +#endif /* _WIN32_WINNT >= 0x0600 */ + +#ifdef UNICODE + + #ifndef _TCHAR_DEFINED + typedef WCHAR TCHAR, *PTCHAR; +$if(_NTDEF_) + typedef WCHAR TUCHAR, *PTUCHAR; +$endif(_NTDEF_) +$if(_WINNT_) + typedef WCHAR TBYTE, *PTBYTE; +$endif(_WINNT_) + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + + typedef LPWCH LPTCH, PTCH; + typedef LPCWCH LPCTCH, PCTCH; + typedef LPWSTR PTSTR, LPTSTR; + typedef LPCWSTR PCTSTR, LPCTSTR; + typedef LPUWSTR PUTSTR, LPUTSTR; + typedef LPCUWSTR PCUTSTR, LPCUTSTR; + typedef LPWSTR LP; + typedef PZZWSTR PZZTSTR; + typedef PCZZWSTR PCZZTSTR; + typedef PUZZWSTR PUZZTSTR; + typedef PCUZZWSTR PCUZZTSTR; + typedef PZPWSTR PZPTSTR; + typedef PNZWCH PNZTCH; + typedef PCNZWCH PCNZTCH; + typedef PUNZWCH PUNZTCH; + typedef PCUNZWCH PCUNZTCH; + #define __TEXT(quote) L##quote + +#else /* UNICODE */ + + #ifndef _TCHAR_DEFINED + typedef char TCHAR, *PTCHAR; +$if(_NTDEF_) + typedef unsigned char TUCHAR, *PTUCHAR; +$endif(_NTDEF_) +$if(_WINNT_) + typedef unsigned char TBYTE, *PTBYTE; +$endif(_WINNT_) + #define _TCHAR_DEFINED + #endif /* !_TCHAR_DEFINED */ + typedef LPCH LPTCH, PTCH; + typedef LPCCH LPCTCH, PCTCH; + typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; + typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; + typedef PZZSTR PZZTSTR, PUZZTSTR; + typedef PCZZSTR PCZZTSTR, PCUZZTSTR; + typedef PZPSTR PZPTSTR; + typedef PNZCH PNZTCH, PUNZTCH; + typedef PCNZCH PCNZTCH, PCUNZTCH; + #define __TEXT(quote) quote + +#endif /* UNICODE */ + +#define TEXT(quote) __TEXT(quote) + +/* Cardinal Data Types */ +typedef char CCHAR; +$if(_NTDEF_) +typedef CCHAR *PCCHAR; +typedef short CSHORT, *PCSHORT; +typedef ULONG CLONG, *PCLONG; +$endif(_NTDEF_) + +/* NLS basics (Locale and Language Ids) */ +typedef $ULONG LCID, *PLCID; +typedef $USHORT LANGID; + +#ifndef __COMPARTMENT_ID_DEFINED__ +#define __COMPARTMENT_ID_DEFINED__ +typedef enum +{ + UNSPECIFIED_COMPARTMENT_ID = 0, + DEFAULT_COMPARTMENT_ID +} COMPARTMENT_ID, *PCOMPARTMENT_ID; +#endif /* __COMPARTMENT_ID_DEFINED__ */ + +#ifndef __OBJECTID_DEFINED +#define __OBJECTID_DEFINED +typedef struct _OBJECTID { + GUID Lineage; + $ULONG Uniquifier; +} OBJECTID; +#endif /* __OBJECTID_DEFINED */ + +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4201) // nameless struct / union +#endif + +typedef struct +#if defined(_M_IA64) +DECLSPEC_ALIGN(16) +#endif +_FLOAT128 { + __int64 LowPart; + __int64 HighPart; +} FLOAT128; +typedef FLOAT128 *PFLOAT128; + +/* Large Integer Unions */ +#if defined(MIDL_PASS) +typedef struct _LARGE_INTEGER { +#else +typedef union _LARGE_INTEGER { + _ANONYMOUS_STRUCT struct + { + $ULONG LowPart; + LONG HighPart; + } DUMMYSTRUCTNAME; + struct + { + $ULONG LowPart; + LONG HighPart; + } u; +#endif /* MIDL_PASS */ + LONGLONG QuadPart; +} LARGE_INTEGER, *PLARGE_INTEGER; + +#if defined(MIDL_PASS) +typedef struct _ULARGE_INTEGER { +#else +typedef union _ULARGE_INTEGER { + _ANONYMOUS_STRUCT struct + { + $ULONG LowPart; + $ULONG HighPart; + } DUMMYSTRUCTNAME; + struct + { + $ULONG LowPart; + $ULONG HighPart; + } u; +#endif /* MIDL_PASS */ + ULONGLONG QuadPart; +} ULARGE_INTEGER, *PULARGE_INTEGER; + +#ifdef _MSC_VER +#pragma warning(pop) /* disable:4201 */ +#endif + +/* Locally Unique Identifier */ +typedef struct _LUID +{ + $ULONG LowPart; + LONG HighPart; +} LUID, *PLUID; + +#define APPLICATION_ERROR_MASK 0x20000000 +#define ERROR_SEVERITY_SUCCESS 0x00000000 +#define ERROR_SEVERITY_INFORMATIONAL 0x40000000 +#define ERROR_SEVERITY_WARNING 0x80000000 +#define ERROR_SEVERITY_ERROR 0xC0000000 + +$if(_NTDEF_) +/* Native API Return Value Macros */ +#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) +#define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1) +#define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2) +#define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3) +$endif(_NTDEF_) + +#define ANSI_NULL ((CHAR)0) +#define UNICODE_NULL ((WCHAR)0) +#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534) +#define UNICODE_STRING_MAX_CHARS (32767) + +/* Doubly Linked Lists */ +typedef struct _LIST_ENTRY { + struct _LIST_ENTRY *Flink; + struct _LIST_ENTRY *Blink; +} LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY; + +typedef struct LIST_ENTRY32 { + $ULONG Flink; + $ULONG Blink; +} LIST_ENTRY32, *PLIST_ENTRY32; + +typedef struct LIST_ENTRY64 { + ULONGLONG Flink; + ULONGLONG Blink; +} LIST_ENTRY64, *PLIST_ENTRY64; + +/* Singly Linked Lists */ +typedef struct _SINGLE_LIST_ENTRY { + struct _SINGLE_LIST_ENTRY *Next; +} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY; + +$if(_NTDEF_) +typedef struct _SINGLE_LIST_ENTRY32 { + ULONG Next; +} SINGLE_LIST_ENTRY32, *PSINGLE_LIST_ENTRY32; +$endif(_NTDEF_) + +typedef struct _PROCESSOR_NUMBER { + $USHORT Group; + $UCHAR Number; + $UCHAR Reserved; +} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER; + +#define ALL_PROCESSOR_GROUPS 0xffff + +typedef +_IRQL_requires_same_ +_Function_class_(EXCEPTION_ROUTINE) +EXCEPTION_DISPOSITION +NTAPI +EXCEPTION_ROUTINE( + _Inout_ struct _EXCEPTION_RECORD *ExceptionRecord, + _In_ PVOID EstablisherFrame, + _Inout_ struct _CONTEXT *ContextRecord, + _In_ PVOID DispatcherContext); + +typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE; + +typedef struct _GROUP_AFFINITY { + KAFFINITY Mask; + $USHORT Group; + $USHORT Reserved[3]; +} GROUP_AFFINITY, *PGROUP_AFFINITY; + +/* Helper Macros */ + +#define RTL_FIELD_TYPE(type, field) (((type*)0)->field) +#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8) +#define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field))) +#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) + +#define RTL_SIZEOF_THROUGH_FIELD(type, field) \ + (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field)) + +#define RTL_CONTAINS_FIELD(Struct, Size, Field) \ + ( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)) ) + +#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) + +#ifdef __GNUC__ + #define RTL_NUMBER_OF_V2(A) \ + (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \ + RTL_NUMBER_OF_V1(A)) +#else + /// \todo implement security checks for cplusplus / MSVC + #define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) +#endif + +#ifdef ENABLE_RTL_NUMBER_OF_V2 + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) +#else + #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) +#endif + +#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) +#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A) + +#define RTL_NUMBER_OF_FIELD(type, field) \ + (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field))) + +#define RTL_PADDING_BETWEEN_FIELDS(type, field1, field2) \ + ((FIELD_OFFSET(type, field2) > FIELD_OFFSET(type, field1)) \ + ? (FIELD_OFFSET(type, field2) - FIELD_OFFSET(type, field1) - RTL_FIELD_SIZE(type, field1)) \ + : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2))) + +#if defined(__cplusplus) + #define RTL_CONST_CAST(type) const_cast +#else + #define RTL_CONST_CAST(type) (type) +#endif + +/* Type Limits */ +#define MINCHAR 0x80 +#define MAXCHAR 0x7f +#define MINSHORT 0x8000 +#define MAXSHORT 0x7fff +#define MINLONG 0x80000000 +#define MAXLONG 0x7fffffff +$if(_NTDEF_) +#define MAXUCHAR 0xff +#define MAXUSHORT 0xffff +#define MAXULONG 0xffffffff +$endif(_NTDEF_) +$if(_WINNT_) +#define MAXBYTE 0xff +#define MAXWORD 0xffff +#define MAXDWORD 0xffffffff +$endif(_WINNT_) +#define MAXLONGLONG (0x7fffffffffffffffLL) + +/* Multiplication and Shift Operations. Note: we don't use inline + asm functions, the compiler can optimize this better. */ +#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) +#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) + +#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) +/* Use native math */ + #define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b)) + #define Int64ShraMod32(a,b) (((__int64)(a))>>(b)) + #define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b)) +#else +/* Use intrinsics */ + #define Int64ShllMod32(a,b) __ll_lshift(a,b) + #define Int64ShraMod32(a,b) __ll_rshift(a,b) + #define Int64ShrlMod32(a,b) __ull_rshift(a,b) +#endif + +#define RotateLeft32 _rotl +#define RotateLeft64 _rotl64 +#define RotateRight32 _rotr +#define RotateRight64 _rotr64 + +#if defined(_M_AMD64) + #define RotateLeft8 _rotl8 + #define RotateLeft16 _rotl16 + #define RotateRight8 _rotr8 + #define RotateRight16 _rotr16 +#endif /* _M_AMD64 */ + +/* C_ASSERT Definition */ +#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] + +/* Eliminate Microsoft C/C++ compiler warning 4715 */ +#if defined(_MSC_VER) + #define DEFAULT_UNREACHABLE default: __assume(0) +#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) + #define DEFAULT_UNREACHABLE default: __builtin_unreachable() +#else + #define DEFAULT_UNREACHABLE default: break +#endif + +#define VER_WORKSTATION_NT 0x40000000 +#define VER_SERVER_NT 0x80000000 +#define VER_SUITE_SMALLBUSINESS 0x00000001 +#define VER_SUITE_ENTERPRISE 0x00000002 +#define VER_SUITE_BACKOFFICE 0x00000004 +#define VER_SUITE_COMMUNICATIONS 0x00000008 +#define VER_SUITE_TERMINAL 0x00000010 +#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020 +#define VER_SUITE_EMBEDDEDNT 0x00000040 +#define VER_SUITE_DATACENTER 0x00000080 +#define VER_SUITE_SINGLEUSERTS 0x00000100 +#define VER_SUITE_PERSONAL 0x00000200 +#define VER_SUITE_BLADE 0x00000400 +#define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800 +#define VER_SUITE_SECURITY_APPLIANCE 0x00001000 +#define VER_SUITE_STORAGE_SERVER 0x00002000 +#define VER_SUITE_COMPUTE_SERVER 0x00004000 +#define VER_SUITE_WH_SERVER 0x00008000 + +/* Product types */ +#define PRODUCT_UNDEFINED 0x00000000 +#define PRODUCT_ULTIMATE 0x00000001 +#define PRODUCT_HOME_BASIC 0x00000002 +#define PRODUCT_HOME_PREMIUM 0x00000003 +#define PRODUCT_ENTERPRISE 0x00000004 +#define PRODUCT_HOME_BASIC_N 0x00000005 +#define PRODUCT_BUSINESS 0x00000006 +#define PRODUCT_STANDARD_SERVER 0x00000007 +#define PRODUCT_DATACENTER_SERVER 0x00000008 +#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +#define PRODUCT_ENTERPRISE_SERVER 0x0000000A +#define PRODUCT_STARTER 0x0000000B +#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C +#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D +#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E +#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F +#define PRODUCT_BUSINESS_N 0x00000010 +#define PRODUCT_WEB_SERVER 0x00000011 +#define PRODUCT_CLUSTER_SERVER 0x00000012 +#define PRODUCT_HOME_SERVER 0x00000013 +#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 +#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 +#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 +#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +#define PRODUCT_HOME_PREMIUM_N 0x0000001A +#define PRODUCT_ENTERPRISE_N 0x0000001B +#define PRODUCT_ULTIMATE_N 0x0000001C +#define PRODUCT_WEB_SERVER_CORE 0x0000001D +#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E +#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 +#define PRODUCT_SERVER_FOUNDATION 0x00000021 +#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_STANDARD_SERVER_V 0x00000024 +#define PRODUCT_DATACENTER_SERVER_V 0x00000025 +#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 +#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 +#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 +#define PRODUCT_HYPERV 0x0000002A +#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B +#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C +#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D +#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E +#define PRODUCT_STARTER_N 0x0000002F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 +#define PRODUCT_SB_SOLUTION_SERVER 0x00000032 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 +#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039 +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F +#define PRODUCT_CLUSTER_SERVER_V 0x00000040 +#define PRODUCT_EMBEDDED 0x00000041 +#define PRODUCT_STARTER_E 0x00000042 +#define PRODUCT_HOME_BASIC_E 0x00000043 +#define PRODUCT_HOME_PREMIUM_E 0x00000044 +#define PRODUCT_PROFESSIONAL_E 0x00000045 +#define PRODUCT_ENTERPRISE_E 0x00000046 +#define PRODUCT_ULTIMATE_E 0x00000047 +#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +#define PRODUCT_EMBEDDED_AUTOMOTIVE 0x00000055 +#define PRODUCT_EMBEDDED_INDUSTRY_A 0x00000056 +#define PRODUCT_THINPC 0x00000057 +#define PRODUCT_EMBEDDED_A 0x00000058 +#define PRODUCT_EMBEDDED_INDUSTRY 0x00000059 +#define PRODUCT_EMBEDDED_E 0x0000005A +#define PRODUCT_EMBEDDED_INDUSTRY_E 0x0000005B +#define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x0000005C +#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F +#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 +#define PRODUCT_CORE_ARM 0x00000061 +#define PRODUCT_CORE_N 0x00000062 +#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 +#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064 +#define PRODUCT_CORE 0x00000065 +#define PRODUCT_PROFESSIONAL_WMC 0x00000067 +#define PRODUCT_UNLICENSED 0xABCDABCD + +/* LangID and NLS */ +#define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p)) +#define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff) +#define SUBLANGID(lgid) ((USHORT)(lgid) >> 10) +#define MAKELCID(lgid, srtid) (($ULONG)(((($ULONG)((USHORT)(srtid))) << 16) | \ + (($ULONG)((USHORT)(lgid))))) +#define MAKESORTLCID(lgid, srtid, ver) \ + (($ULONG)((MAKELCID(lgid, srtid)) | \ + ((($ULONG)((USHORT)(ver))) << 20))) +#define LANGIDFROMLCID(lcid) ((USHORT)(lcid)) +#define SORTIDFROMLCID(lcid) ((USHORT)(((($ULONG)(lcid)) >> 16) & 0xf)) +#define SORTVERSIONFROMLCID(lcid) ((USHORT)(((($ULONG)(lcid)) >> 20) & 0xf)) + +#define NLS_VALID_LOCALE_MASK 0x000fffff +#define LOCALE_NAME_MAX_LENGTH 85 + +/* Primary language IDs. */ +#define LANG_NEUTRAL 0x00 +#define LANG_INVARIANT 0x7f +#define LANG_AFRIKAANS 0x36 +#define LANG_ALBANIAN 0x1c +#define LANG_ALSATIAN 0x84 +#define LANG_AMHARIC 0x5e +#define LANG_ARABIC 0x01 +#define LANG_ARMENIAN 0x2b +#define LANG_ASSAMESE 0x4d +#define LANG_AZERI 0x2c +#define LANG_AZERBAIJANI 0x2c +#define LANG_BANGLA 0x45 +#define LANG_BASHKIR 0x6d +#define LANG_BASQUE 0x2d +#define LANG_BELARUSIAN 0x23 +#define LANG_BENGALI 0x45 +#define LANG_BOSNIAN 0x1a +#define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_BRETON 0x7e +#define LANG_BULGARIAN 0x02 +#define LANG_CATALAN 0x03 +#define LANG_CENTRAL_KURDISH 0x92 +#define LANG_CHEROKEE 0x5c +#define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_CORSICAN 0x83 +#define LANG_CROATIAN 0x1a +#define LANG_CZECH 0x05 +#define LANG_DANISH 0x06 +#define LANG_DARI 0x8c +#define LANG_DIVEHI 0x65 +#define LANG_DUTCH 0x13 +#define LANG_ENGLISH 0x09 +#define LANG_ESTONIAN 0x25 +#define LANG_FAEROESE 0x38 +#define LANG_FARSI 0x29 +#define LANG_FILIPINO 0x64 +#define LANG_FINNISH 0x0b +#define LANG_FRENCH 0x0c +#define LANG_FRISIAN 0x62 +#define LANG_FULAH 0x67 +#define LANG_GALICIAN 0x56 +#define LANG_GEORGIAN 0x37 +#define LANG_GERMAN 0x07 +#define LANG_GREEK 0x08 +#define LANG_GREENLANDIC 0x6f +#define LANG_GUJARATI 0x47 +#define LANG_HAUSA 0x68 +#define LANG_HAWAIIAN 0x75 +#define LANG_HEBREW 0x0d +#define LANG_HINDI 0x39 +#define LANG_HUNGARIAN 0x0e +#define LANG_ICELANDIC 0x0f +#define LANG_IGBO 0x70 +#define LANG_INDONESIAN 0x21 +#define LANG_INUKTITUT 0x5d +#define LANG_IRISH 0x3c +#define LANG_ITALIAN 0x10 +#define LANG_JAPANESE 0x11 +#define LANG_KANNADA 0x4b +#define LANG_KASHMIRI 0x60 +#define LANG_KAZAK 0x3f +#define LANG_KHMER 0x53 +#define LANG_KICHE 0x86 +#define LANG_KINYARWANDA 0x87 +#define LANG_KONKANI 0x57 +#define LANG_KOREAN 0x12 +#define LANG_KYRGYZ 0x40 +#define LANG_LAO 0x54 +#define LANG_LATVIAN 0x26 +#define LANG_LITHUANIAN 0x27 +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_LUXEMBOURGISH 0x6e +#define LANG_MACEDONIAN 0x2f +#define LANG_MALAY 0x3e +#define LANG_MALAYALAM 0x4c +#define LANG_MALTESE 0x3a +#define LANG_MANIPURI 0x58 +#define LANG_MAORI 0x81 +#define LANG_MAPUDUNGUN 0x7a +#define LANG_MARATHI 0x4e +#define LANG_MOHAWK 0x7c +#define LANG_MONGOLIAN 0x50 +#define LANG_NEPALI 0x61 +#define LANG_NORWEGIAN 0x14 +#define LANG_OCCITAN 0x82 +#define LANG_ODIA 0x48 +#define LANG_ORIYA 0x48 +#define LANG_PASHTO 0x63 +#define LANG_PERSIAN 0x29 +#define LANG_POLISH 0x15 +#define LANG_PORTUGUESE 0x16 +#define LANG_PULAR 0x67 +#define LANG_PUNJABI 0x46 +#define LANG_QUECHUA 0x6b +#define LANG_ROMANIAN 0x18 +#define LANG_ROMANSH 0x17 +#define LANG_RUSSIAN 0x19 +#define LANG_SAKHA 0x85 +#define LANG_SAMI 0x3b +#define LANG_SANSKRIT 0x4f +#define LANG_SCOTTISH_GAELIC 0x91 +#define LANG_SERBIAN 0x1a +#define LANG_SERBIAN_NEUTRAL 0x7c1a +#define LANG_SINDHI 0x59 +#define LANG_SINHALESE 0x5b +#define LANG_SLOVAK 0x1b +#define LANG_SLOVENIAN 0x24 +#define LANG_SOTHO 0x6c +#define LANG_SPANISH 0x0a +#define LANG_SWAHILI 0x41 +#define LANG_SWEDISH 0x1d +#define LANG_SYRIAC 0x5a +#define LANG_TAJIK 0x28 +#define LANG_TAMAZIGHT 0x5f +#define LANG_TAMIL 0x49 +#define LANG_TATAR 0x44 +#define LANG_TELUGU 0x4a +#define LANG_THAI 0x1e +#define LANG_TIBETAN 0x51 +#define LANG_TIGRIGNA 0x73 +#define LANG_TIGRINYA 0x73 +#define LANG_TSWANA 0x32 +#define LANG_TURKISH 0x1f +#define LANG_TURKMEN 0x42 +#define LANG_UIGHUR 0x80 +#define LANG_UKRAINIAN 0x22 +#define LANG_UPPER_SORBIAN 0x2e +#define LANG_URDU 0x20 +#define LANG_UZBEK 0x43 +#define LANG_VALENCIAN 0x03 +#define LANG_VIETNAMESE 0x2a +#define LANG_WELSH 0x52 +#define LANG_WOLOF 0x88 +#define LANG_XHOSA 0x34 +#define LANG_YAKUT 0x85 +#define LANG_YI 0x78 +#define LANG_YORUBA 0x6a +#define LANG_ZULU 0x35 + +#define SUBLANG_NEUTRAL 0x00 +#define SUBLANG_DEFAULT 0x01 +#define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#define SUBLANG_ARABIC_IRAQ 0x02 +#define SUBLANG_ARABIC_EGYPT 0x03 +#define SUBLANG_ARABIC_LIBYA 0x04 +#define SUBLANG_ARABIC_ALGERIA 0x05 +#define SUBLANG_ARABIC_MOROCCO 0x06 +#define SUBLANG_ARABIC_TUNISIA 0x07 +#define SUBLANG_ARABIC_OMAN 0x08 +#define SUBLANG_ARABIC_YEMEN 0x09 +#define SUBLANG_ARABIC_SYRIA 0x0a +#define SUBLANG_ARABIC_JORDAN 0x0b +#define SUBLANG_ARABIC_LEBANON 0x0c +#define SUBLANG_ARABIC_KUWAIT 0x0d +#define SUBLANG_ARABIC_UAE 0x0e +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 +#define SUBLANG_AZERI_LATIN 0x01 +#define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01 +#define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02 +#define SUBLANG_BANGLA_INDIA 0x01 +#define SUBLANG_BANGLA_BANGLADESH 0x02 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01 +#define SUBLANG_CHEROKEE_CHEROKEE 0x01 +#define SUBLANG_CHINESE_TRADITIONAL 0x01 +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 +#define SUBLANG_CHINESE_HONGKONG 0x03 +#define SUBLANG_CHINESE_SINGAPORE 0x04 +#define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 +#define SUBLANG_DUTCH 0x01 +#define SUBLANG_DUTCH_BELGIAN 0x02 +#define SUBLANG_ENGLISH_US 0x01 +#define SUBLANG_ENGLISH_UK 0x02 +#define SUBLANG_ENGLISH_AUS 0x03 +#define SUBLANG_ENGLISH_CAN 0x04 +#define SUBLANG_ENGLISH_NZ 0x05 +#define SUBLANG_ENGLISH_EIRE 0x06 +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#define SUBLANG_ENGLISH_BELIZE 0x0a +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 +#define SUBLANG_FRENCH 0x01 +#define SUBLANG_FRENCH_BELGIAN 0x02 +#define SUBLANG_FRENCH_CANADIAN 0x03 +#define SUBLANG_FRENCH_SWISS 0x04 +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_FULAH_SENEGAL 0x02 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 +#define SUBLANG_GERMAN 0x01 +#define SUBLANG_GERMAN_SWISS 0x02 +#define SUBLANG_GERMAN_AUSTRIAN 0x03 +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HAWAIIAN_US 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 +#define SUBLANG_ITALIAN 0x01 +#define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 +#define SUBLANG_KASHMIRI_SASIA 0x02 +#define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 +#define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 +#define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 +#define SUBLANG_MALAY_MALAYSIA 0x01 +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_MONGOLIAN_PRC 0x02 +#define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NEPALI_NEPAL 0x01 +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ODIA_INDIA 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 +#define SUBLANG_PORTUGUESE 0x02 +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PULAR_SENEGAL 0x02 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_PUNJABI_PAKISTAN 0x02 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAKHA_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SCOTTISH_GAELIC 0x01 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b +#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c +#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09 +#define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a +#define SUBLANG_SERBIAN_CROATIA 0x01 +#define SUBLANG_SERBIAN_LATIN 0x02 +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 +#define SUBLANG_SPANISH 0x01 +#define SUBLANG_SPANISH_MEXICAN 0x02 +#define SUBLANG_SPANISH_MODERN 0x03 +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#define SUBLANG_SPANISH_PANAMA 0x06 +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#define SUBLANG_SPANISH_PERU 0x0a +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#define SUBLANG_SPANISH_ECUADOR 0x0c +#define SUBLANG_SPANISH_CHILE 0x0d +#define SUBLANG_SPANISH_URUGUAY 0x0e +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define SUBLANG_SPANISH_US 0x15 +#define SUBLANG_SWAHILI_KENYA 0x01 +#define SUBLANG_SWEDISH 0x01 +#define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TAMIL_SRI_LANKA 0x02 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ERITREA 0x02 +#define SUBLANG_TIGRINYA_ETHIOPIA 0x01 +#define SUBLANG_TSWANA_BOTSWANA 0x02 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 +#define SUBLANG_URDU_PAKISTAN 0x01 +#define SUBLANG_URDU_INDIA 0x02 +#define SUBLANG_UZBEK_LATIN 0x01 +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SUBLANG_VALENCIAN_VALENCIA 0x02 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 + +#define SORT_DEFAULT 0x0 +#define SORT_INVARIANT_MATH 0x1 +#define SORT_JAPANESE_XJIS 0x0 +#define SORT_JAPANESE_UNICODE 0x1 +#define SORT_JAPANESE_RADICALSTROKE 0x4 +#define SORT_CHINESE_BIG5 0x0 +#define SORT_CHINESE_PRCP 0x0 +#define SORT_CHINESE_UNICODE 0x1 +#define SORT_CHINESE_PRC 0x2 +#define SORT_CHINESE_BOPOMOFO 0x3 +#define SORT_CHINESE_RADICALSTROKE 0x4 +#define SORT_KOREAN_KSC 0x0 +#define SORT_KOREAN_UNICODE 0x1 +#define SORT_GERMAN_PHONE_BOOK 0x1 +#define SORT_HUNGARIAN_DEFAULT 0x0 +#define SORT_HUNGARIAN_TECHNICAL 0x1 +#define SORT_GEORGIAN_TRADITIONAL 0x0 +#define SORT_GEORGIAN_MODERN 0x1 + +#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT) +#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) + +#define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT) +#define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT) +#define LOCALE_CUSTOM_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT) +#define LOCALE_CUSTOM_UNSPECIFIED MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT) +#define LOCALE_CUSTOM_UI_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT) +#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT) +#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) diff --git a/include/xdk/ntdef.template.h b/include/xdk/ntdef.template.h new file mode 100644 index 00000000000..fc1df37a19e --- /dev/null +++ b/include/xdk/ntdef.template.h @@ -0,0 +1,306 @@ +/* + * ntdef.h + * + * This file is part of the ReactOS PSDK package. + * + * Contributors: + * Created by Casper S. Hornstrup + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef _NTDEF_ +#define _NTDEF_ +#pragma once + +/* Dependencies */ +#include +$if(0) +//#include +$endif() +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Default to strict */ +#ifndef NO_STRICT +#ifndef STRICT +#define STRICT 1 +#endif +#endif + +/* Pseudo Modifiers for Input Parameters */ + +#ifndef IN +#define IN +#endif + +#ifndef OUT +#define OUT +#endif + +#ifndef OPTIONAL +#define OPTIONAL +#endif + +#ifndef NOTHING +#define NOTHING +#endif + +#ifndef CRITICAL +#define CRITICAL +#endif + +/* Constant modifier */ +#ifndef CONST +#define CONST const +#endif + +/* TRUE/FALSE */ +#define FALSE 0 +#define TRUE 1 + +/* NULL/NULL64 */ +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#define NULL64 0 +#else +#define NULL ((void *)0) +#define NULL64 ((void * POINTER_64)0) +#endif +#endif /* NULL */ + +#define ARGUMENT_PRESENT(ArgumentPointer) \ + ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL) + +#if defined(_MANAGED) + #define FASTCALL __stdcall +#elif defined(_M_IX86) + #define FASTCALL __fastcall +#else + #define FASTCALL +#endif /* _MANAGED */ + +/* min/max helper macros */ +#ifndef NOMINMAX +# ifndef min +# define min(a,b) (((a) < (b)) ? (a) : (b)) +# endif +# ifndef max +# define max(a,b) (((a) > (b)) ? (a) : (b)) +# endif +#endif /* NOMINMAX */ + +/* Tell windef.h that we have defined some basic types */ +#define BASETYPES + +$define(_NTDEF_) +$define(ULONG=ULONG) +$define(USHORT=USHORT) +$define(UCHAR=UCHAR) +$include(ntbasedef.h) + +/* Physical Addresses are always treated as 64-bit wide */ +typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; + +/* Used to store a non-float 8 byte aligned structure */ +typedef struct _QUAD +{ + _ANONYMOUS_UNION union + { + __GNU_EXTENSION __int64 UseThisFieldToCopy; + double DoNotUseThisField; + } DUMMYUNIONNAME; +} QUAD, *PQUAD, UQUAD, *PUQUAD; + +/* String Types */ +typedef struct _STRING { + USHORT Length; + USHORT MaximumLength; +#ifdef MIDL_PASS + [size_is(MaximumLength), length_is(Length) ] +#endif + _Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer; +} STRING, *PSTRING, + ANSI_STRING, *PANSI_STRING, + OEM_STRING, *POEM_STRING; + +typedef CONST STRING* PCOEM_STRING; +typedef STRING CANSI_STRING; +typedef PSTRING PCANSI_STRING; + +typedef struct _STRING32 { + USHORT Length; + USHORT MaximumLength; + $ULONG Buffer; +} STRING32, *PSTRING32, + UNICODE_STRING32, *PUNICODE_STRING32, + ANSI_STRING32, *PANSI_STRING32; + +typedef struct _STRING64 { + USHORT Length; + USHORT MaximumLength; + ULONGLONG Buffer; +} STRING64, *PSTRING64, + UNICODE_STRING64, *PUNICODE_STRING64, + ANSI_STRING64, *PANSI_STRING64; + +typedef struct _CSTRING { + USHORT Length; + USHORT MaximumLength; + CONST CHAR *Buffer; +} CSTRING, *PCSTRING; + +typedef struct _UNICODE_STRING { + USHORT Length; + USHORT MaximumLength; +#ifdef MIDL_PASS + [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer; +#else + _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer; +#endif +} UNICODE_STRING, *PUNICODE_STRING; +typedef const UNICODE_STRING* PCUNICODE_STRING; + +typedef USHORT RTL_STRING_LENGTH_TYPE; + +#ifdef __cplusplus +extern "C++" template struct _RTL_remove_const_template; +extern "C++" template struct _RTL_remove_const_template { typedef _Type type; }; +#define _RTL_CONSTANT_STRING_remove_const_macro(s) \ + (const_cast<_RTL_remove_const_template::type*>(s)) +extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template; +extern "C++" template struct _RTL_CONSTANT_STRING_type_check_template { typedef char type; }; +#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template::type +#else +# define _RTL_CONSTANT_STRING_remove_const_macro(s) (s) +char _RTL_CONSTANT_STRING_type_check(const void *s); +#endif +#define RTL_CONSTANT_STRING(s) { \ + sizeof(s)-sizeof((s)[0]), \ + sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \ + _RTL_CONSTANT_STRING_remove_const_macro(s) } + +#define DECLARE_UNICODE_STRING_SIZE(_var, _size) \ + WCHAR _var ## _buffer[_size]; \ + __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \ + UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer } \ + __pragma(warning(pop)) + +#define DECLARE_CONST_UNICODE_STRING(_var, _string) \ + const WCHAR _var##_buffer[] = _string; \ + __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \ + const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer } \ + __pragma(warning(pop)) + +#define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str) \ + extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str) + +/* Object Attributes */ +typedef struct _OBJECT_ATTRIBUTES { + ULONG Length; + HANDLE RootDirectory; + PUNICODE_STRING ObjectName; + ULONG Attributes; + PVOID SecurityDescriptor; + PVOID SecurityQualityOfService; +} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; +typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES; + +typedef struct _OBJECT_ATTRIBUTES32 { + ULONG Length; + ULONG RootDirectory; + ULONG ObjectName; + ULONG Attributes; + ULONG SecurityDescriptor; + ULONG SecurityQualityOfService; +} OBJECT_ATTRIBUTES32, *POBJECT_ATTRIBUTES32; +typedef CONST OBJECT_ATTRIBUTES32 *PCOBJECT_ATTRIBUTES32; + +typedef struct _OBJECT_ATTRIBUTES64 { + ULONG Length; + ULONG64 RootDirectory; + ULONG64 ObjectName; + ULONG Attributes; + ULONG64 SecurityDescriptor; + ULONG64 SecurityQualityOfService; +} OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64; +typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64; + +/* Values for the Attributes member */ +#define OBJ_INHERIT 0x00000002L +#define OBJ_PERMANENT 0x00000010L +#define OBJ_EXCLUSIVE 0x00000020L +#define OBJ_CASE_INSENSITIVE 0x00000040L +#define OBJ_OPENIF 0x00000080L +#define OBJ_OPENLINK 0x00000100L +#define OBJ_KERNEL_HANDLE 0x00000200L +#define OBJ_FORCE_ACCESS_CHECK 0x00000400L +#define OBJ_VALID_ATTRIBUTES 0x000007F2L + +/* Helper Macro */ +#define InitializeObjectAttributes(p,n,a,r,s) { \ + (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ + (p)->RootDirectory = (r); \ + (p)->ObjectName = (n); \ + (p)->Attributes = (a); \ + (p)->SecurityDescriptor = (s); \ + (p)->SecurityQualityOfService = NULL; \ +} + +#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \ + sizeof(OBJECT_ATTRIBUTES), \ + NULL, \ + RTL_CONST_CAST(PUNICODE_STRING)(n), \ + a, \ + NULL, \ + NULL \ +} + +#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ + RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) + +/* Product Types */ +typedef enum _NT_PRODUCT_TYPE { + NtProductWinNt = 1, + NtProductLanManNt, + NtProductServer +} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE; + +typedef enum _EVENT_TYPE { + NotificationEvent, + SynchronizationEvent +} EVENT_TYPE; + +typedef enum _TIMER_TYPE { + NotificationTimer, + SynchronizationTimer +} TIMER_TYPE; + +typedef enum _WAIT_TYPE { + WaitAll, + WaitAny +} WAIT_TYPE; + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif /* _NTDEF_ */ diff --git a/include/xdk/winnt.template.h b/include/xdk/winnt.template.h new file mode 100644 index 00000000000..7d948e09c64 --- /dev/null +++ b/include/xdk/winnt.template.h @@ -0,0 +1,76 @@ +/* + * winnt.h + * + * Windows NT native definitions for user mode + * + * This file is part of the ReactOS PSDK package. + * + * This file is auto-generated from ReactOS XDK. + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#pragma once +#define _WINNT_ + +/* We require WDK / VS 2008 or newer */ +#if defined(_MSC_VER) && (_MSC_VER < 1500) +#error Compiler too old! +#endif + +/* HACK for wine code */ +#if !defined(__ROS_LONG64__) +#ifdef __WINESRC__ +#define __ROS_LONG64__ +#endif +#endif + +#include +//#include +#include +#include +#include + +#include +#include +#include +#include + +#undef __need_wchar_t +#include +#include +#include +#ifndef RC_INVOKED +#include +#endif + +/* Silence some MSVC warnings */ +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4201) +#pragma warning(disable:4214) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +$define(_WINNT_) +$define(ULONG=DWORD) +$define(USHORT=WORD) +$define(UCHAR=BYTE) +$include(ntbasedef.h) +$include(winnt_old.h) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/include/xdk/winnt_old.h b/include/xdk/winnt_old.h new file mode 100644 index 00000000000..a8221d44d35 --- /dev/null +++ b/include/xdk/winnt_old.h @@ -0,0 +1,4783 @@ + +#undef __C89_NAMELESS +#undef __C89_NAMELESSSTRUCTNAME +#undef __C89_NAMELESSSTRUCTNAME1 +#undef __C89_NAMELESSSTRUCTNAME2 +#undef __C89_NAMELESSSTRUCTNAME3 +#undef __C89_NAMELESSSTRUCTNAME4 +#undef __C89_NAMELESSSTRUCTNAME5 +#undef __C89_NAMELESSUNIONNAME +#undef __C89_NAMELESSUNIONNAME1 +#undef __C89_NAMELESSUNIONNAME2 +#undef __C89_NAMELESSUNIONNAME3 +#undef __C89_NAMELESSUNIONNAME4 +#undef __C89_NAMELESSUNIONNAME5 +#undef __C89_NAMELESSUNIONNAME6 +#undef __C89_NAMELESSUNIONNAME7 +#undef __C89_NAMELESSUNIONNAME8 + +#if !defined(__WINESRC__) && !defined(WINE_NO_NAMELESS_EXTENSION) +# ifdef __GNUC__ + /* Anonymous structs support starts with gcc 2.96/g++ 2.95 */ +# if (__GNUC__ > 2) || ((__GNUC__ == 2) && ((__GNUC_MINOR__ > 95) || ((__GNUC_MINOR__ == 95) && defined(__cplusplus)))) +# define __C89_NAMELESS __extension__ +# endif +# elif defined(_MSC_VER) +# define __C89_NAMELESS +# endif +#endif + +#ifdef __C89_NAMELESS +# define __C89_NAMELESSSTRUCTNAME +# define __C89_NAMELESSSTRUCTNAME1 +# define __C89_NAMELESSSTRUCTNAME2 +# define __C89_NAMELESSSTRUCTNAME3 +# define __C89_NAMELESSSTRUCTNAME4 +# define __C89_NAMELESSSTRUCTNAME5 +# define __C89_NAMELESSUNIONNAME +# define __C89_NAMELESSUNIONNAME1 +# define __C89_NAMELESSUNIONNAME2 +# define __C89_NAMELESSUNIONNAME3 +# define __C89_NAMELESSUNIONNAME4 +# define __C89_NAMELESSUNIONNAME5 +# define __C89_NAMELESSUNIONNAME6 +# define __C89_NAMELESSUNIONNAME7 +# define __C89_NAMELESSUNIONNAME8 +#else +# define __C89_NAMELESS +# define __C89_NAMELESSSTRUCTNAME DUMMYSTRUCTNAME +# define __C89_NAMELESSSTRUCTNAME1 DUMMYSTRUCTNAME1 +# define __C89_NAMELESSSTRUCTNAME2 DUMMYSTRUCTNAME2 +# define __C89_NAMELESSSTRUCTNAME3 DUMMYSTRUCTNAME3 +# define __C89_NAMELESSSTRUCTNAME4 DUMMYSTRUCTNAME4 +# define __C89_NAMELESSSTRUCTNAME5 DUMMYSTRUCTNAME5 +# define __C89_NAMELESSUNIONNAME DUMMYUNIONNAME +# define __C89_NAMELESSUNIONNAME1 DUMMYUNIONNAME1 +# define __C89_NAMELESSUNIONNAME2 DUMMYUNIONNAME2 +# define __C89_NAMELESSUNIONNAME3 DUMMYUNIONNAME3 +# define __C89_NAMELESSUNIONNAME4 DUMMYUNIONNAME4 +# define __C89_NAMELESSUNIONNAME5 DUMMYUNIONNAME5 +# define __C89_NAMELESSUNIONNAME6 DUMMYUNIONNAME6 +# define __C89_NAMELESSUNIONNAME7 DUMMYUNIONNAME7 +# define __C89_NAMELESSUNIONNAME8 DUMMYUNIONNAME8 +#endif + +#define DECLSPEC_HIDDEN + +/*#ifdef _WINE*/ +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +# define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#else +# define __WINE_ALLOC_SIZE(x) +#endif +/*#endif*/ + +#ifdef __GNUC__ +# define _HAVE_INT64 +# ifndef _INTEGRAL_MAX_BITS +# define _INTEGRAL_MAX_BITS 64 +# endif +# undef __int64 +# define __int64 long long +#elif (defined(__WATCOMC__) || defined(_MSC_VER)) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 ) +# define _HAVE_INT64 +#endif /* __GNUC__/__WATCOMC */ + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4201) +# pragma warning(disable:4214) +# pragma warning(disable:4820) +#endif + +#define ACE_OBJECT_TYPE_PRESENT 0x00000001 +#define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002 + +#ifdef __cplusplus +#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ +extern "C++" { \ + inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)|((int)b)); } \ + inline ENUMTYPE operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \ + inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)&((int)b)); } \ + inline ENUMTYPE operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \ + inline ENUMTYPE operator ~ (ENUMTYPE a) { return (ENUMTYPE)(~((int)a)); } \ + inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)^((int)b)); } \ + inline ENUMTYPE operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ +} +#else +# define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ +#endif + +/* also in ddk/ntifs.h */ +#define COMPRESSION_FORMAT_NONE (0x0000) +#define COMPRESSION_FORMAT_DEFAULT (0x0001) +#define COMPRESSION_FORMAT_LZNT1 (0x0002) +#define COMPRESSION_ENGINE_STANDARD (0x0000) +#define COMPRESSION_ENGINE_MAXIMUM (0x0100) +#define COMPRESSION_ENGINE_HIBER (0x0200) +#define ACCESS_ALLOWED_ACE_TYPE (0x0) +#define ACCESS_DENIED_ACE_TYPE (0x1) +#define SYSTEM_AUDIT_ACE_TYPE (0x2) +#define SYSTEM_ALARM_ACE_TYPE (0x3) +/*end ntifs.h */ +#define OBJECT_INHERIT_ACE 1 +#define CONTAINER_INHERIT_ACE 2 +#define NO_PROPAGATE_INHERIT_ACE 4 +#define INHERIT_ONLY_ACE 8 +#define INHERITED_ACE 16 +#define VALID_INHERIT_FLAGS 0x1F +#define SUCCESSFUL_ACCESS_ACE_FLAG 64 +#define FAILED_ACCESS_ACE_FLAG 128 +#define DELETE 0x00010000L +#define READ_CONTROL 0x20000L +#define WRITE_DAC 0x40000L +#define WRITE_OWNER 0x80000L +#define SYNCHRONIZE 0x100000L +#define STANDARD_RIGHTS_REQUIRED 0xF0000 +#define STANDARD_RIGHTS_READ 0x20000 +#define STANDARD_RIGHTS_WRITE 0x20000 +#define STANDARD_RIGHTS_EXECUTE 0x20000 +#define STANDARD_RIGHTS_ALL 0x1F0000 +#define SPECIFIC_RIGHTS_ALL 0xFFFF +#define ACCESS_SYSTEM_SECURITY 0x1000000 + +#define REG_STANDARD_FORMAT 1 +#define REG_LATEST_FORMAT 2 +#define REG_NO_COMPRESSION 4 + +#ifndef WIN32_NO_STATUS + +#define STATUS_WAIT_0 ((DWORD)0x00000000) +#define STATUS_ABANDONED_WAIT_0 ((DWORD)0x00000080) +#define STATUS_USER_APC ((DWORD)0x000000C0) +#define STATUS_TIMEOUT ((DWORD)0x00000102) +#define STATUS_PENDING ((DWORD)0x00000103) +#define STATUS_SEGMENT_NOTIFICATION ((DWORD)0x40000005) +#define STATUS_GUARD_PAGE_VIOLATION ((DWORD)0x80000001) +#define STATUS_DATATYPE_MISALIGNMENT ((DWORD)0x80000002) +#define STATUS_BREAKPOINT ((DWORD)0x80000003) +#define STATUS_SINGLE_STEP ((DWORD)0x80000004) +#define STATUS_ACCESS_VIOLATION ((DWORD)0xC0000005) +#define STATUS_IN_PAGE_ERROR ((DWORD)0xC0000006) +#define STATUS_INVALID_HANDLE ((DWORD)0xC0000008) +#define STATUS_NO_MEMORY ((DWORD)0xC0000017) +#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D) +#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025) +#define STATUS_INVALID_DISPOSITION ((DWORD)0xC0000026) +#define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C) +#define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD)0xC000008D) +#define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD)0xC000008E) +#define STATUS_FLOAT_INEXACT_RESULT ((DWORD)0xC000008F) +#define STATUS_FLOAT_INVALID_OPERATION ((DWORD)0xC0000090) +#define STATUS_FLOAT_OVERFLOW ((DWORD)0xC0000091) +#define STATUS_FLOAT_STACK_CHECK ((DWORD)0xC0000092) +#define STATUS_FLOAT_UNDERFLOW ((DWORD)0xC0000093) +#define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD)0xC0000094) +#define STATUS_INTEGER_OVERFLOW ((DWORD)0xC0000095) +#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD)0xC0000096) +#define STATUS_STACK_OVERFLOW ((DWORD)0xC00000FD) +#define STATUS_CONTROL_C_EXIT ((DWORD)0xC000013A) +#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD)0xC00002B4) +#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD)0xC00002B5) +#define STATUS_REG_NAT_CONSUMPTION ((DWORD)0xC00002C9) +#define STATUS_SXS_EARLY_DEACTIVATION ((DWORD)0xC015000F) +#define STATUS_SXS_INVALID_DEACTIVATION ((DWORD)0xC0150010) + +#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001) +#define DBG_CONTINUE ((DWORD)0x00010002) +#define DBG_TERMINATE_THREAD ((DWORD)0x40010003) +#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004) +#define DBG_CONTROL_C ((DWORD)0x40010005) +#define DBG_CONTROL_BREAK ((DWORD)0x40010008) +#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009) +#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001) + +#endif /* WIN32_NO_STATUS */ + +#define MAXIMUM_ALLOWED 0x2000000 +#define GENERIC_READ 0x80000000 +#define GENERIC_WRITE 0x40000000 +#define GENERIC_EXECUTE 0x20000000 +#define GENERIC_ALL 0x10000000 + +#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) + +/* Also in ddk/winddk.h */ +#define FILE_LIST_DIRECTORY 0x00000001 +#define FILE_READ_DATA 0x00000001 +#define FILE_ADD_FILE 0x00000002 +#define FILE_WRITE_DATA 0x00000002 +#define FILE_ADD_SUBDIRECTORY 0x00000004 +#define FILE_APPEND_DATA 0x00000004 +#define FILE_CREATE_PIPE_INSTANCE 0x00000004 +#define FILE_READ_EA 0x00000008 +#define FILE_READ_PROPERTIES 0x00000008 +#define FILE_WRITE_EA 0x00000010 +#define FILE_WRITE_PROPERTIES 0x00000010 +#define FILE_EXECUTE 0x00000020 +#define FILE_TRAVERSE 0x00000020 +#define FILE_DELETE_CHILD 0x00000040 +#define FILE_READ_ATTRIBUTES 0x00000080 +#define FILE_WRITE_ATTRIBUTES 0x00000100 + +#define FILE_SHARE_READ 0x00000001 +#define FILE_SHARE_WRITE 0x00000002 +#define FILE_SHARE_DELETE 0x00000004 +#define FILE_SHARE_VALID_FLAGS 0x00000007 + +#define FILE_ATTRIBUTE_READONLY 0x00000001 +#define FILE_ATTRIBUTE_HIDDEN 0x00000002 +#define FILE_ATTRIBUTE_SYSTEM 0x00000004 +#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 +#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 +#define FILE_ATTRIBUTE_DEVICE 0x00000040 +#define FILE_ATTRIBUTE_NORMAL 0x00000080 +#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 +#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200 +#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 +#define FILE_ATTRIBUTE_COMPRESSED 0x00000800 +#define FILE_ATTRIBUTE_OFFLINE 0x00001000 +#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 +#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000 +#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7 +#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7 + +#define FILE_COPY_STRUCTURED_STORAGE 0x00000041 +#define FILE_STRUCTURED_STORAGE 0x00000441 + +#define FILE_VALID_OPTION_FLAGS 0x00ffffff +#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 +#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 +#define FILE_VALID_SET_FLAGS 0x00000036 + +#define FILE_DIRECTORY_FILE 0x00000001 +#define FILE_WRITE_THROUGH 0x00000002 +#define FILE_SEQUENTIAL_ONLY 0x00000004 +#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 +#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 +#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 +#define FILE_NON_DIRECTORY_FILE 0x00000040 +#define FILE_CREATE_TREE_CONNECTION 0x00000080 +#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 +#define FILE_NO_EA_KNOWLEDGE 0x00000200 +#define FILE_OPEN_REMOTE_INSTANCE 0x00000400 +#define FILE_RANDOM_ACCESS 0x00000800 +#define FILE_DELETE_ON_CLOSE 0x00001000 +#define FILE_OPEN_BY_FILE_ID 0x00002000 +#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 +#define FILE_NO_COMPRESSION 0x00008000 +#define FILE_RESERVE_OPFILTER 0x00100000 +#define FILE_OPEN_REPARSE_POINT 0x00200000 +#define FILE_OPEN_NO_RECALL 0x00400000 +#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 + +#define FILE_ALL_ACCESS \ + (STANDARD_RIGHTS_REQUIRED | \ + SYNCHRONIZE | \ + 0x1FF) + +#define FILE_GENERIC_EXECUTE \ + (STANDARD_RIGHTS_EXECUTE | \ + FILE_READ_ATTRIBUTES | \ + FILE_EXECUTE | \ + SYNCHRONIZE) + +#define FILE_GENERIC_READ \ + (STANDARD_RIGHTS_READ | \ + FILE_READ_DATA | \ + FILE_READ_ATTRIBUTES | \ + FILE_READ_EA | \ + SYNCHRONIZE) + +#define FILE_GENERIC_WRITE \ + (STANDARD_RIGHTS_WRITE | \ + FILE_WRITE_DATA | \ + FILE_WRITE_ATTRIBUTES | \ + FILE_WRITE_EA | \ + FILE_APPEND_DATA | \ + SYNCHRONIZE) +/* end winddk.h */ +/* also in ddk/ntifs.h */ +#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001 +#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002 +#define FILE_NOTIFY_CHANGE_NAME 0x00000003 +#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004 +#define FILE_NOTIFY_CHANGE_SIZE 0x00000008 +#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010 +#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020 +#define FILE_NOTIFY_CHANGE_CREATION 0x00000040 +#define FILE_NOTIFY_CHANGE_EA 0x00000080 +#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100 +#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200 +#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400 +#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800 +#define FILE_NOTIFY_VALID_MASK 0x00000fff + +#define FILE_CASE_SENSITIVE_SEARCH 0x00000001 +#define FILE_CASE_PRESERVED_NAMES 0x00000002 +#define FILE_UNICODE_ON_DISK 0x00000004 +#define FILE_PERSISTENT_ACLS 0x00000008 +#define FILE_FILE_COMPRESSION 0x00000010 +#define FILE_VOLUME_QUOTAS 0x00000020 +#define FILE_SUPPORTS_SPARSE_FILES 0x00000040 +#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 +#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 +#define FS_LFN_APIS 0x00004000 +#define FILE_VOLUME_IS_COMPRESSED 0x00008000 +#define FILE_SUPPORTS_OBJECT_IDS 0x00010000 +#define FILE_SUPPORTS_ENCRYPTION 0x00020000 +#define FILE_NAMED_STREAMS 0x00040000 + +#define IO_COMPLETION_QUERY_STATE 0x0001 +#define IO_COMPLETION_MODIFY_STATE 0x0002 +#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3) +/* end ntifs.h */ + +/* also in ddk/winddk.h */ +#define DUPLICATE_CLOSE_SOURCE 0x00000001 +#define DUPLICATE_SAME_ACCESS 0x00000002 +/* end winddk.k */ + +#define MAILSLOT_NO_MESSAGE ((DWORD)-1) +#define MAILSLOT_WAIT_FOREVER ((DWORD)-1) +#define PROCESS_TERMINATE 1 +#define PROCESS_CREATE_THREAD 2 +#define PROCESS_SET_SESSIONID 4 +#define PROCESS_VM_OPERATION 8 +#define PROCESS_VM_READ 16 +#define PROCESS_VM_WRITE 32 +#define PROCESS_CREATE_PROCESS 128 +#define PROCESS_SET_QUOTA 256 +#define PROCESS_SET_INFORMATION 512 +#define PROCESS_QUERY_INFORMATION 1024 +#define PROCESS_SUSPEND_RESUME 2048 +#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000 +#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF) +#define PROCESS_DUP_HANDLE 64 +#define THREAD_TERMINATE 1 +#define THREAD_SUSPEND_RESUME 2 +#define THREAD_GET_CONTEXT 8 +#define THREAD_SET_CONTEXT 16 +#define THREAD_SET_INFORMATION 32 +#define THREAD_QUERY_INFORMATION 64 +#define THREAD_SET_THREAD_TOKEN 128 +#define THREAD_IMPERSONATE 256 +#define THREAD_DIRECT_IMPERSONATION 0x200 +#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF) +#define MUTANT_QUERY_STATE 0x0001 +#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE) +#define TIMER_QUERY_STATE 0x0001 +#define TIMER_MODIFY_STATE 0x0002 +#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE) +#define THREAD_BASE_PRIORITY_LOWRT 15 +#define THREAD_BASE_PRIORITY_MAX 2 +#define THREAD_BASE_PRIORITY_MIN (-2) +#define THREAD_BASE_PRIORITY_IDLE (-15) +/* + * To prevent gcc compiler warnings, bracket these defines when initialising + * a SID_IDENTIFIER_AUTHORITY, eg. + * SID_IDENTIFIER_AUTHORITY aNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY}; + */ +#define SID_MAX_SUB_AUTHORITIES 15 + +/* security entities */ +#define SECURITY_NULL_RID (0x00000000L) +#define SECURITY_WORLD_RID (0x00000000L) +#define SECURITY_LOCAL_RID (0X00000000L) + +#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0} + +/* S-1-1 */ +#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1} + +/* S-1-2 */ +#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2} + +/* S-1-3 */ +#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3} +#define SECURITY_CREATOR_OWNER_RID (0x00000000L) +#define SECURITY_CREATOR_GROUP_RID (0x00000001L) +#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L) +#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L) + +/* S-1-4 */ +#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4} + +/* S-1-5 */ +#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5} +#define SECURITY_DIALUP_RID 0x00000001L +#define SECURITY_NETWORK_RID 0x00000002L +#define SECURITY_BATCH_RID 0x00000003L +#define SECURITY_INTERACTIVE_RID 0x00000004L +#define SECURITY_LOGON_IDS_RID 0x00000005L +#define SECURITY_SERVICE_RID 0x00000006L +#define SECURITY_ANONYMOUS_LOGON_RID 0x00000007L +#define SECURITY_PROXY_RID 0x00000008L +#define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x00000009L +#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID +#define SECURITY_PRINCIPAL_SELF_RID 0x0000000AL +#define SECURITY_AUTHENTICATED_USER_RID 0x0000000BL +#define SECURITY_RESTRICTED_CODE_RID 0x0000000CL +#define SECURITY_TERMINAL_SERVER_RID 0x0000000DL +#define SECURITY_REMOTE_LOGON_RID 0x0000000EL +#define SECURITY_THIS_ORGANIZATION_RID 0x0000000FL +#define SECURITY_LOCAL_SYSTEM_RID 0x00000012L +#define SECURITY_LOCAL_SERVICE_RID 0x00000013L +#define SECURITY_NETWORK_SERVICE_RID 0x00000014L +#define SECURITY_NT_NON_UNIQUE 0x00000015L +#define SECURITY_BUILTIN_DOMAIN_RID 0x00000020L + +#define SECURITY_PACKAGE_BASE_RID 0x00000040L +#define SECURITY_PACKAGE_NTLM_RID 0x0000000AL +#define SECURITY_PACKAGE_SCHANNEL_RID 0x0000000EL +#define SECURITY_PACKAGE_DIGEST_RID 0x00000015L +#define SECURITY_OTHER_ORGANIZATION_RID 0x000003E8L + +#define SECURITY_LOGON_IDS_RID_COUNT 0x3 +#define SID_REVISION 1 + +#define FOREST_USER_RID_MAX 0x000001F3L +#define DOMAIN_USER_RID_ADMIN 0x000001F4L +#define DOMAIN_USER_RID_GUEST 0x000001F5L +#define DOMAIN_USER_RID_KRBTGT 0x000001F6L +#define DOMAIN_USER_RID_MAX 0x000003E7L + +#define DOMAIN_GROUP_RID_ADMINS 0x00000200L +#define DOMAIN_GROUP_RID_USERS 0x00000201L +#define DOMAIN_GROUP_RID_GUESTS 0x00000202L +#define DOMAIN_GROUP_RID_COMPUTERS 0x00000203L +#define DOMAIN_GROUP_RID_CONTROLLERS 0x00000204L +#define DOMAIN_GROUP_RID_CERT_ADMINS 0x00000205L +#define DOMAIN_GROUP_RID_SCHEMA_ADMINS 0x00000206L +#define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS 0x00000207L +#define DOMAIN_GROUP_RID_POLICY_ADMINS 0x00000208L + +#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16} +#define SECURITY_MANDATORY_UNTRUSTED_RID 0x00000000L +#define SECURITY_MANDATORY_LOW_RID 0x00001000L +#define SECURITY_MANDATORY_MEDIUM_RID 0x00002000L +#define SECURITY_MANDATORY_HIGH_RID 0x00003000L +#define SECURITY_MANDATORY_SYSTEM_RID 0x00004000L +#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID 0x00005000L + +#define DOMAIN_ALIAS_RID_ADMINS 0x00000220L +#define DOMAIN_ALIAS_RID_USERS 0x00000221L +#define DOMAIN_ALIAS_RID_GUESTS 0x00000222L +#define DOMAIN_ALIAS_RID_POWER_USERS 0x00000223L + +#define DOMAIN_ALIAS_RID_ACCOUNT_OPS 0x00000224L +#define DOMAIN_ALIAS_RID_SYSTEM_OPS 0x00000225L +#define DOMAIN_ALIAS_RID_PRINT_OPS 0x00000226L +#define DOMAIN_ALIAS_RID_BACKUP_OPS 0x00000227L + +#define DOMAIN_ALIAS_RID_REPLICATOR 0x00000228L +#define DOMAIN_ALIAS_RID_RAS_SERVERS 0x00000229L +#define DOMAIN_ALIAS_RID_PREW2KCOMPACCESS 0x0000022AL +#define DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS 0x0000022BL +#define DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS 0x0000022CL +#define DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS 0x0000022DL + +#define DOMAIN_ALIAS_RID_MONITORING_USERS 0x0000022EL +#define DOMAIN_ALIAS_RID_LOGGING_USERS 0x0000022FL +#define DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS 0x00000230L +#define DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS 0x00000231L +#define DOMAIN_ALIAS_RID_DCOM_USERS 0x00000232L + +#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16} + +typedef enum { + WinNullSid = 0, + WinWorldSid = 1, + WinLocalSid = 2, + WinCreatorOwnerSid = 3, + WinCreatorGroupSid = 4, + WinCreatorOwnerServerSid = 5, + WinCreatorGroupServerSid = 6, + WinNtAuthoritySid = 7, + WinDialupSid = 8, + WinNetworkSid = 9, + WinBatchSid = 10, + WinInteractiveSid = 11, + WinServiceSid = 12, + WinAnonymousSid = 13, + WinProxySid = 14, + WinEnterpriseControllersSid = 15, + WinSelfSid = 16, + WinAuthenticatedUserSid = 17, + WinRestrictedCodeSid = 18, + WinTerminalServerSid = 19, + WinRemoteLogonIdSid = 20, + WinLogonIdsSid = 21, + WinLocalSystemSid = 22, + WinLocalServiceSid = 23, + WinNetworkServiceSid = 24, + WinBuiltinDomainSid = 25, + WinBuiltinAdministratorsSid = 26, + WinBuiltinUsersSid = 27, + WinBuiltinGuestsSid = 28, + WinBuiltinPowerUsersSid = 29, + WinBuiltinAccountOperatorsSid = 30, + WinBuiltinSystemOperatorsSid = 31, + WinBuiltinPrintOperatorsSid = 32, + WinBuiltinBackupOperatorsSid = 33, + WinBuiltinReplicatorSid = 34, + WinBuiltinPreWindows2000CompatibleAccessSid = 35, + WinBuiltinRemoteDesktopUsersSid = 36, + WinBuiltinNetworkConfigurationOperatorsSid = 37, + WinAccountAdministratorSid = 38, + WinAccountGuestSid = 39, + WinAccountKrbtgtSid = 40, + WinAccountDomainAdminsSid = 41, + WinAccountDomainUsersSid = 42, + WinAccountDomainGuestsSid = 43, + WinAccountComputersSid = 44, + WinAccountControllersSid = 45, + WinAccountCertAdminsSid = 46, + WinAccountSchemaAdminsSid = 47, + WinAccountEnterpriseAdminsSid = 48, + WinAccountPolicyAdminsSid = 49, + WinAccountRasAndIasServersSid = 50, + WinNTLMAuthenticationSid = 51, + WinDigestAuthenticationSid = 52, + WinSChannelAuthenticationSid = 53, + WinThisOrganizationSid = 54, + WinOtherOrganizationSid = 55, + WinBuiltinIncomingForestTrustBuildersSid = 56, + WinBuiltinPerfMonitoringUsersSid = 57, + WinBuiltinPerfLoggingUsersSid = 58, + WinBuiltinAuthorizationAccessSid = 59, + WinBuiltinTerminalServerLicenseServersSid = 60, + WinBuiltinDCOMUsersSid = 61, + WinBuiltinIUsersSid = 62, + WinIUserSid = 63, + WinBuiltinCryptoOperatorsSid = 64, + WinUntrustedLabelSid = 65, + WinLowLabelSid = 66, + WinMediumLabelSid = 67, + WinHighLabelSid = 68, + WinSystemLabelSid = 69, + WinWriteRestrictedCodeSid = 70, + WinCreatorOwnerRightsSid = 71, + WinCacheablePrincipalsGroupSid = 72, + WinNonCacheablePrincipalsGroupSid = 73, + WinEnterpriseReadonlyControllersSid = 74, + WinAccountReadonlyControllersSid = 75, + WinBuiltinEventLogReadersGroup = 76, + WinNewEnterpriseReadonlyControllersSid = 77, + WinBuiltinCertSvcDComAccessGroup = 78, + WinMediumPlusLabelSid = 79, + WinLocalLogonSid = 80, + WinConsoleLogonSid = 81, + WinThisOrganizationCertificateSid = 82, +} WELL_KNOWN_SID_TYPE; + +#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege") +#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege") +#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege") +#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege") +#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege") +#define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege") +#define SE_TCB_NAME TEXT("SeTcbPrivilege") +#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege") +#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege") +#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege") +#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege") +#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege") +#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege") +#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege") +#define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege") +#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege") +#define SE_BACKUP_NAME TEXT("SeBackupPrivilege") +#define SE_RESTORE_NAME TEXT("SeRestorePrivilege") +#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege") +#define SE_DEBUG_NAME TEXT("SeDebugPrivilege") +#define SE_AUDIT_NAME TEXT("SeAuditPrivilege") +#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege") +#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege") +#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege") +#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege") +#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege") +#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege") +#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege") +#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege") +#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege") + +#define SE_GROUP_MANDATORY 0x00000001 +#define SE_GROUP_ENABLED_BY_DEFAULT 0x00000002 +#define SE_GROUP_ENABLED 0x00000004 +#define SE_GROUP_OWNER 0x00000008 +#define SE_GROUP_USE_FOR_DENY_ONLY 0x00000010 +#define SE_GROUP_INTEGRITY 0x00000020 +#define SE_GROUP_INTEGRITY_ENABLED 0x00000040 +#define SE_GROUP_LOGON_ID 0xC0000000 +#define SE_GROUP_RESOURCE 0x20000000 +#define SE_GROUP_VALID_ATTRIBUTES 0xE000007F + +/* FIXME: non-standard */ +#define LANG_ESPERANTO 0x8f +#define LANG_WALON 0x90 +#define LANG_CORNISH 0x92 + +/* FIXME: not present in the official headers */ +#define LANG_MALAGASY 0x8d +#define LANG_GAELIC 0x94 +#define LANG_SAAMI 0x3b +#define LANG_SUTU 0x30 +#define LANG_TSONGA 0x31 +#define LANG_VENDA 0x33 +#define LANG_MANX_GAELIC 0x94 +#define SUBLANG_PORTUGUESE_PORTUGAL 0x02 + +#define ACL_REVISION 2 +#define ACL_REVISION_DS 4 +#define ACL_REVISION1 1 +#define ACL_REVISION2 2 +#define ACL_REVISION3 3 +#define ACL_REVISION4 4 +#define MIN_ACL_REVISION 2 +#define MAX_ACL_REVISION 4 +#define PROCESSOR_INTEL_386 386 +#define PROCESSOR_INTEL_486 486 +#define PROCESSOR_INTEL_PENTIUM 586 +#define PROCESSOR_MIPS_R4000 4000 +#define PROCESSOR_ALPHA_21064 21064 +#define PROCESSOR_INTEL_IA64 2200 +#define PROCESSOR_PPC_601 601 +#define PROCESSOR_PPC_603 603 +#define PROCESSOR_PPC_604 604 +#define PROCESSOR_PPC_620 620 +#define PROCESSOR_INTEL_860 860 +#define PROCESSOR_AMD_X8664 8664 +#define PROCESSOR_MIPS_R2000 2000 +#define PROCESSOR_MIPS_R3000 3000 +#define PROCESSOR_HITACHI_SH3 10003 +#define PROCESSOR_HITACHI_SH3E 10004 +#define PROCESSOR_HITACHI_SH4 10005 +#define PROCESSOR_MOTOROLA_821 821 +#define PROCESSOR_SHx_SH3 103 +#define PROCESSOR_SHx_SH4 104 +#define PROCESSOR_STRONGARM 2577 +#define PROCESSOR_ARM720 1824 +#define PROCESSOR_ARM820 2080 +#define PROCESSOR_ARM920 2336 +#define PROCESSOR_ARM_7TDMI 70001 +#define PROCESSOR_ARCHITECTURE_INTEL 0 +#define PROCESSOR_ARCHITECTURE_MIPS 1 +#define PROCESSOR_ARCHITECTURE_ALPHA 2 +#define PROCESSOR_ARCHITECTURE_PPC 3 +#define PROCESSOR_ARCHITECTURE_SHX 4 +#define PROCESSOR_ARCHITECTURE_ARM 5 +#define PROCESSOR_ARCHITECTURE_IA64 6 +#define PROCESSOR_ARCHITECTURE_ALPHA64 7 +#define PROCESSOR_ARCHITECTURE_MSIL 8 +#define PROCESSOR_ARCHITECTURE_AMD64 9 +#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF +#define PF_FLOATING_POINT_PRECISION_ERRATA 0 +#define PF_FLOATING_POINT_EMULATED 1 +#define PF_COMPARE_EXCHANGE_DOUBLE 2 +#define PF_MMX_INSTRUCTIONS_AVAILABLE 3 +#define PF_PPC_MOVEMEM_64BIT_OK 4 +#define PF_ALPHA_BYTE_INSTRUCTIONS 5 +#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6 +#define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7 +#define PF_RDTSC_INSTRUCTION_AVAILABLE 8 +#define PF_PAE_ENABLED 9 +#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10 +/* also in ddk/ntifs.h */ +#define FILE_ACTION_ADDED 0x00000001 +#define FILE_ACTION_REMOVED 0x00000002 +#define FILE_ACTION_MODIFIED 0x00000003 +#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004 +#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005 +#define FILE_ACTION_ADDED_STREAM 0x00000006 +#define FILE_ACTION_REMOVED_STREAM 0x00000007 +#define FILE_ACTION_MODIFIED_STREAM 0x00000008 +#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009 +#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A +#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B +/* end ntifs.h */ +#define HEAP_NO_SERIALIZE 1 +#define HEAP_GROWABLE 2 +#define HEAP_GENERATE_EXCEPTIONS 4 +#define HEAP_ZERO_MEMORY 8 +#define HEAP_REALLOC_IN_PLACE_ONLY 16 +#define HEAP_TAIL_CHECKING_ENABLED 32 +#define HEAP_FREE_CHECKING_ENABLED 64 +#define HEAP_DISABLE_COALESCE_ON_FREE 128 +#define HEAP_CREATE_ALIGN_16 0x10000 +#define HEAP_CREATE_ENABLE_TRACING 0x20000 +#define HEAP_CREATE_ENABLE_EXECUTE 0x00040000 +#define HEAP_MAXIMUM_TAG 0xFFF +#define HEAP_PSEUDO_TAG_FLAG 0x8000 +#define HEAP_TAG_SHIFT 16 +#define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16))) + +#define KEY_QUERY_VALUE 1 +#define KEY_SET_VALUE 2 +#define KEY_CREATE_SUB_KEY 4 +#define KEY_ENUMERATE_SUB_KEYS 8 +#define KEY_NOTIFY 16 +#define KEY_CREATE_LINK 32 +#define KEY_WOW64_64KEY 0x00000100 +#define KEY_WOW64_32KEY 0x00000200 +#define KEY_WOW64_RES 0x00000300 + +#define KEY_WRITE 0x20006 +#define KEY_EXECUTE 0x20019 +#define KEY_READ 0x20019 +#define KEY_ALL_ACCESS 0xf003f +#define REG_WHOLE_HIVE_VOLATILE 1 +#define REG_REFRESH_HIVE 2 +#define REG_NO_LAZY_FLUSH 4 +#define REG_FORCE_RESTORE 8 +#define REG_OPTION_RESERVED 0 +#define REG_OPTION_NON_VOLATILE 0 +#define REG_OPTION_VOLATILE 1 +#define REG_OPTION_CREATE_LINK 2 +#define REG_OPTION_BACKUP_RESTORE 4 +#define REG_OPTION_OPEN_LINK 8 +#define REG_LEGAL_OPTION 15 +#define OWNER_SECURITY_INFORMATION 1 +#define GROUP_SECURITY_INFORMATION 2 +#define DACL_SECURITY_INFORMATION 4 +#define SACL_SECURITY_INFORMATION 8 +#define PROTECTED_DACL_SECURITY_INFORMATION 0x80000000 +#define PROTECTED_SACL_SECURITY_INFORMATION 0x40000000 +#define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000 +#define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000 +#define MAXIMUM_PROCESSORS 32 +#define PAGE_NOACCESS 0x0001 +#define PAGE_READONLY 0x0002 +#define PAGE_READWRITE 0x0004 +#define PAGE_WRITECOPY 0x0008 +#define PAGE_EXECUTE 0x0010 +#define PAGE_EXECUTE_READ 0x0020 +#define PAGE_EXECUTE_READWRITE 0x0040 +#define PAGE_EXECUTE_WRITECOPY 0x0080 +#define PAGE_GUARD 0x0100 +#define PAGE_NOCACHE 0x0200 +#define PAGE_WRITECOMBINE 0x0400 +#define MEM_COMMIT 0x1000 +#define MEM_RESERVE 0x2000 +#define MEM_DECOMMIT 0x4000 +#define MEM_RELEASE 0x8000 +#define MEM_FREE 0x10000 +#define MEM_PRIVATE 0x20000 +#define MEM_MAPPED 0x40000 +#define MEM_RESET 0x80000 +#define MEM_TOP_DOWN 0x100000 +#define MEM_WRITE_WATCH 0x200000 /* 98/Me */ +#define MEM_PHYSICAL 0x400000 +#define MEM_4MB_PAGES 0x80000000 +#define MEM_IMAGE SEC_IMAGE +#define SEC_NO_CHANGE 0x00400000 +#define SEC_FILE 0x00800000 +#define SEC_IMAGE 0x01000000 +#define SEC_VLM 0x02000000 +#define SEC_RESERVE 0x04000000 +#define SEC_COMMIT 0x08000000 +#define SEC_NOCACHE 0x10000000 +#define SEC_WRITECOMBINE 0x40000000 +#define SEC_LARGE_PAGES 0x80000000 +#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020 +#define SECTION_EXTEND_SIZE 16 +#define SECTION_MAP_READ 4 +#define SECTION_MAP_WRITE 2 +#define SECTION_QUERY 1 +#define SECTION_MAP_EXECUTE 8 +#define SECTION_ALL_ACCESS 0xf001f +#define WRITE_WATCH_FLAG_RESET 0x01 +#define MESSAGE_RESOURCE_UNICODE 1 +#define RTL_CRITSECT_TYPE 0 +#define RTL_RESOURCE_TYPE 1 + +#define IMAGE_SIZEOF_FILE_HEADER 20 +#define IMAGE_FILE_RELOCS_STRIPPED 1 +#define IMAGE_FILE_EXECUTABLE_IMAGE 2 +#define IMAGE_FILE_LINE_NUMS_STRIPPED 4 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8 +#define IMAGE_FILE_AGGRESIVE_WS_TRIM 16 +#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32 +#define IMAGE_FILE_BYTES_REVERSED_LO 128 +#define IMAGE_FILE_32BIT_MACHINE 256 +#define IMAGE_FILE_DEBUG_STRIPPED 512 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024 +#define IMAGE_FILE_NET_RUN_FROM_SWAP 2048 +#define IMAGE_FILE_SYSTEM 4096 +#define IMAGE_FILE_DLL 8192 +#define IMAGE_FILE_UP_SYSTEM_ONLY 16384 +#define IMAGE_FILE_BYTES_REVERSED_HI 32768 +#define IMAGE_FILE_MACHINE_UNKNOWN 0 + +#define IMAGE_FILE_MACHINE_AM33 0x1d3 +#define IMAGE_FILE_MACHINE_AMD64 0x8664 +#define IMAGE_FILE_MACHINE_ARM 0x1c0 +#define IMAGE_FILE_MACHINE_ARMNT 0x1c4 +#define IMAGE_FILE_MACHINE_EBC 0xebc +#define IMAGE_FILE_MACHINE_I386 0x14c +#define IMAGE_FILE_MACHINE_IA64 0x200 +#define IMAGE_FILE_MACHINE_M32R 0x9041 +#define IMAGE_FILE_MACHINE_MIPS16 0x266 +#define IMAGE_FILE_MACHINE_MIPSFPU 0x366 +#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466 +#define IMAGE_FILE_MACHINE_POWERPC 0x1f0 +#define IMAGE_FILE_MACHINE_POWERPCFP 0x1f1 +#define IMAGE_FILE_MACHINE_R4000 0x166 +#define IMAGE_FILE_MACHINE_SH3 0x1a2 +#define IMAGE_FILE_MACHINE_SH3E 0x01a4 +#define IMAGE_FILE_MACHINE_SH3DSP 0x1a3 +#define IMAGE_FILE_MACHINE_SH4 0x1a6 +#define IMAGE_FILE_MACHINE_SH5 0x1a8 +#define IMAGE_FILE_MACHINE_THUMB 0x1c2 +#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x169 +#define IMAGE_FILE_MACHINE_R3000 0x162 +#define IMAGE_FILE_MACHINE_R10000 0x168 +#define IMAGE_FILE_MACHINE_ALPHA 0x184 +#define IMAGE_FILE_MACHINE_ALPHA64 0x0284 +#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64 +#define IMAGE_FILE_MACHINE_CEE 0xC0EE +#define IMAGE_FILE_MACHINE_TRICORE 0x0520 +#define IMAGE_FILE_MACHINE_CEF 0x0CEF + +/* Wine extension */ +#define IMAGE_FILE_MACHINE_ARM64 0x1c5 + +#define IMAGE_FILE_EXPORT_DIRECTORY 0 +#define IMAGE_FILE_IMPORT_DIRECTORY 1 +#define IMAGE_FILE_RESOURCE_DIRECTORY 2 +#define IMAGE_FILE_EXCEPTION_DIRECTORY 3 +#define IMAGE_FILE_SECURITY_DIRECTORY 4 +#define IMAGE_FILE_BASE_RELOCATION_TABLE 5 +#define IMAGE_FILE_DEBUG_DIRECTORY 6 +#define IMAGE_FILE_DESCRIPTION_STRING 7 +#define IMAGE_FILE_MACHINE_VALUE 8 /* Mips */ +#define IMAGE_FILE_THREAD_LOCAL_STORAGE 9 +#define IMAGE_FILE_CALLBACK_DIRECTORY 10 + +#define IMAGE_DOS_SIGNATURE 0x5A4D +#define IMAGE_OS2_SIGNATURE 0x454E +#define IMAGE_OS2_SIGNATURE_LE 0x454C +#define IMAGE_VXD_SIGNATURE 0x454C +#define IMAGE_NT_SIGNATURE 0x00004550 +#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b +#ifdef _WIN64 +#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC +#else +#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC +#endif +#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107 +#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944 +#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 +#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56 +#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28 +#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224 +#define IMAGE_SIZEOF_SHORT_NAME 8 +#define IMAGE_SIZEOF_SECTION_HEADER 40 +#define IMAGE_SIZEOF_SYMBOL 18 +#define IMAGE_SIZEOF_AUX_SYMBOL 18 +#define IMAGE_SIZEOF_RELOCATION 10 +#define IMAGE_SIZEOF_BASE_RELOCATION 8 +#define IMAGE_SIZEOF_LINENUMBER 6 +#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60 +#define SIZEOF_RFPO_DATA 16 + +#define IMAGE_SUBSYSTEM_UNKNOWN 0 +#define IMAGE_SUBSYSTEM_NATIVE 1 +#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 +#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 +#define IMAGE_SUBSYSTEM_OS2_CUI 5 +#define IMAGE_SUBSYSTEM_POSIX_CUI 7 +#define IMAGE_SUBSYSTEM_NATIVE_WINDOWS 8 +#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9 +#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 +#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 +#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 +#define IMAGE_SUBSYSTEM_EFI_ROM 13 +#define IMAGE_SUBSYSTEM_XBOX 14 + +#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040 +#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY 0x0080 +#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100 +#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200 +#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400 +#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800 +#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000 +#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000 +#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) +#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 +#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 +#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 +#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 +#define IMAGE_DIRECTORY_ENTRY_SECURITY 4 +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 +#define IMAGE_DIRECTORY_ENTRY_DEBUG 6 +#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 +#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 +#define IMAGE_DIRECTORY_ENTRY_TLS 9 +#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 +#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 +#define IMAGE_DIRECTORY_ENTRY_IAT 12 +#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13 +#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14 +#define IMAGE_SCN_TYPE_REG 0 +#define IMAGE_SCN_TYPE_DSECT 1 +//#define IMAGE_SCN_TYPE_NOLOAD 2 +#define IMAGE_SCN_TYPE_GROUP 4 +#define IMAGE_SCN_TYPE_NO_PAD 8 +#define IMAGE_SCN_CNT_CODE 32 +#define IMAGE_SCN_CNT_INITIALIZED_DATA 64 +#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 128 +#define IMAGE_SCN_LNK_OTHER 256 +#define IMAGE_SCN_LNK_INFO 512 +#define IMAGE_SCN_LNK_REMOVE 2048 +#define IMAGE_SCN_LNK_COMDAT 4096 +#define IMAGE_SCN_MEM_FARDATA 0x8000 +#define IMAGE_SCN_MEM_PURGEABLE 0x20000 +#define IMAGE_SCN_MEM_16BIT 0x20000 +#define IMAGE_SCN_MEM_LOCKED 0x40000 +#define IMAGE_SCN_MEM_PRELOAD 0x80000 +#define IMAGE_SCN_ALIGN_1BYTES 0x100000 +#define IMAGE_SCN_ALIGN_2BYTES 0x200000 +#define IMAGE_SCN_ALIGN_4BYTES 0x300000 +#define IMAGE_SCN_ALIGN_8BYTES 0x400000 +#define IMAGE_SCN_ALIGN_16BYTES 0x500000 +#define IMAGE_SCN_ALIGN_32BYTES 0x600000 +#define IMAGE_SCN_ALIGN_64BYTES 0x700000 +#define IMAGE_SCN_LNK_NRELOC_OVFL 0x1000000 +#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000 +#define IMAGE_SCN_MEM_NOT_CACHED 0x4000000 +#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000 +#define IMAGE_SCN_MEM_SHARED 0x10000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 +#define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_WRITE 0x80000000 +#define IMAGE_SYM_UNDEFINED 0 +#define IMAGE_SYM_ABSOLUTE (-1) +#define IMAGE_SYM_DEBUG (-2) +#define IMAGE_SYM_TYPE_NULL 0 +#define IMAGE_SYM_TYPE_VOID 1 +#define IMAGE_SYM_TYPE_CHAR 2 +#define IMAGE_SYM_TYPE_SHORT 3 +#define IMAGE_SYM_TYPE_INT 4 +#define IMAGE_SYM_TYPE_LONG 5 +#define IMAGE_SYM_TYPE_FLOAT 6 +#define IMAGE_SYM_TYPE_DOUBLE 7 +#define IMAGE_SYM_TYPE_STRUCT 8 +#define IMAGE_SYM_TYPE_UNION 9 +#define IMAGE_SYM_TYPE_ENUM 10 +#define IMAGE_SYM_TYPE_MOE 11 +#define IMAGE_SYM_TYPE_BYTE 12 +#define IMAGE_SYM_TYPE_WORD 13 +#define IMAGE_SYM_TYPE_UINT 14 +#define IMAGE_SYM_TYPE_DWORD 15 +#define IMAGE_SYM_TYPE_PCODE 32768 +#define IMAGE_SYM_DTYPE_NULL 0 +#define IMAGE_SYM_DTYPE_POINTER 1 +#define IMAGE_SYM_DTYPE_FUNCTION 2 +#define IMAGE_SYM_DTYPE_ARRAY 3 +#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1) +#define IMAGE_SYM_CLASS_NULL 0 +#define IMAGE_SYM_CLASS_AUTOMATIC 1 +#define IMAGE_SYM_CLASS_EXTERNAL 2 +#define IMAGE_SYM_CLASS_STATIC 3 +#define IMAGE_SYM_CLASS_REGISTER 4 +#define IMAGE_SYM_CLASS_EXTERNAL_DEF 5 +#define IMAGE_SYM_CLASS_LABEL 6 +#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7 +#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8 +#define IMAGE_SYM_CLASS_ARGUMENT 9 +#define IMAGE_SYM_CLASS_STRUCT_TAG 10 +#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11 +#define IMAGE_SYM_CLASS_UNION_TAG 12 +#define IMAGE_SYM_CLASS_TYPE_DEFINITION 13 +#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14 +#define IMAGE_SYM_CLASS_ENUM_TAG 15 +#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16 +#define IMAGE_SYM_CLASS_REGISTER_PARAM 17 +#define IMAGE_SYM_CLASS_BIT_FIELD 18 +#define IMAGE_SYM_CLASS_FAR_EXTERNAL 68 +#define IMAGE_SYM_CLASS_BLOCK 100 +#define IMAGE_SYM_CLASS_FUNCTION 101 +#define IMAGE_SYM_CLASS_END_OF_STRUCT 102 +#define IMAGE_SYM_CLASS_FILE 103 +#define IMAGE_SYM_CLASS_SECTION 104 +#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105 +#define IMAGE_COMDAT_SELECT_NODUPLICATES 1 +#define IMAGE_COMDAT_SELECT_ANY 2 +#define IMAGE_COMDAT_SELECT_SAME_SIZE 3 +#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4 +#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5 +#define IMAGE_COMDAT_SELECT_LARGEST 6 +#define IMAGE_COMDAT_SELECT_NEWEST 7 +#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1 +#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2 +#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3 +#define IMAGE_REL_I386_ABSOLUTE 0 +#define IMAGE_REL_I386_DIR16 1 +#define IMAGE_REL_I386_REL16 2 +#define IMAGE_REL_I386_DIR32 6 +#define IMAGE_REL_I386_DIR32NB 7 +#define IMAGE_REL_I386_SEG12 9 +#define IMAGE_REL_I386_SECTION 10 +#define IMAGE_REL_I386_SECREL 11 +#define IMAGE_REL_I386_REL32 20 +#define IMAGE_REL_MIPS_ABSOLUTE 0 +#define IMAGE_REL_MIPS_REFHALF 1 +#define IMAGE_REL_MIPS_REFWORD 2 +#define IMAGE_REL_MIPS_JMPADDR 3 +#define IMAGE_REL_MIPS_REFHI 4 +#define IMAGE_REL_MIPS_REFLO 5 +#define IMAGE_REL_MIPS_GPREL 6 +#define IMAGE_REL_MIPS_LITERAL 7 +#define IMAGE_REL_MIPS_SECTION 10 +#define IMAGE_REL_MIPS_SECREL 11 +#define IMAGE_REL_MIPS_SECRELLO 12 +#define IMAGE_REL_MIPS_SECRELHI 13 +#define IMAGE_REL_MIPS_REFWORDNB 34 +#define IMAGE_REL_MIPS_PAIR 35 +#define IMAGE_REL_ALPHA_ABSOLUTE 0 +#define IMAGE_REL_ALPHA_REFLONG 1 +#define IMAGE_REL_ALPHA_REFQUAD 2 +#define IMAGE_REL_ALPHA_GPREL32 3 +#define IMAGE_REL_ALPHA_LITERAL 4 +#define IMAGE_REL_ALPHA_LITUSE 5 +#define IMAGE_REL_ALPHA_GPDISP 6 +#define IMAGE_REL_ALPHA_BRADDR 7 +#define IMAGE_REL_ALPHA_HINT 8 +#define IMAGE_REL_ALPHA_INLINE_REFLONG 9 +#define IMAGE_REL_ALPHA_REFHI 10 +#define IMAGE_REL_ALPHA_REFLO 11 +#define IMAGE_REL_ALPHA_PAIR 12 +#define IMAGE_REL_ALPHA_MATCH 13 +#define IMAGE_REL_ALPHA_SECTION 14 +#define IMAGE_REL_ALPHA_SECREL 15 +#define IMAGE_REL_ALPHA_REFLONGNB 16 +#define IMAGE_REL_ALPHA_SECRELLO 17 +#define IMAGE_REL_ALPHA_SECRELHI 18 +#define IMAGE_REL_PPC_ABSOLUTE 0 +#define IMAGE_REL_PPC_ADDR64 1 +#define IMAGE_REL_PPC_ADDR32 2 +#define IMAGE_REL_PPC_ADDR24 3 +#define IMAGE_REL_PPC_ADDR16 4 +#define IMAGE_REL_PPC_ADDR14 5 +#define IMAGE_REL_PPC_REL24 6 +#define IMAGE_REL_PPC_REL14 7 +#define IMAGE_REL_PPC_TOCREL16 8 +#define IMAGE_REL_PPC_TOCREL14 9 +#define IMAGE_REL_PPC_ADDR32NB 10 +#define IMAGE_REL_PPC_SECREL 11 +#define IMAGE_REL_PPC_SECTION 12 +#define IMAGE_REL_PPC_IFGLUE 13 +#define IMAGE_REL_PPC_IMGLUE 14 +#define IMAGE_REL_PPC_SECREL16 15 +#define IMAGE_REL_PPC_REFHI 16 +#define IMAGE_REL_PPC_REFLO 17 +#define IMAGE_REL_PPC_PAIR 18 +#define IMAGE_REL_PPC_TYPEMASK 255 +#define IMAGE_REL_PPC_NEG 256 +#define IMAGE_REL_PPC_BRTAKEN 512 +#define IMAGE_REL_PPC_BRNTAKEN 1024 +#define IMAGE_REL_PPC_TOCDEFN 2048 +#define IMAGE_REL_BASED_ABSOLUTE 0 +#define IMAGE_REL_BASED_HIGH 1 +#define IMAGE_REL_BASED_LOW 2 +#define IMAGE_REL_BASED_HIGHLOW 3 +#define IMAGE_REL_BASED_HIGHADJ 4 +#define IMAGE_REL_BASED_MIPS_JMPADDR 5 +#define IMAGE_REL_BASED_MIPS_JMPADDR16 9 +#define IMAGE_REL_BASED_IA64_IMM64 9 +#define IMAGE_REL_BASED_DIR64 10 +#define IMAGE_ARCHIVE_START_SIZE 8 +#define IMAGE_ARCHIVE_START "!\n" +#define IMAGE_ARCHIVE_END "`\n" +#define IMAGE_ARCHIVE_PAD "\n" +#define IMAGE_ARCHIVE_LINKER_MEMBER "/ " +#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// " +#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000 +#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000 +#define IMAGE_DEBUG_TYPE_UNKNOWN 0 +#define IMAGE_DEBUG_TYPE_COFF 1 +#define IMAGE_DEBUG_TYPE_CODEVIEW 2 +#define IMAGE_DEBUG_TYPE_FPO 3 +#define IMAGE_DEBUG_TYPE_MISC 4 +#define IMAGE_DEBUG_TYPE_EXCEPTION 5 +#define IMAGE_DEBUG_TYPE_FIXUP 6 +#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7 +#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8 +#define FRAME_FPO 0 +#define FRAME_TRAP 1 +#define FRAME_TSS 2 +#define FRAME_NONFPO 3 +#define IMAGE_DEBUG_MISC_EXENAME 1 +#define N_BTMASK 0x000F +#define N_TMASK 0x0030 +#define N_TMASK1 0x00C0 +#define N_TMASK2 0x00F0 +#define N_BTSHFT 4 +#define N_TSHIFT 2 +#define IS_TEXT_UNICODE_ASCII16 1 +#define IS_TEXT_UNICODE_REVERSE_ASCII16 16 +#define IS_TEXT_UNICODE_STATISTICS 2 +#define IS_TEXT_UNICODE_REVERSE_STATISTICS 32 +#define IS_TEXT_UNICODE_CONTROLS 4 +#define IS_TEXT_UNICODE_REVERSE_CONTROLS 64 +#define IS_TEXT_UNICODE_SIGNATURE 8 +#define IS_TEXT_UNICODE_REVERSE_SIGNATURE 128 +#define IS_TEXT_UNICODE_ILLEGAL_CHARS 256 +#define IS_TEXT_UNICODE_ODD_LENGTH 512 +#define IS_TEXT_UNICODE_NULL_BYTES 4096 +#define IS_TEXT_UNICODE_UNICODE_MASK 15 +#define IS_TEXT_UNICODE_REVERSE_MASK 240 +#define IS_TEXT_UNICODE_NOT_UNICODE_MASK 3840 +#define IS_TEXT_UNICODE_NOT_ASCII_MASK 61440 +#define SERVICE_KERNEL_DRIVER 1 +#define SERVICE_FILE_SYSTEM_DRIVER 2 +#define SERVICE_ADAPTER 4 +#define SERVICE_RECOGNIZER_DRIVER 8 +#define SERVICE_DRIVER (SERVICE_KERNEL_DRIVER|SERVICE_FILE_SYSTEM_DRIVER|SERVICE_RECOGNIZER_DRIVER) +#define SERVICE_WIN32_OWN_PROCESS 16 +#define SERVICE_WIN32_SHARE_PROCESS 32 +#define SERVICE_WIN32 (SERVICE_WIN32_OWN_PROCESS|SERVICE_WIN32_SHARE_PROCESS) +#define SERVICE_INTERACTIVE_PROCESS 256 +#define SERVICE_TYPE_ALL (SERVICE_WIN32|SERVICE_ADAPTER|SERVICE_DRIVER|SERVICE_INTERACTIVE_PROCESS) +#define SERVICE_BOOT_START 0 +#define SERVICE_SYSTEM_START 1 +#define SERVICE_AUTO_START 2 +#define SERVICE_DEMAND_START 3 +#define SERVICE_DISABLED 4 +#define SERVICE_ERROR_IGNORE 0 +#define SERVICE_ERROR_NORMAL 1 +#define SERVICE_ERROR_SEVERE 2 +#define SERVICE_ERROR_CRITICAL 3 +#define SE_OWNER_DEFAULTED 0x0001 +#define SE_GROUP_DEFAULTED 0x0002 +#define SE_DACL_PRESENT 0x0004 +#define SE_DACL_DEFAULTED 0x0008 +#define SE_SACL_PRESENT 0x0010 +#define SE_SACL_DEFAULTED 0x0020 +#define SE_DACL_UNTRUSTED 0x0040 +#define SE_SERVER_SECURITY 0x0080 +#define SE_DACL_AUTO_INHERIT_REQ 0x0100 +#define SE_SACL_AUTO_INHERIT_REQ 0x0200 +#define SE_DACL_AUTO_INHERITED 0x0400 +#define SE_SACL_AUTO_INHERITED 0x0800 +#define SE_DACL_PROTECTED 0x1000 +#define SE_SACL_PROTECTED 0x2000 +#define SE_RM_CONTROL_VALID 0x4000 +#define SE_SELF_RELATIVE 0x8000 +#define SECURITY_DESCRIPTOR_MIN_LENGTH 20 +#define SECURITY_DESCRIPTOR_REVISION 1 +#define SECURITY_DESCRIPTOR_REVISION1 1 +#define SE_PRIVILEGE_ENABLED_BY_DEFAULT 1 +#define SE_PRIVILEGE_ENABLED 2 +#define SE_PRIVILEGE_USED_FOR_ACCESS 0x80000000 +#define PRIVILEGE_SET_ALL_NECESSARY 1 +#define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation +#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation +#define SECURITY_DYNAMIC_TRACKING TRUE +#define SECURITY_STATIC_TRACKING FALSE +/* also in ddk/ntifs.h */ +#define TOKEN_ASSIGN_PRIMARY (0x0001) +#define TOKEN_DUPLICATE (0x0002) +#define TOKEN_IMPERSONATE (0x0004) +#define TOKEN_QUERY (0x0008) +#define TOKEN_QUERY_SOURCE (0x0010) +#define TOKEN_ADJUST_PRIVILEGES (0x0020) +#define TOKEN_ADJUST_GROUPS (0x0040) +#define TOKEN_ADJUST_DEFAULT (0x0080) +#define TOKEN_ADJUST_SESSIONID (0x0100) +#define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\ + TOKEN_ASSIGN_PRIMARY |\ + TOKEN_DUPLICATE |\ + TOKEN_IMPERSONATE |\ + TOKEN_QUERY |\ + TOKEN_QUERY_SOURCE |\ + TOKEN_ADJUST_PRIVILEGES |\ + TOKEN_ADJUST_GROUPS |\ + TOKEN_ADJUST_DEFAULT |\ + TOKEN_ADJUST_SESSIONID) +#define TOKEN_READ (STANDARD_RIGHTS_READ |\ + TOKEN_QUERY) +#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\ + TOKEN_ADJUST_PRIVILEGES |\ + TOKEN_ADJUST_GROUPS |\ + TOKEN_ADJUST_DEFAULT) + +#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE) +#define TOKEN_SOURCE_LENGTH 8 +/* end ddk/ntifs.h */ +#define DLL_PROCESS_DETACH 0 +#define DLL_PROCESS_ATTACH 1 +#define DLL_THREAD_ATTACH 2 +#define DLL_THREAD_DETACH 3 +#ifdef __WINESRC__ +#define DLL_WINE_PREATTACH 8 /* Never called, but defined for compatibility with Wine source */ +#endif +#define TAPE_ABSOLUTE_POSITION 0 +#define TAPE_LOGICAL_POSITION 1 +#define TAPE_PSEUDO_LOGICAL_POSITION 2 +#define TAPE_REWIND 0 +#define TAPE_ABSOLUTE_BLOCK 1 +#define TAPE_LOGICAL_BLOCK 2 +#define TAPE_PSEUDO_LOGICAL_BLOCK 3 +#define TAPE_SPACE_END_OF_DATA 4 +#define TAPE_SPACE_RELATIVE_BLOCKS 5 +#define TAPE_SPACE_FILEMARKS 6 +#define TAPE_SPACE_SEQUENTIAL_FMKS 7 +#define TAPE_SPACE_SETMARKS 8 +#define TAPE_SPACE_SEQUENTIAL_SMKS 9 +#define TAPE_DRIVE_FIXED 1 +#define TAPE_DRIVE_SELECT 2 +#define TAPE_DRIVE_INITIATOR 4 +#define TAPE_DRIVE_ERASE_SHORT 16 +#define TAPE_DRIVE_ERASE_LONG 32 +#define TAPE_DRIVE_ERASE_BOP_ONLY 64 +#define TAPE_DRIVE_ERASE_IMMEDIATE 128 +#define TAPE_DRIVE_TAPE_CAPACITY 256 +#define TAPE_DRIVE_TAPE_REMAINING 512 +#define TAPE_DRIVE_FIXED_BLOCK 1024 +#define TAPE_DRIVE_VARIABLE_BLOCK 2048 +#define TAPE_DRIVE_WRITE_PROTECT 4096 +#define TAPE_DRIVE_EOT_WZ_SIZE 8192 +#define TAPE_DRIVE_ECC 0x10000 +#define TAPE_DRIVE_COMPRESSION 0x20000 +#define TAPE_DRIVE_PADDING 0x40000 +#define TAPE_DRIVE_REPORT_SMKS 0x80000 +#define TAPE_DRIVE_GET_ABSOLUTE_BLK 0x100000 +#define TAPE_DRIVE_GET_LOGICAL_BLK 0x200000 +#define TAPE_DRIVE_SET_EOT_WZ_SIZE 0x400000 +#define TAPE_DRIVE_EJECT_MEDIA 0x1000000 +#define TAPE_DRIVE_CLEAN_REQUESTS 0x2000000 +#define TAPE_DRIVE_SET_CMP_BOP_ONLY 0x4000000 +#define TAPE_DRIVE_RESERVED_BIT 0x80000000 +#define TAPE_DRIVE_LOAD_UNLOAD 0x80000001 +#define TAPE_DRIVE_TENSION 0x80000002 +#define TAPE_DRIVE_LOCK_UNLOCK 0x80000004 +#define TAPE_DRIVE_REWIND_IMMEDIATE 0x80000008 +#define TAPE_DRIVE_SET_BLOCK_SIZE 0x80000010 +#define TAPE_DRIVE_LOAD_UNLD_IMMED 0x80000020 +#define TAPE_DRIVE_TENSION_IMMED 0x80000040 +#define TAPE_DRIVE_LOCK_UNLK_IMMED 0x80000080 +#define TAPE_DRIVE_SET_ECC 0x80000100 +#define TAPE_DRIVE_SET_COMPRESSION 0x80000200 +#define TAPE_DRIVE_SET_PADDING 0x80000400 +#define TAPE_DRIVE_SET_REPORT_SMKS 0x80000800 +#define TAPE_DRIVE_ABSOLUTE_BLK 0x80001000 +#define TAPE_DRIVE_ABS_BLK_IMMED 0x80002000 +#define TAPE_DRIVE_LOGICAL_BLK 0x80004000 +#define TAPE_DRIVE_LOG_BLK_IMMED 0x80008000 +#define TAPE_DRIVE_END_OF_DATA 0x80010000 +#define TAPE_DRIVE_RELATIVE_BLKS 0x80020000 +#define TAPE_DRIVE_FILEMARKS 0x80040000 +#define TAPE_DRIVE_SEQUENTIAL_FMKS 0x80080000 +#define TAPE_DRIVE_SETMARKS 0x80100000 +#define TAPE_DRIVE_SEQUENTIAL_SMKS 0x80200000 +#define TAPE_DRIVE_REVERSE_POSITION 0x80400000 +#define TAPE_DRIVE_SPACE_IMMEDIATE 0x80800000 +#define TAPE_DRIVE_WRITE_SETMARKS 0x81000000 +#define TAPE_DRIVE_WRITE_FILEMARKS 0x82000000 +#define TAPE_DRIVE_WRITE_SHORT_FMKS 0x84000000 +#define TAPE_DRIVE_WRITE_LONG_FMKS 0x88000000 +#define TAPE_DRIVE_WRITE_MARK_IMMED 0x90000000 +#define TAPE_DRIVE_FORMAT 0xA0000000 +#define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000 +#define TAPE_DRIVE_HIGH_FEATURES 0x80000000 +#define TAPE_FIXED_PARTITIONS 0 +#define TAPE_INITIATOR_PARTITIONS 2 +#define TAPE_SELECT_PARTITIONS 1 +#define TAPE_FILEMARKS 1 +#define TAPE_LONG_FILEMARKS 3 +#define TAPE_SETMARKS 0 +#define TAPE_SHORT_FILEMARKS 2 +#define TAPE_ERASE_LONG 1 +#define TAPE_ERASE_SHORT 0 +#define TAPE_LOAD 0 +#define TAPE_UNLOAD 1 +#define TAPE_TENSION 2 +#define TAPE_LOCK 3 +#define TAPE_UNLOCK 4 +#define TAPE_FORMAT 5 +#if (_WIN32_WINNT >= 0x0500) +#define VER_MINORVERSION 0x0000001 +#define VER_MAJORVERSION 0x0000002 +#define VER_BUILDNUMBER 0x0000004 +#define VER_PLATFORMID 0x0000008 +#define VER_SERVICEPACKMINOR 0x0000010 +#define VER_SERVICEPACKMAJOR 0x0000020 +#define VER_SUITENAME 0x0000040 +#define VER_PRODUCT_TYPE 0x0000080 +#define VER_EQUAL 1 +#define VER_GREATER 2 +#define VER_GREATER_EQUAL 3 +#define VER_LESS 4 +#define VER_LESS_EQUAL 5 +#define VER_AND 6 +#define VER_OR 7 +#endif + +#define VER_PLATFORM_WIN32s 0 +#define VER_PLATFORM_WIN32_WINDOWS 1 +#define VER_PLATFORM_WIN32_NT 2 +#define VER_NT_WORKSTATION 1 +#define VER_NT_DOMAIN_CONTROLLER 2 +#define VER_NT_SERVER 3 + +#define WT_EXECUTEDEFAULT 0x00000000 +#define WT_EXECUTEINIOTHREAD 0x00000001 +#define WT_EXECUTEINUITHREAD 0x00000002 +#define WT_EXECUTEINWAITTHREAD 0x00000004 +#define WT_EXECUTEONLYONCE 0x00000008 +#define WT_EXECUTELONGFUNCTION 0x00000010 +#define WT_EXECUTEINTIMERTHREAD 0x00000020 +#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040 +#define WT_EXECUTEINPERSISTENTTHREAD 0x00000080 +#define WT_TRANSFER_IMPERSONATION 0x00000100 +#define WT_SET_MAX_THREADPOOL_THREADS(flags,limit) ((flags)|=(limit)<<16) +typedef VOID (NTAPI *WORKERCALLBACKFUNC)(PVOID); +#if (_WIN32_WINNT >= 0x0501) +#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION 1 +#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION 2 +#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION 3 +#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION 4 +#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION 5 +#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION 6 +#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION 7 +#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES 9 +#endif /* (_WIN32_WINNT >= 0x0501) */ +#define BTYPE(x) ((x)&N_BTMASK) +#define ISPTR(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_POINTER<>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK)) +#define TLS_MINIMUM_AVAILABLE 64 +#define FLS_MAXIMUM_AVAILABLE 128 +#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer) +#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384 +#define IO_REPARSE_TAG_RESERVED_ZERO 0 +#define IO_REPARSE_TAG_RESERVED_ONE 1 +#define IO_REPARSE_TAG_RESERVED_RANGE IO_REPARSE_TAG_RESERVED_ONE +#define IsReparseTagMicrosoft(x) ((x)&0x80000000) +#define IsReparseTagHighLatency(x) ((x)&0x40000000) +#define IsReparseTagNameSurrogate(x) ((x)&0x20000000) +#define IO_REPARSE_TAG_VALID_VALUES 0xE000FFFF +#define IsReparseTagValid(x) (!((x)&~IO_REPARSE_TAG_VALID_VALUES)&&((x)>IO_REPARSE_TAG_RESERVED_RANGE)) +#define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO +#define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 +#define IO_REPARSE_TAG_SYMLINK 0xA000000CL +#ifndef RC_INVOKED +typedef DWORD ACCESS_MASK, *PACCESS_MASK; + +#ifdef _GUID_DEFINED +# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead +#endif + +#if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in basetyps.h */ +#define GUID_DEFINED +typedef struct _GUID { + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; +} GUID, *REFGUID, *LPGUID; +#endif /* GUID_DEFINED */ + +#define SYSTEM_LUID { 0x3E7, 0x0 } + +/* ACE Access Types, also in ntifs.h */ +#define ACCESS_MIN_MS_ACE_TYPE (0x0) +#define ACCESS_ALLOWED_ACE_TYPE (0x0) +#define ACCESS_DENIED_ACE_TYPE (0x1) +#define SYSTEM_AUDIT_ACE_TYPE (0x2) +#define SYSTEM_ALARM_ACE_TYPE (0x3) +#define ACCESS_MAX_MS_V2_ACE_TYPE (0x3) +#define ACCESS_ALLOWED_COMPOUND_ACE_TYPE (0x4) +#define ACCESS_MAX_MS_V3_ACE_TYPE (0x4) +#define ACCESS_MIN_MS_OBJECT_ACE_TYPE (0x5) +#define ACCESS_ALLOWED_OBJECT_ACE_TYPE (0x5) +#define ACCESS_DENIED_OBJECT_ACE_TYPE (0x6) +#define SYSTEM_AUDIT_OBJECT_ACE_TYPE (0x7) +#define SYSTEM_ALARM_OBJECT_ACE_TYPE (0x8) +#define ACCESS_MAX_MS_OBJECT_ACE_TYPE (0x8) +#define ACCESS_MAX_MS_V4_ACE_TYPE (0x8) +#define ACCESS_MAX_MS_ACE_TYPE (0x8) +#define ACCESS_ALLOWED_CALLBACK_ACE_TYPE (0x9) +#define ACCESS_DENIED_CALLBACK_ACE_TYPE (0xA) +#define ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE (0xB) +#define ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE (0xC) +#define SYSTEM_AUDIT_CALLBACK_ACE_TYPE (0xD) +#define SYSTEM_ALARM_CALLBACK_ACE_TYPE (0xE) +#define SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE (0xF) +#define SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE (0x10) +#define SYSTEM_MANDATORY_LABEL_ACE_TYPE (0x11) +#define ACCESS_MAX_MS_V5_ACE_TYPE (0x11) +/* end ntifs.h */ + +typedef struct _GENERIC_MAPPING { + ACCESS_MASK GenericRead; + ACCESS_MASK GenericWrite; + ACCESS_MASK GenericExecute; + ACCESS_MASK GenericAll; +} GENERIC_MAPPING, *PGENERIC_MAPPING; + +typedef struct _ACE_HEADER { + BYTE AceType; + BYTE AceFlags; + WORD AceSize; +} ACE_HEADER, *PACE_HEADER; + +typedef struct _ACCESS_ALLOWED_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} ACCESS_ALLOWED_ACE, *PACCESS_ALLOWED_ACE; + +typedef struct _ACCESS_DENIED_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} ACCESS_DENIED_ACE, *PACCESS_DENIED_ACE; + +typedef struct _SYSTEM_AUDIT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} SYSTEM_AUDIT_ACE, *PSYSTEM_AUDIT_ACE; + +typedef struct _SYSTEM_ALARM_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE; + +typedef struct _SYSTEM_MANDATORY_LABEL_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} SYSTEM_MANDATORY_LABEL_ACE, *PSYSTEM_MANDATORY_LABEL_ACE; + +#define SYSTEM_MANDATORY_LABEL_NO_WRITE_UP 0x1 +#define SYSTEM_MANDATORY_LABEL_NO_READ_UP 0x2 +#define SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP 0x4 +#define SYSTEM_MANDATORY_LABEL_VALID_MASK (SYSTEM_MANDATORY_LABEL_NO_WRITE_UP | SYSTEM_MANDATORY_LABEL_NO_READ_UP | SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP) + +typedef struct _ACCESS_ALLOWED_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} ACCESS_ALLOWED_OBJECT_ACE,*PACCESS_ALLOWED_OBJECT_ACE; + +typedef struct _ACCESS_DENIED_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} ACCESS_DENIED_OBJECT_ACE,*PACCESS_DENIED_OBJECT_ACE; + +typedef struct _SYSTEM_AUDIT_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} SYSTEM_AUDIT_OBJECT_ACE,*PSYSTEM_AUDIT_OBJECT_ACE; + +typedef struct _SYSTEM_ALARM_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} SYSTEM_ALARM_OBJECT_ACE,*PSYSTEM_ALARM_OBJECT_ACE; + +typedef struct _ACCESS_ALLOWED_CALLBACK_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} ACCESS_ALLOWED_CALLBACK_ACE, *PACCESS_ALLOWED_CALLBACK_ACE; + +typedef struct _ACCESS_DENIED_CALLBACK_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} ACCESS_DENIED_CALLBACK_ACE, *PACCESS_DENIED_CALLBACK_ACE; + +typedef struct _SYSTEM_AUDIT_CALLBACK_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} SYSTEM_AUDIT_CALLBACK_ACE, *PSYSTEM_AUDIT_CALLBACK_ACE; + +typedef struct _SYSTEM_ALARM_CALLBACK_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD SidStart; +} SYSTEM_ALARM_CALLBACK_ACE, *PSYSTEM_ALARM_CALLBACK_ACE; + +typedef struct _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} ACCESS_ALLOWED_CALLBACK_OBJECT_ACE, *PACCESS_ALLOWED_CALLBACK_OBJECT_ACE; + +typedef struct _ACCESS_DENIED_CALLBACK_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} ACCESS_DENIED_CALLBACK_OBJECT_ACE, *PACCESS_DENIED_CALLBACK_OBJECT_ACE; + +typedef struct _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} SYSTEM_AUDIT_CALLBACK_OBJECT_ACE, *PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE; + +typedef struct _SYSTEM_ALARM_CALLBACK_OBJECT_ACE { + ACE_HEADER Header; + ACCESS_MASK Mask; + DWORD Flags; + GUID ObjectType; + GUID InheritedObjectType; + DWORD SidStart; +} SYSTEM_ALARM_CALLBACK_OBJECT_ACE, *PSYSTEM_ALARM_CALLBACK_OBJECT_ACE; + +typedef struct _ACL { + BYTE AclRevision; + BYTE Sbz1; + WORD AclSize; + WORD AceCount; + WORD Sbz2; +} ACL,*PACL; + +typedef enum _ACL_INFORMATION_CLASS { + AclRevisionInformation = 1, + AclSizeInformation +} ACL_INFORMATION_CLASS; + +typedef struct _ACL_REVISION_INFORMATION { + DWORD AclRevision; +} ACL_REVISION_INFORMATION, *PACL_REVISION_INFORMATION; + +typedef struct _ACL_SIZE_INFORMATION { + DWORD AceCount; + DWORD AclBytesInUse; + DWORD AclBytesFree; +} ACL_SIZE_INFORMATION, *PACL_SIZE_INFORMATION; + +#ifndef _LDT_ENTRY_DEFINED +#define _LDT_ENTRY_DEFINED + +typedef struct _LDT_ENTRY { + WORD LimitLow; + WORD BaseLow; + union { + struct { + BYTE BaseMid; + BYTE Flags1; + BYTE Flags2; + BYTE BaseHi; + } Bytes; + struct { + DWORD BaseMid:8; + DWORD Type:5; + DWORD Dpl:2; + DWORD Pres:1; + DWORD LimitHi:4; + DWORD Sys:1; + DWORD Reserved_0:1; + DWORD Default_Big:1; + DWORD Granularity:1; + DWORD BaseHi:8; + } Bits; + } HighWord; +} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY; + +#endif /* _LDT_ENTRY_DEFINED */ + +/* FIXME: add more machines */ +#if defined(_X86_) && !defined(__PowerPC__) +#define SIZE_OF_80387_REGISTERS 80 +#define CONTEXT_i386 0x10000 +#define CONTEXT_i486 0x10000 +#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L) +#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L) +#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) +#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) +#define MAXIMUM_SUPPORTED_EXTENSION 512 + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct _FLOATING_SAVE_AREA { + DWORD ControlWord; + DWORD StatusWord; + DWORD TagWord; + DWORD ErrorOffset; + DWORD ErrorSelector; + DWORD DataOffset; + DWORD DataSelector; + BYTE RegisterArea[80]; + DWORD Cr0NpxState; +} FLOATING_SAVE_AREA, *PFLOATING_SAVE_AREA; + +typedef struct _CONTEXT { + DWORD ContextFlags; + DWORD Dr0; + DWORD Dr1; + DWORD Dr2; + DWORD Dr3; + DWORD Dr6; + DWORD Dr7; + FLOATING_SAVE_AREA FloatSave; + DWORD SegGs; + DWORD SegFs; + DWORD SegEs; + DWORD SegDs; + DWORD Edi; + DWORD Esi; + DWORD Ebx; + DWORD Edx; + DWORD Ecx; + DWORD Eax; + DWORD Ebp; + DWORD Eip; + DWORD SegCs; + DWORD EFlags; + DWORD Esp; + DWORD SegSs; + BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; +} CONTEXT; +#elif defined(__x86_64__) + +#define CONTEXT_AMD64 0x100000 + +#if !defined(RC_INVOKED) +#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L) +#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L) +#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L) +#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) + +#define CONTEXT_EXCEPTION_ACTIVE 0x8000000 +#define CONTEXT_SERVICE_ACTIVE 0x10000000 +#define CONTEXT_EXCEPTION_REQUEST 0x40000000 +#define CONTEXT_EXCEPTION_REPORTING 0x80000000 +#endif + +#define INITIAL_MXCSR 0x1f80 +#define INITIAL_FPCSR 0x027f +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct DECLSPEC_ALIGN(16) _M128A { + ULONGLONG Low; + LONGLONG High; +} M128A, *PM128A; + +typedef struct _XMM_SAVE_AREA32 { + WORD ControlWord; + WORD StatusWord; + BYTE TagWord; + BYTE Reserved1; + WORD ErrorOpcode; + DWORD ErrorOffset; + WORD ErrorSelector; + WORD Reserved2; + DWORD DataOffset; + WORD DataSelector; + WORD Reserved3; + DWORD MxCsr; + DWORD MxCsr_Mask; + M128A FloatRegisters[8]; + M128A XmmRegisters[16]; + BYTE Reserved4[96]; +} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; + +typedef struct DECLSPEC_ALIGN(16) _CONTEXT { + DWORD64 P1Home; + DWORD64 P2Home; + DWORD64 P3Home; + DWORD64 P4Home; + DWORD64 P5Home; + DWORD64 P6Home; + + /* Control flags */ + DWORD ContextFlags; + DWORD MxCsr; + + /* Segment */ + WORD SegCs; + WORD SegDs; + WORD SegEs; + WORD SegFs; + WORD SegGs; + WORD SegSs; + DWORD EFlags; + + /* Debug */ + DWORD64 Dr0; + DWORD64 Dr1; + DWORD64 Dr2; + DWORD64 Dr3; + DWORD64 Dr6; + DWORD64 Dr7; + + /* Integer */ + DWORD64 Rax; + DWORD64 Rcx; + DWORD64 Rdx; + DWORD64 Rbx; + DWORD64 Rsp; + DWORD64 Rbp; + DWORD64 Rsi; + DWORD64 Rdi; + DWORD64 R8; + DWORD64 R9; + DWORD64 R10; + DWORD64 R11; + DWORD64 R12; + DWORD64 R13; + DWORD64 R14; + DWORD64 R15; + + /* Counter */ + DWORD64 Rip; + + /* Floating point */ + union { + XMM_SAVE_AREA32 FltSave; + struct { + M128A Header[2]; + M128A Legacy[8]; + M128A Xmm0; + M128A Xmm1; + M128A Xmm2; + M128A Xmm3; + M128A Xmm4; + M128A Xmm5; + M128A Xmm6; + M128A Xmm7; + M128A Xmm8; + M128A Xmm9; + M128A Xmm10; + M128A Xmm11; + M128A Xmm12; + M128A Xmm13; + M128A Xmm14; + M128A Xmm15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + + /* Vector */ + M128A VectorRegister[26]; + DWORD64 VectorControl; + + /* Debug control */ + DWORD64 DebugControl; + DWORD64 LastBranchToRip; + DWORD64 LastBranchFromRip; + DWORD64 LastExceptionToRip; + DWORD64 LastExceptionFromRip; +} CONTEXT; + + +typedef struct _KNONVOLATILE_CONTEXT_POINTERS { + union { + PM128A FloatingContext[16]; + struct { + PM128A Xmm0; + PM128A Xmm1; + PM128A Xmm2; + PM128A Xmm3; + PM128A Xmm4; + PM128A Xmm5; + PM128A Xmm6; + PM128A Xmm7; + PM128A Xmm8; + PM128A Xmm9; + PM128A Xmm10; + PM128A Xmm11; + PM128A Xmm12; + PM128A Xmm13; + PM128A Xmm14; + PM128A Xmm15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + + union { + PULONG64 IntegerContext[16]; + struct { + PULONG64 Rax; + PULONG64 Rcx; + PULONG64 Rdx; + PULONG64 Rbx; + PULONG64 Rsp; + PULONG64 Rbp; + PULONG64 Rsi; + PULONG64 Rdi; + PULONG64 R8; + PULONG64 R9; + PULONG64 R10; + PULONG64 R11; + PULONG64 R12; + PULONG64 R13; + PULONG64 R14; + PULONG64 R15; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME2; +} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS; + +#define RUNTIME_FUNCTION_INDIRECT 0x1 + +typedef struct _RUNTIME_FUNCTION { + DWORD BeginAddress; + DWORD EndAddress; + DWORD UnwindData; +} RUNTIME_FUNCTION,*PRUNTIME_FUNCTION; + +#define UNWIND_HISTORY_TABLE_SIZE 12 + +typedef struct _UNWIND_HISTORY_TABLE_ENTRY +{ + DWORD64 ImageBase; + PRUNTIME_FUNCTION FunctionEntry; +} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY; + +typedef struct _UNWIND_HISTORY_TABLE +{ + DWORD Count; + UCHAR Search; + ULONG64 LowAddress; + ULONG64 HighAddress; + UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE]; +} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE; + +typedef +_Function_class_(GET_RUNTIME_FUNCTION_CALLBACK) +PRUNTIME_FUNCTION +(*PGET_RUNTIME_FUNCTION_CALLBACK)( + _In_ DWORD64 ControlPc, + _In_opt_ PVOID Context); + +typedef +_Function_class_(OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK) +_Must_inspect_result_ +DWORD +(*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)( + _In_ HANDLE Process, + _In_ PVOID TableAddress, + _Out_ PDWORD Entries, + _Out_ PRUNTIME_FUNCTION *Functions); + +#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback" + +NTSYSAPI +VOID +__cdecl +RtlRestoreContext(struct _CONTEXT *ContextRecord, + struct _EXCEPTION_RECORD *ExceptionRecord); + +NTSYSAPI +BOOLEAN +__cdecl +RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable, + DWORD EntryCount, + DWORD64 BaseAddress); + +NTSYSAPI +BOOLEAN +__cdecl +RtlInstallFunctionTableCallback(DWORD64 TableIdentifier, + DWORD64 BaseAddress, + DWORD Length, + PGET_RUNTIME_FUNCTION_CALLBACK Callback, + PVOID Context, + PCWSTR OutOfProcessCallbackDll); + +NTSYSAPI +BOOLEAN +__cdecl +RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable); + +NTSYSAPI +PRUNTIME_FUNCTION +NTAPI +RtlLookupFunctionEntry( + _In_ DWORD64 ControlPc, + _Out_ PDWORD64 ImageBase, + _Inout_opt_ PUNWIND_HISTORY_TABLE HistoryTable); + +NTSYSAPI +PEXCEPTION_ROUTINE +NTAPI +RtlVirtualUnwind( + _In_ DWORD HandlerType, + _In_ DWORD64 ImageBase, + _In_ DWORD64 ControlPc, + _In_ PRUNTIME_FUNCTION FunctionEntry, + _Inout_ struct _CONTEXT *ContextRecord, + _Out_ PVOID *HandlerData, + _Out_ PDWORD64 EstablisherFrame, + _Inout_opt_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers); + +#elif defined(_PPC_) +#define CONTEXT_CONTROL 1L +#define CONTEXT_FLOATING_POINT 2L +#define CONTEXT_INTEGER 4L +#define CONTEXT_DEBUG_REGISTERS 8L +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER) +typedef struct _FLOATING_SAVE_AREA +{ + double Fpr0; + double Fpr1; + double Fpr2; + double Fpr3; + double Fpr4; + double Fpr5; + double Fpr6; + double Fpr7; + double Fpr8; + double Fpr9; + double Fpr10; + double Fpr11; + double Fpr12; + double Fpr13; + double Fpr14; + double Fpr15; + double Fpr16; + double Fpr17; + double Fpr18; + double Fpr19; + double Fpr20; + double Fpr21; + double Fpr22; + double Fpr23; + double Fpr24; + double Fpr25; + double Fpr26; + double Fpr27; + double Fpr28; + double Fpr29; + double Fpr30; + double Fpr31; + double Fpscr; +} FLOATING_SAVE_AREA; + +typedef struct _CONTEXT { + FLOATING_SAVE_AREA FloatSave; + DWORD Gpr0; + DWORD Gpr1; + DWORD Gpr2; + DWORD Gpr3; + DWORD Gpr4; + DWORD Gpr5; + DWORD Gpr6; + DWORD Gpr7; + DWORD Gpr8; + DWORD Gpr9; + DWORD Gpr10; + DWORD Gpr11; + DWORD Gpr12; + DWORD Gpr13; + DWORD Gpr14; + DWORD Gpr15; + DWORD Gpr16; + DWORD Gpr17; + DWORD Gpr18; + DWORD Gpr19; + DWORD Gpr20; + DWORD Gpr21; + DWORD Gpr22; + DWORD Gpr23; + DWORD Gpr24; + DWORD Gpr25; + DWORD Gpr26; + DWORD Gpr27; + DWORD Gpr28; + DWORD Gpr29; + DWORD Gpr30; + DWORD Gpr31; + DWORD Cr; + DWORD Xer; + DWORD Msr; + DWORD Iar; + DWORD Lr; + DWORD Ctr; + DWORD ContextFlags; + DWORD Fill[3]; + DWORD Dr0; + DWORD Dr1; + DWORD Dr2; + DWORD Dr3; + DWORD Dr4; + DWORD Dr5; + DWORD Dr6; + DWORD Dr7; +} CONTEXT; +#elif defined(_ALPHA_) +#define CONTEXT_ALPHA 0x20000 +#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L) +#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L) +#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L) +#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER) +typedef struct _CONTEXT { + ULONGLONG FltF0; + ULONGLONG FltF1; + ULONGLONG FltF2; + ULONGLONG FltF3; + ULONGLONG FltF4; + ULONGLONG FltF5; + ULONGLONG FltF6; + ULONGLONG FltF7; + ULONGLONG FltF8; + ULONGLONG FltF9; + ULONGLONG FltF10; + ULONGLONG FltF11; + ULONGLONG FltF12; + ULONGLONG FltF13; + ULONGLONG FltF14; + ULONGLONG FltF15; + ULONGLONG FltF16; + ULONGLONG FltF17; + ULONGLONG FltF18; + ULONGLONG FltF19; + ULONGLONG FltF20; + ULONGLONG FltF21; + ULONGLONG FltF22; + ULONGLONG FltF23; + ULONGLONG FltF24; + ULONGLONG FltF25; + ULONGLONG FltF26; + ULONGLONG FltF27; + ULONGLONG FltF28; + ULONGLONG FltF29; + ULONGLONG FltF30; + ULONGLONG FltF31; + ULONGLONG IntV0; + ULONGLONG IntT0; + ULONGLONG IntT1; + ULONGLONG IntT2; + ULONGLONG IntT3; + ULONGLONG IntT4; + ULONGLONG IntT5; + ULONGLONG IntT6; + ULONGLONG IntT7; + ULONGLONG IntS0; + ULONGLONG IntS1; + ULONGLONG IntS2; + ULONGLONG IntS3; + ULONGLONG IntS4; + ULONGLONG IntS5; + ULONGLONG IntFp; + ULONGLONG IntA0; + ULONGLONG IntA1; + ULONGLONG IntA2; + ULONGLONG IntA3; + ULONGLONG IntA4; + ULONGLONG IntA5; + ULONGLONG IntT8; + ULONGLONG IntT9; + ULONGLONG IntT10; + ULONGLONG IntT11; + ULONGLONG IntRa; + ULONGLONG IntT12; + ULONGLONG IntAt; + ULONGLONG IntGp; + ULONGLONG IntSp; + ULONGLONG IntZero; + ULONGLONG Fpcr; + ULONGLONG SoftFpcr; + ULONGLONG Fir; + DWORD Psr; + DWORD ContextFlags; + DWORD Fill[4]; +} CONTEXT; +#elif defined(SHx) + +/* These are the debug or break registers on the SH3 */ +typedef struct _DEBUG_REGISTERS { + DWORD BarA; + UCHAR BasrA; + UCHAR BamrA; + USHORT BbrA; + DWORD BarB; + UCHAR BasrB; + UCHAR BamrB; + USHORT BbrB; + DWORD BdrB; + DWORD BdmrB; + USHORT Brcr; + USHORT Align; +} DEBUG_REGISTERS, *PDEBUG_REGISTERS; + +/* The following flags control the contents of the CONTEXT structure. */ + +#define CONTEXT_SH3 0x00000040 +#define CONTEXT_SH4 0x000000c0 /* CONTEXT_SH3 | 0x80 - must contain the SH3 bits */ + +#ifdef SH3 +#define CONTEXT_CONTROL (CONTEXT_SH3 | 0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_SH3 | 0x00000002L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH3 | 0x00000008L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS) +#else /* SH4 */ +#define CONTEXT_CONTROL (CONTEXT_SH4 | 0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_SH4 | 0x00000002L) +#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH4 | 0x00000008L) +#define CONTEXT_FLOATING_POINT (CONTEXT_SH4 | 0x00000004L) +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT) +#endif + +/* Context Frame */ + +/* This frame is used to store a limited processor context into the */ +/* Thread structure for CPUs which have no floating point support. */ + +typedef struct _CONTEXT { + /* The flags values within this flag control the contents of */ + /* a CONTEXT record. */ + + /* If the context record is used as an input parameter, then */ + /* for each portion of the context record controlled by a flag */ + /* whose value is set, it is assumed that that portion of the */ + /* context record contains valid context. If the context record */ + /* is being used to modify a thread's context, then only that */ + /* portion of the threads context will be modified. */ + + /* If the context record is used as an IN OUT parameter to capture */ + /* the context of a thread, then only those portions of the thread's */ + /* context corresponding to set flags will be returned. */ + + /* The context record is never used as an OUT only parameter. */ + + + DWORD ContextFlags; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_INTEGER. */ + + /* N.B. The registers RA and R15 are defined in this section, but are */ + /* considered part of the control context rather than part of the integer */ + /* context. */ + + DWORD PR; + DWORD MACH; + DWORD MACL; + DWORD GBR; + DWORD R0; + DWORD R1; + DWORD R2; + DWORD R3; + DWORD R4; + DWORD R5; + DWORD R6; + DWORD R7; + DWORD R8; + DWORD R9; + DWORD R10; + DWORD R11; + DWORD R12; + DWORD R13; + DWORD R14; + DWORD R15; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_CONTROL. */ + + /* N.B. The registers r15 and ra are defined in the integer section, */ + /* but are considered part of the control context rather than part of */ + /* the integer context. */ + + DWORD Fir; + DWORD Psr; + +#if !defined(SH3e) && !defined(SH4) + DWORD OldStuff[2]; + DEBUG_REGISTERS DebugRegisters; +#else + DWORD Fpscr; + DWORD Fpul; + DWORD FRegs[16]; +#if defined(SH4) + DWORD xFRegs[16]; +#endif +#endif +} CONTEXT; + +#elif defined(_MIPS_) + +/* The following flags control the contents of the CONTEXT structure. */ + +#define CONTEXT_R4000 0x00010000 /* r4000 context */ + +#define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001L) +#define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002L) +#define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) + +/* Context Frame */ + +/* N.B. This frame must be exactly a multiple of 16 bytes in length. */ + +/* This frame has a several purposes: 1) it is used as an argument to */ +/* NtContinue, 2) it is used to constuct a call frame for APC delivery, */ +/* 3) it is used to construct a call frame for exception dispatching */ +/* in user mode, and 4) it is used in the user level thread creation */ +/* routines. */ + +/* The layout of the record conforms to a standard call frame. */ + + +typedef struct _CONTEXT { + + /* This section is always present and is used as an argument build */ + /* area. */ + + DWORD Argument[4]; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_FLOATING_POINT. */ + + DWORD FltF0; + DWORD FltF1; + DWORD FltF2; + DWORD FltF3; + DWORD FltF4; + DWORD FltF5; + DWORD FltF6; + DWORD FltF7; + DWORD FltF8; + DWORD FltF9; + DWORD FltF10; + DWORD FltF11; + DWORD FltF12; + DWORD FltF13; + DWORD FltF14; + DWORD FltF15; + DWORD FltF16; + DWORD FltF17; + DWORD FltF18; + DWORD FltF19; + DWORD FltF20; + DWORD FltF21; + DWORD FltF22; + DWORD FltF23; + DWORD FltF24; + DWORD FltF25; + DWORD FltF26; + DWORD FltF27; + DWORD FltF28; + DWORD FltF29; + DWORD FltF30; + DWORD FltF31; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_INTEGER. */ + + /* N.B. The registers gp, sp, and ra are defined in this section, but are */ + /* considered part of the control context rather than part of the integer */ + /* context. */ + + /* N.B. Register zero is not stored in the frame. */ + + DWORD IntZero; + DWORD IntAt; + DWORD IntV0; + DWORD IntV1; + DWORD IntA0; + DWORD IntA1; + DWORD IntA2; + DWORD IntA3; + DWORD IntT0; + DWORD IntT1; + DWORD IntT2; + DWORD IntT3; + DWORD IntT4; + DWORD IntT5; + DWORD IntT6; + DWORD IntT7; + DWORD IntS0; + DWORD IntS1; + DWORD IntS2; + DWORD IntS3; + DWORD IntS4; + DWORD IntS5; + DWORD IntS6; + DWORD IntS7; + DWORD IntT8; + DWORD IntT9; + DWORD IntK0; + DWORD IntK1; + DWORD IntGp; + DWORD IntSp; + DWORD IntS8; + DWORD IntRa; + DWORD IntLo; + DWORD IntHi; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_FLOATING_POINT. */ + + DWORD Fsr; + + /* This section is specified/returned if the ContextFlags word contains */ + /* the flag CONTEXT_CONTROL. */ + + /* N.B. The registers gp, sp, and ra are defined in the integer section, */ + /* but are considered part of the control context rather than part of */ + /* the integer context. */ + + DWORD Fir; + DWORD Psr; + + /* The flags values within this flag control the contents of */ + /* a CONTEXT record. */ + + /* If the context record is used as an input parameter, then */ + /* for each portion of the context record controlled by a flag */ + /* whose value is set, it is assumed that that portion of the */ + /* context record contains valid context. If the context record */ + /* is being used to modify a thread's context, then only that */ + /* portion of the threads context will be modified. */ + + /* If the context record is used as an IN OUT parameter to capture */ + /* the context of a thread, then only those portions of the thread's */ + /* context corresponding to set flags will be returned. */ + + /* The context record is never used as an OUT only parameter. */ + + DWORD ContextFlags; + + DWORD Fill[2]; + +} CONTEXT; +#elif defined(_ARM_) + +#ifndef PAGE_SIZE +#define PAGE_SIZE 0x1000 // FIXME: This should probably go elsewhere +#endif + +/* The following flags control the contents of the CONTEXT structure. */ + +#define CONTEXT_ARM 0x0000040 +#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L) +#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L) + +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) + +typedef struct _CONTEXT { + /* The flags values within this flag control the contents of + a CONTEXT record. + + If the context record is used as an input parameter, then + for each portion of the context record controlled by a flag + whose value is set, it is assumed that that portion of the + context record contains valid context. If the context record + is being used to modify a thread's context, then only that + portion of the threads context will be modified. + + If the context record is used as an IN OUT parameter to capture + the context of a thread, then only those portions of the thread's + context corresponding to set flags will be returned. + + The context record is never used as an OUT only parameter. */ + + DWORD ContextFlags; + + /* This section is specified/returned if the ContextFlags word contains + the flag CONTEXT_INTEGER. */ + DWORD R0; + DWORD R1; + DWORD R2; + DWORD R3; + DWORD R4; + DWORD R5; + DWORD R6; + DWORD R7; + DWORD R8; + DWORD R9; + DWORD R10; + DWORD R11; + DWORD R12; + + DWORD Sp; + DWORD Lr; + DWORD Pc; + DWORD Psr; +} CONTEXT; + +#else +#error "undefined processor type" +#endif +typedef CONTEXT *PCONTEXT,*LPCONTEXT; + +#define EXCEPTION_MAXIMUM_PARAMETERS 15 +#define EXCEPTION_NONCONTINUABLE 0x01 +#define EXCEPTION_UNWINDING 0x02 +#define EXCEPTION_EXIT_UNWIND 0x04 +#define EXCEPTION_STACK_INVALID 0x08 +#define EXCEPTION_NESTED_CALL 0x10 +#define EXCEPTION_TARGET_UNWIND 0x20 +#define EXCEPTION_COLLIDED_UNWIND 0x40 +#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | \ + EXCEPTION_TARGET_UNWIND | EXCEPTION_COLLIDED_UNWIND) + +#define IS_UNWINDING(Flag) ((Flag & EXCEPTION_UNWIND) != 0) +#define IS_DISPATCHING(Flag) ((Flag & EXCEPTION_UNWIND) == 0) +#define IS_TARGET_UNWIND(Flag) (Flag & EXCEPTION_TARGET_UNWIND) + +typedef struct _EXCEPTION_RECORD { + DWORD ExceptionCode; + DWORD ExceptionFlags; + struct _EXCEPTION_RECORD *ExceptionRecord; + PVOID ExceptionAddress; + DWORD NumberParameters; + ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD, *PEXCEPTION_RECORD; + +typedef struct _EXCEPTION_RECORD32 { + DWORD ExceptionCode; + DWORD ExceptionFlags; + DWORD ExceptionRecord; + DWORD ExceptionAddress; + DWORD NumberParameters; + DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD32,*PEXCEPTION_RECORD32; + +typedef struct _EXCEPTION_RECORD64 { + DWORD ExceptionCode; + DWORD ExceptionFlags; + DWORD64 ExceptionRecord; + DWORD64 ExceptionAddress; + DWORD NumberParameters; + DWORD __unusedAlignment; + DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD64,*PEXCEPTION_RECORD64; + +typedef struct _EXCEPTION_POINTERS { + PEXCEPTION_RECORD ExceptionRecord; + PCONTEXT ContextRecord; +} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS; + +#include + +typedef struct _LUID_AND_ATTRIBUTES { + LUID Luid; + DWORD Attributes; +} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES; +typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY]; +typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY; + +#include + +typedef struct _PRIVILEGE_SET { + DWORD PrivilegeCount; + DWORD Control; + LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY]; +} PRIVILEGE_SET,*PPRIVILEGE_SET; + +typedef struct _SECURITY_ATTRIBUTES { + DWORD nLength; + LPVOID lpSecurityDescriptor; + BOOL bInheritHandle; +} SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES; + +typedef enum _SECURITY_IMPERSONATION_LEVEL { + SecurityAnonymous, + SecurityIdentification, + SecurityImpersonation, + SecurityDelegation +} SECURITY_IMPERSONATION_LEVEL,*PSECURITY_IMPERSONATION_LEVEL; + +typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,*PSECURITY_CONTEXT_TRACKING_MODE; + +typedef struct _SECURITY_QUALITY_OF_SERVICE { + DWORD Length; + SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; + SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode; + BOOLEAN EffectiveOnly; +} SECURITY_QUALITY_OF_SERVICE,*PSECURITY_QUALITY_OF_SERVICE; + +typedef PVOID PACCESS_TOKEN; + +typedef struct _SE_IMPERSONATION_STATE { + PACCESS_TOKEN Token; + BOOLEAN CopyOnOpen; + BOOLEAN EffectiveOnly; + SECURITY_IMPERSONATION_LEVEL Level; +} SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE; + +typedef struct _SID_IDENTIFIER_AUTHORITY { + BYTE Value[6]; +} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY; + +typedef PVOID PSID; + +typedef struct _SID { + BYTE Revision; + BYTE SubAuthorityCount; + SID_IDENTIFIER_AUTHORITY IdentifierAuthority; + DWORD SubAuthority[ANYSIZE_ARRAY]; +} SID, *PISID; + +#define SECURITY_MIN_SID_SIZE (sizeof(SID)) +#define SECURITY_MAX_SID_SIZE (FIELD_OFFSET(SID, SubAuthority) + SID_MAX_SUB_AUTHORITIES * sizeof(DWORD)) + +typedef struct _SID_AND_ATTRIBUTES { + PSID Sid; + DWORD Attributes; +} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES; +typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY]; +typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY; + +typedef struct _TOKEN_SOURCE { + CHAR SourceName[TOKEN_SOURCE_LENGTH]; + LUID SourceIdentifier; +} TOKEN_SOURCE,*PTOKEN_SOURCE; + +typedef struct _TOKEN_CONTROL { + LUID TokenId; + LUID AuthenticationId; + LUID ModifiedId; + TOKEN_SOURCE TokenSource; +} TOKEN_CONTROL,*PTOKEN_CONTROL; + +typedef struct _TOKEN_DEFAULT_DACL { + PACL DefaultDacl; +} TOKEN_DEFAULT_DACL,*PTOKEN_DEFAULT_DACL; + +typedef struct _TOKEN_GROUPS { + DWORD GroupCount; + SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]; +} TOKEN_GROUPS,*PTOKEN_GROUPS,*LPTOKEN_GROUPS; + +typedef struct _TOKEN_GROUPS_AND_PRIVILEGES { + DWORD SidCount; + DWORD SidLength; + PSID_AND_ATTRIBUTES Sids; + DWORD RestrictedSidCount; + DWORD RestrictedSidLength; + PSID_AND_ATTRIBUTES RestrictedSids; + DWORD PrivilegeCount; + DWORD PrivilegeLength; + PLUID_AND_ATTRIBUTES Privileges; + LUID AuthenticationId; +} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES; + +typedef struct _TOKEN_ORIGIN { + LUID OriginatingLogonSession; +} TOKEN_ORIGIN, *PTOKEN_ORIGIN; + +typedef struct _TOKEN_OWNER { + PSID Owner; +} TOKEN_OWNER,*PTOKEN_OWNER; + +typedef struct _TOKEN_PRIMARY_GROUP { + PSID PrimaryGroup; +} TOKEN_PRIMARY_GROUP,*PTOKEN_PRIMARY_GROUP; + +typedef struct _TOKEN_PRIVILEGES { + DWORD PrivilegeCount; + LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; +} TOKEN_PRIVILEGES,*PTOKEN_PRIVILEGES,*LPTOKEN_PRIVILEGES; + +typedef enum tagTOKEN_TYPE { + TokenPrimary = 1, + TokenImpersonation +} TOKEN_TYPE,*PTOKEN_TYPE; + +typedef enum _TOKEN_ELEVATION_TYPE { + TokenElevationTypeDefault = 1, + TokenElevationTypeFull, + TokenElevationTypeLimited, +} TOKEN_ELEVATION_TYPE, *PTOKEN_ELEVATION_TYPE; + +typedef struct _TOKEN_MANDATORY_LABEL { + SID_AND_ATTRIBUTES Label; +} TOKEN_MANDATORY_LABEL, * PTOKEN_MANDATORY_LABEL; + +#include +typedef struct _TOKEN_STATISTICS { + LUID TokenId; + LUID AuthenticationId; + LARGE_INTEGER ExpirationTime; + TOKEN_TYPE TokenType; + SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; + DWORD DynamicCharged; + DWORD DynamicAvailable; + DWORD GroupCount; + DWORD PrivilegeCount; + LUID ModifiedId; +} TOKEN_STATISTICS, *PTOKEN_STATISTICS; +#include + +typedef struct _TOKEN_USER { + SID_AND_ATTRIBUTES User; +} TOKEN_USER, *PTOKEN_USER; + +typedef DWORD SECURITY_INFORMATION,*PSECURITY_INFORMATION; +typedef WORD SECURITY_DESCRIPTOR_CONTROL,*PSECURITY_DESCRIPTOR_CONTROL; + +#ifndef _SECURITY_ATTRIBUTES_ +#define _SECURITY_ATTRIBUTES_ +typedef struct _SECURITY_DESCRIPTOR { + BYTE Revision; + BYTE Sbz1; + SECURITY_DESCRIPTOR_CONTROL Control; + PSID Owner; + PSID Group; + PACL Sacl; + PACL Dacl; +} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR; +typedef PVOID PSECURITY_DESCRIPTOR; +#endif + +typedef struct _SECURITY_DESCRIPTOR_RELATIVE { + BYTE Revision; + BYTE Sbz1; + SECURITY_DESCRIPTOR_CONTROL Control; + DWORD Owner; + DWORD Group; + DWORD Sacl; + DWORD Dacl; +} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE; + +typedef enum _TOKEN_INFORMATION_CLASS { + TokenUser = 1, + TokenGroups, + TokenPrivileges, + TokenOwner, + TokenPrimaryGroup, + TokenDefaultDacl, + TokenSource, + TokenType, + TokenImpersonationLevel, + TokenStatistics, + TokenRestrictedSids, + TokenSessionId, + TokenGroupsAndPrivileges, + TokenSessionReference, + TokenSandBoxInert, + TokenAuditPolicy, + TokenOrigin, + TokenElevationType, + TokenLinkedToken, + TokenElevation, + TokenHasRestrictions, + TokenAccessInformation, + TokenVirtualizationAllowed, + TokenVirtualizationEnabled, + TokenIntegrityLevel, + TokenUIAccess, + TokenMandatoryPolicy, + TokenLogonSid, + MaxTokenInfoClass +} TOKEN_INFORMATION_CLASS; + +typedef enum _SID_NAME_USE { + SidTypeUser=1, + SidTypeGroup, + SidTypeDomain, + SidTypeAlias, + SidTypeWellKnownGroup, + SidTypeDeletedAccount, + SidTypeInvalid, + SidTypeUnknown, + SidTypeComputer, + SidTypeLabel +} SID_NAME_USE,*PSID_NAME_USE; + +typedef struct _QUOTA_LIMITS { + SIZE_T PagedPoolLimit; + SIZE_T NonPagedPoolLimit; + SIZE_T MinimumWorkingSetSize; + SIZE_T MaximumWorkingSetSize; + SIZE_T PagefileLimit; + LARGE_INTEGER TimeLimit; +} QUOTA_LIMITS,*PQUOTA_LIMITS; + +typedef union _RATE_QUOTA_LIMIT { + DWORD RateData; + struct { + DWORD RatePercent : 7; + DWORD Reserved0 : 25; + } DUMMYSTRUCTNAME; +} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT; + +typedef struct _QUOTA_LIMITS_EX { + SIZE_T PagedPoolLimit; + SIZE_T NonPagedPoolLimit; + SIZE_T MinimumWorkingSetSize; + SIZE_T MaximumWorkingSetSize; + SIZE_T PagefileLimit; + LARGE_INTEGER TimeLimit; + SIZE_T Reserved1; + SIZE_T Reserved2; + SIZE_T Reserved3; + SIZE_T Reserved4; + DWORD Flags; + RATE_QUOTA_LIMIT CpuRateLimit; +} QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX; + +typedef struct _IO_COUNTERS { + ULONGLONG ReadOperationCount; + ULONGLONG WriteOperationCount; + ULONGLONG OtherOperationCount; + ULONGLONG ReadTransferCount; + ULONGLONG WriteTransferCount; + ULONGLONG OtherTransferCount; +} IO_COUNTERS, *PIO_COUNTERS; + +typedef struct _FILE_NOTIFY_INFORMATION { + DWORD NextEntryOffset; + DWORD Action; + DWORD FileNameLength; + WCHAR FileName[1]; +} FILE_NOTIFY_INFORMATION,*PFILE_NOTIFY_INFORMATION; + +typedef struct _TAPE_ERASE { + DWORD Type; + BOOLEAN Immediate; +} TAPE_ERASE, *PTAPE_ERASE; + +typedef struct _TAPE_GET_DRIVE_PARAMETERS { + BOOLEAN ECC; + BOOLEAN Compression; + BOOLEAN DataPadding; + BOOLEAN ReportSetmarks; + DWORD DefaultBlockSize; + DWORD MaximumBlockSize; + DWORD MinimumBlockSize; + DWORD MaximumPartitionCount; + DWORD FeaturesLow; + DWORD FeaturesHigh; + DWORD EOTWarningZoneSize; +} TAPE_GET_DRIVE_PARAMETERS, *PTAPE_GET_DRIVE_PARAMETERS; + +typedef struct _TAPE_GET_MEDIA_PARAMETERS { + LARGE_INTEGER Capacity; + LARGE_INTEGER Remaining; + DWORD BlockSize; + DWORD PartitionCount; + BOOLEAN WriteProtected; +} TAPE_GET_MEDIA_PARAMETERS, *PTAPE_GET_MEDIA_PARAMETERS; + +typedef struct _TAPE_GET_POSITION { + DWORD Type; + DWORD Partition; + LARGE_INTEGER Offset; +} TAPE_GET_POSITION, *PTAPE_GET_POSITION; + +typedef struct _TAPE_PREPARE { + DWORD Operation; + BOOLEAN Immediate; +} TAPE_PREPARE, *PTAPE_PREPARE; + +typedef struct _TAPE_SET_DRIVE_PARAMETERS { + BOOLEAN ECC; + BOOLEAN Compression; + BOOLEAN DataPadding; + BOOLEAN ReportSetmarks; + DWORD EOTWarningZoneSize; +} TAPE_SET_DRIVE_PARAMETERS, *PTAPE_SET_DRIVE_PARAMETERS; + +typedef struct _TAPE_SET_MEDIA_PARAMETERS { + DWORD BlockSize; +} TAPE_SET_MEDIA_PARAMETERS,*PTAPE_SET_MEDIA_PARAMETERS; + +typedef struct _TAPE_SET_POSITION { + DWORD Method; + DWORD Partition; + LARGE_INTEGER Offset; + BOOLEAN Immediate; +} TAPE_SET_POSITION, *PTAPE_SET_POSITION; + +typedef struct _TAPE_WRITE_MARKS { + DWORD Type; + DWORD Count; + BOOLEAN Immediate; +} TAPE_WRITE_MARKS, *PTAPE_WRITE_MARKS; + +typedef struct _TAPE_CREATE_PARTITION { + DWORD Method; + DWORD Count; + DWORD Size; +} TAPE_CREATE_PARTITION, *PTAPE_CREATE_PARTITION; + +typedef struct _MEMORY_BASIC_INFORMATION { + PVOID BaseAddress; + PVOID AllocationBase; + DWORD AllocationProtect; + SIZE_T RegionSize; + DWORD State; + DWORD Protect; + DWORD Type; +} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION; + +typedef struct _MESSAGE_RESOURCE_ENTRY { + WORD Length; + WORD Flags; + BYTE Text[1]; +} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY; + +typedef struct _MESSAGE_RESOURCE_BLOCK { + DWORD LowId; + DWORD HighId; + DWORD OffsetToEntries; +} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK; + +typedef struct _MESSAGE_RESOURCE_DATA { + DWORD NumberOfBlocks; + MESSAGE_RESOURCE_BLOCK Blocks[1]; +} MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA; + +// +// Slist Header +// +#ifndef _SLIST_HEADER_ +#define _SLIST_HEADER_ + +#if defined(_WIN64) + +typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY { + struct _SLIST_ENTRY *Next; +} SLIST_ENTRY, *PSLIST_ENTRY; + +typedef struct _SLIST_ENTRY32 { + DWORD Next; +} SLIST_ENTRY32, *PSLIST_ENTRY32; + +typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER { + _ANONYMOUS_STRUCT struct { + ULONGLONG Alignment; + ULONGLONG Region; + } DUMMYSTRUCTNAME; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:9; + ULONGLONG NextEntry:39; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:59; + ULONGLONG Region:3; + } Header8; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:48; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:2; + ULONGLONG NextEntry:60; + } Header16; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:48; + ULONGLONG HeaderType:1; + ULONGLONG Reserved:3; + ULONGLONG NextEntry:60; + } HeaderX64; +} SLIST_HEADER, *PSLIST_HEADER; + +typedef union _SLIST_HEADER32{ + ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct { + SLIST_ENTRY32 Next; + WORD Depth; + WORD Sequence; + } DUMMYSTRUCTNAME; +} SLIST_HEADER32, *PSLIST_HEADER32; + +#else + +#define SLIST_ENTRY SINGLE_LIST_ENTRY +#define _SLIST_ENTRY _SINGLE_LIST_ENTRY +#define PSLIST_ENTRY PSINGLE_LIST_ENTRY + +typedef SLIST_ENTRY SLIST_ENTRY32, *PSLIST_ENTRY32; + +typedef union _SLIST_HEADER { + ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct { + SLIST_ENTRY Next; + WORD Depth; + WORD Sequence; + } DUMMYSTRUCTNAME; +} SLIST_HEADER, *PSLIST_HEADER; + +typedef SLIST_HEADER SLIST_HEADER32, *PSLIST_HEADER32; + +#endif /* defined(_WIN64) */ + +#endif /* _SLIST_HEADER_ */ + +NTSYSAPI +VOID +NTAPI +RtlInitializeSListHead( + _Out_ PSLIST_HEADER ListHead); + +_Must_inspect_result_ +NTSYSAPI +PSLIST_ENTRY +NTAPI +RtlFirstEntrySList( + _In_ const SLIST_HEADER *ListHead); + +NTSYSAPI +PSLIST_ENTRY +NTAPI +RtlInterlockedPopEntrySList( + _Inout_ PSLIST_HEADER ListHead); + +NTSYSAPI +PSLIST_ENTRY +NTAPI +RtlInterlockedPushEntrySList( + _Inout_ PSLIST_HEADER ListHead, + _Inout_ __drv_aliasesMem PSLIST_ENTRY ListEntry); + +NTSYSAPI +PSLIST_ENTRY +NTAPI +RtlInterlockedFlushSList( + _Inout_ PSLIST_HEADER ListHead); + +NTSYSAPI +WORD +NTAPI +RtlQueryDepthSList( + _In_ PSLIST_HEADER ListHead); + +#ifndef _RTL_RUN_ONCE_DEF +#define _RTL_RUN_ONCE_DEF + +#define RTL_RUN_ONCE_CHECK_ONLY 0x00000001UL +#define RTL_RUN_ONCE_ASYNC 0x00000002UL +#define RTL_RUN_ONCE_INIT_FAILED 0x00000004UL + +typedef union _RTL_RUN_ONCE { + PVOID Ptr; +} RTL_RUN_ONCE, *PRTL_RUN_ONCE; + +#endif + +#define RTL_CONDITION_VARIABLE_INIT {0} +#define RTL_CONDITION_VARIABLE_LOCKMODE_SHARED 0x1 + +typedef struct _RTL_CONDITION_VARIABLE { + PVOID Ptr; +} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE; + +typedef struct _RTL_CRITICAL_SECTION_DEBUG { + WORD Type; + WORD CreatorBackTraceIndex; + struct _RTL_CRITICAL_SECTION *CriticalSection; + LIST_ENTRY ProcessLocksList; + DWORD EntryCount; + DWORD ContentionCount; + DWORD Flags; + WORD CreatorBackTraceIndexHigh; + WORD SpareWORD; +} RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG; + +#include "pshpack8.h" +typedef struct _RTL_CRITICAL_SECTION { + PRTL_CRITICAL_SECTION_DEBUG DebugInfo; + LONG LockCount; + LONG RecursionCount; + HANDLE OwningThread; + HANDLE LockSemaphore; + ULONG_PTR SpinCount; +} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION; +#include "poppack.h" + +NTSYSAPI +WORD +NTAPI +RtlCaptureStackBackTrace( + IN DWORD FramesToSkip, + IN DWORD FramesToCapture, + OUT PVOID *BackTrace, + OUT PDWORD BackTraceHash OPTIONAL +); + +NTSYSAPI +VOID +NTAPI +RtlCaptureContext( + _Out_ PCONTEXT ContextRecord +); + +NTSYSAPI +PVOID +NTAPI +RtlPcToFileHeader( + _In_ PVOID PcValue, + _Out_ PVOID* BaseOfImage); + +NTSYSAPI +VOID +NTAPI +RtlUnwind( + _In_opt_ PVOID TargetFrame, + _In_opt_ PVOID TargetIp, + _In_opt_ PEXCEPTION_RECORD ExceptionRecord, + _In_ PVOID ReturnValue); + +#define RTL_SRWLOCK_INIT {0} + +typedef struct _RTL_SRWLOCK { + PVOID Ptr; +} RTL_SRWLOCK, *PRTL_SRWLOCK; + +typedef LONG +(NTAPI *PVECTORED_EXCEPTION_HANDLER)( + struct _EXCEPTION_POINTERS *ExceptionInfo +); + +typedef struct _EVENTLOGRECORD { + DWORD Length; + DWORD Reserved; + DWORD RecordNumber; + DWORD TimeGenerated; + DWORD TimeWritten; + DWORD EventID; + WORD EventType; + WORD NumStrings; + WORD EventCategory; + WORD ReservedFlags; + DWORD ClosingRecordNumber; + DWORD StringOffset; + DWORD UserSidLength; + DWORD UserSidOffset; + DWORD DataLength; + DWORD DataOffset; +} EVENTLOGRECORD, *PEVENTLOGRECORD; + +typedef struct _OSVERSIONINFOA { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + CHAR szCSDVersion[128]; +} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA; + +typedef struct _OSVERSIONINFOW { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + WCHAR szCSDVersion[128]; +} OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW; + +typedef struct _OSVERSIONINFOEXA { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + CHAR szCSDVersion[128]; + WORD wServicePackMajor; + WORD wServicePackMinor; + WORD wSuiteMask; + BYTE wProductType; + BYTE wReserved; +} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; + +typedef struct _OSVERSIONINFOEXW { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + WCHAR szCSDVersion[128]; + WORD wServicePackMajor; + WORD wServicePackMinor; + WORD wSuiteMask; + BYTE wProductType; + BYTE wReserved; +} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW; + +#include + +typedef struct _IMAGE_VXD_HEADER { + WORD e32_magic; + BYTE e32_border; + BYTE e32_worder; + DWORD e32_level; + WORD e32_cpu; + WORD e32_os; + DWORD e32_ver; + DWORD e32_mflags; + DWORD e32_mpages; + DWORD e32_startobj; + DWORD e32_eip; + DWORD e32_stackobj; + DWORD e32_esp; + DWORD e32_pagesize; + DWORD e32_lastpagesize; + DWORD e32_fixupsize; + DWORD e32_fixupsum; + DWORD e32_ldrsize; + DWORD e32_ldrsum; + DWORD e32_objtab; + DWORD e32_objcnt; + DWORD e32_objmap; + DWORD e32_itermap; + DWORD e32_rsrctab; + DWORD e32_rsrccnt; + DWORD e32_restab; + DWORD e32_enttab; + DWORD e32_dirtab; + DWORD e32_dircnt; + DWORD e32_fpagetab; + DWORD e32_frectab; + DWORD e32_impmod; + DWORD e32_impmodcnt; + DWORD e32_impproc; + DWORD e32_pagesum; + DWORD e32_datapage; + DWORD e32_preload; + DWORD e32_nrestab; + DWORD e32_cbnrestab; + DWORD e32_nressum; + DWORD e32_autodata; + DWORD e32_debuginfo; + DWORD e32_debuglen; + DWORD e32_instpreload; + DWORD e32_instdemand; + DWORD e32_heapsize; + BYTE e32_res3[12]; + DWORD e32_winresoff; + DWORD e32_winreslen; + WORD e32_devid; + WORD e32_ddkver; +} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER; + +typedef struct _IMAGE_DOS_HEADER { + WORD e_magic; + WORD e_cblp; + WORD e_cp; + WORD e_crlc; + WORD e_cparhdr; + WORD e_minalloc; + WORD e_maxalloc; + WORD e_ss; + WORD e_sp; + WORD e_csum; + WORD e_ip; + WORD e_cs; + WORD e_lfarlc; + WORD e_ovno; + WORD e_res[4]; + WORD e_oemid; + WORD e_oeminfo; + WORD e_res2[10]; + LONG e_lfanew; +} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER; + +typedef struct _IMAGE_OS2_HEADER { + WORD ne_magic; + CHAR ne_ver; + CHAR ne_rev; + WORD ne_enttab; + WORD ne_cbenttab; + LONG ne_crc; + WORD ne_flags; + WORD ne_autodata; + WORD ne_heap; + WORD ne_stack; + LONG ne_csip; + LONG ne_sssp; + WORD ne_cseg; + WORD ne_cmod; + WORD ne_cbnrestab; + WORD ne_segtab; + WORD ne_rsrctab; + WORD ne_restab; + WORD ne_modtab; + WORD ne_imptab; + LONG ne_nrestab; + WORD ne_cmovent; + WORD ne_align; + WORD ne_cres; + BYTE ne_exetyp; + BYTE ne_flagsothers; + WORD ne_pretthunks; + WORD ne_psegrefbytes; + WORD ne_swaparea; + WORD ne_expver; +} IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER; + +#include + +typedef struct _IMAGE_FILE_HEADER { + WORD Machine; + WORD NumberOfSections; + DWORD TimeDateStamp; + DWORD PointerToSymbolTable; + DWORD NumberOfSymbols; + WORD SizeOfOptionalHeader; + WORD Characteristics; +} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; + +typedef struct _IMAGE_DATA_DIRECTORY { + DWORD VirtualAddress; + DWORD Size; +} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; + +typedef struct _IMAGE_OPTIONAL_HEADER32 { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + DWORD BaseOfData; + DWORD ImageBase; + DWORD SectionAlignment; + DWORD FileAlignment; + WORD MajorOperatingSystemVersion; + WORD MinorOperatingSystemVersion; + WORD MajorImageVersion; + WORD MinorImageVersion; + WORD MajorSubsystemVersion; + WORD MinorSubsystemVersion; + DWORD Win32VersionValue; + DWORD SizeOfImage; + DWORD SizeOfHeaders; + DWORD CheckSum; + WORD Subsystem; + WORD DllCharacteristics; + DWORD SizeOfStackReserve; + DWORD SizeOfStackCommit; + DWORD SizeOfHeapReserve; + DWORD SizeOfHeapCommit; + DWORD LoaderFlags; + DWORD NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32; + +typedef struct _IMAGE_OPTIONAL_HEADER64 { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + ULONGLONG ImageBase; + DWORD SectionAlignment; + DWORD FileAlignment; + WORD MajorOperatingSystemVersion; + WORD MinorOperatingSystemVersion; + WORD MajorImageVersion; + WORD MinorImageVersion; + WORD MajorSubsystemVersion; + WORD MinorSubsystemVersion; + DWORD Win32VersionValue; + DWORD SizeOfImage; + DWORD SizeOfHeaders; + DWORD CheckSum; + WORD Subsystem; + WORD DllCharacteristics; + ULONGLONG SizeOfStackReserve; + ULONGLONG SizeOfStackCommit; + ULONGLONG SizeOfHeapReserve; + ULONGLONG SizeOfHeapCommit; + DWORD LoaderFlags; + DWORD NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64; + +typedef struct _IMAGE_ROM_OPTIONAL_HEADER { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + DWORD BaseOfData; + DWORD BaseOfBss; + DWORD GprMask; + DWORD CprMask[4]; + DWORD GpValue; +} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER; + +typedef struct _IMAGE_NT_HEADERS32 { + DWORD Signature; + IMAGE_FILE_HEADER FileHeader; + IMAGE_OPTIONAL_HEADER32 OptionalHeader; +} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32; + +typedef struct _IMAGE_NT_HEADERS64 { + DWORD Signature; + IMAGE_FILE_HEADER FileHeader; + IMAGE_OPTIONAL_HEADER64 OptionalHeader; +} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64; + +#ifdef _WIN64 +typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER; +typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER; +typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS; +typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS; +#else +typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER; +typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER; +typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS; +typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS; +#endif + +typedef struct _IMAGE_ROM_HEADERS { + IMAGE_FILE_HEADER FileHeader; + IMAGE_ROM_OPTIONAL_HEADER OptionalHeader; +} IMAGE_ROM_HEADERS, *PIMAGE_ROM_HEADERS; + +typedef struct _IMAGE_SECTION_HEADER { + BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; + union { + DWORD PhysicalAddress; + DWORD VirtualSize; + } Misc; + DWORD VirtualAddress; + DWORD SizeOfRawData; + DWORD PointerToRawData; + DWORD PointerToRelocations; + DWORD PointerToLinenumbers; + WORD NumberOfRelocations; + WORD NumberOfLinenumbers; + DWORD Characteristics; +} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER; + +#include + +typedef struct _IMAGE_SYMBOL { + union { + BYTE ShortName[8]; + struct { + DWORD Short; + DWORD Long; + } Name; + PBYTE LongName[2]; + } N; + DWORD Value; + SHORT SectionNumber; + WORD Type; + BYTE StorageClass; + BYTE NumberOfAuxSymbols; +} IMAGE_SYMBOL, *PIMAGE_SYMBOL; + +typedef struct _IMAGE_LINENUMBER { + union { + DWORD SymbolTableIndex; + DWORD VirtualAddress; + } Type; + WORD Linenumber; +} IMAGE_LINENUMBER, UNALIGNED *PIMAGE_LINENUMBER; + +typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF { + BYTE bAuxType; + BYTE bReserved; + DWORD SymbolTableIndex; + BYTE rgbReserved[12]; +} IMAGE_AUX_SYMBOL_TOKEN_DEF, UNALIGNED *PIMAGE_AUX_SYMBOL_TOKEN_DEF; + +typedef union _IMAGE_AUX_SYMBOL { + struct { + DWORD TagIndex; + union { + struct { + WORD Linenumber; + WORD Size; + } LnSz; + DWORD TotalSize; + } Misc; + union { + struct { + DWORD PointerToLinenumber; + DWORD PointerToNextFunction; + } Function; + struct { + WORD Dimension[4]; + } Array; + } FcnAry; + WORD TvIndex; + } Sym; + struct { + BYTE Name[IMAGE_SIZEOF_SYMBOL]; + } File; + struct { + DWORD Length; + WORD NumberOfRelocations; + WORD NumberOfLinenumbers; + DWORD CheckSum; + SHORT Number; + BYTE Selection; + BYTE bReserved; + SHORT HighNumber; + } Section; + IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef; + struct { + DWORD crc; + BYTE rgbReserved[14]; + } CRC; +} IMAGE_AUX_SYMBOL, *PIMAGE_AUX_SYMBOL; + +typedef struct _IMAGE_RELOCATION { + _ANONYMOUS_UNION union { + DWORD VirtualAddress; + DWORD RelocCount; + } DUMMYUNIONNAME; + DWORD SymbolTableIndex; + WORD Type; +} IMAGE_RELOCATION, UNALIGNED *PIMAGE_RELOCATION; + +#include + +#ifndef __IMAGE_COR20_HEADER_DEFINED__ +#define __IMAGE_COR20_HEADER_DEFINED__ + +typedef enum ReplacesCorHdrNumericDefines { + COMIMAGE_FLAGS_ILONLY = 0x00000001, + COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002, + COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004, + COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008, + COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 0x00000010, + COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000, + COR_VERSION_MAJOR_V2 = 2, + COR_VERSION_MAJOR = COR_VERSION_MAJOR_V2, + COR_VERSION_MINOR = 0, + COR_DELETED_NAME_LENGTH = 8, + COR_VTABLEGAP_NAME_LENGTH = 8, + NATIVE_TYPE_MAX_CB = 1, + COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 0xFF, + IMAGE_COR_MIH_METHODRVA = 0x01, + IMAGE_COR_MIH_EHRVA = 0x02, + IMAGE_COR_MIH_BASICBLOCK = 0x08, + COR_VTABLE_32BIT = 0x01, + COR_VTABLE_64BIT = 0x02, + COR_VTABLE_FROM_UNMANAGED = 0x04, + COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN = 0x08, + COR_VTABLE_CALL_MOST_DERIVED = 0x10, + IMAGE_COR_EATJ_THUNK_SIZE = 32, + MAX_CLASS_NAME = 1024, + MAX_PACKAGE_NAME = 1024 +} ReplacesCorHdrNumericDefines; + +typedef struct IMAGE_COR20_HEADER { + DWORD cb; + WORD MajorRuntimeVersion; + WORD MinorRuntimeVersion; + IMAGE_DATA_DIRECTORY MetaData; + DWORD Flags; + _ANONYMOUS_UNION union { + DWORD EntryPointToken; + DWORD EntryPointRVA; + } DUMMYUNIONNAME; + IMAGE_DATA_DIRECTORY Resources; + IMAGE_DATA_DIRECTORY StrongNameSignature; + IMAGE_DATA_DIRECTORY CodeManagerTable; + IMAGE_DATA_DIRECTORY VTableFixups; + IMAGE_DATA_DIRECTORY ExportAddressTableJumps; + IMAGE_DATA_DIRECTORY ManagedNativeHeader; +} IMAGE_COR20_HEADER, *PIMAGE_COR20_HEADER; + +#endif /* __IMAGE_COR20_HEADER_DEFINED__ */ + +typedef struct _IMAGE_COFF_SYMBOLS_HEADER { + DWORD NumberOfSymbols; + DWORD LvaToFirstSymbol; + DWORD NumberOfLinenumbers; + DWORD LvaToFirstLinenumber; + DWORD RvaToFirstByteOfCode; + DWORD RvaToLastByteOfCode; + DWORD RvaToFirstByteOfData; + DWORD RvaToLastByteOfData; +} IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER; + +typedef struct _IMAGE_BASE_RELOCATION { + DWORD VirtualAddress; + DWORD SizeOfBlock; +} IMAGE_BASE_RELOCATION, UNALIGNED *PIMAGE_BASE_RELOCATION; + +typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER { + BYTE Name[16]; + BYTE Date[12]; + BYTE UserID[6]; + BYTE GroupID[6]; + BYTE Mode[8]; + BYTE Size[10]; + BYTE EndHeader[2]; +} IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER; + +typedef struct _IMAGE_EXPORT_DIRECTORY { + DWORD Characteristics; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + DWORD Name; + DWORD Base; + DWORD NumberOfFunctions; + DWORD NumberOfNames; + DWORD AddressOfFunctions; + DWORD AddressOfNames; + DWORD AddressOfNameOrdinals; +} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY; + +typedef struct _IMAGE_IMPORT_BY_NAME { + WORD Hint; + BYTE Name[1]; +} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME; + +#include +typedef struct _IMAGE_THUNK_DATA64 { + union { + ULONGLONG ForwarderString; + ULONGLONG Function; + ULONGLONG Ordinal; + ULONGLONG AddressOfData; + } u1; +} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64; +#include + +typedef struct _IMAGE_THUNK_DATA32 { + union { + DWORD ForwarderString; + DWORD Function; + DWORD Ordinal; + DWORD AddressOfData; + } u1; +} IMAGE_THUNK_DATA32, *PIMAGE_THUNK_DATA32; + +#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL +#define IMAGE_ORDINAL_FLAG32 0x80000000 +#define IMAGE_ORDINAL64(Ordinal) (Ordinal & 0xffff) +#define IMAGE_ORDINAL32(Ordinal) (Ordinal & 0xffff) +#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64)!=0) +#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32)!=0) + +typedef VOID +(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID DllHandle,DWORD Reason,PVOID Reserved); + +typedef struct _IMAGE_TLS_DIRECTORY64 { + ULONGLONG StartAddressOfRawData; + ULONGLONG EndAddressOfRawData; + ULONGLONG AddressOfIndex; + ULONGLONG AddressOfCallBacks; + DWORD SizeOfZeroFill; + DWORD Characteristics; +} IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64; + +typedef struct _IMAGE_TLS_DIRECTORY32 { + DWORD StartAddressOfRawData; + DWORD EndAddressOfRawData; + DWORD AddressOfIndex; + DWORD AddressOfCallBacks; + DWORD SizeOfZeroFill; + DWORD Characteristics; +} IMAGE_TLS_DIRECTORY32, *PIMAGE_TLS_DIRECTORY32; + +#ifdef _WIN64 +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64 +#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal) +typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA; +#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL64(Ordinal) +typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY; +#else +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32 +#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL32(Ordinal) +typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA; +#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL32(Ordinal) +typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY; +#endif + +typedef struct _IMAGE_IMPORT_DESCRIPTOR { + _ANONYMOUS_UNION union { + DWORD Characteristics; + DWORD OriginalFirstThunk; + } DUMMYUNIONNAME; + DWORD TimeDateStamp; + DWORD ForwarderChain; + DWORD Name; + DWORD FirstThunk; +} IMAGE_IMPORT_DESCRIPTOR, UNALIGNED *PIMAGE_IMPORT_DESCRIPTOR; + +typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR { + DWORD TimeDateStamp; + WORD OffsetModuleName; + WORD NumberOfModuleForwarderRefs; +} IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR; + +typedef struct _IMAGE_BOUND_FORWARDER_REF { + DWORD TimeDateStamp; + WORD OffsetModuleName; + WORD Reserved; +} IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF; + +typedef struct _IMAGE_DELAYLOAD_DESCRIPTOR { + union { + DWORD AllAttributes; + struct { + DWORD RvaBased:1; + DWORD ReservedAttributes:31; + }; + } Attributes; + DWORD DllNameRVA; + DWORD ModuleHandleRVA; + DWORD ImportAddressTableRVA; + DWORD ImportNameTableRVA; + DWORD BoundImportAddressTableRVA; + DWORD UnloadInformationTableRVA; + DWORD TimeDateStamp; +} IMAGE_DELAYLOAD_DESCRIPTOR, *PIMAGE_DELAYLOAD_DESCRIPTOR; + +typedef const IMAGE_DELAYLOAD_DESCRIPTOR *PCIMAGE_DELAYLOAD_DESCRIPTOR; + +typedef struct _IMAGE_RESOURCE_DIRECTORY { + DWORD Characteristics; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + WORD NumberOfNamedEntries; + WORD NumberOfIdEntries; +} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY; + +typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { + _ANONYMOUS_UNION union { + _ANONYMOUS_STRUCT struct { + DWORD NameOffset:31; + DWORD NameIsString:1; + } DUMMYSTRUCTNAME; + DWORD Name; + WORD Id; + } DUMMYUNIONNAME; + _ANONYMOUS_UNION union { + DWORD OffsetToData; + _ANONYMOUS_STRUCT struct { + DWORD OffsetToDirectory:31; + DWORD DataIsDirectory:1; + } DUMMYSTRUCTNAME2; + } DUMMYUNIONNAME2; +} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY; + +typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING { + WORD Length; + CHAR NameString[1]; +} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING; + +typedef struct _IMAGE_RESOURCE_DIR_STRING_U { + WORD Length; + WCHAR NameString[1]; +} IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U; + +typedef struct _IMAGE_RESOURCE_DATA_ENTRY { + DWORD OffsetToData; + DWORD Size; + DWORD CodePage; + DWORD Reserved; +} IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY; + +typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32 { + DWORD Size; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + DWORD GlobalFlagsClear; + DWORD GlobalFlagsSet; + DWORD CriticalSectionDefaultTimeout; + DWORD DeCommitFreeBlockThreshold; + DWORD DeCommitTotalFreeThreshold; + DWORD LockPrefixTable; + DWORD MaximumAllocationSize; + DWORD VirtualMemoryThreshold; + DWORD ProcessHeapFlags; + DWORD ProcessAffinityMask; + WORD CSDVersion; + WORD Reserved1; + DWORD EditList; + DWORD SecurityCookie; + DWORD SEHandlerTable; + DWORD SEHandlerCount; +} IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32; + +typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64 { + DWORD Size; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + DWORD GlobalFlagsClear; + DWORD GlobalFlagsSet; + DWORD CriticalSectionDefaultTimeout; + ULONGLONG DeCommitFreeBlockThreshold; + ULONGLONG DeCommitTotalFreeThreshold; + ULONGLONG LockPrefixTable; + ULONGLONG MaximumAllocationSize; + ULONGLONG VirtualMemoryThreshold; + ULONGLONG ProcessAffinityMask; + DWORD ProcessHeapFlags; + WORD CSDVersion; + WORD Reserved1; + ULONGLONG EditList; + ULONGLONG SecurityCookie; + ULONGLONG SEHandlerTable; + ULONGLONG SEHandlerCount; +} IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64; + +#ifdef _WIN64 +typedef IMAGE_LOAD_CONFIG_DIRECTORY64 IMAGE_LOAD_CONFIG_DIRECTORY; +typedef PIMAGE_LOAD_CONFIG_DIRECTORY64 PIMAGE_LOAD_CONFIG_DIRECTORY; +#else +typedef IMAGE_LOAD_CONFIG_DIRECTORY32 IMAGE_LOAD_CONFIG_DIRECTORY; +typedef PIMAGE_LOAD_CONFIG_DIRECTORY32 PIMAGE_LOAD_CONFIG_DIRECTORY; +#endif + +typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY { + DWORD BeginAddress; + DWORD EndAddress; + DWORD UnwindInfoAddress; +} IMAGE_RUNTIME_FUNCTION_ENTRY, *PIMAGE_RUNTIME_FUNCTION_ENTRY; + +typedef struct _IMAGE_DEBUG_DIRECTORY { + DWORD Characteristics; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + DWORD Type; + DWORD SizeOfData; + DWORD AddressOfRawData; + DWORD PointerToRawData; +} IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY; + +typedef struct _FPO_DATA { + DWORD ulOffStart; + DWORD cbProcSize; + DWORD cdwLocals; + WORD cdwParams; + WORD cbProlog:8; + WORD cbRegs:3; + WORD fHasSEH:1; + WORD fUseBP:1; + WORD reserved:1; + WORD cbFrame:2; +} FPO_DATA, *PFPO_DATA; + +typedef struct _IMAGE_DEBUG_MISC { + DWORD DataType; + DWORD Length; + BOOLEAN Unicode; + BYTE Reserved[3]; + BYTE Data[1]; +} IMAGE_DEBUG_MISC, *PIMAGE_DEBUG_MISC; + +typedef struct _IMAGE_FUNCTION_ENTRY { + DWORD StartingAddress; + DWORD EndingAddress; + DWORD EndOfPrologue; +} IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY; + +typedef struct _IMAGE_SEPARATE_DEBUG_HEADER { + WORD Signature; + WORD Flags; + WORD Machine; + WORD Characteristics; + DWORD TimeDateStamp; + DWORD CheckSum; + DWORD ImageBase; + DWORD SizeOfImage; + DWORD NumberOfSections; + DWORD ExportedNamesSize; + DWORD DebugDirectorySize; + DWORD SectionAlignment; + DWORD Reserved[2]; +} IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER; + +typedef enum _CM_SERVICE_NODE_TYPE { + DriverType = SERVICE_KERNEL_DRIVER, + FileSystemType = SERVICE_FILE_SYSTEM_DRIVER, + Win32ServiceOwnProcess = SERVICE_WIN32_OWN_PROCESS, + Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS, + AdapterType = SERVICE_ADAPTER, + RecognizerType = SERVICE_RECOGNIZER_DRIVER +} SERVICE_NODE_TYPE; + +typedef enum _CM_SERVICE_LOAD_TYPE { + BootLoad = SERVICE_BOOT_START, + SystemLoad = SERVICE_SYSTEM_START, + AutoLoad = SERVICE_AUTO_START, + DemandLoad = SERVICE_DEMAND_START, + DisableLoad = SERVICE_DISABLED +} SERVICE_LOAD_TYPE; + +typedef enum _CM_ERROR_CONTROL_TYPE { + IgnoreError = SERVICE_ERROR_IGNORE, + NormalError = SERVICE_ERROR_NORMAL, + SevereError = SERVICE_ERROR_SEVERE, + CriticalError = SERVICE_ERROR_CRITICAL +} SERVICE_ERROR_TYPE; + +typedef struct _NT_TIB { + struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; + PVOID StackBase; + PVOID StackLimit; + PVOID SubSystemTib; + _ANONYMOUS_UNION union { + PVOID FiberData; + DWORD Version; + } DUMMYUNIONNAME; + PVOID ArbitraryUserPointer; + struct _NT_TIB *Self; +} NT_TIB,*PNT_TIB; + +typedef struct _NT_TIB32 { + DWORD ExceptionList; + DWORD StackBase; + DWORD StackLimit; + DWORD SubSystemTib; + _ANONYMOUS_UNION union { + DWORD FiberData; + DWORD Version; + } DUMMYUNIONNAME; + DWORD ArbitraryUserPointer; + DWORD Self; +} NT_TIB32,*PNT_TIB32; + +typedef struct _NT_TIB64 { + DWORD64 ExceptionList; + DWORD64 StackBase; + DWORD64 StackLimit; + DWORD64 SubSystemTib; + _ANONYMOUS_UNION union { + DWORD64 FiberData; + DWORD Version; + } DUMMYUNIONNAME; + DWORD64 ArbitraryUserPointer; + DWORD64 Self; +} NT_TIB64,*PNT_TIB64; + +typedef struct _REPARSE_GUID_DATA_BUFFER { + DWORD ReparseTag; + WORD ReparseDataLength; + WORD Reserved; + GUID ReparseGuid; + struct { + BYTE DataBuffer[1]; + } GenericReparseBuffer; +} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER; + +typedef struct _REPARSE_POINT_INFORMATION { + WORD ReparseDataLength; + WORD UnparsedNameLength; +} REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION; + +typedef union _FILE_SEGMENT_ELEMENT { + PVOID64 Buffer; + ULONGLONG Alignment; +} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; + +/* JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags constants */ +#define JOB_OBJECT_LIMIT_WORKINGSET 0x0001 +#define JOB_OBJECT_LIMIT_PROCESS_TIME 0x0002 +#define JOB_OBJECT_LIMIT_JOB_TIME 0x0004 +#define JOB_OBJECT_LIMIT_ACTIVE_PROCESS 0x0008 +#define JOB_OBJECT_LIMIT_AFFINITY 0x0010 +#define JOB_OBJECT_LIMIT_PRIORITY_CLASS 0x0020 +#define JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME 0x0040 +#define JOB_OBJECT_LIMIT_SCHEDULING_CLASS 0x0080 +#define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x0100 +#define JOB_OBJECT_LIMIT_JOB_MEMORY 0x0200 +#define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x0400 +#define JOB_OBJECT_BREAKAWAY_OK 0x0800 +#define JOB_OBJECT_SILENT_BREAKAWAY 0x1000 + +/* JOBOBJECT_BASIC_UI_RESTRICTIONS.UIRestrictionsClass constants */ +#define JOB_OBJECT_UILIMIT_HANDLES 0x0001 +#define JOB_OBJECT_UILIMIT_READCLIPBOARD 0x0002 +#define JOB_OBJECT_UILIMIT_WRITECLIPBOARD 0x0004 +#define JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS 0x0008 +#define JOB_OBJECT_UILIMIT_DISPLAYSETTINGS 0x0010 +#define JOB_OBJECT_UILIMIT_GLOBALATOMS 0x0020 +#define JOB_OBJECT_UILIMIT_DESKTOP 0x0040 +#define JOB_OBJECT_UILIMIT_EXITWINDOWS 0x0080 + +/* JOBOBJECT_SECURITY_LIMIT_INFORMATION.SecurityLimitFlags constants */ +#define JOB_OBJECT_SECURITY_NO_ADMIN 0x0001 +#define JOB_OBJECT_SECURITY_RESTRICTED_TOKEN 0x0002 +#define JOB_OBJECT_SECURITY_ONLY_TOKEN 0x0004 +#define JOB_OBJECT_SECURITY_FILTER_TOKENS 0x0008 + +/* JOBOBJECT_END_OF_JOB_TIME_INFORMATION.EndOfJobTimeAction constants */ +#define JOB_OBJECT_TERMINATE_AT_END_OF_JOB 0 +#define JOB_OBJECT_POST_AT_END_OF_JOB 1 + +#define JOB_OBJECT_MSG_END_OF_JOB_TIME 1 +#define JOB_OBJECT_MSG_END_OF_PROCESS_TIME 2 +#define JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT 3 +#define JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO 4 +#define JOB_OBJECT_MSG_NEW_PROCESS 6 +#define JOB_OBJECT_MSG_EXIT_PROCESS 7 +#define JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS 8 +#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9 +#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10 + +#define JOB_OBJECT_ASSIGN_PROCESS 1 +#define JOB_OBJECT_SET_ATTRIBUTES 2 +#define JOB_OBJECT_QUERY 4 +#define JOB_OBJECT_TERMINATE 8 +#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16 +#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31) + +typedef enum _JOBOBJECTINFOCLASS { + JobObjectBasicAccountingInformation = 1, + JobObjectBasicLimitInformation, + JobObjectBasicProcessIdList, + JobObjectBasicUIRestrictions, + JobObjectSecurityLimitInformation, + JobObjectEndOfJobTimeInformation, + JobObjectAssociateCompletionPortInformation, + JobObjectBasicAndIoAccountingInformation, + JobObjectExtendedLimitInformation, + JobObjectJobSetInformation, + JobObjectGroupInformation, + MaxJobObjectInfoClass +} JOBOBJECTINFOCLASS; + +typedef struct _JOB_SET_ARRAY { + HANDLE JobHandle; + DWORD MemberLevel; + DWORD Flags; +} JOB_SET_ARRAY, *PJOB_SET_ARRAY; + +typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION { + LARGE_INTEGER TotalUserTime; + LARGE_INTEGER TotalKernelTime; + LARGE_INTEGER ThisPeriodTotalUserTime; + LARGE_INTEGER ThisPeriodTotalKernelTime; + DWORD TotalPageFaultCount; + DWORD TotalProcesses; + DWORD ActiveProcesses; + DWORD TotalTerminatedProcesses; +} JOBOBJECT_BASIC_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION; + +typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION { + LARGE_INTEGER PerProcessUserTimeLimit; + LARGE_INTEGER PerJobUserTimeLimit; + DWORD LimitFlags; + SIZE_T MinimumWorkingSetSize; + SIZE_T MaximumWorkingSetSize; + DWORD ActiveProcessLimit; + ULONG_PTR Affinity; + DWORD PriorityClass; + DWORD SchedulingClass; +} JOBOBJECT_BASIC_LIMIT_INFORMATION,*PJOBOBJECT_BASIC_LIMIT_INFORMATION; + +typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST { + DWORD NumberOfAssignedProcesses; + DWORD NumberOfProcessIdsInList; + ULONG_PTR ProcessIdList[1]; +} JOBOBJECT_BASIC_PROCESS_ID_LIST, *PJOBOBJECT_BASIC_PROCESS_ID_LIST; + +typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS { + DWORD UIRestrictionsClass; +} JOBOBJECT_BASIC_UI_RESTRICTIONS,*PJOBOBJECT_BASIC_UI_RESTRICTIONS; + +typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION { + DWORD SecurityLimitFlags; + HANDLE JobToken; + PTOKEN_GROUPS SidsToDisable; + PTOKEN_PRIVILEGES PrivilegesToDelete; + PTOKEN_GROUPS RestrictedSids; +} JOBOBJECT_SECURITY_LIMIT_INFORMATION,*PJOBOBJECT_SECURITY_LIMIT_INFORMATION; + +typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION { + DWORD EndOfJobTimeAction; +} JOBOBJECT_END_OF_JOB_TIME_INFORMATION,*PJOBOBJECT_END_OF_JOB_TIME_INFORMATION; + +typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT { + PVOID CompletionKey; + HANDLE CompletionPort; +} JOBOBJECT_ASSOCIATE_COMPLETION_PORT,*PJOBOBJECT_ASSOCIATE_COMPLETION_PORT; + +typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION { + JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo; + IO_COUNTERS IoInfo; +} JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION; + +typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION { + JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation; + IO_COUNTERS IoInfo; + SIZE_T ProcessMemoryLimit; + SIZE_T JobMemoryLimit; + SIZE_T PeakProcessMemoryUsed; + SIZE_T PeakJobMemoryUsed; +} JOBOBJECT_EXTENDED_LIMIT_INFORMATION,*PJOBOBJECT_EXTENDED_LIMIT_INFORMATION; + +typedef struct _JOBOBJECT_JOBSET_INFORMATION { + DWORD MemberLevel; +} JOBOBJECT_JOBSET_INFORMATION,*PJOBOBJECT_JOBSET_INFORMATION; + +/* Fixme: Making these defines conditional on WINVER will break ddk includes */ +#if 1 /* (WINVER >= 0x0500) */ + +#define ES_SYSTEM_REQUIRED 0x00000001 +#define ES_DISPLAY_REQUIRED 0x00000002 +#define ES_USER_PRESENT 0x00000004 +#define ES_CONTINUOUS 0x80000000 + +typedef enum _LATENCY_TIME { + LT_DONT_CARE, + LT_LOWEST_LATENCY +} LATENCY_TIME, *PLATENCY_TIME; + +typedef enum _SYSTEM_POWER_STATE { + PowerSystemUnspecified = 0, + PowerSystemWorking, + PowerSystemSleeping1, + PowerSystemSleeping2, + PowerSystemSleeping3, + PowerSystemHibernate, + PowerSystemShutdown, + PowerSystemMaximum +} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE; + +#define POWER_SYSTEM_MAXIMUM PowerSystemMaximum + +typedef enum { + PowerActionNone = 0, + PowerActionReserved, + PowerActionSleep, + PowerActionHibernate, + PowerActionShutdown, + PowerActionShutdownReset, + PowerActionShutdownOff, + PowerActionWarmEject +} POWER_ACTION, *PPOWER_ACTION; + +typedef enum _DEVICE_POWER_STATE { + PowerDeviceUnspecified = 0, + PowerDeviceD0, + PowerDeviceD1, + PowerDeviceD2, + PowerDeviceD3, + PowerDeviceMaximum +} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE; + +#if (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_) +typedef struct { + DWORD Granularity; + DWORD Capacity; +} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE; +#endif + +typedef struct _POWER_ACTION_POLICY { + POWER_ACTION Action; + DWORD Flags; + DWORD EventCode; +} POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY; + +/* POWER_ACTION_POLICY.Flags constants */ +#define POWER_ACTION_QUERY_ALLOWED 0x00000001 +#define POWER_ACTION_UI_ALLOWED 0x00000002 +#define POWER_ACTION_OVERRIDE_APPS 0x00000004 +#define POWER_ACTION_LIGHTEST_FIRST 0x10000000 +#define POWER_ACTION_LOCK_CONSOLE 0x20000000 +#define POWER_ACTION_DISABLE_WAKES 0x40000000 +#define POWER_ACTION_CRITICAL 0x80000000 + +/* POWER_ACTION_POLICY.EventCode constants */ +#define POWER_LEVEL_USER_NOTIFY_TEXT 0x00000001 +#define POWER_LEVEL_USER_NOTIFY_SOUND 0x00000002 +#define POWER_LEVEL_USER_NOTIFY_EXEC 0x00000004 +#define POWER_USER_NOTIFY_BUTTON 0x00000008 +#define POWER_USER_NOTIFY_SHUTDOWN 0x00000010 +#define POWER_FORCE_TRIGGER_RESET 0x80000000 + +#define DISCHARGE_POLICY_CRITICAL 0 +#define DISCHARGE_POLICY_LOW 1 +#define NUM_DISCHARGE_POLICIES 4 + +#define PO_THROTTLE_NONE 0 +#define PO_THROTTLE_CONSTANT 1 +#define PO_THROTTLE_DEGRADE 2 +#define PO_THROTTLE_ADAPTIVE 3 +#define PO_THROTTLE_MAXIMUM 4 + +typedef struct _SYSTEM_POWER_LEVEL { + BOOLEAN Enable; + BYTE Spare[3]; + DWORD BatteryLevel; + POWER_ACTION_POLICY PowerPolicy; + SYSTEM_POWER_STATE MinSystemState; +} SYSTEM_POWER_LEVEL, *PSYSTEM_POWER_LEVEL; + +typedef struct _SYSTEM_POWER_POLICY { + DWORD Revision; + POWER_ACTION_POLICY PowerButton; + POWER_ACTION_POLICY SleepButton; + POWER_ACTION_POLICY LidClose; + SYSTEM_POWER_STATE LidOpenWake; + DWORD Reserved; + POWER_ACTION_POLICY Idle; + DWORD IdleTimeout; + BYTE IdleSensitivity; + BYTE DynamicThrottle; + BYTE Spare2[2]; + SYSTEM_POWER_STATE MinSleep; + SYSTEM_POWER_STATE MaxSleep; + SYSTEM_POWER_STATE ReducedLatencySleep; + DWORD WinLogonFlags; + DWORD Spare3; + DWORD DozeS4Timeout; + DWORD BroadcastCapacityResolution; + SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES]; + DWORD VideoTimeout; + BOOLEAN VideoDimDisplay; + DWORD VideoReserved[3]; + DWORD SpindownTimeout; + BOOLEAN OptimizeForPower; + BYTE FanThrottleTolerance; + BYTE ForcedThrottle; + BYTE MinThrottle; + POWER_ACTION_POLICY OverThrottled; +} SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY; + +typedef struct _SYSTEM_POWER_CAPABILITIES { + BOOLEAN PowerButtonPresent; + BOOLEAN SleepButtonPresent; + BOOLEAN LidPresent; + BOOLEAN SystemS1; + BOOLEAN SystemS2; + BOOLEAN SystemS3; + BOOLEAN SystemS4; + BOOLEAN SystemS5; + BOOLEAN HiberFilePresent; + BOOLEAN FullWake; + BOOLEAN VideoDimPresent; + BOOLEAN ApmPresent; + BOOLEAN UpsPresent; + BOOLEAN ThermalControl; + BOOLEAN ProcessorThrottle; + BYTE ProcessorMinThrottle; +#if (NTDDI_VERSION < NTDDI_WINXP) + BYTE ProcessorThrottleScale; + BYTE spare2[4]; +#else + BYTE ProcessorMaxThrottle; + BOOLEAN FastSystemS4; + BYTE spare2[3]; +#endif /* (NTDDI_VERSION < NTDDI_WINXP) */ + BOOLEAN DiskSpinDown; + BYTE spare3[8]; + BOOLEAN SystemBatteriesPresent; + BOOLEAN BatteriesAreShortTerm; + BATTERY_REPORTING_SCALE BatteryScale[3]; + SYSTEM_POWER_STATE AcOnLineWake; + SYSTEM_POWER_STATE SoftLidWake; + SYSTEM_POWER_STATE RtcWake; + SYSTEM_POWER_STATE MinDeviceWakeState; + SYSTEM_POWER_STATE DefaultLowLatencyWake; +} SYSTEM_POWER_CAPABILITIES, *PSYSTEM_POWER_CAPABILITIES; + +typedef struct _SYSTEM_BATTERY_STATE { + BOOLEAN AcOnLine; + BOOLEAN BatteryPresent; + BOOLEAN Charging; + BOOLEAN Discharging; + BOOLEAN Spare1[4]; + DWORD MaxCapacity; + DWORD RemainingCapacity; + DWORD Rate; + DWORD EstimatedTime; + DWORD DefaultAlert1; + DWORD DefaultAlert2; +} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE; + +// FIXME: This should not be here! +typedef struct _PROCESSOR_POWER_INFORMATION { + ULONG Number; + ULONG MaxMhz; + ULONG CurrentMhz; + ULONG MhzLimit; + ULONG MaxIdleState; + ULONG CurrentIdleState; +} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION; + +typedef DWORD EXECUTION_STATE, *PEXECUTION_STATE; + +typedef enum _POWER_INFORMATION_LEVEL { + SystemPowerPolicyAc, + SystemPowerPolicyDc, + VerifySystemPolicyAc, + VerifySystemPolicyDc, + SystemPowerCapabilities, + SystemBatteryState, + SystemPowerStateHandler, + ProcessorStateHandler, + SystemPowerPolicyCurrent, + AdministratorPowerPolicy, + SystemReserveHiberFile, + ProcessorInformation, + SystemPowerInformation, + ProcessorStateHandler2, + LastWakeTime, + LastSleepTime, + SystemExecutionState, + SystemPowerStateNotifyHandler, + ProcessorPowerPolicyAc, + ProcessorPowerPolicyDc, + VerifyProcessorPowerPolicyAc, + VerifyProcessorPowerPolicyDc, + ProcessorPowerPolicyCurrent, + SystemPowerStateLogging, + SystemPowerLoggingEntry, + SetPowerSettingValue, + NotifyUserPowerSetting, + PowerInformationLevelUnused0, + PowerInformationLevelUnused1, + SystemVideoState, + TraceApplicationPowerMessage, + TraceApplicationPowerMessageEnd, + ProcessorPerfStates, + ProcessorIdleStates, + ProcessorCap, + SystemWakeSource, + SystemHiberFileInformation, + TraceServicePowerMessage, + ProcessorLoad, + PowerShutdownNotification, + MonitorCapabilities, + SessionPowerInit, + SessionDisplayState, + PowerRequestCreate, + PowerRequestAction, + GetPowerRequestList, + ProcessorInformationEx, + NotifyUserModeLegacyPowerEvent, + GroupPark, + ProcessorIdleDomains, + WakeTimerList, + SystemHiberFileSize, + PowerInformationLevelMaximum +} POWER_INFORMATION_LEVEL; + +#if 1 /* (WIN32_WINNT >= 0x0500) */ +typedef struct _SYSTEM_POWER_INFORMATION { + ULONG MaxIdlenessAllowed; + ULONG Idleness; + ULONG TimeRemaining; + UCHAR CoolingMode; +} SYSTEM_POWER_INFORMATION,*PSYSTEM_POWER_INFORMATION; +#endif + +#if (_WIN32_WINNT >= 0x0500) +#define _AUDIT_EVENT_TYPE_HACK 1 +typedef enum _AUDIT_EVENT_TYPE { + AuditEventObjectAccess, + AuditEventDirectoryServiceAccess +} AUDIT_EVENT_TYPE, *PAUDIT_EVENT_TYPE; +#endif + +#if (_WIN32_WINNT >= 0x0501) + +typedef enum _ACTIVATION_CONTEXT_INFO_CLASS { + ActivationContextBasicInformation = 1, + ActivationContextDetailedInformation = 2, + AssemblyDetailedInformationInActivationContext = 3, + FileInformationInAssemblyOfAssemblyInActivationContext = 4, + RunlevelInformationInActivationContext = 5, + CompatibilityInformationInActivationContext = 6, + ActivationContextManifestResourceName = 7, + MaxActivationContextInfoClass, +/* For compatibility with the old names */ + AssemblyDetailedInformationInActivationContxt = 3, + FileInformationInAssemblyOfAssemblyInActivationContxt = 4 +} ACTIVATION_CONTEXT_INFO_CLASS; + +typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION { + DWORD ulFlags; + DWORD ulEncodedAssemblyIdentityLength; + DWORD ulManifestPathType; + DWORD ulManifestPathLength; + LARGE_INTEGER liManifestLastWriteTime; + DWORD ulPolicyPathType; + DWORD ulPolicyPathLength; + LARGE_INTEGER liPolicyLastWriteTime; + DWORD ulMetadataSatelliteRosterIndex; + DWORD ulManifestVersionMajor; + DWORD ulManifestVersionMinor; + DWORD ulPolicyVersionMajor; + DWORD ulPolicyVersionMinor; + DWORD ulAssemblyDirectoryNameLength; + PCWSTR lpAssemblyEncodedAssemblyIdentity; + PCWSTR lpAssemblyManifestPath; + PCWSTR lpAssemblyPolicyPath; + PCWSTR lpAssemblyDirectoryName; +} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION; +typedef const ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION; + +typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION { + DWORD dwFlags; + DWORD ulFormatVersion; + DWORD ulAssemblyCount; + DWORD ulRootManifestPathType; + DWORD ulRootManifestPathChars; + DWORD ulRootConfigurationPathType; + DWORD ulRootConfigurationPathChars; + DWORD ulAppDirPathType; + DWORD ulAppDirPathChars; + PCWSTR lpRootManifestPath; + PCWSTR lpRootConfigurationPath; + PCWSTR lpAppDirPath; +} ACTIVATION_CONTEXT_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_DETAILED_INFORMATION; +typedef const ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION; + +typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX { + DWORD ulAssemblyIndex; + DWORD ulFileIndexInAssembly; +} ACTIVATION_CONTEXT_QUERY_INDEX,*PACTIVATION_CONTEXT_QUERY_INDEX; +typedef const ACTIVATION_CONTEXT_QUERY_INDEX *PCACTIVATION_CONTEXT_QUERY_INDEX; + +typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION { + DWORD ulFlags; + DWORD ulFilenameLength; + DWORD ulPathLength; + PCWSTR lpFileName; + PCWSTR lpFilePath; +} ASSEMBLY_FILE_DETAILED_INFORMATION,*PASSEMBLY_FILE_DETAILED_INFORMATION; +typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION; + +#define ACTIVATION_CONTEXT_PATH_TYPE_NONE 1 +#define ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE 2 +#define ACTIVATION_CONTEXT_PATH_TYPE_URL 3 +#define ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF 4 + +#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION 1 +#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION 2 +#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION 3 +#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION 4 +#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION 5 +#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION 6 +#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION 7 +#define ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE 8 +#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES 9 + +#endif /* (WIN32_WINNT >= 0x0501) */ + +typedef struct _PROCESSOR_POWER_POLICY_INFO { + DWORD TimeCheck; + DWORD DemoteLimit; + DWORD PromoteLimit; + BYTE DemotePercent; + BYTE PromotePercent; + BYTE Spare[2]; + DWORD AllowDemotion:1; + DWORD AllowPromotion:1; + DWORD Reserved:30; +} PROCESSOR_POWER_POLICY_INFO, *PPROCESSOR_POWER_POLICY_INFO; + +typedef struct _PROCESSOR_POWER_POLICY { + DWORD Revision; + BYTE DynamicThrottle; + BYTE Spare[3]; + DWORD DisableCStates:1; + DWORD Reserved:31; + DWORD PolicyCount; + PROCESSOR_POWER_POLICY_INFO Policy[3]; +} PROCESSOR_POWER_POLICY, *PPROCESSOR_POWER_POLICY; + +typedef struct _ADMINISTRATOR_POWER_POLICY { + SYSTEM_POWER_STATE MinSleep; + SYSTEM_POWER_STATE MaxSleep; + DWORD MinVideoTimeout; + DWORD MaxVideoTimeout; + DWORD MinSpindownTimeout; + DWORD MaxSpindownTimeout; +} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY; + +#endif /* WINVER >= 0x0500 */ + +typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); + +#ifdef UNICODE +typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; +#else +typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; +#endif + +#define VER_SET_CONDITION(lc,t,c) ((lc) = VerSetConditionMask((lc),(t),(c))) + +#if (_WIN32_WINNT >= 0x0500) +ULONGLONG WINAPI VerSetConditionMask(_In_ ULONGLONG, _In_ DWORD, _In_ BYTE); +#endif + +typedef enum _HEAP_INFORMATION_CLASS { + HeapCompatibilityInformation, + HeapEnableTerminationOnCorruption +} HEAP_INFORMATION_CLASS; + +typedef enum _PROCESSOR_CACHE_TYPE { + CacheUnified, + CacheInstruction, + CacheData, + CacheTrace +} PROCESSOR_CACHE_TYPE; + +typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP { + RelationProcessorCore, + RelationNumaNode, + RelationCache, + RelationProcessorPackage, + RelationGroup, + RelationAll = 0xffff +} LOGICAL_PROCESSOR_RELATIONSHIP; + +#define CACHE_FULLY_ASSOCIATIVE 0xFF + +typedef struct _CACHE_DESCRIPTOR { + BYTE Level; + BYTE Associativity; + WORD LineSize; + DWORD Size; + PROCESSOR_CACHE_TYPE Type; +} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR; + +typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { + ULONG_PTR ProcessorMask; + LOGICAL_PROCESSOR_RELATIONSHIP Relationship; + _ANONYMOUS_UNION union { + struct { + BYTE Flags; + } ProcessorCore; + struct { + DWORD NodeNumber; + } NumaNode; + CACHE_DESCRIPTOR Cache; + ULONGLONG Reserved[2]; + } DUMMYUNIONNAME; +} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; + +_Check_return_ +NTSYSAPI +SIZE_T +NTAPI +RtlCompareMemory ( + _In_ const VOID *Source1, + _In_ const VOID *Source2, + _In_ SIZE_T Length); + +#define RtlMoveMemory memmove +#define RtlCopyMemory memcpy +#define RtlFillMemory(d,l,f) memset((d), (f), (l)) +#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0) + +FORCEINLINE +PVOID +RtlSecureZeroMemory(_Out_writes_bytes_all_(Length) PVOID Buffer, + _In_ SIZE_T Length) +{ + volatile char *VolatilePointer; + + /* Get a volatile pointer to prevent any compiler optimizations */ + VolatilePointer = (volatile char *)Buffer; + + /* Loop the whole buffer */ + while (Length) + { + /* Zero the current byte and move on */ + *VolatilePointer++ = 0; + Length--; + } + + /* Return the pointer to ensure the compiler won't optimize this away */ + return Buffer; +} + +typedef struct _OBJECT_TYPE_LIST { + WORD Level; + WORD Sbz; + GUID *ObjectType; +} OBJECT_TYPE_LIST, *POBJECT_TYPE_LIST; + +#if defined(_M_IX86) +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + return (struct _TEB *)__readfsdword(0x18); +} +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + return (PVOID)(ULONG_PTR)__readfsdword(0x10); +} +#elif defined (_M_AMD64) +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); +} +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + #ifdef NONAMELESSUNION + return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, DUMMYUNIONNAME.FiberData)); + #else + return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData)); + #endif +} +#elif defined (_M_ARM) +#define CP15_PMSELR 15, 0, 9, 12, 5 +#define CP15_PMXEVCNTR 15, 0, 9, 13, 2 +#define CP15_TPIDRURW 15, 0, 13, 0, 2 +#define CP15_TPIDRURO 15, 0, 13, 0, 3 +#define CP15_TPIDRPRW 15, 0, 13, 0, 4 +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW); +} +FORCEINLINE PVOID GetCurrentFiber(VOID) +{ + return ((PNT_TIB )(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->FiberData; +} +#elif defined(_M_PPC) +FORCEINLINE unsigned long _read_teb_dword(const unsigned long Offset) +{ + unsigned long result; + __asm__("\tadd 7,13,%1\n" + "\tlwz %0,0(7)\n" + : "=r" (result) + : "r" (Offset) + : "r7"); + return result; +} +FORCEINLINE struct _TEB * NtCurrentTeb(void) +{ + return (struct _TEB *)_read_teb_dword(0x18); +} +FORCEINLINE PVOID GetCurrentFiber(void) +{ + return _read_teb_dword(0x10); +} +#else +#error Unknown architecture +#endif + +FORCEINLINE PVOID GetFiberData(void) +{ + return *((PVOID *)GetCurrentFiber()); +} + +#define BitScanForward _BitScanForward +#define BitScanReverse _BitScanReverse +#define BitTest _bittest +#define BitTestAndComplement _bittestandcomplement +#define BitTestAndSet _bittestandset +#define BitTestAndReset _bittestandreset +#define InterlockedBitTestAndSet _interlockedbittestandset +#define InterlockedBitTestAndReset _interlockedbittestandreset +#define InterlockedAnd16 _InterlockedAnd16 +#define InterlockedCompareExchange16 _InterlockedCompareExchange16 +#define InterlockedOr16 _InterlockedOr16 +#define InterlockedIncrement16 _InterlockedIncrement16 +#define InterlockedDecrement16 _InterlockedDecrement16 + +#ifdef _M_AMD64 +#define BitScanForward64 _BitScanForward64 +#define BitScanReverse64 _BitScanReverse64 + +#define InterlockedAnd _InterlockedAnd +#define InterlockedExchange _InterlockedExchange +#define InterlockedOr _InterlockedOr + +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 + +#define InterlockedBitTestAndSet64 _interlockedbittestandset64 +#define InterlockedBitTestAndReset64 _interlockedbittestandreset64 + +#endif + +#ifdef _WIN64 +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b) +#else +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) +#endif + +/* TODO: Other architectures than X86 */ +#if defined(_M_IX86) +#define PF_TEMPORAL_LEVEL_1 +#define PF_NON_TEMPORAL_LEVEL_ALL +#define PreFetchCacheLine(l, a) +#elif defined (_M_AMD64) +#define PreFetchCacheLine(l, a) +#elif defined(_M_PPC) +#define PreFetchCacheLine(l, a) +#elif defined(_M_ARM) +#define PreFetchCacheLine(l, a) +#else +#error Unknown architecture +#endif + +/* TODO: Other architectures than X86 */ +#if defined(_M_IX86) +#if defined(_MSC_VER) +FORCEINLINE +VOID +MemoryBarrier (VOID) +{ + LONG Barrier; + __asm { xchg Barrier, eax } +} +#else +FORCEINLINE +VOID +MemoryBarrier(VOID) +{ + LONG Barrier, *Dummy = &Barrier; + UNREFERENCED_LOCAL_VARIABLE(Dummy); + __asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory"); +} +#endif +#elif defined (_M_AMD64) +#define MemoryBarrier __faststorefence +#elif defined(_M_PPC) +#define MemoryBarrier() +#elif defined(_M_ARM) +#define MemoryBarrier() +#else +#error Unknown architecture +#endif + +#if defined(_M_IX86) || defined(_M_AMD64) + +#define YieldProcessor _mm_pause + +__analysis_noreturn +FORCEINLINE +VOID +DbgRaiseAssertionFailure(VOID) +{ + __int2c(); +} + +#elif defined(_M_PPC) +#define YieldProcessor() __asm__ __volatile__("nop"); +#elif defined(_M_MIPS) +#define YieldProcessor() __asm__ __volatile__("nop"); +#elif defined(_M_ARM) +#define YieldProcessor __yield +#else +#error Unknown architecture +#endif + +typedef struct _TP_POOL TP_POOL, *PTP_POOL; +typedef struct _TP_WORK TP_WORK, *PTP_WORK; +typedef struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE, *PTP_CALLBACK_INSTANCE; + +typedef DWORD TP_VERSION, *PTP_VERSION; + +typedef enum _TP_CALLBACK_PRIORITY { + TP_CALLBACK_PRIORITY_HIGH, + TP_CALLBACK_PRIORITY_NORMAL, + TP_CALLBACK_PRIORITY_LOW, + TP_CALLBACK_PRIORITY_INVALID, + TP_CALLBACK_PRIORITY_COUNT = TP_CALLBACK_PRIORITY_INVALID +} TP_CALLBACK_PRIORITY; + +typedef VOID +(NTAPI *PTP_WORK_CALLBACK)( + _Inout_ PTP_CALLBACK_INSTANCE Instance, + _Inout_opt_ PVOID Context, + _Inout_ PTP_WORK Work); + +typedef struct _TP_CLEANUP_GROUP TP_CLEANUP_GROUP, *PTP_CLEANUP_GROUP; + +typedef VOID +(NTAPI *PTP_SIMPLE_CALLBACK)( + _Inout_ PTP_CALLBACK_INSTANCE Instance, + _Inout_opt_ PVOID Context); + +typedef VOID +(NTAPI *PTP_CLEANUP_GROUP_CANCEL_CALLBACK)( + _Inout_opt_ PVOID ObjectContext, + _Inout_opt_ PVOID CleanupContext); + +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) +typedef struct _TP_CALLBACK_ENVIRON_V3 { + TP_VERSION Version; + PTP_POOL Pool; + PTP_CLEANUP_GROUP CleanupGroup; + PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback; + PVOID RaceDll; + struct _ACTIVATION_CONTEXT *ActivationContext; + PTP_SIMPLE_CALLBACK FinalizationCallback; + union { + DWORD Flags; + struct { + DWORD LongFunction:1; + DWORD Persistent:1; + DWORD Private:30; + } s; + } u; + TP_CALLBACK_PRIORITY CallbackPriority; + DWORD Size; +} TP_CALLBACK_ENVIRON_V3, TP_CALLBACK_ENVIRON, *PTP_CALLBACK_ENVIRON; +#else +typedef struct _TP_CALLBACK_ENVIRON_V1 { + TP_VERSION Version; + PTP_POOL Pool; + PTP_CLEANUP_GROUP CleanupGroup; + PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback; + PVOID RaceDll; + struct _ACTIVATION_CONTEXT *ActivationContext; + PTP_SIMPLE_CALLBACK FinalizationCallback; + union { + DWORD Flags; + struct { + DWORD LongFunction:1; + DWORD Persistent:1; + DWORD Private:30; + } s; + } u; +} TP_CALLBACK_ENVIRON_V1, TP_CALLBACK_ENVIRON, *PTP_CALLBACK_ENVIRON; +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN7) */ + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#endif /* RC_INVOKED */ diff --git a/lib/3rdparty/adns/CMakeLists.txt b/lib/3rdparty/adns/CMakeLists.txt index e85e7070537..b8187d8fd17 100644 --- a/lib/3rdparty/adns/CMakeLists.txt +++ b/lib/3rdparty/adns/CMakeLists.txt @@ -25,6 +25,6 @@ add_library(adns ${SOURCE}) add_dependencies(adns psdk) add_pch(adns src/internal.h SOURCE) -if(NOT MSVC) +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) add_target_compile_flags(adns "-Wno-unused-but-set-variable") endif() diff --git a/lib/3rdparty/cardlib/CMakeLists.txt b/lib/3rdparty/cardlib/CMakeLists.txt index 8369f57d970..d624197436a 100644 --- a/lib/3rdparty/cardlib/CMakeLists.txt +++ b/lib/3rdparty/cardlib/CMakeLists.txt @@ -19,6 +19,6 @@ add_library(cardlib ${SOURCE}) add_dependencies(cardlib psdk) add_pch(cardlib cardlib.h SOURCE) -if(NOT MSVC AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) add_target_compile_flags(cardlib "-Wno-unused-but-set-variable") endif() diff --git a/lib/3rdparty/fullfat/CMakeLists.txt b/lib/3rdparty/fullfat/CMakeLists.txt index 6163ff51e23..ec426f1f688 100644 --- a/lib/3rdparty/fullfat/CMakeLists.txt +++ b/lib/3rdparty/fullfat/CMakeLists.txt @@ -19,6 +19,6 @@ list(APPEND SOURCE add_library(fullfat ${SOURCE}) add_dependencies(fullfat bugcodes) -if(NOT MSVC) +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) add_target_compile_flags(fullfat "-Wno-unused-but-set-variable") endif() diff --git a/lib/3rdparty/libmpg123/CMakeLists.txt b/lib/3rdparty/libmpg123/CMakeLists.txt index 3731927f62e..954682f000a 100644 --- a/lib/3rdparty/libmpg123/CMakeLists.txt +++ b/lib/3rdparty/libmpg123/CMakeLists.txt @@ -45,6 +45,6 @@ add_library(libmpg123 ${SOURCE}) add_dependencies(libmpg123 psdk) add_pch(libmpg123 precomp.h SOURCE) -if(NOT MSVC) +if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) add_target_compile_flags(libmpg123 "-Wno-unused-but-set-variable") endif() diff --git a/lib/3rdparty/libsamplerate/float_cast.h b/lib/3rdparty/libsamplerate/float_cast.h index 2aa688c15bc..17e93311c65 100644 --- a/lib/3rdparty/libsamplerate/float_cast.h +++ b/lib/3rdparty/libsamplerate/float_cast.h @@ -183,23 +183,6 @@ return intgr ; } -#else - static __inline long int - lrint (double flt) - { - int intgr ; - __asm__ __volatile__ ("fldl %1; fistpl %0;" : "=m" (intgr) : "m" (flt)); - return intgr ; - } - - static __inline long int - lrintf (float flt) - { - int intgr ; - - __asm__ __volatile__ ("flds %1; fistpl %0;" : "=m" (intgr) : "m" (flt)); - return intgr ; - } #endif #elif (defined (__MWERKS__) && defined (macintosh)) diff --git a/lib/cmlib/hiveinit.c b/lib/cmlib/hiveinit.c index 2a5dd6a5092..7aed3d6fda2 100644 --- a/lib/cmlib/hiveinit.c +++ b/lib/cmlib/hiveinit.c @@ -210,6 +210,8 @@ HvpInitializeMemoryHive( if (Bin->Signature != HV_BIN_SIGNATURE || (Bin->Size % HV_BLOCK_SIZE) != 0) { + DPRINT1("Invalid bin at BlockIndex %lu, Signature 0x%x, Size 0x%x\n", + (unsigned long)BlockIndex, (unsigned)Bin->Signature, (unsigned)Bin->Size); Hive->Free(Hive->BaseBlock, 0); Hive->Free(Hive->Storage[Stable].BlockList, 0); return STATUS_REGISTRY_CORRUPT; @@ -506,7 +508,7 @@ HvInitialize( } /* Check for previous damage */ - if (Status == STATUS_REGISTRY_RECOVERED) ASSERT(FALSE); + ASSERT(Status != STATUS_REGISTRY_RECOVERED); break; } diff --git a/lib/fslib/ext2lib/Disk.c b/lib/fslib/ext2lib/Disk.c index e6854f1745c..0180304fe39 100644 --- a/lib/fslib/ext2lib/Disk.c +++ b/lib/fslib/ext2lib/Disk.c @@ -15,7 +15,7 @@ /* FUNCTIONS *************************************************************/ -PCCHAR +PCCH Ext2StatusToString ( IN NTSTATUS Status ) { switch (Status) @@ -953,14 +953,14 @@ Ext2StatusToString ( IN NTSTATUS Status ) * Length : Data Length to be read * Buffer : ... * - * RETURNS: + * RETURNS: * Success: STATUS_SUCCESS * Fail: ... * - * NOTES: + * NOTES: * Both Length and Offset should be SECTOR_SIZE aligned. */ -NTSTATUS +NTSTATUS Ext2ReadDisk( PEXT2_FILESYS Ext2Sys, ULONGLONG Offset, ULONG Length, @@ -1023,11 +1023,11 @@ Ext2ReadDisk( PEXT2_FILESYS Ext2Sys, goto errorout; } - RtlCopyMemory( Buffer, + RtlCopyMemory( Buffer, (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart), Length ); } - + errorout: if (NonPagedBuffer) @@ -1047,11 +1047,11 @@ errorout: * Length : Data Length to be written * Buffer : Data to be written ... * - * RETURNS: + * RETURNS: * Success: STATUS_SUCCESS * Fail: ... * - * NOTES: + * NOTES: * Both Length and Offset should be SECTOR_SIZE aligned. */ @@ -1151,10 +1151,10 @@ errorout: * ARGUMENTS: * VolumeHandle: Volume handle. * - * RETURNS: + * RETURNS: * Success or Fail * - * NOTES: + * NOTES: * N/A */ @@ -1200,10 +1200,10 @@ errorout: * ARGUMENTS: * VolumeHandle: Volume handle. * - * RETURNS: + * RETURNS: * Success or Fail * - * NOTES: + * NOTES: * N/A */ diff --git a/lib/pseh/arm/seh_prolog.s b/lib/pseh/arm/seh_prolog.s new file mode 100644 index 00000000000..0c252ae9164 --- /dev/null +++ b/lib/pseh/arm/seh_prolog.s @@ -0,0 +1,31 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/pseh/arm/seh_prolog.S + * PURPOSE: SEH Support for MSVC / ARM + * PROGRAMMERS: Timo Kreuzer + */ + +/* INCLUDES ******************************************************************/ + +#include "ksarm.h" + + TEXTAREA + + IMPORT __except_handler + + LEAF_ENTRY _SEH_prolog + + + LEAF_END _SEH_prolog + + + + LEAF_ENTRY _SEH_epilog + + + LEAF_END _SEH_epilog + + + + END diff --git a/lib/pseh/i386/pseh3.c b/lib/pseh/i386/pseh3.c index 9f2041528aa..5d74d0ac059 100644 --- a/lib/pseh/i386/pseh3.c +++ b/lib/pseh/i386/pseh3.c @@ -45,8 +45,18 @@ C_ASSERT(SEH3_REGISTRATION_FRAME_Handler == FIELD_OFFSET(SEH3$_REGISTRATION_FRAM C_ASSERT(SEH3_REGISTRATION_FRAME_EndOfChain == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, EndOfChain)); C_ASSERT(SEH3_REGISTRATION_FRAME_ScopeTable == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ScopeTable)); C_ASSERT(SEH3_REGISTRATION_FRAME_ExceptionPointers == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ExceptionPointers)); +C_ASSERT(SEH3_REGISTRATION_FRAME_ExceptionCode == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ExceptionCode)); C_ASSERT(SEH3_REGISTRATION_FRAME_Esp == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Esp)); C_ASSERT(SEH3_REGISTRATION_FRAME_Ebp == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Ebp)); +C_ASSERT(SEH3_REGISTRATION_FRAME_AllocaFrame == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, AllocaFrame)); +#ifdef _SEH3$_FRAME_ALL_NONVOLATILES +C_ASSERT(SEH3_REGISTRATION_FRAME_Ebx == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Ebx)); +C_ASSERT(SEH3_REGISTRATION_FRAME_Esi == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Esi)); +C_ASSERT(SEH3_REGISTRATION_FRAME_Edi == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, Edi)); +#endif +#ifdef __clang__ +C_ASSERT(SEH3_REGISTRATION_FRAME_ReturnAddress == FIELD_OFFSET(SEH3$_REGISTRATION_FRAME, ReturnAddress)); +#endif C_ASSERT(SEH3_SCOPE_TABLE_Filter == FIELD_OFFSET(SEH3$_SCOPE_TABLE, Filter)); C_ASSERT(SEH3_SCOPE_TABLE_Target == FIELD_OFFSET(SEH3$_SCOPE_TABLE, Target)); @@ -64,7 +74,7 @@ _SEH3$_Unregister( static inline LONG _SEH3$_InvokeNestedFunctionFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame, + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame, PVOID Filter) { LONG FilterResult; @@ -93,17 +103,17 @@ _SEH3$_InvokeNestedFunctionFilter( long __attribute__((regparm(1))) _SEH3$_InvokeEmbeddedFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame); + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame); long __attribute__((regparm(1))) _SEH3$_InvokeEmbeddedFilterFromRegistration( - PSEH3$_REGISTRATION_FRAME RegistrationFrame); + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame); static inline LONG _SEH3$_InvokeFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame, + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame, PVOID Filter) { LONG FilterResult; @@ -133,7 +143,7 @@ _SEH3$_InvokeFilter( void __attribute__((regparm(1))) _SEH3$_AutoCleanup( - SEH3$_REGISTRATION_FRAME *Frame) + volatile SEH3$_REGISTRATION_FRAME *Frame) { /* Check for __finally frames */ if (Frame->ScopeTable->Target == NULL) @@ -197,8 +207,8 @@ _SEH3$_JumpToTarget( { asm volatile ( /* Load the registers */ - "movl 20(%%ecx), %%esp\n\t" - "movl 24(%%ecx), %%ebp\n\t" + "movl 24(%%ecx), %%esp\n\t" + "movl 28(%%ecx), %%ebp\n\t" /* Stack pointer is 4 off from the call to __SEH3$_RegisterFrame */ "addl $4, %%esp\n\t" @@ -215,8 +225,8 @@ _SEH3$_JumpToTarget( { asm volatile ( /* Load the registers */ - "movl 20(%%ecx), %%esp\n\t" - "movl 24(%%ecx), %%ebp\n\t" + "movl 24(%%ecx), %%esp\n\t" + "movl 28(%%ecx), %%ebp\n\t" /* Stack pointer is 4 off from the call to __SEH3$_RegisterFrame */ "addl $4, %%esp\n\t" @@ -241,7 +251,9 @@ _SEH3$_CallRtlUnwind( EXCEPTION_DISPOSITION __cdecl +#ifndef __clang__ __attribute__ ((__target__ ("cld"))) +#endif _SEH3$_except_handler( struct _EXCEPTION_RECORD * ExceptionRecord, PSEH3$_REGISTRATION_FRAME EstablisherFrame, @@ -274,8 +286,9 @@ _SEH3$_except_handler( /* Check if we have an exception handler */ if (CurrentFrame->ScopeTable->Target != NULL) { - /* Set exception pointers for this frame */ + /* Set exception pointers and code for this frame */ CurrentFrame->ExceptionPointers = &ExceptionPointers; + CurrentFrame->ExceptionCode = ExceptionRecord->ExceptionCode; /* Get the filter result */ FilterResult = _SEH3$_GetFilterResult(CurrentFrame); @@ -316,8 +329,9 @@ _SEH3$_except_handler( /* Check if this is an unwind frame */ if (CurrentFrame->ScopeTable->Target == NULL) { - /* Set exception pointers for this frame */ + /* Set exception pointers and code for this frame */ CurrentFrame->ExceptionPointers = &ExceptionPointers; + CurrentFrame->ExceptionCode = ExceptionRecord->ExceptionCode; /* Call the finally function */ _SEH3$_CallFinally(CurrentFrame); diff --git a/lib/pseh/i386/pseh3_asmdef.h b/lib/pseh/i386/pseh3_asmdef.h index 87d126fa8ca..0650155ee3a 100644 --- a/lib/pseh/i386/pseh3_asmdef.h +++ b/lib/pseh/i386/pseh3_asmdef.h @@ -5,12 +5,14 @@ #define SEH3_REGISTRATION_FRAME_EndOfChain 8 #define SEH3_REGISTRATION_FRAME_ScopeTable 12 #define SEH3_REGISTRATION_FRAME_ExceptionPointers 16 -#define SEH3_REGISTRATION_FRAME_Esp 20 -#define SEH3_REGISTRATION_FRAME_Ebp 24 -#define SEH3_REGISTRATION_FRAME_AllocaFrame 28 -#define SEH3_REGISTRATION_FRAME_Ebx 32 -#define SEH3_REGISTRATION_FRAME_Esi 36 -#define SEH3_REGISTRATION_FRAME_Edi 40 +#define SEH3_REGISTRATION_FRAME_ExceptionCode 20 +#define SEH3_REGISTRATION_FRAME_Esp 24 +#define SEH3_REGISTRATION_FRAME_Ebp 28 +#define SEH3_REGISTRATION_FRAME_AllocaFrame 32 +#define SEH3_REGISTRATION_FRAME_Ebx 36 +#define SEH3_REGISTRATION_FRAME_Esi 40 +#define SEH3_REGISTRATION_FRAME_Edi 44 +#define SEH3_REGISTRATION_FRAME_ReturnAddress 48 #define SEH3_SCOPE_TABLE_Target 0 #define SEH3_SCOPE_TABLE_Filter 4 diff --git a/lib/pseh/i386/pseh3_i386.S b/lib/pseh/i386/pseh3_i386.S index 8e409fa2406..69f8b758f51 100644 --- a/lib/pseh/i386/pseh3_i386.S +++ b/lib/pseh/i386/pseh3_i386.S @@ -30,6 +30,10 @@ __SEH3$_RegisterFrameWithNonVolatiles: mov [eax + SEH3_REGISTRATION_FRAME_Esi], esi mov [eax + SEH3_REGISTRATION_FRAME_Edi], edi + /* Safe the return address */ + mov ebx, [esp] + mov [eax + SEH3_REGISTRATION_FRAME_ReturnAddress], ebx + .global __SEH3$_RegisterFrameWithStackLayout __SEH3$_RegisterFrameWithStackLayout: @@ -79,6 +83,10 @@ __SEH3$_RegisterTryLevelWithNonVolatiles: mov [eax + SEH3_REGISTRATION_FRAME_Esi], esi mov [eax + SEH3_REGISTRATION_FRAME_Edi], edi + /* Safe the return address */ + mov ebx, [esp] + mov [eax + SEH3_REGISTRATION_FRAME_ReturnAddress], ebx + .global __SEH3$_RegisterTryLevelWithStackLayout __SEH3$_RegisterTryLevelWithStackLayout: @@ -128,20 +136,26 @@ __SEH3$_InvokeEmbeddedFilterFromRegistration: mov edi, [eax + SEH3_REGISTRATION_FRAME_Edi] mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp] - /* Get the saved stack pointer */ - mov edx, [eax + SEH3_REGISTRATION_FRAME_Esp] + /* Calculate the size of the temp stack frame region */ + mov ecx, [eax + SEH3_REGISTRATION_FRAME_AllocaFrame] + sub ecx, [eax + SEH3_REGISTRATION_FRAME_Esp] + /* Put the return address on the stack */ + push offset __SEH3$_InvokeEmbeddedFilterReturn + + /* Save the current stack pointer in the AllocaFrame member */ + mov [eax + SEH3_REGISTRATION_FRAME_AllocaFrame], esp + + /* Allocate enough temp stack space on the stack */ + sub esp, ecx + + /* Get the return address that was saved when registering the frame */ + mov edx, [eax + SEH3_REGISTRATION_FRAME_ReturnAddress] + + /* Jump into the filter or finally function */ xor eax, eax inc eax - call [edx] - - /* Restore the current non-volatiles */ - pop edi - pop esi - pop ebx - pop ebp - - ret + jmp edx .global __SEH3$_InvokeEmbeddedFilter diff --git a/lib/rtl/actctx.c b/lib/rtl/actctx.c index 784e446a550..c3712af3cdd 100644 --- a/lib/rtl/actctx.c +++ b/lib/rtl/actctx.c @@ -582,7 +582,6 @@ static const WCHAR dependencyW[] = {'d','e','p','e','n','d','e','n','c','y',0}; static const WCHAR dependentAssemblyW[] = {'d','e','p','e','n','d','e','n','t','A','s','s','e','m','b','l','y',0}; static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR fileW[] = {'f','i','l','e',0}; -static const WCHAR asmv2hashW[] = {'a','s','m','v','2',':','h','a','s','h',0}; static const WCHAR noInheritW[] = {'n','o','I','n','h','e','r','i','t',0}; static const WCHAR noInheritableW[] = {'n','o','I','n','h','e','r','i','t','a','b','l','e',0}; static const WCHAR typelibW[] = {'t','y','p','e','l','i','b',0}; diff --git a/lib/rtl/path.c b/lib/rtl/path.c index ca06f3f041e..557acfe5376 100644 --- a/lib/rtl/path.c +++ b/lib/rtl/path.c @@ -31,7 +31,6 @@ C_ASSERT(RTL_CURDIR_ALL_FLAGS == OBJ_HANDLE_TAGBITS); /* GLOBALS ********************************************************************/ -static const WCHAR DeviceRootW[] = L"\\\\.\\"; const UNICODE_STRING DeviceRootString = RTL_CONSTANT_STRING(L"\\\\.\\"); const UNICODE_STRING RtlpDosDevicesUncPrefix = RTL_CONSTANT_STRING(L"\\??\\UNC\\"); diff --git a/lib/sdk/crt/crt.cmake b/lib/sdk/crt/crt.cmake index 60aeb56b642..4732d9ac60b 100644 --- a/lib/sdk/crt/crt.cmake +++ b/lib/sdk/crt/crt.cmake @@ -510,6 +510,11 @@ endif() set_source_files_properties(${CRT_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "__MINGW_IMPORT=extern;USE_MSVCRT_PREFIX;_MSVCRT_LIB_;_MSVCRT_;_MT;CRTDLL") add_asm_files(crt_asm ${CRT_ASM_SOURCE}) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + #FIXME: http://llvm.org/bugs/show_bug.cgi?id=19027 + set_property(SOURCE except/cpp.c APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") +endif() + add_library(crt ${CRT_SOURCE} ${crt_asm}) target_link_libraries(crt chkstk) add_target_compile_definitions(crt diff --git a/lib/sdk/crt/math/i386/ldexp.c b/lib/sdk/crt/math/i386/ldexp.c index 7f4289656ce..48cbc751d6c 100644 --- a/lib/sdk/crt/math/i386/ldexp.c +++ b/lib/sdk/crt/math/i386/ldexp.c @@ -39,18 +39,10 @@ double ldexp (double value, int exp) } #ifdef __GNUC__ -#if defined(__clang__) - asm ("fild %[exp]\n" - "fscale\n" - "fstp %%st(1)\n" - : [result] "=t" (result) - : [value] "0" (value), [exp] "m" (exp)); -#else asm ("fscale" : "=t" (result) : "0" (value), "u" ((double)exp) : "1"); -#endif #else /* !__GNUC__ */ __asm { diff --git a/lib/sdk/crt/printf/_sxprintf.c b/lib/sdk/crt/printf/_sxprintf.c index 46667195314..b2ba6dc5a1f 100644 --- a/lib/sdk/crt/printf/_sxprintf.c +++ b/lib/sdk/crt/printf/_sxprintf.c @@ -57,12 +57,6 @@ _sxprintf( 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)))) @@ -118,7 +112,8 @@ _sxprintf( buffer[result] = _T('\0'); #else /* Only zero terminate if there is enough space left */ - if (stream._cnt >= sizeof(TCHAR)) *(TCHAR*)stream._ptr = _T('\0'); + if ((stream._cnt >= sizeof(TCHAR)) && (stream._ptr)) + *(TCHAR*)stream._ptr = _T('\0'); #endif return result; diff --git a/lib/sdk/crt/printf/streamout.c b/lib/sdk/crt/printf/streamout.c index 27b1471b15c..ccc56dec152 100644 --- a/lib/sdk/crt/printf/streamout.c +++ b/lib/sdk/crt/printf/streamout.c @@ -227,6 +227,11 @@ static int streamout_char(FILE *stream, int chr) { +#ifdef _LIBCNT_ + if ((stream->_flag & _IOSTRG) && (!stream->_ptr)) + return 1; +#endif + #if defined(_USER32_WSPRINTF) || defined(_LIBCNT_) /* Check if the buffer is full */ if (stream->_cnt < sizeof(TCHAR)) diff --git a/lib/sdk/crt/stdio/popen.c b/lib/sdk/crt/stdio/popen.c index 74f2f0fb601..83d83581091 100644 --- a/lib/sdk/crt/stdio/popen.c +++ b/lib/sdk/crt/stdio/popen.c @@ -21,6 +21,14 @@ int alloc_fd(HANDLE hand, int flag); //FIXME: Remove unsigned split_oflags(unsigned oflags); //FIXME: Remove +#ifndef _UNICODE +static struct popen_handle { + FILE *f; + HANDLE proc; +} *popen_handles; +static DWORD popen_handles_size; +#endif + /* * @implemented */ @@ -130,16 +138,40 @@ FILE *_tpopen (const _TCHAR *cm, const _TCHAR *md) /* program name, pipe mode */ /* * @implemented */ -int _pclose (FILE *pp) +int CDECL _pclose(FILE* file) { - TRACE("_pclose(%x)",pp); + HANDLE h; + DWORD i; - fclose(pp); - //if (!TerminateProcess(pp->_tmpfname ,0)) - // return( -1 ); - return( 0 ); + if (!MSVCRT_CHECK_PMT(file != NULL)) return -1; + + _mlock(_POPEN_LOCK); + for(i=0; iQuadPart, EndOffset->QuadPart, Wait); - Length = EndOffset->u.LowPart - StartOffset->u.LowPart; + Length = EndOffset->QuadPart - StartOffset->QuadPart; WriteOffset.QuadPart = StartOffset->QuadPart; if (FileObject->SectionObjectPointer->SharedCacheMap == NULL) @@ -489,9 +489,9 @@ CcZeroData ( while (Length > 0) { - if (Length + WriteOffset.u.LowPart % PAGE_SIZE > MAX_ZERO_LENGTH) + if (Length + WriteOffset.QuadPart % PAGE_SIZE > MAX_ZERO_LENGTH) { - CurrentLength = MAX_ZERO_LENGTH - WriteOffset.u.LowPart % PAGE_SIZE; + CurrentLength = MAX_ZERO_LENGTH - WriteOffset.QuadPart % PAGE_SIZE; } else { diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index d54f16a8032..c2e2f89dd67 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -434,7 +434,7 @@ PROS_VACB NTAPI CcRosLookupVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset) + LONGLONG FileOffset) { PLIST_ENTRY current_entry; PROS_VACB current; @@ -442,7 +442,7 @@ CcRosLookupVacb ( ASSERT(SharedCacheMap); - DPRINT("CcRosLookupVacb(SharedCacheMap 0x%p, FileOffset %lu)\n", + DPRINT("CcRosLookupVacb(SharedCacheMap 0x%p, FileOffset %I64u)\n", SharedCacheMap, FileOffset); KeAcquireGuardedMutex(&ViewLock); @@ -483,14 +483,14 @@ NTSTATUS NTAPI CcRosMarkDirtyVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset) + LONGLONG FileOffset) { PROS_VACB Vacb; KIRQL oldIrql; ASSERT(SharedCacheMap); - DPRINT("CcRosMarkDirtyVacb(SharedCacheMap 0x%p, FileOffset %lu)\n", + DPRINT("CcRosMarkDirtyVacb(SharedCacheMap 0x%p, FileOffset %I64u)\n", SharedCacheMap, FileOffset); Vacb = CcRosLookupVacb(SharedCacheMap, FileOffset); @@ -529,7 +529,7 @@ NTSTATUS NTAPI CcRosUnmapVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, + LONGLONG FileOffset, BOOLEAN NowDirty) { PROS_VACB Vacb; @@ -538,7 +538,7 @@ CcRosUnmapVacb ( ASSERT(SharedCacheMap); - DPRINT("CcRosUnmapVacb(SharedCacheMap 0x%p, FileOffset %lu, NowDirty %u)\n", + DPRINT("CcRosUnmapVacb(SharedCacheMap 0x%p, FileOffset %I64u, NowDirty %u)\n", SharedCacheMap, FileOffset, NowDirty); Vacb = CcRosLookupVacb(SharedCacheMap, FileOffset); @@ -582,7 +582,7 @@ static NTSTATUS CcRosCreateVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, + LONGLONG FileOffset, PROS_VACB *Vacb) { PROS_VACB current; @@ -595,7 +595,7 @@ CcRosCreateVacb ( DPRINT("CcRosCreateVacb()\n"); - if (FileOffset >= SharedCacheMap->FileSize.u.LowPart) + if (FileOffset >= SharedCacheMap->FileSize.QuadPart) { *Vacb = NULL; return STATUS_INVALID_PARAMETER; @@ -729,8 +729,8 @@ NTSTATUS NTAPI CcRosGetVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, - PULONGLONG BaseOffset, + LONGLONG FileOffset, + PLONGLONG BaseOffset, PVOID* BaseAddress, PBOOLEAN UptoDate, PROS_VACB *Vacb) @@ -781,7 +781,7 @@ NTSTATUS NTAPI CcRosRequestVacb ( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, + LONGLONG FileOffset, PVOID* BaseAddress, PBOOLEAN UptoDate, PROS_VACB *Vacb) @@ -789,13 +789,13 @@ CcRosRequestVacb ( * FUNCTION: Request a page mapping for a shared cache map */ { - ULONGLONG BaseOffset; + LONGLONG BaseOffset; ASSERT(SharedCacheMap); if (FileOffset % VACB_MAPPING_GRANULARITY != 0) { - DPRINT1("Bad fileoffset %x should be multiple of %x", + DPRINT1("Bad fileoffset %I64x should be multiple of %x", FileOffset, VACB_MAPPING_GRANULARITY); KeBugCheck(CACHE_MANAGER); } @@ -865,6 +865,7 @@ CcFlushCache ( { PROS_SHARED_CACHE_MAP SharedCacheMap; LARGE_INTEGER Offset; + LONGLONG RemainingLength; PROS_VACB current; NTSTATUS Status; KIRQL oldIrql; @@ -879,11 +880,12 @@ CcFlushCache ( if (FileOffset) { Offset = *FileOffset; + RemainingLength = Length; } else { - Offset.QuadPart = (LONGLONG)0; - Length = SharedCacheMap->FileSize.u.LowPart; + Offset.QuadPart = 0; + RemainingLength = SharedCacheMap->FileSize.QuadPart; } if (IoStatus) @@ -892,9 +894,9 @@ CcFlushCache ( IoStatus->Information = 0; } - while (Length > 0) + while (RemainingLength > 0) { - current = CcRosLookupVacb(SharedCacheMap, Offset.u.LowPart); + current = CcRosLookupVacb(SharedCacheMap, Offset.QuadPart); if (current != NULL) { if (current->Dirty) @@ -915,14 +917,7 @@ CcFlushCache ( } Offset.QuadPart += VACB_MAPPING_GRANULARITY; - if (Length > VACB_MAPPING_GRANULARITY) - { - Length -= VACB_MAPPING_GRANULARITY; - } - else - { - Length = 0; - } + RemainingLength -= min(RemainingLength, VACB_MAPPING_GRANULARITY); } } else diff --git a/ntoskrnl/config/cminit.c b/ntoskrnl/config/cminit.c index 147ba73d993..84749d3b555 100644 --- a/ntoskrnl/config/cminit.c +++ b/ntoskrnl/config/cminit.c @@ -201,6 +201,7 @@ CmpInitializeHive(OUT PCMHIVE *RegistryHive, if (!NT_SUCCESS(Status)) { /* Cleanup allocations and fail */ + ExDeleteResourceLite(Hive->FlusherLock); ExFreePoolWithTag(Hive->FlusherLock, TAG_CM); ExFreePoolWithTag(Hive->ViewLock, TAG_CM); ExFreePoolWithTag(Hive, TAG_CM); @@ -218,6 +219,7 @@ CmpInitializeHive(OUT PCMHIVE *RegistryHive, if (CheckStatus != 0) { /* Cleanup allocations and fail */ + ExDeleteResourceLite(Hive->FlusherLock); ExFreePoolWithTag(Hive->FlusherLock, TAG_CM); ExFreePoolWithTag(Hive->ViewLock, TAG_CM); ExFreePoolWithTag(Hive, TAG_CM); diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index b569ad29f65..5526b07653a 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -363,7 +363,7 @@ InbvDisplayString(IN PCHAR String) InbvAcquireLock(); /* Make sure we're installed and display the string */ - if (InbvBootDriverInstalled) VidDisplayString((PUCHAR) String); + if (InbvBootDriverInstalled) VidDisplayString((PUCHAR)String); /* Print the string on the EMS port */ HeadlessDispatch(HeadlessCmdPutString, @@ -462,11 +462,11 @@ VOID NTAPI InbvSetScrollRegion(IN ULONG Left, IN ULONG Top, - IN ULONG Width, - IN ULONG Height) + IN ULONG Right, + IN ULONG Bottom) { /* Just call bootvid */ - VidSetScrollRegion(Left, Top, Width, Height); + VidSetScrollRegion(Left, Top, Right, Bottom); } VOID @@ -483,8 +483,8 @@ VOID NTAPI InbvSolidColorFill(IN ULONG Left, IN ULONG Top, - IN ULONG Width, - IN ULONG Height, + IN ULONG Right, + IN ULONG Bottom, IN ULONG Color) { /* Make sure we own it */ @@ -497,7 +497,7 @@ InbvSolidColorFill(IN ULONG Left, if (InbvBootDriverInstalled) { /* Call bootvid */ - VidSolidColorFill(Left, Top, Width, Height, (UCHAR)Color); + VidSolidColorFill(Left, Top, Right, Bottom, (UCHAR)Color); } /* FIXME: Headless */ diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index 48b3ea5c311..ed10869f3f7 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -184,8 +184,8 @@ NTSTATUS NTAPI CcRosGetVacb( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, - PULONGLONG BaseOffset, + LONGLONG FileOffset, + PLONGLONG BaseOffset, PVOID *BaseAddress, PBOOLEAN UptoDate, PROS_VACB *Vacb @@ -211,7 +211,7 @@ NTSTATUS NTAPI CcRosUnmapVacb( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, + LONGLONG FileOffset, BOOLEAN NowDirty ); @@ -219,7 +219,7 @@ PROS_VACB NTAPI CcRosLookupVacb( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset + LONGLONG FileOffset ); VOID @@ -230,7 +230,7 @@ NTSTATUS NTAPI CcRosMarkDirtyVacb( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset + LONGLONG FileOffset ); NTSTATUS @@ -267,7 +267,7 @@ NTSTATUS NTAPI CcRosRequestVacb( PROS_SHARED_CACHE_MAP SharedCacheMap, - ULONG FileOffset, + LONGLONG FileOffset, PVOID* BaseAddress, PBOOLEAN UptoDate, PROS_VACB *Vacb @@ -295,10 +295,10 @@ CcTryToInitializeFileCache(PFILE_OBJECT FileObject); FORCEINLINE BOOLEAN DoRangesIntersect( - _In_ ULONGLONG Offset1, - _In_ ULONG Length1, - _In_ ULONGLONG Offset2, - _In_ ULONG Length2) + _In_ LONGLONG Offset1, + _In_ LONGLONG Length1, + _In_ LONGLONG Offset2, + _In_ LONGLONG Length2) { if (Offset1 + Length1 <= Offset2) return FALSE; @@ -310,9 +310,9 @@ DoRangesIntersect( FORCEINLINE BOOLEAN IsPointInRange( - _In_ ULONGLONG Offset1, - _In_ ULONG Length1, - _In_ ULONGLONG Point) + _In_ LONGLONG Offset1, + _In_ LONGLONG Length1, + _In_ LONGLONG Point) { return DoRangesIntersect(Offset1, Length1, Point, 1); } diff --git a/ntoskrnl/io/iomgr/deviface.c b/ntoskrnl/io/iomgr/deviface.c index f43d70f990d..73b87ea9ffb 100644 --- a/ntoskrnl/io/iomgr/deviface.c +++ b/ntoskrnl/io/iomgr/deviface.c @@ -95,9 +95,13 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, ClassesKey, NULL); - Status = ZwOpenKey(GuidKeyRealP, - DesiredAccess | KEY_ENUMERATE_SUB_KEYS, - &ObjectAttributes); + Status = ZwCreateKey(GuidKeyRealP, + DesiredAccess | KEY_ENUMERATE_SUB_KEYS, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + NULL); ZwClose(ClassesKey); if (!NT_SUCCESS(Status)) { @@ -142,9 +146,13 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, *GuidKeyRealP, NULL); - Status = ZwOpenKey(DeviceKeyRealP, - DesiredAccess | KEY_ENUMERATE_SUB_KEYS, - &ObjectAttributes); + Status = ZwCreateKey(DeviceKeyRealP, + DesiredAccess | KEY_ENUMERATE_SUB_KEYS, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + NULL); if (!NT_SUCCESS(Status)) { DPRINT1("Failed to open %wZ%wZ\\%wZ\n", &BaseKeyU, &GuidString, &SubKeyName); @@ -156,9 +164,13 @@ OpenRegistryHandlesFromSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, *DeviceKeyRealP, NULL); - Status = ZwOpenKey(InstanceKeyRealP, - DesiredAccess, - &ObjectAttributes); + Status = ZwCreateKey(InstanceKeyRealP, + DesiredAccess, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + NULL); if (!NT_SUCCESS(Status)) { DPRINT1("Failed to open %wZ%wZ\\%wZ%\\%wZ (%x)\n", &BaseKeyU, &GuidString, &SubKeyName, &ReferenceString, Status); @@ -1237,7 +1249,6 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, PDEVICE_OBJECT PhysicalDeviceObject; PFILE_OBJECT FileObject; UNICODE_STRING GuidString; - UNICODE_STRING SymLink; PWCHAR StartPosition; PWCHAR EndPosition; NTSTATUS Status; @@ -1255,8 +1266,8 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, /* Symbolic link name is \??\ACPI#PNP0501#1#{GUID}\ReferenceString */ /* Get GUID from SymbolicLinkName */ - StartPosition = wcschr(SymbolicLinkName->Buffer, L'{'); - EndPosition = wcschr(SymbolicLinkName->Buffer, L'}'); + StartPosition = wcsrchr(SymbolicLinkName->Buffer, L'{'); + EndPosition = wcsrchr(SymbolicLinkName->Buffer, L'}'); if (!StartPosition ||!EndPosition || StartPosition > EndPosition) { DPRINT1("IoSetDeviceInterfaceState() returning STATUS_INVALID_PARAMETER_1\n"); @@ -1265,10 +1276,6 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, GuidString.Buffer = StartPosition; GuidString.MaximumLength = GuidString.Length = (USHORT)((ULONG_PTR)(EndPosition + 1) - (ULONG_PTR)StartPosition); - SymLink.Buffer = SymbolicLinkName->Buffer; - SymLink.MaximumLength = SymLink.Length = (USHORT)((ULONG_PTR)(EndPosition + 1) - (ULONG_PTR)SymLink.Buffer); - DPRINT("IoSetDeviceInterfaceState('%wZ', %u)\n", SymbolicLinkName, Enable); - Status = OpenRegistryHandlesFromSymbolicLink(SymbolicLinkName, KEY_CREATE_SUB_KEY, NULL, @@ -1315,7 +1322,7 @@ IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, /* Get pointer to the PDO */ Status = IoGetDeviceObjectPointer( - &SymLink, + SymbolicLinkName, 0, /* DesiredAccess */ &FileObject, &PhysicalDeviceObject); diff --git a/ntoskrnl/lpc/reply.c b/ntoskrnl/lpc/reply.c index d07152f83af..ef0b2cdb29e 100644 --- a/ntoskrnl/lpc/reply.c +++ b/ntoskrnl/lpc/reply.c @@ -188,7 +188,7 @@ NTAPI NtReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE ReplyMessage) { - PLPCP_PORT_OBJECT Port, ConnectionPort = NULL; + PLPCP_PORT_OBJECT Port; KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); NTSTATUS Status; PLPCP_MESSAGE Message; @@ -256,7 +256,6 @@ NtReplyPort(IN HANDLE PortHandle, { /* No thread found, fail */ ObDereferenceObject(Port); - if (ConnectionPort) ObDereferenceObject(ConnectionPort); return Status; } @@ -265,7 +264,6 @@ NtReplyPort(IN HANDLE PortHandle, if (!Message) { /* Fail if we couldn't allocate a message */ - if (ConnectionPort) ObDereferenceObject(ConnectionPort); ObDereferenceObject(WakeupThread); ObDereferenceObject(Port); return STATUS_NO_MEMORY; @@ -282,7 +280,6 @@ NtReplyPort(IN HANDLE PortHandle, { /* It isn't, fail */ LpcpFreeToPortZone(Message, LPCP_LOCK_HELD | LPCP_LOCK_RELEASE); - if (ConnectionPort) ObDereferenceObject(ConnectionPort); ObDereferenceObject(WakeupThread); ObDereferenceObject(Port); return STATUS_REPLY_MESSAGE_MISMATCH; diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index 4558bfa97e6..68063b2b679 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -2220,6 +2220,7 @@ ExFreePoolWithTag(IN PVOID P, // Entry = P; Entry--; + ASSERT((ULONG_PTR)Entry % POOL_BLOCK_SIZE == 0); // // Get the size of the entry, and it's pool type, then load the descriptor diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c index df4dbebe248..f78a445343c 100644 --- a/ntoskrnl/mm/ARM3/pagfault.c +++ b/ntoskrnl/mm/ARM3/pagfault.c @@ -709,12 +709,9 @@ MiCompleteProtoPteFault(IN BOOLEAN StoreInstruction, Pfn1->u3.e1.PrototypePte = 1; /* Increment the share count for the page table */ - // FIXME: This doesn't work because we seem to bump the sharecount to two, and MiDeletePte gets annoyed and ASSERTs. - // This could be beause MiDeletePte is now being called from strange code in Rosmm PageTablePte = MiAddressToPte(PointerPte); Pfn2 = MiGetPfnEntry(PageTablePte->u.Hard.PageFrameNumber); - //Pfn2->u2.ShareCount++; - DBG_UNREFERENCED_LOCAL_VARIABLE(Pfn2); + Pfn2->u2.ShareCount++; /* Check where we should be getting the protection information from */ if (PointerPte->u.Soft.PageFileHigh == MI_PTE_LOOKUP_NEEDED) diff --git a/ntoskrnl/mm/ARM3/section.c b/ntoskrnl/mm/ARM3/section.c index f3063d0c389..f6fa60441d2 100644 --- a/ntoskrnl/mm/ARM3/section.c +++ b/ntoskrnl/mm/ARM3/section.c @@ -2204,7 +2204,9 @@ MiRemoveMappedPtes(IN PVOID BaseAddress, OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); ASSERT(((Pfn1->u3.e1.PrototypePte) && (Pfn1->OriginalPte.u.Soft.Prototype)) == 0); - /* FIXME: Dirty bit management */ + /* Mark the page as modified accordingly */ + if (PteContents.u.Hard.Dirty) + Pfn1->u3.e1.Modified = 1; /* Was the PDE invalid */ if (PointerPde->u.Long == 0) @@ -2223,7 +2225,7 @@ MiRemoveMappedPtes(IN PVOID BaseAddress, /* Dereference the PDE and the PTE */ Pfn2 = MiGetPfnEntry(PFN_FROM_PTE(PointerPde)); - //MiDecrementShareCount(Pfn2, PFN_FROM_PTE(PointerPde)); + MiDecrementShareCount(Pfn2, PFN_FROM_PTE(PointerPde)); DBG_UNREFERENCED_LOCAL_VARIABLE(Pfn2); MiDecrementShareCount(Pfn1, PFN_FROM_PTE(&PteContents)); diff --git a/ntoskrnl/mm/ARM3/virtual.c b/ntoskrnl/mm/ARM3/virtual.c index 932e1d04ac2..dced562185b 100644 --- a/ntoskrnl/mm/ARM3/virtual.c +++ b/ntoskrnl/mm/ARM3/virtual.c @@ -407,15 +407,17 @@ MiDeletePte(IN PMMPTE PointerPte, /* See if the PTE is valid */ if (TempPte.u.Hard.Valid == 0) { - /* Prototype PTEs not supported yet */ + /* Prototype and paged out PTEs not supported yet */ ASSERT(TempPte.u.Soft.Prototype == 0); + ASSERT((TempPte.u.Soft.PageFileHigh == 0) || (TempPte.u.Soft.Transition == 1)); + if (TempPte.u.Soft.Transition) { /* Get the PFN entry */ PageFrameIndex = PFN_FROM_PTE(&TempPte); Pfn1 = MiGetPfnEntry(PageFrameIndex); - DPRINT1("Pte %p is transitional!\n", PointerPte); + DPRINT("Pte %p is transitional!\n", PointerPte); /* Destroy the PTE */ MI_ERASE_PTE(PointerPte); @@ -433,12 +435,14 @@ MiDeletePte(IN PMMPTE PointerPte, /* And it should be in standby or modified list */ ASSERT((Pfn1->u3.e1.PageLocation == ModifiedPageList) || (Pfn1->u3.e1.PageLocation == StandbyPageList)); - /* Unlink it and put it back in free list */ + /* Unlink it and temporarily mark it as active */ MiUnlinkPageFromList(Pfn1); + Pfn1->u3.e2.ReferenceCount++; Pfn1->u3.e1.PageLocation = ActiveAndValid; - /* Bring it back into the free list */ - MiInsertPageInFreeList(PageFrameIndex); + /* This will put it back in free list and clean properly up */ + MI_SET_PFN_DELETED(Pfn1); + MiDecrementReferenceCount(Pfn1, PageFrameIndex); } return; } @@ -470,6 +474,11 @@ MiDeletePte(IN PMMPTE PointerPte, #if (_MI_PAGING_LEVELS == 2) } #endif + /* Drop the share count on the page table */ + PointerPde = MiPteToPde(PointerPte); + MiDecrementShareCount(MiGetPfnEntry(PointerPde->u.Hard.PageFrameNumber), + PointerPde->u.Hard.PageFrameNumber); + /* Drop the share count */ MiDecrementShareCount(Pfn1, PageFrameIndex); diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index 7875c7a51cd..fc7c343b7f9 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -928,7 +928,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; IsDirectMapped = TRUE; #ifndef NEWCC - Status = CcRosUnmapVacb(SharedCacheMap, FileOffset.LowPart, Dirty); + Status = CcRosUnmapVacb(SharedCacheMap, FileOffset.QuadPart, Dirty); #else Status = STATUS_SUCCESS; #endif @@ -1017,7 +1017,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, } BOOLEAN MiIsPageFromCache(PMEMORY_AREA MemoryArea, - ULONG SegOffset) + LONGLONG SegOffset) { #ifndef NEWCC if (!(MemoryArea->Data.SectionData.Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED)) @@ -1025,7 +1025,7 @@ BOOLEAN MiIsPageFromCache(PMEMORY_AREA MemoryArea, PROS_SHARED_CACHE_MAP SharedCacheMap; PROS_VACB Vacb; SharedCacheMap = MemoryArea->Data.SectionData.Section->FileObject->SectionObjectPointer->SharedCacheMap; - Vacb = CcRosLookupVacb(SharedCacheMap, (ULONG)(SegOffset + MemoryArea->Data.SectionData.Segment->Image.FileOffset)); + Vacb = CcRosLookupVacb(SharedCacheMap, SegOffset + MemoryArea->Data.SectionData.Segment->Image.FileOffset); if (Vacb) { CcRosReleaseVacb(SharedCacheMap, Vacb, Vacb->Valid, FALSE, TRUE); @@ -1063,7 +1063,7 @@ MiCopyFromUserPage(PFN_NUMBER DestPage, PFN_NUMBER SrcPage) NTSTATUS NTAPI MiReadPage(PMEMORY_AREA MemoryArea, - ULONG_PTR SegOffset, + LONGLONG SegOffset, PPFN_NUMBER Page) /* * FUNCTION: Read a page for a section backed memory area. @@ -1073,21 +1073,21 @@ MiReadPage(PMEMORY_AREA MemoryArea, * Page - Variable that receives a page contains the read data. */ { - ULONGLONG BaseOffset; - ULONGLONG FileOffset; + LONGLONG BaseOffset; + LONGLONG FileOffset; PVOID BaseAddress; BOOLEAN UptoDate; PROS_VACB Vacb; PFILE_OBJECT FileObject; NTSTATUS Status; - ULONG_PTR RawLength; + LONGLONG RawLength; PROS_SHARED_CACHE_MAP SharedCacheMap; BOOLEAN IsImageSection; - ULONG_PTR Length; + LONGLONG Length; FileObject = MemoryArea->Data.SectionData.Section->FileObject; SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; - RawLength = (ULONG_PTR)(MemoryArea->Data.SectionData.Segment->RawLength.QuadPart); + RawLength = MemoryArea->Data.SectionData.Segment->RawLength.QuadPart; FileOffset = SegOffset + MemoryArea->Data.SectionData.Segment->Image.FileOffset; IsImageSection = MemoryArea->Data.SectionData.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE; @@ -1111,7 +1111,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, * alignment less than the file system block size. */ Status = CcRosGetVacb(SharedCacheMap, - (ULONG)FileOffset, + FileOffset, &BaseOffset, &BaseAddress, &UptoDate, @@ -1150,7 +1150,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, PEPROCESS Process; KIRQL Irql; PVOID PageAddr; - ULONG_PTR VacbOffset; + LONGLONG VacbOffset; /* * Allocate a page, this is rather complicated by the possibility @@ -1164,7 +1164,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, return(Status); } Status = CcRosGetVacb(SharedCacheMap, - (ULONG)FileOffset, + FileOffset, &BaseOffset, &BaseAddress, &UptoDate, @@ -1189,7 +1189,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, Process = PsGetCurrentProcess(); PageAddr = MiMapPageInHyperSpace(Process, *Page, &Irql); - VacbOffset = (ULONG_PTR)(BaseOffset + VACB_MAPPING_GRANULARITY - FileOffset); + VacbOffset = BaseOffset + VACB_MAPPING_GRANULARITY - FileOffset; Length = RawLength - SegOffset; if (Length <= VacbOffset && Length <= PAGE_SIZE) { @@ -1205,7 +1205,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, MiUnmapPageInHyperSpace(Process, PageAddr, Irql); CcRosReleaseVacb(SharedCacheMap, Vacb, TRUE, FALSE, FALSE); Status = CcRosGetVacb(SharedCacheMap, - (ULONG)(FileOffset + VacbOffset), + FileOffset + VacbOffset, &BaseOffset, &BaseAddress, &UptoDate, @@ -1246,7 +1246,7 @@ MiReadPage(PMEMORY_AREA MemoryArea, NTSTATUS NTAPI MiReadPage(PMEMORY_AREA MemoryArea, - ULONG_PTR SegOffset, + LONGLONG SegOffset, PPFN_NUMBER Page) /* * FUNCTION: Read a page for a section backed memory area. @@ -1514,7 +1514,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace, } else { - Status = MiReadPage(MemoryArea, (ULONG_PTR)Offset.QuadPart, &Page); + Status = MiReadPage(MemoryArea, Offset.QuadPart, &Page); if (!NT_SUCCESS(Status)) { DPRINT1("MiReadPage failed (Status %x)\n", Status); @@ -1981,7 +1981,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace, */ if (DirectMapped && !Context.Private) { - if(!MiIsPageFromCache(MemoryArea, Context.Offset.LowPart)) + if(!MiIsPageFromCache(MemoryArea, Context.Offset.QuadPart)) { DPRINT1("Direct mapped non private page is not associated with the cache.\n"); KeBugCheck(MEMORY_MANAGEMENT); @@ -2073,7 +2073,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace, KeBugCheckEx(MEMORY_MANAGEMENT, STATUS_UNSUCCESSFUL, SwapEntry, (ULONG_PTR)Process, (ULONG_PTR)Address); } #ifndef NEWCC - Status = CcRosUnmapVacb(SharedCacheMap, (ULONG)FileOffset, FALSE); + Status = CcRosUnmapVacb(SharedCacheMap, FileOffset, FALSE); #else Status = STATUS_SUCCESS; #endif @@ -2373,7 +2373,7 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace, ASSERT(SwapEntry == 0); //SOffset.QuadPart = Offset.QuadPart + Segment->Image.FileOffset; #ifndef NEWCC - CcRosMarkDirtyVacb(SharedCacheMap, Offset.LowPart); + CcRosMarkDirtyVacb(SharedCacheMap, Offset.QuadPart); #endif MmLockSectionSegment(Segment); MmSetPageEntrySectionSegment(Segment, &Offset, PageEntry); @@ -4027,7 +4027,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, FileObject = MemoryArea->Data.SectionData.Section->FileObject; SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; #ifndef NEWCC - CcRosMarkDirtyVacb(SharedCacheMap, (ULONG)(Offset.QuadPart + Segment->Image.FileOffset)); + CcRosMarkDirtyVacb(SharedCacheMap, Offset.QuadPart + Segment->Image.FileOffset); #endif ASSERT(SwapEntry == 0); } diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index e42a2d96745..56585b73040 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -422,3 +422,12 @@ else() # _WINKD_ endif() endif() + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + #FIXME: http://llvm.org/bugs/show_bug.cgi?id=19027 + set_property(SOURCE + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/cpu.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/kiinit.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/traphdlr.c + APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") +endif() diff --git a/ntoskrnl/ob/obhandle.c b/ntoskrnl/ob/obhandle.c index a2b2f9cebb8..e374e8d7bea 100644 --- a/ntoskrnl/ob/obhandle.c +++ b/ntoskrnl/ob/obhandle.c @@ -2567,7 +2567,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, AccessMode, NULL, Handle); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status2)) { ObDereferenceObject(Object); Status = Status2; diff --git a/ntoskrnl/po/power.c b/ntoskrnl/po/power.c index 771ad0063dc..cb7d2ccf8f9 100644 --- a/ntoskrnl/po/power.c +++ b/ntoskrnl/po/power.c @@ -830,7 +830,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction, { /* Not granted */ DPRINT1("ERROR: Privilege not held for shutdown\n"); - //return STATUS_PRIVILEGE_NOT_HELD; HACK! + return STATUS_PRIVILEGE_NOT_HELD; } /* Do it as a kernel-mode caller for consistency with system state */ diff --git a/ntoskrnl/vf/driver.c b/ntoskrnl/vf/driver.c index cf7b61e074d..37ba2ecbf99 100644 --- a/ntoskrnl/vf/driver.c +++ b/ntoskrnl/vf/driver.c @@ -30,7 +30,6 @@ VfIsVerificationEnabled(IN VF_OBJECT_TYPE VfObjectType, * @unimplemented */ VOID -NTAPI VfFailDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject, IN ULONG BugCheckMajorCode, IN ULONG BugCheckMinorCode, @@ -47,7 +46,6 @@ VfFailDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject, * @unimplemented */ VOID -NTAPI VfFailSystemBIOS(IN ULONG BugCheckMajorCode, IN ULONG BugCheckMinorCode, IN VF_FAILURE_CLASS FailureClass, diff --git a/toolchain-clang.cmake b/toolchain-clang.cmake index 930dafcacfa..5bc72d90efb 100644 --- a/toolchain-clang.cmake +++ b/toolchain-clang.cmake @@ -40,18 +40,18 @@ set(CMAKE_SYSTEM_PROCESSOR i686) # Which tools to use set(CMAKE_C_COMPILER clang) -set(CMAKE_CXX_COMPILER clang++) +set(CMAKE_CXX_COMPILER ${MINGW_TOOLCHAIN_PREFIX}g++${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_ASM_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_ASM_COMPILER_ID "GNU") set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc) set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres) set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool) -if(NOT LTCG) - set(CMAKE_C_CREATE_STATIC_LIBRARY " crT ") -else() - set(CMAKE_C_CREATE_STATIC_LIBRARY " cr ") +if(CMAKE_HOST_WIN32) + set(CMAKE_AR ar) endif() + +set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crT ") set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) diff --git a/win32ss/drivers/videoprt/dispatch.c b/win32ss/drivers/videoprt/dispatch.c index e334f5d5e7a..bf8fb56b278 100644 --- a/win32ss/drivers/videoprt/dispatch.c +++ b/win32ss/drivers/videoprt/dispatch.c @@ -295,7 +295,7 @@ IoctlName(ULONG Ioctl) static NTSTATUS -VideoPortUseDeviceInSesion( +VideoPortUseDeviceInSession( _Inout_ PDEVICE_OBJECT DeviceObject, _Inout_ PVIDEO_DEVICE_SESSION_STATUS SessionState, _In_ ULONG BufferLength, @@ -475,10 +475,10 @@ IntVideoPortDispatchDeviceControl( case IOCTL_VIDEO_USE_DEVICE_IN_SESSION: INFO_(VIDEOPRT, "- IOCTL_VIDEO_USE_DEVICE_IN_SESSION\n"); - Status = VideoPortUseDeviceInSesion(DeviceObject, - Irp->AssociatedIrp.SystemBuffer, - IrpStack->Parameters.DeviceIoControl.InputBufferLength, - &Irp->IoStatus.Information); + Status = VideoPortUseDeviceInSession(DeviceObject, + Irp->AssociatedIrp.SystemBuffer, + IrpStack->Parameters.DeviceIoControl.InputBufferLength, + &Irp->IoStatus.Information); break; default: diff --git a/win32ss/gdi/eng/clip.c b/win32ss/gdi/eng/clip.c index 61ffb0d34ad..af6de38695c 100644 --- a/win32ss/gdi/eng/clip.c +++ b/win32ss/gdi/eng/clip.c @@ -153,40 +153,6 @@ CompareLeftUp( return Cmp; } -static __inline int -CompareSpans( - const SPAN *Span1, - const SPAN *Span2) -{ - int Cmp; - - if (Span1->Y < Span2->Y) - { - Cmp = -1; - } - else if (Span2->Y < Span1->Y) - { - Cmp = +1; - } - else - { - if (Span1->X < Span2->X) - { - Cmp = -1; - } - else if (Span2->X < Span1->X) - { - Cmp = +1; - } - else - { - Cmp = 0; - } - } - - return Cmp; -} - VOID FASTCALL IntEngInitClipObj(XCLIPOBJ *Clip) diff --git a/win32ss/gdi/gdi32/include/gdi32p.h b/win32ss/gdi/gdi32/include/gdi32p.h index 590872a323f..8dc34994166 100644 --- a/win32ss/gdi/gdi32/include/gdi32p.h +++ b/win32ss/gdi/gdi32/include/gdi32p.h @@ -323,7 +323,7 @@ GdiAllocBatchCommand( else if (Cmd == GdiBCPolyPatBlt) cjSize = 0; else if (Cmd == GdiBCTextOut) cjSize = 0; else if (Cmd == GdiBCExtTextOut) cjSize = 0; - else if (Cmd == GdiBCSetBrushOrg) cjSize = 0; + else if (Cmd == GdiBCSetBrushOrg) cjSize = sizeof(GDIBSSETBRHORG); else if (Cmd == GdiBCExtSelClipRgn) cjSize = 0; else if (Cmd == GdiBCSelObj) cjSize = sizeof(GDIBSOBJECT); else if (Cmd == GdiBCDelRgn) cjSize = sizeof(GDIBSOBJECT); diff --git a/win32ss/gdi/gdi32/objects/brush.c b/win32ss/gdi/gdi32/objects/brush.c index 4ef0b79e53a..6a686402c1a 100644 --- a/win32ss/gdi/gdi32/objects/brush.c +++ b/win32ss/gdi/gdi32/objects/brush.c @@ -393,44 +393,37 @@ SetBrushOrgEx(HDC hdc, return FALSE; } #endif - if (GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) + if (GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID)&Dc_Attr)) { - PTEB pTeb = NtCurrentTeb(); + PGDIBSSETBRHORG pgSBO; + + /* Does the caller want the current brush origin to be returned? */ if (lppt) { lppt->x = Dc_Attr->ptlBrushOrigin.x; lppt->y = Dc_Attr->ptlBrushOrigin.y; } - if ((nXOrg == Dc_Attr->ptlBrushOrigin.x) && (nYOrg == Dc_Attr->ptlBrushOrigin.y)) + + /* Check if we have nothing to do */ + if ((nXOrg == Dc_Attr->ptlBrushOrigin.x) && + (nYOrg == Dc_Attr->ptlBrushOrigin.y)) return TRUE; - if(((pTeb->GdiTebBatch.HDC == NULL) || (pTeb->GdiTebBatch.HDC == hdc)) && - ((pTeb->GdiTebBatch.Offset + sizeof(GDIBSSETBRHORG)) <= GDIBATCHBUFSIZE) && - (!(Dc_Attr->ulDirty_ & DC_DIBSECTION)) ) + /* Allocate a batch command buffer */ + pgSBO = GdiAllocBatchCommand(hdc, GdiBCSetBrushOrg); + if (pgSBO != NULL) { - PGDIBSSETBRHORG pgSBO = (PGDIBSSETBRHORG)(&pTeb->GdiTebBatch.Buffer[0] + - pTeb->GdiTebBatch.Offset); - + /* Set current brush origin in the DC attribute */ Dc_Attr->ptlBrushOrigin.x = nXOrg; Dc_Attr->ptlBrushOrigin.y = nYOrg; - pgSBO->gbHdr.Cmd = GdiBCSetBrushOrg; - pgSBO->gbHdr.Size = sizeof(GDIBSSETBRHORG); + /* Setup the GDI batch command */ pgSBO->ptlBrushOrigin = Dc_Attr->ptlBrushOrigin; - pTeb->GdiTebBatch.Offset += sizeof(GDIBSSETBRHORG); - pTeb->GdiTebBatch.HDC = hdc; - pTeb->GdiBatchCount++; - DPRINT("Loading the Flush!! COUNT-> %lu\n", pTeb->GdiBatchCount); - - if (pTeb->GdiBatchCount >= GDI_BatchLimit) - { - DPRINT("Call GdiFlush!!\n"); - NtGdiFlush(); - DPRINT("Exit GdiFlush!!\n"); - } return TRUE; } } - return NtGdiSetBrushOrg(hdc,nXOrg,nYOrg,lppt); + + /* Fall back to the slower kernel path */ + return NtGdiSetBrushOrg(hdc, nXOrg, nYOrg, lppt); } diff --git a/win32ss/gdi/gdi32/objects/region.c b/win32ss/gdi/gdi32/objects/region.c index 8724799020c..d50c8bf69df 100644 --- a/win32ss/gdi/gdi32/objects/region.c +++ b/win32ss/gdi/gdi32/objects/region.c @@ -646,6 +646,7 @@ ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode) { if ((pTeb->GdiTebBatch.Offset + sizeof(GDIBSEXTSELCLPRGN)) <= GDIBATCHBUFSIZE) { + // FIXME: This is broken, use GdiAllocBatchCommand! PGDIBSEXTSELCLPRGN pgO = (PGDIBSEXTSELCLPRGN)(&pTeb->GdiTebBatch.Buffer[0] + pTeb->GdiTebBatch.Offset); pgO->gbHdr.Cmd = GdiBCExtSelClipRgn; diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 17d7bcf5f20..3d40e57c5dc 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -1601,7 +1601,7 @@ ftGdiGetGlyphOutline( } FT_Set_Pixel_Sizes(ft_face, - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, + abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth), /* FIXME: Should set character height if neg */ (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); diff --git a/win32ss/user/ntuser/timer.c b/win32ss/user/ntuser/timer.c index 54e1a4cc5b8..3cbf14e576e 100644 --- a/win32ss/user/ntuser/timer.c +++ b/win32ss/user/ntuser/timer.c @@ -512,7 +512,7 @@ DestroyTimersForWindow(PTHREADINFO pti, PWND Window) PTIMER pTmr; BOOL TimersRemoved = FALSE; - if ((Window == NULL)) + if (Window == NULL) return FALSE; TimerEnterExclusive(); diff --git a/win32ss/user/ntuser/windc.c b/win32ss/user/ntuser/windc.c index 0e712672731..425b971b631 100644 --- a/win32ss/user/ntuser/windc.c +++ b/win32ss/user/ntuser/windc.c @@ -215,7 +215,7 @@ DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags) PWND Parent; Parent = Window->spwndParent; - if(!Parent) + if (!Parent) { RgnVisible = NULL; goto noparent; @@ -252,15 +252,19 @@ DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags) noparent: if (Flags & DCX_INTERSECTRGN) { - if(Dce->hrgnClip != NULL) + PREGION RgnClip = NULL; + + if (Dce->hrgnClip != NULL) + RgnClip = REGION_LockRgn(Dce->hrgnClip); + + if (RgnClip) { - PREGION RgnClip = REGION_LockRgn(Dce->hrgnClip); IntGdiCombineRgn(RgnVisible, RgnVisible, RgnClip, RGN_AND); REGION_UnlockRgn(RgnClip); } else { - if(RgnVisible != NULL) + if (RgnVisible != NULL) { REGION_Delete(RgnVisible); } diff --git a/win32ss/user/user32/windows/menu.c b/win32ss/user/user32/windows/menu.c index a717acbe2c0..db49b6b43b1 100644 --- a/win32ss/user/user32/windows/menu.c +++ b/win32ss/user/user32/windows/menu.c @@ -4586,11 +4586,10 @@ CheckMenuItem(HMENU hmenu, UINT uIDCheckItem, UINT uCheck) { - PMENU pMenu; PITEM item; DWORD Ret; - if (!(pMenu = ValidateHandle(hmenu, TYPE_MENU))) + if (!ValidateHandle(hmenu, TYPE_MENU)) return -1; if (!(item = MENU_FindItem( &hmenu, &uIDCheckItem, uCheck ))) return -1; diff --git a/win32ss/user/user32/windows/spy.c b/win32ss/user/user32/windows/spy.c index af24e2c4e5b..78821813b5d 100644 --- a/win32ss/user/user32/windows/spy.c +++ b/win32ss/user/user32/windows/spy.c @@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(message); #define SPY_MAX_MSGNUM WM_USER #define SPY_INDENT_UNIT 4 /* 4 spaces */ +#undef ARRAYSIZE #define ARRAYSIZE(a) ((sizeof(a) / sizeof((a)[0]))) #define DEBUG_SPY 0 @@ -2095,7 +2096,7 @@ const char *SPY_GetClassLongOffsetName( INT offset ) { INT index; if (offset < 0 && offset % 2 == 0 && ((index = -(offset + 8) / 2) < - sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames))) + sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames))) { return ClassLongOffsetNames[index]; } @@ -2680,4 +2681,4 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, break; } SetLastError( save_error ); -} \ No newline at end of file +} diff --git a/win32ss/user/winsrv/consrv.cmake b/win32ss/user/winsrv/consrv.cmake index 63b6f574d7b..a60a546d356 100644 --- a/win32ss/user/winsrv/consrv.cmake +++ b/win32ss/user/winsrv/consrv.cmake @@ -11,8 +11,10 @@ list(APPEND CONSRV_SOURCE consrv/console.c consrv/frontendctl.c consrv/handle.c + consrv/history.c consrv/init.c consrv/lineinput.c + consrv/popup.c consrv/settings.c consrv/subsysreg.c consrv/condrv/coninput.c diff --git a/win32ss/user/winsrv/consrv/alias.c b/win32ss/user/winsrv/consrv/alias.c index a288f976b91..a3a39cae48c 100644 --- a/win32ss/user/winsrv/consrv/alias.c +++ b/win32ss/user/winsrv/consrv/alias.c @@ -18,23 +18,23 @@ typedef struct _ALIAS_ENTRY { + struct _ALIAS_ENTRY* Next; UNICODE_STRING Source; UNICODE_STRING Target; - struct _ALIAS_ENTRY* Next; } ALIAS_ENTRY, *PALIAS_ENTRY; typedef struct _ALIAS_HEADER { + struct _ALIAS_HEADER* Next; UNICODE_STRING ExeName; PALIAS_ENTRY Data; - struct _ALIAS_HEADER* Next; } ALIAS_HEADER, *PALIAS_HEADER; BOOLEAN -ConvertInputAnsiToUnicode(PCONSOLE Console, +ConvertInputAnsiToUnicode(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, // BOOLEAN IsUnicode, @@ -61,7 +61,7 @@ ConvertInputAnsiToUnicode(PCONSOLE Console, } BOOLEAN -ConvertInputUnicodeToAnsi(PCONSOLE Console, +ConvertInputUnicodeToAnsi(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, // BOOLEAN IsAnsi, @@ -474,7 +474,8 @@ CSR_API(SrvAddConsoleAlias) lpTarget = (ConsoleAliasRequest->TargetLength != 0 ? ConsoleAliasRequest->Target : NULL); - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Status = STATUS_SUCCESS; @@ -570,7 +571,8 @@ CSR_API(SrvGetConsoleAlias) return STATUS_INVALID_PARAMETER; } - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Header = IntFindAliasHeader(Console, @@ -647,7 +649,8 @@ CSR_API(SrvGetConsoleAliases) return STATUS_INVALID_PARAMETER; } - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Header = IntFindAliasHeader(Console, @@ -747,7 +750,8 @@ CSR_API(SrvGetConsoleAliasesLength) return STATUS_INVALID_PARAMETER; } - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Header = IntFindAliasHeader(Console, @@ -787,7 +791,8 @@ CSR_API(SrvGetConsoleAliasExes) return STATUS_INVALID_PARAMETER; } - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; if (IntGetConsoleAliasesExesLength(Console->Aliases, GetAliasesExesRequest->Unicode) > GetAliasesExesRequest->Length) @@ -864,7 +869,8 @@ CSR_API(SrvGetConsoleAliasExesLength) DPRINT1("SrvGetConsoleAliasExesLength entered ApiMessage %p\n", ApiMessage); - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; GetAliasesExesLengthRequest->Length = diff --git a/win32ss/user/winsrv/consrv/condrv/coninput.c b/win32ss/user/winsrv/consrv/condrv/coninput.c index 4c883eec8e6..800abb4052a 100644 --- a/win32ss/user/winsrv/consrv/condrv/coninput.c +++ b/win32ss/user/winsrv/consrv/condrv/coninput.c @@ -16,20 +16,6 @@ /* GLOBALS ********************************************************************/ -/* - * From MSDN: - * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. - * If they are the same, the function fails, and GetLastError returns - * ERROR_INVALID_PARAMETER." - */ -#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \ - ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ - WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) - -#define ConsoleInputAnsiCharToUnicodeChar(Console, dWChar, sChar) \ - ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ - MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1) - typedef struct ConsoleInput_t { LIST_ENTRY ListEntry; @@ -39,39 +25,13 @@ typedef struct ConsoleInput_t /* PRIVATE FUNCTIONS **********************************************************/ -static VOID -ConioInputEventToAnsi(PCONSOLE Console, PINPUT_RECORD InputEvent) -{ - if (InputEvent->EventType == KEY_EVENT) - { - WCHAR UnicodeChar = InputEvent->Event.KeyEvent.uChar.UnicodeChar; - InputEvent->Event.KeyEvent.uChar.UnicodeChar = 0; - ConsoleInputUnicodeCharToAnsiChar(Console, - &InputEvent->Event.KeyEvent.uChar.AsciiChar, - &UnicodeChar); - } -} - -static VOID -ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent) -{ - if (InputEvent->EventType == KEY_EVENT) - { - CHAR AsciiChar = InputEvent->Event.KeyEvent.uChar.AsciiChar; - InputEvent->Event.KeyEvent.uChar.AsciiChar = 0; - ConsoleInputAnsiCharToUnicodeChar(Console, - &InputEvent->Event.KeyEvent.uChar.UnicodeChar, - &AsciiChar); - } -} - - -NTSTATUS -ConDrvAddInputEvents(PCONSOLE Console, - PINPUT_RECORD InputRecords, // InputEvent - ULONG NumEventsToWrite, - PULONG NumEventsWritten, - BOOLEAN AppendToEnd) +// ConDrvAddInputEvents +static NTSTATUS +AddInputEvents(PCONSOLE Console, + PINPUT_RECORD InputRecords, // InputEvent + ULONG NumEventsToWrite, + PULONG NumEventsWritten, + BOOLEAN AppendToEnd) { NTSTATUS Status = STATUS_SUCCESS; ULONG i = 0; @@ -218,61 +178,7 @@ Done: return Status; } - -ULONG -PreprocessInput(PCONSOLE Console, - PINPUT_RECORD InputEvent, - ULONG NumEventsToWrite); -VOID -PostprocessInput(PCONSOLE Console); - -NTSTATUS -ConioAddInputEvents(PCONSOLE Console, - PINPUT_RECORD InputRecords, // InputEvent - ULONG NumEventsToWrite, - PULONG NumEventsWritten, - BOOLEAN AppendToEnd) -{ - NTSTATUS Status = STATUS_SUCCESS; - - if (NumEventsWritten) *NumEventsWritten = 0; - - /* - * This pre-processing code MUST be IN consrv ONLY!! - */ - NumEventsToWrite = PreprocessInput(Console, InputRecords, NumEventsToWrite); - if (NumEventsToWrite == 0) return STATUS_SUCCESS; - - Status = ConDrvAddInputEvents(Console, - InputRecords, - NumEventsToWrite, - NumEventsWritten, - AppendToEnd); - - /* - * This post-processing code MUST be IN consrv ONLY!! - */ - // if (NT_SUCCESS(Status)) - if (Status == STATUS_SUCCESS) PostprocessInput(Console); - - return Status; -} - -/* Move elsewhere...*/ -NTSTATUS -ConioProcessInputEvent(PCONSOLE Console, - PINPUT_RECORD InputEvent) -{ - ULONG NumEventsWritten; - return ConioAddInputEvents(Console, - InputEvent, - 1, - &NumEventsWritten, - TRUE); -} - - -VOID +static VOID PurgeInputBuffer(PCONSOLE Console) { PLIST_ENTRY CurrentEntry; @@ -285,6 +191,36 @@ PurgeInputBuffer(PCONSOLE Console) ConsoleFreeHeap(Event); } + // CloseHandle(Console->InputBuffer.ActiveEvent); +} + +NTSTATUS NTAPI +ConDrvInitInputBuffer(IN PCONSOLE Console, + IN ULONG InputBufferSize) +{ + SECURITY_ATTRIBUTES SecurityAttributes; + + ConSrvInitObject(&Console->InputBuffer.Header, INPUT_BUFFER, Console); + + SecurityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + SecurityAttributes.lpSecurityDescriptor = NULL; + SecurityAttributes.bInheritHandle = TRUE; + + Console->InputBuffer.ActiveEvent = CreateEventW(&SecurityAttributes, TRUE, FALSE, NULL); + if (Console->InputBuffer.ActiveEvent == NULL) return STATUS_UNSUCCESSFUL; + + Console->InputBuffer.InputBufferSize = InputBufferSize; + InitializeListHead(&Console->InputBuffer.InputEvents); + Console->InputBuffer.Mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | + ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT; + + return STATUS_SUCCESS; +} + +VOID NTAPI +ConDrvDeinitInputBuffer(IN PCONSOLE Console) +{ + PurgeInputBuffer(Console); CloseHandle(Console->InputBuffer.ActiveEvent); } @@ -302,10 +238,7 @@ ConDrvReadConsole(IN PCONSOLE Console, OUT PULONG NumCharsRead OPTIONAL) { // STATUS_PENDING : Wait if more to read ; STATUS_SUCCESS : Don't wait. - NTSTATUS Status = STATUS_PENDING; - PLIST_ENTRY CurrentEntry; - ConsoleInput *Input; - ULONG i; + // NTSTATUS Status; = STATUS_PENDING; if (Console == NULL || InputBuffer == NULL || /* Buffer == NULL || */ ReadControl == NULL || ReadControl->nLength != sizeof(CONSOLE_READCONSOLE_CONTROL)) @@ -317,128 +250,14 @@ ConDrvReadConsole(IN PCONSOLE Console, ASSERT(Console == InputBuffer->Header.Console); ASSERT((Buffer != NULL) || (Buffer == NULL && NumCharsToRead == 0)); - /* We haven't read anything (yet) */ - - i = ReadControl->nInitialChars; - - if (InputBuffer->Mode & ENABLE_LINE_INPUT) - { - if (Console->LineBuffer == NULL) - { - /* Starting a new line */ - Console->LineMaxSize = max(256, NumCharsToRead); - - Console->LineBuffer = ConsoleAllocHeap(0, Console->LineMaxSize * sizeof(WCHAR)); - if (Console->LineBuffer == NULL) return STATUS_NO_MEMORY; - - Console->LinePos = Console->LineSize = ReadControl->nInitialChars; - Console->LineComplete = Console->LineUpPressed = FALSE; - Console->LineInsertToggle = Console->InsertMode; - Console->LineWakeupMask = ReadControl->dwCtrlWakeupMask; - - /* - * Pre-filling the buffer is only allowed in the Unicode API, - * so we don't need to worry about ANSI <-> Unicode conversion. - */ - memcpy(Console->LineBuffer, Buffer, Console->LineSize * sizeof(WCHAR)); - if (Console->LineSize == Console->LineMaxSize) - { - Console->LineComplete = TRUE; - Console->LinePos = 0; - } - } - - /* If we don't have a complete line yet, process the pending input */ - while (!Console->LineComplete && !IsListEmpty(&InputBuffer->InputEvents)) - { - /* Remove input event from queue */ - CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); - if (IsListEmpty(&InputBuffer->InputEvents)) - { - ResetEvent(InputBuffer->ActiveEvent); - } - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - - /* Only pay attention to key down */ - if (Input->InputEvent.EventType == KEY_EVENT && - Input->InputEvent.Event.KeyEvent.bKeyDown) - { - LineInputKeyDown(Console, ExeName, - &Input->InputEvent.Event.KeyEvent); - ReadControl->dwControlKeyState = Input->InputEvent.Event.KeyEvent.dwControlKeyState; - } - ConsoleFreeHeap(Input); - } - - /* Check if we have a complete line to read from */ - if (Console->LineComplete) - { - while (i < NumCharsToRead && Console->LinePos != Console->LineSize) - { - WCHAR Char = Console->LineBuffer[Console->LinePos++]; - - if (Unicode) - { - ((PWCHAR)Buffer)[i] = Char; - } - else - { - ConsoleInputUnicodeCharToAnsiChar(Console, &((PCHAR)Buffer)[i], &Char); - } - ++i; - } - - if (Console->LinePos == Console->LineSize) - { - /* Entire line has been read */ - ConsoleFreeHeap(Console->LineBuffer); - Console->LineBuffer = NULL; - } - - Status = STATUS_SUCCESS; - } - } - else - { - /* Character input */ - while (i < NumCharsToRead && !IsListEmpty(&InputBuffer->InputEvents)) - { - /* Remove input event from queue */ - CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); - if (IsListEmpty(&InputBuffer->InputEvents)) - { - ResetEvent(InputBuffer->ActiveEvent); - } - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - - /* Only pay attention to valid ASCII chars, on key down */ - if (Input->InputEvent.EventType == KEY_EVENT && - Input->InputEvent.Event.KeyEvent.bKeyDown && - Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar != L'\0') - { - WCHAR Char = Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar; - - if (Unicode) - { - ((PWCHAR)Buffer)[i] = Char; - } - else - { - ConsoleInputUnicodeCharToAnsiChar(Console, &((PCHAR)Buffer)[i], &Char); - } - ++i; - - /* Did read something */ - Status = STATUS_SUCCESS; - } - ConsoleFreeHeap(Input); - } - } - - // FIXME: Only set if Status == STATUS_SUCCESS ??? - if (NumCharsRead) *NumCharsRead = i; - - return Status; + /* Call the line-discipline */ + return TermReadStream(Console, + ExeName, + Unicode, + Buffer, + ReadControl, + NumCharsToRead, + NumCharsRead); } NTSTATUS NTAPI @@ -446,7 +265,6 @@ ConDrvGetConsoleInput(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, IN BOOLEAN KeepEvents, IN BOOLEAN WaitForMoreEvents, - IN BOOLEAN Unicode, OUT PINPUT_RECORD InputRecord, IN ULONG NumEventsToRead, OUT PULONG NumEventsRead OPTIONAL) @@ -496,20 +314,13 @@ ConDrvGetConsoleInput(IN PCONSOLE Console, if (NumEventsRead) *NumEventsRead = i; - /* Now translate everything to ANSI */ - if (!Unicode) - { - for (; i > 0; --i) - { - ConioInputEventToAnsi(InputBuffer->Header.Console, --InputRecord); - } - } - if (IsListEmpty(&InputBuffer->InputEvents)) { ResetEvent(InputBuffer->ActiveEvent); } + // FIXME: If we add back UNICODE support, it's here that we need to do the translation. + /* We read all the inputs available, we return success */ return STATUS_SUCCESS; } @@ -517,15 +328,11 @@ ConDrvGetConsoleInput(IN PCONSOLE Console, NTSTATUS NTAPI ConDrvWriteConsoleInput(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, - IN BOOLEAN Unicode, IN BOOLEAN AppendToEnd, IN PINPUT_RECORD InputRecord, IN ULONG NumEventsToWrite, OUT PULONG NumEventsWritten OPTIONAL) { - NTSTATUS Status = STATUS_SUCCESS; - ULONG i; - if (Console == NULL || InputBuffer == NULL /* || InputRecord == NULL */) return STATUS_INVALID_PARAMETER; @@ -533,26 +340,16 @@ ConDrvWriteConsoleInput(IN PCONSOLE Console, ASSERT(Console == InputBuffer->Header.Console); ASSERT((InputRecord != NULL) || (InputRecord == NULL && NumEventsToWrite == 0)); - /* First translate everything to UNICODE */ - if (!Unicode) - { - for (i = 0; i < NumEventsToWrite; ++i) - { - ConioInputEventToUnicode(Console, &InputRecord[i]); - } - } - /* Now, add the events */ - // if (NumEventsWritten) *NumEventsWritten = 0; - // ConDrvAddInputEvents - Status = ConioAddInputEvents(Console, - InputRecord, - NumEventsToWrite, - NumEventsWritten, - AppendToEnd); - // if (NumEventsWritten) *NumEventsWritten = i; + if (NumEventsWritten) *NumEventsWritten = 0; - return Status; + // FIXME: If we add back UNICODE support, it's here that we need to do the translation. + + return AddInputEvents(Console, + InputRecord, + NumEventsToWrite, + NumEventsWritten, + AppendToEnd); } NTSTATUS NTAPI diff --git a/win32ss/user/winsrv/consrv/condrv/conoutput.c b/win32ss/user/winsrv/consrv/condrv/conoutput.c index 4fe657454f4..b6ce1bcb4bd 100644 --- a/win32ss/user/winsrv/consrv/condrv/conoutput.c +++ b/win32ss/user/winsrv/consrv/condrv/conoutput.c @@ -115,7 +115,7 @@ static VOID ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer); VOID NTAPI -ConioDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer) +ConDrvDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer) { PCONSOLE Console = Buffer->Header.Console; PCONSOLE_SCREEN_BUFFER NewBuffer; @@ -190,7 +190,7 @@ ConDrvSetConsoleActiveScreenBuffer(IN PCONSOLE Console, /* If old buffer has no handles, it's now unreferenced */ if (Console->ActiveBuffer->Header.ReferenceCount == 0) { - ConioDeleteScreenBuffer(Console->ActiveBuffer); + ConDrvDeleteScreenBuffer(Console->ActiveBuffer); } /* Tie console to new buffer and signal the change to the frontend */ diff --git a/win32ss/user/winsrv/consrv/condrv/console.c b/win32ss/user/winsrv/consrv/condrv/console.c index 4f60730212b..4075e76f3a2 100644 --- a/win32ss/user/winsrv/consrv/condrv/console.c +++ b/win32ss/user/winsrv/consrv/condrv/console.c @@ -76,35 +76,6 @@ RemoveConsole(IN PCONSOLE Console) /* PRIVATE FUNCTIONS **********************************************************/ -// Adapted from reactos/lib/rtl/unicode.c, RtlCreateUnicodeString line 2180 -static BOOLEAN -ConsoleCreateUnicodeString(IN OUT PUNICODE_STRING UniDest, - IN PCWSTR Source) -{ - SIZE_T Size = (wcslen(Source) + 1) * sizeof(WCHAR); - if (Size > MAXUSHORT) return FALSE; - - UniDest->Buffer = ConsoleAllocHeap(HEAP_ZERO_MEMORY, Size); - if (UniDest->Buffer == NULL) return FALSE; - - RtlCopyMemory(UniDest->Buffer, Source, Size); - UniDest->MaximumLength = (USHORT)Size; - UniDest->Length = (USHORT)Size - sizeof(WCHAR); - - return TRUE; -} - -// Adapted from reactos/lib/rtl/unicode.c, RtlFreeUnicodeString line 431 -static VOID -ConsoleFreeUnicodeString(IN PUNICODE_STRING UnicodeString) -{ - if (UnicodeString->Buffer) - { - ConsoleFreeHeap(UnicodeString->Buffer); - RtlZeroMemory(UnicodeString, sizeof(UNICODE_STRING)); - } -} - VOID NTAPI ConDrvPause(PCONSOLE Console) { @@ -190,14 +161,10 @@ ConDrvInitConsole(OUT PCONSOLE* NewConsole, IN PCONSOLE_INFO ConsoleInfo) { NTSTATUS Status; - SECURITY_ATTRIBUTES SecurityAttributes; // CONSOLE_INFO CapturedConsoleInfo; TEXTMODE_BUFFER_INFO ScreenBufferInfo; PCONSOLE Console; PCONSOLE_SCREEN_BUFFER NewBuffer; -#if 0 - WCHAR DefaultTitle[128]; -#endif if (NewConsole == NULL || ConsoleInfo == NULL) return STATUS_INVALID_PARAMETER; @@ -236,34 +203,16 @@ ConDrvInitConsole(OUT PCONSOLE* NewConsole, Console->ConsoleSize = ConsoleInfo->ConsoleSize; Console->FixedSize = FALSE; // Value by default; is reseted by the terminals if needed. - /* - * Initialize the input buffer - */ - ConSrvInitObject(&Console->InputBuffer.Header, INPUT_BUFFER, Console); - - SecurityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); - SecurityAttributes.lpSecurityDescriptor = NULL; - SecurityAttributes.bInheritHandle = TRUE; - Console->InputBuffer.ActiveEvent = CreateEventW(&SecurityAttributes, TRUE, FALSE, NULL); - if (NULL == Console->InputBuffer.ActiveEvent) + /* Initialize the input buffer */ + Status = ConDrvInitInputBuffer(Console, 0 /* ConsoleInfo->InputBufferSize */); + if (!NT_SUCCESS(Status)) { + DPRINT1("ConDrvInitInputBuffer: failed, Status = 0x%08lx\n", Status); DeleteCriticalSection(&Console->Lock); ConsoleFreeHeap(Console); - return STATUS_UNSUCCESSFUL; + return Status; } - Console->InputBuffer.InputBufferSize = 0; // FIXME! - InitializeListHead(&Console->InputBuffer.InputEvents); - Console->InputBuffer.Mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | - ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT; - - Console->InsertMode = ConsoleInfo->InsertMode; - Console->LineBuffer = NULL; - Console->LinePos = Console->LineMaxSize = Console->LineSize = 0; - Console->LineComplete = Console->LineUpPressed = FALSE; - Console->LineInsertToggle = Console->InsertMode; - // LineWakeupMask - /* Set-up the code page */ Console->InputCodePage = Console->OutputCodePage = ConsoleInfo->CodePage; @@ -282,7 +231,7 @@ ConDrvInitConsole(OUT PCONSOLE* NewConsole, if (!NT_SUCCESS(Status)) { DPRINT1("ConDrvCreateScreenBuffer: failed, Status = 0x%08lx\n", Status); - CloseHandle(Console->InputBuffer.ActiveEvent); + ConDrvDeinitInputBuffer(Console); DeleteCriticalSection(&Console->Lock); ConsoleFreeHeap(Console); return Status; @@ -291,28 +240,6 @@ ConDrvInitConsole(OUT PCONSOLE* NewConsole, Console->ActiveBuffer = NewBuffer; Console->UnpauseEvent = NULL; - /* Initialize the console title */ - ConsoleCreateUnicodeString(&Console->OriginalTitle, ConsoleInfo->ConsoleTitle); -#if 0 - if (ConsoleInfo.ConsoleTitle[0] == L'\0') - { - if (LoadStringW(ConSrvDllInstance, IDS_CONSOLE_TITLE, DefaultTitle, sizeof(DefaultTitle) / sizeof(DefaultTitle[0]))) - { - ConsoleCreateUnicodeString(&Console->Title, DefaultTitle); - } - else - { - ConsoleCreateUnicodeString(&Console->Title, L"ReactOS Console"); - } - } - else - { -#endif - ConsoleCreateUnicodeString(&Console->Title, ConsoleInfo->ConsoleTitle); -#if 0 - } -#endif - DPRINT("Console initialized\n"); /* All went right, so add the console to the list */ @@ -437,10 +364,10 @@ ConDrvDeleteConsole(IN PCONSOLE Console) /* FIXME: Send a terminate message to all the processes owning this console */ - /* Cleanup the UI-oriented part */ - DPRINT("Deregister console\n"); + /* Deregister the terminal */ + DPRINT("Deregister terminal\n"); ConDrvDeregisterTerminal(Console); - DPRINT("Console deregistered\n"); + DPRINT("Terminal deregistered\n"); /*** * Check that the console is in terminating state before continuing @@ -465,24 +392,19 @@ ConDrvDeleteConsole(IN PCONSOLE Console) /* Remove the console from the list */ RemoveConsole(Console); - /* Discard all entries in the input event queue */ - PurgeInputBuffer(Console); - if (Console->LineBuffer) ConsoleFreeHeap(Console->LineBuffer); - /* Delete the last screen buffer */ - ConioDeleteScreenBuffer(Console->ActiveBuffer); + ConDrvDeleteScreenBuffer(Console->ActiveBuffer); Console->ActiveBuffer = NULL; if (!IsListEmpty(&Console->BufferList)) { - DPRINT1("BUG: screen buffer list not empty\n"); - ASSERT(FALSE); + /***ConDrvUnlockConsoleList();***/ + ASSERTMSG("BUGBUGBUG!! screen buffer list not empty\n", FALSE); } - /**/ CloseHandle(Console->InputBuffer.ActiveEvent); /**/ - if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent); + /* Deinitialize the input buffer */ + ConDrvDeinitInputBuffer(Console); - ConsoleFreeUnicodeString(&Console->OriginalTitle); - ConsoleFreeUnicodeString(&Console->Title); + if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent); DPRINT("ConDrvDeleteConsole - Unlocking\n"); LeaveCriticalSection(&Console->Lock); @@ -518,17 +440,7 @@ ConDrvGetConsoleMode(IN PCONSOLE Console, if (INPUT_BUFFER == Object->Type) { PCONSOLE_INPUT_BUFFER InputBuffer = (PCONSOLE_INPUT_BUFFER)Object; - *ConsoleMode = InputBuffer->Mode; - - if (Console->QuickEdit || Console->InsertMode) - { - // Windows does this, even if it's not documented on MSDN - *ConsoleMode |= ENABLE_EXTENDED_FLAGS; - - if (Console->QuickEdit ) *ConsoleMode |= ENABLE_QUICK_EDIT_MODE; - if (Console->InsertMode) *ConsoleMode |= ENABLE_INSERT_MODE; - } } else if (TEXTMODE_BUFFER == Object->Type || GRAPHICS_BUFFER == Object->Type) { @@ -548,8 +460,6 @@ ConDrvSetConsoleMode(IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, IN ULONG ConsoleMode) { -#define CONSOLE_VALID_CONTROL_MODES ( ENABLE_EXTENDED_FLAGS | \ - ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE ) #define CONSOLE_VALID_INPUT_MODES ( ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | \ ENABLE_ECHO_INPUT | ENABLE_WINDOW_INPUT | \ ENABLE_MOUSE_INPUT ) @@ -567,45 +477,21 @@ ConDrvSetConsoleMode(IN PCONSOLE Console, { PCONSOLE_INPUT_BUFFER InputBuffer = (PCONSOLE_INPUT_BUFFER)Object; - DPRINT("SetConsoleMode(Input, %d)\n", ConsoleMode); - - /* - * 1. Only the presence of valid mode flags is allowed. - */ - if (ConsoleMode & ~(CONSOLE_VALID_INPUT_MODES | CONSOLE_VALID_CONTROL_MODES)) + /* Only the presence of valid mode flags is allowed */ + if (ConsoleMode & ~CONSOLE_VALID_INPUT_MODES) { Status = STATUS_INVALID_PARAMETER; - goto Quit; } - - /* - * 2. If we use control mode flags without ENABLE_EXTENDED_FLAGS, - * then consider the flags invalid. - * - if ( (ConsoleMode & CONSOLE_VALID_CONTROL_MODES) && - (ConsoleMode & ENABLE_EXTENDED_FLAGS) == 0 ) + else { - Status = STATUS_INVALID_PARAMETER; - goto Quit; + InputBuffer->Mode = (ConsoleMode & CONSOLE_VALID_INPUT_MODES); } - */ - - /* - * 3. Now we can continue. - */ - if (ConsoleMode & CONSOLE_VALID_CONTROL_MODES) - { - Console->QuickEdit = !!(ConsoleMode & ENABLE_QUICK_EDIT_MODE); - Console->InsertMode = !!(ConsoleMode & ENABLE_INSERT_MODE); - } - InputBuffer->Mode = (ConsoleMode & CONSOLE_VALID_INPUT_MODES); } else if (TEXTMODE_BUFFER == Object->Type || GRAPHICS_BUFFER == Object->Type) { PCONSOLE_SCREEN_BUFFER Buffer = (PCONSOLE_SCREEN_BUFFER)Object; - DPRINT("SetConsoleMode(Output, %d)\n", ConsoleMode); - + /* Only the presence of valid mode flags is allowed */ if (ConsoleMode & ~CONSOLE_VALID_OUTPUT_MODES) { Status = STATUS_INVALID_PARAMETER; @@ -620,115 +506,9 @@ ConDrvSetConsoleMode(IN PCONSOLE Console, Status = STATUS_INVALID_HANDLE; } -Quit: return Status; } -NTSTATUS NTAPI -ConDrvGetConsoleTitle(IN PCONSOLE Console, - IN BOOLEAN Unicode, - IN OUT PVOID TitleBuffer, - IN OUT PULONG BufLength) -{ - ULONG Length; - - if (Console == NULL || TitleBuffer == NULL || BufLength == NULL) - return STATUS_INVALID_PARAMETER; - - /* Copy title of the console to the user title buffer */ - if (Unicode) - { - if (*BufLength >= sizeof(WCHAR)) - { - Length = min(*BufLength - sizeof(WCHAR), Console->Title.Length); - RtlCopyMemory(TitleBuffer, Console->Title.Buffer, Length); - ((PWCHAR)TitleBuffer)[Length / sizeof(WCHAR)] = L'\0'; - *BufLength = Length; - } - else - { - *BufLength = Console->Title.Length; - } - } - else - { - if (*BufLength >= sizeof(CHAR)) - { - Length = min(*BufLength - sizeof(CHAR), Console->Title.Length / sizeof(WCHAR)); - Length = WideCharToMultiByte(Console->InputCodePage, 0, - Console->Title.Buffer, Length, - TitleBuffer, Length, - NULL, NULL); - ((PCHAR)TitleBuffer)[Length] = '\0'; - *BufLength = Length; - } - else - { - *BufLength = Console->Title.Length / sizeof(WCHAR); - } - } - - return STATUS_SUCCESS; -} - -NTSTATUS NTAPI -ConDrvSetConsoleTitle(IN PCONSOLE Console, - IN BOOLEAN Unicode, - IN PVOID TitleBuffer, - IN ULONG BufLength) -{ - PWCHAR Buffer; - ULONG Length; - - if (Console == NULL || TitleBuffer == NULL) - return STATUS_INVALID_PARAMETER; - - if (Unicode) - { - /* Length is in bytes */ - Length = BufLength; - } - else - { - /* Use the console input CP for the conversion */ - Length = MultiByteToWideChar(Console->InputCodePage, 0, - TitleBuffer, BufLength, - NULL, 0); - /* The returned Length was in number of wchars, convert it in bytes */ - Length *= sizeof(WCHAR); - } - - /* Allocate a new buffer to hold the new title (NULL-terminated) */ - Buffer = ConsoleAllocHeap(HEAP_ZERO_MEMORY, Length + sizeof(WCHAR)); - if (!Buffer) return STATUS_NO_MEMORY; - - /* Free the old title */ - ConsoleFreeUnicodeString(&Console->Title); - - /* Copy title to console */ - Console->Title.Buffer = Buffer; - Console->Title.Length = Length; - Console->Title.MaximumLength = Console->Title.Length + sizeof(WCHAR); - - if (Unicode) - { - RtlCopyMemory(Console->Title.Buffer, TitleBuffer, Console->Title.Length); - } - else - { - MultiByteToWideChar(Console->InputCodePage, 0, - TitleBuffer, BufLength, - Console->Title.Buffer, - Console->Title.Length / sizeof(WCHAR)); - } - - /* NULL-terminate */ - Console->Title.Buffer[Console->Title.Length / sizeof(WCHAR)] = L'\0'; - - // TermChangeTitle(Console); - return STATUS_SUCCESS; -} - NTSTATUS NTAPI ConDrvGetConsoleCP(IN PCONSOLE Console, OUT PUINT CodePage, diff --git a/win32ss/user/winsrv/consrv/condrv/dummyterm.c b/win32ss/user/winsrv/consrv/condrv/dummyterm.c index 3b38329cfcd..2066cb54ee4 100644 --- a/win32ss/user/winsrv/consrv/condrv/dummyterm.c +++ b/win32ss/user/winsrv/consrv/condrv/dummyterm.c @@ -25,23 +25,57 @@ DummyDeinitTerminal(IN OUT PTERMINAL This) { } + + +/************ Line discipline ***************/ + +static NTSTATUS NTAPI +DummyReadStream(IN OUT PTERMINAL This, + /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/ + IN BOOLEAN Unicode, + /**PWCHAR Buffer,**/ + OUT PVOID Buffer, + IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl, + IN ULONG NumCharsToRead, + OUT PULONG NumCharsRead OPTIONAL) +{ + /* + * We were called because the console was in cooked mode. + * There is nothing to read, wait until a real terminal + * is plugged into the console. + */ + return STATUS_PENDING; +} + +static NTSTATUS NTAPI +DummyWriteStream(IN OUT PTERMINAL This, + PTEXTMODE_SCREEN_BUFFER Buff, + PWCHAR Buffer, + DWORD Length, + BOOL Attrib) +{ + /* + * We were called because the console was in cooked mode. + * There is nothing to write, wait until a real terminal + * is plugged into the console. + */ + + // /* Stop here if the console is paused */ + // if (Console->UnpauseEvent != NULL) return STATUS_PENDING; + + return STATUS_PENDING; +} + +/************ Line discipline ***************/ + + + static VOID NTAPI DummyDrawRegion(IN OUT PTERMINAL This, SMALL_RECT* Region) { } -static VOID NTAPI -DummyWriteStream(IN OUT PTERMINAL This, - SMALL_RECT* Region, - SHORT CursorStartX, - SHORT CursorStartY, - UINT ScrolledLines, - PWCHAR Buffer, - UINT Length) -{ -} - static BOOL NTAPI DummySetCursorInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer) @@ -74,26 +108,12 @@ DummyReleaseScreenBuffer(IN OUT PTERMINAL This, { } -static VOID NTAPI -DummyChangeTitle(IN OUT PTERMINAL This) -{ -} - static VOID NTAPI DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This, PCOORD pSize) { } -/* -static BOOL NTAPI -DummyGetSelectionInfo(IN OUT PTERMINAL This, - PCONSOLE_SELECTION_INFO pSelectionInfo) -{ - return TRUE; -} -*/ - static BOOL NTAPI DummySetPalette(IN OUT PTERMINAL This, HPALETTE PaletteHandle, @@ -113,16 +133,17 @@ static TERMINAL_VTBL DummyVtbl = { DummyInitTerminal, DummyDeinitTerminal, - DummyDrawRegion, + + DummyReadStream, DummyWriteStream, + + DummyDrawRegion, DummySetCursorInfo, DummySetScreenInfo, DummyResizeTerminal, DummySetActiveScreenBuffer, DummyReleaseScreenBuffer, - DummyChangeTitle, DummyGetLargestConsoleWindowSize, - // DummyGetSelectionInfo, DummySetPalette, DummyShowMouseCursor, }; diff --git a/win32ss/user/winsrv/consrv/condrv/text.c b/win32ss/user/winsrv/consrv/condrv/text.c index 6b8dbdcbc8a..72e62c121af 100644 --- a/win32ss/user/winsrv/consrv/condrv/text.c +++ b/win32ss/user/winsrv/consrv/condrv/text.c @@ -16,7 +16,19 @@ /* GLOBALS ********************************************************************/ -#define TAB_WIDTH 8 +/* + * From MSDN: + * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. + * If they are the same, the function fails, and GetLastError returns + * ERROR_INVALID_PARAMETER." + */ +#define ConsoleOutputUnicodeToAnsiChar(Console, dChar, sWChar) \ + ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ + WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) + +#define ConsoleOutputAnsiToUnicodeChar(Console, dWChar, sChar) \ + ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ + MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1) /* PRIVATE FUNCTIONS **********************************************************/ @@ -33,7 +45,7 @@ static CONSOLE_SCREEN_BUFFER_VTBL TextVtbl = }; -static VOID +/*static*/ VOID ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff); @@ -127,7 +139,7 @@ ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y) return &Buff->Buffer[((Y + Buff->VirtualY) % Buff->ScreenBufferSize.Y) * Buff->ScreenBufferSize.X + X]; } -static VOID +/*static*/ VOID ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff) { PCHAR_INFO Ptr = ConioCoordToPointer(Buff, 0, Buff->CursorPosition.Y); @@ -235,6 +247,15 @@ ConioMoveRegion(PTEXTMODE_SCREEN_BUFFER ScreenBuffer, } } +// FIXME! +NTSTATUS NTAPI +ConDrvWriteConsoleInput(IN PCONSOLE Console, + IN PCONSOLE_INPUT_BUFFER InputBuffer, + IN BOOLEAN AppendToEnd, + IN PINPUT_RECORD InputRecord, + IN ULONG NumEventsToWrite, + OUT PULONG NumEventsWritten OPTIONAL); + NTSTATUS ConioResizeBuffer(PCONSOLE Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, @@ -343,175 +364,19 @@ ConioResizeBuffer(PCONSOLE Console, */ if (Console->InputBuffer.Mode & ENABLE_WINDOW_INPUT) { + ULONG NumEventsWritten; INPUT_RECORD er; er.EventType = WINDOW_BUFFER_SIZE_EVENT; er.Event.WindowBufferSizeEvent.dwSize = ScreenBuffer->ScreenBufferSize; - ConioProcessInputEvent(Console, &er); - } - - return STATUS_SUCCESS; -} - -static VOID -ConioNextLine(PTEXTMODE_SCREEN_BUFFER Buff, PSMALL_RECT UpdateRect, PUINT ScrolledLines) -{ - /* If we hit bottom, slide the viewable screen */ - if (++Buff->CursorPosition.Y == Buff->ScreenBufferSize.Y) - { - Buff->CursorPosition.Y--; - if (++Buff->VirtualY == Buff->ScreenBufferSize.Y) - { - Buff->VirtualY = 0; - } - (*ScrolledLines)++; - ClearLineBuffer(Buff); - if (UpdateRect->Top != 0) - { - UpdateRect->Top--; - } - } - UpdateRect->Left = 0; - UpdateRect->Right = Buff->ScreenBufferSize.X - 1; - UpdateRect->Bottom = Buff->CursorPosition.Y; -} - -NTSTATUS -ConioWriteConsole(PCONSOLE Console, - PTEXTMODE_SCREEN_BUFFER Buff, - PWCHAR Buffer, - DWORD Length, - BOOL Attrib) -{ - UINT i; - PCHAR_INFO Ptr; - SMALL_RECT UpdateRect; - SHORT CursorStartX, CursorStartY; - UINT ScrolledLines; - - CursorStartX = Buff->CursorPosition.X; - CursorStartY = Buff->CursorPosition.Y; - UpdateRect.Left = Buff->ScreenBufferSize.X; - UpdateRect.Top = Buff->CursorPosition.Y; - UpdateRect.Right = -1; - UpdateRect.Bottom = Buff->CursorPosition.Y; - ScrolledLines = 0; - - for (i = 0; i < Length; i++) - { - /* - * If we are in processed mode, interpret special characters and - * display them correctly. Otherwise, just put them into the buffer. - */ - if (Buff->Mode & ENABLE_PROCESSED_OUTPUT) - { - /* --- CR --- */ - if (Buffer[i] == L'\r') - { - Buff->CursorPosition.X = 0; - UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); - UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); - continue; - } - /* --- LF --- */ - else if (Buffer[i] == L'\n') - { - Buff->CursorPosition.X = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - continue; - } - /* --- BS --- */ - else if (Buffer[i] == L'\b') - { - /* Only handle BS if we're not on the first pos of the first line */ - if (0 != Buff->CursorPosition.X || 0 != Buff->CursorPosition.Y) - { - if (0 == Buff->CursorPosition.X) - { - /* slide virtual position up */ - Buff->CursorPosition.X = Buff->ScreenBufferSize.X - 1; - Buff->CursorPosition.Y--; - UpdateRect.Top = min(UpdateRect.Top, Buff->CursorPosition.Y); - } - else - { - Buff->CursorPosition.X--; - } - Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); - Ptr->Char.UnicodeChar = L' '; - Ptr->Attributes = Buff->ScreenDefaultAttrib; - UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); - UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); - } - continue; - } - /* --- TAB --- */ - else if (Buffer[i] == L'\t') - { - UINT EndX; - - UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); - EndX = (Buff->CursorPosition.X + TAB_WIDTH) & ~(TAB_WIDTH - 1); - EndX = min(EndX, (UINT)Buff->ScreenBufferSize.X); - Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); - while (Buff->CursorPosition.X < EndX) - { - Ptr->Char.UnicodeChar = L' '; - Ptr->Attributes = Buff->ScreenDefaultAttrib; - ++Ptr; - Buff->CursorPosition.X++; - } - UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X - 1); - if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X) - { - if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) - { - Buff->CursorPosition.X = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - } - else - { - Buff->CursorPosition.X--; - } - } - continue; - } - // /* --- BEL ---*/ - // else if (Buffer[i] == L'\a') - // { - // // FIXME: This MUST BE moved to the terminal emulator frontend!! - // DPRINT1("Bell\n"); - // // SendNotifyMessage(Console->hWindow, PM_CONSOLE_BEEP, 0, 0); - // continue; - // } - } - UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); - UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); - - Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); - Ptr->Char.UnicodeChar = Buffer[i]; - if (Attrib) Ptr->Attributes = Buff->ScreenDefaultAttrib; - - Buff->CursorPosition.X++; - if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X) - { - if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) - { - Buff->CursorPosition.X = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - } - else - { - Buff->CursorPosition.X = CursorStartX; - } - } - } - - if (!ConioIsRectEmpty(&UpdateRect) && (PCONSOLE_SCREEN_BUFFER)Buff == Console->ActiveBuffer) - { - TermWriteStream(Console, &UpdateRect, CursorStartX, CursorStartY, - ScrolledLines, Buffer, Length); + // ConioProcessInputEvent(Console, &er); + ConDrvWriteConsoleInput(Console, + &Console->InputBuffer, + TRUE, + &er, + 1, + &NumEventsWritten); } return STATUS_SUCCESS; @@ -528,7 +393,7 @@ ConDrvChangeScreenBufferAttributes(IN PCONSOLE Console, COORD TopLeft = {0}; ULONG NumCodesToWrite; - USHORT OldScreenAttrib; + USHORT OldScreenAttrib, OldPopupAttrib; if (Console == NULL || Buffer == NULL) { @@ -540,6 +405,7 @@ ConDrvChangeScreenBufferAttributes(IN PCONSOLE Console, NumCodesToWrite = Buffer->ScreenBufferSize.X * Buffer->ScreenBufferSize.Y; OldScreenAttrib = Buffer->ScreenDefaultAttrib; + OldPopupAttrib = Buffer->PopupDefaultAttrib; X = TopLeft.X; Y = (TopLeft.Y + Buffer->VirtualY) % Buffer->ScreenBufferSize.Y; @@ -560,10 +426,14 @@ ConDrvChangeScreenBufferAttributes(IN PCONSOLE Console, /* Foreground color */ if ((Ptr->Attributes & 0x0F) == (OldScreenAttrib & 0x0F)) Ptr->Attributes = (Ptr->Attributes & 0xFFF0) | (NewScreenAttrib & 0x0F); + if ((Ptr->Attributes & 0x0F) == (OldPopupAttrib & 0x0F)) + Ptr->Attributes = (Ptr->Attributes & 0xFFF0) | (NewPopupAttrib & 0x0F); /* Background color */ if ((Ptr->Attributes & 0xF0) == (OldScreenAttrib & 0xF0)) Ptr->Attributes = (Ptr->Attributes & 0xFF0F) | (NewScreenAttrib & 0xF0); + if ((Ptr->Attributes & 0xF0) == (OldPopupAttrib & 0xF0)) + Ptr->Attributes = (Ptr->Attributes & 0xFF0F) | (NewPopupAttrib & 0xF0); // ++Ptr; @@ -644,7 +514,7 @@ ConDrvReadConsoleOutput(IN PCONSOLE Console, } else { - // ConsoleUnicodeCharToAnsiChar(Console, &CurCharInfo->Char.AsciiChar, &Ptr->Char.UnicodeChar); + // ConsoleOutputUnicodeToAnsiChar(Console, &CurCharInfo->Char.AsciiChar, &Ptr->Char.UnicodeChar); WideCharToMultiByte(Console->OutputCodePage, 0, &Ptr->Char.UnicodeChar, 1, &CurCharInfo->Char.AsciiChar, 1, NULL, NULL); } @@ -707,7 +577,7 @@ ConDrvWriteConsoleOutput(IN PCONSOLE Console, } else { - ConsoleAnsiCharToUnicodeChar(Console, &Ptr->Char.UnicodeChar, &CurCharInfo->Char.AsciiChar); + ConsoleOutputAnsiToUnicodeChar(Console, &Ptr->Char.UnicodeChar, &CurCharInfo->Char.AsciiChar); } Ptr->Attributes = CurCharInfo->Attributes; ++Ptr; @@ -770,7 +640,7 @@ ConDrvWriteConsoleOutputVDM(IN PCONSOLE Console, Ptr = ConioCoordToPointer(Buffer, CapturedWriteRegion.Left, Y); for (X = CapturedWriteRegion.Left; X <= CapturedWriteRegion.Right; ++X) { - ConsoleAnsiCharToUnicodeChar(Console, &Ptr->Char.UnicodeChar, &CurCharInfo->Char); + ConsoleOutputAnsiToUnicodeChar(Console, &Ptr->Char.UnicodeChar, &CurCharInfo->Char); Ptr->Attributes = CurCharInfo->Attributes; ++Ptr; ++CurCharInfo; @@ -807,6 +677,7 @@ ConDrvWriteConsole(IN PCONSOLE Console, /* Stop here if the console is paused */ if (Console->UnpauseEvent != NULL) return STATUS_PENDING; + /* Convert the string to UNICODE */ if (Unicode) { Buffer = StringBuffer; @@ -831,15 +702,16 @@ ConDrvWriteConsole(IN PCONSOLE Console, } } + /* Send it */ if (Buffer) { if (NT_SUCCESS(Status)) { - Status = ConioWriteConsole(Console, - ScreenBuffer, - Buffer, - NumCharsToWrite, - TRUE); + Status = TermWriteStream(Console, + ScreenBuffer, + Buffer, + NumCharsToWrite, + TRUE); if (NT_SUCCESS(Status)) { Written = NumCharsToWrite; @@ -879,6 +751,10 @@ ConDrvReadConsoleOutputString(IN PCONSOLE Console, ASSERT(Console == Buffer->Header.Console); ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCodesToRead == 0)); + // + // FIXME: Make overflow checks on ReadCoord !!!!!! + // + if (NumCodesRead) *NumCodesRead = 0; switch (CodeType) @@ -925,7 +801,7 @@ ConDrvReadConsoleOutputString(IN PCONSOLE Console, switch (CodeType) { case CODE_ASCII: - ConsoleUnicodeCharToAnsiChar(Console, (PCHAR)ReadBuffer, &Ptr->Char.UnicodeChar); + ConsoleOutputUnicodeToAnsiChar(Console, (PCHAR)ReadBuffer, &Ptr->Char.UnicodeChar); break; case CODE_UNICODE: @@ -989,6 +865,10 @@ ConDrvWriteConsoleOutputString(IN PCONSOLE Console, ASSERT(Console == Buffer->Header.Console); ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCodesToWrite == 0)); + // + // FIXME: Make overflow checks on WriteCoord !!!!!! + // + if (NumCodesWritten) *NumCodesWritten = 0; switch (CodeType) @@ -1117,13 +997,17 @@ ConDrvFillConsoleOutput(IN PCONSOLE Console, /* Validity check */ ASSERT(Console == Buffer->Header.Console); + // + // FIXME: Make overflow checks on WriteCoord !!!!!! + // + if (NumCodesWritten) *NumCodesWritten = 0; if (CodeType == CODE_ASCII) { /* Conversion from the ASCII char to the UNICODE char */ CODE_ELEMENT tmp; - ConsoleAnsiCharToUnicodeChar(Console, &tmp.UnicodeChar, &Code.AsciiChar); + ConsoleOutputAnsiToUnicodeChar(Console, &tmp.UnicodeChar, &Code.AsciiChar); Code = tmp; } @@ -1308,7 +1192,7 @@ ConDrvScrollConsoleScreenBuffer(IN PCONSOLE Console, if (!Unicode) { WCHAR tmp; - ConsoleAnsiCharToUnicodeChar(Console, &tmp, &FillChar.Char.AsciiChar); + ConsoleOutputAnsiToUnicodeChar(Console, &tmp, &FillChar.Char.AsciiChar); FillChar.Char.UnicodeChar = tmp; } diff --git a/win32ss/user/winsrv/consrv/coninput.c b/win32ss/user/winsrv/consrv/coninput.c index 953451e9f09..9faaf52f471 100644 --- a/win32ss/user/winsrv/consrv/coninput.c +++ b/win32ss/user/winsrv/consrv/coninput.c @@ -26,6 +26,21 @@ ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked)) +/* + * From MSDN: + * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. + * If they are the same, the function fails, and GetLastError returns + * ERROR_INVALID_PARAMETER." + */ +#define ConsoleInputUnicodeToAnsiChar(Console, dChar, sWChar) \ + ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ + WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) + +#define ConsoleInputAnsiToUnicodeChar(Console, dWChar, sChar) \ + ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ + MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1) + + typedef struct _GET_INPUT_INFO { PCSR_THREAD CallingThread; // The thread which called the input API. @@ -36,10 +51,33 @@ typedef struct _GET_INPUT_INFO /* PRIVATE FUNCTIONS **********************************************************/ -/* - * This pre-processing code MUST be IN consrv ONLY - */ -/* static */ ULONG +static VOID +ConioInputEventToAnsi(PCONSOLE Console, PINPUT_RECORD InputEvent) +{ + if (InputEvent->EventType == KEY_EVENT) + { + WCHAR UnicodeChar = InputEvent->Event.KeyEvent.uChar.UnicodeChar; + InputEvent->Event.KeyEvent.uChar.UnicodeChar = 0; + ConsoleInputUnicodeToAnsiChar(Console, + &InputEvent->Event.KeyEvent.uChar.AsciiChar, + &UnicodeChar); + } +} + +static VOID +ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent) +{ + if (InputEvent->EventType == KEY_EVENT) + { + CHAR AsciiChar = InputEvent->Event.KeyEvent.uChar.AsciiChar; + InputEvent->Event.KeyEvent.uChar.AsciiChar = 0; + ConsoleInputAnsiToUnicodeChar(Console, + &InputEvent->Event.KeyEvent.uChar.UnicodeChar, + &AsciiChar); + } +} + +static ULONG PreprocessInput(PCONSRV_CONSOLE Console, PINPUT_RECORD InputEvent, ULONG NumEventsToWrite) @@ -98,10 +136,7 @@ PreprocessInput(PCONSRV_CONSOLE Console, return NumEventsToWrite; } -/* - * This post-processing code MUST be IN consrv ONLY - */ -/* static */ VOID +static VOID PostprocessInput(PCONSRV_CONSOLE Console) { CsrNotifyWait(&Console->ReadWaitQueue, @@ -115,7 +150,58 @@ PostprocessInput(PCONSRV_CONSOLE Console) } +NTSTATUS NTAPI +ConDrvWriteConsoleInput(IN PCONSOLE Console, + IN PCONSOLE_INPUT_BUFFER InputBuffer, + IN BOOLEAN AppendToEnd, + IN PINPUT_RECORD InputRecord, + IN ULONG NumEventsToWrite, + OUT PULONG NumEventsWritten OPTIONAL); +static NTSTATUS +ConioAddInputEvents(PCONSRV_CONSOLE Console, + PINPUT_RECORD InputRecords, // InputEvent + ULONG NumEventsToWrite, + PULONG NumEventsWritten, + BOOLEAN AppendToEnd) +{ + NTSTATUS Status = STATUS_SUCCESS; + if (NumEventsWritten) *NumEventsWritten = 0; + + NumEventsToWrite = PreprocessInput(Console, InputRecords, NumEventsToWrite); + if (NumEventsToWrite == 0) return STATUS_SUCCESS; + + // Status = ConDrvAddInputEvents(Console, + // InputRecords, + // NumEventsToWrite, + // NumEventsWritten, + // AppendToEnd); + + Status = ConDrvWriteConsoleInput((PCONSOLE)Console, + &Console->InputBuffer, + AppendToEnd, + InputRecords, + NumEventsToWrite, + NumEventsWritten); + + // if (NT_SUCCESS(Status)) + if (Status == STATUS_SUCCESS) PostprocessInput(Console); + + return Status; +} + +/* FIXME: This function can be called by CONDRV, in ConioResizeBuffer() in text.c */ +NTSTATUS +ConioProcessInputEvent(PCONSRV_CONSOLE Console, + PINPUT_RECORD InputEvent) +{ + ULONG NumEventsWritten; + return ConioAddInputEvents(Console, + InputEvent, + 1, + &NumEventsWritten, + TRUE); +} static NTSTATUS @@ -127,13 +213,14 @@ WaitBeforeReading(IN PGET_INPUT_INFO InputInfo, if (CreateWaitBlock) { PGET_INPUT_INFO CapturedInputInfo; + PCONSRV_CONSOLE Console = (PCONSRV_CONSOLE)InputInfo->InputBuffer->Header.Console; CapturedInputInfo = ConsoleAllocHeap(0, sizeof(GET_INPUT_INFO)); if (!CapturedInputInfo) return STATUS_NO_MEMORY; RtlMoveMemory(CapturedInputInfo, InputInfo, sizeof(GET_INPUT_INFO)); - if (!CsrCreateWait(&InputInfo->InputBuffer->Header.Console->ReadWaitQueue, + if (!CsrCreateWait(&Console->ReadWaitQueue, WaitFunction, InputInfo->CallingThread, ApiMessage, @@ -381,7 +468,6 @@ ConDrvGetConsoleInput(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, IN BOOLEAN KeepEvents, IN BOOLEAN WaitForMoreEvents, - IN BOOLEAN Unicode, OUT PINPUT_RECORD InputRecord, IN ULONG NumEventsToRead, OUT PULONG NumEventsRead OPTIONAL); @@ -422,7 +508,6 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, InputBuffer, (GetInputRequest->Flags & CONSOLE_READ_KEEPEVENT) != 0, (GetInputRequest->Flags & CONSOLE_READ_CONTINUE ) == 0, - GetInputRequest->Unicode, InputRecord, GetInputRequest->NumRecords, &NumEventsRead); @@ -443,6 +528,18 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, */ GetInputRequest->NumRecords = NumEventsRead; + if (NT_SUCCESS(Status)) + { + /* Now translate everything to ANSI */ + if (!GetInputRequest->Unicode) + { + for (; NumEventsRead > 0; --NumEventsRead) + { + ConioInputEventToAnsi(InputBuffer->Header.Console, --InputRecord); + } + } + } + return Status; // return STATUS_SUCCESS; } @@ -563,14 +660,15 @@ CSR_API(SrvGetConsoleInput) return Status; } +#if 0 NTSTATUS NTAPI ConDrvWriteConsoleInput(IN PCONSOLE Console, IN PCONSOLE_INPUT_BUFFER InputBuffer, - IN BOOLEAN Unicode, IN BOOLEAN AppendToEnd, IN PINPUT_RECORD InputRecord, IN ULONG NumEventsToWrite, OUT PULONG NumEventsWritten OPTIONAL); +#endif CSR_API(SrvWriteConsoleInput) { NTSTATUS Status; @@ -619,14 +717,32 @@ CSR_API(SrvWriteConsoleInput) return Status; } + /* First translate everything to UNICODE */ + if (!WriteInputRequest->Unicode) + { + ULONG i; + for (i = 0; i < WriteInputRequest->NumRecords; ++i) + { + ConioInputEventToUnicode(InputBuffer->Header.Console, &InputRecord[i]); + } + } + + /* Now, add the events */ NumEventsWritten = 0; - Status = ConDrvWriteConsoleInput(InputBuffer->Header.Console, - InputBuffer, - WriteInputRequest->Unicode, - WriteInputRequest->AppendToEnd, - InputRecord, - WriteInputRequest->NumRecords, - &NumEventsWritten); + Status = ConioAddInputEvents((PCONSRV_CONSOLE)InputBuffer->Header.Console, + // InputBuffer, + InputRecord, + WriteInputRequest->NumRecords, + &NumEventsWritten, + WriteInputRequest->AppendToEnd); + + // Status = ConDrvWriteConsoleInput(InputBuffer->Header.Console, + // InputBuffer, + // WriteInputRequest->AppendToEnd, + // InputRecord, + // WriteInputRequest->NumRecords, + // &NumEventsWritten); + WriteInputRequest->NumRecords = NumEventsWritten; ConSrvReleaseInputBuffer(InputBuffer, TRUE); diff --git a/win32ss/user/winsrv/consrv/coninput.h b/win32ss/user/winsrv/consrv/coninput.h index 7ab46946777..ea186b0fcce 100644 --- a/win32ss/user/winsrv/consrv/coninput.h +++ b/win32ss/user/winsrv/consrv/coninput.h @@ -9,4 +9,8 @@ #pragma once -VOID PurgeInputBuffer(PCONSOLE Console); +NTSTATUS NTAPI +ConDrvInitInputBuffer(IN PCONSOLE Console, + IN ULONG InputBufferSize); +VOID NTAPI +ConDrvDeinitInputBuffer(IN PCONSOLE Console); diff --git a/win32ss/user/winsrv/consrv/conoutput.c b/win32ss/user/winsrv/consrv/conoutput.c index ab911f78a02..4c73eb1a41b 100644 --- a/win32ss/user/winsrv/consrv/conoutput.c +++ b/win32ss/user/winsrv/consrv/conoutput.c @@ -252,7 +252,7 @@ CSR_API(SrvCreateConsoleScreenBuffer) } Status = ConDrvCreateScreenBuffer(&Buff, - Console, + (PCONSOLE)Console, CreateScreenBufferRequest->ScreenBufferType, ScreenBufferInfo); if (!NT_SUCCESS(Status)) goto Quit; @@ -417,7 +417,9 @@ DoWriteConsole(IN PCSR_API_MESSAGE ApiMessage, { if (CreateWaitBlock) { - if (!CsrCreateWait(&ScreenBuffer->Header.Console->WriteWaitQueue, + PCONSRV_CONSOLE Console = (PCONSRV_CONSOLE)ScreenBuffer->Header.Console; + + if (!CsrCreateWait(&Console->WriteWaitQueue, WriteConsoleThread, ClientThread, ApiMessage, diff --git a/win32ss/user/winsrv/consrv/conoutput.h b/win32ss/user/winsrv/consrv/conoutput.h index 802b8c4742d..943fff007f0 100644 --- a/win32ss/user/winsrv/consrv/conoutput.h +++ b/win32ss/user/winsrv/consrv/conoutput.h @@ -37,7 +37,7 @@ NTSTATUS ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer, IN OUT PCONSOLE Console, IN ULONG BufferType, IN PVOID ScreenBufferInfo); -VOID NTAPI ConioDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer); +VOID NTAPI ConDrvDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer); // VOID ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer); PCONSOLE_SCREEN_BUFFER diff --git a/win32ss/user/winsrv/consrv/console.c b/win32ss/user/winsrv/consrv/console.c index a5d7c658330..fc0c8cdedf3 100644 --- a/win32ss/user/winsrv/consrv/console.c +++ b/win32ss/user/winsrv/consrv/console.c @@ -14,7 +14,13 @@ #include +/* This is for COM usage */ +#define COBJMACROS +#include + + #include +#include #include "procinit.h" #define NDEBUG @@ -25,8 +31,9 @@ NTSTATUS NTAPI RtlGetLastNtStatus(VOID); /* GLOBALS ********************************************************************/ +/* The list of the ConSrv consoles */ static ULONG ConsoleListSize; -static PCONSRV_CONSOLE* ConsoleList; /* The list of the ConSrv consoles */ +static PCONSRV_CONSOLE* ConsoleList; static RTL_RESOURCE ListLock; #define ConSrvLockConsoleListExclusive() \ @@ -155,9 +162,8 @@ RemoveConsoleByPointer(IN PCONSRV_CONSOLE Console) } } - /* Unlock the console list */ + /* Unlock the console list and return */ ConSrvUnlockConsoleList(); - return STATUS_SUCCESS; } @@ -187,9 +193,8 @@ ConSrvValidateConsole(OUT PCONSRV_CONSOLE* Console, if (Index >= ConsoleListSize || (ValidatedConsole = ConsoleList[Index]) == NULL) { - /* Unlock the console list */ + /* Unlock the console list and return */ ConSrvUnlockConsoleList(); - return FALSE; } @@ -198,7 +203,7 @@ ConSrvValidateConsole(OUT PCONSRV_CONSOLE* Console, /* Unlock the console list and return */ ConSrvUnlockConsoleList(); - RetVal = ConDrvValidateConsoleUnsafe(ValidatedConsole, + RetVal = ConDrvValidateConsoleUnsafe((PCONSOLE)ValidatedConsole, ExpectedState, LockConsole); if (RetVal) *Console = ValidatedConsole; @@ -209,11 +214,40 @@ ConSrvValidateConsole(OUT PCONSRV_CONSOLE* Console, /* PRIVATE FUNCTIONS **********************************************************/ +// Adapted from reactos/lib/rtl/unicode.c, RtlCreateUnicodeString line 2180 +static BOOLEAN +ConsoleCreateUnicodeString(IN OUT PUNICODE_STRING UniDest, + IN PCWSTR Source) +{ + SIZE_T Size = (wcslen(Source) + 1) * sizeof(WCHAR); + if (Size > MAXUSHORT) return FALSE; + + UniDest->Buffer = ConsoleAllocHeap(HEAP_ZERO_MEMORY, Size); + if (UniDest->Buffer == NULL) return FALSE; + + RtlCopyMemory(UniDest->Buffer, Source, Size); + UniDest->MaximumLength = (USHORT)Size; + UniDest->Length = (USHORT)Size - sizeof(WCHAR); + + return TRUE; +} + +// Adapted from reactos/lib/rtl/unicode.c, RtlFreeUnicodeString line 431 +static VOID +ConsoleFreeUnicodeString(IN PUNICODE_STRING UnicodeString) +{ + if (UnicodeString->Buffer) + { + ConsoleFreeHeap(UnicodeString->Buffer); + RtlZeroMemory(UnicodeString, sizeof(UNICODE_STRING)); + } +} + VOID ConioPause(PCONSRV_CONSOLE Console, UINT Flags) { Console->PauseFlags |= Flags; - ConDrvPause(Console); + ConDrvPause((PCONSOLE)Console); } VOID @@ -224,7 +258,7 @@ ConioUnpause(PCONSRV_CONSOLE Console, UINT Flags) // if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR | PAUSED_FROM_SELECTION)) == 0) if (Console->PauseFlags == 0) { - ConDrvUnpause(Console); + ConDrvUnpause((PCONSOLE)Console); CsrNotifyWait(&Console->WriteWaitQueue, TRUE, @@ -317,10 +351,157 @@ ConSrvInitTerminal(IN OUT PTERMINAL Terminal, NTSTATUS NTAPI ConSrvDeinitTerminal(IN OUT PTERMINAL Terminal); + +static BOOL +LoadShellLinkConsoleInfo(IN OUT PCONSOLE_INFO ConsoleInfo, + IN OUT PCONSOLE_INIT_INFO ConsoleInitInfo) +{ +#define PATH_SEPARATOR L'\\' + + BOOL RetVal = FALSE; + HRESULT hRes = S_OK; + SIZE_T Length = 0; + LPWSTR LinkName = NULL; + LPWSTR IconPath = NULL; + WCHAR Buffer[MAX_PATH + 1]; + + ConsoleInitInfo->ConsoleStartInfo->IconIndex = 0; + + if ((ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) + { + // return FALSE; // FIXME!! (for icon loading) + RetVal = TRUE; + goto Finish; + } + + /* 1- Find the last path separator if any */ + LinkName = wcsrchr(ConsoleInfo->ConsoleTitle, PATH_SEPARATOR); + if (LinkName == NULL) + LinkName = ConsoleInfo->ConsoleTitle; + else + ++LinkName; // Skip the path separator + + /* 2- Check for the link extension. The name ".lnk" is considered invalid. */ + Length = wcslen(LinkName); + if ( (Length <= 4) || (wcsicmp(LinkName + (Length - 4), L".lnk") != 0) ) + return FALSE; + + /* 3- It may be a link. Try to retrieve some properties */ + hRes = CoInitialize(NULL); + if (SUCCEEDED(hRes)) + { + /* Get a pointer to the IShellLink interface */ + IShellLinkW* pshl = NULL; + hRes = CoCreateInstance(&CLSID_ShellLink, + NULL, + CLSCTX_INPROC_SERVER, + &IID_IShellLinkW, + (LPVOID*)&pshl); + if (SUCCEEDED(hRes)) + { + /* Get a pointer to the IPersistFile interface */ + IPersistFile* ppf = NULL; + hRes = IPersistFile_QueryInterface(pshl, &IID_IPersistFile, (LPVOID*)&ppf); + if (SUCCEEDED(hRes)) + { + /* Load the shortcut */ + hRes = IPersistFile_Load(ppf, ConsoleInfo->ConsoleTitle, STGM_READ); + if (SUCCEEDED(hRes)) + { + /* + * Finally we can get the properties ! + * Update the old ones if needed. + */ + INT ShowCmd = 0; + // WORD HotKey = 0; + + /* Reset the name of the console with the name of the shortcut */ + Length = min(/*Length*/ Length - 4, // 4 == len(".lnk") + sizeof(ConsoleInfo->ConsoleTitle) / sizeof(ConsoleInfo->ConsoleTitle[0]) - 1); + wcsncpy(ConsoleInfo->ConsoleTitle, LinkName, Length); + ConsoleInfo->ConsoleTitle[Length] = L'\0'; + + /* Get the window showing command */ + hRes = IShellLinkW_GetShowCmd(pshl, &ShowCmd); + if (SUCCEEDED(hRes)) ConsoleInitInfo->ConsoleStartInfo->wShowWindow = (WORD)ShowCmd; + + /* Get the hotkey */ + // hRes = pshl->GetHotkey(&ShowCmd); + // if (SUCCEEDED(hRes)) ConsoleInitInfo->ConsoleStartInfo->HotKey = HotKey; + + /* Get the icon location, if any */ + hRes = IShellLinkW_GetIconLocation(pshl, + Buffer, + sizeof(Buffer)/sizeof(Buffer[0]) - 1, // == MAX_PATH + &ConsoleInitInfo->ConsoleStartInfo->IconIndex); + if (!SUCCEEDED(hRes)) + { + ConsoleInitInfo->ConsoleStartInfo->IconIndex = 0; + } + else + { + IconPath = Buffer; + } + + // FIXME: Since we still don't load console properties from the shortcut, + // return false. When this will be done, we will return true instead. + RetVal = TRUE; // FALSE; + } + IPersistFile_Release(ppf); + } + IShellLinkW_Release(pshl); + } + } + CoUninitialize(); + +Finish: + + if (RetVal) + { + /* Get the associated icon, if any */ + if (IconPath == NULL) + { + // Question: How to retrieve the full path name + // of the app we are going to run?? + Length = RtlDosSearchPath_U(ConsoleInitInfo->CurDir, + ConsoleInitInfo->AppName, + NULL, + sizeof(Buffer), + Buffer, + NULL); + if (Length > 0 && Length < sizeof(Buffer)) + IconPath = Buffer; + else + IconPath = ConsoleInitInfo->AppName; + + // ConsoleInitInfo->ConsoleStartInfo->IconIndex = 0; + } + DPRINT1("IconPath = '%S' ; IconIndex = %lu\n", + IconPath, ConsoleInitInfo->ConsoleStartInfo->IconIndex); + if (IconPath && *IconPath) + { + HICON hIcon = NULL, hIconSm = NULL; + PrivateExtractIconExW(IconPath, + ConsoleInitInfo->ConsoleStartInfo->IconIndex, + &hIcon, + &hIconSm, + 1); + DPRINT1("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm); + if (hIcon != NULL) ConsoleInitInfo->ConsoleStartInfo->hIcon = hIcon; + if (hIconSm != NULL) ConsoleInitInfo->ConsoleStartInfo->hIconSm = hIconSm; + } + } + + // FIXME: See the previous FIXME above. + RetVal = FALSE; + + return RetVal; +} + NTSTATUS NTAPI ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, OUT PCONSRV_CONSOLE* NewConsole, - IN OUT PCONSOLE_START_INFO ConsoleStartInfo, + IN OUT PCONSOLE_INIT_INFO ConsoleInitInfo, IN ULONG ConsoleLeaderProcessId) { NTSTATUS Status; @@ -331,7 +512,7 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, TERMINAL Terminal; /* The ConSrv terminal for this console */ - if (NewConsole == NULL || ConsoleStartInfo == NULL) + if (NewConsole == NULL || ConsoleInitInfo == NULL) return STATUS_INVALID_PARAMETER; *NewConsole = NULL; @@ -344,15 +525,15 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, ConSrvGetDefaultSettings(&ConsoleInfo, ConsoleLeaderProcessId); /* 2. Get the title of the console (initialize ConsoleInfo.ConsoleTitle) */ - Length = min(wcslen(ConsoleStartInfo->ConsoleTitle), + Length = min(ConsoleInitInfo->TitleLength, sizeof(ConsoleInfo.ConsoleTitle) / sizeof(ConsoleInfo.ConsoleTitle[0]) - 1); - wcsncpy(ConsoleInfo.ConsoleTitle, ConsoleStartInfo->ConsoleTitle, Length); - ConsoleInfo.ConsoleTitle[Length] = L'\0'; + wcsncpy(ConsoleInfo.ConsoleTitle, ConsoleInitInfo->ConsoleTitle, Length); + ConsoleInfo.ConsoleTitle[Length] = L'\0'; // NULL-terminate it. /* 3. Initialize the ConSrv terminal */ Status = ConSrvInitTerminal(&Terminal, &ConsoleInfo, - ConsoleStartInfo, + ConsoleInitInfo, ConsoleLeaderProcessId); if (!NT_SUCCESS(Status)) { @@ -361,10 +542,25 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, } DPRINT("CONSRV: Terminal initialized\n"); + /* + * Load per-application terminal settings. + * + * Check whether the process creating the console was launched via + * a shell-link. ConsoleInfo->ConsoleTitle may be updated with the + * name of the shortcut, and ConsoleStartInfo->Icon[Path|Index] too. + */ + // if (ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) // FIXME!! (for icon loading) + { + if (!LoadShellLinkConsoleInfo(&ConsoleInfo, ConsoleInitInfo)) + { + ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags &= ~STARTF_TITLEISLINKNAME; + } + } + /* * 4. Load the remaining console settings via the registry. */ - if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) + if ((ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) { /* * Either we weren't created by an app launched via a shell-link, @@ -379,17 +575,17 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, * (and which was transmitted via the ConsoleStartInfo structure). * We therefore overwrite the values read in the registry. */ - if (ConsoleStartInfo->dwStartupFlags & STARTF_USEFILLATTRIBUTE) + if (ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_USEFILLATTRIBUTE) { - ConsoleInfo.ScreenAttrib = (USHORT)ConsoleStartInfo->wFillAttribute; + ConsoleInfo.ScreenAttrib = (USHORT)ConsoleInitInfo->ConsoleStartInfo->wFillAttribute; } - if (ConsoleStartInfo->dwStartupFlags & STARTF_USECOUNTCHARS) + if (ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_USECOUNTCHARS) { - ConsoleInfo.ScreenBufferSize = ConsoleStartInfo->dwScreenBufferSize; + ConsoleInfo.ScreenBufferSize = ConsoleInitInfo->ConsoleStartInfo->dwScreenBufferSize; } - if (ConsoleStartInfo->dwStartupFlags & STARTF_USESIZE) + if (ConsoleInitInfo->ConsoleStartInfo->dwStartupFlags & STARTF_USESIZE) { - ConsoleInfo.ConsoleSize = ConsoleStartInfo->dwWindowSize; + ConsoleInfo.ConsoleSize = ConsoleInitInfo->ConsoleStartInfo->dwWindowSize; } } @@ -410,6 +606,31 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, /*** Register ConSrv features ***/ + /* Initialize the console title */ +#if 0 + WCHAR DefaultTitle[128]; +#endif + ConsoleCreateUnicodeString(&Console->OriginalTitle, ConsoleInfo.ConsoleTitle); +#if 0 + if (ConsoleInfo.ConsoleTitle[0] == L'\0') + { + if (LoadStringW(ConSrvDllInstance, IDS_CONSOLE_TITLE, DefaultTitle, sizeof(DefaultTitle) / sizeof(DefaultTitle[0]))) + { + ConsoleCreateUnicodeString(&Console->Title, DefaultTitle); + } + else + { + ConsoleCreateUnicodeString(&Console->Title, L"ReactOS Console"); + } + } + else + { +#endif + ConsoleCreateUnicodeString(&Console->Title, ConsoleInfo.ConsoleTitle); +#if 0 + } +#endif + /* Initialize process support */ InitializeListHead(&Console->ProcessList); Console->NotifiedLastCloseProcess = NULL; @@ -427,12 +648,25 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, Console->NumberOfHistoryBuffers = ConsoleInfo.NumberOfHistoryBuffers; Console->HistoryNoDup = ConsoleInfo.HistoryNoDup; - Console->QuickEdit = ConsoleInfo.QuickEdit; + /* Initialize the Input Line Discipline */ + Console->LineBuffer = NULL; + Console->LinePos = Console->LineMaxSize = Console->LineSize = 0; + Console->LineComplete = Console->LineUpPressed = FALSE; + // LineWakeupMask + Console->LineInsertToggle = + Console->InsertMode = ConsoleInfo.InsertMode; + Console->QuickEdit = ConsoleInfo.QuickEdit; + + /* Popup windows */ + InitializeListHead(&Console->PopupWindows); /* Colour table */ memcpy(Console->Colors, ConsoleInfo.Colors, sizeof(ConsoleInfo.Colors)); - /* Attach the ConSrv terminal to the console */ + /* + * Attach the ConSrv terminal to the console. + * This call makes a copy of our local Terminal variable. + */ Status = ConDrvRegisterTerminal(Console, &Terminal); if (!NT_SUCCESS(Status)) { @@ -462,12 +696,23 @@ ConSrvDeleteConsole(PCONSRV_CONSOLE Console) /* Remove the console from the list */ RemoveConsoleByPointer(Console); + /* Clean the Input Line Discipline */ + if (Console->LineBuffer) ConsoleFreeHeap(Console->LineBuffer); + /* Clean aliases and history */ IntDeleteAllAliases(Console); HistoryDeleteBuffers(Console); + /* Free the console title */ + ConsoleFreeUnicodeString(&Console->OriginalTitle); + ConsoleFreeUnicodeString(&Console->Title); + /* Now, call the driver. ConDrvDeregisterTerminal is called on-demand. */ - ConDrvDeleteConsole(Console); + ConDrvDeleteConsole((PCONSOLE)Console); + + /* Deinit the ConSrv terminal */ + // FIXME!! + // ConSrvDeinitTerminal(&Terminal); // &ConSrvConsole->Console->TermIFace } @@ -484,7 +729,7 @@ ConSrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent, DPRINT("ConSrvConsoleCtrlEventTimeout Parent ProcessId = %x\n", ProcessData->Process->ClientId.UniqueProcess); - if (ProcessData->CtrlDispatcher) + if (ProcessData->CtrlRoutine) { _SEH2_TRY { @@ -493,7 +738,7 @@ ConSrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent, _SEH2_TRY { Thread = CreateRemoteThread(ProcessData->Process->ProcessHandle, NULL, 0, - ProcessData->CtrlDispatcher, + ProcessData->CtrlRoutine, UlongToPtr(CtrlEvent), 0, NULL); if (NULL == Thread) { @@ -502,7 +747,8 @@ ConSrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent, } else { - DPRINT("ProcessData->CtrlDispatcher remote thread creation succeeded, ProcessId = %x, Process = 0x%p\n", ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process); + DPRINT("ProcessData->CtrlRoutine remote thread creation succeeded, ProcessId = %x, Process = 0x%p\n", + ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process); WaitForSingleObject(Thread, Timeout); } } @@ -579,7 +825,7 @@ ConSrvConsoleProcessCtrlEvent(IN PCONSRV_CONSOLE Console, PCONSOLE_PROCESS_DATA current; /* If the console is already being destroyed, just return */ - if (!ConDrvValidateConsoleState(Console, CONSOLE_RUNNING)) + if (!ConDrvValidateConsoleState((PCONSOLE)Console, CONSOLE_RUNNING)) return STATUS_UNSUCCESSFUL; /* @@ -608,9 +854,6 @@ ConSrvConsoleProcessCtrlEvent(IN PCONSRV_CONSOLE Console, } - - - /* PUBLIC SERVER APIS *********************************************************/ CSR_API(SrvAllocConsole) @@ -619,6 +862,7 @@ CSR_API(SrvAllocConsole) PCONSOLE_ALLOCCONSOLE AllocConsoleRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.AllocConsoleRequest; PCSR_PROCESS CsrProcess = CsrGetClientThread()->Process; PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess); + CONSOLE_INIT_INFO ConsoleInitInfo; if (ProcessData->ConsoleHandle != NULL) { @@ -626,33 +870,64 @@ CSR_API(SrvAllocConsole) return STATUS_ACCESS_DENIED; } - if (!CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&AllocConsoleRequest->ConsoleStartInfo, - 1, - sizeof(CONSOLE_START_INFO))) + if ( !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AllocConsoleRequest->ConsoleStartInfo, + 1, + sizeof(CONSOLE_START_INFO)) || + !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AllocConsoleRequest->ConsoleTitle, + AllocConsoleRequest->TitleLength, + sizeof(BYTE)) || + !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AllocConsoleRequest->Desktop, + AllocConsoleRequest->DesktopLength, + sizeof(BYTE)) || + !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AllocConsoleRequest->CurDir, + AllocConsoleRequest->CurDirLength, + sizeof(BYTE)) || + !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AllocConsoleRequest->AppName, + AllocConsoleRequest->AppNameLength, + sizeof(BYTE)) ) { return STATUS_INVALID_PARAMETER; } + /* Initialize the console initialization info structure */ + ConsoleInitInfo.ConsoleStartInfo = AllocConsoleRequest->ConsoleStartInfo; + ConsoleInitInfo.TitleLength = AllocConsoleRequest->TitleLength; + ConsoleInitInfo.ConsoleTitle = AllocConsoleRequest->ConsoleTitle; + ConsoleInitInfo.DesktopLength = AllocConsoleRequest->DesktopLength; + ConsoleInitInfo.Desktop = AllocConsoleRequest->Desktop; + ConsoleInitInfo.AppNameLength = AllocConsoleRequest->AppNameLength; + ConsoleInitInfo.AppName = AllocConsoleRequest->AppName; + ConsoleInitInfo.CurDirLength = AllocConsoleRequest->CurDirLength; + ConsoleInitInfo.CurDir = AllocConsoleRequest->CurDir; + /* Initialize a new Console owned by the Console Leader Process */ Status = ConSrvAllocateConsole(ProcessData, - &AllocConsoleRequest->InputHandle, - &AllocConsoleRequest->OutputHandle, - &AllocConsoleRequest->ErrorHandle, - AllocConsoleRequest->ConsoleStartInfo); + &AllocConsoleRequest->ConsoleStartInfo->InputHandle, + &AllocConsoleRequest->ConsoleStartInfo->OutputHandle, + &AllocConsoleRequest->ConsoleStartInfo->ErrorHandle, + &ConsoleInitInfo); if (!NT_SUCCESS(Status)) { DPRINT1("Console allocation failed\n"); return Status; } + /* Mark the process as having a console */ + ProcessData->ConsoleApp = TRUE; + CsrProcess->Flags |= CsrProcessIsConsoleApp; + /* Return the console handle and the input wait handle to the caller */ - AllocConsoleRequest->ConsoleHandle = ProcessData->ConsoleHandle; - AllocConsoleRequest->InputWaitHandle = ProcessData->InputWaitHandle; + AllocConsoleRequest->ConsoleStartInfo->ConsoleHandle = ProcessData->ConsoleHandle; + AllocConsoleRequest->ConsoleStartInfo->InputWaitHandle = ProcessData->InputWaitHandle; /* Set the Property-Dialog and Control-Dispatcher handlers */ - ProcessData->PropDispatcher = AllocConsoleRequest->PropDispatcher; - ProcessData->CtrlDispatcher = AllocConsoleRequest->CtrlDispatcher; + ProcessData->PropRoutine = AllocConsoleRequest->PropRoutine; + ProcessData->CtrlRoutine = AllocConsoleRequest->CtrlRoutine; return STATUS_SUCCESS; } @@ -674,6 +949,14 @@ CSR_API(SrvAttachConsole) return STATUS_ACCESS_DENIED; } + if (!CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&AttachConsoleRequest->ConsoleStartInfo, + 1, + sizeof(CONSOLE_START_INFO))) + { + return STATUS_INVALID_PARAMETER; + } + /* Check whether we try to attach to the parent's console */ if (ProcessId == ULongToHandle(ATTACH_PARENT_PROCESS)) { @@ -714,22 +997,26 @@ CSR_API(SrvAttachConsole) Status = ConSrvInheritConsole(TargetProcessData, SourceProcessData->ConsoleHandle, TRUE, - &AttachConsoleRequest->InputHandle, - &AttachConsoleRequest->OutputHandle, - &AttachConsoleRequest->ErrorHandle); + &AttachConsoleRequest->ConsoleStartInfo->InputHandle, + &AttachConsoleRequest->ConsoleStartInfo->OutputHandle, + &AttachConsoleRequest->ConsoleStartInfo->ErrorHandle); if (!NT_SUCCESS(Status)) { DPRINT1("Console inheritance failed\n"); goto Quit; } + /* Mark the process as having a console */ + TargetProcessData->ConsoleApp = TRUE; + TargetProcess->Flags |= CsrProcessIsConsoleApp; + /* Return the console handle and the input wait handle to the caller */ - AttachConsoleRequest->ConsoleHandle = TargetProcessData->ConsoleHandle; - AttachConsoleRequest->InputWaitHandle = TargetProcessData->InputWaitHandle; + AttachConsoleRequest->ConsoleStartInfo->ConsoleHandle = TargetProcessData->ConsoleHandle; + AttachConsoleRequest->ConsoleStartInfo->InputWaitHandle = TargetProcessData->InputWaitHandle; /* Set the Property-Dialog and Control-Dispatcher handlers */ - TargetProcessData->PropDispatcher = AttachConsoleRequest->PropDispatcher; - TargetProcessData->CtrlDispatcher = AttachConsoleRequest->CtrlDispatcher; + TargetProcessData->PropRoutine = AttachConsoleRequest->PropRoutine; + TargetProcessData->CtrlRoutine = AttachConsoleRequest->CtrlRoutine; Status = STATUS_SUCCESS; @@ -741,7 +1028,15 @@ Quit: CSR_API(SrvFreeConsole) { + PCSR_PROCESS CsrProcess = CsrGetClientThread()->Process; + PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess); + ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process)); + + /* Mark the process as not having a console anymore */ + ProcessData->ConsoleApp = FALSE; + CsrProcess->Flags &= ~CsrProcessIsConsoleApp; + return STATUS_SUCCESS; } @@ -755,13 +1050,34 @@ CSR_API(SrvGetConsoleMode) PCONSOLE_GETSETCONSOLEMODE ConsoleModeRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleModeRequest; PCONSOLE_IO_OBJECT Object; + PULONG ConsoleMode = &ConsoleModeRequest->Mode; + Status = ConSrvGetObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process), ConsoleModeRequest->Handle, &Object, NULL, GENERIC_READ, TRUE, 0); if (!NT_SUCCESS(Status)) return Status; + /* Get the standard console modes */ Status = ConDrvGetConsoleMode(Object->Console, Object, - &ConsoleModeRequest->Mode); + ConsoleMode); + if (NT_SUCCESS(Status)) + { + /* + * If getting the console modes succeeds, then retrieve + * the extended CONSRV-specific input modes. + */ + if (INPUT_BUFFER == Object->Type) + { + if (Object->Console->InsertMode || Object->Console->QuickEdit) + { + /* Windows also adds ENABLE_EXTENDED_FLAGS, even if it's not documented on MSDN */ + *ConsoleMode |= ENABLE_EXTENDED_FLAGS; + + if (Object->Console->InsertMode) *ConsoleMode |= ENABLE_INSERT_MODE; + if (Object->Console->QuickEdit ) *ConsoleMode |= ENABLE_QUICK_EDIT_MODE; + } + } + } ConSrvReleaseObject(Object, TRUE); return Status; @@ -773,32 +1089,63 @@ ConDrvSetConsoleMode(IN PCONSOLE Console, IN ULONG ConsoleMode); CSR_API(SrvSetConsoleMode) { +#define CONSOLE_VALID_CONTROL_MODES ( ENABLE_EXTENDED_FLAGS | \ + ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE ) + NTSTATUS Status; PCONSOLE_GETSETCONSOLEMODE ConsoleModeRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ConsoleModeRequest; PCONSOLE_IO_OBJECT Object; + ULONG ConsoleMode = ConsoleModeRequest->Mode; + Status = ConSrvGetObject(ConsoleGetPerProcessData(CsrGetClientThread()->Process), ConsoleModeRequest->Handle, &Object, NULL, GENERIC_WRITE, TRUE, 0); if (!NT_SUCCESS(Status)) return Status; + /* Set the standard console modes (without the CONSRV-specific input modes) */ + ConsoleMode &= ~CONSOLE_VALID_CONTROL_MODES; // Remove CONSRV-specific input modes. Status = ConDrvSetConsoleMode(Object->Console, Object, - ConsoleModeRequest->Mode); + ConsoleMode); + if (NT_SUCCESS(Status)) + { + /* + * If setting the console modes succeeds, then set + * the extended CONSRV-specific input modes. + */ + if (INPUT_BUFFER == Object->Type) + { + ConsoleMode = ConsoleModeRequest->Mode; + + if (ConsoleMode & CONSOLE_VALID_CONTROL_MODES) + { + /* + * If we use control mode flags without ENABLE_EXTENDED_FLAGS, + * then consider the flags invalid. + */ + if ((ConsoleMode & ENABLE_EXTENDED_FLAGS) == 0) + { + Status = STATUS_INVALID_PARAMETER; + } + else + { + Object->Console->InsertMode = !!(ConsoleMode & ENABLE_INSERT_MODE); + Object->Console->QuickEdit = !!(ConsoleMode & ENABLE_QUICK_EDIT_MODE); + } + } + } + } ConSrvReleaseObject(Object, TRUE); return Status; } -NTSTATUS NTAPI -ConDrvGetConsoleTitle(IN PCONSOLE Console, - IN BOOLEAN Unicode, - IN OUT PVOID TitleBuffer, - IN OUT PULONG BufLength); CSR_API(SrvGetConsoleTitle) { NTSTATUS Status; PCONSOLE_GETSETCONSOLETITLE TitleRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.TitleRequest; PCONSRV_CONSOLE Console; + ULONG Length; if (!CsrValidateMessageBuffer(ApiMessage, (PVOID)&TitleRequest->Title, @@ -815,26 +1162,52 @@ CSR_API(SrvGetConsoleTitle) return Status; } - Status = ConDrvGetConsoleTitle(Console, - TitleRequest->Unicode, - TitleRequest->Title, - &TitleRequest->Length); + /* Copy title of the console to the user title buffer */ + if (TitleRequest->Unicode) + { + if (TitleRequest->Length >= sizeof(WCHAR)) + { + Length = min(TitleRequest->Length - sizeof(WCHAR), Console->Title.Length); + RtlCopyMemory(TitleRequest->Title, Console->Title.Buffer, Length); + ((PWCHAR)TitleRequest->Title)[Length / sizeof(WCHAR)] = L'\0'; + TitleRequest->Length = Length; + } + else + { + TitleRequest->Length = Console->Title.Length; + } + } + else + { + if (TitleRequest->Length >= sizeof(CHAR)) + { + Length = min(TitleRequest->Length - sizeof(CHAR), Console->Title.Length / sizeof(WCHAR)); + Length = WideCharToMultiByte(Console->InputCodePage, 0, + Console->Title.Buffer, Length, + TitleRequest->Title, Length, + NULL, NULL); + ((PCHAR)TitleRequest->Title)[Length] = '\0'; + TitleRequest->Length = Length; + } + else + { + TitleRequest->Length = Console->Title.Length / sizeof(WCHAR); + } + } ConSrvReleaseConsole(Console, TRUE); return Status; } -NTSTATUS NTAPI -ConDrvSetConsoleTitle(IN PCONSOLE Console, - IN BOOLEAN Unicode, - IN PVOID TitleBuffer, - IN ULONG BufLength); CSR_API(SrvSetConsoleTitle) { NTSTATUS Status; PCONSOLE_GETSETCONSOLETITLE TitleRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.TitleRequest; PCONSRV_CONSOLE Console; + PWCHAR Buffer; + ULONG Length; + if (!CsrValidateMessageBuffer(ApiMessage, (PVOID)&TitleRequest->Title, TitleRequest->Length, @@ -850,12 +1223,56 @@ CSR_API(SrvSetConsoleTitle) return Status; } - Status = ConDrvSetConsoleTitle(Console, - TitleRequest->Unicode, - TitleRequest->Title, - TitleRequest->Length); - if (NT_SUCCESS(Status)) TermChangeTitle(Console); + if (TitleRequest->Unicode) + { + /* Length is in bytes */ + Length = TitleRequest->Length; + } + else + { + /* Use the console input CP for the conversion */ + Length = MultiByteToWideChar(Console->InputCodePage, 0, + TitleRequest->Title, TitleRequest->Length, + NULL, 0); + /* The returned Length was in number of wchars, convert it in bytes */ + Length *= sizeof(WCHAR); + } + /* Allocate a new buffer to hold the new title (NULL-terminated) */ + Buffer = ConsoleAllocHeap(HEAP_ZERO_MEMORY, Length + sizeof(WCHAR)); + if (!Buffer) + { + Status = STATUS_NO_MEMORY; + goto Quit; + } + + /* Free the old title */ + ConsoleFreeUnicodeString(&Console->Title); + + /* Copy title to console */ + Console->Title.Buffer = Buffer; + Console->Title.Length = Length; + Console->Title.MaximumLength = Console->Title.Length + sizeof(WCHAR); + + if (TitleRequest->Unicode) + { + RtlCopyMemory(Console->Title.Buffer, TitleRequest->Title, Console->Title.Length); + } + else + { + MultiByteToWideChar(Console->InputCodePage, 0, + TitleRequest->Title, TitleRequest->Length, + Console->Title.Buffer, + Console->Title.Length / sizeof(WCHAR)); + } + + /* NULL-terminate */ + Console->Title.Buffer[Console->Title.Length / sizeof(WCHAR)] = L'\0'; + + TermChangeTitle(Console); + Status = STATUS_SUCCESS; + +Quit: ConSrvReleaseConsole(Console, TRUE); return Status; } diff --git a/win32ss/user/winsrv/consrv/console.h b/win32ss/user/winsrv/consrv/console.h index a63754e4cbd..7118dffb327 100644 --- a/win32ss/user/winsrv/consrv/console.h +++ b/win32ss/user/winsrv/consrv/console.h @@ -8,27 +8,41 @@ #pragma once +typedef struct _CONSOLE_INIT_INFO +{ + PCONSOLE_START_INFO ConsoleStartInfo; + + ULONG TitleLength; + PWCHAR ConsoleTitle; + ULONG DesktopLength; + PWCHAR Desktop; + ULONG AppNameLength; + PWCHAR AppName; + ULONG CurDirLength; + PWCHAR CurDir; +} CONSOLE_INIT_INFO, *PCONSOLE_INIT_INFO; + VOID NTAPI ConSrvInitConsoleSupport(VOID); NTSTATUS NTAPI ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, - OUT struct _CONSOLE** /* PCONSOLE* */ NewConsole, - IN OUT PCONSOLE_START_INFO ConsoleStartInfo, + OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ NewConsole, + IN OUT PCONSOLE_INIT_INFO ConsoleInitInfo, IN ULONG ConsoleLeaderProcessId); -VOID NTAPI ConSrvDeleteConsole(struct _CONSOLE* /* PCONSOLE */ Console); +VOID NTAPI ConSrvDeleteConsole(struct _CONSRV_CONSOLE* /* PCONSRV_CONSOLE */ Console); NTSTATUS ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData, - OUT struct _CONSOLE** /* PCONSOLE* */ Console, + OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ Console, IN BOOLEAN LockConsole); VOID -ConSrvReleaseConsole(IN struct _CONSOLE* /* PCONSOLE */ Console, +ConSrvReleaseConsole(IN struct _CONSRV_CONSOLE* /* PCONSRV_CONSOLE */ Console, IN BOOLEAN WasConsoleLocked); BOOLEAN NTAPI -ConSrvValidateConsole(OUT struct _CONSOLE** /* PCONSOLE* */ Console, +ConSrvValidateConsole(OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ Console, IN HANDLE ConsoleHandle, IN CONSOLE_STATE ExpectedState, IN BOOLEAN LockConsole); diff --git a/win32ss/user/winsrv/consrv/consrv.h b/win32ss/user/winsrv/consrv/consrv.h index 2c9c1e795f5..09b87fc81f5 100644 --- a/win32ss/user/winsrv/consrv/consrv.h +++ b/win32ss/user/winsrv/consrv/consrv.h @@ -51,10 +51,9 @@ typedef struct _CONSOLE_PROCESS_DATA { LIST_ENTRY ConsoleLink; PCSR_PROCESS Process; // Process owning this structure. - HANDLE InputWaitHandle; HANDLE ConsoleHandle; - HANDLE ParentConsoleHandle; + HANDLE InputWaitHandle; BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise. @@ -62,12 +61,21 @@ typedef struct _CONSOLE_PROCESS_DATA ULONG HandleTableSize; struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table - LPTHREAD_START_ROUTINE CtrlDispatcher; - LPTHREAD_START_ROUTINE PropDispatcher; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS. + LPTHREAD_START_ROUTINE CtrlRoutine; + LPTHREAD_START_ROUTINE PropRoutine; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS. + // LPTHREAD_START_ROUTINE ImeRoutine; } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA; + +// Helper for code refactoring +// #define USE_NEW_CONSOLE_WAY + +#ifndef USE_NEW_CONSOLE_WAY #include "include/conio.h" -// #include "include/conio_winsrv.h" +#else +#include "include/conio_winsrv.h" +#endif + #include "include/console.h" #include "include/settings.h" #include "include/term.h" diff --git a/win32ss/user/winsrv/consrv/frontendctl.c b/win32ss/user/winsrv/consrv/frontendctl.c index 24bef400a2e..865a98e0317 100644 --- a/win32ss/user/winsrv/consrv/frontendctl.c +++ b/win32ss/user/winsrv/consrv/frontendctl.c @@ -143,7 +143,7 @@ CSR_API(SrvSetConsoleDisplayMode) TRUE); if (!NT_SUCCESS(Status)) return Status; - Console = Buff->Header.Console; + Console = (PCONSRV_CONSOLE)Buff->Header.Console; if (TermSetDisplayMode(Console, SetDisplayModeRequest->DisplayMode)) { @@ -163,14 +163,14 @@ CSR_API(SrvGetLargestConsoleWindowSize) { NTSTATUS Status; PCONSOLE_GETLARGESTWINDOWSIZE GetLargestWindowSizeRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetLargestWindowSizeRequest; + PCONSOLE /*PCONSRV_CONSOLE*/ Console; PCONSOLE_SCREEN_BUFFER Buff; - PCONSRV_CONSOLE Console; Status = ConSrvGetTextModeBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process), - GetLargestWindowSizeRequest->OutputHandle, - &Buff, - GENERIC_READ, - TRUE); + GetLargestWindowSizeRequest->OutputHandle, + &Buff, + GENERIC_READ, + TRUE); if (!NT_SUCCESS(Status)) return Status; Console = Buff->Header.Console; @@ -184,7 +184,7 @@ CSR_API(SrvShowConsoleCursor) { NTSTATUS Status; PCONSOLE_SHOWCURSOR ShowCursorRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ShowCursorRequest; - PCONSRV_CONSOLE Console; + PCONSOLE /*PCONSRV_CONSOLE*/ Console; PCONSOLE_SCREEN_BUFFER Buff; Status = ConSrvGetScreenBuffer(ConsoleGetPerProcessData(CsrGetClientThread()->Process), @@ -220,7 +220,7 @@ CSR_API(SrvSetConsoleCursor) TRUE); if (!NT_SUCCESS(Status)) return Status; - Console = Buff->Header.Console; + Console = (PCONSRV_CONSOLE)Buff->Header.Console; Success = TermSetMouseCursor(Console, SetCursorRequest->CursorHandle); @@ -242,7 +242,7 @@ CSR_API(SrvConsoleMenuControl) TRUE); if (!NT_SUCCESS(Status)) return Status; - Console = Buff->Header.Console; + Console = (PCONSRV_CONSOLE)Buff->Header.Console; MenuControlRequest->MenuHandle = TermMenuControl(Console, MenuControlRequest->CmdIdLow, @@ -275,7 +275,8 @@ CSR_API(SrvGetConsoleWindow) PCONSOLE_GETWINDOW GetWindowRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetWindowRequest; PCONSRV_CONSOLE Console; - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; GetWindowRequest->WindowHandle = TermGetConsoleWindowHandle(Console); @@ -290,7 +291,8 @@ CSR_API(SrvSetConsoleIcon) PCONSOLE_SETICON SetIconRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetIconRequest; PCONSRV_CONSOLE Console; - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Status = (TermChangeIcon(Console, SetIconRequest->IconHandle) @@ -307,7 +309,8 @@ CSR_API(SrvGetConsoleSelectionInfo) PCONSOLE_GETSELECTIONINFO GetSelectionInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetSelectionInfoRequest; PCONSRV_CONSOLE Console; - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); if (!NT_SUCCESS(Status)) return Status; Status = (TermGetSelectionInfo(Console, &GetSelectionInfoRequest->Info) diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c index 84de1871b20..4a5102f2584 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c @@ -539,10 +539,15 @@ InitFonts(PGUI_CONSOLE_DATA GuiData, TEXTMETRICW Metrics; SIZE CharSize; + hDC = GetDC(GuiData->hWindow); + /* * Initialize a new NORMAL font and get its metrics. */ + FontSize.Y = FontSize.Y > 0 ? -MulDiv(FontSize.Y, GetDeviceCaps(hDC, LOGPIXELSY), 72) + : FontSize.Y; + NewFont = CreateFontW(FontSize.Y, FontSize.X, 0, @@ -554,20 +559,13 @@ InitFonts(PGUI_CONSOLE_DATA GuiData, OEM_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, // NONANTIALIASED_QUALITY ; ANTIALIASED_QUALITY + DEFAULT_QUALITY, FIXED_PITCH | FontFamily, FaceName); if (NewFont == NULL) { DPRINT1("InitFonts: CreateFontW failed\n"); - return FALSE; - } - - hDC = GetDC(GuiData->hWindow); - if (hDC == NULL) - { - DPRINT1("InitFonts: GetDC failed\n"); - DeleteObject(NewFont); + ReleaseDC(GuiData->hWindow, hDC); return FALSE; } @@ -591,7 +589,7 @@ InitFonts(PGUI_CONSOLE_DATA GuiData, GuiData->CharWidth = Metrics.tmMaxCharWidth; GuiData->CharHeight = Metrics.tmHeight + Metrics.tmExternalLeading; - /* Measure real char width more precisely if possible. */ + /* Measure real char width more precisely if possible */ if (GetTextExtentPoint32W(hDC, L"R", 1, &CharSize)) GuiData->CharWidth = CharSize.cx; @@ -2437,7 +2435,7 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) } case PM_CONSOLE_BEEP: - DPRINT1("Beep !!\n"); + DPRINT1("Beep\n"); Beep(800, 200); break; diff --git a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h index dee5c3254c2..456501b031c 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h +++ b/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h @@ -38,6 +38,7 @@ typedef struct _GUI_CONSOLE_DATA CRITICAL_SECTION Lock; BOOL WindowSizeLock; HANDLE hGuiInitEvent; + HANDLE hGuiTermEvent; POINT OldCursor; diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c index 12dce743a21..f7d67ef9cfc 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c @@ -296,7 +296,7 @@ GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData, pSharedInfo->ci.HistoryNoDup = Console->HistoryNoDup; pSharedInfo->ci.QuickEdit = Console->QuickEdit; pSharedInfo->ci.InsertMode = Console->InsertMode; - pSharedInfo->ci.InputBufferSize = 0; + /////////////pSharedInfo->ci.InputBufferSize = 0; pSharedInfo->ci.ScreenBufferSize = ActiveBuffer->ScreenBufferSize; pSharedInfo->ci.ConsoleSize = ActiveBuffer->ViewSize; pSharedInfo->ci.CursorBlinkOn; @@ -372,7 +372,7 @@ GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData, } /* Start the properties dialog */ - if (ProcessData->PropDispatcher) + if (ProcessData->PropRoutine) { _SEH2_TRY { @@ -381,7 +381,7 @@ GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData, _SEH2_TRY { Thread = CreateRemoteThread(ProcessData->Process->ProcessHandle, NULL, 0, - ProcessData->PropDispatcher, + ProcessData->PropRoutine, (PVOID)hClientSection, 0, NULL); if (NULL == Thread) { @@ -389,7 +389,8 @@ GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData, } else { - DPRINT("ProcessData->PropDispatcher remote thread creation succeeded, ProcessId = %x, Process = 0x%p\n", ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process); + DPRINT("ProcessData->PropRoutine remote thread creation succeeded, ProcessId = %x, Process = 0x%p\n", + ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process); /// WaitForSingleObject(Thread, INFINITE); } } @@ -643,7 +644,6 @@ GuiApplyWindowsConsoleSettings(PGUI_CONSOLE_DATA GuiData, Console->OriginalTitle.Length / sizeof(WCHAR)); wcsncpy(pSharedInfo->ci.ConsoleTitle, Console->OriginalTitle.Buffer, Length); #endif - // ULONG ConInfo.InputBufferSize = pConInfo-> // BOOLEAN ConInfo.CursorBlinkOn = pConInfo-> // BOOLEAN ConInfo.ForceCursorOff = pConInfo-> diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h index 593c14e5e2d..792fe1db81c 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h +++ b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.h @@ -76,7 +76,7 @@ typedef struct _CONSOLE_STATE_INFO COLORREF ColorTable[16]; ULONG CodePage; - HWND HWnd; + HWND hWnd; WCHAR ConsoleTitle[256]; } CONSOLE_STATE_INFO, *PCONSOLE_STATE_INFO; diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c index 730d9a30c87..530b9ac7469 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c @@ -13,9 +13,6 @@ #include -#define COBJMACROS -#include - #define NDEBUG #include @@ -45,7 +42,8 @@ typedef struct _GUI_INIT_INFO } GUI_INIT_INFO, *PGUI_INIT_INFO; static BOOL ConsInitialized = FALSE; -static HWND NotifyWnd = NULL; +static HANDLE hInputThread = NULL; +static DWORD dwInputThreadId = 0; extern HICON ghDefaultIcon; extern HICON ghDefaultIconSm; @@ -142,48 +140,59 @@ VOID SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen); VOID CreateSysMenu(HWND hWnd); -static LRESULT CALLBACK -GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) + +static DWORD NTAPI +GuiConsoleInputThread(PVOID Data) { - HWND NewWindow; - LONG WindowCount; - MSG Msg; + PHANDLE GraphicsStartupEvent = (PHANDLE)Data; + LONG WindowCount = 0; + MSG msg; - switch (msg) + /* + * This thread dispatches all the console notifications to the notify window. + * It is common for all the console windows. + */ + + /* The thread has been initialized, set the event */ + SetEvent(*GraphicsStartupEvent); + + while (GetMessageW(&msg, NULL, 0, 0)) { - case WM_CREATE: + switch (msg.message) { - SetWindowLongW(hWnd, GWL_USERDATA, 0); - return 0; - } - - case PM_CREATE_CONSOLE: - { - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)lParam; - PCONSRV_CONSOLE Console = GuiData->Console; - RECT rcWnd; - - DPRINT("PM_CREATE_CONSOLE -- creating window\n"); - - NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, - GUI_CONWND_CLASS, - Console->Title.Buffer, - WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - ConSrvDllInstance, - (PVOID)GuiData); - if (NULL != NewWindow) + case PM_CREATE_CONSOLE: { + PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)msg.lParam; + PCONSRV_CONSOLE Console = GuiData->Console; + HWND NewWindow; + RECT rcWnd; + + DPRINT("PM_CREATE_CONSOLE -- creating window\n"); + + PrivateCsrssManualGuiCheck(-1); // co_AddGuiApp + + NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, + GUI_CONWND_CLASS, + Console->Title.Buffer, + WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + NULL, + NULL, + ConSrvDllInstance, + (PVOID)GuiData); + if (NewWindow == NULL) + { + DPRINT1("Failed to create a new console window\n"); + PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp + continue; + } + ASSERT(NewWindow == GuiData->hWindow); - WindowCount = GetWindowLongW(hWnd, GWL_USERDATA); - WindowCount++; - SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); + InterlockedIncrement(&WindowCount); // // FIXME: TODO: Move everything there into conwnd.c!OnNcCreate() @@ -208,99 +217,60 @@ GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE); DPRINT("PM_CREATE_CONSOLE -- showing window\n"); - // ShowWindow(NewWindow, (int)wParam); - ShowWindowAsync(NewWindow, (int)wParam); + // ShowWindow(NewWindow, (int)GuiData->GuiInfo.ShowWindow); + ShowWindowAsync(NewWindow, (int)GuiData->GuiInfo.ShowWindow); DPRINT("Window showed\n"); + + continue; } - return (LRESULT)NewWindow; - } - - case PM_DESTROY_CONSOLE: - { - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)lParam; - - /* Exit the full screen mode if it was already set */ - // LeaveFullScreen(GuiData); - - /* - * Window creation is done using a PostMessage(), so it's possible - * that the window that we want to destroy doesn't exist yet. - * So first empty the message queue. - */ - /* - while (PeekMessageW(&Msg, NULL, 0, 0, PM_REMOVE)) + case PM_DESTROY_CONSOLE: { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - }*/ - while (PeekMessageW(&Msg, NULL, 0, 0, PM_REMOVE)) ; + PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)msg.lParam; + MSG TempMsg; - if (GuiData->hWindow != NULL) /* && DestroyWindow(GuiData->hWindow) */ - { - DestroyWindow(GuiData->hWindow); + /* Exit the full screen mode if it was already set */ + // LeaveFullScreen(GuiData); - WindowCount = GetWindowLongW(hWnd, GWL_USERDATA); - WindowCount--; - SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); - if (0 == WindowCount) + /* + * Window creation is done using a PostMessage(), so it's possible + * that the window that we want to destroy doesn't exist yet. + * So first empty the message queue. + */ + /* + while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE)) { - NotifyWnd = NULL; - DestroyWindow(hWnd); - DPRINT("CONSRV: Going to quit the Gui Thread!!\n"); - PostQuitMessage(0); - } - } + TranslateMessage(&TempMsg); + DispatchMessageW(&TempMsg); + }*/ + while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE)) ; - return 0; + if (GuiData->hWindow == NULL) continue; + + DestroyWindow(GuiData->hWindow); + PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp + + SetEvent(GuiData->hGuiTermEvent); + + if (InterlockedDecrement(&WindowCount) == 0) + { + DPRINT("CONSRV: Going to quit the Input Thread!!\n"); + goto Quit; + } + + continue; + } } - default: - return DefWindowProcW(hWnd, msg, wParam, lParam); - } -} - -static DWORD NTAPI -GuiConsoleGuiThread(PVOID Data) -{ - MSG msg; - PHANDLE GraphicsStartupEvent = (PHANDLE)Data; - - /* - * This thread dispatches all the console notifications to the notify window. - * It is common for all the console windows. - */ - - PrivateCsrssManualGuiCheck(+1); - - NotifyWnd = CreateWindowW(L"ConSrvCreateNotify", - L"", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - ConSrvDllInstance, - NULL); - if (NULL == NotifyWnd) - { - PrivateCsrssManualGuiCheck(-1); - SetEvent(*GraphicsStartupEvent); - return 1; - } - - SetEvent(*GraphicsStartupEvent); - - while (GetMessageW(&msg, NULL, 0, 0)) - { TranslateMessage(&msg); DispatchMessageW(&msg); } - DPRINT("CONSRV: Quit the Gui Thread!!\n"); - PrivateCsrssManualGuiCheck(-1); +Quit: + DPRINT("CONSRV: Quit the Input Thread!!\n"); + + hInputThread = NULL; + dwInputThreadId = 0; return 1; } @@ -308,76 +278,43 @@ GuiConsoleGuiThread(PVOID Data) static BOOL GuiInit(VOID) { - WNDCLASSEXW wc; - /* Exit if we were already initialized */ // if (ConsInitialized) return TRUE; /* - * Initialize and register the different window classes, if needed. + * Initialize and register the console window class, if needed. */ if (!ConsInitialized) { - /* Initialize the notification window class */ - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpszClassName = L"ConSrvCreateNotify"; - wc.lpfnWndProc = GuiConsoleNotifyWndProc; - wc.style = 0; - wc.hInstance = ConSrvDllInstance; - wc.hIcon = NULL; - wc.hIconSm = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClassExW(&wc) == 0) - { - DPRINT1("Failed to register GUI notify wndproc\n"); - return FALSE; - } - - /* Initialize the console window class */ - if (!RegisterConWndClass(ConSrvDllInstance)) - return FALSE; - + if (!RegisterConWndClass(ConSrvDllInstance)) return FALSE; ConsInitialized = TRUE; } /* - * Set-up the notification window + * Set-up the console input thread */ - if (NULL == NotifyWnd) + if (hInputThread == NULL) { - HANDLE ThreadHandle; - HANDLE GraphicsStartupEvent; + HANDLE GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + if (GraphicsStartupEvent == NULL) return FALSE; - GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if (NULL == GraphicsStartupEvent) return FALSE; - - ThreadHandle = CreateThread(NULL, + hInputThread = CreateThread(NULL, 0, - GuiConsoleGuiThread, + GuiConsoleInputThread, (PVOID)&GraphicsStartupEvent, 0, - NULL); - if (NULL == ThreadHandle) + &dwInputThreadId); + if (hInputThread == NULL) { CloseHandle(GraphicsStartupEvent); - DPRINT1("CONSRV: Failed to create graphics console thread. Expect problems\n"); + DPRINT1("CONSRV: Failed to create graphics console thread.\n"); return FALSE; } - SetThreadPriority(ThreadHandle, THREAD_PRIORITY_HIGHEST); - CloseHandle(ThreadHandle); + SetThreadPriority(hInputThread, THREAD_PRIORITY_HIGHEST); + CloseHandle(hInputThread); WaitForSingleObject(GraphicsStartupEvent, INFINITE); CloseHandle(GraphicsStartupEvent); - - if (NULL == NotifyWnd) - { - DPRINT1("CONSRV: Failed to create notification window.\n"); - return FALSE; - } } // ConsInitialized = TRUE; @@ -386,7 +323,6 @@ GuiInit(VOID) } - /****************************************************************************** * GUI Console Driver * ******************************************************************************/ @@ -405,9 +341,7 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, PGUI_CONSOLE_DATA GuiData; GUI_CONSOLE_INFO TermInfo; - SIZE_T Length = 0; - LPWSTR IconPath = NULL; - INT IconIndex = 0; + SIZE_T Length = 0; if (This == NULL || Console == NULL || This->OldData == NULL) return STATUS_INVALID_PARAMETER; @@ -422,10 +356,6 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, ConsoleInfo = GuiInitInfo->ConsoleInfo; ConsoleStartInfo = GuiInitInfo->ConsoleStartInfo; - IconPath = ConsoleStartInfo->IconPath; - IconIndex = ConsoleStartInfo->IconIndex; - - /* Terminal data allocation */ GuiData = ConsoleAllocHeap(HEAP_ZERO_MEMORY, sizeof(GUI_CONSOLE_DATA)); if (!GuiData) @@ -451,10 +381,10 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, /* 1. Load the default settings */ GuiConsoleGetDefaultSettings(&TermInfo, GuiInitInfo->ProcessId); - /* 3. Load the remaining console settings via the registry. */ + /* 3. Load the remaining console settings via the registry */ if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) { - /* Load the terminal infos from the registry. */ + /* Load the terminal infos from the registry */ GuiConsoleReadUserSettings(&TermInfo, ConsoleInfo->ConsoleTitle, GuiInitInfo->ProcessId); @@ -500,29 +430,17 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, GuiData->GuiInfo.AutoPosition = TermInfo.AutoPosition; GuiData->GuiInfo.WindowOrigin = TermInfo.WindowOrigin; - /* Initialize the icon handles to their default values */ - GuiData->hIcon = ghDefaultIcon; - GuiData->hIconSm = ghDefaultIconSm; + /* Initialize the icon handles */ + if (ConsoleStartInfo->hIcon != NULL) + GuiData->hIcon = ConsoleStartInfo->hIcon; + else + GuiData->hIcon = ghDefaultIcon; + + if (ConsoleStartInfo->hIconSm != NULL) + GuiData->hIconSm = ConsoleStartInfo->hIconSm; + else + GuiData->hIconSm = ghDefaultIconSm; - /* Get the associated icon, if any */ - if (IconPath == NULL || IconPath[0] == L'\0') - { - IconPath = ConsoleStartInfo->AppPath; - IconIndex = 0; - } - DPRINT("IconPath = %S ; IconIndex = %lu\n", (IconPath ? IconPath : L"n/a"), IconIndex); - if (IconPath && IconPath[0] != L'\0') - { - HICON hIcon = NULL, hIconSm = NULL; - PrivateExtractIconExW(IconPath, - IconIndex, - &hIcon, - &hIconSm, - 1); - DPRINT("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm); - if (hIcon != NULL) GuiData->hIcon = hIcon; - if (hIconSm != NULL) GuiData->hIconSm = hIconSm; - } ASSERT(GuiData->hIcon && GuiData->hIconSm); /* Mouse is shown by default with its default cursor shape */ @@ -545,6 +463,11 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, GuiData->LineSelection = FALSE; // Default to block selection // TODO: Retrieve the selection mode via the registry. + /* Finally, finish to initialize the frontend structure */ + This->Data = GuiData; + if (This->OldData) ConsoleFreeHeap(This->OldData); + This->OldData = NULL; + /* * We need to wait until the GUI has been fully initialized * to retrieve custom settings i.e. WindowSize etc... @@ -552,11 +475,12 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, * yet implemented. */ GuiData->hGuiInitEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + GuiData->hGuiTermEvent = CreateEventW(NULL, FALSE, FALSE, NULL); DPRINT("GUI - Checkpoint\n"); /* Create the terminal window */ - PostMessageW(NotifyWnd, PM_CREATE_CONSOLE, GuiData->GuiInfo.ShowWindow, (LPARAM)GuiData); + PostThreadMessageW(dwInputThreadId, PM_CREATE_CONSOLE, 0, (LPARAM)GuiData); /* Wait until initialization has finished */ WaitForSingleObject(GuiData->hGuiInitEvent, INFINITE); @@ -572,11 +496,6 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, return STATUS_UNSUCCESSFUL; } - /* Finally, finish to initialize the frontend structure */ - This->Data = GuiData; - if (This->OldData) ConsoleFreeHeap(This->OldData); - This->OldData = NULL; - return STATUS_SUCCESS; } @@ -585,7 +504,12 @@ GuiDeinitFrontEnd(IN OUT PFRONTEND This) { PGUI_CONSOLE_DATA GuiData = This->Data; - SendMessageW(NotifyWnd, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); + DPRINT("Send PM_DESTROY_CONSOLE message and wait on hGuiTermEvent...\n"); + PostThreadMessageW(dwInputThreadId, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); + WaitForSingleObject(GuiData->hGuiTermEvent, INFINITE); + DPRINT("hGuiTermEvent set\n"); + CloseHandle(GuiData->hGuiTermEvent); + GuiData->hGuiTermEvent = NULL; DPRINT("Destroying icons !! - GuiData->hIcon = 0x%p ; ghDefaultIcon = 0x%p ; GuiData->hIconSm = 0x%p ; ghDefaultIconSm = 0x%p\n", GuiData->hIcon, ghDefaultIcon, GuiData->hIconSm, ghDefaultIconSm); @@ -675,6 +599,15 @@ GuiWriteStream(IN OUT PFRONTEND This, SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); } +/* static */ VOID NTAPI +GuiRingBell(IN OUT PFRONTEND This) +{ + PGUI_CONSOLE_DATA GuiData = This->Data; + + /* Emit an error beep sound */ + SendNotifyMessage(GuiData->hWindow, PM_CONSOLE_BEEP, 0, 0); +} + static BOOL NTAPI GuiSetCursorInfo(IN OUT PFRONTEND This, PCONSOLE_SCREEN_BUFFER Buff) @@ -1083,6 +1016,7 @@ static FRONTEND_VTBL GuiVtbl = GuiDeinitFrontEnd, GuiDrawRegion, GuiWriteStream, + GuiRingBell, GuiSetCursorInfo, GuiSetScreenInfo, GuiResizeTerminal, @@ -1104,139 +1038,21 @@ static FRONTEND_VTBL GuiVtbl = }; -static BOOL -LoadShellLinkConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo, - IN OUT PCONSOLE_INFO ConsoleInfo) -{ -#define PATH_SEPARATOR L'\\' - - BOOL RetVal = FALSE; - HRESULT hRes = S_OK; - LPWSTR LinkName = NULL; - SIZE_T Length = 0; - - if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) - return FALSE; - - ConsoleStartInfo->IconPath[0] = L'\0'; - ConsoleStartInfo->IconIndex = 0; - - /* 1- Find the last path separator if any */ - LinkName = wcsrchr(ConsoleStartInfo->ConsoleTitle, PATH_SEPARATOR); - if (LinkName == NULL) - { - LinkName = ConsoleStartInfo->ConsoleTitle; - } - else - { - /* Skip the path separator */ - ++LinkName; - } - - /* 2- Check for the link extension. The name ".lnk" is considered invalid. */ - Length = wcslen(LinkName); - if ( (Length <= 4) || (wcsicmp(LinkName + (Length - 4), L".lnk") != 0) ) - return FALSE; - - /* 3- It may be a link. Try to retrieve some properties */ - hRes = CoInitialize(NULL); - if (SUCCEEDED(hRes)) - { - /* Get a pointer to the IShellLink interface */ - IShellLinkW* pshl = NULL; - hRes = CoCreateInstance(&CLSID_ShellLink, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IShellLinkW, - (LPVOID*)&pshl); - if (SUCCEEDED(hRes)) - { - /* Get a pointer to the IPersistFile interface */ - IPersistFile* ppf = NULL; - hRes = IPersistFile_QueryInterface(pshl, &IID_IPersistFile, (LPVOID*)&ppf); - if (SUCCEEDED(hRes)) - { - /* Load the shortcut */ - hRes = IPersistFile_Load(ppf, ConsoleStartInfo->ConsoleTitle, STGM_READ); - if (SUCCEEDED(hRes)) - { - /* - * Finally we can get the properties ! - * Update the old ones if needed. - */ - INT ShowCmd = 0; - // WORD HotKey = 0; - - /* Reset the name of the console with the name of the shortcut */ - Length = min(/*Length*/ Length - 4, // 4 == len(".lnk") - sizeof(ConsoleInfo->ConsoleTitle) / sizeof(ConsoleInfo->ConsoleTitle[0]) - 1); - wcsncpy(ConsoleInfo->ConsoleTitle, LinkName, Length); - ConsoleInfo->ConsoleTitle[Length] = L'\0'; - - /* Get the window showing command */ - hRes = IShellLinkW_GetShowCmd(pshl, &ShowCmd); - if (SUCCEEDED(hRes)) ConsoleStartInfo->wShowWindow = (WORD)ShowCmd; - - /* Get the hotkey */ - // hRes = pshl->GetHotkey(&ShowCmd); - // if (SUCCEEDED(hRes)) ConsoleStartInfo->HotKey = HotKey; - - /* Get the icon location, if any */ - - hRes = IShellLinkW_GetIconLocation(pshl, - ConsoleStartInfo->IconPath, - sizeof(ConsoleStartInfo->IconPath)/sizeof(ConsoleStartInfo->IconPath[0]) - 1, // == MAX_PATH - &ConsoleStartInfo->IconIndex); - if (!SUCCEEDED(hRes)) - { - ConsoleStartInfo->IconPath[0] = L'\0'; - ConsoleStartInfo->IconIndex = 0; - } - - // FIXME: Since we still don't load console properties from the shortcut, - // return false. When this will be done, we will return true instead. - RetVal = FALSE; - } - IPersistFile_Release(ppf); - } - IShellLinkW_Release(pshl); - } - } - CoUninitialize(); - - return RetVal; -} - NTSTATUS NTAPI GuiLoadFrontEnd(IN OUT PFRONTEND FrontEnd, IN OUT PCONSOLE_INFO ConsoleInfo, IN OUT PVOID ExtraConsoleInfo, IN ULONG ProcessId) { - PCONSOLE_START_INFO ConsoleStartInfo = ExtraConsoleInfo; + PCONSOLE_INIT_INFO ConsoleInitInfo = ExtraConsoleInfo; PGUI_INIT_INFO GuiInitInfo; - if (FrontEnd == NULL || ConsoleInfo == NULL || ConsoleStartInfo == NULL) + if (FrontEnd == NULL || ConsoleInfo == NULL || ConsoleInitInfo == NULL) return STATUS_INVALID_PARAMETER; /* Initialize GUI terminal emulator common functionalities */ if (!GuiInit()) return STATUS_UNSUCCESSFUL; - /* - * Load per-application terminal settings. - * - * Check whether the process creating the console was launched via - * a shell-link. ConsoleInfo->ConsoleTitle may be updated with the - * name of the shortcut, and ConsoleStartInfo->Icon[Path|Index] too. - */ - if (ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) - { - if (!LoadShellLinkConsoleInfo(ConsoleStartInfo, ConsoleInfo)) - { - ConsoleStartInfo->dwStartupFlags &= ~STARTF_TITLEISLINKNAME; - } - } - /* * Initialize a private initialization info structure for later use. * It must be freed by a call to GuiUnloadFrontEnd or GuiInitFrontEnd. @@ -1245,8 +1061,9 @@ GuiLoadFrontEnd(IN OUT PFRONTEND FrontEnd, if (GuiInitInfo == NULL) return STATUS_NO_MEMORY; // HACK: We suppose that the pointers will be valid in GuiInitFrontEnd... + // If not, then copy exactly what we need in GuiInitInfo. GuiInitInfo->ConsoleInfo = ConsoleInfo; - GuiInitInfo->ConsoleStartInfo = ConsoleStartInfo; + GuiInitInfo->ConsoleStartInfo = ConsoleInitInfo->ConsoleStartInfo; GuiInitInfo->ProcessId = ProcessId; /* Finally, initialize the frontend structure */ diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h index 8755cdd9f24..3b252afdb37 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h +++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h @@ -14,13 +14,6 @@ #include "guisettings.h" #include "conwnd.h" -NTSTATUS GuiInitConsole(PCONSOLE Console, - /*IN*/ PCONSOLE_START_INFO ConsoleStartInfo, - PCONSOLE_INFO ConsoleInfo, - DWORD ProcessId, - LPCWSTR IconPath, - INT IconIndex); - VOID GuiConsoleMoveWindow(PGUI_CONSOLE_DATA GuiData); diff --git a/win32ss/user/winsrv/consrv/frontends/gui/lang/en-US.rc b/win32ss/user/winsrv/consrv/frontends/gui/lang/en-US.rc index 1a32b4882e7..9177466e193 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/lang/en-US.rc +++ b/win32ss/user/winsrv/consrv/frontends/gui/lang/en-US.rc @@ -2,15 +2,15 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US STRINGTABLE BEGIN - IDS_EDIT "Edit" + IDS_EDIT "&Edit" IDS_MARK "Mark" IDS_COPY "Copy\tEnter" IDS_PASTE "Paste" IDS_SELECTALL "Select All" IDS_SCROLL "Scroll" IDS_FIND "Find..." - IDS_DEFAULTS "Defaults" - IDS_PROPERTIES "Properties" + IDS_DEFAULTS "&Defaults" + IDS_PROPERTIES "&Properties" /* IDS_SCROLLHERE "Scroll here" IDS_SCROLLTOP "Scroll top" diff --git a/win32ss/user/winsrv/consrv/frontends/gui/lang/fr-FR.rc b/win32ss/user/winsrv/consrv/frontends/gui/lang/fr-FR.rc index 0dde5099530..2c8955fc4ea 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/lang/fr-FR.rc +++ b/win32ss/user/winsrv/consrv/frontends/gui/lang/fr-FR.rc @@ -1,18 +1,16 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -/* Fixme : Translation could be really improved, with context - La traduction pourrait réellement être améliorée grâce au contexte */ STRINGTABLE BEGIN - IDS_EDIT "Éditer" - IDS_MARK "Marquer" - IDS_COPY "Copier\tEntrée" - IDS_PASTE "Coller" - IDS_SELECTALL "Tout sélectionner" - IDS_SCROLL "Défiler" - IDS_FIND "Trouver..." - IDS_DEFAULTS "Défauts" - IDS_PROPERTIES "Propriétés" + IDS_EDIT "Éd&ition" + IDS_MARK "&Marquer" + IDS_COPY "&Copier\tEntrée" + IDS_PASTE "C&oller" + IDS_SELECTALL "Sélectionner &tout" + IDS_SCROLL "&Défiler" + IDS_FIND "&Rechercher..." + IDS_DEFAULTS "&Défauts" + IDS_PROPERTIES "&Propriétés" /* IDS_SCROLLHERE "Défiler ici" IDS_SCROLLTOP "Défiler tout en haut" diff --git a/win32ss/user/winsrv/consrv/frontends/input.c b/win32ss/user/winsrv/consrv/frontends/input.c index b2c17042eb1..33d420b6a8f 100644 --- a/win32ss/user/winsrv/consrv/frontends/input.c +++ b/win32ss/user/winsrv/consrv/frontends/input.c @@ -10,7 +10,6 @@ /* INCLUDES *******************************************************************/ #include "consrv.h" -#include "include/conio.h" #include "include/term.h" #include "coninput.h" @@ -20,77 +19,6 @@ /* PRIVATE FUNCTIONS **********************************************************/ -static VOID -ConDrvProcessKey(IN PCONSOLE Console, - IN BOOLEAN Down, - IN UINT VirtualKeyCode, - IN UINT VirtualScanCode, - IN WCHAR UnicodeChar, - IN ULONG ShiftState, - IN BYTE KeyStateCtrl) -{ - INPUT_RECORD er; - - /* process Ctrl-C and Ctrl-Break */ - if ( Console->InputBuffer.Mode & ENABLE_PROCESSED_INPUT && - Down && (VirtualKeyCode == VK_PAUSE || VirtualKeyCode == 'C') && - (ShiftState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyStateCtrl & 0x80) ) - { - DPRINT1("Console_Api Ctrl-C\n"); - ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT); - - if (Console->LineBuffer && !Console->LineComplete) - { - /* Line input is in progress; end it */ - Console->LinePos = Console->LineSize = 0; - Console->LineComplete = TRUE; - } - return; - } - - if ( (ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) != 0 && - (VK_UP == VirtualKeyCode || VK_DOWN == VirtualKeyCode) ) - { - if (!Down) return; - - /* scroll up or down */ - if (VK_UP == VirtualKeyCode) - { - /* only scroll up if there is room to scroll up into */ - if (Console->ActiveBuffer->CursorPosition.Y != Console->ActiveBuffer->ScreenBufferSize.Y - 1) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + - Console->ActiveBuffer->ScreenBufferSize.Y - 1) % - Console->ActiveBuffer->ScreenBufferSize.Y; - Console->ActiveBuffer->CursorPosition.Y++; - } - } - else - { - /* only scroll down if there is room to scroll down into */ - if (Console->ActiveBuffer->CursorPosition.Y != 0) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + 1) % - Console->ActiveBuffer->ScreenBufferSize.Y; - Console->ActiveBuffer->CursorPosition.Y--; - } - } - - ConioDrawConsole(Console); - return; - } - - er.EventType = KEY_EVENT; - er.Event.KeyEvent.bKeyDown = Down; - er.Event.KeyEvent.wRepeatCount = 1; - er.Event.KeyEvent.wVirtualKeyCode = VirtualKeyCode; - er.Event.KeyEvent.wVirtualScanCode = VirtualScanCode; - er.Event.KeyEvent.uChar.UnicodeChar = UnicodeChar; - er.Event.KeyEvent.dwControlKeyState = ShiftState; - - ConioProcessInputEvent(Console, &er); -} - static DWORD ConioGetShiftState(PBYTE KeyState, LPARAM lParam) { @@ -138,8 +66,10 @@ ConioProcessKey(PCONSRV_CONSOLE Console, MSG* msg) UINT VirtualKeyCode; UINT VirtualScanCode; BOOL Down = FALSE; - BOOLEAN Fake; // synthesized, not a real event - BOOLEAN NotChar; // message should not be used to return a character + BOOLEAN Fake; // Synthesized, not a real event + BOOLEAN NotChar; // Message should not be used to return a character + + INPUT_RECORD er; if (NULL == Console) { @@ -172,7 +102,7 @@ ConioProcessKey(PCONSRV_CONSOLE Console, MSG* msg) 2, 0, NULL); - UnicodeChar = (1 == RetChars ? Chars[0] : 0); + UnicodeChar = (RetChars == 1 ? Chars[0] : 0); } Fake = UnicodeChar && @@ -194,14 +124,66 @@ ConioProcessKey(PCONSRV_CONSOLE Console, MSG* msg) if (Fake) return; + /* Process Ctrl-C and Ctrl-Break */ + if ( Console->InputBuffer.Mode & ENABLE_PROCESSED_INPUT && + Down && (VirtualKeyCode == VK_PAUSE || VirtualKeyCode == 'C') && + (ShiftState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyState[VK_CONTROL] & 0x80) ) + { + DPRINT1("Console_Api Ctrl-C\n"); + ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT); + + if (Console->LineBuffer && !Console->LineComplete) + { + /* Line input is in progress; end it */ + Console->LinePos = Console->LineSize = 0; + Console->LineComplete = TRUE; + } + return; + } + + if ( (ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) != 0 && + (VirtualKeyCode == VK_UP || VirtualKeyCode == VK_DOWN) ) + { + if (!Down) return; + + /* Scroll up or down */ + if (VirtualKeyCode == VK_UP) + { + /* Only scroll up if there is room to scroll up into */ + if (Console->ActiveBuffer->CursorPosition.Y != Console->ActiveBuffer->ScreenBufferSize.Y - 1) + { + Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + + Console->ActiveBuffer->ScreenBufferSize.Y - 1) % + Console->ActiveBuffer->ScreenBufferSize.Y; + Console->ActiveBuffer->CursorPosition.Y++; + } + } + else + { + /* Only scroll down if there is room to scroll down into */ + if (Console->ActiveBuffer->CursorPosition.Y != 0) + { + Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + 1) % + Console->ActiveBuffer->ScreenBufferSize.Y; + Console->ActiveBuffer->CursorPosition.Y--; + } + } + + ConioDrawConsole((PCONSOLE)Console); + return; + } + /* Send the key press to the console driver */ - ConDrvProcessKey(Console, - Down, - VirtualKeyCode, - VirtualScanCode, - UnicodeChar, - ShiftState, - KeyState[VK_CONTROL]); + + er.EventType = KEY_EVENT; + er.Event.KeyEvent.bKeyDown = Down; + er.Event.KeyEvent.wRepeatCount = 1; + er.Event.KeyEvent.wVirtualKeyCode = VirtualKeyCode; + er.Event.KeyEvent.wVirtualScanCode = VirtualScanCode; + er.Event.KeyEvent.uChar.UnicodeChar = UnicodeChar; + er.Event.KeyEvent.dwControlKeyState = ShiftState; + + ConioProcessInputEvent(Console, &er); } DWORD diff --git a/win32ss/user/winsrv/consrv/frontends/terminal.c b/win32ss/user/winsrv/consrv/frontends/terminal.c index b2ba1a95885..668b4d6b3e6 100644 --- a/win32ss/user/winsrv/consrv/frontends/terminal.c +++ b/win32ss/user/winsrv/consrv/frontends/terminal.c @@ -18,6 +18,76 @@ #define NDEBUG #include + + + + +/********** HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK ************/ + +/* GLOBALS ********************************************************************/ + +/* + * From MSDN: + * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. + * If they are the same, the function fails, and GetLastError returns + * ERROR_INVALID_PARAMETER." + */ +#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \ + ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ + WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) + +#define ConsoleInputAnsiCharToUnicodeChar(Console, dWChar, sChar) \ + ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ + MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1) + +typedef struct ConsoleInput_t +{ + LIST_ENTRY ListEntry; + INPUT_RECORD InputEvent; +} ConsoleInput; + + +/* PRIVATE FUNCTIONS **********************************************************/ + +#if 0 + +static VOID +ConioInputEventToAnsi(PCONSOLE Console, PINPUT_RECORD InputEvent) +{ + if (InputEvent->EventType == KEY_EVENT) + { + WCHAR UnicodeChar = InputEvent->Event.KeyEvent.uChar.UnicodeChar; + InputEvent->Event.KeyEvent.uChar.UnicodeChar = 0; + ConsoleInputUnicodeCharToAnsiChar(Console, + &InputEvent->Event.KeyEvent.uChar.AsciiChar, + &UnicodeChar); + } +} + +static VOID +ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent) +{ + if (InputEvent->EventType == KEY_EVENT) + { + CHAR AsciiChar = InputEvent->Event.KeyEvent.uChar.AsciiChar; + InputEvent->Event.KeyEvent.uChar.AsciiChar = 0; + ConsoleInputAnsiCharToUnicodeChar(Console, + &InputEvent->Event.KeyEvent.uChar.UnicodeChar, + &AsciiChar); + } +} + +#endif + +/********** HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK ************/ + + + + + + + + /* CONSRV TERMINAL FRONTENDS INTERFACE ****************************************/ /***************/ @@ -67,7 +137,7 @@ NTSTATUS (NTAPI *FRONTEND_UNLOAD)(IN OUT PFRONTEND FrontEnd); * NOTE: Each entry of the table should be retrieved when loading a front-end * (examples of the CSR servers which register some data for CSRSS). */ -struct +static struct { CHAR FrontEndName[80]; FRONTEND_LOAD FrontEndLoad; @@ -190,7 +260,7 @@ ConSrvDeinitTerminal(IN OUT PTERMINAL Terminal) static NTSTATUS NTAPI ConSrvTermInitTerminal(IN OUT PTERMINAL This, - IN PCONSOLE Console) + IN PCONSOLE Console) { NTSTATUS Status; PFRONTEND FrontEnd = This->Data; @@ -203,6 +273,8 @@ ConSrvTermInitTerminal(IN OUT PTERMINAL This, Console->FrontEndIFace = *FrontEnd; Status = FrontEnd->Vtbl->InitFrontEnd(FrontEnd, FrontEnd->Console); + if (!NT_SUCCESS(Status)) + DPRINT1("InitFrontEnd failed, Status = 0x%08lx\n", Status); /** HACK HACK!! Be sure FrontEndIFace is correctly updated in the console!! **/ DPRINT1("Using FrontEndIFace HACK(2), should be removed after proper implementation!\n"); @@ -218,6 +290,364 @@ ConSrvTermDeinitTerminal(IN OUT PTERMINAL This) FrontEnd->Vtbl->DeinitFrontEnd(FrontEnd); } + + +/************ Line discipline ***************/ + +static NTSTATUS NTAPI +ConSrvTermReadStream(IN OUT PTERMINAL This, + /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/ + IN BOOLEAN Unicode, + /**PWCHAR Buffer,**/ + OUT PVOID Buffer, + IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl, + IN ULONG NumCharsToRead, + OUT PULONG NumCharsRead OPTIONAL) +{ + PFRONTEND FrontEnd = This->Data; + PCONSRV_CONSOLE Console = FrontEnd->Console; + PCONSOLE_INPUT_BUFFER InputBuffer = &Console->InputBuffer; + + // STATUS_PENDING : Wait if more to read ; STATUS_SUCCESS : Don't wait. + NTSTATUS Status = STATUS_PENDING; + + PLIST_ENTRY CurrentEntry; + ConsoleInput *Input; + ULONG i; + + /* Validity checks */ + // ASSERT(Console == InputBuffer->Header.Console); + ASSERT((Buffer != NULL) || (Buffer == NULL && NumCharsToRead == 0)); + + /* We haven't read anything (yet) */ + i = ReadControl->nInitialChars; + + if (InputBuffer->Mode & ENABLE_LINE_INPUT) + { + /* COOKED mode, call the line discipline */ + + if (Console->LineBuffer == NULL) + { + /* Starting a new line */ + Console->LineMaxSize = max(256, NumCharsToRead); + + Console->LineBuffer = ConsoleAllocHeap(0, Console->LineMaxSize * sizeof(WCHAR)); + if (Console->LineBuffer == NULL) return STATUS_NO_MEMORY; + + Console->LinePos = Console->LineSize = ReadControl->nInitialChars; + Console->LineComplete = Console->LineUpPressed = FALSE; + Console->LineInsertToggle = Console->InsertMode; + Console->LineWakeupMask = ReadControl->dwCtrlWakeupMask; + + /* + * Pre-filling the buffer is only allowed in the Unicode API, + * so we don't need to worry about ANSI <-> Unicode conversion. + */ + memcpy(Console->LineBuffer, Buffer, Console->LineSize * sizeof(WCHAR)); + if (Console->LineSize == Console->LineMaxSize) + { + Console->LineComplete = TRUE; + Console->LinePos = 0; + } + } + + /* If we don't have a complete line yet, process the pending input */ + while (!Console->LineComplete && !IsListEmpty(&InputBuffer->InputEvents)) + { + /* Remove input event from queue */ + CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); + if (IsListEmpty(&InputBuffer->InputEvents)) + { + ResetEvent(InputBuffer->ActiveEvent); + } + Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); + + /* Only pay attention to key down */ + if (Input->InputEvent.EventType == KEY_EVENT && + Input->InputEvent.Event.KeyEvent.bKeyDown) + { + LineInputKeyDown(Console, ExeName, + &Input->InputEvent.Event.KeyEvent); + ReadControl->dwControlKeyState = Input->InputEvent.Event.KeyEvent.dwControlKeyState; + } + ConsoleFreeHeap(Input); + } + + /* Check if we have a complete line to read from */ + if (Console->LineComplete) + { + while (i < NumCharsToRead && Console->LinePos != Console->LineSize) + { + WCHAR Char = Console->LineBuffer[Console->LinePos++]; + + if (Unicode) + { + ((PWCHAR)Buffer)[i] = Char; + } + else + { + ConsoleInputUnicodeCharToAnsiChar(Console, &((PCHAR)Buffer)[i], &Char); + } + ++i; + } + + if (Console->LinePos == Console->LineSize) + { + /* Entire line has been read */ + ConsoleFreeHeap(Console->LineBuffer); + Console->LineBuffer = NULL; + } + + Status = STATUS_SUCCESS; + } + } + else + { + /* RAW mode */ + + /* Character input */ + while (i < NumCharsToRead && !IsListEmpty(&InputBuffer->InputEvents)) + { + /* Remove input event from queue */ + CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents); + if (IsListEmpty(&InputBuffer->InputEvents)) + { + ResetEvent(InputBuffer->ActiveEvent); + } + Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); + + /* Only pay attention to valid characters, on key down */ + if (Input->InputEvent.EventType == KEY_EVENT && + Input->InputEvent.Event.KeyEvent.bKeyDown && + Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar != L'\0') + { + WCHAR Char = Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar; + + if (Unicode) + { + ((PWCHAR)Buffer)[i] = Char; + } + else + { + ConsoleInputUnicodeCharToAnsiChar(Console, &((PCHAR)Buffer)[i], &Char); + } + ++i; + + /* Did read something */ + Status = STATUS_SUCCESS; + } + ConsoleFreeHeap(Input); + } + } + + // FIXME: Only set if Status == STATUS_SUCCESS ??? + if (NumCharsRead) *NumCharsRead = i; + + return Status; +} + + + + +/* GLOBALS ********************************************************************/ + +#define TAB_WIDTH 8 + +// See condrv/text.c +/*static*/ VOID +ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff); + +static VOID +ConioNextLine(PTEXTMODE_SCREEN_BUFFER Buff, PSMALL_RECT UpdateRect, PUINT ScrolledLines) +{ + /* If we hit bottom, slide the viewable screen */ + if (++Buff->CursorPosition.Y == Buff->ScreenBufferSize.Y) + { + Buff->CursorPosition.Y--; + if (++Buff->VirtualY == Buff->ScreenBufferSize.Y) + { + Buff->VirtualY = 0; + } + (*ScrolledLines)++; + ClearLineBuffer(Buff); + if (UpdateRect->Top != 0) + { + UpdateRect->Top--; + } + } + UpdateRect->Left = 0; + UpdateRect->Right = Buff->ScreenBufferSize.X - 1; + UpdateRect->Bottom = Buff->CursorPosition.Y; +} + +static NTSTATUS +ConioWriteConsole(PFRONTEND FrontEnd, + PTEXTMODE_SCREEN_BUFFER Buff, + PWCHAR Buffer, + DWORD Length, + BOOL Attrib) +{ + PCONSRV_CONSOLE Console = FrontEnd->Console; + + UINT i; + PCHAR_INFO Ptr; + SMALL_RECT UpdateRect; + SHORT CursorStartX, CursorStartY; + UINT ScrolledLines; + + CursorStartX = Buff->CursorPosition.X; + CursorStartY = Buff->CursorPosition.Y; + UpdateRect.Left = Buff->ScreenBufferSize.X; + UpdateRect.Top = Buff->CursorPosition.Y; + UpdateRect.Right = -1; + UpdateRect.Bottom = Buff->CursorPosition.Y; + ScrolledLines = 0; + + for (i = 0; i < Length; i++) + { + /* + * If we are in processed mode, interpret special characters and + * display them correctly. Otherwise, just put them into the buffer. + */ + if (Buff->Mode & ENABLE_PROCESSED_OUTPUT) + { + /* --- CR --- */ + if (Buffer[i] == L'\r') + { + Buff->CursorPosition.X = 0; + UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); + UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); + continue; + } + /* --- LF --- */ + else if (Buffer[i] == L'\n') + { + Buff->CursorPosition.X = 0; + ConioNextLine(Buff, &UpdateRect, &ScrolledLines); + continue; + } + /* --- BS --- */ + else if (Buffer[i] == L'\b') + { + /* Only handle BS if we're not on the first pos of the first line */ + if (0 != Buff->CursorPosition.X || 0 != Buff->CursorPosition.Y) + { + if (0 == Buff->CursorPosition.X) + { + /* slide virtual position up */ + Buff->CursorPosition.X = Buff->ScreenBufferSize.X - 1; + Buff->CursorPosition.Y--; + UpdateRect.Top = min(UpdateRect.Top, Buff->CursorPosition.Y); + } + else + { + Buff->CursorPosition.X--; + } + Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); + Ptr->Char.UnicodeChar = L' '; + Ptr->Attributes = Buff->ScreenDefaultAttrib; + UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); + UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); + } + continue; + } + /* --- TAB --- */ + else if (Buffer[i] == L'\t') + { + UINT EndX; + + UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); + EndX = (Buff->CursorPosition.X + TAB_WIDTH) & ~(TAB_WIDTH - 1); + EndX = min(EndX, (UINT)Buff->ScreenBufferSize.X); + Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); + while (Buff->CursorPosition.X < EndX) + { + Ptr->Char.UnicodeChar = L' '; + Ptr->Attributes = Buff->ScreenDefaultAttrib; + ++Ptr; + Buff->CursorPosition.X++; + } + UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X - 1); + if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X) + { + if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) + { + Buff->CursorPosition.X = 0; + ConioNextLine(Buff, &UpdateRect, &ScrolledLines); + } + else + { + Buff->CursorPosition.X--; + } + } + continue; + } + /* --- BEL ---*/ + else if (Buffer[i] == L'\a') + { + FrontEnd->Vtbl->RingBell(FrontEnd); + continue; + } + } + UpdateRect.Left = min(UpdateRect.Left, Buff->CursorPosition.X); + UpdateRect.Right = max(UpdateRect.Right, Buff->CursorPosition.X); + + Ptr = ConioCoordToPointer(Buff, Buff->CursorPosition.X, Buff->CursorPosition.Y); + Ptr->Char.UnicodeChar = Buffer[i]; + if (Attrib) Ptr->Attributes = Buff->ScreenDefaultAttrib; + + Buff->CursorPosition.X++; + if (Buff->CursorPosition.X == Buff->ScreenBufferSize.X) + { + if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) + { + Buff->CursorPosition.X = 0; + ConioNextLine(Buff, &UpdateRect, &ScrolledLines); + } + else + { + Buff->CursorPosition.X = CursorStartX; + } + } + } + + if (!ConioIsRectEmpty(&UpdateRect) && (PCONSOLE_SCREEN_BUFFER)Buff == Console->ActiveBuffer) + { + // TermWriteStream(Console, &UpdateRect, CursorStartX, CursorStartY, + // ScrolledLines, Buffer, Length); + FrontEnd->Vtbl->WriteStream(FrontEnd, + &UpdateRect, + CursorStartX, + CursorStartY, + ScrolledLines, + Buffer, + Length); + } + + return STATUS_SUCCESS; +} + + + +static NTSTATUS NTAPI +ConSrvTermWriteStream(IN OUT PTERMINAL This, + PTEXTMODE_SCREEN_BUFFER Buff, + PWCHAR Buffer, + DWORD Length, + BOOL Attrib) +{ + PFRONTEND FrontEnd = This->Data; + return ConioWriteConsole(FrontEnd, + Buff, + Buffer, + Length, + Attrib); +} + +/************ Line discipline ***************/ + + + static VOID NTAPI ConSrvTermDrawRegion(IN OUT PTERMINAL This, SMALL_RECT* Region) @@ -226,25 +656,6 @@ ConSrvTermDrawRegion(IN OUT PTERMINAL This, FrontEnd->Vtbl->DrawRegion(FrontEnd, Region); } -static VOID NTAPI -ConSrvTermWriteStream(IN OUT PTERMINAL This, - SMALL_RECT* Region, - SHORT CursorStartX, - SHORT CursorStartY, - UINT ScrolledLines, - PWCHAR Buffer, - UINT Length) -{ - PFRONTEND FrontEnd = This->Data; - FrontEnd->Vtbl->WriteStream(FrontEnd, - Region, - CursorStartX, - CursorStartY, - ScrolledLines, - Buffer, - Length); -} - static BOOL NTAPI ConSrvTermSetCursorInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer) @@ -288,13 +699,6 @@ ConSrvTermReleaseScreenBuffer(IN OUT PTERMINAL This, FrontEnd->Vtbl->ReleaseScreenBuffer(FrontEnd, ScreenBuffer); } -static VOID NTAPI -ConSrvTermChangeTitle(IN OUT PTERMINAL This) -{ - PFRONTEND FrontEnd = This->Data; - FrontEnd->Vtbl->ChangeTitle(FrontEnd); -} - static VOID NTAPI ConSrvTermGetLargestConsoleWindowSize(IN OUT PTERMINAL This, PCOORD pSize) @@ -303,16 +707,6 @@ ConSrvTermGetLargestConsoleWindowSize(IN OUT PTERMINAL This, FrontEnd->Vtbl->GetLargestConsoleWindowSize(FrontEnd, pSize); } -/* -static BOOL NTAPI -ConSrvTermGetSelectionInfo(IN OUT PTERMINAL This, - PCONSOLE_SELECTION_INFO pSelectionInfo) -{ - PFRONTEND FrontEnd = This->Data; - return FrontEnd->Vtbl->GetSelectionInfo(FrontEnd, pSelectionInfo); -} -*/ - static BOOL NTAPI ConSrvTermSetPalette(IN OUT PTERMINAL This, HPALETTE PaletteHandle, @@ -334,16 +728,17 @@ static TERMINAL_VTBL ConSrvTermVtbl = { ConSrvTermInitTerminal, ConSrvTermDeinitTerminal, - ConSrvTermDrawRegion, + + ConSrvTermReadStream, ConSrvTermWriteStream, + + ConSrvTermDrawRegion, ConSrvTermSetCursorInfo, ConSrvTermSetScreenInfo, ConSrvTermResizeTerminal, ConSrvTermSetActiveScreenBuffer, ConSrvTermReleaseScreenBuffer, - ConSrvTermChangeTitle, ConSrvTermGetLargestConsoleWindowSize, - // ConSrvTermGetSelectionInfo, ConSrvTermSetPalette, ConSrvTermShowMouseCursor, }; diff --git a/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c b/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c index 3e2bed71c3d..d03cf223d3d 100644 --- a/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c +++ b/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c @@ -12,7 +12,7 @@ #ifdef TUITERM_COMPILE #include "consrv.h" -#include "include/conio.h" +// #include "include/conio.h" #include "include/console.h" #include "include/settings.h" #include "tuiterm.h" diff --git a/win32ss/user/winsrv/consrv/handle.c b/win32ss/user/winsrv/consrv/handle.c index 4c74ab15a3e..f54a459f24e 100644 --- a/win32ss/user/winsrv/consrv/handle.c +++ b/win32ss/user/winsrv/consrv/handle.c @@ -96,7 +96,7 @@ ConSrvCloseHandle(IN PCONSOLE_IO_HANDLE Handle) * even of the last buffer, but having to deal with a lack of * any active buffer might be error-prone. */ if (Buffer->ListEntry.Flink != Buffer->ListEntry.Blink) - ConioDeleteScreenBuffer(Buffer); + ConDrvDeleteScreenBuffer(Buffer); } else if (Object->Type == INPUT_BUFFER) { @@ -470,15 +470,12 @@ ConSrvReleaseObject(IN PCONSOLE_IO_OBJECT Object, - - - NTSTATUS ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, PHANDLE pInputHandle, PHANDLE pOutputHandle, PHANDLE pErrorHandle, - PCONSOLE_START_INFO ConsoleStartInfo) + PCONSOLE_INIT_INFO ConsoleInitInfo) { NTSTATUS Status = STATUS_SUCCESS; HANDLE ConsoleHandle; @@ -499,7 +496,7 @@ ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, /* Initialize a new Console owned by this process */ Status = ConSrvInitConsole(&ConsoleHandle, &Console, - ConsoleStartInfo, + ConsoleInitInfo, HandleToUlong(ProcessData->Process->ClientId.UniqueProcess)); if (!NT_SUCCESS(Status)) { diff --git a/win32ss/user/winsrv/consrv/history.c b/win32ss/user/winsrv/consrv/history.c new file mode 100644 index 00000000000..a885d20ab3e --- /dev/null +++ b/win32ss/user/winsrv/consrv/history.c @@ -0,0 +1,603 @@ +/* + * LICENSE: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Console Server DLL + * FILE: win32ss/user/winsrv/consrv/history.c + * PURPOSE: Console line input functions + * PROGRAMMERS: Jeffrey Morlan + */ + +/* INCLUDES *******************************************************************/ + +#include "consrv.h" +#include "popup.h" + +#define NDEBUG +#include + +typedef struct _HISTORY_BUFFER +{ + LIST_ENTRY ListEntry; + ULONG Position; + ULONG MaxEntries; + ULONG NumEntries; + UNICODE_STRING ExeName; + PUNICODE_STRING Entries; +} HISTORY_BUFFER, *PHISTORY_BUFFER; + + +BOOLEAN +ConvertInputAnsiToUnicode(PCONSRV_CONSOLE Console, + PVOID Source, + USHORT SourceLength, + // BOOLEAN IsUnicode, + PWCHAR* Target, + PUSHORT TargetLength); +BOOLEAN +ConvertInputUnicodeToAnsi(PCONSRV_CONSOLE Console, + PVOID Source, + USHORT SourceLength, + // BOOLEAN IsAnsi, + PCHAR/* * */ Target, + /*P*/USHORT TargetLength); + + +/* PRIVATE FUNCTIONS **********************************************************/ + +static PHISTORY_BUFFER +HistoryCurrentBuffer(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName) +{ + PLIST_ENTRY Entry = Console->HistoryBuffers.Flink; + PHISTORY_BUFFER Hist; + + for (; Entry != &Console->HistoryBuffers; Entry = Entry->Flink) + { + Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); + if (RtlEqualUnicodeString(ExeName, &Hist->ExeName, FALSE)) + return Hist; + } + + /* Couldn't find the buffer, create a new one */ + Hist = ConsoleAllocHeap(0, sizeof(HISTORY_BUFFER) + ExeName->Length); + if (!Hist) return NULL; + Hist->MaxEntries = Console->HistoryBufferSize; + Hist->NumEntries = 0; + Hist->Entries = ConsoleAllocHeap(0, Hist->MaxEntries * sizeof(UNICODE_STRING)); + if (!Hist->Entries) + { + ConsoleFreeHeap(Hist); + return NULL; + } + Hist->ExeName.Length = Hist->ExeName.MaximumLength = ExeName->Length; + Hist->ExeName.Buffer = (PWCHAR)(Hist + 1); + memcpy(Hist->ExeName.Buffer, ExeName->Buffer, ExeName->Length); + InsertHeadList(&Console->HistoryBuffers, &Hist->ListEntry); + return Hist; +} + +static PHISTORY_BUFFER +HistoryFindBuffer(PCONSRV_CONSOLE Console, + PVOID ExeName, + USHORT ExeLength, + BOOLEAN UnicodeExe) +{ + UNICODE_STRING ExeNameU; + + PLIST_ENTRY Entry; + PHISTORY_BUFFER Hist = NULL; + + if (ExeName == NULL) return NULL; + + if (UnicodeExe) + { + ExeNameU.Buffer = ExeName; + /* Length is in bytes */ + ExeNameU.MaximumLength = ExeLength; + } + else + { + if (!ConvertInputAnsiToUnicode(Console, + ExeName, ExeLength, + &ExeNameU.Buffer, &ExeNameU.MaximumLength)) + { + return NULL; + } + } + ExeNameU.Length = ExeNameU.MaximumLength; + + Entry = Console->HistoryBuffers.Flink; + while (Entry != &Console->HistoryBuffers) + { + Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); + + /* For the history APIs, the caller is allowed to give only part of the name */ + if (RtlPrefixUnicodeString(&ExeNameU, &Hist->ExeName, TRUE)) + { + if (!UnicodeExe) ConsoleFreeHeap(ExeNameU.Buffer); + return Hist; + } + + Entry = Entry->Flink; + } + + if (!UnicodeExe) ConsoleFreeHeap(ExeNameU.Buffer); + return NULL; +} + +static VOID +HistoryDeleteBuffer(PHISTORY_BUFFER Hist) +{ + if (!Hist) return; + + while (Hist->NumEntries != 0) + RtlFreeUnicodeString(&Hist->Entries[--Hist->NumEntries]); + + ConsoleFreeHeap(Hist->Entries); + RemoveEntryList(&Hist->ListEntry); + ConsoleFreeHeap(Hist); +} + +VOID +HistoryAddEntry(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Entry) +{ + // UNICODE_STRING NewEntry; + PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); + + if (!Hist) return; + + // NewEntry.Length = NewEntry.MaximumLength = Console->LineSize * sizeof(WCHAR); + // NewEntry.Buffer = Console->LineBuffer; + + /* Don't add blank or duplicate entries */ + if (Entry->Length == 0 || Hist->MaxEntries == 0 || + (Hist->NumEntries > 0 && + RtlEqualUnicodeString(&Hist->Entries[Hist->NumEntries - 1], Entry, FALSE))) + { + return; + } + + if (Console->HistoryNoDup) + { + INT i; + + /* Check if this line has been entered before */ + for (i = Hist->NumEntries - 1; i >= 0; i--) + { + if (RtlEqualUnicodeString(&Hist->Entries[i], Entry, FALSE)) + { + UNICODE_STRING NewEntry; + + /* Just rotate the list to bring this entry to the end */ + NewEntry = Hist->Entries[i]; + memmove(&Hist->Entries[i], &Hist->Entries[i + 1], + (Hist->NumEntries - (i + 1)) * sizeof(UNICODE_STRING)); + Hist->Entries[Hist->NumEntries - 1] = NewEntry; + Hist->Position = Hist->NumEntries - 1; + return; + } + } + } + + if (Hist->NumEntries == Hist->MaxEntries) + { + /* List is full, remove oldest entry */ + RtlFreeUnicodeString(&Hist->Entries[0]); + memmove(&Hist->Entries[0], &Hist->Entries[1], + --Hist->NumEntries * sizeof(UNICODE_STRING)); + } + + if (NT_SUCCESS(RtlDuplicateUnicodeString(0, Entry, &Hist->Entries[Hist->NumEntries]))) + Hist->NumEntries++; + Hist->Position = Hist->NumEntries - 1; +} + +VOID +HistoryGetCurrentEntry(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Entry) +{ + PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); + + if (!Hist || Hist->NumEntries == 0) + Entry->Length = 0; + else + *Entry = Hist->Entries[Hist->Position]; +} + +BOOL +HistoryRecallHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + INT Offset, + PUNICODE_STRING Entry) +{ + PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); + ULONG Position = 0; + + if (!Hist || Hist->NumEntries == 0) return FALSE; + + Position = Hist->Position + Offset; + Position = min(max(Position, 0), Hist->NumEntries - 1); + Hist->Position = Position; + + *Entry = Hist->Entries[Hist->Position]; + return TRUE; +} + +BOOL +HistoryFindEntryByPrefix(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Prefix, + PUNICODE_STRING Entry) +{ + INT HistPos; + + /* Search for history entries starting with input. */ + PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); + if (!Hist || Hist->NumEntries == 0) return FALSE; + + /* + * Like Up/F5, on first time start from current (usually last) entry, + * but on subsequent times start at previous entry. + */ + if (Console->LineUpPressed) + Hist->Position = (Hist->Position ? Hist->Position : Hist->NumEntries) - 1; + Console->LineUpPressed = TRUE; + + // Entry.Length = Console->LinePos * sizeof(WCHAR); // == Pos * sizeof(WCHAR) + // Entry.Buffer = Console->LineBuffer; + + /* + * Keep going backwards, even wrapping around to the end, + * until we get back to starting point. + */ + HistPos = Hist->Position; + do + { + if (RtlPrefixUnicodeString(Prefix, &Hist->Entries[HistPos], FALSE)) + { + Hist->Position = HistPos; + *Entry = Hist->Entries[HistPos]; + return TRUE; + } + if (--HistPos < 0) HistPos += Hist->NumEntries; + } while (HistPos != Hist->Position); + + return FALSE; +} + +PPOPUP_WINDOW +HistoryDisplayCurrentHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName) +{ + PTEXTMODE_SCREEN_BUFFER ActiveBuffer; + PPOPUP_WINDOW Popup; + + SHORT xLeft, yTop; + SHORT Width, Height; + + PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); + + if (!Hist) return NULL; + if (Hist->NumEntries == 0) return NULL; + + if (GetType(Console->ActiveBuffer) != TEXTMODE_BUFFER) return NULL; + ActiveBuffer = (PTEXTMODE_SCREEN_BUFFER)Console->ActiveBuffer; + + Width = 40; + Height = 10; + + /* Center the popup window on the screen */ + xLeft = ActiveBuffer->ViewOrigin.X + (ActiveBuffer->ViewSize.X - Width ) / 2; + yTop = ActiveBuffer->ViewOrigin.Y + (ActiveBuffer->ViewSize.Y - Height) / 2; + + /* Create the popup */ + Popup = CreatePopupWindow(Console, ActiveBuffer, + xLeft, yTop, Width, Height); + if (Popup == NULL) return NULL; + + Popup->PopupInputRoutine = NULL; + + return Popup; +} + +VOID +HistoryDeleteCurrentBuffer(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName) +{ + HistoryDeleteBuffer(HistoryCurrentBuffer(Console, ExeName)); +} + +VOID +HistoryDeleteBuffers(PCONSRV_CONSOLE Console) +{ + PLIST_ENTRY CurrentEntry; + PHISTORY_BUFFER HistoryBuffer; + + while (!IsListEmpty(&Console->HistoryBuffers)) + { + CurrentEntry = RemoveHeadList(&Console->HistoryBuffers); + HistoryBuffer = CONTAINING_RECORD(CurrentEntry, HISTORY_BUFFER, ListEntry); + HistoryDeleteBuffer(HistoryBuffer); + } +} + + +/* PUBLIC SERVER APIS *********************************************************/ + +CSR_API(SrvGetConsoleCommandHistory) +{ + NTSTATUS Status; + PCONSOLE_GETCOMMANDHISTORY GetCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryRequest; + PCONSRV_CONSOLE Console; + ULONG BytesWritten = 0; + PHISTORY_BUFFER Hist; + + DPRINT1("SrvGetConsoleCommandHistory entered\n"); + + if ( !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&GetCommandHistoryRequest->History, + GetCommandHistoryRequest->HistoryLength, + sizeof(BYTE)) || + !CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&GetCommandHistoryRequest->ExeName, + GetCommandHistoryRequest->ExeLength, + sizeof(BYTE)) ) + { + return STATUS_INVALID_PARAMETER; + } + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Hist = HistoryFindBuffer(Console, + GetCommandHistoryRequest->ExeName, + GetCommandHistoryRequest->ExeLength, + GetCommandHistoryRequest->Unicode2); + if (Hist) + { + ULONG i; + + LPSTR TargetBufferA; + LPWSTR TargetBufferW; + ULONG BufferSize = GetCommandHistoryRequest->HistoryLength; + + ULONG Offset = 0; + ULONG SourceLength; + + if (GetCommandHistoryRequest->Unicode) + { + TargetBufferW = GetCommandHistoryRequest->History; + BufferSize /= sizeof(WCHAR); + } + else + { + TargetBufferA = GetCommandHistoryRequest->History; + } + + for (i = 0; i < Hist->NumEntries; i++) + { + SourceLength = Hist->Entries[i].Length / sizeof(WCHAR); + if (Offset + SourceLength + 1 > BufferSize) + { + Status = STATUS_BUFFER_OVERFLOW; + break; + } + + if (GetCommandHistoryRequest->Unicode) + { + RtlCopyMemory(&TargetBufferW[Offset], Hist->Entries[i].Buffer, SourceLength * sizeof(WCHAR)); + Offset += SourceLength; + TargetBufferW[Offset++] = L'\0'; + } + else + { + ConvertInputUnicodeToAnsi(Console, + Hist->Entries[i].Buffer, SourceLength * sizeof(WCHAR), + &TargetBufferA[Offset], SourceLength); + Offset += SourceLength; + TargetBufferA[Offset++] = '\0'; + } + } + + if (GetCommandHistoryRequest->Unicode) + BytesWritten = Offset * sizeof(WCHAR); + else + BytesWritten = Offset; + } + + // GetCommandHistoryRequest->HistoryLength = TargetBuffer - (PBYTE)GetCommandHistoryRequest->History; + GetCommandHistoryRequest->HistoryLength = BytesWritten; + + ConSrvReleaseConsole(Console, TRUE); + return Status; +} + +CSR_API(SrvGetConsoleCommandHistoryLength) +{ + NTSTATUS Status; + PCONSOLE_GETCOMMANDHISTORYLENGTH GetCommandHistoryLengthRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryLengthRequest; + PCONSRV_CONSOLE Console; + PHISTORY_BUFFER Hist; + ULONG Length = 0; + + if (!CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&GetCommandHistoryLengthRequest->ExeName, + GetCommandHistoryLengthRequest->ExeLength, + sizeof(BYTE))) + { + return STATUS_INVALID_PARAMETER; + } + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Hist = HistoryFindBuffer(Console, + GetCommandHistoryLengthRequest->ExeName, + GetCommandHistoryLengthRequest->ExeLength, + GetCommandHistoryLengthRequest->Unicode2); + if (Hist) + { + ULONG i; + for (i = 0; i < Hist->NumEntries; i++) + Length += Hist->Entries[i].Length + sizeof(WCHAR); // Each entry is returned NULL-terminated + } + /* + * Quick and dirty way of getting the number of bytes of the + * corresponding ANSI string from the one in UNICODE. + */ + if (!GetCommandHistoryLengthRequest->Unicode) + Length /= sizeof(WCHAR); + + GetCommandHistoryLengthRequest->HistoryLength = Length; + + ConSrvReleaseConsole(Console, TRUE); + return Status; +} + +CSR_API(SrvExpungeConsoleCommandHistory) +{ + NTSTATUS Status; + PCONSOLE_EXPUNGECOMMANDHISTORY ExpungeCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ExpungeCommandHistoryRequest; + PCONSRV_CONSOLE Console; + PHISTORY_BUFFER Hist; + + if (!CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&ExpungeCommandHistoryRequest->ExeName, + ExpungeCommandHistoryRequest->ExeLength, + sizeof(BYTE))) + { + return STATUS_INVALID_PARAMETER; + } + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Hist = HistoryFindBuffer(Console, + ExpungeCommandHistoryRequest->ExeName, + ExpungeCommandHistoryRequest->ExeLength, + ExpungeCommandHistoryRequest->Unicode2); + HistoryDeleteBuffer(Hist); + + ConSrvReleaseConsole(Console, TRUE); + return Status; +} + +CSR_API(SrvSetConsoleNumberOfCommands) +{ + NTSTATUS Status; + PCONSOLE_SETHISTORYNUMBERCOMMANDS SetHistoryNumberCommandsRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryNumberCommandsRequest; + PCONSRV_CONSOLE Console; + PHISTORY_BUFFER Hist; + + if (!CsrValidateMessageBuffer(ApiMessage, + (PVOID*)&SetHistoryNumberCommandsRequest->ExeName, + SetHistoryNumberCommandsRequest->ExeLength, + sizeof(BYTE))) + { + return STATUS_INVALID_PARAMETER; + } + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Hist = HistoryFindBuffer(Console, + SetHistoryNumberCommandsRequest->ExeName, + SetHistoryNumberCommandsRequest->ExeLength, + SetHistoryNumberCommandsRequest->Unicode2); + if (Hist) + { + ULONG MaxEntries = SetHistoryNumberCommandsRequest->NumCommands; + PUNICODE_STRING OldEntryList = Hist->Entries; + PUNICODE_STRING NewEntryList = ConsoleAllocHeap(0, MaxEntries * sizeof(UNICODE_STRING)); + if (!NewEntryList) + { + Status = STATUS_NO_MEMORY; + } + else + { + /* If necessary, shrink by removing oldest entries */ + for (; Hist->NumEntries > MaxEntries; Hist->NumEntries--) + { + RtlFreeUnicodeString(Hist->Entries++); + Hist->Position += (Hist->Position == 0); + } + + Hist->MaxEntries = MaxEntries; + Hist->Entries = memcpy(NewEntryList, Hist->Entries, + Hist->NumEntries * sizeof(UNICODE_STRING)); + ConsoleFreeHeap(OldEntryList); + } + } + + ConSrvReleaseConsole(Console, TRUE); + return Status; +} + +CSR_API(SrvGetConsoleHistory) +{ +#if 0 // Vista+ + PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; + PCONSRV_CONSOLE Console; + NTSTATUS Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (NT_SUCCESS(Status)) + { + HistoryInfoRequest->HistoryBufferSize = Console->HistoryBufferSize; + HistoryInfoRequest->NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; + HistoryInfoRequest->dwFlags = (Console->HistoryNoDup ? HISTORY_NO_DUP_FLAG : 0); + ConSrvReleaseConsole(Console, TRUE); + } + return Status; +#else + DPRINT1("%s not yet implemented\n", __FUNCTION__); + return STATUS_NOT_IMPLEMENTED; +#endif +} + +CSR_API(SrvSetConsoleHistory) +{ +#if 0 // Vista+ + PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; + PCONSRV_CONSOLE Console; + NTSTATUS Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (NT_SUCCESS(Status)) + { + Console->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize; + Console->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers; + Console->HistoryNoDup = !!(HistoryInfoRequest->dwFlags & HISTORY_NO_DUP_FLAG); + ConSrvReleaseConsole(Console, TRUE); + } + return Status; +#else + DPRINT1("%s not yet implemented\n", __FUNCTION__); + return STATUS_NOT_IMPLEMENTED; +#endif +} + +CSR_API(SrvSetConsoleCommandHistoryMode) +{ + NTSTATUS Status; + PCONSOLE_SETHISTORYMODE SetHistoryModeRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryModeRequest; + PCONSRV_CONSOLE Console; + + DPRINT1("SrvSetConsoleCommandHistoryMode(Mode = %d) is not yet implemented\n", + SetHistoryModeRequest->Mode); + + Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), + &Console, TRUE); + if (!NT_SUCCESS(Status)) return Status; + + Console->InsertMode = !!(SetHistoryModeRequest->Mode & CONSOLE_OVERSTRIKE); + + ConSrvReleaseConsole(Console, TRUE); + return STATUS_SUCCESS; +} + +/* EOF */ diff --git a/win32ss/user/winsrv/consrv/history.h b/win32ss/user/winsrv/consrv/history.h new file mode 100644 index 00000000000..1b3833f23c0 --- /dev/null +++ b/win32ss/user/winsrv/consrv/history.h @@ -0,0 +1,11 @@ +/* + * LICENSE: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Console Server DLL + * FILE: win32ss/user/winsrv/consrv/history.h + * PURPOSE: Console line input functions + * PROGRAMMERS: Jeffrey Morlan + */ + +#pragma once + +VOID HistoryDeleteBuffers(PCONSRV_CONSOLE Console); diff --git a/win32ss/user/winsrv/consrv/include/conio.h b/win32ss/user/winsrv/consrv/include/conio.h index fc9d4ebd9a2..a3728641c4d 100644 --- a/win32ss/user/winsrv/consrv/include/conio.h +++ b/win32ss/user/winsrv/consrv/include/conio.h @@ -12,6 +12,22 @@ #include "rect.h" +// This is ALMOST a HACK!!!!!!! +// Helpers for code refactoring +#ifdef USE_NEW_CONSOLE_WAY + +#define _CONSRV_CONSOLE _WINSRV_CONSOLE +#define CONSRV_CONSOLE WINSRV_CONSOLE +#define PCONSRV_CONSOLE PWINSRV_CONSOLE + +#else + +#define _CONSRV_CONSOLE _CONSOLE +#define CONSRV_CONSOLE CONSOLE +#define PCONSRV_CONSOLE PCONSOLE + +#endif + /* Default attributes */ #define DEFAULT_SCREEN_ATTRIB (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED) #define DEFAULT_POPUP_ATTRIB (FOREGROUND_BLUE | FOREGROUND_RED | \ @@ -175,7 +191,7 @@ typedef struct _CONSOLE_INPUT_BUFFER { CONSOLE_IO_OBJECT Header; /* Object header - MUST BE IN FIRST PLACE */ - ULONG InputBufferSize; /* Size of this input buffer */ + ULONG InputBufferSize; /* Size of this input buffer -- UNUSED!! */ LIST_ENTRY InputEvents; /* List head for input event queue */ HANDLE ActiveEvent; /* Event set when an input event is added in its queue */ @@ -194,17 +210,33 @@ typedef struct _TERMINAL_VTBL IN struct _CONSOLE* Console); VOID (NTAPI *DeinitTerminal)(IN OUT PTERMINAL This); + + +/************ Line discipline ***************/ + + /* Interface used only for text-mode screen buffers */ + + NTSTATUS (NTAPI *ReadStream)(IN OUT PTERMINAL This, + /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/ + IN BOOLEAN Unicode, + /**PWCHAR Buffer,**/ + OUT PVOID Buffer, + IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl, + IN ULONG NumCharsToRead, + OUT PULONG NumCharsRead OPTIONAL); + NTSTATUS (NTAPI *WriteStream)(IN OUT PTERMINAL This, + PTEXTMODE_SCREEN_BUFFER Buff, + PWCHAR Buffer, + DWORD Length, + BOOL Attrib); + +/************ Line discipline ***************/ + + + /* Interface used for both text-mode and graphics screen buffers */ VOID (NTAPI *DrawRegion)(IN OUT PTERMINAL This, SMALL_RECT* Region); - /* Interface used only for text-mode screen buffers */ - VOID (NTAPI *WriteStream)(IN OUT PTERMINAL This, - SMALL_RECT* Region, - SHORT CursorStartX, - SHORT CursorStartY, - UINT ScrolledLines, - PWCHAR Buffer, - UINT Length); BOOL (NTAPI *SetCursorInfo)(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer); BOOL (NTAPI *SetScreenInfo)(IN OUT PTERMINAL This, @@ -219,11 +251,8 @@ typedef struct _TERMINAL_VTBL /* * External interface (functions corresponding to the Console API) */ - VOID (NTAPI *ChangeTitle)(IN OUT PTERMINAL This); VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PTERMINAL This, PCOORD pSize); - // BOOL (NTAPI *GetSelectionInfo)(IN OUT PTERMINAL This, - // PCONSOLE_SELECTION_INFO pSelectionInfo); BOOL (NTAPI *SetPalette)(IN OUT PTERMINAL This, HPALETTE PaletteHandle, UINT PaletteUsage); @@ -263,51 +292,39 @@ typedef enum _CONSOLE_STATE // HACK!! struct _CONSOLE; /* HACK: */ typedef struct _CONSOLE *PCONSOLE; +#ifndef USE_NEW_CONSOLE_WAY #include "conio_winsrv.h" +#endif typedef struct _CONSOLE { /******************************* Console Set-up *******************************/ + +#ifndef USE_NEW_CONSOLE_WAY + WINSRV_CONSOLE; // HACK HACK!! +#endif + LONG ReferenceCount; /* Is incremented each time a handle to something in the console (a screen-buffer or the input buffer of this console) gets referenced */ CRITICAL_SECTION Lock; - /**/WINSRV_CONSOLE;/**/ // HACK HACK!! - CONSOLE_STATE State; /* State of the console */ TERMINAL TermIFace; /* Frontend-specific interface */ ULONG ConsoleID; /* The ID of the console */ LIST_ENTRY ListEntry; /* Entry in the list of consoles */ -/**************************** Input buffer and data ***************************/ + HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */ + +/******************************** Input buffer ********************************/ CONSOLE_INPUT_BUFFER InputBuffer; /* Input buffer of the console */ UINT InputCodePage; - /** Put those things in CONSOLE_INPUT_BUFFER in PWINSRV_CONSOLE ?? **/ - PWCHAR LineBuffer; /* Current line being input, in line buffered mode */ - ULONG LineMaxSize; /* Maximum size of line in characters (including CR+LF) */ - ULONG LineSize; /* Current size of line */ - ULONG LinePos; /* Current position within line */ - BOOLEAN LineComplete; /* User pressed enter, ready to send back to client */ - BOOLEAN LineUpPressed; - BOOLEAN LineInsertToggle; /* Replace character over cursor instead of inserting */ - ULONG LineWakeupMask; /* Bitmap of which control characters will end line input */ - - /** In PWINSRV_CONSOLE ?? **/ - BOOLEAN InsertMode; - /*************************************************/ - /******************************* Screen buffers *******************************/ LIST_ENTRY BufferList; /* List of all screen buffers for this console */ PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer */ UINT OutputCodePage; /****************************** Other properties ******************************/ - UNICODE_STRING OriginalTitle; /* Original title of console, the one defined when the console leader is launched; it never changes. Always NULL-terminated */ - UNICODE_STRING Title; /* Title of console. Always NULL-terminated */ - - HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */ - COORD ConsoleSize; /* The current size of the console, for text-mode only */ BOOLEAN FixedSize; /* TRUE if the console is of fixed size */ @@ -323,42 +340,16 @@ NTSTATUS ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent, IN PCONSOLE_PROCESS_DATA ProcessData); -/* coninput.c */ -NTSTATUS -ConioAddInputEvents(PCONSOLE Console, - PINPUT_RECORD InputRecords, - ULONG NumEventsToWrite, - PULONG NumEventsWritten, - BOOLEAN AppendToEnd); -NTSTATUS -ConioProcessInputEvent(PCONSOLE Console, - PINPUT_RECORD InputEvent); + +#define GetConsoleInputBufferMode(Console) \ + (Console)->InputBuffer.Mode + /* conoutput.c */ - -/* - * From MSDN: - * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. - * If they are the same, the function fails, and GetLastError returns - * ERROR_INVALID_PARAMETER." - */ -#define ConsoleUnicodeCharToAnsiChar(Console, dChar, sWChar) \ - ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ - WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) - -#define ConsoleAnsiCharToUnicodeChar(Console, dWChar, sChar) \ - ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ - MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1) - PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -VOID ConioDrawConsole(PCONSOLE Console); -NTSTATUS ConioResizeBuffer(PCONSOLE Console, +VOID ConioDrawConsole(PCONSOLE /*PCONSRV_CONSOLE*/ Console); +NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size); -NTSTATUS ConioWriteConsole(PCONSOLE Console, - PTEXTMODE_SCREEN_BUFFER Buff, - PWCHAR Buffer, - DWORD Length, - BOOL Attrib); /* EOF */ diff --git a/win32ss/user/winsrv/consrv/include/conio_winsrv.h b/win32ss/user/winsrv/consrv/include/conio_winsrv.h index d7be50e4e75..135ccb54352 100644 --- a/win32ss/user/winsrv/consrv/include/conio_winsrv.h +++ b/win32ss/user/winsrv/consrv/include/conio_winsrv.h @@ -14,14 +14,19 @@ // This is ALMOST a HACK!!!!!!! // Helpers for code refactoring +#ifdef USE_NEW_CONSOLE_WAY + +#define _CONSRV_CONSOLE _WINSRV_CONSOLE +#define CONSRV_CONSOLE WINSRV_CONSOLE +#define PCONSRV_CONSOLE PWINSRV_CONSOLE + +#else + #define _CONSRV_CONSOLE _CONSOLE #define CONSRV_CONSOLE CONSOLE #define PCONSRV_CONSOLE PCONSOLE -// #define _CONSRV_CONSOLE _WINSRV_CONSOLE -// #define CONSRV_CONSOLE WINSRV_CONSOLE -// #define PCONSRV_CONSOLE PWINSRV_CONSOLE - +#endif #define CSR_DEFAULT_CURSOR_SIZE 25 @@ -33,6 +38,12 @@ typedef struct _CHAR_CELL } CHAR_CELL, *PCHAR_CELL; C_ASSERT(sizeof(CHAR_CELL) == 2); +// HACK!! +struct _WINSRV_CONSOLE; +/* HACK: */ typedef struct _WINSRV_CONSOLE *PWINSRV_CONSOLE; +#ifdef USE_NEW_CONSOLE_WAY +#include "conio.h" +#endif typedef struct _FRONTEND FRONTEND, *PFRONTEND; /* HACK: */ typedef struct _CONSOLE_INFO *PCONSOLE_INFO; @@ -58,6 +69,7 @@ typedef struct _FRONTEND_VTBL UINT ScrolledLines, PWCHAR Buffer, UINT Length); + VOID (NTAPI *RingBell)(IN OUT PFRONTEND This); BOOL (NTAPI *SetCursorInfo)(IN OUT PFRONTEND This, PCONSOLE_SCREEN_BUFFER ScreenBuffer); BOOL (NTAPI *SetScreenInfo)(IN OUT PFRONTEND This, @@ -117,8 +129,11 @@ typedef struct _WINSRV_CONSOLE { /******************************* Console Set-up *******************************/ /* This **MUST** be FIRST!! */ - // CONSOLE; - // PCONSOLE Console; +#ifdef USE_NEW_CONSOLE_WAY + CONSOLE; + // CONSOLE Console; + // // PCONSOLE Console; +#endif // LONG ReferenceCount; /* Is incremented each time a handle to something in the console (a screen-buffer or the input buffer of this console) gets referenced */ // CRITICAL_SECTION Lock; @@ -131,8 +146,6 @@ typedef struct _WINSRV_CONSOLE PCONSOLE_PROCESS_DATA NotifiedLastCloseProcess; /* Pointer to the unique process that needs to be notified when the console leader process is killed */ BOOLEAN NotifyLastClose; /* TRUE if the console should send a control event when the console leader process is killed */ - BOOLEAN QuickEdit; - /******************************* Pausing support ******************************/ BYTE PauseFlags; LIST_ENTRY ReadWaitQueue; /* List head for the queue of unique input buffer read wait blocks */ @@ -145,6 +158,19 @@ typedef struct _WINSRV_CONSOLE ULONG NumberOfHistoryBuffers; /* Maximum number of history buffers allowed */ BOOLEAN HistoryNoDup; /* Remove old duplicate history entries */ +/**************************** Input Line Discipline ***************************/ + PWCHAR LineBuffer; /* Current line being input, in line buffered mode */ + ULONG LineMaxSize; /* Maximum size of line in characters (including CR+LF) */ + ULONG LineSize; /* Current size of line */ + ULONG LinePos; /* Current position within line */ + BOOLEAN LineComplete; /* User pressed enter, ready to send back to client */ + BOOLEAN LineUpPressed; + BOOLEAN LineInsertToggle; /* Replace character over cursor instead of inserting */ + ULONG LineWakeupMask; /* Bitmap of which control characters will end line input */ + + BOOLEAN InsertMode; + BOOLEAN QuickEdit; + /************************ Virtual DOS Machine support *************************/ COORD VDMBufferSize; /* Real size of the VDM buffer, in units of ??? */ HANDLE VDMBufferSection; /* Handle to the memory shared section for the VDM buffer */ @@ -157,9 +183,12 @@ typedef struct _WINSRV_CONSOLE HANDLE ErrorHardwareEvent; /****************************** Other properties ******************************/ - COLORREF Colors[16]; /* Colour palette */ + LIST_ENTRY PopupWindows; /* List of popup windows */ + UNICODE_STRING OriginalTitle; /* Original title of console, the one defined when the console leader is launched; it never changes. Always NULL-terminated */ + UNICODE_STRING Title; /* Title of console. Always NULL-terminated */ + COLORREF Colors[16]; /* Colour palette */ -} WINSRV_CONSOLE, *PWINSRV_CONSOLE; +} WINSRV_CONSOLE; // , *PWINSRV_CONSOLE; /* console.c */ VOID ConioPause(PCONSRV_CONSOLE Console, UINT Flags); @@ -181,40 +210,14 @@ DWORD ConioEffectiveCursorSize(PCONSRV_CONSOLE Console, DWORD Scale); NTSTATUS -ConioAddInputEvents(PCONSRV_CONSOLE Console, - PINPUT_RECORD InputRecords, - ULONG NumEventsToWrite, - PULONG NumEventsWritten, - BOOLEAN AppendToEnd); -NTSTATUS ConioProcessInputEvent(PCONSRV_CONSOLE Console, PINPUT_RECORD InputEvent); /* conoutput.c */ - -/* - * From MSDN: - * "The lpMultiByteStr and lpWideCharStr pointers must not be the same. - * If they are the same, the function fails, and GetLastError returns - * ERROR_INVALID_PARAMETER." - */ -#define ConsoleUnicodeCharToAnsiChar(Console, dChar, sWChar) \ - ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \ - WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) - -#define ConsoleAnsiCharToUnicodeChar(Console, dWChar, sChar) \ - ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \ - MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1) - PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y); -VOID ConioDrawConsole(PCONSRV_CONSOLE Console); -NTSTATUS ConioResizeBuffer(PCONSRV_CONSOLE Console, +VOID ConioDrawConsole(PCONSOLE /*PCONSRV_CONSOLE*/ Console); +NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console, PTEXTMODE_SCREEN_BUFFER ScreenBuffer, COORD Size); -NTSTATUS ConioWriteConsole(PCONSRV_CONSOLE Console, - PTEXTMODE_SCREEN_BUFFER Buff, - PWCHAR Buffer, - DWORD Length, - BOOL Attrib); /* EOF */ diff --git a/win32ss/user/winsrv/consrv/include/settings.h b/win32ss/user/winsrv/consrv/include/settings.h index fcef0f18b58..9edfc4ce9d9 100644 --- a/win32ss/user/winsrv/consrv/include/settings.h +++ b/win32ss/user/winsrv/consrv/include/settings.h @@ -62,6 +62,9 @@ typedef struct _CONSOLE_INFO /* * Structure used to communicate with console.dll + * + * FIXME: It should overlap with the Windows' CONSOLE_STATE_INFO structure + * for GUI terminals!! */ typedef struct _CONSOLE_PROPS { diff --git a/win32ss/user/winsrv/consrv/include/term.h b/win32ss/user/winsrv/consrv/include/term.h index 037f6e8c314..ecea140aff1 100644 --- a/win32ss/user/winsrv/consrv/include/term.h +++ b/win32ss/user/winsrv/consrv/include/term.h @@ -8,13 +8,19 @@ #pragma once -/* Macros used to call functions in the FRONTEND_VTBL virtual table */ +/* Macros used to call functions in the TERMINAL_VTBL virtual table */ + +#define TermReadStream(Console, ExeName, /**/ Unicode, /**/ Buffer, ReadControl, NumCharsToRead, NumCharsRead) \ + (Console)->TermIFace.Vtbl->ReadStream(&(Console)->TermIFace, (ExeName), /**/ (Unicode), /**/ \ + (Buffer), (ReadControl), (NumCharsToRead), (NumCharsRead)) + +#define TermWriteStream(Console, ScreenBuffer, Buffer, Length, Attrib) \ + (Console)->TermIFace.Vtbl->WriteStream(&(Console)->TermIFace, (ScreenBuffer), (Buffer), \ + (Length), (Attrib)) + #define TermDrawRegion(Console, Region) \ (Console)->TermIFace.Vtbl->DrawRegion(&(Console)->TermIFace, (Region)) -#define TermWriteStream(Console, Region, CurStartX, CurStartY, ScrolledLines, Buffer, Length) \ - (Console)->TermIFace.Vtbl->WriteStream(&(Console)->TermIFace, (Region), (CurStartX), (CurStartY), \ - (ScrolledLines), (Buffer), (Length)) #define TermSetCursorInfo(Console, ScreenBuffer) \ (Console)->TermIFace.Vtbl->SetCursorInfo(&(Console)->TermIFace, (ScreenBuffer)) #define TermSetScreenInfo(Console, ScreenBuffer, OldCursorX, OldCursorY) \ @@ -25,27 +31,30 @@ (Console)->TermIFace.Vtbl->SetActiveScreenBuffer(&(Console)->TermIFace) #define TermReleaseScreenBuffer(Console, ScreenBuffer) \ (Console)->TermIFace.Vtbl->ReleaseScreenBuffer(&(Console)->TermIFace, (ScreenBuffer)) +#define TermGetLargestConsoleWindowSize(Console, pSize) \ + (Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace, (pSize)) +#define TermSetPalette(Console, PaletteHandle, PaletteUsage) \ + (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace, (PaletteHandle), (PaletteUsage)) +#define TermShowMouseCursor(Console, Show) \ + (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace, (Show)) + + +/* Macros used to call functions in the FRONTEND_VTBL virtual table */ + #define TermRefreshInternalInfo(Console) \ (Console)->FrontEndIFace.Vtbl->RefreshInternalInfo(&(Console)->FrontEndIFace) - #define TermChangeTitle(Console) \ - (Console)->TermIFace.Vtbl->ChangeTitle(&(Console)->TermIFace) + (Console)->FrontEndIFace.Vtbl->ChangeTitle(&(Console)->FrontEndIFace) #define TermChangeIcon(Console, IconHandle) \ (Console)->FrontEndIFace.Vtbl->ChangeIcon(&(Console)->FrontEndIFace, (IconHandle)) #define TermGetConsoleWindowHandle(Console) \ (Console)->FrontEndIFace.Vtbl->GetConsoleWindowHandle(&(Console)->FrontEndIFace) -#define TermGetLargestConsoleWindowSize(Console, pSize) \ - (Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace, (pSize)) #define TermGetSelectionInfo(Console, pSelectionInfo) \ (Console)->FrontEndIFace.Vtbl->GetSelectionInfo(&(Console)->FrontEndIFace, (pSelectionInfo)) -#define TermSetPalette(Console, PaletteHandle, PaletteUsage) \ - (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace, (PaletteHandle), (PaletteUsage)) #define TermGetDisplayMode(Console) \ (Console)->FrontEndIFace.Vtbl->GetDisplayMode(&(Console)->FrontEndIFace) #define TermSetDisplayMode(Console, NewMode) \ (Console)->FrontEndIFace.Vtbl->SetDisplayMode(&(Console)->FrontEndIFace, (NewMode)) -#define TermShowMouseCursor(Console, Show) \ - (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace, (Show)) #define TermSetMouseCursor(Console, CursorHandle) \ (Console)->FrontEndIFace.Vtbl->SetMouseCursor(&(Console)->FrontEndIFace, (CursorHandle)) #define TermMenuControl(Console, CmdIdLow, CmdIdHigh) \ diff --git a/win32ss/user/winsrv/consrv/init.c b/win32ss/user/winsrv/consrv/init.c index 3f50c6b1ba9..743166dbcea 100644 --- a/win32ss/user/winsrv/consrv/init.c +++ b/win32ss/user/winsrv/consrv/init.c @@ -354,8 +354,8 @@ ConSrvNewProcess(PCSR_PROCESS SourceProcess, RtlZeroMemory(TargetProcessData, sizeof(*TargetProcessData)); TargetProcessData->Process = TargetProcess; TargetProcessData->InputWaitHandle = NULL; - TargetProcessData->ConsoleHandle = TargetProcessData->ParentConsoleHandle = NULL; - TargetProcessData->ConsoleApp = ((TargetProcess->Flags & CsrProcessIsConsoleApp) ? TRUE : FALSE); + TargetProcessData->ConsoleHandle = NULL; + TargetProcessData->ConsoleApp = FALSE; /* * The handles table gets initialized either when inheriting from @@ -377,10 +377,10 @@ ConSrvNewProcess(PCSR_PROCESS SourceProcess, * handles table: this can happen if it is a GUI application having called * AllocConsole), then try to inherit handles from the parent process. */ - if (TargetProcessData->ConsoleApp /* && SourceProcessData->ConsoleApp */) + if (TargetProcess->Flags & CsrProcessIsConsoleApp /* && SourceProcessData->ConsoleHandle != NULL */) { PCONSOLE_PROCESS_DATA SourceProcessData = ConsoleGetPerProcessData(SourceProcess); - PCONSOLE SourceConsole; + PCONSRV_CONSOLE SourceConsole; /* Validate and lock the parent's console */ if (ConSrvValidateConsole(&SourceConsole, @@ -389,10 +389,9 @@ ConSrvNewProcess(PCSR_PROCESS SourceProcess, { /* Inherit the parent's handles table */ Status = ConSrvInheritHandlesTable(SourceProcessData, TargetProcessData); - if (NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { - /* Temporary save the parent's console too */ - TargetProcessData->ParentConsoleHandle = SourceProcessData->ConsoleHandle; + DPRINT1("Inheriting handles table failed\n"); } /* Unlock the parent's console */ @@ -416,28 +415,37 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, NTSTATUS Status = STATUS_SUCCESS; PCONSRV_API_CONNECTINFO ConnectInfo = (PCONSRV_API_CONNECTINFO)ConnectionInfo; PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess); + CONSOLE_INIT_INFO ConsoleInitInfo; if ( ConnectionInfo == NULL || ConnectionInfoLength == NULL || - *ConnectionInfoLength != sizeof(CONSRV_API_CONNECTINFO) ) + *ConnectionInfoLength != sizeof(*ConnectInfo) ) { DPRINT1("CONSRV: Connection failed - ConnectionInfo = 0x%p ; ConnectionInfoLength = 0x%p (%lu), wanted %lu\n", ConnectionInfo, ConnectionInfoLength, ConnectionInfoLength ? *ConnectionInfoLength : (ULONG)-1, - sizeof(CONSRV_API_CONNECTINFO)); + sizeof(*ConnectInfo)); return STATUS_UNSUCCESSFUL; } /* If we don't need a console, then get out of here */ - if (!ConnectInfo->ConsoleStartInfo.ConsoleNeeded || !ProcessData->ConsoleApp) // In fact, it is for GUI apps. - { - return STATUS_SUCCESS; - } + DPRINT("ConnectInfo->IsConsoleApp = %s\n", ConnectInfo->IsConsoleApp ? "True" : "False"); + if (!ConnectInfo->IsConsoleApp) return STATUS_SUCCESS; - /* If we don't have a console, then create a new one... */ - if (!ConnectInfo->ConsoleHandle || - ConnectInfo->ConsoleHandle != ProcessData->ParentConsoleHandle) + /* Initialize the console initialization info structure */ + ConsoleInitInfo.ConsoleStartInfo = &ConnectInfo->ConsoleStartInfo; + ConsoleInitInfo.TitleLength = ConnectInfo->TitleLength; + ConsoleInitInfo.ConsoleTitle = ConnectInfo->ConsoleTitle; + ConsoleInitInfo.DesktopLength = ConnectInfo->DesktopLength; + ConsoleInitInfo.Desktop = ConnectInfo->Desktop; + ConsoleInitInfo.AppNameLength = ConnectInfo->AppNameLength; + ConsoleInitInfo.AppName = ConnectInfo->AppName; + ConsoleInitInfo.CurDirLength = ConnectInfo->CurDirLength; + ConsoleInitInfo.CurDir = ConnectInfo->CurDir; + + /* If we don't inherit from an existing console, then create a new one... */ + if (ConnectInfo->ConsoleStartInfo.ConsoleHandle == NULL) { DPRINT("ConSrvConnect - Allocate a new console\n"); @@ -454,10 +462,10 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, /* Initialize a new Console owned by the Console Leader Process */ Status = ConSrvAllocateConsole(ProcessData, - &ConnectInfo->InputHandle, - &ConnectInfo->OutputHandle, - &ConnectInfo->ErrorHandle, - &ConnectInfo->ConsoleStartInfo); + &ConnectInfo->ConsoleStartInfo.InputHandle, + &ConnectInfo->ConsoleStartInfo.OutputHandle, + &ConnectInfo->ConsoleStartInfo.ErrorHandle, + &ConsoleInitInfo); if (!NT_SUCCESS(Status)) { DPRINT1("Console allocation failed\n"); @@ -470,11 +478,11 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, /* Reuse our current console */ Status = ConSrvInheritConsole(ProcessData, - ConnectInfo->ConsoleHandle, + ConnectInfo->ConsoleStartInfo.ConsoleHandle, FALSE, - NULL, // &ConnectInfo->InputHandle, - NULL, // &ConnectInfo->OutputHandle, - NULL); // &ConnectInfo->ErrorHandle); + NULL, // &ConnectInfo->ConsoleStartInfo.InputHandle, + NULL, // &ConnectInfo->ConsoleStartInfo.OutputHandle, + NULL); // &ConnectInfo->ConsoleStartInfo.ErrorHandle); if (!NT_SUCCESS(Status)) { DPRINT1("Console inheritance failed\n"); @@ -482,13 +490,17 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, } } + /* Mark the process as having a console */ + ProcessData->ConsoleApp = TRUE; + // ProcessData->Flags |= CsrProcessIsConsoleApp; + /* Return the console handle and the input wait handle to the caller */ - ConnectInfo->ConsoleHandle = ProcessData->ConsoleHandle; - ConnectInfo->InputWaitHandle = ProcessData->InputWaitHandle; + ConnectInfo->ConsoleStartInfo.ConsoleHandle = ProcessData->ConsoleHandle; + ConnectInfo->ConsoleStartInfo.InputWaitHandle = ProcessData->InputWaitHandle; /* Set the Property-Dialog and Control-Dispatcher handlers */ - ProcessData->PropDispatcher = ConnectInfo->ConsoleStartInfo.PropDispatcher; - ProcessData->CtrlDispatcher = ConnectInfo->ConsoleStartInfo.CtrlDispatcher; + ProcessData->PropRoutine = ConnectInfo->PropRoutine; + ProcessData->CtrlRoutine = ConnectInfo->CtrlRoutine; return STATUS_SUCCESS; } @@ -508,6 +520,10 @@ ConSrvDisconnect(PCSR_PROCESS Process) { DPRINT("ConSrvDisconnect - calling ConSrvRemoveConsole\n"); ConSrvRemoveConsole(ProcessData); + + /* Mark the process as not having a console anymore */ + ProcessData->ConsoleApp = FALSE; + Process->Flags &= ~CsrProcessIsConsoleApp; } RtlDeleteCriticalSection(&ProcessData->HandleTableLock); diff --git a/win32ss/user/winsrv/consrv/lineinput.c b/win32ss/user/winsrv/consrv/lineinput.c index e60ff4c1135..0a839d328f9 100644 --- a/win32ss/user/winsrv/consrv/lineinput.c +++ b/win32ss/user/winsrv/consrv/lineinput.c @@ -9,30 +9,21 @@ /* INCLUDES *******************************************************************/ #include "consrv.h" +#include "popup.h" #define NDEBUG #include -typedef struct _HISTORY_BUFFER -{ - LIST_ENTRY ListEntry; - UINT Position; - UINT MaxEntries; - UINT NumEntries; - UNICODE_STRING ExeName; - PUNICODE_STRING Entries; -} HISTORY_BUFFER, *PHISTORY_BUFFER; - BOOLEAN -ConvertInputAnsiToUnicode(PCONSOLE Console, +ConvertInputAnsiToUnicode(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, // BOOLEAN IsUnicode, PWCHAR* Target, PUSHORT TargetLength); BOOLEAN -ConvertInputUnicodeToAnsi(PCONSOLE Console, +ConvertInputUnicodeToAnsi(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, // BOOLEAN IsAnsi, @@ -40,185 +31,36 @@ ConvertInputUnicodeToAnsi(PCONSOLE Console, /*P*/USHORT TargetLength); -/* PRIVATE FUNCTIONS **********************************************************/ - -static PHISTORY_BUFFER -HistoryCurrentBuffer(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName) -{ - PLIST_ENTRY Entry = Console->HistoryBuffers.Flink; - PHISTORY_BUFFER Hist; - - for (; Entry != &Console->HistoryBuffers; Entry = Entry->Flink) - { - Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); - if (RtlEqualUnicodeString(ExeName, &Hist->ExeName, FALSE)) - return Hist; - } - - /* Couldn't find the buffer, create a new one */ - Hist = ConsoleAllocHeap(0, sizeof(HISTORY_BUFFER) + ExeName->Length); - if (!Hist) return NULL; - Hist->MaxEntries = Console->HistoryBufferSize; - Hist->NumEntries = 0; - Hist->Entries = ConsoleAllocHeap(0, Hist->MaxEntries * sizeof(UNICODE_STRING)); - if (!Hist->Entries) - { - ConsoleFreeHeap(Hist); - return NULL; - } - Hist->ExeName.Length = Hist->ExeName.MaximumLength = ExeName->Length; - Hist->ExeName.Buffer = (PWCHAR)(Hist + 1); - memcpy(Hist->ExeName.Buffer, ExeName->Buffer, ExeName->Length); - InsertHeadList(&Console->HistoryBuffers, &Hist->ListEntry); - return Hist; -} - -static VOID +VOID HistoryAddEntry(PCONSRV_CONSOLE Console, - PUNICODE_STRING ExeName) -{ - UNICODE_STRING NewEntry; - PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); - INT i; - - if (!Hist) return; - - NewEntry.Length = NewEntry.MaximumLength = Console->LineSize * sizeof(WCHAR); - NewEntry.Buffer = Console->LineBuffer; - - /* Don't add blank or duplicate entries */ - if (NewEntry.Length == 0 || Hist->MaxEntries == 0 || - (Hist->NumEntries > 0 && - RtlEqualUnicodeString(&Hist->Entries[Hist->NumEntries - 1], &NewEntry, FALSE))) - { - return; - } - - if (Console->HistoryNoDup) - { - /* Check if this line has been entered before */ - for (i = Hist->NumEntries - 1; i >= 0; i--) - { - if (RtlEqualUnicodeString(&Hist->Entries[i], &NewEntry, FALSE)) - { - /* Just rotate the list to bring this entry to the end */ - NewEntry = Hist->Entries[i]; - memmove(&Hist->Entries[i], &Hist->Entries[i + 1], - (Hist->NumEntries - (i + 1)) * sizeof(UNICODE_STRING)); - Hist->Entries[Hist->NumEntries - 1] = NewEntry; - Hist->Position = Hist->NumEntries - 1; - return; - } - } - } - - if (Hist->NumEntries == Hist->MaxEntries) - { - /* List is full, remove oldest entry */ - RtlFreeUnicodeString(&Hist->Entries[0]); - memmove(&Hist->Entries[0], &Hist->Entries[1], - --Hist->NumEntries * sizeof(UNICODE_STRING)); - } - - if (NT_SUCCESS(RtlDuplicateUnicodeString(0, &NewEntry, &Hist->Entries[Hist->NumEntries]))) - Hist->NumEntries++; - Hist->Position = Hist->NumEntries - 1; -} - -static VOID + PUNICODE_STRING ExeName, + PUNICODE_STRING Entry); +BOOL +HistoryRecallHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + INT Offset, + PUNICODE_STRING Entry); +VOID HistoryGetCurrentEntry(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, - PUNICODE_STRING Entry) -{ - PHISTORY_BUFFER Hist = HistoryCurrentBuffer(Console, ExeName); - - if (!Hist || Hist->NumEntries == 0) - Entry->Length = 0; - else - *Entry = Hist->Entries[Hist->Position]; -} - -static PHISTORY_BUFFER -HistoryFindBuffer(PCONSRV_CONSOLE Console, - PVOID ExeName, - USHORT ExeLength, - BOOLEAN UnicodeExe) -{ - UNICODE_STRING ExeNameU; - - PLIST_ENTRY Entry; - PHISTORY_BUFFER Hist = NULL; - - if (ExeName == NULL) return NULL; - - if (UnicodeExe) - { - ExeNameU.Buffer = ExeName; - /* Length is in bytes */ - ExeNameU.MaximumLength = ExeLength; - } - else - { - if (!ConvertInputAnsiToUnicode(Console, - ExeName, ExeLength, - &ExeNameU.Buffer, &ExeNameU.MaximumLength)) - { - return NULL; - } - } - ExeNameU.Length = ExeNameU.MaximumLength; - - Entry = Console->HistoryBuffers.Flink; - while (Entry != &Console->HistoryBuffers) - { - Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); - - /* For the history APIs, the caller is allowed to give only part of the name */ - if (RtlPrefixUnicodeString(&ExeNameU, &Hist->ExeName, TRUE)) - { - if (!UnicodeExe) ConsoleFreeHeap(ExeNameU.Buffer); - return Hist; - } - - Entry = Entry->Flink; - } - - if (!UnicodeExe) ConsoleFreeHeap(ExeNameU.Buffer); - return NULL; -} - -static VOID -HistoryDeleteBuffer(PHISTORY_BUFFER Hist) -{ - if (!Hist) return; - - while (Hist->NumEntries != 0) - RtlFreeUnicodeString(&Hist->Entries[--Hist->NumEntries]); - - ConsoleFreeHeap(Hist->Entries); - RemoveEntryList(&Hist->ListEntry); - ConsoleFreeHeap(Hist); -} - + PUNICODE_STRING Entry); VOID -HistoryDeleteBuffers(PCONSRV_CONSOLE Console) -{ - PLIST_ENTRY CurrentEntry; - PHISTORY_BUFFER HistoryBuffer; +HistoryDeleteCurrentBuffer(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName); +BOOL +HistoryFindEntryByPrefix(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + PUNICODE_STRING Prefix, + PUNICODE_STRING Entry); - while (!IsListEmpty(&Console->HistoryBuffers)) - { - CurrentEntry = RemoveHeadList(&Console->HistoryBuffers); - HistoryBuffer = CONTAINING_RECORD(CurrentEntry, HISTORY_BUFFER, ListEntry); - HistoryDeleteBuffer(HistoryBuffer); - } -} + +/* PRIVATE FUNCTIONS **********************************************************/ static VOID -LineInputSetPos(PCONSRV_CONSOLE Console, UINT Pos) +LineInputSetPos(PCONSRV_CONSOLE Console, + UINT Pos) { - if (Pos != Console->LinePos && Console->InputBuffer.Mode & ENABLE_ECHO_INPUT) + if (Pos != Console->LinePos && GetConsoleInputBufferMode(Console) & ENABLE_ECHO_INPUT) { PCONSOLE_SCREEN_BUFFER Buffer = Console->ActiveBuffer; SHORT OldCursorX = Buffer->CursorPosition.X; @@ -240,7 +82,10 @@ LineInputSetPos(PCONSRV_CONSOLE Console, UINT Pos) } static VOID -LineInputEdit(PCONSRV_CONSOLE Console, UINT NumToDelete, UINT NumToInsert, PWCHAR Insertion) +LineInputEdit(PCONSRV_CONSOLE Console, + UINT NumToDelete, + UINT NumToInsert, + PWCHAR Insertion) { PTEXTMODE_SCREEN_BUFFER ActiveBuffer; UINT Pos = Console->LinePos; @@ -259,15 +104,15 @@ LineInputEdit(PCONSRV_CONSOLE Console, UINT NumToDelete, UINT NumToInsert, PWCHA (Console->LineSize - (Pos + NumToDelete)) * sizeof(WCHAR)); memcpy(&Console->LineBuffer[Pos], Insertion, NumToInsert * sizeof(WCHAR)); - if (Console->InputBuffer.Mode & ENABLE_ECHO_INPUT) + if (GetConsoleInputBufferMode(Console) & ENABLE_ECHO_INPUT) { for (i = Pos; i < NewSize; i++) { - ConioWriteConsole(Console, ActiveBuffer, &Console->LineBuffer[i], 1, TRUE); + TermWriteStream(Console, ActiveBuffer, &Console->LineBuffer[i], 1, TRUE); } for (; i < Console->LineSize; i++) { - ConioWriteConsole(Console, ActiveBuffer, L" ", 1, TRUE); + TermWriteStream(Console, ActiveBuffer, L" ", 1, TRUE); } Console->LinePos = i; } @@ -276,6 +121,7 @@ LineInputEdit(PCONSRV_CONSOLE Console, UINT NumToDelete, UINT NumToInsert, PWCHA LineInputSetPos(Console, Pos + NumToInsert); } +#if 0 static VOID LineInputRecallHistory(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, @@ -295,6 +141,30 @@ LineInputRecallHistory(PCONSRV_CONSOLE Console, Hist->Entries[Hist->Position].Length / sizeof(WCHAR), Hist->Entries[Hist->Position].Buffer); } +#else +static VOID +LineInputRecallHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName, + INT Offset) +{ + UNICODE_STRING Entry; + + if (!HistoryRecallHistory(Console, ExeName, Offset, &Entry)) return; + + LineInputSetPos(Console, 0); + LineInputEdit(Console, Console->LineSize, + Entry.Length / sizeof(WCHAR), + Entry.Buffer); +} +#endif + + +// TESTS!! +PPOPUP_WINDOW Popup = NULL; + +PPOPUP_WINDOW +HistoryDisplayCurrentHistory(PCONSRV_CONSOLE Console, + PUNICODE_STRING ExeName); VOID LineInputKeyDown(PCONSRV_CONSOLE Console, @@ -302,145 +172,238 @@ LineInputKeyDown(PCONSRV_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent) { UINT Pos = Console->LinePos; - PHISTORY_BUFFER Hist; UNICODE_STRING Entry; - INT HistPos; + + /* + * First, deal with control keys... + */ switch (KeyEvent->wVirtualKeyCode) { - case VK_ESCAPE: - /* Clear entire line */ - LineInputSetPos(Console, 0); - LineInputEdit(Console, Console->LineSize, 0, NULL); - return; - case VK_HOME: - /* Move to start of line. With ctrl, erase everything left of cursor */ - LineInputSetPos(Console, 0); - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - LineInputEdit(Console, Pos, 0, NULL); - return; - case VK_END: - /* Move to end of line. With ctrl, erase everything right of cursor */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - LineInputEdit(Console, Console->LineSize - Pos, 0, NULL); - else - LineInputSetPos(Console, Console->LineSize); - return; - case VK_LEFT: - /* Move left. With ctrl, move to beginning of previous word */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + case VK_ESCAPE: { - while (Pos > 0 && Console->LineBuffer[Pos - 1] == L' ') Pos--; - while (Pos > 0 && Console->LineBuffer[Pos - 1] != L' ') Pos--; + /* Clear entire line */ + LineInputSetPos(Console, 0); + LineInputEdit(Console, Console->LineSize, 0, NULL); + + // TESTS!! + if (Popup) + { + DestroyPopupWindow(Popup); + Popup = NULL; + } + return; } - else + + case VK_HOME: { - Pos -= (Pos > 0); + /* Move to start of line. With CTRL, erase everything left of cursor */ + LineInputSetPos(Console, 0); + if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + LineInputEdit(Console, Pos, 0, NULL); + return; } - LineInputSetPos(Console, Pos); - return; - case VK_RIGHT: - case VK_F1: - /* Move right. With ctrl, move to beginning of next word */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + + case VK_END: { - while (Pos < Console->LineSize && Console->LineBuffer[Pos] != L' ') Pos++; - while (Pos < Console->LineSize && Console->LineBuffer[Pos] == L' ') Pos++; + /* Move to end of line. With CTRL, erase everything right of cursor */ + if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + LineInputEdit(Console, Console->LineSize - Pos, 0, NULL); + else + LineInputSetPos(Console, Console->LineSize); + return; + } + + case VK_LEFT: + { + /* Move left. With CTRL, move to beginning of previous word */ + if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + { + while (Pos > 0 && Console->LineBuffer[Pos - 1] == L' ') Pos--; + while (Pos > 0 && Console->LineBuffer[Pos - 1] != L' ') Pos--; + } + else + { + Pos -= (Pos > 0); + } LineInputSetPos(Console, Pos); return; } - else - { - /* Recall one character (but don't overwrite current line) */ - HistoryGetCurrentEntry(Console, ExeName, &Entry); - if (Pos < Console->LineSize) - LineInputSetPos(Console, Pos + 1); - else if (Pos * sizeof(WCHAR) < Entry.Length) - LineInputEdit(Console, 0, 1, &Entry.Buffer[Pos]); - } - return; - case VK_INSERT: - /* Toggle between insert and overstrike */ - Console->LineInsertToggle = !Console->LineInsertToggle; - TermSetCursorInfo(Console, Console->ActiveBuffer); - return; - case VK_DELETE: - /* Remove character to right of cursor */ - if (Pos != Console->LineSize) - LineInputEdit(Console, 1, 0, NULL); - return; - case VK_PRIOR: - /* Recall first history entry */ - LineInputRecallHistory(Console, ExeName, -((WORD)-1)); - return; - case VK_NEXT: - /* Recall last history entry */ - LineInputRecallHistory(Console, ExeName, +((WORD)-1)); - return; - case VK_UP: - case VK_F5: - /* Recall previous history entry. On first time, actually recall the - * current (usually last) entry; on subsequent times go back. */ - LineInputRecallHistory(Console, ExeName, Console->LineUpPressed ? -1 : 0); - Console->LineUpPressed = TRUE; - return; - case VK_DOWN: - /* Recall next history entry */ - LineInputRecallHistory(Console, ExeName, +1); - return; - case VK_F3: - /* Recall remainder of current history entry */ - HistoryGetCurrentEntry(Console, ExeName, &Entry); - if (Pos * sizeof(WCHAR) < Entry.Length) - { - UINT InsertSize = (Entry.Length / sizeof(WCHAR) - Pos); - UINT DeleteSize = min(Console->LineSize - Pos, InsertSize); - LineInputEdit(Console, DeleteSize, InsertSize, &Entry.Buffer[Pos]); - } - return; - case VK_F6: - /* Insert a ^Z character */ - KeyEvent->uChar.UnicodeChar = 26; - break; - case VK_F7: - if (KeyEvent->dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) - HistoryDeleteBuffer(HistoryCurrentBuffer(Console, ExeName)); - return; - case VK_F8: - /* Search for history entries starting with input. */ - Hist = HistoryCurrentBuffer(Console, ExeName); - if (!Hist || Hist->NumEntries == 0) return; - /* Like Up/F5, on first time start from current (usually last) entry, - * but on subsequent times start at previous entry. */ - if (Console->LineUpPressed) - Hist->Position = (Hist->Position ? Hist->Position : Hist->NumEntries) - 1; - Console->LineUpPressed = TRUE; - - Entry.Length = Console->LinePos * sizeof(WCHAR); - Entry.Buffer = Console->LineBuffer; - - /* Keep going backwards, even wrapping around to the end, - * until we get back to starting point */ - HistPos = Hist->Position; - do + case VK_RIGHT: + case VK_F1: { - if (RtlPrefixUnicodeString(&Entry, &Hist->Entries[HistPos], FALSE)) + /* Move right. With CTRL, move to beginning of next word */ + if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) + { + while (Pos < Console->LineSize && Console->LineBuffer[Pos] != L' ') Pos++; + while (Pos < Console->LineSize && Console->LineBuffer[Pos] == L' ') Pos++; + LineInputSetPos(Console, Pos); + } + else + { + /* Recall one character (but don't overwrite current line) */ + HistoryGetCurrentEntry(Console, ExeName, &Entry); + if (Pos < Console->LineSize) + LineInputSetPos(Console, Pos + 1); + else if (Pos * sizeof(WCHAR) < Entry.Length) + LineInputEdit(Console, 0, 1, &Entry.Buffer[Pos]); + } + return; + } + + case VK_INSERT: + { + /* Toggle between insert and overstrike */ + Console->LineInsertToggle = !Console->LineInsertToggle; + TermSetCursorInfo(Console, Console->ActiveBuffer); + return; + } + + case VK_DELETE: + { + /* Remove character to right of cursor */ + if (Pos != Console->LineSize) + LineInputEdit(Console, 1, 0, NULL); + return; + } + + case VK_PRIOR: + { + /* Recall first history entry */ + LineInputRecallHistory(Console, ExeName, -((WORD)-1)); + return; + } + + case VK_NEXT: + { + /* Recall last history entry */ + LineInputRecallHistory(Console, ExeName, +((WORD)-1)); + return; + } + + case VK_UP: + case VK_F5: + { + /* + * Recall previous history entry. On first time, actually recall the + * current (usually last) entry; on subsequent times go back. + */ + LineInputRecallHistory(Console, ExeName, Console->LineUpPressed ? -1 : 0); + Console->LineUpPressed = TRUE; + return; + } + + case VK_DOWN: + { + /* Recall next history entry */ + LineInputRecallHistory(Console, ExeName, +1); + return; + } + + case VK_F3: + { + /* Recall remainder of current history entry */ + HistoryGetCurrentEntry(Console, ExeName, &Entry); + if (Pos * sizeof(WCHAR) < Entry.Length) + { + UINT InsertSize = (Entry.Length / sizeof(WCHAR) - Pos); + UINT DeleteSize = min(Console->LineSize - Pos, InsertSize); + LineInputEdit(Console, DeleteSize, InsertSize, &Entry.Buffer[Pos]); + } + return; + } + + case VK_F6: + { + /* Insert a ^Z character */ + KeyEvent->uChar.UnicodeChar = 26; + break; + } + + case VK_F7: + { + if (KeyEvent->dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) + HistoryDeleteCurrentBuffer(Console, ExeName); + else + { + if (Popup) DestroyPopupWindow(Popup); + Popup = HistoryDisplayCurrentHistory(Console, ExeName); + } + return; + } + + case VK_F8: + { + UNICODE_STRING EntryFound; + + Entry.Length = Console->LinePos * sizeof(WCHAR); // == Pos * sizeof(WCHAR) + Entry.Buffer = Console->LineBuffer; + + if (HistoryFindEntryByPrefix(Console, ExeName, &Entry, &EntryFound)) { - Hist->Position = HistPos; LineInputEdit(Console, Console->LineSize - Pos, - Hist->Entries[HistPos].Length / sizeof(WCHAR) - Pos, - &Hist->Entries[HistPos].Buffer[Pos]); + EntryFound.Length / sizeof(WCHAR) - Pos, + &EntryFound.Buffer[Pos]); /* Cursor stays where it was */ LineInputSetPos(Console, Pos); - return; } - if (--HistPos < 0) HistPos += Hist->NumEntries; - } while (HistPos != Hist->Position); + + return; + } +#if 0 + { + PHISTORY_BUFFER Hist; + INT HistPos; + + /* Search for history entries starting with input. */ + Hist = HistoryCurrentBuffer(Console, ExeName); + if (!Hist || Hist->NumEntries == 0) return; + + /* + * Like Up/F5, on first time start from current (usually last) entry, + * but on subsequent times start at previous entry. + */ + if (Console->LineUpPressed) + Hist->Position = (Hist->Position ? Hist->Position : Hist->NumEntries) - 1; + Console->LineUpPressed = TRUE; + + Entry.Length = Console->LinePos * sizeof(WCHAR); // == Pos * sizeof(WCHAR) + Entry.Buffer = Console->LineBuffer; + + /* + * Keep going backwards, even wrapping around to the end, + * until we get back to starting point. + */ + HistPos = Hist->Position; + do + { + if (RtlPrefixUnicodeString(&Entry, &Hist->Entries[HistPos], FALSE)) + { + Hist->Position = HistPos; + LineInputEdit(Console, Console->LineSize - Pos, + Hist->Entries[HistPos].Length / sizeof(WCHAR) - Pos, + &Hist->Entries[HistPos].Buffer[Pos]); + /* Cursor stays where it was */ + LineInputSetPos(Console, Pos); + return; + } + if (--HistPos < 0) HistPos += Hist->NumEntries; + } while (HistPos != Hist->Position); + + return; + } +#endif + return; } - if (KeyEvent->uChar.UnicodeChar == L'\b' && Console->InputBuffer.Mode & ENABLE_PROCESSED_INPUT) + + /* + * OK, we deal with normal keys, we can continue... + */ + + if (KeyEvent->uChar.UnicodeChar == L'\b' && GetConsoleInputBufferMode(Console) & ENABLE_PROCESSED_INPUT) { /* backspace handling - if processed input enabled then we handle it here * otherwise we treat it like a normal char. */ @@ -452,32 +415,37 @@ LineInputKeyDown(PCONSRV_CONSOLE Console, } else if (KeyEvent->uChar.UnicodeChar == L'\r') { - HistoryAddEntry(Console, ExeName); + Entry.Length = Entry.MaximumLength = Console->LineSize * sizeof(WCHAR); + Entry.Buffer = Console->LineBuffer; + HistoryAddEntry(Console, ExeName, &Entry); /* TODO: Expand aliases */ + DPRINT1("TODO: Expand aliases\n"); LineInputSetPos(Console, Console->LineSize); Console->LineBuffer[Console->LineSize++] = L'\r'; - if (Console->InputBuffer.Mode & ENABLE_ECHO_INPUT) + if (GetConsoleInputBufferMode(Console) & ENABLE_ECHO_INPUT) { if (GetType(Console->ActiveBuffer) == TEXTMODE_BUFFER) { - ConioWriteConsole(Console, (PTEXTMODE_SCREEN_BUFFER)(Console->ActiveBuffer), L"\r", 1, TRUE); + TermWriteStream(Console, (PTEXTMODE_SCREEN_BUFFER)(Console->ActiveBuffer), L"\r", 1, TRUE); } } - /* Add \n if processed input. There should usually be room for it, + /* + * Add \n if processed input. There should usually be room for it, * but an exception to the rule exists: the buffer could have been - * pre-filled with LineMaxSize - 1 characters. */ - if (Console->InputBuffer.Mode & ENABLE_PROCESSED_INPUT && + * pre-filled with LineMaxSize - 1 characters. + */ + if (GetConsoleInputBufferMode(Console) & ENABLE_PROCESSED_INPUT && Console->LineSize < Console->LineMaxSize) { Console->LineBuffer[Console->LineSize++] = L'\n'; - if (Console->InputBuffer.Mode & ENABLE_ECHO_INPUT) + if (GetConsoleInputBufferMode(Console) & ENABLE_ECHO_INPUT) { if (GetType(Console->ActiveBuffer) == TEXTMODE_BUFFER) { - ConioWriteConsole(Console, (PTEXTMODE_SCREEN_BUFFER)(Console->ActiveBuffer), L"\n", 1, TRUE); + TermWriteStream(Console, (PTEXTMODE_SCREEN_BUFFER)(Console->ActiveBuffer), L"\n", 1, TRUE); } } } @@ -499,6 +467,7 @@ LineInputKeyDown(PCONSRV_CONSOLE Console, { /* Normal character */ BOOL Overstrike = !Console->LineInsertToggle && (Console->LinePos != Console->LineSize); + DPRINT("Overstrike = %s\n", Overstrike ? "true" : "false"); LineInputEdit(Console, (Overstrike ? 1 : 0), 1, &KeyEvent->uChar.UnicodeChar); } } @@ -507,272 +476,4 @@ LineInputKeyDown(PCONSRV_CONSOLE Console, /* PUBLIC SERVER APIS *********************************************************/ -CSR_API(SrvGetConsoleCommandHistory) -{ - NTSTATUS Status; - PCONSOLE_GETCOMMANDHISTORY GetCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryRequest; - PCONSRV_CONSOLE Console; - ULONG BytesWritten = 0; - PHISTORY_BUFFER Hist; - - DPRINT1("SrvGetConsoleCommandHistory entered\n"); - - if ( !CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&GetCommandHistoryRequest->History, - GetCommandHistoryRequest->HistoryLength, - sizeof(BYTE)) || - !CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&GetCommandHistoryRequest->ExeName, - GetCommandHistoryRequest->ExeLength, - sizeof(BYTE)) ) - { - return STATUS_INVALID_PARAMETER; - } - - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - Hist = HistoryFindBuffer(Console, - GetCommandHistoryRequest->ExeName, - GetCommandHistoryRequest->ExeLength, - GetCommandHistoryRequest->Unicode2); - if (Hist) - { - UINT i; - - LPSTR TargetBufferA; - LPWSTR TargetBufferW; - ULONG BufferSize = GetCommandHistoryRequest->HistoryLength; - - UINT Offset = 0; - UINT SourceLength; - - if (GetCommandHistoryRequest->Unicode) - { - TargetBufferW = GetCommandHistoryRequest->History; - BufferSize /= sizeof(WCHAR); - } - else - { - TargetBufferA = GetCommandHistoryRequest->History; - } - - for (i = 0; i < Hist->NumEntries; i++) - { - SourceLength = Hist->Entries[i].Length / sizeof(WCHAR); - if (Offset + SourceLength + 1 > BufferSize) - { - Status = STATUS_BUFFER_OVERFLOW; - break; - } - - if (GetCommandHistoryRequest->Unicode) - { - RtlCopyMemory(&TargetBufferW[Offset], Hist->Entries[i].Buffer, SourceLength * sizeof(WCHAR)); - Offset += SourceLength; - TargetBufferW[Offset++] = L'\0'; - } - else - { - ConvertInputUnicodeToAnsi(Console, - Hist->Entries[i].Buffer, SourceLength * sizeof(WCHAR), - &TargetBufferA[Offset], SourceLength); - Offset += SourceLength; - TargetBufferA[Offset++] = '\0'; - } - } - - if (GetCommandHistoryRequest->Unicode) - BytesWritten = Offset * sizeof(WCHAR); - else - BytesWritten = Offset; - } - - // GetCommandHistoryRequest->HistoryLength = TargetBuffer - (PBYTE)GetCommandHistoryRequest->History; - GetCommandHistoryRequest->HistoryLength = BytesWritten; - - ConSrvReleaseConsole(Console, TRUE); - return Status; -} - -CSR_API(SrvGetConsoleCommandHistoryLength) -{ - NTSTATUS Status; - PCONSOLE_GETCOMMANDHISTORYLENGTH GetCommandHistoryLengthRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.GetCommandHistoryLengthRequest; - PCONSRV_CONSOLE Console; - PHISTORY_BUFFER Hist; - ULONG Length = 0; - UINT i; - - if (!CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&GetCommandHistoryLengthRequest->ExeName, - GetCommandHistoryLengthRequest->ExeLength, - sizeof(BYTE))) - { - return STATUS_INVALID_PARAMETER; - } - - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - Hist = HistoryFindBuffer(Console, - GetCommandHistoryLengthRequest->ExeName, - GetCommandHistoryLengthRequest->ExeLength, - GetCommandHistoryLengthRequest->Unicode2); - if (Hist) - { - for (i = 0; i < Hist->NumEntries; i++) - Length += Hist->Entries[i].Length + sizeof(WCHAR); // Each entry is returned NULL-terminated - } - /* - * Quick and dirty way of getting the number of bytes of the - * corresponding ANSI string from the one in UNICODE. - */ - if (!GetCommandHistoryLengthRequest->Unicode) - Length /= sizeof(WCHAR); - - GetCommandHistoryLengthRequest->HistoryLength = Length; - - ConSrvReleaseConsole(Console, TRUE); - return Status; -} - -CSR_API(SrvExpungeConsoleCommandHistory) -{ - NTSTATUS Status; - PCONSOLE_EXPUNGECOMMANDHISTORY ExpungeCommandHistoryRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.ExpungeCommandHistoryRequest; - PCONSRV_CONSOLE Console; - PHISTORY_BUFFER Hist; - - if (!CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&ExpungeCommandHistoryRequest->ExeName, - ExpungeCommandHistoryRequest->ExeLength, - sizeof(BYTE))) - { - return STATUS_INVALID_PARAMETER; - } - - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - Hist = HistoryFindBuffer(Console, - ExpungeCommandHistoryRequest->ExeName, - ExpungeCommandHistoryRequest->ExeLength, - ExpungeCommandHistoryRequest->Unicode2); - HistoryDeleteBuffer(Hist); - - ConSrvReleaseConsole(Console, TRUE); - return Status; -} - -CSR_API(SrvSetConsoleNumberOfCommands) -{ - NTSTATUS Status; - PCONSOLE_SETHISTORYNUMBERCOMMANDS SetHistoryNumberCommandsRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryNumberCommandsRequest; - PCONSRV_CONSOLE Console; - PHISTORY_BUFFER Hist; - - if (!CsrValidateMessageBuffer(ApiMessage, - (PVOID*)&SetHistoryNumberCommandsRequest->ExeName, - SetHistoryNumberCommandsRequest->ExeLength, - sizeof(BYTE))) - { - return STATUS_INVALID_PARAMETER; - } - - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - Hist = HistoryFindBuffer(Console, - SetHistoryNumberCommandsRequest->ExeName, - SetHistoryNumberCommandsRequest->ExeLength, - SetHistoryNumberCommandsRequest->Unicode2); - if (Hist) - { - UINT MaxEntries = SetHistoryNumberCommandsRequest->NumCommands; - PUNICODE_STRING OldEntryList = Hist->Entries; - PUNICODE_STRING NewEntryList = ConsoleAllocHeap(0, MaxEntries * sizeof(UNICODE_STRING)); - if (!NewEntryList) - { - Status = STATUS_NO_MEMORY; - } - else - { - /* If necessary, shrink by removing oldest entries */ - for (; Hist->NumEntries > MaxEntries; Hist->NumEntries--) - { - RtlFreeUnicodeString(Hist->Entries++); - Hist->Position += (Hist->Position == 0); - } - - Hist->MaxEntries = MaxEntries; - Hist->Entries = memcpy(NewEntryList, Hist->Entries, - Hist->NumEntries * sizeof(UNICODE_STRING)); - ConsoleFreeHeap(OldEntryList); - } - } - - ConSrvReleaseConsole(Console, TRUE); - return Status; -} - -CSR_API(SrvGetConsoleHistory) -{ -#if 0 // Vista+ - PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; - PCONSRV_CONSOLE Console; - NTSTATUS Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (NT_SUCCESS(Status)) - { - HistoryInfoRequest->HistoryBufferSize = Console->HistoryBufferSize; - HistoryInfoRequest->NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; - HistoryInfoRequest->dwFlags = Console->HistoryNoDup; - ConSrvReleaseConsole(Console, TRUE); - } - return Status; -#else - DPRINT1("%s not yet implemented\n", __FUNCTION__); - return STATUS_NOT_IMPLEMENTED; -#endif -} - -CSR_API(SrvSetConsoleHistory) -{ -#if 0 // Vista+ - PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.HistoryInfoRequest; - PCONSRV_CONSOLE Console; - NTSTATUS Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (NT_SUCCESS(Status)) - { - Console->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize; - Console->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers; - Console->HistoryNoDup = HistoryInfoRequest->dwFlags & HISTORY_NO_DUP_FLAG; - ConSrvReleaseConsole(Console, TRUE); - } - return Status; -#else - DPRINT1("%s not yet implemented\n", __FUNCTION__); - return STATUS_NOT_IMPLEMENTED; -#endif -} - -CSR_API(SrvSetConsoleCommandHistoryMode) -{ - NTSTATUS Status; - PCONSOLE_SETHISTORYMODE SetHistoryModeRequest = &((PCONSOLE_API_MESSAGE)ApiMessage)->Data.SetHistoryModeRequest; - PCONSRV_CONSOLE Console; - - DPRINT1("SrvSetConsoleCommandHistoryMode(Mode = %d) is not yet implemented\n", - SetHistoryModeRequest->Mode); - - Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process), &Console, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - /* This API is not yet implemented */ - Status = STATUS_NOT_IMPLEMENTED; - - ConSrvReleaseConsole(Console, TRUE); - return Status; -} - /* EOF */ diff --git a/win32ss/user/winsrv/consrv/lineinput.h b/win32ss/user/winsrv/consrv/lineinput.h index 55511a0f758..c26a33a34ca 100644 --- a/win32ss/user/winsrv/consrv/lineinput.h +++ b/win32ss/user/winsrv/consrv/lineinput.h @@ -1,15 +1,13 @@ /* * LICENSE: GPL - See COPYING in the top level directory * PROJECT: ReactOS Console Server DLL - * FILE: win32ss/user/winsrv/consrv/lineinput.c + * FILE: win32ss/user/winsrv/consrv/lineinput.h * PURPOSE: Console line input functions * PROGRAMMERS: Jeffrey Morlan */ #pragma once -VOID HistoryDeleteBuffers(PCONSRV_CONSOLE Console); - VOID LineInputKeyDown(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, diff --git a/win32ss/user/winsrv/consrv/popup.c b/win32ss/user/winsrv/consrv/popup.c new file mode 100644 index 00000000000..559e37fb5b0 --- /dev/null +++ b/win32ss/user/winsrv/consrv/popup.c @@ -0,0 +1,262 @@ +/* + * LICENSE: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Console Server DLL + * FILE: win32ss/user/winsrv/consrv/popup.c + * PURPOSE: Console popup windows + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) + * + * NOTE: Strongly inspired by the DrawBox function + * from base/setup/usetup/interface/usetup.c, written by: + * Eric Kohl (revision 3753) + * Herv Poussineau (revision 24718) + * and *UiDisplayMenu from FreeLdr. + */ + +/* INCLUDES *******************************************************************/ + +#include "consrv.h" +#include "popup.h" + +#define NDEBUG +#include + + +/* PRIVATE FUNCTIONS **********************************************************/ + +NTSTATUS NTAPI +ConDrvFillConsoleOutput(IN PCONSOLE Console, + IN PTEXTMODE_SCREEN_BUFFER Buffer, + IN CODE_TYPE CodeType, + IN CODE_ELEMENT Code, + IN ULONG NumCodesToWrite, + IN PCOORD WriteCoord, + OUT PULONG NumCodesWritten OPTIONAL); +NTSTATUS NTAPI +ConDrvReadConsoleOutput(IN PCONSOLE Console, + IN PTEXTMODE_SCREEN_BUFFER Buffer, + IN BOOLEAN Unicode, + OUT PCHAR_INFO CharInfo/*Buffer*/, + IN OUT PSMALL_RECT ReadRegion); +NTSTATUS NTAPI +ConDrvWriteConsoleOutput(IN PCONSOLE Console, + IN PTEXTMODE_SCREEN_BUFFER Buffer, + IN BOOLEAN Unicode, + IN PCHAR_INFO CharInfo/*Buffer*/, + IN OUT PSMALL_RECT WriteRegion); + + +static VOID +DrawBox(PTEXTMODE_SCREEN_BUFFER Buffer, + IN SHORT xLeft, + IN SHORT yTop, + IN SHORT Width, + IN SHORT Height) +{ + COORD coPos; + DWORD Written; + CODE_ELEMENT Code; + + /* Set screen attributes */ + coPos.X = xLeft; + for (coPos.Y = yTop; coPos.Y < yTop + Height; coPos.Y++) + { + Code.Attribute = Buffer->PopupDefaultAttrib; + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ATTRIBUTE, + Code, + Width, + &coPos, + &Written); + } + + /* draw upper left corner */ + coPos.X = xLeft; + coPos.Y = yTop; + Code.AsciiChar = 0xDA; // '+' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); + + /* draw upper edge */ + coPos.X = xLeft + 1; + coPos.Y = yTop; + Code.AsciiChar = 0xC4; // '-' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + Width - 2, + &coPos, + &Written); + + /* draw upper right corner */ + coPos.X = xLeft + Width - 1; + coPos.Y = yTop; + Code.AsciiChar = 0xBF; // '+' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); + + /* Draw right edge, inner space and left edge */ + for (coPos.Y = yTop + 1; coPos.Y < yTop + Height - 1; coPos.Y++) + { + coPos.X = xLeft; + Code.AsciiChar = 0xB3; // '|' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); + + coPos.X = xLeft + 1; + Code.AsciiChar = ' '; + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + Width - 2, + &coPos, + &Written); + + coPos.X = xLeft + Width - 1; + Code.AsciiChar = 0xB3; // '|' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); + } + + /* draw lower left corner */ + coPos.X = xLeft; + coPos.Y = yTop + Height - 1; + Code.AsciiChar = 0xC0; // '+' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); + + /* draw lower edge */ + coPos.X = xLeft + 1; + coPos.Y = yTop + Height - 1; + Code.AsciiChar = 0xC4; // '-' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + Width - 2, + &coPos, + &Written); + + /* draw lower right corner */ + coPos.X = xLeft + Width - 1; + coPos.Y = yTop + Height - 1; + Code.AsciiChar = 0xD9; // '+' + ConDrvFillConsoleOutput(Buffer->Header.Console, + Buffer, + CODE_ASCII, + Code, + 1, + &coPos, + &Written); +} + + +/* PUBLIC FUNCTIONS ***********************************************************/ + +PPOPUP_WINDOW +CreatePopupWindow(PCONSRV_CONSOLE Console, + PTEXTMODE_SCREEN_BUFFER Buffer, + SHORT xLeft, + SHORT yTop, + SHORT Width, + SHORT Height) +{ + PPOPUP_WINDOW Popup; + SMALL_RECT Region; + + ASSERT((PCONSOLE)Console == Buffer->Header.Console); + + /* Create the popup window */ + Popup = ConsoleAllocHeap(HEAP_ZERO_MEMORY, sizeof(*Popup)); + if (Popup == NULL) return NULL; + + Popup->ScreenBuffer = Buffer; + Popup->Origin.X = xLeft; + Popup->Origin.Y = yTop; + Popup->Size.X = Width; + Popup->Size.Y = Height; + + /* Save old contents */ + Popup->OldContents = ConsoleAllocHeap(HEAP_ZERO_MEMORY, + Popup->Size.X * Popup->Size.Y * + sizeof(*Popup->OldContents)); + if (Popup->OldContents == NULL) + { + ConsoleFreeHeap(Popup); + return NULL; + } + Region.Left = Popup->Origin.X; + Region.Top = Popup->Origin.Y; + Region.Right = Popup->Origin.X + Popup->Size.X - 1; + Region.Bottom = Popup->Origin.Y + Popup->Size.Y - 1; + ConDrvReadConsoleOutput(Buffer->Header.Console, + Buffer, + TRUE, + Popup->OldContents, + &Region); + + /* Draw it */ + DrawBox(Buffer, + xLeft, yTop, + Width, Height); + + /* Add it into the list of popups */ + InsertTailList(&Console->PopupWindows, &Popup->ListEntry); + + return Popup; +} + +VOID +DestroyPopupWindow(PPOPUP_WINDOW Popup) +{ + SMALL_RECT Region; + + if (Popup == NULL) return; + + /* Remove it from the list of popups */ + RemoveEntryList(&Popup->ListEntry); + + /* Restore the old screen-buffer contents */ + Region.Left = Popup->Origin.X; + Region.Top = Popup->Origin.Y; + Region.Right = Popup->Origin.X + Popup->Size.X - 1; + Region.Bottom = Popup->Origin.Y + Popup->Size.Y - 1; + ConDrvWriteConsoleOutput(Popup->ScreenBuffer->Header.Console, + Popup->ScreenBuffer, + TRUE, + Popup->OldContents, + &Region); + + /* Free memory */ + ConsoleFreeHeap(Popup->OldContents); + ConsoleFreeHeap(Popup); +} + +/* EOF */ diff --git a/win32ss/user/winsrv/consrv/popup.h b/win32ss/user/winsrv/consrv/popup.h new file mode 100644 index 00000000000..a103d158830 --- /dev/null +++ b/win32ss/user/winsrv/consrv/popup.h @@ -0,0 +1,37 @@ +/* + * LICENSE: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Console Server DLL + * FILE: win32ss/user/winsrv/consrv/popup.h + * PURPOSE: Console popup windows + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +#pragma once + +typedef +VOID +(NTAPI *PPOPUP_INPUT_ROUTINE)(VOID); + +typedef struct _POPUP_WINDOW +{ + LIST_ENTRY ListEntry; /* Entry in console's list of popups */ + PTEXTMODE_SCREEN_BUFFER ScreenBuffer; /* Associated screen-buffer */ + + // SMALL_RECT Region; /* The region the popup occupies */ + COORD Origin; /* Origin of the popup window */ + COORD Size; /* Size of the popup window */ + + PCHAR_INFO OldContents; /* The data under the popup window */ + PPOPUP_INPUT_ROUTINE PopupInputRoutine; /* Routine called when input is received */ +} POPUP_WINDOW, *PPOPUP_WINDOW; + + +PPOPUP_WINDOW +CreatePopupWindow(PCONSRV_CONSOLE Console, + PTEXTMODE_SCREEN_BUFFER Buffer, + SHORT xLeft, + SHORT yTop, + SHORT Width, + SHORT Height); +VOID +DestroyPopupWindow(PPOPUP_WINDOW Popup); diff --git a/win32ss/user/winsrv/consrv/procinit.h b/win32ss/user/winsrv/consrv/procinit.h index 493415156eb..cbc0d6b002b 100644 --- a/win32ss/user/winsrv/consrv/procinit.h +++ b/win32ss/user/winsrv/consrv/procinit.h @@ -9,14 +9,14 @@ #pragma once NTSTATUS ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, - PHANDLE pInputHandle, - PHANDLE pOutputHandle, - PHANDLE pErrorHandle, - PCONSOLE_START_INFO ConsoleStartInfo); + PHANDLE pInputHandle, + PHANDLE pOutputHandle, + PHANDLE pErrorHandle, + PCONSOLE_INIT_INFO ConsoleInitInfo); NTSTATUS ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, - HANDLE ConsoleHandle, - BOOLEAN CreateNewHandlesTable, - PHANDLE pInputHandle, - PHANDLE pOutputHandle, - PHANDLE pErrorHandle); + HANDLE ConsoleHandle, + BOOLEAN CreateNewHandlesTable, + PHANDLE pInputHandle, + PHANDLE pOutputHandle, + PHANDLE pErrorHandle); VOID ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData); diff --git a/win32ss/user/winsrv/consrv/settings.c b/win32ss/user/winsrv/consrv/settings.c index 7373f04401c..0e75955ab58 100644 --- a/win32ss/user/winsrv/consrv/settings.c +++ b/win32ss/user/winsrv/consrv/settings.c @@ -404,7 +404,7 @@ ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo, ConsoleInfo->QuickEdit = FALSE; ConsoleInfo->InsertMode = TRUE; - // ConsoleInfo->InputBufferSize; + // ConsoleInfo->InputBufferSize = 0; // Rule: ScreenBufferSize >= ConsoleSize ConsoleInfo->ScreenBufferSize.X = 80;