- Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
type TUuirt = class
VHandle: integer;
private
{ Déclarations privées }
public
{ Déclarations publiques }
constructor Create;
destructor Destroy; override;
procedure Open;
procedure Close;
end;
var
Form1: TForm1;
VUirt: TUuirt;
implementation
{$R *.dfm}
// Déclarations dll
function UUIRTOpen: integer; external 'uuirtdrv.dll';
function UUIRTClose(hHandle: integer): integer; external 'uuirtdrv.dll';
function UUIRTTransmitIR(hHandle: integer; sIRCode: String; uCodeFormat, uRepeatCount, uInactivityWaitTime, hEvent, reserved0, reserved1: integer): integer; external 'uuirtdrv.dll';
// Classe TUuirt
constructor TUuirt.Create;
begin
end;
destructor TUuirt.Destroy;
begin
end;
procedure TUuirt.Open;
begin
VHandle := UUIRTOpen;
end;
procedure TUuirt.Close;
begin
UUIRTClose(VHandle);
end;
// Fin Class TUuirt
procedure TForm1.Button1Click(Sender: TObject);
begin
Vuirt:=TUuirt.Create;
Vuirt.Open;
Vuirt.Close;
Vuirt.Destroy;
end;
end.
Hello,
I tried to open usbuirt but delphi tell me "Attempt to open failed".
I used 2.6.9.9 dll
I run under Windows 7 64
I don't understand what's the problem ?
Thanks