Display dialog box allowing user to enter or edit masked ASCII, UNICODE or hexadecimal string. Return 0 on success and -1 on error or when user cancelled input. Function Gethextsringxy additionally contains the preferred screen coordinates of the bottom left point of the dialog window.
int Gethexstring(char *title,t_hexstr *hs,int mode,int fontindex,char letter);
int Gethexstringxy(char *title,t_hexstr *hs,int mode,int fontindex,char letter,int x,int y);
Parameters:
title - title of dialog box;
hs - pointer to string descriptor that contains initial data to be displayed in the dialog and on exit contains masked string entered by user;
mode - combination of DIA_xxx bits specifying additional options. Options DIA_DEFHEX, DIA_DEFASCII and DIA_DEFUNICODE are mutually exclusive:
DIA_ASKGLOBAL | if this bit is cleared, dialog contains "Keep size" checkbox; if bit is set, dialog contains checkboxes "Entire block" that controls global search flag and "Case sensitive" that controls case ignoring flag. Actual state of these three flags is returned by calls to Plugingetvalue(VAL_KEEPSELSIZE), Plugingetvalue(VAL_GLOBALSEARCH) and Plugingetvalue(VAL_IGNORECASE) |
DIA_DEFHEX | default data type is hexadecimal |
DIA_DEFASCII | default data type is ASCII |
DIA_DEFUNICODE | default data type is UNICODE |
fontindex - index of OllyDbg font used in edit controls and comboboxes. Use either FIXEDFONT or, if Plugingetvalue(VAL_WINDOWFONT) returns non-zero, index of font used in parent window;
letter - first character to be entered in active edit control, or 0 if there is no character. Useful if function is called as a reaction on a key pressed by user;
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, Gettext, Browsefilename, t_hexstr, Gettableselectionxy