Module idaapi :: Class Appcall_callable__
[frames] | no frames]

Class Appcall_callable__

object --+
         |
        Appcall_callable__


Helper class to issue appcalls using a natural syntax:
  appcall.FunctionNameInTheDatabase(arguments, ....)
or
  appcall["Function@8"](arguments, ...)
or
  f8 = appcall["Function@8"]
  f8(arg1, arg2, ...)
or
  o = appcall.obj()
  i = byref(5)
  appcall.funcname(arg1, i, "hello", o)

Instance Methods
 
__init__(self, ea, tp=None, fld=None)
Initializes an appcall with a given function ea
 
__call__(self, *args)
Make object callable.
 
size(self)
Returns the size of the type
 
type(self)
Returns the typestring
 
fields(self)
Returns the field names
 
retrieve(self, src=None, flags=0)
Unpacks a typed object from the database if an ea is given or from a string if a string was passed
 
store(self, obj, dest_ea=None, base_ea=0, flags=0)
Packs an object into a given ea if provided or into a string if no address was passed.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  timeout = property(__get_timeout, __set_timeout)
An Appcall instance can change its timeout value with this attribute
  options = property(__get_options, __set_options)
Sets the Appcall options locally to this Appcall instance
  ea = property(__get_ea, __set_ea)
Returns or sets the EA associated with this object
Properties

Inherited from object: __class__

Method Details

__init__(self, ea, tp=None, fld=None)
(Constructor)

 

Initializes an appcall with a given function ea

Overrides: object.__init__

__call__(self, *args)
(Call operator)

 

Make object callable. We redirect execution to idaapi.appcall()

retrieve(self, src=None, flags=0)

 

Unpacks a typed object from the database if an ea is given or from a string if a string was passed

Parameters:
  • src - the address of the object or a string
Returns:
Returns a tuple of boolean and object or error number (Bool, Error | Object).

store(self, obj, dest_ea=None, base_ea=0, flags=0)

 

Packs an object into a given ea if provided or into a string if no address was passed.

Parameters:
  • obj - The object to pack
  • dest_ea - If packing to idb this will be the store location
  • base_ea - If packing to a buffer, this will be the base that will be used to relocate the pointers
Returns:
  • If packing to a string then a Tuple(Boolean, packed_string or error code)
  • If packing to the database then a return code is returned (0 is success)