我的环境
C++ Builder XE4 on Windows 7 Pro (32bit)
我正在尝试获取"回收站"使用CSIDL_XXX。
Unit2.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::B_checkRecycleBinClick(TObject *Sender)
{
//LPTSTR getPath[255];
wchar_t appdata[255];
SHGetSpecialFolderPath(NULL, appdata, CSIDL_APPDATA, false);
OutputDebugString(appdata);
wchar_t recycle[255];
SHGetSpecialFolderPath(NULL, recycle, CSIDL_BITBUCKET, false);
OutputDebugString(recycle);
}
//---------------------------------------------------------------------------
使用上面的代码,
Q值。你能辨认出什么错误?