Adds `Microsoft.Terminal.Remoting.dll` #8607
Conversation
…ompile a String[]
This comment has been hidden.
This comment has been hidden.
New misspellings found, please review:
To accept these changes, run the following commands
|
…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This comment has been hidden.
This comment has been hidden.
New misspellings found, please review:
To accept these changes, run the following commands
|
This comment has been minimized.
This comment has been minimized.
|
Someone's excited :) |
This comment has been minimized.
This comment has been minimized.
|
Uh, yea I am! After months of prototyping and debate, this is finally coming together. It feels good |
This comment has been hidden.
This comment has been hidden.
New misspellings found, please review:
To accept these changes, run the following commands
|
This comment has been hidden.
This comment has been hidden.
New misspellings found, please review:
To accept these changes, run the following commands
|
This comment has been minimized.
This comment has been minimized.
New misspellings found, please review:
To accept these changes, run the following commands
|
|
Marking req changes so I can see what changed since I publish these. They're not super pressing comments, though. |
|
@DHowett you and I discussed being worried about peasants crashing after their original monarch is closed. Turns out, we don't need to worry about that in this PR! The monarch is only ever talked to once, at startup. After that, the window totally behaves as if business as usual. |
This comment has been minimized.
This comment has been minimized.
New misspellings found, please review:
To accept these changes, run the following commands
|
|
No issues with the implementation. Really you're just missing a few copyright headers haha |
| _root->ProcessStartupActions(actions, false); | ||
| } | ||
|
|
||
| return result; // TODO:MG does a return value make sense |
carlos-zamora
Dec 24, 2020
Member
Looks like you're not using it for now, so I guess don't return a value and change it later if/when we need it?
Looks like you're not using it for now, so I guess don't return a value and change it later if/when we need it?
| _peasant = *p; | ||
| _monarch.AddPeasant(_peasant); | ||
|
|
||
| // TODO:MG Spawn a thread to wait on the monarch, and handle the election |
carlos-zamora
Dec 24, 2020
Member
Suggested change
// TODO:MG Spawn a thread to wait on the monarch, and handle the election
// TODO:projects/5 Spawn a thread to wait on the monarch, and handle the election
?
| // TODO:MG Spawn a thread to wait on the monarch, and handle the election | |
| // TODO:projects/5 Spawn a thread to wait on the monarch, and handle the election |
?
| @@ -0,0 +1,106 @@ | |||
| #include "pch.h" | |||
carlos-zamora
Dec 24, 2020
Member
nit: missing copyright header
nit: missing copyright header
| void WindowManager::_createMonarch() | ||
| { | ||
| // Heads up! This only works because we're using | ||
| // "metadata-based-marshalling" for our WinRT types. THat means the OS is |
carlos-zamora
Dec 24, 2020
Member
Suggested change
// "metadata-based-marshalling" for our WinRT types. THat means the OS is
// "metadata-based-marshalling" for our WinRT types. That means the OS is
| // "metadata-based-marshalling" for our WinRT types. THat means the OS is | |
| // "metadata-based-marshalling" for our WinRT types. That means the OS is |
| auto kingPID = _monarch.GetPID(); | ||
| auto ourPID = GetCurrentProcessId(); |
carlos-zamora
Dec 24, 2020
Member
Suggested change
auto kingPID = _monarch.GetPID();
auto ourPID = GetCurrentProcessId();
const auto kingPID { _monarch.GetPID() };
const auto ourPID { GetCurrentProcessId() };
| auto kingPID = _monarch.GetPID(); | |
| auto ourPID = GetCurrentProcessId(); | |
| const auto kingPID { _monarch.GetPID() }; | |
| const auto ourPID { GetCurrentProcessId() }; |
| // | ||
| // I'm sure there's a better way to do this with WRL, but I'm not familiar | ||
| // enough with WRL to know for sure. |
carlos-zamora
Dec 24, 2020
Member
nit: you could probably remove this last part haha
nit: you could probably remove this last part haha
| @@ -0,0 +1,12 @@ | |||
| import "Peasant.idl"; | |||
carlos-zamora
Dec 24, 2020
Member
nit: copyright header
nit: copyright header
| @@ -0,0 +1,62 @@ | |||
| #pragma once | |||
carlos-zamora
Dec 24, 2020
Member
nit: copyright header
nit: copyright header
| @@ -0,0 +1,134 @@ | |||
| #include "pch.h" | |||
carlos-zamora
Dec 24, 2020
Member
nit: copyright header
nit: copyright header
| { | ||
| // TODO:projects/5 This is terrible. There's gotta be a better way | ||
| // of finding the first opening in a non-consecutive map of int->object | ||
| auto providedID = peasant.GetID(); |
carlos-zamora
Dec 24, 2020
Member
Suggested change
auto providedID = peasant.GetID();
const auto providedID = peasant.GetID();
| auto providedID = peasant.GetID(); | |
| const auto providedID = peasant.GetID(); |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Summary of the Pull Request
Adds a
Microsoft.Terminal.Remoting.dllto our solution. This DLL will be responsible for all the Monarch/Peasant work that's been described in #7240 & #8135.This PR does not implement the Monarch/Peasant architecture in any significant way. The goal of this PR is to just to establish the project layout, and the most basic connections. This should make reviewing the actual meat of the implementation (in a later PR) easier. It will also give us the opportunity to include some of the basic weird things we're doing (with
CoRegisterClass) in the Terminal now, and get them selfhosted, before building on them too much.This PR does have windows registering the
Monarchclass with COM. When windows are created, they'll as the Monarch if they should create a new window or not. In this PR, the Monarch will always reply "yes, please make a new window".Similar to other projects in our solution, we're adding 3 projects here:
Microsoft.Terminal.Remoting.lib: the actual implementation, as a static lib.Microsoft.Terminal.Remoting.dll: The implementation linked as a DLL, for use inWindowsTerminal.exe.Remoting.UnitTests.dll: A unit test dll that links with the static lib.There are plenty of TODOs scattered about the code. Clearly, most of this isn't implemented yet, but I do have more WIP branches. I'm using
projects/5as my notation for TODOs that are too small for an issue, but are part of the whole Process Model 2.0 work.References
PR Checklist