Browsecodelocations

ulong Browsecodelocations(HWND hparent,wchar_t *title,BROWSECODEFUNC *bccallback,void *data);

typedef int BROWSECODEFUNC(int index,void *data,ulong *addr,wchar_t *s);

Opens or restores CPU window and displays list of code locations supplied by the callback function bccallback. When user changes selection, it is followed in the Disassembler pane of the CPU window. Returns address of the command selected by the user or 0 on error or when user pressed Cancel. In the last case, focus is returned back to the hparent.

bccallback is called sequentially with index=0, 1, 2... If there is the index-th record in the table, callback must write its address to addr, fill s with corresponding text and return 1. If there is no such record, it must return 0 indicating end of the list.

Browsecodelocations()


Parameters of Browsecodelocations():

hparent
(in) Handle of the parent window. If user presses Cancel or Esc, focus returns back to hparent
title
(in) UNICODE string, title of the dialog. If title is NULL or empty string, OllyDbg substitutes "Browse code locations" as a title
bccallback
(in) Callback function that fills the list of code locations to be browsed
data
(in) Pointer to additional data that is passed without verification to bccallback


Return values of Browsecodelocations():

If user selects some location, returns its address. If user presses Cancel or Esc, returns 0


Parameters of bccallback:

index
(in) Index of the location, 0 during the first call, 1 during the second and so on
data
(in) Pointer to additional data
addr
(out) Pointer to the variable of type unsigned long that receives address of the location in the memory space of the debugged application
s
(out) Pointer to the UNICODE buffer of length TEXTLEN that receives text describing location. This text will appear in the dialog


Return values of bccallback:

If there is an index-th record, it must return 1. If there is no such record, it must return 0 indicating end of the list


See also:
Dialogs