Type of callback function that controls appearance and functioning of OllyDbg menus and shortcuts.
typedef int MENUFUNC(struct t_table *ptable,wchar_t *name,ulong index,int mode);
(in) Pointer to the structure of type t_table, descriptor of the table which displays menu. ptable is NULL if menu item belongs to the main OllyDbg menu
(in, out) Pointer to the UNICODE string TEXTLEN wide characters long. When menu function is called called with mode=MENU_VERIFY, it contains text of the menu item stripped from the control characters. Menu function may change this text. When mode is MENU_EXECUTE, name is undefined and should not be usedindex
(in) The same as index in the processed t_menu descriptor, allows to use the same menu function with several different (but similar) menu itemsmode
(in) One of the following constants:
MENU_VERIFY - menu creation. Menu function should decide whether menu item applies and set its name and appearance
MENU_EXECUTE - menu item was selected. Menu function should make necessary actions
When called with mode=MENU_VERIFY, menu function should return one of the following codes:
MENU_ABSENT - menu item does not apply and will not appear the menuWhen called with mode=MENU_EXECUTE, it should return one of the following codes:
MENU_NORMAL - menu item appears in the menu
MENU_CHECKED - menu item appears in the menu and has attached checkmark
- menu item appears in the menu and has attached checkmark.
Additionally, OllyDbg attaches checkmark to the parent item in
the menu on the previous level. This feature will not work in the
- menu item is a pure shortcut. It does not appear in the menu but is
active and participates in the search for keyboard shortcuts
- item is present in the menu but is disabled. This style is not
compatible with OllyDbg's look-and-feel, use it only if absolutely
necessary due to the menu logic.
MENU_REDRAW - menu action has global impact, all OllyDbg windows must be updated. OllyDbg broadcasts WM_USER_CHGALL
MENU_NOREDRAW - no redrawing is necessary