Blame src/internal/ntapi_fnapi.h

dd89bb
/********************************************************/
dd89bb
/*  ntapi: Native API core library                      */
59d585
/*  Copyright (C) 2013--2021  Z. Gilboa                 */
dd89bb
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
dd89bb
/********************************************************/
dd89bb
dd89bb
#ifndef ___NTAPI_FNAPI_H_
dd89bb
#define ___NTAPI_FNAPI_H_
dd89bb
dd89bb
#include <psxtypes/psxtypes.h>
dd89bb
#include <ntapi/ntapi.h>
dd89bb
#include "ntapi_hash_table.h"
dd89bb
dd89bb
#ifdef __cplusplus
dd89bb
extern "C" {
dd89bb
#endif
dd89bb
766a63
#define NTAPI_UFN(fn)   __attr_protected__ ntapi_##fn __ntapi_##fn
766a63
#define NTAPI_SFN(fn)   __attr_protected__ ntapi_##fn __ntapi_tt_##fn
766a63
#define NTAPI_VFN(fn,v) __attr_protected__ ntapi_##fn __ntapi_##fn##_##v
766a63
dd89bb
/* internal prototypes */
dd89bb
typedef int32_t __stdcall ntapi_tt_create_remote_runtime_data(
dd89bb
	__in		void *				hprocess,
dd89bb
	__in_out	nt_runtime_data_block *		runtime_data);
dd89bb
dd89bb
typedef void ** __cdecl ntapi_tt_get_csr_port_handle_addr_by_logic(void);
dd89bb
dd89bb
/* nt_object.h */
766a63
NTAPI_UFN(tt_open_ipc_object_directory);
766a63
NTAPI_UFN(tt_create_ipc_object_directory_entry);
766a63
NTAPI_UFN(tt_open_dev_object_directory);
766a63
NTAPI_UFN(tt_create_dev_object_directory_entry);
766a63
NTAPI_UFN(tt_create_keyed_object_directory);
766a63
NTAPI_UFN(tt_open_keyed_object_directory);
766a63
NTAPI_UFN(tt_create_keyed_object_directory_entry);
766a63
NTAPI_UFN(tt_keyed_object_to_key);
766a63
NTAPI_UFN(tt_sid_copy);
766a63
NTAPI_UFN(tt_sid_compare);
dd89bb
dd89bb
/* nt_crc32.h */
766a63
NTAPI_UFN(tt_buffer_crc32);
766a63
NTAPI_UFN(tt_mbstr_crc32);
766a63
NTAPI_UFN(tt_crc32_table);
dd89bb
265305
/* nt_crc64.h */
766a63
NTAPI_UFN(tt_buffer_crc64);
766a63
NTAPI_UFN(tt_mbstr_crc64);
766a63
NTAPI_UFN(tt_crc64_table);
265305
dd89bb
/* nt_file.h */
766a63
NTAPI_UFN(tt_get_file_handle_type);
766a63
NTAPI_UFN(tt_open_logical_parent_directory);
766a63
NTAPI_UFN(tt_open_physical_parent_directory);
766a63
NTAPI_UFN(tt_open_volume_by_guid);
dd89bb
dd89bb
dd89bb
/* nt_ipc.h */
766a63
NTAPI_UFN(ipc_connect_by_attr);
766a63
NTAPI_UFN(ipc_connect_by_name);
766a63
NTAPI_UFN(ipc_connect_by_symlink);
766a63
NTAPI_UFN(ipc_connect_by_port);
766a63
NTAPI_UFN(ipc_connect_section_by_attr);
766a63
NTAPI_UFN(ipc_connect_section_by_name);
766a63
NTAPI_UFN(ipc_connect_section_by_symlink);
766a63
NTAPI_UFN(ipc_connect_section_by_port);
766a63
NTAPI_UFN(ipc_get_port_by_attr);
766a63
NTAPI_UFN(ipc_get_port_section_by_attr);
766a63
NTAPI_UFN(ipc_init_section_by_port);
766a63
NTAPI_UFN(ipc_disconnect_unmap_section_by_port);
766a63
NTAPI_VFN(ipc_create_pipe,v1);
766a63
NTAPI_VFN(ipc_create_pipe,v2);
dd89bb
9faf9a
/* nt_sem.h */
766a63
NTAPI_UFN(sem_create);
766a63
NTAPI_UFN(sem_open);
766a63
NTAPI_UFN(sem_fcntl);
766a63
NTAPI_UFN(sem_ioctl);
766a63
NTAPI_UFN(sem_query);
766a63
NTAPI_UFN(sem_set);
766a63
NTAPI_UFN(sem_cancel);
766a63
NTAPI_UFN(sem_free);
9faf9a
47f21a
/* nt_msq.h */
766a63
NTAPI_UFN(msq_create);
766a63
NTAPI_UFN(msq_open);
766a63
NTAPI_UFN(msq_send);
766a63
NTAPI_UFN(msq_recv);
766a63
NTAPI_UFN(msq_fcntl);
766a63
NTAPI_UFN(msq_ioctl);
766a63
NTAPI_UFN(msq_query);
766a63
NTAPI_UFN(msq_set);
766a63
NTAPI_UFN(msq_cancel);
766a63
NTAPI_UFN(msq_free);
47f21a
6a4793
/* nt_afl.h */
766a63
NTAPI_UFN(afl_create);
766a63
NTAPI_UFN(afl_open);
766a63
NTAPI_UFN(afl_fcntl);
766a63
NTAPI_UFN(afl_ioctl);
766a63
NTAPI_UFN(afl_query);
766a63
NTAPI_UFN(afl_set);
766a63
NTAPI_UFN(afl_cancel);
766a63
NTAPI_UFN(afl_free);
6a4793
dd89bb
/* nt_ldr */
766a63
NTAPI_UFN(ldr_load_system_dll);
766a63
NTAPI_UFN(ldr_create_state_snapshot);
766a63
NTAPI_UFN(ldr_revert_state_to_snapshot);
dd89bb
dd89bb
/* nt_string.h */
766a63
NTAPI_UFN(tt_string_null_offset_multibyte);
766a63
NTAPI_UFN(tt_string_null_offset_short);
766a63
NTAPI_UFN(tt_string_null_offset_dword);
766a63
NTAPI_UFN(tt_string_null_offset_qword);
766a63
NTAPI_UFN(tt_string_null_offset_ptrsize);
766a63
NTAPI_UFN(tt_strcmp_multibyte);
766a63
NTAPI_UFN(tt_strcmp_utf16);
766a63
NTAPI_UFN(tt_strncmp_multibyte);
766a63
NTAPI_UFN(tt_strncmp_utf16);
766a63
NTAPI_UFN(tt_aligned_block_memset);
766a63
NTAPI_UFN(tt_aligned_block_memcpy);
766a63
NTAPI_UFN(tt_aligned_block_memlock);
766a63
NTAPI_UFN(tt_init_unicode_string_from_utf16);
766a63
NTAPI_UFN(tt_memcpy_utf16);
766a63
NTAPI_UFN(tt_aligned_memcpy_utf16);
766a63
NTAPI_UFN(tt_generic_memset);
766a63
NTAPI_UFN(tt_generic_memcpy);
766a63
NTAPI_UFN(tt_uint16_to_hex_utf16);
766a63
NTAPI_UFN(tt_uint32_to_hex_utf16);
766a63
NTAPI_UFN(tt_uint64_to_hex_utf16);
766a63
NTAPI_UFN(tt_uintptr_to_hex_utf16);
a41388
766a63
NTAPI_UFN(tt_hex_utf16_to_uint16);
766a63
NTAPI_UFN(tt_hex_utf16_to_uint32);
766a63
NTAPI_UFN(tt_hex_utf16_to_uint64);
766a63
NTAPI_UFN(tt_hex_utf16_to_uintptr);
a41388
a41388
NTAPI_UFN(tt_hex_utf8_to_uint16);
a41388
NTAPI_UFN(tt_hex_utf8_to_uint32);
a41388
NTAPI_UFN(tt_hex_utf8_to_uint64);
a41388
NTAPI_UFN(tt_hex_utf8_to_uintptr);
a41388
766a63
NTAPI_UFN(tt_uint16_to_hex_utf8);
766a63
NTAPI_UFN(tt_uint32_to_hex_utf8);
766a63
NTAPI_UFN(tt_uint64_to_hex_utf8);
766a63
NTAPI_UFN(tt_uintptr_to_hex_utf8);
766a63
NTAPI_UFN(tt_uintptr_to_dec_utf16);
766a63
NTAPI_UFN(tt_uintptr_to_dec_utf8);
766a63
NTAPI_UFN(tt_uintptr_to_dec_null_utf16);
766a63
NTAPI_UFN(tt_uintptr_to_dec_null_utf8);
766a63
NTAPI_UFN(tt_dec_utf16_to_uint16);
766a63
NTAPI_UFN(tt_dec_utf16_to_uint32);
766a63
NTAPI_UFN(tt_dec_utf16_to_uint64);
766a63
NTAPI_UFN(tt_dec_utf16_to_uintptr);
766a63
NTAPI_SFN(wcslen);
dd89bb
dd89bb
/* nt_guid.h */
766a63
NTAPI_UFN(tt_guid_to_string_utf16);
766a63
NTAPI_UFN(tt_string_to_guid_utf16);
5d7f04
NTAPI_UFN(tt_string_to_guid_utf8);
dd89bb
dd89bb
/* nt_sysinfo.h */
766a63
NTAPI_UFN(tt_get_system_directory_native_path);
766a63
NTAPI_UFN(tt_get_system_directory_dos_path);
766a63
NTAPI_UFN(tt_get_system_directory_handle);
766a63
NTAPI_UFN(tt_get_system_info_snapshot);
dd89bb
dd89bb
/* nt_thread.h */
766a63
NTAPI_UFN(tt_create_thread);
766a63
NTAPI_UFN(tt_create_local_thread);
766a63
NTAPI_UFN(tt_create_remote_thread);
dd89bb
dd89bb
/* nt_process.h */
766a63
NTAPI_UFN(tt_fork);
766a63
NTAPI_VFN(tt_fork,v1);
766a63
NTAPI_VFN(tt_fork,v2);
766a63
NTAPI_UFN(tt_create_remote_process_params);
766a63
NTAPI_UFN(tt_create_remote_runtime_data);
766a63
NTAPI_VFN(tt_create_native_process,v1);
766a63
NTAPI_VFN(tt_create_native_process,v2);
766a63
NTAPI_UFN(tt_spawn_native_process);
766a63
NTAPI_UFN(tt_spawn_foreign_process);
766a63
NTAPI_UFN(tt_get_runtime_data);
766a63
NTAPI_UFN(tt_init_runtime_data);
766a63
NTAPI_UFN(tt_update_runtime_data);
766a63
NTAPI_UFN(tt_exec_map_image_as_data);
766a63
NTAPI_UFN(tt_exec_unmap_image);
dd89bb
5f1999
/* nt_token.h */
766a63
NTAPI_UFN(tt_enable_token_privilege);
766a63
NTAPI_UFN(tt_disable_token_privilege);
5f1999
dd89bb
/* nt_section.h */
766a63
NTAPI_UFN(tt_get_section_name);
dd89bb
dd89bb
/* nt_sync.h */
766a63
NTAPI_UFN(tt_create_inheritable_event);
766a63
NTAPI_UFN(tt_create_private_event);
766a63
NTAPI_UFN(tt_wait_for_dummy_event);
dd89bb
dd89bb
/* nt_port.h */
766a63
NTAPI_UFN(tt_port_guid_from_type);
766a63
NTAPI_UFN(tt_port_type_from_guid);
766a63
NTAPI_UFN(tt_port_generate_keys);
766a63
NTAPI_UFN(tt_port_format_keys);
766a63
NTAPI_UFN(tt_port_name_from_attr);
766a63
NTAPI_UFN(tt_port_attr_from_name);
766a63
NTAPI_UFN(tt_port_attr_from_string);
766a63
NTAPI_UFN(tt_port_attr_from_symlink);
dd89bb
dd89bb
/* nt_argv.h */
766a63
NTAPI_UFN(tt_get_cmd_line_utf16);
766a63
NTAPI_UFN(tt_get_peb_env_block_utf16);
766a63
NTAPI_UFN(tt_parse_cmd_line_args_utf16);
766a63
NTAPI_UFN(tt_get_argv_envp_utf8);
766a63
NTAPI_UFN(tt_get_argv_envp_utf16);
766a63
NTAPI_UFN(tt_get_env_var_meta_utf8);
766a63
NTAPI_UFN(tt_get_env_var_meta_utf16);
766a63
NTAPI_UFN(tt_array_copy_utf8);
766a63
NTAPI_UFN(tt_array_copy_utf16);
766a63
NTAPI_UFN(tt_array_convert_utf8_to_utf16);
766a63
NTAPI_UFN(tt_array_convert_utf16_to_utf8);
dd89bb
dd89bb
/* nt_blitter.h */
766a63
NTAPI_UFN(blt_alloc);
766a63
NTAPI_UFN(blt_free);
766a63
NTAPI_UFN(blt_acquire);
766a63
NTAPI_UFN(blt_obtain);
766a63
NTAPI_UFN(blt_possess);
766a63
NTAPI_UFN(blt_release);
766a63
NTAPI_UFN(blt_get);
766a63
NTAPI_UFN(blt_set);
dd89bb
dd89bb
/* nt_unicode.h */
766a63
NTAPI_UFN(uc_validate_unicode_stream_utf8);
766a63
NTAPI_UFN(uc_validate_unicode_stream_utf16);
766a63
NTAPI_UFN(uc_get_code_point_byte_count_utf8);
766a63
NTAPI_UFN(uc_get_code_point_byte_count_utf16);
766a63
NTAPI_UFN(uc_convert_unicode_stream_utf8_to_utf16);
766a63
NTAPI_UFN(uc_convert_unicode_stream_utf8_to_utf32);
766a63
NTAPI_UFN(uc_convert_unicode_stream_utf16_to_utf8);
766a63
NTAPI_UFN(uc_convert_unicode_stream_utf16_to_utf32);
dd89bb
dd89bb
dd89bb
/* nt_daemon.h */
766a63
NTAPI_UFN(dsr_init);
766a63
NTAPI_UFN(dsr_create_port);
dd89bb
60ddd3
/* nt_acl.h */
766a63
NTAPI_UFN(acl_init_common_descriptor);
766a63
NTAPI_UFN(acl_init_common_descriptor_meta);
60ddd3
dd89bb
/* nt_vfd.h */
766a63
NTAPI_UFN(vfd_dev_name_init);
dd89bb
dd89bb
/* nt_tty.h */
766a63
NTAPI_UFN(tty_create_session);
766a63
NTAPI_UFN(tty_join_session);
766a63
NTAPI_UFN(tty_connect);
766a63
NTAPI_UFN(tty_client_session_disconnect);
766a63
NTAPI_UFN(tty_client_session_query);
766a63
NTAPI_UFN(tty_client_session_set);
766a63
NTAPI_UFN(tty_client_process_register);
766a63
NTAPI_UFN(tty_query_information_section);
766a63
NTAPI_UFN(tty_query_information_server);
766a63
NTAPI_UFN(tty_query_information_service);
766a63
NTAPI_UFN(tty_query_server_pts_slot_info);
766a63
NTAPI_UFN(tty_request_peer);
766a63
NTAPI_UFN(pty_open);
766a63
NTAPI_UFN(pty_open_pair);
766a63
NTAPI_UFN(pty_reopen);
766a63
NTAPI_UFN(pty_inherit );
766a63
NTAPI_UFN(pty_inherit_runtime_ctty );
766a63
NTAPI_UFN(pty_close);
766a63
NTAPI_UFN(pty_read);
766a63
NTAPI_UFN(pty_write);
766a63
NTAPI_UFN(pty_ioctl);
766a63
NTAPI_UFN(pty_query);
766a63
NTAPI_UFN(pty_xquery);
766a63
NTAPI_UFN(pty_set);
766a63
NTAPI_UFN(pty_cancel);
dd89bb
dd89bb
/* nt_socket.h */
766a63
NTAPI_VFN(sc_socket,v1);
766a63
NTAPI_VFN(sc_socket,v2);
766a63
NTAPI_VFN(sc_bind,v1);
766a63
NTAPI_VFN(sc_bind,v2);
766a63
NTAPI_VFN(sc_connect,v1);
766a63
NTAPI_VFN(sc_connect,v2);
766a63
NTAPI_VFN(sc_getsockname,v1);
766a63
NTAPI_VFN(sc_getsockname,v2);
766a63
NTAPI_VFN(sc_getpeername,v1);
766a63
NTAPI_VFN(sc_getpeername,v2);
766a63
NTAPI_VFN(sc_server_accept_connection,v1);
766a63
NTAPI_VFN(sc_server_accept_connection,v2);
766a63
NTAPI_UFN(sc_server_duplicate_socket);
766a63
NTAPI_UFN(sc_setsockopt);
766a63
NTAPI_UFN(sc_getsockopt);
766a63
NTAPI_UFN(sc_listen);
766a63
NTAPI_UFN(sc_accept);
766a63
NTAPI_UFN(sc_send);
766a63
NTAPI_UFN(sc_recv);
766a63
NTAPI_UFN(sc_shutdown);
766a63
NTAPI_UFN(sc_wait);
dd89bb
dd89bb
/* nt_mount.h */
766a63
NTAPI_UFN(tt_get_dos_drive_device_handle);
766a63
NTAPI_UFN(tt_get_dos_drive_root_handle);
766a63
NTAPI_UFN(tt_get_dos_drive_device_name);
766a63
NTAPI_UFN(tt_get_dos_drive_mount_points);
766a63
NTAPI_UFN(tt_dev_mount_points_to_statfs);
766a63
NTAPI_UFN(tt_get_dos_drive_letter_from_device);
dd89bb
dd89bb
/* nt_istat.h */
766a63
NTAPI_UFN(tt_istat);
dd89bb
dd89bb
/* nt_stat.h */
766a63
NTAPI_UFN(tt_stat);
dd89bb
dd89bb
/* nt_statfs.h */
766a63
NTAPI_UFN(tt_statfs);
dd89bb
dd89bb
/* nt_hashes.h */
766a63
NTAPI_UFN(tt_populate_hashed_import_table);
dd89bb
dd89bb
/* nt_guid.h */
766a63
NTAPI_UFN(tt_guid_copy);
766a63
NTAPI_UFN(tt_guid_compare);
766a63
NTAPI_UFN(tt_guid_to_string_utf16);
766a63
NTAPI_UFN(tt_string_to_guid_utf16);
fea48d
NTAPI_UFN(tt_guid_to_string_utf8);
fea48d
NTAPI_UFN(tt_string_to_guid_utf8);
dd89bb
e20eeb
/* log */
a7ffe3
NTAPI_UFN(log_write);
a7ffe3
NTAPI_UFN(log_fn_call);
a7ffe3
NTAPI_UFN(log_msg);
dd89bb
e20eeb
/* debug */
d4344e
NTAPI_UFN(tt_debug_create_object);
d4344e
NTAPI_UFN(tt_debug_create_attach_object);
bf05bd
NTAPI_UFN(tt_debug_execution_flow);
2a7f67
NTAPI_UFN(tt_debug_break_process);
e20eeb
dd89bb
/* csrss */
766a63
NTAPI_VFN(tt_get_csr_port_handle_addr_by_logic,i386);
766a63
NTAPI_VFN(tt_get_csr_port_handle_addr_by_logic,x86_64);
766a63
NTAPI_UFN(csr_port_handle);
dd89bb
dd89bb
#ifdef __cplusplus
dd89bb
}
dd89bb
#endif
dd89bb
#endif