IDA SDK
Classes | Functions | Macros | Typedefs | Enumerations
loader.hpp File Reference

Detailed Description

Definitions of IDP, LDR, PLUGIN module interfaces.

This file also contains:

The LDR interface consists of one structure: loader_t
The IDP interface consists of one structure: processor_t
The PLUGIN interface consists of one structure: plugin_t

Modules can't use standard FILE* functions. They must use functions from <fpro.h>

Modules can't use standard memory allocation functions. They must use functions from <pro.h>

The exported entry #1 in the module should point to the the appropriate structure. (loader_t for LDR module, for example)

Classes

struct  loader_t
 Loader description block - must be exported from the loader module. More...
 
struct  load_info_t
 List of loaders. More...
 
struct  impinfo_t
 See importer_t. More...
 
class  plugin_t
 A plugin is a module in the plugins subdirectory that can perform an action asked by the user. More...
 
struct  idp_name_t
 Processor name. More...
 
struct  idp_desc_t
 Processor module description. More...
 
struct  plugin_info_t
 Structure to store Plugin information. More...
 
struct  dbg_info_t
 Information for the user interface about available debuggers. More...
 
class  snapshot_t
 Snapshot attributes. More...
 

Functions

idaman NORETURN void ida_export vloader_failure (const char *format, va_list va)
 See loader_failure()
 
NORETURN void loader_failure (const char *format=NULL,...)
 Display a message about a loader failure and stop the loading process. More...
 
idaman load_info_t *ida_export build_loaders_list (linput_t *li, const char *filename)
 Build list of potential loaders.
 
idaman void ida_export free_loaders_list (load_info_t *list)
 Free the list of loaders.
 
idaman char *ida_export get_loader_name_from_dll (char *dllname)
 Get name of loader from its DLL file (for example, for PE files we will get "PE"). More...
 
idaman ssize_t ida_export get_loader_name (char *buf, size_t bufsize)
 Get name of loader used to load the input file into the database. More...
 
idaman bool ida_export load_binary_file (const char *filename, linput_t *li, ushort _neflags, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes)
 Load a binary file into the database. More...
 
idaman bool ida_export load_nonbinary_file (const char *filename, linput_t *li, const char *sysdlldir, ushort _neflags, load_info_t *loader)
 Load a non-binary file into the database. More...
 
idaman int ida_export process_archive (qstring *temp_file, linput_t *li, qstring *module_name, ushort *neflags, const char *defmember, const load_info_t *loader, qstring *errbuf=NULL)
 Calls loader_t::process_archive() For parameters and return value description look at loader_t::process_archive(). More...
 
idaman int ida_export gen_file (ofile_type_t otype, FILE *fp, ea_t ea1, ea_t ea2, int flags)
 Generate an output file. More...
 
idaman int ida_export file2base (linput_t *li, qoff64_t pos, ea_t ea1, ea_t ea2, int patchable)
 Load portion of file into the database. More...
 
idaman int ida_export mem2base (const void *memptr, ea_t ea1, ea_t ea2, qoff64_t fpos)
 Load database from the memory. More...
 
idaman int ida_export base2file (FILE *fp, qoff64_t pos, ea_t ea1, ea_t ea2)
 Unload database to a binary file. More...
 
idaman bool ida_export extract_module_from_archive (char *filename, size_t bufsize, char **temp_file_ptr, bool is_remote)
 Extract a module for an archive file. More...
 
idaman void ida_export create_filename_cmt (void)
 Add long comment at idainfo::min_ea. More...
 
idaman filetype_t ida_export get_basic_file_type (linput_t *li)
 Get the input file type. More...
 
idaman size_t ida_export get_file_type_name (char *buf, size_t bufsize)
 Get name of the current file type. More...
 
idaman void ida_export import_module (const char *module, const char *windir, uval_t modnode, importer_t *importer, const char *ostype)
 Find and import a DLL module. More...
 
idaman int ida_export load_ids_module (char *fname)
 Load and apply IDS file. More...
 
 CASSERT (sizeof(plugin_t)==36)
 
idaman const char *ida_export get_plugin_options (const char *plugin)
 Get plugin options from the command line. More...
 
idaman const idp_descs_t *ida_export get_idp_descs (void)
 Get IDA processor modules descriptions.
 
idaman plugin_info_t *ida_export get_plugins (void)
 Get pointer to the list of plugins. More...
 
