FsDeleteFile - may be need option
Moderators: Hacker, petermad, Stefan2, white
- Korney San
- Junior Member
- Posts: 19
- Joined: 2011-10-13, 11:42 UTC
- Location: Belarus, Gomel
FsDeleteFile - may be need option
Is there any way to determine what delete action is executing in FsDeleteFile: Del or Shift-Del ?
Praemonitus praemunitus
The only way you can do - is to check if Shift is pressed:
But note that TC calls your FsDeleteFile when you confirm deletion and not immediately after pressing Del or Shift+Del. So user needs to hold Shift when clicking OK in TC confirm dialog.
Code: Select all
bool is_shift=GetAsyncKeyState(VK_SHIFT)<0;
- Korney San
- Junior Member
- Posts: 19
- Joined: 2011-10-13, 11:42 UTC
- Location: Belarus, Gomel
This is not "the right way", I suggest the FsDeleteFile definition must be updated from
to something like
where
ShiftPressed - state of Shift when Del was pressed;
UseTrash - state of corresponding TC option.
Ghisler, what are you think?
Code: Select all
function FsDeleteFile(RemoteName:pchar):bool; stdcall;
Code: Select all
function FsDeleteFile(RemoteName:pchar; ShiftPressed:bool; UseTrash:bool):bool; stdcall;
ShiftPressed - state of Shift when Del was pressed;
UseTrash - state of corresponding TC option.
Ghisler, what are you think?
Praemonitus praemunitus