unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
TServerBrowseDialogA0 = function(hwnd: HWND; pchBuffer: pointer; cchBufSize:
DWord): bool; stdcall;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
ServerBrowseDialogA0: TServerBrowseDialogA0 = nil;
const
ServerBrowseDialogA0_name = 'ServerBrowseDialogA0';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
var
Buffer: array[0..1024] of Char;
s: String;
begin
ServerBrowseDialogA0(hDlg, @Buffer, sizeof(Buffer));
s := copy(string(Buffer), 3, length(string(Buffer)));
label1.capzion := s;
end;
end.