Gettext, Gettextxy

OllyDbg Plugin API

Gettext, Gettextxy

Display dialog box allowing user to enter or edit ASCII text string. This dialog contains combobox with several last entered strings of specified type. For some predefined string types, these strings are saved to the .udd file. Return length of entered string or -1 on error or when user cancelled input. Function Gettextxy additionally contains the preferred screen coordinates of the bottom left point of the dialog window.

int Gettext(char *title,char *text,char letter,int type,int fontindex);

int Gettextxy(char *title,char *text,char letter,int type,int fontindex,int x,int y);

Parameters:

title - title of dialog box;

text - pointer to buffer at least TEXTLEN bytes long that receives entered string;

letter - first character to be entered in edit control, or 0 if there is no character. Useful if function is called as a reaction on a key pressed by user;

type - type of saved strings (0..255). Some string types (NM_xxx or NM_xxx|NMHISTORY) are predefined. In general, it is safe to use types in range 192..254, of course, if they are not used by other plugins. Contact me if you need unique type that is automatically saved to .udd file;

fontindex - index of OllyDbg font used in edit control and combobox. Use either FIXEDFONT or, if Plugingetvalue(VAL_WINDOWFONT) returns non-zero, index of font used in parent window;

x - absolute X screen coordinate, in pixels, of the bottom left corner of the dialog window. If necessary, dialog will automatically adjust its position so that it remains visible;

y - absolute Y screen coordinate, in pixels, of the bottom left corner of the dialog window.

See also: Plugingetvalue, Gethexstring, Browsefilename, Gettableselectionxy