Sign in Join
Wiki copytemporary

File Into Trash/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: File Into Trash/de

OldNewLine
1+Zurück zur Seite [[code examples/de|Code Beispiele]].
2+
3+Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.
4+
5+Die Funktion verschiebt eine Datei in den Papierkorb.
6+
7+``` pascal
8+uses
9+ ShellAPI, FileUtil, ...;
10+
11+ ...
12+
13+function funDateiInPapierkorbVerschieben(strDateiname: string): boolean;
14+var
15+ Dateistruktur: TSHFileOpStruct;
16+begin
17+ FillChar(Dateistruktur, SizeOf(Dateistruktur), 0);
18+
19+ with Dateistruktur do
20+ begin
21+ wFunc := FO_DELETE;
22+ // Lässt Umlaute usw. im Dateinamen zu
23+ pFrom := PChar(UTF8ToSys(strDateiname));
24+ fFlags := FOF_ALLOWUNDO + FOF_NOCONFIRMATION + FOF_SILENT;
25+ end;
26+
27+ Result := ShFileOperation(Dateistruktur) = 0;
28+end;
29+
30+ ...
31+
32+```
33+
34+---
35+*From the Free Pascal wiki, page "File Into Trash/de", as it stood on 2020-02-15 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history