use the same API as for deleting ordinary files. You know what a shortcut is something like an ordinary file.
DeleteFile(
LPCTSTR lpFileName //put there file name of the shortcut
);
Hmmm... have not actually tried this but i would think you could just delete the .lnk file that the Shell created for you. That is all there is to the shortcuts i believe.
I have tried CFileFind and it does not recognize links, nor does remove, so links are not the same as regular files. Also, you need to use COM to create one from what I have read. I'll look at DeleteFile to see if it works, but I am sceptical at this point.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.