Autor Beitrag
Tchiboo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Mi 08.02.06 20:48 
tagchen...

ich hab ein großes (für euch sicher kleines) Problem...

und zwar habe ich eine .*msg Datei und möchte die als .html Datei speichern... wie kann ich das machen?

(ich möchte also nur die Endung ändern... also die datei in einen anderen Ordner speichern als "Test.html"!

Danke schon mal im voraus!
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: Mi 08.02.06 20:52 
Die File in einen Memorystream laden und diesen Stream als Test.html abspeichern.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var
mem:TMemorystream;

mem:=Tmemorystream.create;
mem.loadfromfile(pfaddermsgfile);
mem.savetofile(pfadderhtmlfile);
mem.free;

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 08.02.06 20:59 
Suche im MSDN COPYFILE oder Suche im MSDN COPYFILEEX dürfte da sicherlich effektiver sein.

_________________
JSXGraph
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: Mi 08.02.06 21:01 
user profile iconraziel hat folgendes geschrieben:
Suche im MSDN COPYFILE oder Suche im MSDN COPYFILEEX dürfte da sicherlich effektiver sein.


Die Funktion CopyFile ausm EasyHelper baut auf dem gleichen Muster auf, wie meine Variante. :mrgreen:

Was ist denn an Suche im MSDN COPYFILE oder Suche im MSDN COPYFILEEX so 'effektiver'? :gruebel: :?:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Mi 08.02.06 21:02 
Das ging ja super schnell... ;)
Hat super funktioniert!

Tausend Dank!
Tchiboo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

Win XP Home, Mac OS

BeitragVerfasst: Mi 08.02.06 21:06 
ja genau was ist daran effektiver?
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 08.02.06 21:17 
Bei der Stream-Methode wird erst ein Objekt angelegt, dann wird in das Objekt die Datei eingelesen (ob jetzt komplett oder nicht weiß ich grad nicht) und anschließend geschrieben und dann muss das Objekt auch wieder freigegeben werden. Des weiteren wird der Stream selbst auch wieder auf API-Funktionen wie Suche im MSDN COPYFILE und Suche im MSDN COPYFILEEX (genauer gesagt höchstwahrscheinlich Suche im MSDN CREATEFILE) zurückgreifen, es kommt also zusätzlich zum einfachen Kopieren per Win-API auch noch der Overhead in punkto Stream-Objekt dazu. Abgesehen davon ist so ein flotter Einzeiler sicher eleganter ;)

_________________
JSXGraph
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: Mi 08.02.06 21:20 
user profile iconraziel hat folgendes geschrieben:
es kommt also auch noch der Overhead in punkto Stream-Objekt dazu.


Was ist ein Overhead?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 08.02.06 21:28 
usm.maine.edu/lac/gr...otos/av/overhead.jpg
:mrgreen:

Ernsthaft: Overhead heißt soviel wie Mehraufwand. Eben ein zusätzlicher Aufwand, der sich meist vermeiden lässt.

_________________
JSXGraph