Blame src/internal/ntapi_fnapi.h

dd89bb
/********************************************************/
dd89bb
/*  ntapi: Native API core library                      */
dd89bb
/*  Copyright (C) 2013,2014,2015  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
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 */
dd89bb
ntapi_tt_create_keyed_object_directory		__ntapi_tt_create_keyed_object_directory;
dd89bb
ntapi_tt_open_keyed_object_directory		__ntapi_tt_open_keyed_object_directory;
dd89bb
ntapi_tt_create_keyed_object_directory_entry	__ntapi_tt_create_keyed_object_directory_entry;
dd89bb
dd89bb
/* nt_crc32.h */
dd89bb
ntapi_tt_buffer_crc32				__ntapi_tt_buffer_crc32;
dd89bb
ntapi_tt_mbstr_crc32				__ntapi_tt_mbstr_crc32;
dd89bb
ntapi_tt_crc32_table				__ntapi_tt_crc32_table;
dd89bb
dd89bb
/* nt_file.h */
dd89bb
ntapi_tt_get_file_handle_type			__ntapi_tt_get_file_handle_type;
dd89bb
ntapi_tt_open_logical_parent_directory		__ntapi_tt_open_logical_parent_directory;
dd89bb
ntapi_tt_open_physical_parent_directory		__ntapi_tt_open_physical_parent_directory;
dd89bb
dd89bb
dd89bb
/* nt_ipc.h */
dd89bb
ntapi_ipc_create_pipe				__ntapi_ipc_create_pipe_v1;
dd89bb
ntapi_ipc_create_pipe				__ntapi_ipc_create_pipe_v2;
dd89bb
dd89bb
/* nt_ldr */
dd89bb
ntapi_ldr_load_system_dll			__ntapi_ldr_load_system_dll;
dd89bb
ntapi_ldr_create_state_snapshot			__ntapi_ldr_create_state_snapshot;
dd89bb
ntapi_ldr_revert_state_to_snapshot		__ntapi_ldr_revert_state_to_snapshot;
dd89bb
dd89bb
/* nt_string.h */
dd89bb
ntapi_tt_string_null_offset_multibyte		__ntapi_tt_string_null_offset_multibyte;
dd89bb
ntapi_tt_string_null_offset_short		__ntapi_tt_string_null_offset_short;
dd89bb
ntapi_tt_string_null_offset_dword		__ntapi_tt_string_null_offset_dword;
dd89bb
ntapi_tt_string_null_offset_qword		__ntapi_tt_string_null_offset_qword;
dd89bb
ntapi_tt_string_null_offset_ptrsize		__ntapi_tt_string_null_offset_ptrsize;
dd89bb
ntapi_wcslen					__ntapi_wcslen;
dd89bb
ntapi_tt_aligned_block_memset			__ntapi_tt_aligned_block_memset;
dd89bb
ntapi_tt_aligned_block_memcpy			__ntapi_tt_aligned_block_memcpy;
dd89bb
ntapi_tt_init_unicode_string_from_utf16		__ntapi_tt_init_unicode_string_from_utf16;
dd89bb
ntapi_tt_memcpy_utf16				__ntapi_tt_memcpy_utf16;
dd89bb
ntapi_tt_aligned_memcpy_utf16			__ntapi_tt_aligned_memcpy_utf16;
dd89bb
ntapi_tt_generic_memset				__ntapi_tt_generic_memset;
dd89bb
ntapi_tt_generic_memcpy				__ntapi_tt_generic_memcpy;
dd89bb
ntapi_tt_uint16_to_hex_utf16			__ntapi_tt_uint16_to_hex_utf16;
dd89bb
ntapi_tt_uint32_to_hex_utf16			__ntapi_tt_uint32_to_hex_utf16;
dd89bb
ntapi_tt_uint64_to_hex_utf16			__ntapi_tt_uint64_to_hex_utf16;
dd89bb
ntapi_tt_uintptr_to_hex_utf16			__ntapi_tt_uintptr_to_hex_utf16;
dd89bb
ntapi_tt_hex_utf16_to_uint16			__ntapi_tt_hex_utf16_to_uint16;
dd89bb
ntapi_tt_hex_utf16_to_uint32			__ntapi_tt_hex_utf16_to_uint32;
dd89bb
ntapi_tt_hex_utf16_to_uint64			__ntapi_tt_hex_utf16_to_uint64;
dd89bb
ntapi_tt_hex_utf16_to_uintptr			__ntapi_tt_hex_utf16_to_uintptr;
dd89bb
ntapi_tt_uint16_to_hex_utf8			__ntapi_tt_uint16_to_hex_utf8;
dd89bb
ntapi_tt_uint32_to_hex_utf8			__ntapi_tt_uint32_to_hex_utf8;
dd89bb
ntapi_tt_uint64_to_hex_utf8			__ntapi_tt_uint64_to_hex_utf8;
dd89bb
ntapi_tt_uintptr_to_hex_utf8			__ntapi_tt_uintptr_to_hex_utf8;
dd89bb
dd89bb
/* nt_guid.h */
dd89bb
ntapi_tt_guid_to_utf16_string			__ntapi_tt_guid_to_utf16_string;
dd89bb
ntapi_tt_utf16_string_to_guid			__ntapi_tt_utf16_string_to_guid;
dd89bb
dd89bb
/* nt_sysinfo.h */
dd89bb
ntapi_tt_get_system_directory_native_path	__ntapi_tt_get_system_directory_native_path;
dd89bb
ntapi_tt_get_system_directory_dos_path		__ntapi_tt_get_system_directory_dos_path;
dd89bb
ntapi_tt_get_system_directory_handle		__ntapi_tt_get_system_directory_handle;
dd89bb
ntapi_tt_get_system_info_snapshot		__ntapi_tt_get_system_info_snapshot;
dd89bb
dd89bb
/* nt_thread.h */
dd89bb
ntapi_tt_create_thread		__ntapi_tt_create_thread;
dd89bb
ntapi_tt_create_local_thread			__ntapi_tt_create_local_thread;
dd89bb
ntapi_tt_create_remote_thread			__ntapi_tt_create_remote_thread;
dd89bb
dd89bb
/* nt_process.h */
dd89bb
ntapi_tt_fork					__ntapi_tt_fork_v1;
dd89bb
ntapi_tt_fork					__ntapi_tt_fork_v2;
dd89bb
ntapi_tt_create_remote_process_params		__ntapi_tt_create_remote_process_params;
dd89bb
ntapi_tt_create_remote_runtime_data		__ntapi_tt_create_remote_runtime_data;
dd89bb
ntapi_tt_create_native_process			__ntapi_tt_create_native_process_v1;
dd89bb
ntapi_tt_create_native_process			__ntapi_tt_create_native_process_v2;
dd89bb
ntapi_tt_get_runtime_data			__ntapi_tt_get_runtime_data;
dd89bb
ntapi_tt_init_runtime_data			__ntapi_tt_init_runtime_data;
dd89bb
ntapi_tt_update_runtime_data			__ntapi_tt_update_runtime_data;
dd89bb
ntapi_tt_exec_map_image_as_data			__ntapi_tt_exec_map_image_as_data;
dd89bb
ntapi_tt_exec_unmap_image			__ntapi_tt_exec_unmap_image;
dd89bb
dd89bb
/* nt_section.h */
dd89bb
ntapi_tt_get_section_name			__ntapi_tt_get_section_name;
dd89bb
dd89bb
/* nt_sync.h */
dd89bb
ntapi_tt_create_inheritable_event		__ntapi_tt_create_inheritable_event;
dd89bb
ntapi_tt_create_private_event			__ntapi_tt_create_private_event;
dd89bb
ntapi_tt_wait_for_dummy_event			__ntapi_tt_wait_for_dummy_event;
dd89bb
ntapi_tt_sync_block_init			__ntapi_tt_sync_block_init;
dd89bb
ntapi_tt_sync_block_lock			__ntapi_tt_sync_block_lock;
dd89bb
ntapi_tt_sync_block_server_lock			__ntapi_tt_sync_block_server_lock;
dd89bb
ntapi_tt_sync_block_unlock			__ntapi_tt_sync_block_unlock;
dd89bb
ntapi_tt_sync_block_invalidate			__ntapi_tt_sync_block_invalidate;
dd89bb
dd89bb
/* nt_port.h */
dd89bb
ntapi_tt_port_guid_from_type			__ntapi_tt_port_guid_from_type;
dd89bb
ntapi_tt_port_type_from_guid			__ntapi_tt_port_type_from_guid;
dd89bb
ntapi_tt_port_generate_keys			__ntapi_tt_port_generate_keys;
dd89bb
ntapi_tt_port_format_keys			__ntapi_tt_port_format_keys;
dd89bb
ntapi_tt_port_name_from_attributes		__ntapi_tt_port_name_from_attributes;
dd89bb
dd89bb
/* nt_argv.h */
dd89bb
ntapi_tt_get_cmd_line_utf16			__ntapi_tt_get_cmd_line_utf16;
dd89bb
ntapi_tt_get_peb_env_block_utf16		__ntapi_tt_get_peb_env_block_utf16;
dd89bb
ntapi_tt_parse_cmd_line_args_utf16		__ntapi_tt_parse_cmd_line_args_utf16;
dd89bb
ntapi_tt_get_argv_envp_utf8			__ntapi_tt_get_argv_envp_utf8;
dd89bb
ntapi_tt_get_argv_envp_utf16			__ntapi_tt_get_argv_envp_utf16;
dd89bb
ntapi_tt_get_env_var_meta_utf16			__ntapi_tt_get_env_var_meta_utf16;
dd89bb
ntapi_tt_get_short_option_meta_utf16		__ntapi_tt_get_short_option_meta_utf16;
dd89bb
ntapi_tt_get_long_option_meta_utf16		__ntapi_tt_get_long_option_meta_utf16;
dd89bb
ntapi_tt_array_copy_utf8			__ntapi_tt_array_copy_utf8;
dd89bb
ntapi_tt_array_copy_utf16			__ntapi_tt_array_copy_utf16;
dd89bb
ntapi_tt_array_convert_utf8_to_utf16		__ntapi_tt_array_convert_utf8_to_utf16;
dd89bb
ntapi_tt_array_convert_utf16_to_utf8		__ntapi_tt_array_convert_utf16_to_utf8;
dd89bb
dd89bb
/* nt_blitter.h */
dd89bb
ntapi_blt_alloc					__ntapi_blt_alloc;
dd89bb
ntapi_blt_free					__ntapi_blt_free;
dd89bb
ntapi_blt_acquire				__ntapi_blt_acquire;
dd89bb
ntapi_blt_obtain				__ntapi_blt_obtain;
dd89bb
ntapi_blt_possess				__ntapi_blt_possess;
dd89bb
ntapi_blt_release				__ntapi_blt_release;
dd89bb
ntapi_blt_get					__ntapi_blt_get;
dd89bb
ntapi_blt_set					__ntapi_blt_set;
dd89bb
dd89bb
/* nt_unicode.h */
dd89bb
ntapi_uc_validate_unicode_stream_utf8		__ntapi_uc_validate_unicode_stream_utf8;
dd89bb
ntapi_uc_validate_unicode_stream_utf16		__ntapi_uc_validate_unicode_stream_utf16;
dd89bb
ntapi_uc_get_code_point_byte_count_utf8		__ntapi_uc_get_code_point_byte_count_utf8;
dd89bb
ntapi_uc_get_code_point_byte_count_utf16	__ntapi_uc_get_code_point_byte_count_utf16;
dd89bb
ntapi_uc_convert_unicode_stream_utf8_to_utf16	__ntapi_uc_convert_unicode_stream_utf8_to_utf16;
dd89bb
ntapi_uc_convert_unicode_stream_utf8_to_utf32	__ntapi_uc_convert_unicode_stream_utf8_to_utf32;
dd89bb
ntapi_uc_convert_unicode_stream_utf16_to_utf8	__ntapi_uc_convert_unicode_stream_utf16_to_utf8;
dd89bb
ntapi_uc_convert_unicode_stream_utf16_to_utf32	__ntapi_uc_convert_unicode_stream_utf16_to_utf32;
dd89bb
dd89bb
dd89bb
/* nt_daemon.h */
dd89bb
ntapi_dsr_init					__ntapi_dsr_init;
dd89bb
ntapi_dsr_start					__ntapi_dsr_start;
dd89bb
ntapi_dsr_create_port				__ntapi_dsr_create_port;
dd89bb
ntapi_dsr_connect_internal_client		__ntapi_dsr_connect_internal_client;
dd89bb
ntapi_dsr_internal_client_connect		__ntapi_dsr_internal_client_connect;
dd89bb
dd89bb
/* nt_vfd.h */
dd89bb
ntapi_vfd_dev_name_init				__ntapi_vfd_dev_name_init;
dd89bb
dd89bb
/* nt_tty.h */
dd89bb
ntapi_tty_create_session			__ntapi_tty_create_session;
dd89bb
ntapi_tty_join_session				__ntapi_tty_join_session;
dd89bb
ntapi_tty_connect				__ntapi_tty_connect;
dd89bb
ntapi_tty_client_session_query			__ntapi_tty_client_session_query;
dd89bb
ntapi_tty_client_session_set			__ntapi_tty_client_session_set;
dd89bb
ntapi_tty_client_process_register		__ntapi_tty_client_process_register;
dd89bb
ntapi_tty_query_information_server		__ntapi_tty_query_information_server;
dd89bb
ntapi_tty_request_peer				__ntapi_tty_request_peer;
dd89bb
ntapi_tty_vms_query				__ntapi_tty_vms_query;
dd89bb
ntapi_tty_vms_request				__ntapi_tty_vms_request;
dd89bb
ntapi_pty_open					__ntapi_pty_open;
dd89bb
ntapi_pty_reopen				__ntapi_pty_reopen;
efc01e
ntapi_pty_inherit 				__ntapi_pty_inherit;
dd89bb
ntapi_pty_close					__ntapi_pty_close;
dd89bb
ntapi_pty_read					__ntapi_pty_read;
dd89bb
ntapi_pty_write					__ntapi_pty_write;
dd89bb
ntapi_pty_ioctl					__ntapi_pty_ioctl;
dd89bb
ntapi_pty_query					__ntapi_pty_query;
dd89bb
ntapi_pty_set					__ntapi_pty_set;
dd89bb
ntapi_pty_cancel				__ntapi_pty_cancel;
dd89bb
dd89bb
/* nt_socket.h */
dd89bb
ntapi_sc_socket					__ntapi_sc_socket_v1;
dd89bb
ntapi_sc_socket					__ntapi_sc_socket_v2;
dd89bb
ntapi_sc_bind					__ntapi_sc_bind_v1;
dd89bb
ntapi_sc_bind					__ntapi_sc_bind_v2;
dd89bb
ntapi_sc_connect				__ntapi_sc_connect_v1;
dd89bb
ntapi_sc_connect				__ntapi_sc_connect_v2;
dd89bb
ntapi_sc_getsockname				__ntapi_sc_getsockname_v1;
dd89bb
ntapi_sc_getsockname				__ntapi_sc_getsockname_v2;
dd89bb
ntapi_sc_server_accept_connection		__ntapi_sc_server_accept_connection_v1;
dd89bb
ntapi_sc_server_accept_connection		__ntapi_sc_server_accept_connection_v2;
dd89bb
ntapi_sc_server_duplicate_socket		__ntapi_sc_server_duplicate_socket;
dd89bb
ntapi_sc_listen					__ntapi_sc_listen;
dd89bb
ntapi_sc_accept					__ntapi_sc_accept;
dd89bb
ntapi_sc_send					__ntapi_sc_send;
dd89bb
ntapi_sc_recv					__ntapi_sc_recv;
dd89bb
ntapi_sc_shutdown				__ntapi_sc_shutdown;
dd89bb
ntapi_sc_wait					__ntapi_sc_wait;
dd89bb
dd89bb
/* nt_mount.h */
dd89bb
ntapi_tt_get_dos_drive_device_handle		__ntapi_tt_get_dos_drive_device_handle;
dd89bb
ntapi_tt_get_dos_drive_root_handle		__ntapi_tt_get_dos_drive_root_handle;
dd89bb
ntapi_tt_get_dos_drive_device_name		__ntapi_tt_get_dos_drive_device_name;
dd89bb
ntapi_tt_get_dos_drive_mount_points		__ntapi_tt_get_dos_drive_mount_points;
dd89bb
ntapi_tt_dev_mount_points_to_statfs		__ntapi_tt_dev_mount_points_to_statfs;
dd89bb
ntapi_tt_get_dos_drive_letter_from_device	__ntapi_tt_get_dos_drive_letter_from_device;
dd89bb
dd89bb
/* nt_istat.h */
dd89bb
ntapi_tt_istat					__ntapi_tt_istat;
dd89bb
ntapi_tt_validate_fs_handle			__ntapi_tt_validate_fs_handle;
dd89bb
dd89bb
/* nt_stat.h */
dd89bb
ntapi_tt_stat					__ntapi_tt_stat;
dd89bb
dd89bb
/* nt_statfs.h */
dd89bb
ntapi_tt_statfs					__ntapi_tt_statfs;
dd89bb
dd89bb
/* nt_vmount.h */
dd89bb
ntapi_vms_get_node_by_dev_name			__ntapi_vms_get_node_by_dev_name;
dd89bb
ntapi_vms_get_node_by_end_component		__ntapi_vms_get_node_by_end_component;
dd89bb
ntapi_vms_cache_alloc				__ntapi_vms_cache_alloc;
dd89bb
ntapi_vms_cache_free				__ntapi_vms_cache_free;
dd89bb
ntapi_vms_client_connect			__ntapi_vms_client_connect;
dd89bb
ntapi_vms_client_disconnect			__ntapi_vms_client_disconnect;
dd89bb
ntapi_vms_point_attach				__ntapi_vms_point_attach;
dd89bb
ntapi_vms_point_get_handles			__ntapi_vms_point_get_handles;
dd89bb
ntapi_vms_ref_count_inc				__ntapi_vms_ref_count_inc;
dd89bb
ntapi_vms_ref_count_dec				__ntapi_vms_ref_count_dec;
dd89bb
ntapi_vms_table_query				__ntapi_vms_table_query;
dd89bb
dd89bb
/* nt_hashes.h */
dd89bb
ntapi_tt_populate_hashed_import_table		__ntapi_tt_populate_hashed_import_table;
dd89bb
dd89bb
/* nt_guid.h */
dd89bb
ntapi_tt_guid_copy				__ntapi_tt_guid_copy;
dd89bb
ntapi_tt_guid_compare				__ntapi_tt_guid_compare;
dd89bb
ntapi_tt_guid_to_utf16_string			__ntapi_tt_guid_to_utf16_string;
dd89bb
ntapi_tt_utf16_string_to_guid			__ntapi_tt_utf16_string_to_guid;
dd89bb
dd89bb
/* debug */
dd89bb
ntapi_dbg_write					__dbg_write;
dd89bb
ntapi_dbg_fn_call				__dbg_fn_call;
dd89bb
ntapi_dbg_msg					__dbg_msg;
dd89bb
dd89bb
/* csrss */
dd89bb
ntapi_tt_get_csr_port_handle_addr_by_logic	__GET_CSR_PORT_HANDLE_BY_LOGIC;
dd89bb
ntapi_csr_port_handle				__ntapi_csr_port_handle;
dd89bb
dd89bb
#ifdef __cplusplus
dd89bb
}
dd89bb
#endif
dd89bb
#endif