tweak for win32_trash()

This commit is contained in:
dolphin6k 2021-10-29 23:37:19 +09:00
parent adc181e3ec
commit 87ed5bc991
2 changed files with 10 additions and 4 deletions

View file

@ -1,13 +1,17 @@
#include <windows.h>
#include <string.h>
#include <stdlib.h>
int win32_trash(char *path);
int win32_trash(char *path)
{
SHFILEOPSTRUCT op;
int ret;
op.wFunc = FO_DELETE;
op.pFrom = path;
op.fFlags = FOF_SILENT|FOF_ALLOWUNDO;
return SHFileOperationA(&op);
ret = SHFileOperationA(&op);
return ret;
}