File Into Trash/de
Deutsch · English
Zurück zur Seite Code Beispiele.
Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.
Die Funktion verschiebt eine Datei in den Papierkorb.
uses
ShellAPI, FileUtil, ...;
...
function funDateiInPapierkorbVerschieben(strDateiname: string): boolean;
var
Dateistruktur: TSHFileOpStruct;
begin
FillChar(Dateistruktur, SizeOf(Dateistruktur), 0);
with Dateistruktur do
begin
wFunc := FO_DELETE;
// Lässt Umlaute usw. im Dateinamen zu
pFrom := PChar(UTF8ToSys(strDateiname));
fFlags := FOF_ALLOWUNDO + FOF_NOCONFIRMATION + FOF_SILENT;
end;
Result := ShFileOperation(Dateistruktur) = 0;
end;
...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.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
