Skip to content

Commit

Permalink
If delegation is successful, let the other thread have it. Back off.
Browse files Browse the repository at this point in the history
  • Loading branch information
miniksa committed Aug 6, 2020
1 parent 47002b3 commit dd104b4
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions src/server/IoDispatchers.cpp
Expand Up @@ -168,41 +168,15 @@ PCONSOLE_API_MSG IoDispatchers::ConsoleHandleConnectionRequest(_In_ PCONSOLE_API
HANDLE,
PCONSOLE_API_MSG);

typedef bool (*PFNTEST)();

HMODULE mod = LoadLibraryW(L"OpenConsoleDll.dll");
PFNHANDOFF addr = (PFNHANDOFF)GetProcAddress(mod, "ConsoleEstablishHandoff");
/*PFNTEST addr = (PFNTEST)GetProcAddress(mod, "TestFunc");*/
HRESULT res = addr(Globals.pDeviceComm->_Server.get(), &Globals.launchArgs, Globals.hInputEvent.get(), pReceiveMsg);
if (res == S_OK)
{
Sleep(INFINITE);
auto rect = til::rectangle{};
rect += til::size{ 2, 2 };
}
else
if (SUCCEEDED(res))
{
auto size = til::size{ 3, 3 };
auto h = size.height();
h;
ExitThread(S_OK);
}
}

//if (ConsoleConnectionDeservesVisibleWindow(&Cac))
//{
// RETURN_IF_WIN32_BOOL_FALSE(CreateProcessW(_ConsoleHostPath(),
// cmd,
// nullptr,
// nullptr,
// TRUE,
// EXTENDED_STARTUPINFO_PRESENT,
// nullptr,
// nullptr,
// &siEx.StartupInfo,
// pi.addressof()));
//}


Status = NTSTATUS_FROM_HRESULT(gci.ProcessHandleList.AllocProcessData(dwProcessId,
dwThreadId,
Cac.ProcessGroupId,
Expand Down

1 comment on commit dd104b4

@github-actions

This comment was marked as outdated.

Please sign in to comment.