Decodethreadname

OllyDbg Plugin API

Decodethreadname

Decodes name of thread with specified thread identifier to ASCII string, like "Main thread" or "thread 12345678". Returns length of name or 0 on error.

int Decodethreadname(char *s,ulong threadid,int mode);

Parameters:

s - pointer to buffer of length at least TEXTLEN bytes that receives decoded name;

threadid - thread identifier;

mode - combination of bits ADC_xxx that tell how to decode name of thread:

ADC_VALID decode name of thread only if threadid is a valid thread identifier
ADC_SYMBOL decode name of thread only if it has symbolic name
ADC_UPPERCASE force first character of name to be in uppercase
ADC_WIDEFORM include word "thread" into decoded name