summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 19:34:57 -0500
committermidipix <writeonce@midipix.org>2016-11-19 19:34:57 -0500
commit81c1d44b421a7e39028aa9a69b4748d866a4e2d9 (patch)
tree4f4318e4a7857d1c85af891a31e63dca1a4c171c
parentf5f643aa0e1625a85f67b594cbc72c976dada95f (diff)
downloadpemagine-81c1d44b421a7e39028aa9a69b4748d866a4e2d9.tar.bz2
pemagine-81c1d44b421a7e39028aa9a69b4748d866a4e2d9.tar.xz
pemagine.h: code maintenance.
-rw-r--r--include/pemagine/pemagine.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/pemagine/pemagine.h b/include/pemagine/pemagine.h
index 4c1fcf4..67159d0 100644
--- a/include/pemagine/pemagine.h
+++ b/include/pemagine/pemagine.h
@@ -151,7 +151,7 @@ typedef int pe_enum_image_import_hdrs_callback(
enum pe_callback_reason reason,
void * context);
-/* library functions */
+/* image: low-level api */
pe_api struct pe_raw_image_dos_hdr * pe_get_image_dos_hdr_addr (const void * base);
pe_api struct pe_raw_coff_file_hdr * pe_get_image_coff_hdr_addr (const void * base);
pe_api union pe_raw_opt_hdr * pe_get_image_opt_hdr_addr (const void * base);
@@ -160,10 +160,15 @@ pe_api struct pe_raw_sec_hdr * pe_get_image_section_tbl_addr (const void * base
pe_api struct pe_raw_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name);
pe_api struct pe_raw_export_hdr * pe_get_image_export_hdr_addr (const void * base, uint32_t * sec_size);
pe_api struct pe_raw_import_hdr * pe_get_image_import_dir_addr (const void * base, uint32_t * sec_size);
-pe_api void * pe_get_image_special_hdr_addr (const void * base, uint32_t ordinal, uint32_t * sec_size);
+
+/* image: high-level api */
pe_api void * pe_get_image_entry_point_addr (const void * base);
+pe_api void * pe_get_image_special_hdr_addr (const void * base, uint32_t ordinal, uint32_t * sec_size);
pe_api int pe_get_image_stack_heap_info (const void * base, struct pe_stack_heap_info *);
+/* image: exports api */
+pe_api char * pe_get_symbol_name (const void * base, const void * sym_addr);
+pe_api struct pe_ldr_tbl_entry * pe_get_symbol_module_info (const void * sym_addr);
pe_api void * pe_get_procedure_address (const void * base, const char * name);
pe_api int pe_get_export_symbol_info (const void * base, const char * name, struct pe_export_sym *);
pe_api int pe_enum_image_exports (const void * base,
@@ -171,20 +176,22 @@ pe_api int pe_enum_image_exports (const void * base,
struct pe_export_sym *,
void * ctx);
+/* image: imports api */
+pe_api char * pe_get_import_symbol_info (const void * sym_addr,
+ struct pe_ldr_tbl_entry ** ldr_tbl_entry);
+
pe_api int pe_enum_image_import_hdrs (const void * base,
pe_enum_image_import_hdrs_callback *,
void * ctx);
-pe_api char * pe_get_symbol_name (const void * base, const void * sym_addr);
-pe_api struct pe_ldr_tbl_entry * pe_get_symbol_module_info (const void * sym_addr);
-pe_api char * pe_get_import_symbol_info (const void * sym_addr,
- struct pe_ldr_tbl_entry ** ldr_tbl_entry);
-
+/* process: address space api */
pe_api int pe_enum_modules_in_load_order (pe_enum_modules_callback *, void * ctx);
pe_api int pe_enum_modules_in_memory_order (pe_enum_modules_callback *, void * ctx);
pe_api int pe_enum_modules_in_init_order (pe_enum_modules_callback *, void * ctx);
pe_api void * pe_get_module_handle (const wchar16_t * name);
pe_api void * pe_get_first_module_handle (void);
+
+/* process: system api */
pe_api void * pe_get_ntdll_module_handle (void);
pe_api void * pe_get_kernel32_module_handle (void);