Labeladdress

int Labeladdress(wchar_t *text,ulong addr,ulong reladdr,int relreg,int index,uchar *mask,int *select,ulong mode);

Converts address to UNICODE text and sets drawing attributes.
Usually it is called from the drawing function of table window.
Note that zero address is decoded as empty field, unless you set ADDR_SHOWNULL. If standard settings are sufficient, plugins may use Simpleaddress() instead of Labeladdress().


Parameters:

text
(out) Unicode string, at least TEXTLEN wide characters long, that receives the text
addr
(in) Address of the memory in the context of debugged application
reladdr
(in) If zero, displayed address is absolute, otherwise it is relative to reladdr (i.e. decoded as base±(signed)(addr-reladdr). The appearance of base depends on relreg
relreg
(in) Tells how to display the base of relative addresses. If relreg is a valid register index (REG_EAX .. REG_EDI), base is the name of the register. Otherwise (for example, when relreg is REG_UNDEF), base is decoded as a dollar sign ('$')
index
(in) If index is larger than 0, decoded address is preceded with the index in rectangular brackets.
mask
(out) Byte string, at least TEXTLEN bytes long, that receives per-character drawing attributes (a combination of DRAW_xxx flags), or NULL if drawing attributes are not necessary
select
(out) Pointer to the variable that receives per-line drawing attributes (a combination of extended DRAW_xxx flags), or NULL if drawing attributes are not necessary
mode
(in) Drawing mode, one of the following flags:
ADDR_HEXSYM - hexadecimal address followed by symbolic name, if available
ADDR_SYMHEX - symbolic name, if available, followed by the hexadecimal address
ADDR_SINGLEsymbolic name, or hexadecimal address if name is not available
ADDR_HEXONLY - only hexadecimal address
Additionally, a combination of zero or more of the following flags can be used to refine the decoding:
ADDR_MODNAME - if addr belongs to some module and symbolic name is available, precede address with module name
ADDR_FORCEMODalways add module name if addr belongs to some module (only in ADDR_SINGLE mode)
ADDR_GRAYHEX - gray hexadecimal address (use DRAW_GRAY style)
ADDR_HILSYM - highlight symbolic name (use DRAW_HILITE style)
ADDR_NODEFMEP - don't show default name of module entry point ("<ModuleEntryPoint>")
ADDR_BREAK - mark address as an unconditional breakpoint (use DRAW_BREAK style)
ADDR_CONDBRK - mark address as a conditional breakpoint (use DRAW_COND style)
ADDR_DISBRK mark address as a disabled breakpoint (use DRAW_DISBRK style)
ADDR_EIP - mark address as a location of the actual EIP (use DRAW_EIP style)
ADDR_CHECKEIP - if addr is the same as the EIP of the thread selected in the CPU window, mark address as a location of the actual EIP
ADDR_SHOWNULL - decode address 0


Return values:

Returns length of produced string in wide characters. On error, returns 0


See also:
Tables, Simpleaddress()