Pomocy bo jestem za cienki!!!!
Chodzi mi o zadeklorowanie zmiennej "ile" i "txt". Pierwsza jest typu: word zas druga typu: array[1..20] of char.
Nie wiem jak to zrobic aby były jako wskażniki.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
procedure ComboBox1DropDown(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
FT_Result = Integer;
var
Form1: TForm1;
implementation
function FT_ListDevices(pvArg1:Dword;pvArg2:Pointer;dwFlags:Dword) : FT_Result ; stdcall ; External 'FTD2XX.dll' name 'FT_ListDevices';
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
i : integer;
ftStatus : FT_Result;
FTopis:string;
begin
ftStatus:= FT_ListDevices(@ile,nil,FT_LIST_NUMBER_ONLY);
for i := 1 to 20 do txt[i] := '';
if ile>0 then
begin
for i:=0 to ile-1 do
begin
FT_ListDevices(i,@txt,(FT_OPEN_BY_DESCRIPTION or FT_LIST_BY_INDEX));
FTOpis:=txt[i];
ListBox1.Items.Add(FTOpis);
end;
end;
end;
end.
Zdrowka
Kochzg