Autor Beitrag
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Fr 24.01.03 10:11 
Moin Bübels unn Mädels :wink:
also hab ein kleine Prob..

hab folgenden code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
function GetLastModified(const Datei: string; out Value: TDateTime): Boolean;
var
  dt: Integer;
begin
  dt := FileAge(Datei);
  Result := dt >= 0;
  if Result then
    Value := FileDateToDateTime(dt);
end;

diesen habe ich ausgelagert in eine .dll ... soweit so gut und ich weiße so die werte zu

ausblenden Delphi-Quelltext
1:
value:=(GetLastModified(EndPath+'Database.DB',nil));					


jetzt gibts da ein Problem ich müsste (siehe oben) den Value Wert auch mitgeben nur was muss ich denn da eingeben?? den will ich ja rausfinden und nich übergeben ... kann mir einer helfen???

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Fr 24.01.03 10:43 
Hallo,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var DateiDatum:TDateTime;
...
value:=(GetLastModified(EndPath+'Database.DB', Dateidatum));
if value then ShowMessage('Letzte Änderung: '+DateToStr(DateiDatum))
  else ShowMessage('kein Datum vorhanden');
...


Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Fr 24.01.03 11:05 
ich weis auch nicht was es ist ich bekomm immer 30.12.99 raus immer ..... weist du was das sein könnte?????

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
opfer.der.genauigkeit
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754
Erhaltene Danke: 1



BeitragVerfasst: Fr 24.01.03 11:18 
Kriegst du dieses Ergebnis jeden Tag raus?

_________________
Stellen Sie sich bitte Zirkusmusik vor.
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Fr 24.01.03 11:20 
Hallo,

folgendes funktioniert ganz sicher:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
function GetDateiDatum(const aName:String):String;
var fh     :THandle;
    fdata  :TWin32FindData;
    ft, wt :TFileTime;
    st     :TSystemTime;
begin
  Result:='';
  fh:=FindFirstFile(PChar(aName), fdata);
  if (fh<>Invalid_Handle_Value) then
  begin
    ft:=fdata.ftLastWriteTime;
    FileTimeToLocalFileTime(ft, wt);
    FileTimeToSystemTime(wt, st);
    with st do Result:=Format('%0.2d.%0.2d.%0.4d', [wDay, wMonth, wYear]);
  end; // If
  Windows.FindClose(fh);
end; // GetDateiDatum

...
ShowMessage(GetDateiDatum(EndPath+'Database.DB'));


Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Fr 24.01.03 12:05 
alles klar danke

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Fr 24.01.03 12:34 
hmmm jetzt kommt da aber immer ungültige Zeigeroperation .... aber in einem ganz anderen teil, aber die function geht ... aber kann das mit der zusammenhängen??

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 01.10.05 14:17 
Titel: d
Du hast die fkn doch in eine DLL ausgelagert. Ich glaub da darf man keine Strings übergeben sondern muss stattdessen PChar nehmen
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Sa 01.10.05 14:47 
Hallo, Leute!

Ich denke, Ihr seid lange genug dabei, um zu wissen, dass für Delphi-Source auch die Delphi-Tags verwendet werden sollten ;-)

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".