| 725 | } |
| 726 | |
| 727 | void NanaBox::ComputeSystemAddComPort( |
| 728 | winrt::com_ptr<NanaBox::ComputeSystem> const& Instance, |
| 729 | std::uint32_t const& PortID, |
| 730 | std::string const& NamedPipe) |
| 731 | { |
| 732 | nlohmann::json Result; |
| 733 | |
| 734 | Result["ResourcePath"] = Mile::FormatString( |
| 735 | "VirtualMachine/Devices/ComPorts/%d", |
| 736 | PortID); |
| 737 | Result["RequestType"] = "Add"; |
| 738 | Result["Settings"] = NanaBox::MakeHcsComPortConfiguration(NamedPipe); |
| 739 | |
| 740 | Instance->Modify(winrt::to_hstring(Result.dump())); |
| 741 | } |
| 742 | |
| 743 | void NanaBox::ComputeSystemRemoveComPort( |
| 744 | winrt::com_ptr<NanaBox::ComputeSystem> const& Instance, |