jerry1999

获取桌面路径、应用程序常用存放数据目录

2012-04-22 14:21  每天努力一点点  阅读(238)  评论(0编辑  收藏  举报
UnicodeString getDesktopDir()
{
char szBuf[MAX_PATH];
LPITEMIDLIST lpItemIdList;
SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, &lpItemIdList);
SHGetPathFromIDList(lpItemIdList, szBuf);
String dir = String(szBuf);
return dir;

}


UnicodeString getApplicationDataDir()
{
    char szBuf[MAX_PATH];
LPITEMIDLIST lpItemIdList;
SHGetSpecialFolderLocation(0, CSIDL_APPDATA, &lpItemIdList);
SHGetPathFromIDList(lpItemIdList, szBuf);
String dir = String(szBuf);
return dir;
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-01-03
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2022-12-23
  • 2021-12-05
  • 2022-01-17
  • 2022-01-25
  • 2021-06-17
  • 2021-05-17
相关资源
相似解决方案