Autor Beitrag
ntmario
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Fr 30.09.05 16:00 
Hallo zusammen,

ich möchte in einer dll die Indy Komponente TFTP nutzen. So habe ich es mal probiert, haut aber leider nicht hin:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
library TEST;

uses
  SysUtils,
  Classes,
  Dialogs,
  IdTrivialFTP in 'C:\Programme\Borland\Delphi7\Source\Indy\IdTrivialFTP.pas';

{$R *.res}



function GET_DATA(Server:String; FileName:String):Longint; stdcall;
var
  TFTP: TIdTrivialFTP;
  FileStream: TFileStream;
begin

  try
    FileStream := TFileStream.Create('c:\test.txt', fmCreate);
    try
        TFTP.Create(<span style="color: red">[b]???[/b]</span>);
        TFTP.Host := '192.168.128.80';
        TFTP.Get('test.txt', FileStream);
      finally
        TFTP.Free;
      end;
  finally
    FileStream.Free;
  end;
  result:=0;
end;

exports
  GET_DATA;

begin
end.



...ich weiß nicht was ich bei TFTP.Create( ); für einen Owner übergeben kann nil und self geht nicht????


Kann mir jemand helfen????


Mario

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Sa 01.10.05 15:31 
user profile iconntmario hat folgendes geschrieben:
...ich weiß nicht was ich bei TFTP.Create( ); für einen Owner übergeben kann nil und self geht nicht????

ausblenden Delphi-Quelltext
1:
TFTP := TIdTrivialFTP.Create(nil);					

_________________
Ciao, Sprint.
ntmario Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Sa 01.10.05 19:13 
Titel: ...ich hatte geschrieben....
nil und self geht nicht...
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Sa 01.10.05 19:48 
Titel: Re: ...ich hatte geschrieben....
user profile iconntmario hat folgendes geschrieben:
nil und self geht nicht...

Vielleicht solltest du dir mal das anschauen was ich gepostet habe und das was du in deinem Quelltext falsch gemacht hast.
Syntax-technisch ist das so richtig. Wenn du eine Fehlermeldung vom Compiler bekommst, dann poste diese hier.

_________________
Ciao, Sprint.
ntmario Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Sa 08.10.05 18:09 
Titel: ...OHhh, daß ist jetzt peinlich...
...erst habe ich beim Programmieren gepennt und dann gleich noch mal!!!


Sorry und Danke!


Mario