Problem with SHBrowseForFolder-TBROWSEINFO-TFNBFFCallBack

Hi,

I have some code that executes the API function SHBrowseForFolder. I
have created a structure (which I call bi) of type TBrowseInfo, i e

var
  bi : TBrowseInfo;

Before I call SHBrowseForFolder, I specify the parameters of bi, i e

with bi do begin
  ...
end;

But, when I want to assign my callback function to the lpfn variable,
Delphi says 'Incompatible types, calling conventions differ'. My code is
like this:

  TBrowseForFolder = class(TComponent)
  private
    ...
  public
    function BrowseProc( hwnd : HWnd; uMsg : UInt; lParam, lpData :
LParam ) : Integer;
    ...
  end;
...
function BrowseProc;   <------ This is my callback function
begin
  ...
end;
...
function Execute;
var
  bi : TBrowseInfo;
begin
  with bi do begin
    ...
    lpfn := BrowseProc;          <------ The compiler doesn't like this
    ...
  end;
end;

I have also tried do declare a variable of type TFNBFFCallBack, in order
to indirectly assign my procedure to the lpfn variable, but with the
same result. What am I doing wrong? Has my problem something to do with
the calling convention directives stdcall, safecall etc?

I use Delphi 3, build 5.53.

Please send your answer to me directly as well to the group.

Thanks in advance,
Per J?nsson