From 5b9ff6577550b2ac84fe485ede8e82e96f6f06a8 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 21 Aug 2016 14:24:05 -0400 Subject: __ntapi_tt_port_generate_keys(): use zw_query_performance_counter(). --- src/port/ntapi_port_name_helper.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/port/ntapi_port_name_helper.c b/src/port/ntapi_port_name_helper.c index eb61d38..ef87570 100644 --- a/src/port/ntapi_port_name_helper.c +++ b/src/port/ntapi_port_name_helper.c @@ -79,10 +79,11 @@ int32_t __stdcall __ntapi_tt_port_generate_keys( __out nt_port_keys * keys) { int32_t status; - nt_large_integer systime; + nt_large_integer ticks; + nt_large_integer pcfreq; nt_luid luid; - if ((status = __ntapi->zw_query_system_time(&systime))) + if ((status = __ntapi->zw_query_performance_counter(&ticks,&pcfreq))) return status; if ((status = __ntapi->zw_allocate_locally_unique_id(&luid))) @@ -90,8 +91,8 @@ int32_t __stdcall __ntapi_tt_port_generate_keys( keys->key[0] = pe_get_current_process_id(); keys->key[1] = pe_get_current_thread_id(); - keys->key[2] = systime.ihigh; - keys->key[3] = systime.ulow; + keys->key[2] = ticks.ihigh; + keys->key[3] = ticks.ulow; keys->key[4] = luid.high; keys->key[5] = luid.low; -- cgit v1.2.3