Try to get the client name during DefTerm handoff (#19014)

(cherry picked from commit cf95460a2622f33e48303aeb2b9cc03a9ee324e7)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgbO1vA
Service-Version: 1.22
This commit is contained in:
Dustin L. Howett 2025-06-24 16:33:27 -05:00 committed by Dustin L. Howett
parent 92daa011bd
commit ede606b837

View File

@ -313,6 +313,13 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
}
CATCH_LOG()
try
{
auto processImageName{ wil::QueryFullProcessImageNameW<std::wstring>(_piClient.hProcess) };
_clientName = std::filesystem::path{ std::move(processImageName) }.filename().wstring();
}
CATCH_LOG()
_pipe = std::move(pipe.server);
*in = pipe.client.release();
*out = pipeClientClone.release();