906edf7002
- Implements the default application behavior and handoff mechanisms between console and terminal. The inbox portion is done already. This adds the ability for our OpenConsole.exe to accept the incoming server connection from the Windows OS, stand up a PTY session, start the Windows Terminal as a listener for an incoming connection, and then send it the incoming PTY connection for it to launch a tab. - The tab is launched with default settings at the moment. - You must configure the default application using the `conhost.exe` propsheet or with the registry keys. Finishing the setting inside Windows Terminal will be a todo after this is complete. The OS Settings panel work to surface this setting is a dependency delivered by another team and you will not see it here. ## Validation Steps Performed - [x] Manual adjust of registry keys to the delegation conhost/terminal behavior - [x] Adjustment of the delegation options with the propsheet - [x] Launching things from the run box manually and watching them show in Terminal - [x] Launching things from shortcuts and watching them show in the Terminal Documentation on how it works will be a TODO post completion in #9462 References #7414 - Default Terminal spec Closes #492
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Module Name:
|
|
- CConsoleHandoff.h
|
|
|
|
Abstract:
|
|
- This module receives a console session handoff from the operating system to
|
|
an out-of-band, out-of-box console host.
|
|
|
|
Author(s):
|
|
- Michael Niksa (MiNiksa) 31-Aug-2020
|
|
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#include "IConsoleHandoff.h"
|
|
|
|
#if defined(WT_BRANDING_RELEASE)
|
|
#define __CLSID_CConsoleHandoff "2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69"
|
|
#elif defined(WT_BRANDING_PREVIEW)
|
|
#define __CLSID_CConsoleHandoff "06EC847C-C0A5-46B8-92CB-7C92F6E35CD5"
|
|
#else
|
|
#define __CLSID_CConsoleHandoff "1F9F2BF5-5BC3-4F17-B0E6-912413F1F451"
|
|
#endif
|
|
|
|
using namespace Microsoft::WRL;
|
|
|
|
struct __declspec(uuid(__CLSID_CConsoleHandoff))
|
|
CConsoleHandoff : public RuntimeClass<RuntimeClassFlags<ClassicCom>, IConsoleHandoff>
|
|
{
|
|
#pragma region IConsoleHandoff
|
|
STDMETHODIMP EstablishHandoff(HANDLE server,
|
|
HANDLE inputEvent,
|
|
PCCONSOLE_PORTABLE_ATTACH_MSG msg);
|
|
|
|
#pragma endregion
|
|
};
|
|
|
|
CoCreatableClass(CConsoleHandoff);
|