Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source, under the MIT license.
This commit is contained in:
commit
d4d59fa339
|
@ -0,0 +1,63 @@
|
|||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* -text
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
|
@ -0,0 +1,245 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
objfre/
|
||||
objchk/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
|
||||
# Visual Studio Code cache/options directory
|
||||
.vscode/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
## TODO: Comment the next line if you want to checkin your
|
||||
## web deploy settings but do note that will include unencrypted
|
||||
## passwords
|
||||
#*.pubxml
|
||||
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# LightSwitch generated files
|
||||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
*.opendb
|
||||
*.db
|
||||
|
||||
# Windows Build System files
|
||||
build*.dbb
|
||||
build*.err
|
||||
build*.evt
|
||||
build*.log
|
||||
build*.prf
|
||||
build*.trc
|
||||
build*.rec
|
||||
build*.wrn
|
||||
build*.metadata
|
||||
|
||||
# .razzlerc.cmd file - used by dev environment
|
||||
tools/.razzlerc.*
|
||||
# message compiler output
|
||||
MSG*.bin
|
||||
/*.exe
|
||||
|
||||
# python
|
||||
*.pyc
|
||||
|
||||
**Generated Files/
|
||||
**/Merged/*
|
||||
**/Unmerged/*
|
||||
profiles.json
|
||||
*.metaproj
|
|
@ -0,0 +1,6 @@
|
|||
[submodule "dep/gsl"]
|
||||
path = dep/gsl
|
||||
url = https://github.com/Microsoft/gsl
|
||||
[submodule "dep/wil"]
|
||||
path = dep/wil
|
||||
url = https://github.com/Microsoft/wil
|
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
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.
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<!-- Add repositories here to the list of available repositories -->
|
||||
|
||||
<!-- Dependencies that we must carry because they're not on public nuget feeds right now. -->
|
||||
<add key="Static Package Dependencies" value="dep\packages" />
|
||||
|
||||
<!-- Internal NuGet feeds that may not be accessible outside Microsoft corporate network -->
|
||||
<!--<add key="TAEF - internal" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Taef/nuget/v3/index.json" />
|
||||
<add key="OpenConsole - Internal" value="https://microsoft.pkgs.visualstudio.com/_packaging/OpenConsole/nuget/v3/index.json" />-->
|
||||
</packageSources>
|
||||
</configuration>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,45 @@
|
|||
# Welcome to the Console Project!
|
||||
|
||||
This project is currently controlled by the Windows Developer Platform Tools & Runtimes' Open Source Software team (*WDG > DEP > DART > OSS*).
|
||||
|
||||
Our team can be reached at `dartcon@microsoft.com`.
|
||||
|
||||
The code is stored at <https://microsoft.visualstudio.com/Dart/_git/OpenConsole>.
|
||||
|
||||
The area path within the Microsoft.VisualStudio.com database for our Work Items is `OS\CORE-OS Core\DEP-Developer Ecosystem Platform\DART-Developer Tools and Runtimes\Open Source Software\Console`.
|
||||
|
||||
## Jumping In
|
||||
|
||||
To get started, feel free to read up on some of our documentation on the way we get things done and hop in.
|
||||
|
||||
Make a branch off of `dev/main` for yourself of the pattern `dev/myalias/foo` and feel free to push it to the server to get automatic builds and unit test runs.
|
||||
|
||||
Choose a bit of code to clean up, try to add a new feature, or improve something that you try to use every day.
|
||||
|
||||
When you are ready, use the [web portal](https://microsoft.visualstudio.com/Dart/_git/OpenConsole/pullrequests) to send a pull request into our `dev/main` branch and we'll be happy to help you get your code in line with the rest of the console.
|
||||
|
||||
## Building
|
||||
|
||||
OpenConsole uses submodules for some of its dependencies. To make sure submodules are restored or updated:
|
||||
|
||||
```
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
OpenConsole.sln may be built from within Visual Studio or from the command line using msbuild. To build from the command line:
|
||||
|
||||
```
|
||||
nuget.exe restore OpenConsole.sln
|
||||
msbuild.exe OpenConsole.sln
|
||||
```
|
||||
|
||||
We provide a set of convienence scripts in the /tools directory to help automate the process of building and running tests.
|
||||
|
||||
## Assorted Notes
|
||||
|
||||
Here's some assorted notes on the way we do things. If you learn something about how we do things, feel free to contribute to any of our documentation files anywhere in the repository (or make some new ones!) This is a work in progress as we try to learn what we'll need to train people on in order to be effective contributors to our project. We're pretty blind to these things after staring at this code for so long... so mind the gaps and ask us plenty of questions!
|
||||
|
||||
* [Coding Style](./doc/STYLE.md)
|
||||
* [Code Organization](./doc/ORGANIZATION.md)
|
||||
* [Exceptions in our legacy codebase](./doc/EXCEPTIONS.md)
|
||||
* [Helpful smart pointers and macros for interfacing with Windows in WIL](./doc/WIL.md)
|
|
@ -0,0 +1,5 @@
|
|||
<SignConfigXML>
|
||||
<job platform="" configuration="" certSubject="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" jobname="EngFunSimpleSign" approvers="">
|
||||
<file src="__INPATHROOT__\Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle" signType="136020001" dest="__OUTPATHROOT__\Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle" />
|
||||
</job>
|
||||
</SignConfigXML>
|
|
@ -0,0 +1,57 @@
|
|||
Param(
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Base name for input .appx files")]
|
||||
[string]
|
||||
$ProjectName,
|
||||
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Appx Bundle Version")]
|
||||
[version]
|
||||
$BundleVersion,
|
||||
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Path under which to locate appx/msix files")]
|
||||
[string]
|
||||
$InputPath,
|
||||
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Output Path")]
|
||||
[string]
|
||||
$OutputPath,
|
||||
|
||||
[Parameter(HelpMessage="Path to makeappx.exe")]
|
||||
[ValidateScript({Test-Path $_ -Type Leaf})]
|
||||
[string]
|
||||
$MakeAppxPath = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\MakeAppx.exe"
|
||||
)
|
||||
|
||||
If ($null -Eq (Get-Item $MakeAppxPath -EA:SilentlyContinue)) {
|
||||
Write-Error "Could not find MakeAppx.exe at `"$MakeAppxPath`".`nMake sure that -MakeAppxPath points to a valid SDK."
|
||||
Exit 1
|
||||
}
|
||||
|
||||
# Enumerates a set of appx files beginning with a project name
|
||||
# and generates a temporary file containing a bundle content map.
|
||||
Function Create-AppxBundleMapping {
|
||||
Param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]
|
||||
$InputPath,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[string]
|
||||
$ProjectName
|
||||
)
|
||||
|
||||
$lines = @("[Files]")
|
||||
Get-ChildItem -Path:$InputPath -Recurse -Filter:*$ProjectName* -Include *.appx, *.msix | % {
|
||||
$lines += ("`"{0}`" `"{1}`"" -f ($_.FullName, $_.Name))
|
||||
}
|
||||
$outputFile = New-TemporaryFile
|
||||
$lines | Out-File -Encoding:ASCII $outputFile
|
||||
$outputFile
|
||||
}
|
||||
|
||||
$NewMapping = Create-AppxBundleMapping -InputPath:$InputPath -ProjectName:$ProjectName
|
||||
|
||||
& $MakeAppxPath bundle /v /bv $BundleVersion.ToString() /f $NewMapping.FullName /p $OutputPath
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!--
|
||||
This props file is a workaround for the fact that for wapproj projects,
|
||||
the $(SolutionDir) is never evaluated correctly. So, instead we're using this
|
||||
file to define $(OpenConsoleDir), which should be used in place of $(SolutionDir)
|
||||
-->
|
||||
<PropertyGroup Condition="'$(OpenConsoleDir)'==''">
|
||||
<OpenConsoleDir>$(MSBuildThisFileDirectory)</OpenConsoleDir>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"PrefixFilters": [
|
||||
"."
|
||||
],
|
||||
"ContainsFilters": [
|
||||
"/.",
|
||||
"/.git/",
|
||||
"/obj/",
|
||||
"/bin/",
|
||||
"/TestResults/",
|
||||
"/packages/",
|
||||
"/ipch/",
|
||||
"/dep/",
|
||||
"/.vs/"
|
||||
],
|
||||
"SuffixFilters": [
|
||||
".dbb",
|
||||
".evt",
|
||||
".log",
|
||||
".metadata",
|
||||
".prf",
|
||||
".trc",
|
||||
".user",
|
||||
".tmp",
|
||||
".TMP",
|
||||
".db",
|
||||
".wrn",
|
||||
".rec",
|
||||
".err"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*++
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
- conapi.h
|
||||
|
||||
Abstract:
|
||||
- This module contains the internal structures and definitions used by the console server.
|
||||
|
||||
Author:
|
||||
- Therese Stowell (ThereseS) 12-Nov-1990
|
||||
|
||||
Revision History:
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
// these should be in precomp but aren't being picked up...
|
||||
#include <unordered_map>
|
||||
#define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L)
|
||||
|
||||
#include "conmsgl1.h"
|
||||
#include "conmsgl2.h"
|
||||
#include "conmsgl3.h"
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
condrv.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This module contains the declarations shared by the console driver and the
|
||||
user-mode components that use it.
|
||||
|
||||
Author:
|
||||
|
||||
Wedson Almeida Filho (wedsonaf) 24-Sep-2009
|
||||
|
||||
Environment:
|
||||
|
||||
Kernel and user modes.
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "..\NT\ntioapi_x.h"
|
||||
|
||||
//
|
||||
// Messages that can be received by servers, used in CD_IO_DESCRIPTOR::Function.
|
||||
//
|
||||
|
||||
#define CONSOLE_IO_CONNECT 0x01
|
||||
#define CONSOLE_IO_DISCONNECT 0x02
|
||||
#define CONSOLE_IO_CREATE_OBJECT 0x03
|
||||
#define CONSOLE_IO_CLOSE_OBJECT 0x04
|
||||
#define CONSOLE_IO_RAW_WRITE 0x05
|
||||
#define CONSOLE_IO_RAW_READ 0x06
|
||||
#define CONSOLE_IO_USER_DEFINED 0x07
|
||||
#define CONSOLE_IO_RAW_FLUSH 0x08
|
||||
|
||||
//
|
||||
// Header of all IOs submitted to a server.
|
||||
//
|
||||
|
||||
typedef struct _CD_IO_DESCRIPTOR {
|
||||
LUID Identifier;
|
||||
ULONG_PTR Process;
|
||||
ULONG_PTR Object;
|
||||
ULONG Function;
|
||||
ULONG InputSize;
|
||||
ULONG OutputSize;
|
||||
ULONG Reserved;
|
||||
} CD_IO_DESCRIPTOR, *PCD_IO_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Types of objects, used in CREATE_OBJECT_INFORMATION::ObjectType.
|
||||
//
|
||||
|
||||
#define CD_IO_OBJECT_TYPE_CURRENT_INPUT 0x01
|
||||
#define CD_IO_OBJECT_TYPE_CURRENT_OUTPUT 0x02
|
||||
#define CD_IO_OBJECT_TYPE_NEW_OUTPUT 0x03
|
||||
#define CD_IO_OBJECT_TYPE_GENERIC 0x04
|
||||
|
||||
//
|
||||
// Payload of the CONSOLE_IO_CREATE_OBJECT io.
|
||||
//
|
||||
|
||||
typedef struct _CD_CREATE_OBJECT_INFORMATION {
|
||||
ULONG ObjectType;
|
||||
ULONG ShareMode;
|
||||
ACCESS_MASK DesiredAccess;
|
||||
} CD_CREATE_OBJECT_INFORMATION, *PCD_CREATE_OBJECT_INFORMATION;
|
||||
|
||||
//
|
||||
// Create EA buffers.
|
||||
//
|
||||
|
||||
#define CD_BROKER_EA_NAME "broker"
|
||||
#define CD_SERVER_EA_NAME "server"
|
||||
#define CD_ATTACH_EA_NAME "attach"
|
||||
|
||||
typedef struct _CD_CREATE_SERVER {
|
||||
HANDLE BrokerHandle;
|
||||
LUID BrokerRequest;
|
||||
} CD_CREATE_SERVER, *PCD_CREATE_SERVER;
|
||||
|
||||
typedef struct _CD_ATTACH_INFORMATION {
|
||||
HANDLE ProcessId;
|
||||
} CD_ATTACH_INFORMATION, *PCD_ATTACH_INFORMATION;
|
||||
|
||||
typedef struct _CD_ATTACH_INFORMATION64 {
|
||||
PVOID64 ProcessId;
|
||||
} CD_ATTACH_INFORMATION64, *PCD_ATTACH_INFORMATION64;
|
||||
|
||||
//
|
||||
// Information passed to the driver by a server when a connection is accepted.
|
||||
//
|
||||
|
||||
typedef struct _CD_CONNECTION_INFORMATION {
|
||||
ULONG_PTR Process;
|
||||
ULONG_PTR Input;
|
||||
ULONG_PTR Output;
|
||||
} CD_CONNECTION_INFORMATION, *PCD_CONNECTION_INFORMATION;
|
||||
|
||||
//
|
||||
// Ioctls.
|
||||
//
|
||||
|
||||
typedef struct _CD_IO_BUFFER {
|
||||
ULONG Size;
|
||||
PVOID Buffer;
|
||||
} CD_IO_BUFFER, *PCD_IO_BUFFER;
|
||||
|
||||
typedef struct _CD_IO_BUFFER64 {
|
||||
ULONG Size;
|
||||
PVOID64 Buffer;
|
||||
} CD_IO_BUFFER64, *PCD_IO_BUFFER64;
|
||||
|
||||
typedef struct _CD_USER_DEFINED_IO {
|
||||
HANDLE Client;
|
||||
ULONG InputCount;
|
||||
ULONG OutputCount;
|
||||
CD_IO_BUFFER Buffers[ANYSIZE_ARRAY];
|
||||
} CD_USER_DEFINED_IO, *PCD_USER_DEFINED_IO;
|
||||
|
||||
typedef struct _CD_USER_DEFINED_IO64 {
|
||||
PVOID64 Client;
|
||||
ULONG InputCount;
|
||||
ULONG OutputCount;
|
||||
CD_IO_BUFFER64 Buffers[ANYSIZE_ARRAY];
|
||||
} CD_USER_DEFINED_IO64, *PCD_USER_DEFINED_IO64;
|
||||
|
||||
typedef struct _CD_IO_BUFFER_DESCRIPTOR {
|
||||
PVOID Data;
|
||||
ULONG Size;
|
||||
ULONG Offset;
|
||||
} CD_IO_BUFFER_DESCRIPTOR, *PCD_IO_BUFFER_DESCRIPTOR;
|
||||
|
||||
typedef struct _CD_IO_COMPLETE {
|
||||
LUID Identifier;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
CD_IO_BUFFER_DESCRIPTOR Write;
|
||||
} CD_IO_COMPLETE, *PCD_IO_COMPLETE;
|
||||
|
||||
typedef struct _CD_IO_OPERATION {
|
||||
LUID Identifier;
|
||||
CD_IO_BUFFER_DESCRIPTOR Buffer;
|
||||
} CD_IO_OPERATION, *PCD_IO_OPERATION;
|
||||
|
||||
typedef struct _CD_IO_SERVER_INFORMATION {
|
||||
HANDLE InputAvailableEvent;
|
||||
} CD_IO_SERVER_INFORMATION, *PCD_IO_SERVER_INFORMATION;
|
||||
|
||||
typedef struct _CD_IO_DISPLAY_SIZE {
|
||||
ULONG Width;
|
||||
ULONG Height;
|
||||
} CD_IO_DISPLAY_SIZE, *PCD_IO_DISPLAY_SIZE;
|
||||
|
||||
typedef struct _CD_IO_CHARACTER {
|
||||
WCHAR Character;
|
||||
USHORT Atribute;
|
||||
} CD_IO_CHARACTER, *PCD_IO_CHARACTER;
|
||||
|
||||
typedef struct _CD_IO_ROW_INFORMATION {
|
||||
SHORT Index;
|
||||
PCD_IO_CHARACTER Old;
|
||||
PCD_IO_CHARACTER New;
|
||||
} CD_IO_ROW_INFORMATION, *PCD_IO_ROW_INFORMATION;
|
||||
|
||||
typedef struct _CD_IO_CURSOR_INFORMATION {
|
||||
USHORT Column;
|
||||
USHORT Row;
|
||||
ULONG Height;
|
||||
BOOLEAN IsVisible;
|
||||
} CD_IO_CURSOR_INFORMATION, *PCD_IO_CURSOR_INFORMATION;
|
||||
|
||||
#define IOCTL_CONDRV_READ_IO \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 1, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_COMPLETE_IO \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 2, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_READ_INPUT \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 3, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_WRITE_OUTPUT \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 4, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_ISSUE_USER_IO \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 5, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_DISCONNECT_PIPE \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 6, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_SET_SERVER_INFORMATION \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 7, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_GET_SERVER_PID \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 8, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_GET_DISPLAY_SIZE \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 9, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_UPDATE_DISPLAY \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 10, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_SET_CURSOR \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 11, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_ALLOW_VIA_UIACCESS \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 12, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CONDRV_LAUNCH_SERVER \
|
||||
CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_NEITHER, FILE_ANY_ACCESS)
|
|
@ -0,0 +1,156 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
conmsgl1.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This include file defines the layer 1 message formats used to communicate
|
||||
between the client and server portions of the CONSOLE portion of the
|
||||
Windows subsystem.
|
||||
|
||||
Author:
|
||||
|
||||
Therese Stowell (thereses) 10-Nov-1990
|
||||
|
||||
Revision History:
|
||||
|
||||
Wedson Almeida Filho (wedsonaf) 23-May-2010
|
||||
Modified the messages for use with the console driver.
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CONSOLE_FIRST_API_NUMBER(Layer) \
|
||||
(Layer << 24) \
|
||||
|
||||
typedef struct _CONSOLE_SERVER_MSG {
|
||||
ULONG IconId;
|
||||
ULONG HotKey;
|
||||
ULONG StartupFlags;
|
||||
USHORT FillAttribute;
|
||||
USHORT ShowWindow;
|
||||
COORD ScreenBufferSize;
|
||||
COORD WindowSize;
|
||||
COORD WindowOrigin;
|
||||
ULONG ProcessGroupId;
|
||||
BOOLEAN ConsoleApp;
|
||||
BOOLEAN WindowVisible;
|
||||
USHORT TitleLength;
|
||||
WCHAR Title[MAX_PATH + 1];
|
||||
USHORT ApplicationNameLength;
|
||||
WCHAR ApplicationName[128];
|
||||
USHORT CurrentDirectoryLength;
|
||||
WCHAR CurrentDirectory[MAX_PATH + 1];
|
||||
} CONSOLE_SERVER_MSG, *PCONSOLE_SERVER_MSG;
|
||||
|
||||
typedef struct _CONSOLE_BROKER_DATA {
|
||||
WCHAR DesktopName[MAX_PATH];
|
||||
} CONSOLE_BROKER_MSG, *PCONSOLE_BROKER_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCP_MSG {
|
||||
OUT ULONG CodePage;
|
||||
IN BOOLEAN Output;
|
||||
} CONSOLE_GETCP_MSG, *PCONSOLE_GETCP_MSG;
|
||||
|
||||
typedef struct _CONSOLE_MODE_MSG {
|
||||
IN OUT ULONG Mode;
|
||||
} CONSOLE_MODE_MSG, *PCONSOLE_MODE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETNUMBEROFINPUTEVENTS_MSG {
|
||||
OUT ULONG ReadyEvents;
|
||||
} CONSOLE_GETNUMBEROFINPUTEVENTS_MSG, *PCONSOLE_GETNUMBEROFINPUTEVENTS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCONSOLEINPUT_MSG {
|
||||
OUT ULONG NumRecords;
|
||||
IN USHORT Flags;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETCONSOLEINPUT_MSG, *PCONSOLE_GETCONSOLEINPUT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_READCONSOLE_MSG {
|
||||
IN BOOLEAN Unicode;
|
||||
IN BOOLEAN ProcessControlZ;
|
||||
IN USHORT ExeNameLength;
|
||||
IN ULONG InitialNumBytes;
|
||||
IN ULONG CtrlWakeupMask;
|
||||
OUT ULONG ControlKeyState;
|
||||
OUT ULONG NumBytes;
|
||||
} CONSOLE_READCONSOLE_MSG, *PCONSOLE_READCONSOLE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_WRITECONSOLE_MSG {
|
||||
OUT ULONG NumBytes;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_WRITECONSOLE_MSG, *PCONSOLE_WRITECONSOLE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_LANGID_MSG {
|
||||
OUT LANGID LangId;
|
||||
} CONSOLE_LANGID_MSG, *PCONSOLE_LANGID_MSG;
|
||||
|
||||
typedef struct _CONSOLE_MAPBITMAP_MSG {
|
||||
OUT HANDLE Mutex;
|
||||
OUT PVOID Bitmap;
|
||||
} CONSOLE_MAPBITMAP_MSG, *PCONSOLE_MAPBITMAP_MSG;
|
||||
|
||||
typedef struct _CONSOLE_MAPBITMAP_MSG64 {
|
||||
OUT PVOID64 Mutex;
|
||||
OUT PVOID64 Bitmap;
|
||||
} CONSOLE_MAPBITMAP_MSG64, *PCONSOLE_MAPBITMAP_MSG64;
|
||||
|
||||
typedef enum _CONSOLE_API_NUMBER_L1 {
|
||||
ConsolepGetCP = CONSOLE_FIRST_API_NUMBER(1),
|
||||
ConsolepGetMode,
|
||||
ConsolepSetMode,
|
||||
ConsolepGetNumberOfInputEvents,
|
||||
ConsolepGetConsoleInput,
|
||||
ConsolepReadConsole,
|
||||
ConsolepWriteConsole,
|
||||
ConsolepNotifyLastClose,
|
||||
ConsolepGetLangId,
|
||||
ConsolepMapBitmap,
|
||||
} CONSOLE_API_NUMBER_L1, *PCONSOLE_API_NUMBER_L1;
|
||||
|
||||
typedef struct _CONSOLE_MSG_HEADER {
|
||||
ULONG ApiNumber;
|
||||
ULONG ApiDescriptorSize;
|
||||
} CONSOLE_MSG_HEADER, *PCONSOLE_MSG_HEADER;
|
||||
|
||||
typedef union _CONSOLE_MSG_BODY_L1 {
|
||||
CONSOLE_GETCP_MSG GetConsoleCP;
|
||||
CONSOLE_MODE_MSG GetConsoleMode;
|
||||
CONSOLE_MODE_MSG SetConsoleMode;
|
||||
CONSOLE_GETNUMBEROFINPUTEVENTS_MSG GetNumberOfConsoleInputEvents;
|
||||
CONSOLE_GETCONSOLEINPUT_MSG GetConsoleInput;
|
||||
CONSOLE_READCONSOLE_MSG ReadConsole;
|
||||
CONSOLE_WRITECONSOLE_MSG WriteConsole;
|
||||
CONSOLE_LANGID_MSG GetConsoleLangId;
|
||||
|
||||
#if defined(BUILD_WOW6432) && !defined(BUILD_WOW3232)
|
||||
|
||||
CONSOLE_MAPBITMAP_MSG64 MapBitmap;
|
||||
|
||||
#else
|
||||
|
||||
CONSOLE_MAPBITMAP_MSG MapBitmap;
|
||||
|
||||
#endif
|
||||
|
||||
} CONSOLE_MSG_BODY_L1, *PCONSOLE_MSG_BODY_L1;
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct _CONSOLE_MSG_L1 {
|
||||
CONSOLE_MSG_HEADER Header;
|
||||
union {
|
||||
CONSOLE_MSG_BODY_L1;
|
||||
} u;
|
||||
} CONSOLE_MSG_L1, *PCONSOLE_MSG_L1;
|
||||
#else
|
||||
typedef struct _CONSOLE_MSG_L1 :
|
||||
public CONSOLE_MSG_HEADER
|
||||
{
|
||||
CONSOLE_MSG_BODY_L1 u;
|
||||
} CONSOLE_MSG_L1, *PCONSOLE_MSG_L1;
|
||||
#endif // __cplusplus
|
|
@ -0,0 +1,207 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
|
||||
conmsgl2.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This include file defines the layer 2 message formats used to communicate
|
||||
between the client and server portions of the CONSOLE portion of the
|
||||
Windows subsystem.
|
||||
|
||||
Author:
|
||||
|
||||
Therese Stowell (thereses) 10-Nov-1990
|
||||
|
||||
Revision History:
|
||||
|
||||
Wedson Almeida Filho (wedsonaf) 23-May-2010
|
||||
Modified the messages for use with the console driver.
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct _CONSOLE_CREATESCREENBUFFER_MSG {
|
||||
IN ULONG Flags;
|
||||
IN ULONG BitmapInfoLength;
|
||||
IN ULONG Usage;
|
||||
} CONSOLE_CREATESCREENBUFFER_MSG, *PCONSOLE_CREATESCREENBUFFER_MSG;
|
||||
|
||||
#define CONSOLE_ASCII 0x1
|
||||
#define CONSOLE_REAL_UNICODE 0x2
|
||||
#define CONSOLE_ATTRIBUTE 0x3
|
||||
#define CONSOLE_FALSE_UNICODE 0x4
|
||||
|
||||
typedef struct _CONSOLE_FILLCONSOLEOUTPUT_MSG {
|
||||
IN COORD WriteCoord;
|
||||
IN ULONG ElementType;
|
||||
IN USHORT Element;
|
||||
IN OUT ULONG Length;
|
||||
} CONSOLE_FILLCONSOLEOUTPUT_MSG, *PCONSOLE_FILLCONSOLEOUTPUT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_CTRLEVENT_MSG {
|
||||
IN ULONG CtrlEvent;
|
||||
IN ULONG ProcessGroupId;
|
||||
} CONSOLE_CTRLEVENT_MSG, *PCONSOLE_CTRLEVENT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETCP_MSG {
|
||||
IN ULONG CodePage;
|
||||
IN BOOLEAN Output;
|
||||
} CONSOLE_SETCP_MSG, *PCONSOLE_SETCP_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCURSORINFO_MSG {
|
||||
OUT ULONG CursorSize;
|
||||
OUT BOOLEAN Visible;
|
||||
} CONSOLE_GETCURSORINFO_MSG, *PCONSOLE_GETCURSORINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETCURSORINFO_MSG {
|
||||
IN ULONG CursorSize;
|
||||
IN BOOLEAN Visible;
|
||||
} CONSOLE_SETCURSORINFO_MSG, *PCONSOLE_SETCURSORINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SCREENBUFFERINFO_MSG {
|
||||
IN OUT COORD Size;
|
||||
IN OUT COORD CursorPosition;
|
||||
IN OUT COORD ScrollPosition;
|
||||
IN OUT USHORT Attributes;
|
||||
IN OUT COORD CurrentWindowSize;
|
||||
IN OUT COORD MaximumWindowSize;
|
||||
IN OUT USHORT PopupAttributes;
|
||||
IN OUT BOOLEAN FullscreenSupported;
|
||||
IN OUT COLORREF ColorTable[16];
|
||||
} CONSOLE_SCREENBUFFERINFO_MSG, *PCONSOLE_SCREENBUFFERINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETSCREENBUFFERSIZE_MSG {
|
||||
IN COORD Size;
|
||||
} CONSOLE_SETSCREENBUFFERSIZE_MSG, *PCONSOLE_SETSCREENBUFFERSIZE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETCURSORPOSITION_MSG {
|
||||
IN COORD CursorPosition;
|
||||
} CONSOLE_SETCURSORPOSITION_MSG, *PCONSOLE_SETCURSORPOSITION_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETLARGESTWINDOWSIZE_MSG {
|
||||
OUT COORD Size;
|
||||
} CONSOLE_GETLARGESTWINDOWSIZE_MSG, *PCONSOLE_GETLARGESTWINDOWSIZE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SCROLLSCREENBUFFER_MSG {
|
||||
IN SMALL_RECT ScrollRectangle;
|
||||
IN SMALL_RECT ClipRectangle;
|
||||
IN BOOLEAN Clip;
|
||||
IN BOOLEAN Unicode;
|
||||
IN COORD DestinationOrigin;
|
||||
IN CHAR_INFO Fill;
|
||||
} CONSOLE_SCROLLSCREENBUFFER_MSG, *PCONSOLE_SCROLLSCREENBUFFER_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETTEXTATTRIBUTE_MSG {
|
||||
IN USHORT Attributes;
|
||||
} CONSOLE_SETTEXTATTRIBUTE_MSG, *PCONSOLE_SETTEXTATTRIBUTE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETWINDOWINFO_MSG {
|
||||
IN BOOLEAN Absolute;
|
||||
IN SMALL_RECT Window;
|
||||
} CONSOLE_SETWINDOWINFO_MSG, *PCONSOLE_SETWINDOWINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_READCONSOLEOUTPUTSTRING_MSG {
|
||||
IN COORD ReadCoord;
|
||||
IN ULONG StringType;
|
||||
OUT ULONG NumRecords;
|
||||
} CONSOLE_READCONSOLEOUTPUTSTRING_MSG, *PCONSOLE_READCONSOLEOUTPUTSTRING_MSG;
|
||||
|
||||
typedef struct _CONSOLE_WRITECONSOLEINPUT_MSG {
|
||||
OUT ULONG NumRecords;
|
||||
IN BOOLEAN Unicode;
|
||||
IN BOOLEAN Append;
|
||||
} CONSOLE_WRITECONSOLEINPUT_MSG, *PCONSOLE_WRITECONSOLEINPUT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_WRITECONSOLEOUTPUTSTRING_MSG {
|
||||
IN COORD WriteCoord;
|
||||
IN ULONG StringType;
|
||||
OUT ULONG NumRecords;
|
||||
} CONSOLE_WRITECONSOLEOUTPUTSTRING_MSG, *PCONSOLE_WRITECONSOLEOUTPUTSTRING_MSG;
|
||||
|
||||
typedef struct _CONSOLE_WRITECONSOLEOUTPUT_MSG {
|
||||
IN OUT SMALL_RECT CharRegion;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_WRITECONSOLEOUTPUT_MSG, *PCONSOLE_WRITECONSOLEOUTPUT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_READCONSOLEOUTPUT_MSG {
|
||||
IN OUT SMALL_RECT CharRegion;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_READCONSOLEOUTPUT_MSG, *PCONSOLE_READCONSOLEOUTPUT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETTITLE_MSG {
|
||||
OUT ULONG TitleLength;
|
||||
IN BOOLEAN Unicode;
|
||||
IN BOOLEAN Original;
|
||||
} CONSOLE_GETTITLE_MSG, *PCONSOLE_GETTITLE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETTITLE_MSG {
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_SETTITLE_MSG, *PCONSOLE_SETTITLE_MSG;
|
||||
|
||||
typedef enum _CONSOLE_API_NUMBER_L2 {
|
||||
ConsolepFillConsoleOutput = CONSOLE_FIRST_API_NUMBER(2),
|
||||
ConsolepGenerateCtrlEvent,
|
||||
ConsolepSetActiveScreenBuffer,
|
||||
ConsolepFlushInputBuffer,
|
||||
ConsolepSetCP,
|
||||
ConsolepGetCursorInfo,
|
||||
ConsolepSetCursorInfo,
|
||||
ConsolepGetScreenBufferInfo,
|
||||
ConsolepSetScreenBufferInfo,
|
||||
ConsolepSetScreenBufferSize,
|
||||
ConsolepSetCursorPosition,
|
||||
ConsolepGetLargestWindowSize,
|
||||
ConsolepScrollScreenBuffer,
|
||||
ConsolepSetTextAttribute,
|
||||
ConsolepSetWindowInfo,
|
||||
ConsolepReadConsoleOutputString,
|
||||
ConsolepWriteConsoleInput,
|
||||
ConsolepWriteConsoleOutput,
|
||||
ConsolepWriteConsoleOutputString,
|
||||
ConsolepReadConsoleOutput,
|
||||
ConsolepGetTitle,
|
||||
ConsolepSetTitle,
|
||||
} CONSOLE_API_NUMBER_L2, *PCONSOLE_API_NUMBER_L2;
|
||||
|
||||
typedef union _CONSOLE_MSG_BODY_L2 {
|
||||
CONSOLE_CTRLEVENT_MSG GenerateConsoleCtrlEvent;
|
||||
CONSOLE_FILLCONSOLEOUTPUT_MSG FillConsoleOutput;
|
||||
CONSOLE_SETCP_MSG SetConsoleCP;
|
||||
CONSOLE_GETCURSORINFO_MSG GetConsoleCursorInfo;
|
||||
CONSOLE_SETCURSORINFO_MSG SetConsoleCursorInfo;
|
||||
CONSOLE_SCREENBUFFERINFO_MSG GetConsoleScreenBufferInfo;
|
||||
CONSOLE_SCREENBUFFERINFO_MSG SetConsoleScreenBufferInfo;
|
||||
CONSOLE_SETSCREENBUFFERSIZE_MSG SetConsoleScreenBufferSize;
|
||||
CONSOLE_SETCURSORPOSITION_MSG SetConsoleCursorPosition;
|
||||
CONSOLE_GETLARGESTWINDOWSIZE_MSG GetLargestConsoleWindowSize;
|
||||
CONSOLE_SCROLLSCREENBUFFER_MSG ScrollConsoleScreenBuffer;
|
||||
CONSOLE_SETTEXTATTRIBUTE_MSG SetConsoleTextAttribute;
|
||||
CONSOLE_SETWINDOWINFO_MSG SetConsoleWindowInfo;
|
||||
CONSOLE_READCONSOLEOUTPUTSTRING_MSG ReadConsoleOutputString;
|
||||
CONSOLE_WRITECONSOLEINPUT_MSG WriteConsoleInput;
|
||||
CONSOLE_WRITECONSOLEOUTPUTSTRING_MSG WriteConsoleOutputString;
|
||||
CONSOLE_WRITECONSOLEOUTPUT_MSG WriteConsoleOutput;
|
||||
CONSOLE_READCONSOLEOUTPUT_MSG ReadConsoleOutput;
|
||||
CONSOLE_SETTITLE_MSG SetConsoleTitle;
|
||||
CONSOLE_GETTITLE_MSG GetConsoleTitle;
|
||||
} CONSOLE_MSG_BODY_L2, *PCONSOLE_MSG_BODY_L2;
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct _CONSOLE_MSG_L2 {
|
||||
CONSOLE_MSG_HEADER Header;
|
||||
union {
|
||||
CONSOLE_MSG_BODY_L2;
|
||||
} u;
|
||||
} CONSOLE_MSG_L2, *PCONSOLE_MSG_L2;
|
||||
#else
|
||||
typedef struct _CONSOLE_MSG_L2 :
|
||||
public CONSOLE_MSG_HEADER
|
||||
{
|
||||
CONSOLE_MSG_BODY_L2 u;
|
||||
} CONSOLE_MSG_L2, *PCONSOLE_MSG_L2;
|
||||
#endif // __cplusplus
|
|
@ -0,0 +1,392 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 1985 - 1999, Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
conmsgl3.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This include file defines the message formats used to communicate
|
||||
between the client and server portions of the CONSOLE portion of the
|
||||
Windows subsystem.
|
||||
|
||||
Author:
|
||||
|
||||
Therese Stowell (thereses) 10-Nov-1990
|
||||
|
||||
Revision History:
|
||||
|
||||
Wedson Almeida Filho (wedsonaf) 23-May-2010
|
||||
Modified the messages for use with the console driver.
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <winconp.h> // need FONT_SELECT
|
||||
|
||||
typedef struct _CONSOLE_GETNUMBEROFFONTS_MSG {
|
||||
OUT ULONG NumberOfFonts;
|
||||
} CONSOLE_GETNUMBEROFFONTS_MSG, *PCONSOLE_GETNUMBEROFFONTS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETSELECTIONINFO_MSG {
|
||||
OUT CONSOLE_SELECTION_INFO SelectionInfo;
|
||||
} CONSOLE_GETSELECTIONINFO_MSG, *PCONSOLE_GETSELECTIONINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETMOUSEINFO_MSG {
|
||||
OUT ULONG NumButtons;
|
||||
} CONSOLE_GETMOUSEINFO_MSG, *PCONSOLE_GETMOUSEINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETFONTINFO_MSG {
|
||||
IN BOOLEAN MaximumWindow;
|
||||
OUT ULONG NumFonts; // this value is valid even for error cases
|
||||
} CONSOLE_GETFONTINFO_MSG, *PCONSOLE_GETFONTINFO_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETFONTSIZE_MSG {
|
||||
IN ULONG FontIndex;
|
||||
OUT COORD FontSize;
|
||||
} CONSOLE_GETFONTSIZE_MSG, *PCONSOLE_GETFONTSIZE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_CURRENTFONT_MSG {
|
||||
IN BOOLEAN MaximumWindow;
|
||||
IN OUT ULONG FontIndex;
|
||||
IN OUT COORD FontSize;
|
||||
IN OUT ULONG FontFamily;
|
||||
IN OUT ULONG FontWeight;
|
||||
IN OUT WCHAR FaceName[LF_FACESIZE];
|
||||
} CONSOLE_CURRENTFONT_MSG, *PCONSOLE_CURRENTFONT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETFONT_MSG {
|
||||
IN ULONG FontIndex;
|
||||
} CONSOLE_SETFONT_MSG, *PCONSOLE_SETFONT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETICON_MSG {
|
||||
IN HICON hIcon;
|
||||
} CONSOLE_SETICON_MSG, *PCONSOLE_SETICON_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETICON_MSG64 {
|
||||
IN PVOID64 hIcon;
|
||||
} CONSOLE_SETICON_MSG64, *PCONSOLE_SETICON_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_ADDALIAS_MSG {
|
||||
IN USHORT SourceLength;
|
||||
IN USHORT TargetLength;
|
||||
IN USHORT ExeLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_ADDALIAS_MSG, *PCONSOLE_ADDALIAS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETALIAS_MSG {
|
||||
IN USHORT SourceLength;
|
||||
OUT USHORT TargetLength;
|
||||
IN USHORT ExeLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETALIAS_MSG, *PCONSOLE_GETALIAS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETALIASESLENGTH_MSG {
|
||||
OUT ULONG AliasesLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETALIASESLENGTH_MSG, *PCONSOLE_GETALIASESLENGTH_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETALIASEXESLENGTH_MSG {
|
||||
OUT ULONG AliasExesLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETALIASEXESLENGTH_MSG, *PCONSOLE_GETALIASEXESLENGTH_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETALIASES_MSG {
|
||||
IN BOOLEAN Unicode;
|
||||
OUT ULONG AliasesBufferLength;
|
||||
} CONSOLE_GETALIASES_MSG, *PCONSOLE_GETALIASES_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETALIASEXES_MSG {
|
||||
OUT ULONG AliasExesBufferLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETALIASEXES_MSG, *PCONSOLE_GETALIASEXES_MSG;
|
||||
|
||||
typedef struct _CONSOLE_EXPUNGECOMMANDHISTORY_MSG {
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_EXPUNGECOMMANDHISTORY_MSG, *PCONSOLE_EXPUNGECOMMANDHISTORY_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETNUMBEROFCOMMANDS_MSG {
|
||||
IN ULONG NumCommands;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_SETNUMBEROFCOMMANDS_MSG, *PCONSOLE_SETNUMBEROFCOMMANDS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCOMMANDHISTORYLENGTH_MSG {
|
||||
OUT ULONG CommandHistoryLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETCOMMANDHISTORYLENGTH_MSG, *PCONSOLE_GETCOMMANDHISTORYLENGTH_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCOMMANDHISTORY_MSG {
|
||||
OUT ULONG CommandBufferLength;
|
||||
IN BOOLEAN Unicode;
|
||||
} CONSOLE_GETCOMMANDHISTORY_MSG, *PCONSOLE_GETCOMMANDHISTORY_MSG;
|
||||
|
||||
typedef struct _CONSOLE_INVALIDATERECT_MSG {
|
||||
IN SMALL_RECT Rect;
|
||||
} CONSOLE_INVALIDATERECT_MSG, *PCONSOLE_INVALIDATERECT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_VDM_MSG {
|
||||
IN ULONG iFunction;
|
||||
OUT BOOLEAN Bool;
|
||||
IN OUT POINT Point;
|
||||
OUT RECT Rect;
|
||||
} CONSOLE_VDM_MSG, *PCONSOLE_VDM_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETCURSOR_MSG {
|
||||
IN HCURSOR CursorHandle;
|
||||
} CONSOLE_SETCURSOR_MSG, *PCONSOLE_SETCURSOR_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETCURSOR_MSG64 {
|
||||
IN PVOID64 CursorHandle;
|
||||
} CONSOLE_SETCURSOR_MSG64, *PCONSOLE_SETCURSOR_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_SHOWCURSOR_MSG {
|
||||
IN BOOLEAN bShow;
|
||||
OUT ULONG DisplayCount;
|
||||
} CONSOLE_SHOWCURSOR_MSG, *PCONSOLE_SHOWCURSOR_MSG;
|
||||
|
||||
typedef struct _CONSOLE_MENUCONTROL_MSG {
|
||||
IN ULONG CommandIdLow;
|
||||
IN ULONG CommandIdHigh;
|
||||
OUT HMENU hMenu;
|
||||
} CONSOLE_MENUCONTROL_MSG, *PCONSOLE_MENUCONTROL_MSG;
|
||||
|
||||
typedef struct _CONSOLE_MENUCONTROL_MSG64 {
|
||||
IN ULONG CommandIdLow;
|
||||
IN ULONG CommandIdHigh;
|
||||
OUT PVOID64 hMenu;
|
||||
} CONSOLE_MENUCONTROL_MSG64, *PCONSOLE_MENUCONTROL_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_SETPALETTE_MSG {
|
||||
IN HPALETTE hPalette;
|
||||
IN ULONG dwUsage;
|
||||
} CONSOLE_SETPALETTE_MSG, *PCONSOLE_SETPALETTE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETPALETTE_MSG64 {
|
||||
IN PVOID64 hPalette;
|
||||
IN ULONG dwUsage;
|
||||
} CONSOLE_SETPALETTE_MSG64, *PCONSOLE_SETPALETTE_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_SETDISPLAYMODE_MSG {
|
||||
IN ULONG dwFlags;
|
||||
OUT COORD ScreenBufferDimensions;
|
||||
} CONSOLE_SETDISPLAYMODE_MSG, *PCONSOLE_SETDISPLAYMODE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_REGISTERVDM_MSG {
|
||||
IN ULONG RegisterFlags;
|
||||
IN HANDLE StartEvent;
|
||||
IN HANDLE EndEvent;
|
||||
IN HANDLE ErrorEvent;
|
||||
OUT ULONG StateLength;
|
||||
OUT PVOID StateBuffer;
|
||||
OUT PVOID VDMBuffer;
|
||||
} CONSOLE_REGISTERVDM_MSG, *PCONSOLE_REGISTERVDM_MSG;
|
||||
|
||||
typedef struct _CONSOLE_REGISTERVDM_MSG64 {
|
||||
IN ULONG RegisterFlags;
|
||||
IN PVOID64 StartEvent;
|
||||
IN PVOID64 EndEvent;
|
||||
IN PVOID64 ErrorEvent;
|
||||
OUT ULONG StateLength;
|
||||
OUT PVOID64 StateBuffer;
|
||||
OUT PVOID64 VDMBuffer;
|
||||
} CONSOLE_REGISTERVDM_MSG64, *PCONSOLE_REGISTERVDM_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_GETHARDWARESTATE_MSG {
|
||||
OUT COORD Resolution;
|
||||
OUT COORD FontSize;
|
||||
} CONSOLE_GETHARDWARESTATE_MSG, *PCONSOLE_GETHARDWARESTATE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETHARDWARESTATE_MSG {
|
||||
IN COORD Resolution;
|
||||
IN COORD FontSize;
|
||||
} CONSOLE_SETHARDWARESTATE_MSG, *PCONSOLE_SETHARDWARESTATE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETDISPLAYMODE_MSG {
|
||||
OUT ULONG ModeFlags;
|
||||
} CONSOLE_GETDISPLAYMODE_MSG, *PCONSOLE_GETDISPLAYMODE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETKEYBOARDLAYOUTNAME_MSG {
|
||||
union {
|
||||
WCHAR awchLayout[9];
|
||||
char achLayout[9];
|
||||
};
|
||||
BOOLEAN bAnsi;
|
||||
} CONSOLE_GETKEYBOARDLAYOUTNAME_MSG, *PCONSOLE_GETKEYBOARDLAYOUTNAME_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETKEYSHORTCUTS_MSG {
|
||||
IN BOOLEAN Set;
|
||||
IN BYTE ReserveKeys;
|
||||
} CONSOLE_SETKEYSHORTCUTS_MSG, *PCONSOLE_SETKEYSHORTCUTS_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETMENUCLOSE_MSG {
|
||||
IN BOOLEAN Enable;
|
||||
} CONSOLE_SETMENUCLOSE_MSG, *PCONSOLE_SETMENUCLOSE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_CHAR_TYPE_MSG {
|
||||
IN COORD coordCheck;
|
||||
OUT ULONG dwType;
|
||||
} CONSOLE_CHAR_TYPE_MSG, *PCONSOLE_CHAR_TYPE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_LOCAL_EUDC_MSG {
|
||||
IN USHORT CodePoint;
|
||||
IN COORD FontSize;
|
||||
} CONSOLE_LOCAL_EUDC_MSG, *PCONSOLE_LOCAL_EUDC_MSG;
|
||||
|
||||
typedef struct _CONSOLE_CURSOR_MODE_MSG {
|
||||
IN OUT BOOLEAN Blink;
|
||||
IN OUT BOOLEAN DBEnable;
|
||||
} CONSOLE_CURSOR_MODE_MSG, *PCONSOLE_CURSOR_MODE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_REGISTEROS2_MSG {
|
||||
IN BOOLEAN fOs2Register;
|
||||
} CONSOLE_REGISTEROS2_MSG, *PCONSOLE_REGISTEROS2_MSG;
|
||||
|
||||
typedef struct _CONSOLE_SETOS2OEMFORMAT_MSG {
|
||||
IN BOOLEAN fOs2OemFormat;
|
||||
} CONSOLE_SETOS2OEMFORMAT_MSG, *PCONSOLE_SETOS2OEMFORMAT_MSG;
|
||||
|
||||
typedef struct _CONSOLE_NLS_MODE_MSG {
|
||||
IN OUT BOOLEAN Ready;
|
||||
IN ULONG NlsMode;
|
||||
} CONSOLE_NLS_MODE_MSG, *PCONSOLE_NLS_MODE_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCONSOLEWINDOW_MSG {
|
||||
OUT HWND hwnd;
|
||||
} CONSOLE_GETCONSOLEWINDOW_MSG, *PCONSOLE_GETCONSOLEWINDOW_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETCONSOLEWINDOW_MSG64 {
|
||||
OUT PVOID64 hwnd;
|
||||
} CONSOLE_GETCONSOLEWINDOW_MSG64, *PCONSOLE_GETCONSOLEWINDOW_MSG64;
|
||||
|
||||
typedef struct _CONSOLE_GETPROCESSLIST_MSG {
|
||||
OUT ULONG dwProcessCount;
|
||||
} CONSOLE_GETCONSOLEPROCESSLIST_MSG, *PCONSOLE_GETCONSOLEPROCESSLIST_MSG;
|
||||
|
||||
typedef struct _CONSOLE_GETHISTORY_MSG {
|
||||
OUT ULONG HistoryBufferSize;
|
||||
OUT ULONG NumberOfHistoryBuffers;
|
||||
OUT ULONG dwFlags;
|
||||
} CONSOLE_HISTORY_MSG, *PCONSOLE_HISTORY_MSG;
|
||||
|
||||
typedef enum _CONSOLE_API_NUMBER_L3 {
|
||||
ConsolepGetNumberOfFonts = CONSOLE_FIRST_API_NUMBER(3),
|
||||
ConsolepGetMouseInfo,
|
||||
ConsolepGetFontInfo,
|
||||
ConsolepGetFontSize,
|
||||
ConsolepGetCurrentFont,
|
||||
ConsolepSetFont,
|
||||
ConsolepSetIcon,
|
||||
ConsolepInvalidateBitmapRect,
|
||||
ConsolepVDMOperation,
|
||||
ConsolepSetCursor,
|
||||
ConsolepShowCursor,
|
||||
ConsolepMenuControl,
|
||||
ConsolepSetPalette,
|
||||
ConsolepSetDisplayMode,
|
||||
ConsolepRegisterVDM,
|
||||
ConsolepGetHardwareState,
|
||||
ConsolepSetHardwareState,
|
||||
ConsolepGetDisplayMode,
|
||||
ConsolepAddAlias,
|
||||
ConsolepGetAlias,
|
||||
ConsolepGetAliasesLength,
|
||||
ConsolepGetAliasExesLength,
|
||||
ConsolepGetAliases,
|
||||
ConsolepGetAliasExes,
|
||||
ConsolepExpungeCommandHistory,
|
||||
ConsolepSetNumberOfCommands,
|
||||
ConsolepGetCommandHistoryLength,
|
||||
ConsolepGetCommandHistory,
|
||||
ConsolepSetKeyShortcuts,
|
||||
ConsolepSetMenuClose,
|
||||
ConsolepGetKeyboardLayoutName,
|
||||
ConsolepGetConsoleWindow,
|
||||
ConsolepCharType,
|
||||
ConsolepSetLocalEUDC,
|
||||
ConsolepSetCursorMode,
|
||||
ConsolepGetCursorMode,
|
||||
ConsolepRegisterOS2,
|
||||
ConsolepSetOS2OemFormat,
|
||||
ConsolepGetNlsMode,
|
||||
ConsolepSetNlsMode,
|
||||
ConsolepGetSelectionInfo,
|
||||
ConsolepGetConsoleProcessList,
|
||||
ConsolepGetHistory,
|
||||
ConsolepSetHistory,
|
||||
ConsolepSetCurrentFont,
|
||||
} CONSOLE_API_NUMBER_L3, *PCONSOLE_API_NUMBER_L3;
|
||||
|
||||
typedef union _CONSOLE_MSG_BODY_L3 {
|
||||
CONSOLE_GETNUMBEROFFONTS_MSG GetNumberOfConsoleFonts;
|
||||
CONSOLE_GETMOUSEINFO_MSG GetConsoleMouseInfo;
|
||||
CONSOLE_GETFONTINFO_MSG GetConsoleFontInfo;
|
||||
CONSOLE_GETFONTSIZE_MSG GetConsoleFontSize;
|
||||
CONSOLE_CURRENTFONT_MSG GetCurrentConsoleFont;
|
||||
CONSOLE_SETFONT_MSG SetConsoleFont;
|
||||
CONSOLE_INVALIDATERECT_MSG InvalidateConsoleBitmapRect;
|
||||
CONSOLE_VDM_MSG VDMConsoleOperation;
|
||||
CONSOLE_SHOWCURSOR_MSG ShowConsoleCursor;
|
||||
CONSOLE_SETDISPLAYMODE_MSG SetConsoleDisplayMode;
|
||||
#ifdef BUILD_WOW6432
|
||||
CONSOLE_REGISTERVDM_MSG64 RegisterConsoleVDM;
|
||||
CONSOLE_SETCURSOR_MSG64 SetConsoleCursor;
|
||||
CONSOLE_SETICON_MSG64 SetConsoleIcon;
|
||||
CONSOLE_MENUCONTROL_MSG64 ConsoleMenuControl;
|
||||
CONSOLE_SETPALETTE_MSG64 SetConsolePalette;
|
||||
CONSOLE_GETCONSOLEWINDOW_MSG64 GetConsoleWindow;
|
||||
#else
|
||||
CONSOLE_REGISTERVDM_MSG RegisterConsoleVDM;
|
||||
CONSOLE_SETCURSOR_MSG SetConsoleCursor;
|
||||
CONSOLE_SETICON_MSG SetConsoleIcon;
|
||||
CONSOLE_MENUCONTROL_MSG ConsoleMenuControl;
|
||||
CONSOLE_SETPALETTE_MSG SetConsolePalette;
|
||||
CONSOLE_GETCONSOLEWINDOW_MSG GetConsoleWindow;
|
||||
#endif
|
||||
CONSOLE_GETHARDWARESTATE_MSG GetConsoleHardwareState;
|
||||
CONSOLE_SETHARDWARESTATE_MSG SetConsoleHardwareState;
|
||||
CONSOLE_GETDISPLAYMODE_MSG GetConsoleDisplayMode;
|
||||
CONSOLE_ADDALIAS_MSG AddConsoleAliasW;
|
||||
CONSOLE_GETALIAS_MSG GetConsoleAliasW;
|
||||
CONSOLE_GETALIASESLENGTH_MSG GetConsoleAliasesLengthW;
|
||||
CONSOLE_GETALIASEXESLENGTH_MSG GetConsoleAliasExesLengthW;
|
||||
CONSOLE_GETALIASES_MSG GetConsoleAliasesW;
|
||||
CONSOLE_GETALIASEXES_MSG GetConsoleAliasExesW;
|
||||
CONSOLE_EXPUNGECOMMANDHISTORY_MSG ExpungeConsoleCommandHistoryW;
|
||||
CONSOLE_SETNUMBEROFCOMMANDS_MSG SetConsoleNumberOfCommandsW;
|
||||
CONSOLE_GETCOMMANDHISTORYLENGTH_MSG GetConsoleCommandHistoryLengthW;
|
||||
CONSOLE_GETCOMMANDHISTORY_MSG GetConsoleCommandHistoryW;
|
||||
CONSOLE_SETKEYSHORTCUTS_MSG SetConsoleKeyShortcuts;
|
||||
CONSOLE_SETMENUCLOSE_MSG SetConsoleMenuClose;
|
||||
CONSOLE_GETKEYBOARDLAYOUTNAME_MSG GetKeyboardLayoutName;
|
||||
CONSOLE_CHAR_TYPE_MSG GetConsoleCharType;
|
||||
CONSOLE_LOCAL_EUDC_MSG SetConsoleLocalEUDC;
|
||||
CONSOLE_CURSOR_MODE_MSG SetConsoleCursorMode;
|
||||
CONSOLE_CURSOR_MODE_MSG GetConsoleCursorMode;
|
||||
CONSOLE_REGISTEROS2_MSG RegisterConsoleOS2;
|
||||
CONSOLE_SETOS2OEMFORMAT_MSG SetConsoleOS2OemFormat;
|
||||
CONSOLE_NLS_MODE_MSG GetConsoleNlsMode;
|
||||
CONSOLE_NLS_MODE_MSG SetConsoleNlsMode;
|
||||
CONSOLE_GETSELECTIONINFO_MSG GetConsoleSelectionInfo;
|
||||
CONSOLE_GETCONSOLEPROCESSLIST_MSG GetConsoleProcessList;
|
||||
CONSOLE_CURRENTFONT_MSG SetCurrentConsoleFont;
|
||||
CONSOLE_HISTORY_MSG SetConsoleHistory;
|
||||
CONSOLE_HISTORY_MSG GetConsoleHistory;
|
||||
} CONSOLE_MSG_BODY_L3, *PCONSOLE_MSG_BODY_L3;
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef struct _CONSOLE_MSG_L3 {
|
||||
CONSOLE_MSG_HEADER Header;
|
||||
union {
|
||||
CONSOLE_MSG_BODY_L3;
|
||||
} u;
|
||||
} CONSOLE_MSG_L3, *PCONSOLE_MSG_L3;
|
||||
#else
|
||||
typedef struct _CONSOLE_MSG_L3 :
|
||||
public CONSOLE_MSG_HEADER
|
||||
{
|
||||
CONSOLE_MSG_BODY_L3 u;
|
||||
} CONSOLE_MSG_L3, *PCONSOLE_MSG_L3;
|
||||
#endif // __cplusplus
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
#ifndef _NTCON_
|
||||
#define _NTCON_
|
||||
|
||||
//
|
||||
// originally in winconp.h
|
||||
//
|
||||
#define CONSOLE_DETACHED_PROCESS ((HANDLE)-1)
|
||||
#define CONSOLE_NEW_CONSOLE ((HANDLE)-2)
|
||||
#define CONSOLE_CREATE_NO_WINDOW ((HANDLE)-3)
|
||||
|
||||
#define SYSTEM_ROOT_CONSOLE_EVENT 3
|
||||
|
||||
#define CONSOLE_READ_NOREMOVE 0x0001
|
||||
#define CONSOLE_READ_NOWAIT 0x0002
|
||||
|
||||
#define CONSOLE_READ_VALID (CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT)
|
||||
|
||||
#define CONSOLE_GRAPHICS_BUFFER 2
|
||||
|
||||
//
|
||||
// These are flags stored in PEB::ProcessParameters::ConsoleFlags.
|
||||
//
|
||||
#define CONSOLE_IGNORE_CTRL_C 0x1
|
||||
|
||||
|
||||
#endif //_NTCON_
|
|
@ -0,0 +1,669 @@
|
|||
|
||||
#ifndef _WINCONP_
|
||||
#define _WINCONP_
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4820) // padding added after data member
|
||||
#endif
|
||||
|
||||
#include <wincontypes.h>
|
||||
|
||||
//
|
||||
// History flags (internal)
|
||||
//
|
||||
|
||||
#define CHI_VALID_FLAGS (HISTORY_NO_DUP_FLAG)
|
||||
|
||||
//
|
||||
// Selection flags (internal)
|
||||
//
|
||||
|
||||
#define CONSOLE_SELECTION_INVERTED 0x0010 // selection is inverted (turned off)
|
||||
#define CONSOLE_SELECTION_VALID (CONSOLE_SELECTION_IN_PROGRESS | \
|
||||
CONSOLE_SELECTION_NOT_EMPTY | \
|
||||
CONSOLE_MOUSE_SELECTION | \
|
||||
CONSOLE_MOUSE_DOWN)
|
||||
|
||||
|
||||
WINBASEAPI
|
||||
BOOL
|
||||
WINAPI
|
||||
GetConsoleKeyboardLayoutNameA(
|
||||
_Out_writes_(KL_NAMELENGTH) LPSTR pszLayout);
|
||||
WINBASEAPI
|
||||
BOOL
|
||||
WINAPI
|
||||
GetConsoleKeyboardLayoutNameW(
|
||||
_Out_writes_(KL_NAMELENGTH) LPWSTR pszLayout);
|
||||
#ifdef UNICODE
|
||||
#define GetConsoleKeyboardLayoutName GetConsoleKeyboardLayoutNameW
|
||||
#else
|
||||
#define GetConsoleKeyboardLayoutName GetConsoleKeyboardLayoutNameA
|
||||
#endif // !UNICODE
|
||||
|
||||
//
|
||||
// Registry strings
|
||||
//
|
||||
|
||||
#define CONSOLE_REGISTRY_STRING L"Console"
|
||||
#define CONSOLE_REGISTRY_FONTSIZE L"FontSize"
|
||||
#define CONSOLE_REGISTRY_FONTFAMILY L"FontFamily"
|
||||
#define CONSOLE_REGISTRY_BUFFERSIZE L"ScreenBufferSize"
|
||||
#define CONSOLE_REGISTRY_CURSORSIZE L"CursorSize"
|
||||
#define CONSOLE_REGISTRY_WINDOWMAXIMIZED L"WindowMaximized"
|
||||
#define CONSOLE_REGISTRY_WINDOWSIZE L"WindowSize"
|
||||
#define CONSOLE_REGISTRY_WINDOWPOS L"WindowPosition"
|
||||
#define CONSOLE_REGISTRY_WINDOWALPHA L"WindowAlpha"
|
||||
#define CONSOLE_REGISTRY_FILLATTR L"ScreenColors"
|
||||
#define CONSOLE_REGISTRY_POPUPATTR L"PopupColors"
|
||||
#define CONSOLE_REGISTRY_FULLSCR L"FullScreen"
|
||||
#define CONSOLE_REGISTRY_QUICKEDIT L"QuickEdit"
|
||||
#define CONSOLE_REGISTRY_FACENAME L"FaceName"
|
||||
#define CONSOLE_REGISTRY_FONTWEIGHT L"FontWeight"
|
||||
#define CONSOLE_REGISTRY_INSERTMODE L"InsertMode"
|
||||
#define CONSOLE_REGISTRY_HISTORYSIZE L"HistoryBufferSize"
|
||||
#define CONSOLE_REGISTRY_HISTORYBUFS L"NumberOfHistoryBuffers"
|
||||
#define CONSOLE_REGISTRY_HISTORYNODUP L"HistoryNoDup"
|
||||
#define CONSOLE_REGISTRY_COLORTABLE L"ColorTable%02u"
|
||||
#define CONSOLE_REGISTRY_EXTENDEDEDITKEY L"ExtendedEditKey"
|
||||
#define CONSOLE_REGISTRY_EXTENDEDEDITKEY_CUSTOM L"ExtendedEditkeyCustom"
|
||||
#define CONSOLE_REGISTRY_WORD_DELIM L"WordDelimiters"
|
||||
#define CONSOLE_REGISTRY_TRIMZEROHEADINGS L"TrimLeadingZeros"
|
||||
#define CONSOLE_REGISTRY_LOAD_CONIME L"LoadConIme"
|
||||
#define CONSOLE_REGISTRY_ENABLE_COLOR_SELECTION L"EnableColorSelection"
|
||||
#define CONSOLE_REGISTRY_SCROLLSCALE L"ScrollScale"
|
||||
|
||||
// V2 console settings
|
||||
#define CONSOLE_REGISTRY_FORCEV2 L"ForceV2"
|
||||
#define CONSOLE_REGISTRY_LINESELECTION L"LineSelection"
|
||||
#define CONSOLE_REGISTRY_FILTERONPASTE L"FilterOnPaste"
|
||||
#define CONSOLE_REGISTRY_LINEWRAP L"LineWrap"
|
||||
#define CONSOLE_REGISTRY_CTRLKEYSHORTCUTS_DISABLED L"CtrlKeyShortcutsDisabled"
|
||||
#define CONSOLE_REGISTRY_ALLOW_ALTF4_CLOSE L"AllowAltF4Close"
|
||||
#define CONSOLE_REGISTRY_VIRTTERM_LEVEL L"VirtualTerminalLevel"
|
||||
|
||||
#define CONSOLE_REGISTRY_CURSORTYPE L"CursorType"
|
||||
#define CONSOLE_REGISTRY_CURSORCOLOR L"CursorColor"
|
||||
|
||||
#define CONSOLE_REGISTRY_INTERCEPTCOPYPASTE L"InterceptCopyPaste"
|
||||
|
||||
#define CONSOLE_REGISTRY_COPYCOLOR L"CopyColor"
|
||||
#define CONSOLE_REGISTRY_USEDX L"UseDx"
|
||||
|
||||
#define CONSOLE_REGISTRY_DEFAULTFOREGROUND L"DefaultForeground"
|
||||
#define CONSOLE_REGISTRY_DEFAULTBACKGROUND L"DefaultBackground"
|
||||
#define CONSOLE_REGISTRY_TERMINALSCROLLING L"TerminalScrolling"
|
||||
// end V2 console settings
|
||||
|
||||
/*
|
||||
* Starting code page
|
||||
*/
|
||||
#define CONSOLE_REGISTRY_CODEPAGE (L"CodePage")
|
||||
|
||||
//
|
||||
// registry strings on HKEY_LOCAL_MACHINE
|
||||
//
|
||||
#define MACHINE_REGISTRY_CONSOLE (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console")
|
||||
#define MACHINE_REGISTRY_CONSOLEIME (L"ConsoleIME")
|
||||
#define MACHINE_REGISTRY_ENABLE_CONIME_ON_SYSTEM_PROCESS (L"EnableConImeOnSystemProcess")
|
||||
|
||||
|
||||
#define MACHINE_REGISTRY_CONSOLE_TTFONT (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont")
|
||||
#define MACHINE_REGISTRY_CONSOLE_TTFONT_WIN32_PATH (L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont")
|
||||
|
||||
|
||||
#define MACHINE_REGISTRY_CONSOLE_NLS (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\Nls")
|
||||
|
||||
|
||||
#define MACHINE_REGISTRY_CONSOLE_FULLSCREEN (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\FullScreen")
|
||||
#define MACHINE_REGISTRY_INITIAL_PALETTE (L"InitialPalette")
|
||||
#define MACHINE_REGISTRY_COLOR_BUFFER (L"ColorBuffer")
|
||||
#define MACHINE_REGISTRY_COLOR_BUFFER_NO_TRANSLATE (L"ColorBufferNoTranslate")
|
||||
#define MACHINE_REGISTRY_MODE_FONT_PAIRS (L"ModeFontPairs")
|
||||
#define MACHINE_REGISTRY_FS_CODEPAGE (L"CodePage")
|
||||
|
||||
|
||||
#define MACHINE_REGISTRY_EUDC (L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\CodePage\\EUDCCodeRange")
|
||||
|
||||
|
||||
//
|
||||
// TrueType font list
|
||||
//
|
||||
|
||||
// doesn't available bold when add BOLD_MARK on first of face name.
|
||||
#define BOLD_MARK (L'*')
|
||||
|
||||
typedef struct _TT_FONT_LIST {
|
||||
SINGLE_LIST_ENTRY List;
|
||||
UINT CodePage;
|
||||
BOOL fDisableBold;
|
||||
TCHAR FaceName1[LF_FACESIZE];
|
||||
TCHAR FaceName2[LF_FACESIZE];
|
||||
} TTFONTLIST, *LPTTFONTLIST;
|
||||
|
||||
//
|
||||
// registry strings on HKEY_CURRENT_USER
|
||||
//
|
||||
#define PRELOAD_REGISTRY_STRING (L"Keyboard Layout\\Preload")
|
||||
|
||||
|
||||
//
|
||||
// Special key for previous word erase
|
||||
//
|
||||
#define EXTKEY_ERASE_PREV_WORD (0x7f)
|
||||
|
||||
#ifndef NOGDI
|
||||
|
||||
typedef struct _CONSOLE_GRAPHICS_BUFFER_INFO {
|
||||
DWORD dwBitMapInfoLength;
|
||||
LPBITMAPINFO lpBitMapInfo;
|
||||
DWORD dwUsage;
|
||||
HANDLE hMutex;
|
||||
PVOID lpBitMap;
|
||||
} CONSOLE_GRAPHICS_BUFFER_INFO, *PCONSOLE_GRAPHICS_BUFFER_INFO;
|
||||
|
||||
#endif
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
InvalidateConsoleDIBits(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ PSMALL_RECT lpRect);
|
||||
|
||||
VOID
|
||||
WINAPI
|
||||
SetLastConsoleEventActive(
|
||||
VOID);
|
||||
|
||||
#define VDM_HIDE_WINDOW 1
|
||||
#define VDM_IS_ICONIC 2
|
||||
#define VDM_CLIENT_RECT 3
|
||||
#define VDM_CLIENT_TO_SCREEN 4
|
||||
#define VDM_SCREEN_TO_CLIENT 5
|
||||
#define VDM_IS_HIDDEN 6
|
||||
#define VDM_FULLSCREEN_NOPAINT 7
|
||||
#define VDM_SET_VIDEO_MODE 8
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
VDMConsoleOperation(
|
||||
_In_ DWORD iFunction,
|
||||
_Inout_opt_ LPVOID lpData);
|
||||
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
SetConsoleIcon(
|
||||
_In_ HICON hIcon);
|
||||
|
||||
//
|
||||
// These console font APIs don't appear to be used anywhere. Maybe they
|
||||
// should be removed.
|
||||
//
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
SetConsoleFont(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ DWORD nFont);
|
||||
|
||||
DWORD
|
||||
WINAPI
|
||||
GetConsoleFontInfo(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ BOOL bMaximumWindow,
|
||||
_In_ DWORD nLength,
|
||||
_Out_ PCONSOLE_FONT_INFO lpConsoleFontInfo);
|
||||
|
||||
DWORD
|
||||
WINAPI
|
||||
GetNumberOfConsoleFonts(
|
||||
VOID);
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
SetConsoleCursor(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ HCURSOR hCursor);
|
||||
|
||||
int
|
||||
WINAPI
|
||||
ShowConsoleCursor(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ BOOL bShow);
|
||||
|
||||
HMENU
|
||||
APIENTRY
|
||||
ConsoleMenuControl(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ UINT dwCommandIdLow,
|
||||
_In_ UINT dwCommandIdHigh);
|
||||
|
||||
BOOL
|
||||
SetConsolePalette(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ HPALETTE hPalette,
|
||||
_In_ UINT dwUsage);
|
||||
|
||||
#define CONSOLE_UNREGISTER_VDM 0
|
||||
#define CONSOLE_REGISTER_VDM 1
|
||||
#define CONSOLE_REGISTER_WOW 2
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
RegisterConsoleVDM(
|
||||
_In_ DWORD dwRegisterFlags,
|
||||
_In_ HANDLE hStartHardwareEvent,
|
||||
_In_ HANDLE hEndHardwareEvent,
|
||||
_In_ HANDLE hErrorhardwareEvent,
|
||||
_Reserved_ DWORD Reserved,
|
||||
_Out_ LPDWORD lpStateLength,
|
||||
_Outptr_ PVOID *lpState,
|
||||
_In_opt_ COORD VDMBufferSize,
|
||||
_Outptr_ PVOID *lpVDMBuffer);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
GetConsoleHardwareState(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_Out_ PCOORD lpResolution,
|
||||
_Out_ PCOORD lpFontSize);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleHardwareState(
|
||||
_In_ HANDLE hConsoleOutput,
|
||||
_In_ COORD dwResolution,
|
||||
_In_ COORD dwFontSize);
|
||||
|
||||
#define CONSOLE_NOSHORTCUTKEY 0x00000000 /* no shortcut key */
|
||||
#define CONSOLE_ALTTAB 0x00000001 /* Alt + Tab */
|
||||
#define CONSOLE_ALTESC 0x00000002 /* Alt + Escape */
|
||||
#define CONSOLE_ALTSPACE 0x00000004 /* Alt + Space */
|
||||
#define CONSOLE_ALTENTER 0x00000008 /* Alt + Enter */
|
||||
#define CONSOLE_ALTPRTSC 0x00000010 /* Alt Print screen */
|
||||
#define CONSOLE_PRTSC 0x00000020 /* Print screen */
|
||||
#define CONSOLE_CTRLESC 0x00000040 /* Ctrl + Escape */
|
||||
|
||||
typedef struct _APPKEY {
|
||||
WORD Modifier;
|
||||
WORD ScanCode;
|
||||
} APPKEY, *LPAPPKEY;
|
||||
|
||||
#define CONSOLE_MODIFIER_SHIFT 0x0003 // Left shift key
|
||||
#define CONSOLE_MODIFIER_CONTROL 0x0004 // Either Control shift key
|
||||
#define CONSOLE_MODIFIER_ALT 0x0008 // Either Alt shift key
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleKeyShortcuts(
|
||||
_In_ BOOL bSet,
|
||||
_In_ BYTE bReserveKeys,
|
||||
_In_reads_(dwNumAppKeys) LPAPPKEY lpAppKeys,
|
||||
_In_ DWORD dwNumAppKeys);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleMenuClose(
|
||||
_In_ BOOL bEnable);
|
||||
|
||||
DWORD
|
||||
GetConsoleInputExeNameA(
|
||||
_In_ DWORD nBufferLength,
|
||||
_Out_writes_(nBufferLength) LPSTR lpBuffer);
|
||||
DWORD
|
||||
GetConsoleInputExeNameW(
|
||||
_In_ DWORD nBufferLength,
|
||||
_Out_writes_(nBufferLength) LPWSTR lpBuffer);
|
||||
#ifdef UNICODE
|
||||
#define GetConsoleInputExeName GetConsoleInputExeNameW
|
||||
#else
|
||||
#define GetConsoleInputExeName GetConsoleInputExeNameA
|
||||
#endif // !UNICODE
|
||||
|
||||
BOOL
|
||||
SetConsoleInputExeNameA(
|
||||
_In_ LPSTR lpExeName);
|
||||
BOOL
|
||||
SetConsoleInputExeNameW(
|
||||
_In_ LPWSTR lpExeName);
|
||||
#ifdef UNICODE
|
||||
#define SetConsoleInputExeName SetConsoleInputExeNameW
|
||||
#else
|
||||
#define SetConsoleInputExeName SetConsoleInputExeNameA
|
||||
#endif // !UNICODE
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
ReadConsoleInputExA(
|
||||
_In_ HANDLE hConsoleInput,
|
||||
_Out_writes_(nLength) PINPUT_RECORD lpBuffer,
|
||||
_In_ DWORD nLength,
|
||||
_Out_ LPDWORD lpNumberOfEventsRead,
|
||||
_In_ USHORT wFlags);
|
||||
BOOL
|
||||
WINAPI
|
||||
ReadConsoleInputExW(
|
||||
_In_ HANDLE hConsoleInput,
|
||||
_Out_writes_(nLength) PINPUT_RECORD lpBuffer,
|
||||
_In_ DWORD nLength,
|
||||
_Out_ LPDWORD lpNumberOfEventsRead,
|
||||
_In_ USHORT wFlags);
|
||||
#ifdef UNICODE
|
||||
#define ReadConsoleInputEx ReadConsoleInputExW
|
||||
#else
|
||||
#define ReadConsoleInputEx ReadConsoleInputExA
|
||||
#endif // !UNICODE
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
WriteConsoleInputVDMA(
|
||||
_In_ HANDLE hConsoleInput,
|
||||
_In_reads_(nLength) PINPUT_RECORD lpBuffer,
|
||||
_In_ DWORD nLength,
|
||||
_Out_ LPDWORD lpNumberOfEventsWritten);
|
||||
BOOL
|
||||
WINAPI
|
||||
WriteConsoleInputVDMW(
|
||||
_In_ HANDLE hConsoleInput,
|
||||
_In_reads_(nLength) PINPUT_RECORD lpBuffer,
|
||||
_In_ DWORD nLength,
|
||||
_Out_ LPDWORD lpNumberOfEventsWritten);
|
||||
#ifdef UNICODE
|
||||
#define WriteConsoleInputVDM WriteConsoleInputVDMW
|
||||
#else
|
||||
#define WriteConsoleInputVDM WriteConsoleInputVDMA
|
||||
#endif // !UNICODE
|
||||
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
GetConsoleNlsMode(
|
||||
_In_ HANDLE hConsole,
|
||||
_Out_ PDWORD lpdwNlsMode);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleNlsMode(
|
||||
_In_ HANDLE hConsole,
|
||||
_In_ DWORD fdwNlsMode);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
GetConsoleCharType(
|
||||
_In_ HANDLE hConsole,
|
||||
_In_ COORD coordCheck,
|
||||
_Out_ PDWORD pdwType);
|
||||
|
||||
#define CHAR_TYPE_SBCS 0 // Displayed SBCS character
|
||||
#define CHAR_TYPE_LEADING 2 // Displayed leading byte of DBCS
|
||||
#define CHAR_TYPE_TRAILING 3 // Displayed trailing byte of DBCS
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleLocalEUDC(
|
||||
_In_ HANDLE hConsoleHandle,
|
||||
_In_ WORD wCodePoint,
|
||||
_In_ COORD cFontSize,
|
||||
_In_ PCHAR lpSB);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleCursorMode(
|
||||
_In_ HANDLE hConsoleHandle,
|
||||
_In_ BOOL Blink,
|
||||
_In_ BOOL DBEnable);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
GetConsoleCursorMode(
|
||||
_In_ HANDLE hConsoleHandle,
|
||||
_Out_ PBOOL pbBlink,
|
||||
_Out_ PBOOL pbDBEnable);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
RegisterConsoleOS2(
|
||||
_In_ BOOL fOs2Register);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleOS2OemFormat(
|
||||
_In_ BOOL fOs2OemFormat);
|
||||
|
||||
BOOL
|
||||
IsConsoleFullWidth(
|
||||
_In_ HDC hDC,
|
||||
_In_ DWORD CodePage,
|
||||
_In_ WCHAR wch);
|
||||
|
||||
#if defined(FE_IME)
|
||||
BOOL
|
||||
APIENTRY
|
||||
RegisterConsoleIME(
|
||||
_In_ HWND hWndConsoleIME,
|
||||
_Out_opt_ DWORD *lpdwConsoleThreadId);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
UnregisterConsoleIME(
|
||||
VOID);
|
||||
#endif // FE_IME
|
||||
|
||||
//
|
||||
// These bits are always on for console handles and are used for routing
|
||||
// by windows.
|
||||
//
|
||||
|
||||
#define CONSOLE_HANDLE_SIGNATURE 0x00000003
|
||||
#define CONSOLE_HANDLE_NEVERSET 0x10000000
|
||||
#define CONSOLE_HANDLE_MASK (CONSOLE_HANDLE_SIGNATURE | CONSOLE_HANDLE_NEVERSET)
|
||||
|
||||
#define CONSOLE_HANDLE(HANDLE) (((ULONG_PTR)(HANDLE) & CONSOLE_HANDLE_MASK) == CONSOLE_HANDLE_SIGNATURE)
|
||||
|
||||
//
|
||||
// These strings are used to open console input or output.
|
||||
//
|
||||
|
||||
#define CONSOLE_INPUT_STRING L"CONIN$"
|
||||
#define CONSOLE_OUTPUT_STRING L"CONOUT$"
|
||||
#define CONSOLE_GENERIC L"CON"
|
||||
|
||||
//
|
||||
// this string is used to call RegisterWindowMessage to get
|
||||
// progman's handle.
|
||||
//
|
||||
|
||||
#define CONSOLE_PROGMAN_HANDLE_MESSAGE "ConsoleProgmanHandle"
|
||||
|
||||
|
||||
//
|
||||
// stream API definitions. these API are only supposed to be used by
|
||||
// subsystems (i.e. OpenFile routes to OpenConsoleW).
|
||||
//
|
||||
|
||||
HANDLE
|
||||
APIENTRY
|
||||
OpenConsoleW(
|
||||
_In_ LPWSTR lpConsoleDevice,
|
||||
_In_ DWORD dwDesiredAccess,
|
||||
_In_ BOOL bInheritHandle,
|
||||
_In_ DWORD dwShareMode);
|
||||
|
||||
HANDLE
|
||||
APIENTRY
|
||||
DuplicateConsoleHandle(
|
||||
_In_ HANDLE hSourceHandle,
|
||||
_In_ DWORD dwDesiredAccess,
|
||||
_In_ BOOL bInheritHandle,
|
||||
_In_ DWORD dwOptions);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
GetConsoleHandleInformation(
|
||||
_In_ HANDLE hObject,
|
||||
_Out_ LPDWORD lpdwFlags);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
SetConsoleHandleInformation(
|
||||
_In_ HANDLE hObject,
|
||||
_In_ DWORD dwMask,
|
||||
_In_ DWORD dwFlags);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
CloseConsoleHandle(
|
||||
_In_ HANDLE hConsole);
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
VerifyConsoleIoHandle(
|
||||
_In_ HANDLE hIoHandle);
|
||||
|
||||
HANDLE
|
||||
APIENTRY
|
||||
GetConsoleInputWaitHandle(
|
||||
VOID);
|
||||
|
||||
typedef struct _CONSOLE_STATE_INFO {
|
||||
/* BEGIN V1 CONSOLE_STATE_INFO */
|
||||
COORD ScreenBufferSize;
|
||||
COORD WindowSize;
|
||||
INT WindowPosX;
|
||||
INT WindowPosY;
|
||||
COORD FontSize;
|
||||
UINT FontFamily;
|
||||
UINT FontWeight;
|
||||
WCHAR FaceName[LF_FACESIZE];
|
||||
UINT CursorSize;
|
||||
UINT FullScreen : 1;
|
||||
UINT QuickEdit : 1;
|
||||
UINT AutoPosition : 1;
|
||||
UINT InsertMode : 1;
|
||||
UINT HistoryNoDup : 1;
|
||||
UINT FullScreenSupported : 1;
|
||||
UINT UpdateValues : 1;
|
||||
UINT Defaults : 1;
|
||||
WORD ScreenAttributes;
|
||||
WORD PopupAttributes;
|
||||
UINT HistoryBufferSize;
|
||||
UINT NumberOfHistoryBuffers;
|
||||
COLORREF ColorTable[16];
|
||||
HWND hWnd;
|
||||
HICON hIcon;
|
||||
LPWSTR OriginalTitle;
|
||||
LPWSTR LinkTitle;
|
||||
|
||||
/*
|
||||
* Starting code page
|
||||
*/
|
||||
UINT CodePage;
|
||||
|
||||
/* END V1 CONSOLE_STATE_INFO */
|
||||
|
||||
/* BEGIN V2 CONSOLE_STATE_INFO */
|
||||
BOOL fIsV2Console;
|
||||
BOOL fWrapText;
|
||||
BOOL fFilterOnPaste;
|
||||
BOOL fCtrlKeyShortcutsDisabled;
|
||||
BOOL fLineSelection;
|
||||
BYTE bWindowTransparency;
|
||||
BOOL fWindowMaximized;
|
||||
|
||||
unsigned int CursorType;
|
||||
COLORREF CursorColor;
|
||||
|
||||
BOOL InterceptCopyPaste;
|
||||
|
||||
COLORREF DefaultForeground;
|
||||
COLORREF DefaultBackground;
|
||||
BOOL TerminalScrolling;
|
||||
/* END V2 CONSOLE_STATE_INFO */
|
||||
|
||||
} CONSOLE_STATE_INFO, *PCONSOLE_STATE_INFO;
|
||||
|
||||
|
||||
#ifdef DEFINE_CONSOLEV2_PROPERTIES
|
||||
#define PID_CONSOLE_FORCEV2 1
|
||||
#define PID_CONSOLE_WRAPTEXT 2
|
||||
#define PID_CONSOLE_FILTERONPASTE 3
|
||||
#define PID_CONSOLE_CTRLKEYSDISABLED 4
|
||||
#define PID_CONSOLE_LINESELECTION 5
|
||||
#define PID_CONSOLE_WINDOWTRANSPARENCY 6
|
||||
#define PID_CONSOLE_WINDOWMAXIMIZED 7
|
||||
#define PID_CONSOLE_CURSOR_TYPE 8
|
||||
#define PID_CONSOLE_CURSOR_COLOR 9
|
||||
#define PID_CONSOLE_INTERCEPT_COPY_PASTE 10
|
||||
#define PID_CONSOLE_DEFAULTFOREGROUND 11
|
||||
#define PID_CONSOLE_DEFAULTBACKGROUND 12
|
||||
#define PID_CONSOLE_TERMINALSCROLLING 13
|
||||
|
||||
#define CONSOLE_PROPKEY(name, id) \
|
||||
DEFINE_PROPERTYKEY(name, 0x0C570607, 0x0396, 0x43DE, 0x9D, 0x61, 0xE3, 0x21, 0xD7, 0xDF, 0x50, 0x26, id);
|
||||
|
||||
CONSOLE_PROPKEY(PKEY_Console_ForceV2, PID_CONSOLE_FORCEV2);
|
||||
CONSOLE_PROPKEY(PKEY_Console_WrapText, PID_CONSOLE_WRAPTEXT);
|
||||
CONSOLE_PROPKEY(PKEY_Console_FilterOnPaste, PID_CONSOLE_FILTERONPASTE);
|
||||
CONSOLE_PROPKEY(PKEY_Console_CtrlKeyShortcutsDisabled, PID_CONSOLE_CTRLKEYSDISABLED);
|
||||
CONSOLE_PROPKEY(PKEY_Console_LineSelection, PID_CONSOLE_LINESELECTION);
|
||||
CONSOLE_PROPKEY(PKEY_Console_WindowTransparency, PID_CONSOLE_WINDOWTRANSPARENCY);
|
||||
CONSOLE_PROPKEY(PKEY_Console_WindowMaximized, PID_CONSOLE_WINDOWMAXIMIZED);
|
||||
CONSOLE_PROPKEY(PKEY_Console_CursorType, PID_CONSOLE_CURSOR_TYPE);
|
||||
CONSOLE_PROPKEY(PKEY_Console_CursorColor, PID_CONSOLE_CURSOR_COLOR);
|
||||
CONSOLE_PROPKEY(PKEY_Console_InterceptCopyPaste, PID_CONSOLE_INTERCEPT_COPY_PASTE);
|
||||
CONSOLE_PROPKEY(PKEY_Console_DefaultForeground, PID_CONSOLE_DEFAULTFOREGROUND);
|
||||
CONSOLE_PROPKEY(PKEY_Console_DefaultBackground, PID_CONSOLE_DEFAULTBACKGROUND);
|
||||
CONSOLE_PROPKEY(PKEY_Console_TerminalScrolling, PID_CONSOLE_TERMINALSCROLLING);
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Ensure the alignment is WORD boundary
|
||||
//
|
||||
|
||||
#include <pshpack2.h>
|
||||
|
||||
typedef struct {
|
||||
WORD wMod;
|
||||
WORD wVirKey;
|
||||
WCHAR wUnicodeChar;
|
||||
} ExtKeySubst;
|
||||
|
||||
typedef struct {
|
||||
ExtKeySubst keys[3]; // 0: Ctrl
|
||||
// 1: Alt
|
||||
// 2: Ctrl+Alt
|
||||
} ExtKeyDef;
|
||||
|
||||
typedef ExtKeyDef ExtKeyDefTable['Z' - 'A' + 1];
|
||||
|
||||
typedef struct {
|
||||
DWORD dwVersion;
|
||||
DWORD dwCheckSum;
|
||||
ExtKeyDefTable table;
|
||||
} ExtKeyDefBuf;
|
||||
|
||||
//
|
||||
// Restore the previous alignment
|
||||
//
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _WINCONP_
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Reserved console space.
|
||||
*
|
||||
* This was moved from the console code so that we can localize it
|
||||
* in one place. This was necessary for dealing with the background
|
||||
* color, which we need to have for the hungapp drawing. These are
|
||||
* stored in the extra-window-bytes of each console.
|
||||
*/
|
||||
#define GWL_CONSOLE_WNDALLOC (3 * sizeof(DWORD))
|
||||
#define GWL_CONSOLE_PID 0
|
||||
#define GWL_CONSOLE_TID 4
|
||||
#define GWL_CONSOLE_BKCOLOR 8
|
|
@ -0,0 +1,96 @@
|
|||
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\fswiss\fprq2\fcharset0 Arial;}{\f2\fnil\fcharset0 Calibri;}}
|
||||
{\colortbl ;\red0\green0\blue255;}
|
||||
{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
|
||||
{\*\generator Riched20 10.0.10586}\viewkind4\uc1
|
||||
\pard\widctlpar\sb120\sa120\b\f0\fs28 MICROSOFT SOFTWARE LICENSE TERMS\par
|
||||
|
||||
\pard\brdrb\brdrs\brdrw10\brsp20 \widctlpar\sb120\sa120 Pre-Release and Evaluation EULA \endash Windows Application Driver\par
|
||||
|
||||
\pard\widctlpar\sb120\sa120\b0\fs20 IF YOU LIVE IN (OR ARE A BUSINESS WITH YOUR PRINCIPAL PLACE OF BUSINESS IN) THE UNITED STATES, PLEASE READ THE \ldblquote BINDING ARBITRATION AND CLASS ACTION WAIVER\rdblquote SECTION BELOW. IT AFFECTS HOW DISPUTES ARE RESOLVED.\lang9\par
|
||||
|
||||
\pard\brdrt\brdrs\brdrw10\brsp20 \widctlpar\sb120\sa120 These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or \lang1033 additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft\rquote s rights relating to pre-updated software or services\lang9 ). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.\par
|
||||
|
||||
\pard
|
||||
{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent360\pnstart1\pndec{\pntxta.}}
|
||||
\widctlpar\s1\fi-357\li357\sb120\sa120\b\lang1033 INSTALLATION AND USE RIGHTS.\par
|
||||
|
||||
\pard
|
||||
{\pntext\f0 a)\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pnlcltr{\pntxta)}}
|
||||
\widctlpar\s2\fi-360\li717\sb120\sa120 General. \b0 You may install and use any number of copies of the software on your devices, solely to i) evaluate for internal business purposes; and ii) design, develop and test your applications. \par
|
||||
{\pntext\f0 b)\tab}\b Included Microsoft Applications. \b0 The software may include other Microsoft applications. These license terms apply to those included applications, if any, unless other license terms are provided with the other Microsoft applications.\par
|
||||
{\pntext\f0 c)\tab}\b Third Party Applications. \b0 The software may include third party applications that Microsoft, not the third party, licenses to you under this agreement. Any included notices for third party applications are for your information only and are listed in Exhibit A to these license terms.\par
|
||||
{\pntext\f0 d)\tab}\b No Distribution Rights. \b0 This agreement does not grant you a license to distribute nor sublicense all or part of the software to any third party.\par
|
||||
{\pntext\f0 e)\tab}\b\lang9 Package Managers. \b0\lang1033 The software may include package managers, like NuGet, that give you the option to download other Microsoft and third party software packages to use with your application. Those packages are under their own licenses, and not this agreement. Microsoft does not distribute, license or provide any warranties for any of the third party packages\lang9 .\lang1033\par
|
||||
|
||||
\pard\widctlpar\s1\fi-357\li357\sb120\sa120\b 2.\tab TIME-SENSITIVE SOFTWARE.\par
|
||||
|
||||
\pard
|
||||
{\pntext\f0 a)\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pnlcltr{\pntxta)}}
|
||||
\widctlpar\s2\fi-360\li717\sb120\sa120 Period. \b0 The software is time-sensitive and may stop running on a date that is defined in the software.\par
|
||||
{\pntext\f0 b)\tab}\b Notice. \b0 You may receive periodic reminder notices of this date through the software.\par
|
||||
{\pntext\f0 c)\tab}\b Access to data. \b0 You may not be able to access data used in the software when it stops running.\par
|
||||
|
||||
\pard\widctlpar\s1\fi-357\li357\sb120\sa120\b 3.\tab PRE-RELEASE SOFTWARE.\b0 The software is a pre-release version. It may not operate correctly. It may be different from the commercially released version.\par
|
||||
\b 4.\tab FEEDBACK.\b0 If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because Microsoft includes your feedback in them. These rights survive this agreement.\par
|
||||
\b 5.\tab DATA.\b0 The software may collect information about you and your use of the software and send that to Microsoft. Microsoft may use this information to provide services and improve Microsoft\rquote s products and services. Your opt-out rights, if any, are described in\b \b0 the product documentation. Some features in the software may enable collection of data from users of your applications that access or use the software. If you use these features to enable data collection in your applications, you must comply with applicable law, including getting any required user consent, and maintain a prominent privacy policy that accurately informs users about how you use, collect, and share their data. You can learn more about Microsoft\rquote s data collection and use in the product documentation and the Microsoft Privacy Statement at {{\field{\*\fldinst{HYPERLINK http://go.microsoft.com/fwlink/?LinkID=521839 }}{\fldrslt{http://go.microsoft.com/fwlink/?LinkID=521839\ul0\cf0}}}}\f0\fs20 . You agree to comply with all applicable provisions of the Microsoft Privacy Statement.\par
|
||||
\b 6.\tab SCOPE OF LICENSE.\b0 The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):\par
|
||||
|
||||
\pard
|
||||
{\pntext\f0 a)\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pnlcltr{\pntxta)}}
|
||||
\widctlpar\s2\fi-360\li717\sb120\sa120 work around any technical limitations in the software that only allow you to use it in certain ways;\par
|
||||
{\pntext\f0 b)\tab}reverse engineer, decompile or disassemble the software;\par
|
||||
{\pntext\f0 c)\tab}remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;\par
|
||||
{\pntext\f0 d)\tab}use the software in any way that is against the law or to create or propagate malware; or\par
|
||||
{\pntext\f0 e)\tab}share, publish, or lend the software (except for any distributable code, and then subject to the applicable terms above), provide the software as a stand-alone hosted solution for others to use, or transfer the software or this agreement to any third party.\par
|
||||
|
||||
\pard\widctlpar\s1\fi-357\li357\sb120\sa120\b 7.\tab EXPORT RESTRICTIONS.\b0 You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit (aka.ms/exporting).\par
|
||||
\b 8.\tab SUPPORT SERVICES.\b0 Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is \ldblquote as is\rdblquote , \ldblquote with all faults\rdblquote , and without warranty of any kind.\par
|
||||
\b 9.\tab UPDATES.\b0 The software may periodically check for updates, and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices.\par
|
||||
\b 10.\tab BINDING ARBITRATION AND CLASS ACTION WAIVER.\b0 This Section applies if you live in (or, if a business, your principal place of business is in) the United States. If you and Microsoft have a dispute, you and Microsoft agree to try for 60 days to resolve it informally. If you and Microsoft can\rquote t, you and Microsoft agree to binding individual arbitration before the American Arbitration Association under the Federal Arbitration Act (\ldblquote FAA\rdblquote ), and not to sue in court in front of a judge or jury. Instead, a neutral arbitrator will decide. Class action lawsuits, class-wide arbitrations, private attorney-general actions, and any other proceeding where someone acts in a representative capacity are not allowed; nor is combining individual proceedings without the consent of all parties. The complete Arbitration Agreement contains more terms and is at aka.ms/arb-agreement-1. You and Microsoft agree to these terms.\par
|
||||
\b 11.\tab ENTIRE AGREEMENT.\b0 This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software.\par
|
||||
\b 12.\tab APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES.\b0 If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles, except that the FAA governs everything related to arbitration. If you acquired the software in any other country, its laws apply, except that the FAA governs everything related to arbitration. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court (excluding arbitration). If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court (excluding arbitration).\par
|
||||
\b 13.\tab CONSUMER RIGHTS; REGIONAL VARIATIONS\b0 . This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state, province, or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state, province, or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:\par
|
||||
|
||||
\pard
|
||||
{\pntext\f0 a)\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pnlcltr{\pntxta)}}
|
||||
\widctlpar\s2\fi-360\li717\sb120\sa120\b Australia.\b0 You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.\par
|
||||
{\pntext\f0 b)\tab}\b Canada.\b0 If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.\par
|
||||
{\pntext\f0 c)\tab}\b Germany and Austria\b0 .\par
|
||||
|
||||
\pard\widctlpar\li717\sb120\sa120\b (i)\b0\tab\b Warranty.\b0 The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.\par
|
||||
\b (ii)\b0\tab\b Limitation of Liability\b0 . In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.\par
|
||||
|
||||
\pard\widctlpar\s1\li717\sb120\sa120 Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.\par
|
||||
|
||||
\pard\widctlpar\s1\fi-357\li357\sb120\sa120\b 14.\tab DISCLAIMER OF WARRANTY.\b0 \b THE SOFTWARE IS LICENSED \ldblquote AS IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.\b0\par
|
||||
\b 15.\tab LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
|
||||
|
||||
\pard\widctlpar\li357\sb120\sa120\b0 This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.\par
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.\par
|
||||
|
||||
\pard\widctlpar\sb120\sa120\page\par
|
||||
|
||||
\pard\widctlpar\sb120\sa120\qc EXHIBIT A\par
|
||||
THIRD PARTY NOTICES AND INFORMATION\par
|
||||
FOR\par
|
||||
MICROSOFT WINDOWS APPLICATION DRIVER\par
|
||||
|
||||
\pard\widctlpar\sb120\sa120\par
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION\line\line Note: While Microsoft is not the author of the files below, Microsoft is offering you a license subject to the terms of the Microsoft Software License Terms for Microsoft Windows Application Driver (the \ldblquote Microsoft Program\rdblquote ). Microsoft reserves all other rights. The notices below are provided for informational purposes only and are not the license terms under which Microsoft distributes these files.\par
|
||||
The Microsoft Program includes the following third-party software:\par
|
||||
1.\tab Newtonsoft.json version 7.0. ({\b{\field{\*\fldinst{HYPERLINK http://www.newtonsoft.com/json }}{\fldrslt{http://www.newtonsoft.com/json\ul0\cf0}}}}\f0\fs20 )\par
|
||||
2.\tab Casablanca ({{\field{\*\fldinst{HYPERLINK http://casablanca.codeplex.com/ }}{\fldrslt{http://casablanca.codeplex.com/\ul0\cf0}}}}\f0\fs20 )\par
|
||||
As the recipient of the above third-party software, Microsoft sets forth a copy of the notices and other information below.\par
|
||||
1. Newtonsoft.json version 7.0.1 ({{\field{\*\fldinst{HYPERLINK http://www.newtonsoft.com/json }}{\fldrslt{http://www.newtonsoft.com/json\ul0\cf0}}}}\f0\fs20 )\par
|
||||
NEWTONSOFT.JSON NOTICES AND INFORMATION BEGIN HERE\line =========================================\par
|
||||
The MIT License (MIT)\line\line Copyright (c) 2007 James Newton-King\line\line 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:\line\line The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\line\line 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.\par
|
||||
NEWTONSOFT.JSON NOTICES AND INFORMATION END HERE\line =========================================\par
|
||||
2. Casablanca ({{\field{\*\fldinst{HYPERLINK http://casablanca.codeplex.com/ }}{\fldrslt{http://casablanca.codeplex.com/\ul0\cf0}}}}\f0\fs20 )\par
|
||||
CASABLANCA NOTICES AND INFORMATION BEGIN HERE\line =========================================\par
|
||||
Copyright (c) Microsoft Corporation. All rights reserved. \line Licensed under the Apache License, Version 2.0 (the "License");\line you may not use this file except in compliance with the License.\line You may obtain a copy of the License at\line {{\field{\*\fldinst{HYPERLINK http://www.apache.org/licenses/LICENSE-2.0 }}{\fldrslt{http://www.apache.org/licenses/LICENSE-2.0\ul0\cf0}}}}\f0\fs20\line\line Unless required by applicable law or agreed to in writing, software\line\f1\fs19 distributed under the License is distributed on an "AS IS" BASIS,\line WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\line See the License for the specific language governing permissions and\line limitations under the License.\fs20\par
|
||||
\f0 CASABLANCA NOTICES AND INFORMATION END HERE\line =========================================\par
|
||||
\par
|
||||
|
||||
\pard\sa200\sl276\slmult1\f2\fs22\lang9\par
|
||||
}
|
||||
|