idaman plugin_t *ida_export find_plugin (const char *name, bool load_if_needed=false)
 Find a user-defined plugin and optionally load it. More...
 
plugin_tload_plugin (const char *name)
 
idaman bool ida_export run_plugin (const plugin_t *ptr, size_t arg)
 Run a loaded plugin with the specified argument. More...
 
bool idaapi load_and_run_plugin (const char *name, size_t arg)
 Load & run a plugin.
 
idaman bool ida_export invoke_plugin (plugin_info_t *ptr)
 Run a plugin as configured. More...
 
idaman size_t ida_export get_debugger_plugins (const dbg_info_t **array)
 Get information about available debuggers.
 
idaman void ida_export init_plugins (int flag)
 Initialize plugins with the specified flag.
 
idaman void ida_export term_plugins (int flag)
 Terminate plugins with the specified flag.
 
idaman qoff64_t ida_export get_fileregion_offset (ea_t ea)
 Get offset in the input file which corresponds to the given ea. More...
 
idaman ea_t ida_export get_fileregion_ea (qoff64_t offset)
 Get linear address which corresponds to the specified input file offset. More...
 
idaman int ida_export gen_exe_file (FILE *fp)
 Generate an exe file (unload the database in binary form). More...
 
idaman int ida_export reload_file (const char *file, bool is_remote)
 Reload the input file. More...
 
idaman bool ida_export build_snapshot_tree (snapshot_t *root)
 Build the snapshot tree. More...
 
idaman bool ida_export update_snapshot_attributes (const char *filename, const snapshot_t *root, const snapshot_t *attr, int uf)
 Update the snapshot attributes. More...
 
idaman int ida_export visit_snapshot_tree (snapshot_t *root, int(idaapi *callback)(snapshot_t *ss, void *ud), void *ud=NULL)
 Visit the snapshot tree. More...
 
idaman int ida_export flush_buffers (void)
 Flush buffers to the disk.
 
idaman bool ida_export is_trusted_idb (void)
 Is the database considered as trusted?
 
idaman bool ida_export save_database (const char *outfile, uint32 flags, const snapshot_t *root=NULL, const snapshot_t *attr=NULL)
 Save current database using a new file name. More...
 
idaman bool ida_export is_database_flag (uint32 dbfl)
 Get the current database flag. More...
 
idaman void ida_export set_database_flag (uint32 dbfl, bool cnd=true)
 Set or clear database flag. More...
 
void clr_database_flag (uint32 dbfl)
 
bool is_temp_database (void)
 Is a temporary database?
 
idaman const char *ida_export get_path (path_type_t pt)
 Get the file path. More...
 
idaman void ida_export set_path (path_type_t pt, const char *path)
 Set the file path. More...
 
idaman bool ida_export is_database_ext (const char *ext)
 Check the file extension. More...
 
Regions

Work with file regions (for patching)

void init_fileregions (void)
 
void term_fileregions (void)
 
void save_fileregions (void)
 
void add_fileregion (ea_t ea1, ea_t ea2, qoff64_t fpos)
 
void move_fileregions (ea_t from, ea_t to, asize_t size, bool changed_netmap)
 
void del_fileregions (ea_t ea1, ea_t ea2)
 

Lines

Callback functions to output lines:

#define gen_outline_t   html_line_cb_t
 
typedef int idaapi html_header_cb_t(FILE *fp)
 
typedef int idaapi html_footer_cb_t(FILE *fp)
 
typedef int idaapi html_line_cb_t(FILE *fp, const qstring &line, bgcolor_t prefix_color, bgcolor_t bg_color)
 

Macros

#define LDRF_RELOAD   0x0001
 loader recognizes NEF_RELOAD flag
 
#define LDRF_REQ_PROC   0x0002
 Requires a processor to be set. More...
 
#define ACCEPT_ARCHIVE   0x2000
 Specify that a file format is served by archive loader See loader_t::accept_file.
 
#define ACCEPT_CONTINUE   0x4000
 Specify that the function must be called another time See loader_t::accept_file.
 
#define ACCEPT_FIRST   0x8000
 Specify that a file format should be place first in "load file" dialog box. More...
 
#define NEF_SEGS   0x0001
 Create segments.
 
#define NEF_RSCS   0x0002
 Load resources.
 
#define NEF_NAME   0x0004
 Rename entries.
 
