diff --git a/include/ntapi/nt_sysinfo.h b/include/ntapi/nt_sysinfo.h index 3f57a43..aa6cb6e 100644 --- a/include/ntapi/nt_sysinfo.h +++ b/include/ntapi/nt_sysinfo.h @@ -437,7 +437,7 @@ typedef struct _nt_system_handle_information { uint16_t handle; void * object; uint32_t granted_access; -#if defined (__NT64) +#if (__SIZEOF_POINTER__ == 8) uint32_t granted_access_padding; #endif } nt_system_handle_information; diff --git a/src/process/ntapi_tt_create_native_process_v1.c b/src/process/ntapi_tt_create_native_process_v1.c index f17f236..a44ed4f 100644 --- a/src/process/ntapi_tt_create_native_process_v1.c +++ b/src/process/ntapi_tt_create_native_process_v1.c @@ -52,11 +52,11 @@ int32_t __stdcall __ntapi_tt_create_native_process_v1(nt_create_process_params * size_t cmd_line_runtime_buffer_size; int fresume_thread; - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) wchar16_t runtime_arg[12] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l'}; - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) wchar16_t runtime_arg[20] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l', diff --git a/src/process/ntapi_tt_create_native_process_v2.c b/src/process/ntapi_tt_create_native_process_v2.c index 2d058a0..f28a522 100644 --- a/src/process/ntapi_tt_create_native_process_v2.c +++ b/src/process/ntapi_tt_create_native_process_v2.c @@ -49,11 +49,11 @@ int32_t __stdcall __ntapi_tt_create_native_process_v2( nt_create_process_ext_param file_info; } ext_params; - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) wchar16_t runtime_arg[12] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l'}; - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) wchar16_t runtime_arg[20] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l', diff --git a/src/process/ntapi_tt_create_remote_runtime_data.c b/src/process/ntapi_tt_create_remote_runtime_data.c index b3809b0..7b85893 100644 --- a/src/process/ntapi_tt_create_remote_runtime_data.c +++ b/src/process/ntapi_tt_create_remote_runtime_data.c @@ -26,10 +26,10 @@ int32_t __stdcall __ntapi_tt_create_remote_runtime_data( nt_runtime_data * rtdata; void * srv_ready; - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) wchar16_t runtime_arg[8] = { 'i','n','t','e','g','r','a','l'}; - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) wchar16_t runtime_arg[16] = { 'i','n','t','e','g','r','a','l', '-','r','u','n','t','i','m','e'}; diff --git a/src/process/ntapi_tt_get_runtime_data.c b/src/process/ntapi_tt_get_runtime_data.c index 5dc2366..60cdf17 100644 --- a/src/process/ntapi_tt_get_runtime_data.c +++ b/src/process/ntapi_tt_get_runtime_data.c @@ -10,11 +10,11 @@ #include #include "ntapi_impl.h" -#if defined (__NT32) +#if (__SIZEOF_POINTER__ == 4) static wchar16_t runtime_arg[12] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l'}; -#elif defined (__NT64) +#elif (__SIZEOF_POINTER__ == 8) static wchar16_t runtime_arg[20] = { ' ','-','r',' ', 'i','n','t','e','g','r','a','l', diff --git a/src/string/ntapi_tt_hex_utf16_to_uintptr.c b/src/string/ntapi_tt_hex_utf16_to_uintptr.c index 494e5ef..0edc870 100644 --- a/src/string/ntapi_tt_hex_utf16_to_uintptr.c +++ b/src/string/ntapi_tt_hex_utf16_to_uintptr.c @@ -94,9 +94,9 @@ int32_t __fastcall __ntapi_tt_hex_utf16_to_uintptr( __in wchar16_t hex_key_utf16[], __out uintptr_t * key) { - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) return __ntapi_tt_hex_utf16_to_uint32(hex_key_utf16,key); - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) return __ntapi_tt_hex_utf16_to_uint64(hex_key_utf16,key); #endif } diff --git a/src/string/ntapi_tt_uintptr_to_hex_utf16.c b/src/string/ntapi_tt_uintptr_to_hex_utf16.c index bb7ae8c..2cd0b69 100644 --- a/src/string/ntapi_tt_uintptr_to_hex_utf16.c +++ b/src/string/ntapi_tt_uintptr_to_hex_utf16.c @@ -73,12 +73,12 @@ void __fastcall __ntapi_tt_uintptr_to_hex_utf16( __in uintptr_t key, __out wchar16_t * formatted_key) { - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) __ntapi_tt_uint_to_hex_utf16( key, formatted_key, 32); - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) __ntapi_tt_uint_to_hex_utf16( key, formatted_key, diff --git a/src/string/ntapi_tt_uintptr_to_hex_utf8.c b/src/string/ntapi_tt_uintptr_to_hex_utf8.c index 7fb1dc5..d18725b 100644 --- a/src/string/ntapi_tt_uintptr_to_hex_utf8.c +++ b/src/string/ntapi_tt_uintptr_to_hex_utf8.c @@ -65,9 +65,9 @@ void __fastcall __ntapi_tt_uintptr_to_hex_utf8( __in uintptr_t key, __out unsigned char * buffer) { - #if defined (__NT32) + #if (__SIZEOF_POINTER__ == 4) __ntapi_tt_uint_to_hex_utf8(key,buffer,32); - #elif defined (__NT64) + #elif (__SIZEOF_POINTER__ == 8) __ntapi_tt_uint_to_hex_utf8(key,buffer,64); #endif }