summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/ntapi/nt_process.h4
-rw-r--r--include/ntapi/nt_tty.h7
-rw-r--r--src/tty/ntapi_tty_create_session.c13
3 files changed, 22 insertions, 2 deletions
diff --git a/include/ntapi/nt_process.h b/include/ntapi/nt_process.h
index a58e616..39e84e9 100644
--- a/include/ntapi/nt_process.h
+++ b/include/ntapi/nt_process.h
@@ -470,6 +470,10 @@ typedef struct _nt_runtime_data {
void * hsync;
void * hswap;
void * srv_ready;
+ nt_guid port_guid;
+ int32_t port_type;
+ int32_t port_subtype;
+ uint32_t port_keys[6];
nt_guid srv_guid;
int32_t srv_type;
int32_t srv_subtype;
diff --git a/include/ntapi/nt_tty.h b/include/ntapi/nt_tty.h
index 4ed536f..636f4ae 100644
--- a/include/ntapi/nt_tty.h
+++ b/include/ntapi/nt_tty.h
@@ -88,6 +88,12 @@ typedef enum _nt_tty_session_type {
} nt_tty_session_type;
+typedef enum _nt_tty_session_subtype {
+ NT_TTY_SESSION_SUBTYPE_DEFAULT,
+ NT_TTY_SESSION_SUBTYPE_CAP,
+} nt_tty_session_subtype;
+
+
typedef enum _nt_tty_server_info_class {
NT_TTY_SERVER_BASIC_INFORMATION,
NT_TTY_SERVER_PTM_SLOT_INFORMATION,
@@ -352,6 +358,7 @@ typedef int32_t __stdcall ntapi_tty_create_session(
__out void ** hport,
__out nt_port_name * port_name,
__in nt_tty_session_type type,
+ __in nt_tty_session_subtype subtype,
__in const nt_guid * guid __optional,
__in wchar16_t * image_name __optional,
__in void * htty __optional);
diff --git a/src/tty/ntapi_tty_create_session.c b/src/tty/ntapi_tty_create_session.c
index 6c57d39..687d182 100644
--- a/src/tty/ntapi_tty_create_session.c
+++ b/src/tty/ntapi_tty_create_session.c
@@ -29,6 +29,7 @@ int32_t __stdcall __ntapi_tty_create_session(
__out void ** hport,
__out nt_port_name * port_name,
__in nt_tty_session_type type,
+ __in nt_tty_session_subtype subtype,
__in const nt_guid * guid __optional,
__in wchar16_t * image_name __optional,
__in void * htty __optional)
@@ -148,8 +149,16 @@ int32_t __stdcall __ntapi_tty_create_session(
}
/* subsystem attributes */
- ssattr.srv_type = port_attr.type;
- ssattr.srv_subtype = port_attr.subtype;
+ ssattr.port_type = port_attr.type;
+ ssattr.port_subtype = port_attr.subtype;
+
+ __ntapi->tt_guid_copy(
+ &ssattr.port_guid,
+ &port_attr.guid);
+
+ ssattr.srv_type = type;
+ ssattr.srv_subtype = subtype;
+
ssattr.srv_keys[0] = port_attr.keys.key[0];
ssattr.srv_keys[1] = port_attr.keys.key[1];
ssattr.srv_keys[2] = port_attr.keys.key[2];