IDA C++ SDK 9.2
Loading...
Searching...
No Matches
idalib.hpp File Reference

Contains the IDA as library functions. More...

Go to the source code of this file.

Functions

idaman int ida_export init_library (int argc=0, char *argv[]=nullptr)
 Initialize ida as library.
idaman int ida_export open_database (const char *file_path, bool run_auto, const char *args=nullptr)
 Open the database specified in file_path argument If the database did not exist, a new database will be created and the input file will be loaded Note: All library functions must be called from the same thread that initialized the library The library is single-threaded, and performing database operations from a different thread than the initialization thread may lead to undefined behavior.
idaman void ida_export close_database (bool save)
 Close the current database.
idaman bool ida_export make_signatures (bool only_pat)
 Generate .sig and .pat files for the current database.
idaman void ida_export enable_console_messages (bool enable)
 Enable console messages.
idaman void ida_export set_screen_ea (ea_t ea)
 Set screen ea, let the user specify the current screen ea subsequent calls to get_screen_ea will return this value Please note that with idalib there is no screen, this is provided just for being able to use the get_screen_ea.
idaman bool ida_export get_library_version (int &major, int &minor, int &build)
 Get ida library version.

Detailed Description

Contains the IDA as library functions.

Function Documentation

◆ init_library()

idaman int ida_export init_library ( int argc = 0,
char * argv[] = nullptr )

Initialize ida as library.

Parameters
argcOptional parameters count for advanced usage
argvOptional parameters list for advanced usage
Returns
0 if successfully initialized, non zero in case of errors

◆ open_database()

idaman int ida_export open_database ( const char * file_path,
bool run_auto,
const char * args = nullptr )

Open the database specified in file_path argument If the database did not exist, a new database will be created and the input file will be loaded Note: All library functions must be called from the same thread that initialized the library The library is single-threaded, and performing database operations from a different thread than the initialization thread may lead to undefined behavior.

Parameters
file_paththe file name to be loaded
run_autoif set to true, library will run also auto analysis
argsoptional arguments, respecting IDA's command-line arguments format
Returns
0 if successfully opened, otherwise error code

◆ close_database()

idaman void ida_export close_database ( bool save)

Close the current database.

Parameters
saveboolean value, save or discard changes

◆ make_signatures()

idaman bool ida_export make_signatures ( bool only_pat)

Generate .sig and .pat files for the current database.

Parameters
only_patGenerate .pat file only
Returns
true in case of success

◆ enable_console_messages()

idaman void ida_export enable_console_messages ( bool enable)

Enable console messages.

Parameters
enableflag to activate or deactivate console messages by default, console messages are disabled

◆ set_screen_ea()

idaman void ida_export set_screen_ea ( ea_t ea)

Set screen ea, let the user specify the current screen ea subsequent calls to get_screen_ea will return this value Please note that with idalib there is no screen, this is provided just for being able to use the get_screen_ea.

Parameters
eascreen ea

◆ get_library_version()

idaman bool ida_export get_library_version ( int & major,
int & minor,
int & build )

Get ida library version.

Parameters
majormajor version
minorminor version
buildbuild number
Returns
true in case of success