function TForm1.QueryAddr(Proc: TNotifyEvent): DWord;
begin
Result := Integer(@Proc);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
a: Integer;
begin
ShowMessage(IntToHex(Integer(@a), 8));
ShowMessage(IntToHex(Integer(QueryAddr(Button1Click)), 8));
end;