terminal/src/server/ConDrvDeviceComm.h
Dustin Howett 3822d5b662 Merged PR 5677497: [Git2Git] Merged PR 5655213: Allow conhost to handoff to registered default app handler
Contains:
- Delegation Configurator that can lookup/edit/save configuration information to registry
- Conhost can lookup the CLSID of a registered default
- Conhost has the ability to handoff a starting visible-window interactive session to the registered default
- Velocity key since this is a big deal and we want to be careful
- IDL for the interface

Related work items: MSFT-16458099
Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_wdx_dxp_windev 0ca55027d8180fbbaa145f2fe7a15005856c0f7c
2021-02-11 21:07:50 +00:00

54 lines
1.8 KiB
C++

/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- ConDrvDeviceComm.h
Abstract:
- This module assists in communicating via IOCTL messages to and from a Device server handle.
Author:
- Michael Niksa (MiNiksa) 14-Sept-2016
Revision History:
2020-04 split into an interface IDeviceComm and a concrete impl for ConDrv
--*/
#pragma once
#include "DeviceComm.h"
#include <wil\resource.h>
class ConDrvDeviceComm : public IDeviceComm
{
public:
ConDrvDeviceComm(_In_ HANDLE Server);
~ConDrvDeviceComm();
[[nodiscard]] HRESULT SetServerInformation(_In_ CD_IO_SERVER_INFORMATION* const pServerInfo) const override;
[[nodiscard]] HRESULT ReadIo(_In_opt_ PCONSOLE_API_MSG const pReplyMsg,
_Out_ CONSOLE_API_MSG* const pMessage) const override;
[[nodiscard]] HRESULT CompleteIo(_In_ CD_IO_COMPLETE* const pCompletion) const override;
[[nodiscard]] HRESULT ReadInput(_In_ CD_IO_OPERATION* const pIoOperation) const override;
[[nodiscard]] HRESULT WriteOutput(_In_ CD_IO_OPERATION* const pIoOperation) const override;
[[nodiscard]] HRESULT AllowUIAccess() const override;
[[nodiscard]] ULONG_PTR PutHandle(const void*) override;
[[nodiscard]] void* GetHandle(ULONG_PTR) const override;
[[nodiscard]] HRESULT GetServerHandle(_Out_ HANDLE* pHandle) const override;
private:
[[nodiscard]] HRESULT _CallIoctl(_In_ DWORD dwIoControlCode,
_In_reads_bytes_opt_(cbInBufferSize) PVOID pInBuffer,
_In_ DWORD cbInBufferSize,
_Out_writes_bytes_opt_(cbOutBufferSize) PVOID pOutBuffer,
_In_ DWORD cbOutBufferSize) const;
wil::unique_handle _Server;
};