#define NEF_MAN   0x0008
 Manual load.
 
#define NEF_FILL   0x0010
 Fill segment gaps.
 
#define NEF_IMPS   0x0020
 Create import segment.
 
#define NEF_FIRST   0x0080
 This is the first file loaded. More...
 
#define NEF_CODE   0x0100
 for load_binary_file(): More...
 
#define NEF_RELOAD   0x0200
 reload the file at the same place: More...
 
#define NEF_FLAT   0x0400
 Autocreate FLAT group (PE)
 
#define NEF_MINI   0x0800
 Create mini database (do not copy. More...
 
#define NEF_LOPT   0x1000
 Display additional loader options dialog.
 
#define NEF_LALL   0x2000
 Load all segments without questions.
 
#define LOADER_EXT   "ldw"
 Loader module filename extension.
 
#define LOADER_DLL   "*." LOADER_EXT
 Pattern to find loader files.
 
#define LIF_ARCHLDR   0x0001
 archive loader
 
#define GENFLG_MAPSEG   0x0001
 OFILE_MAP: generate map of segments
 
#define GENFLG_MAPNAME   0x0002
 OFILE_MAP: include dummy names
 
#define GENFLG_MAPDMNG   0x0004
 OFILE_MAP: demangle names
 
#define GENFLG_MAPLOC   0x0008
 OFILE_MAP: include local names
 
#define GENFLG_IDCTYPE   0x0008
 OFILE_IDC: gen only information about types
 
#define GENFLG_ASMTYPE   0x0010
 OFILE_ASM,OFILE_LST: gen information about types too
 
#define GENFLG_GENHTML   0x0020
 OFILE_ASM,OFILE_LST: generate html (ui_genfile_callback will be used)
 
#define GENFLG_ASMINC   0x0040
 OFILE_ASM,OFILE_LST: gen information only about types
 
#define FILEREG_PATCHABLE   1
 means that the input file may be More...
 
#define FILEREG_NOTPATCHABLE   0
 the data is kept in some encoded More...
 
#define PLUGIN_MOD   0x0001
 Plugin changes the database. More...
 
#define PLUGIN_DRAW   0x0002
 IDA should redraw everything after calling the plugin.
 
#define PLUGIN_SEG   0x0004
 Plugin may be applied only if the current address belongs to a segment.
 
#define PLUGIN_UNL   0x0008
 Unload the plugin immediately after calling 'run'. More...
 
#define PLUGIN_HIDE   0x0010
 Plugin should not appear in the Edit, Plugins menu. More...
 
#define PLUGIN_DBG   0x0020
 A debugger plugin. More...
 
#define PLUGIN_PROC   0x0040
 Load plugin when a processor module is loaded. More...
 
#define PLUGIN_FIX   0x0080
 Load plugin when IDA starts and keep it in the memory until IDA stops.
 
#define PLUGIN_SCRIPTED   0x8000
 Scripted plugin. More...
 
#define PLUGIN_SKIP   0
 Plugin doesn't want to be loaded.
 
#define PLUGIN_OK   1
 Plugin agrees to work with the current database. More...
 
#define PLUGIN_KEEP   2
 Plugin agrees to work with the current database and wants to stay in the memory.
 
#define PLUGIN_EXT   "plw"
 PLUGIN module file name extensions.
 
#define PLUGIN_DLL   "*." PLUGIN_EXT
 Pattern to find plugin files.
 
#define IDP_EXT   "w32"
 IDP module file name extension.
 
#define IDP_DLL   "*." IDP_EXT
 Pattern to find idp files.
 
#define MAX_DATABASE_DESCRIPTION   128
 Maximum database snapshot description length.
 
#define SSF_AUTOMATIC   0x0001
 automatic snapshot
 
#define SSUF_DESC   0x00000001
 Update the description.
 
#define SSUF_PATH   0x00000002
 Update the path.
 
#define SSUF_FLAGS   0x00000004
 Update the flags.
 
#define DBFL_KILL   0x01
 delete unpacked database
 
#define DBFL_COMP   0x02
 collect garbage
 
#define DBFL_BAK   0x04
 create backup file (if !DBFL_KILL)
 
#define DBFL_TEMP   0x08
 temporary database
 

Typedefs

typedef int idaapi importer_t(linput_t *li, impinfo_t *ii)
 Callback for checking dll module - passed to import_module(). More...
 
typedef qvector< idp_name_tidp_names_t
 vector of processor names
 
typedef qvector< idp_desc_tidp_descs_t
 vector of processor module descriptions
 
typedef qvector< snapshot_t * > snapshots_t
 vector of database snapshots
 

Enumerations

enum  ofile_type_t {
  OFILE_MAP = 0, OFILE_EXE = 1, OFILE_IDC = 2, OFILE_LST = 3,
  OFILE_ASM = 4, OFILE_DIF = 5
}
 Output file types. More...
 
enum  path_type_t { PATH_TYPE_CMD, PATH_TYPE_IDB, PATH_TYPE_ID0 }
 

Macro Definition Documentation

#define ACCEPT_FIRST   0x8000

Specify that a file format should be place first in "load file" dialog box.

See loader_t::accept_file

#define FILEREG_PATCHABLE   1

means that the input file may be

patched (i.e. no compression, no iterated data, etc)

#define FILEREG_NOTPATCHABLE   0

the data is kept in some encoded

form in the file.

Typedef Documentation

typedef int idaapi importer_t(linput_t *li, impinfo_t *ii)

Callback for checking dll module - passed to import_module().

Parameters
lipointer to input file
iiimport info. If the function finds that ii.dllname does not match the module name passed to import_module(), it returns 0.
Otherwise it calls ii.func for each exported entry.
If ii.dllname==NULL then ii.func will be called with num==0 and name==dllname.
Return values
0dllname doesn't match, import_module() should continue
1ok

Enumeration Type Documentation

Output file types.

Enumerator
OFILE_MAP 

MAP file.

OFILE_EXE 

Executable file.

OFILE_IDC 

IDC file.

OFILE_LST 

Disassembly listing.

OFILE_ASM 

Assembly.

OFILE_DIF 

Difference.

Function Documentation

NORETURN void loader_failure ( const char *  format = NULL,
  ... 
)
inline

Display a message about a loader failure and stop the loading process.

The kernel will destroy the database. If format == NULL, no message will be displayed This function does not return (it longjumps)! It may be called only from loader_t::load_file

idaman char* ida_export get_loader_name_from_dll ( char *  dllname)

Get name of loader from its DLL file (for example, for PE files we will get "PE").

This function modifies the original string and returns a pointer into it. NB: if the file extension is a registered extlang extension (e.g. py or idc) the extension is retained

idaman ssize_t ida_export get_loader_name ( char *  buf,
size_t  bufsize 
)

Get name of loader used to load the input file into the database.

If no external loader was used, returns -1. Otherwise copies the loader file name without the extension in the buf and returns its length (for example, for PE files we will get "PE"). For scripted loaders, the file extension is retained.

idaman bool ida_export load_binary_file ( const char *  filename,
linput_t *  li,
ushort  _neflags,
qoff64_t  fileoff,
ea_t  basepara,
ea_t  binoff,
uint64  nbytes 
)

Load a binary file into the database.

This function usually is called from ui.

Parameters
filenamethe name of input file as is (if the input file is from library, then this is the name from the library)
liloader input source
_neflagsLoad file flags. For the first file, the flag NEF_FIRST must be set.
fileoffOffset in the input file
baseparaLoad address in paragraphs
binoffLoad offset (load_address=(basepara<<4)+binoff)
nbytesNumber of bytes to load from the file.
  • 0: up to the end of the file

If nbytes is bigger than the number of bytes rest, the kernel will load as much as possible

Return values
trueok
falsefailed (couldn't open the file)
idaman bool ida_export load_nonbinary_file ( const char *  filename,
linput_t *  li,
const char *  sysdlldir,
ushort  _neflags,
load_info_t loader 
)

Load a non-binary file into the database.

This function usually is called from ui.

Parameters
filenamethe name of input file as is (if the input file is from library, then this is the name from the library)
liloader input source
sysdlldira directory with system dlls. Pass "." if unknown.
_neflagsLoad file flags. For the first file the flag NEF_FIRST must be set.
loaderpointer to load_info_t structure. If the current IDP module has processor_t::loader != NULL then this argument is ignored.
Returns
success
idaman int ida_export process_archive ( qstring temp_file,
linput_t *  li,
qstring module_name,
ushort neflags,
const char *  defmember,
const load_info_t loader,
qstring errbuf = NULL 
)

Calls loader_t::process_archive() For parameters and return value description look at loader_t::process_archive().

Additional parameter:

Parameters
loaderpointer to load_info_t structure.
idaman int ida_export gen_file ( ofile_type_t  otype,
FILE *  fp,
ea_t  ea1,
ea_t  ea2,
int  flags 
)

Generate an output file.

Parameters
otypetype of output file.
fpthe output file handle
ea1start address. For some file types this argument is ignored
ea2end address. For some file types this argument is ignored as usual in ida, the end address of the range is not included
flagsGenerate file flags

For OFILE_EXE:

Return values
0can't generate exe file
1ok

For other file types:

Returns
number of the generated lines. -1 if an error occurred
idaman int ida_export file2base ( linput_t *  li,
qoff64_t  pos,
ea_t  ea1,
ea_t  ea2,
int  patchable 
)

Load portion of file into the database.

This function will include (ea1..ea2) into the addressing space of the program (make it enabled)

Parameters
lipointer of input source
posposition in the file
ea1,ea2range of destination linear addresses
patchableshould the kernel remember correspondence of file offsets to linear addresses.
Return values
1ok
0read error, a warning is displayed
idaman int ida_export mem2base ( const void *  memptr,
ea_t  ea1,
ea_t  ea2,
qoff64_t  fpos 
)

Load database from the memory.

This function works for wide byte processors too.

Parameters
memptrpointer to buffer with bytes
ea1,ea2range of destination linear addresses
fposposition in the input file the data is taken from. if == -1, then no file position correspond to the data.
Returns
1 always
idaman int ida_export base2file ( FILE *  fp,
qoff64_t  pos,
ea_t  ea1,
ea_t  ea2 
)

Unload database to a binary file.

This function works for wide byte processors too.

Parameters
fppointer to file
posposition in the file
ea1,ea2range of source linear addresses
Returns
1-ok(always), write error leads to immediate exit
idaman bool ida_export extract_module_from_archive ( char *  filename,
size_t  bufsize,
char **  temp_file_ptr,
bool  is_remote 
)

Extract a module for an archive file.

Parse an archive file, show the list of modules to the user, allow him to select a module, extract the selected module to a file (if the extract module is an archive, repeat the process). This function can handle ZIP, AR, AIXAR, OMFLIB files. The temporary file will be automatically deleted by IDA at the end.

Parameters
[in,out]filenamein: input file. out: name of the selected module.
bufsizesize of the buffer with 'filename'
[out]temp_file_ptrwill point to the name of the file that contains the extracted module
is_remoteis the input file remote?
Return values
trueok
falsesomething bad happened (error message has been displayed to the user)
idaman void ida_export create_filename_cmt ( void  )

Add long comment at idainfo::min_ea.

  • Input file: ....
  • File format: ....

This function should be called only from the loader to describe the input file.

idaman filetype_t ida_export get_basic_file_type ( linput_t *  li)

Get the input file type.

This function can recognize libraries and zip files.

idaman size_t ida_export get_file_type_name ( char *  buf,
size_t  bufsize 
)

Get name of the current file type.

The current file type is kept in idainfo::filetype.

Parameters
bufbuffer for the file type name
bufsizeits size
Returns
size of answer, this function always succeeds
idaman void ida_export import_module ( const char *  module,
const char *  windir,
uval_t  modnode,
importer_t importer,
const char *  ostype 
)

Find and import a DLL module.

This function adds information to the database (renames functions, etc).

Parameters
modulename of DLL
windirsystem directory with dlls
modnodenode with information about imported entries. either altval or supval arrays may be absent. the node should never be deleted.
  • imports by ordinals: altval(ord) contains linear address
  • imports by name: supval(ea) contains the imported name
importercallback function (may be NULL) to check dll module
ostypetype of operating system (subdir name). NULL means the IDS directory itself (not recommended)
idaman int ida_export load_ids_module ( char *  fname)

Load and apply IDS file.

This function loads the specified IDS file and applies it to the database. If the program imports functions from a module with the same name as the name of the ids file being loaded, then only functions from this module will be affected. Otherwise (i.e. when the program does not import a module with this name) any function in the program may be affected.

Parameters
fnamename of file to apply
Return values
1ok
0some error (a message is displayed). if the ids file does not exist, no message is displayed
idaman const char* ida_export get_plugin_options ( const char *  plugin)

Get plugin options from the command line.

If the user has specified the options in the -Oplugin_name:options format, them this function will return the 'options' part of it The 'plugin' parameter should denote the plugin name Returns NULL if there we no options specified

idaman plugin_info_t* ida_export get_plugins ( void  )

Get pointer to the list of plugins.

(some plugins might be listed several times in the list - once for each configured argument)

idaman plugin_t* ida_export find_plugin ( const char *  name,
bool  load_if_needed = false 
)

Find a user-defined plugin and optionally load it.

Parameters
nameshort plugin name without path and extension, or absolute path to the file name
load_if_neededif the plugin is not present in the memory, try to load it
Returns
pointer to plugin description block
idaman bool ida_export run_plugin ( const plugin_t ptr,
size_t  arg 
)

Run a loaded plugin with the specified argument.

Parameters
ptrpointer to plugin description block
argargument to run with
idaman bool ida_export invoke_plugin ( plugin_info_t ptr)

Run a plugin as configured.

Parameters
ptrpointer to plugin information block
idaman qoff64_t ida_export get_fileregion_offset ( ea_t  ea)

Get offset in the input file which corresponds to the given ea.

If the specified ea can't be mapped into the input file offset, return -1.

idaman ea_t ida_export get_fileregion_ea ( qoff64_t  offset)

Get linear address which corresponds to the specified input file offset.

If can't be found, return BADADDR

idaman int ida_export gen_exe_file ( FILE *  fp)

Generate an exe file (unload the database in binary form).

Returns
fp the output file handle. if fp == NULL then return:
  • 1: can generate an executable file
  • 0: can't generate an executable file
Return values
1ok
0failed
idaman int ida_export reload_file ( const char *  file,
bool  is_remote 
)

Reload the input file.

This function reloads the byte values from the input file. It doesn't modify the segmentation, names, comments, etc.

Parameters
filename of the input file. if file == NULL then returns:
  • 1: can reload the input file
  • 0: can't reload the input file
is_remoteis the file located on a remote computer with the debugger server?
Return values
1ok
0failed
idaman bool ida_export build_snapshot_tree ( snapshot_t root)

Build the snapshot tree.

Parameters
rootsnapshot root that will contain the snapshot tree elements.
Returns
success
idaman bool ida_export update_snapshot_attributes ( const char *  filename,
const snapshot_t root,
const snapshot_t attr,
int  uf 
)

Update the snapshot attributes.

Note
only the snapshot description can be updated.
Parameters
filenamesnapshot file name or NULL for the current database
rootsnapshot root (returned from build_snapshot_tree())
attrsnapshot instance containing the updated attributes
ufSnapshot update flags
Returns
success
idaman int ida_export visit_snapshot_tree ( snapshot_t root,
int(idaapi *)(snapshot_t *ss, void *ud)  callback,
void *  ud = NULL 
)

Visit the snapshot tree.

Parameters
rootsnapshot root to start the enumeration from
callbackcallback called for each child. return 0 to continue enumeration and non-zero to abort enumeration
uduser data. will be passed back to the callback
Returns
true-ok, false-failed
idaman bool ida_export save_database ( const char *  outfile,
uint32  flags,
const snapshot_t root = NULL,
const snapshot_t attr = NULL 
)

Save current database using a new file name.

Parameters
outfileoutput database file name
flagsDatabase flags
rootoptional: snapshot tree root.
attroptional: snapshot attributes
Note
when both root and attr are not NULL then the snapshot attributes will be updated, otherwise the snapshot attributes will be inherited from the current database.
Returns
success
idaman bool ida_export is_database_flag ( uint32  dbfl)

Get the current database flag.

Parameters
dbflflag Database flags
Returns
the state of the flag (set or cleared)
idaman void ida_export set_database_flag ( uint32  dbfl,
bool  cnd = true 
)

Set or clear database flag.

Parameters
dbflflag Database flags
cndset if true or clear flag otherwise
idaman const char* ida_export get_path ( path_type_t  pt)

Get the file path.

Parameters
ptfile path type Types of the file pathes
Returns
file path, never returns NULL
idaman void ida_export set_path ( path_type_t  pt,
const char *  path 
)

Set the file path.

Parameters
ptfile path type Types of the file pathes
pathnew file path, use NULL or empty string to clear the file path
idaman bool ida_export is_database_ext ( const char *  ext)

Check the file extension.

Returns
true if it is the reserved extension