I just posted this code to help someone but others who may need it someday may never find it under that subject, so i'm placing it under some easy keywords ...
A few days ago i found this while searching for other stuff ( memory management, paging etc ) but stumbled upon this somehow.
It will delete ANY kind of file including short-cuts. So if you ever had a problem deleting something, this should solve it.
It may look the same to something you tried before but it not because what i was using that looks just like it by first sight only deleted standard windows files and nothing else. This one do it all...
There may be others great ways of doing it. If so, hope to see them here.
; #####################################
; #####################################
x_Delete PROC dest:DWORD,src:DWORD
; by arkane
CALL GetDesktopWindow
;.......
;.......
mov CopyParms.hwnd, eax
mov CopyParms.wFunc, 3h ; FO_DELETE
push src ; Source
pop CopyParms.pFrom
push dest ; Destination
pop CopyParms.pTo
mov CopyParms.fFlags, 10h ; FOF_NOCONFIRMATION
PUSH offset CopyParms
CALL SHFileOperationA
mov eax, CopyParms.fAnyOperationsAborted
ret
x_Delete ENDP