USB-UIRT Forum Forum Index USB-UIRT Forum
Plug-n-Play IR Solution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi - Attempt to open failed

 
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers
View previous topic :: View next topic  
Author Message
littlejedi



Joined: 17 Jan 2011
Posts: 2

PostPosted: Mon Jan 17, 2011 11:05 am    Post subject: Delphi - Attempt to open failed Reply with quote

Code:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    USB-UIRT Forum Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group