清空淘宝cookie的代码

String path;
TRegistry *Registry = new TRegistry;
try
{
path="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
Registry->RootKey =HKEY_CURRENT_USER;
Registry->OpenKey(path, false);
path= Registry->ReadString("Cookies");
}
__finally
{
delete Registry;
}
//
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
String path1;
path1=path+"\\*.*";
hFind = FindFirstFile(path1.c_str(),&FindFileData);
if (INVALID_HANDLE_VALUE != hFind)
{
do
{
if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
String filename=FindFileData.cFileName;
int len=filename.Length();
//"taobao[2].txt" 13
if(filename.SubString(len-12,6)=="taobao")
{
filename=path+"\\"+filename;
DeleteFile(filename);
}
}
}while(FindNextFile(hFind, &FindFileData));
FindClose(hFind);
}