Article View: borland.public.cppbuilder.nativeapi
Article #10993Delete a file to Recycle Bin
From: Mario Sernicola
Date: Wed, 03 Mar 2004 14:31
Date: Wed, 03 Mar 2004 14:31
21 lines
1573 bytes
1573 bytes
Hi,
I've to implement a function that delete a file and put it in the recycle
bin.
I've used SHGetSpecialFolder function to retrieve the path of recycle bin
folder and move the file in it, but it is ever an empty string.
//---------------------------------------------------------------
char path[MAX_PATH+1];
try
{
if (SHGetSpecialFolderPath(Handle, path, CSIDL_BITBUCKET, 0))
//code to copy file to recycle bin path
} catch (...) {//error message}
//---------------------------------------------------------------
Thanks
Mario Sernicola
Technical Details
Message-ID:
<4045ec37@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,820b8d6a3def1656,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-03 06:42:28 PST Reply-To: "Mario Sernicola" <mariosernicola.nospam@libero.nospam.it> From: "Mario Sernicola" <mariosernicola.nospam@libero.nospam.it> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Delete a file to Recycle Bin Date: Wed, 3 Mar 2004 15:31:35 +0100 Lines: 23 Organization: i'msoft X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 80.181.138.8 Message-ID: <4045ec37@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1078324279 80.181.138.8 (3 Mar 2004 06:31:19 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail