From efc01e81a13322864775f13003a22c786dc357ed Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 14 Aug 2015 00:38:16 +0300 Subject: pty inheritance: client-side implementation. --- include/ntapi/nt_tty.h | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'include/ntapi/nt_tty.h') diff --git a/include/ntapi/nt_tty.h b/include/ntapi/nt_tty.h index 4783eb6..8f33bc7 100644 --- a/include/ntapi/nt_tty.h +++ b/include/ntapi/nt_tty.h @@ -68,10 +68,15 @@ typedef enum _nt_tty_info_class { typedef enum _nt_pty_info_class { NT_PTY_BASIC_INFORMATION, NT_PTY_CLIENT_INFORMATION, + NT_PTY_INHERIT_INFORMATION, NT_PTY_INFORMATION_CAP } nt_pty_info_class; +/* client process registration flags */ +#define NT_TTY_INHERIT_HANDLES 0x0001 + + typedef struct __attr_ptr_size_aligned__ _nt_tty_msg_info { uintptr_t msg_id; uint32_t opcode; @@ -166,6 +171,23 @@ typedef struct __attr_ptr_size_aligned__ _nt_pty_client_info { } nt_pty_client_info; +typedef struct __attr_ptr_size_aligned__ _nt_pty_inherit_info { + void * hpty; + nt_guid guid; + nt_luid luid; + + union { + struct { + uint32_t access; + uint32_t flags; + uint32_t share; + uint32_t options; + }; + + uintptr_t any[4]; + }; +} nt_pty_inherit_info; + typedef struct __attr_ptr_size_aligned__ _nt_tty_session_info { int32_t pid; int32_t pgid; @@ -173,7 +195,6 @@ typedef struct __attr_ptr_size_aligned__ _nt_tty_session_info { int32_t reserved; } nt_tty_session_info; - typedef struct __attr_ptr_size_aligned__ _nt_tty_register_msg { nt_port_message header; struct { @@ -341,6 +362,12 @@ typedef int32_t __stdcall ntapi_pty_reopen( __in nt_pty * pty); +typedef int32_t __stdcall ntapi_pty_inherit( + __in void * hport, + __out nt_pty ** pty, + __in nt_pty_client_info * client_info); + + typedef int32_t __stdcall ntapi_pty_close( __in nt_pty * pty); -- cgit v1.2.3