passing a function parameter to a C dll

Anybody have any ideas on how to pass a function as a parameter to
another function within a C dll? Here's the C call:

int     mydllfunc(char FAR *fname,
        int (FAR PASCAL *handler)
        char FAR *filename));

Here's how it works. You pass a filename (fname) to the dll function. Each
time it searches and returns a non-null, it returns true and invokes the
handler, which, in turn is passed the the same *filename for further
processing.When the search for fname returns a null the function is
exited.

This didn't work (and forgive any syntax errors this is from memory)

{compiler set to force far calls}
Type
        ahandler = function(myfilename : pchar) : integer;      

var    
        myhandler : ahandler;  

function mydllfunc(fname : pchar; myhandler : ahandler) : integer;
        external 'mydll';      
Any help/code examples would be appreciated.