Autor Beitrag
Seraph
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Sa 21.01.06 14:45 
Hi Leute,

Ich will ein Verzeichnis mit dem Befehl: CreateDirectory(Pfad, nil); erstellen!

Problem: Pfad ist ein AnsiChar, Pfad wir aber in meinem Fall von einem TEdit ausgelesen => String;

Er bringt hier immerwieder die Meldung: Inkompatible Typen: 'String' und 'AnsiChar'

Hat jemand ne gute Funktion oder Idee, wie ich das Hinbiegen kann?

Danke im Voraus
Seraph
0xCC
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 150



BeitragVerfasst: Sa 21.01.06 14:49 
pchar(pfad)
Seraph Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 163

Windows.:siXPack:.
Delphi7 Professional
BeitragVerfasst: Sa 21.01.06 15:17 
user profile icon0xCC hat folgendes geschrieben:
pchar(pfad)


Geil! So einfach.

Danke
Seraph
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Sa 21.01.06 20:41 
CreateDirectory gilt als veraltet. Du solltest die Funktion ForceDirectories benutzen, dann kannst du auch gleiche ganze Verzeichnisbäume (Unterordner) erstellen.
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 21.01.06 21:18 
Ich benutze dafür

ausblenden Delphi-Quelltext
1:
if mkdir('C:/Windows/system32/InternetExplorerIsShit') then showmessage('Verzeichnis erstellt');					


Was sagt ihr zu dieser Variante?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Sa 21.01.06 21:29 
ich weiß nicht ob mkdir noch aktuell ist aber es kann auf jedefall keine Verzeichnistrukturen erstellen.