terminal/src/server/lib/server.vcxproj.filters

150 lines
5.1 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\precomp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\DeviceHandle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Entrypoints.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\WinNTControl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Convert DeviceComm into an interface and add handle exchange (#8367) This commit replaces DeviceComm with the interface IDeviceComm and the concrete implementation type ConDrvDeviceComm. This work is done in preparation for different device backends. In addition to separating out ConDrv-specific behavior, I've introduced a "handle exchange" interface. HANDLE EXCHANGE --------------- There are points where we give ConDrv opaque handle identifiers to our input buffer, output buffer and process data. The exact content of the opaque identifier is meaningless to ConDrv: the driver's only interaction with these identifiers is to hold onto them and send back whichever are pertinent for each API call. Because of that, we used the raw register-width pointer value of the input buffer, output buffer or process data _as_ the opaque handle value. This works very well for ConDrv <-> conhost using the ConDrvDeviceComm. It works less well for something like the "logging" DeviceComm that will log packets to a file: those packets *cannot* contain pointer values (!) To address this, and to afford flexibility to DeviceComm implementers, I've introduced a two-member complement of handle management functions: * `ULONG_PTR PutHandle(void*)` registers an object with the DeviceComm and returns an opaque identifier. * `void* GetHandle(ULONG_PTR)` takes an opaque identifier and returns the original object. ConDrvDeviceComm implements PutHandle and GetHandle by casting the object pointer to the "opaque handle value", which maintains wire format compatibility[1] with revisions of conhost prior to this change. Simpler DeviceComm implementations that require handle tracking but cannot bear raw pointers can implement these functions by returning an autoincrementing ID (or similar) and registering the raw object pointer in a mapping. I've audited all existing handle exchanges with the driver and updated them to use Put/GetHandle. (I intended to add DestroyHandle, but we are not equipped for handle removal at the moment. ConsoleHandleData/ConsoleProcessHandle are destroyed during wait routine completion, on client disconnect, etc. This does mean that an id<->pointer mapping will grow without bound, but at a cost of ~8 bytes per entry and a short-lived console session I am not too concerned about the cost.) [1] Wire format compatibility is not required, and later we may want to switch ConDrvDeviceComm to `EncodePointer` and `DecodePointer` just to insulate us against a spurious ConDrv packet allowing for an arbitrary 4/8-byte read and subsequent liftoff into space.
2020-12-16 00:07:43 +01:00
<ClCompile Include="..\ConDrvDeviceComm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ObjectHeader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ObjectHandle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\WaitQueue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\WaitBlock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ProcessHandle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ProcessList.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ApiMessage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ApiMessageState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\IoDispatchers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\IoSorter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ApiSorter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ApiDispatchers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ApiDispatchersInternal.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ProcessPolicy.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ConsoleShimPolicy.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\precomp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\DeviceHandle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Entrypoints.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\WinNTControl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\DeviceComm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ObjectHandle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ObjectHeader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ProcessHandle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\WaitBlock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\WaitQueue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\WaitTerminationReason.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ProcessList.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ApiMessage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ApiMessageState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\IoDispatchers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\IoSorter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ApiSorter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ApiDispatchers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\IApiRoutines.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\IWaitRoutine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ProcessPolicy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ConsoleShimPolicy.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Natvis Include="$(SolutionDir)tools\ConsoleTypes.natvis" />
</ItemGroup>
</Project>