Browsefilename

OllyDbg Plugin API

Browsefilename

Opens dialog box allowing user to select file name and additional file-related options, according to specified mode. In modes 0, 1 and 2 returns TRUE if valid file was selected and FALSE in any other case.

int Browsefilename(char *title,char *name,char *defext,int mode);

Parameters:

title - title of dialog box;

name - pointer to buffer containing initial file name, at least MAXPATH bytes long. On exit, contains name of file selected by user;

defext - pointer to string containing set of one or several default extentions. First extention must start with point ('.'). To specify several extentions, separate them with vertical line ('|'). To specify several extentions as a single selection, separate them with ";*" (like ".exe;*.dll"). Browsefilename knows several types of extentions and their combinations and automatically comments them;

mode - mode of operation. Modes 3 to 8 are not intended for use in plugins and are not described here:

0 standard dialog without additional elements
1 dialog with combobox "Arguments"
2 dialog with checkbox "Append to existing file"

New in version 1.10: if mode is ORed with 0x80, Browsefilename opens Save File dialog instead of Open File.