Package winappdbg :: Package win32 :: Module defines :: Class GuessStringType
[hide private]
[frames] | no frames]

Class GuessStringType

source code


Decorator that guesses the correct version (A or W) to call based on the types of the strings passed as parameters.

Calls the ANSI version if the only string types are ANSI.

Calls the Unicode version if Unicode or mixed string types are passed.

The default if no string arguments are passed depends on the value of the t_default class variable.

Nested Classes [hide private]
  t_ansi
str(object='') -> string
  t_unicode
unicode(object='') -> unicode object unicode(string[, encoding[, errors]]) -> unicode object
type t_default
Default string type to use.
Instance Methods [hide private]
 
__init__(self, fn_ansi, fn_unicode)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__call__(self, *argv, **argd) source code

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

Instance Variables [hide private]
function fn_ansi
ANSI version of the API function to call.
function fn_unicode
Unicode (wide) version of the API function to call.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fn_ansi, fn_unicode)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • fn_ansi (function) - ANSI version of the API function to call.
  • fn_unicode (function) - Unicode (wide) version of the API function to call.
Overrides: object.__init__