================ @@ -0,0 +1,61 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_Host_Windows_PseudoConsole_H_ +#define liblldb_Host_Windows_PseudoConsole_H_ + +#include "llvm/Support/Error.h" +#include <string> + +#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x20016 + +namespace lldb_private { + +class PseudoConsole { + +public: + llvm::Error OpenPseudoConsole(); + + /// Close the ConPTY, its read/write handles and invalidate them. + void Close(); + + /// The ConPTY HPCON handle accessor. + /// + /// This object retains ownership of the HPCON when this accessor is used. + /// + /// \return + /// The ConPTY HPCON handle, or INVALID_HANDLE_VALUE if it is currently + /// invalid. + void *GetPseudoTerminalHandle() { return m_conpty_handle; }; ---------------- charles-zablit wrote:
I forward declared `HANDLE` and `HPCON` to replace the `void *`: ```cpp typedef void *HANDLE; typedef void *HPCON; ``` https://github.com/llvm/llvm-project/pull/168729 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
