在VC中获取特定的路径

      在VC中获取system32的完整路径:

TCHAR chWinDir[MAX_PATH];

memset(chWinDir,0,MAX_PATH);
GetWindowsDirectory(chWinDir,MAX_PATH); //获取系统安装路径

TCHAR system32[] = _T("\\system32");
SHGetSpecialFolderPath(NULL,chWinDir,37,false); //获取system32目录的路径
//
//nFolder lpszPath
//0 C:/Documents and Settings/当前用户/桌面
//2 C:/Documents and Settings/当前用户/「开始」菜单/程序
//5 C:/Documents and Settings/当前用户/My Documents
//6 C:/Documents and Settings/当前用户/Favorites
//7 C:/Documents and Settings/当前用户/「开始」菜单/程序/启动
//8 C:/Documents and Settings/当前用户/Recent
//9 C:/Documents and Settings/当前用户/SendTo
//11 C:/Documents and Settings/当前用户/「开始」菜单
//13 C:/Documents and Settings/当前用户/My Documents/My Music
//14 C:/Documents and Settings/当前用户/My Documents/My Videos
//16 C:/Documents and Settings/当前用户/桌面
//19 C:/Documents and Settings/当前用户/NetHood
//20 C:/WINDOWS/Fonts
//21 C:/Documents and Settings/当前用户/Templates
//22 C:/Documents and Settings/All Users/「开始」菜单
//23 C:/Documents and Settings/All Users/「开始」菜单/程序
//24 C:/Documents and Settings/All Users/「开始」菜单/程序/启动
//25 C:/Documents and Settings/All Users/桌面
//26 C:/Documents and Settings/当前用户/Application Data
//27 C:/Documents and Settings/当前用户/PrintHood
//28 C:/Documents and Settings/当前用户/Local Settings/Application Data
//31 C:/Documents and Settings/All Users/Favorites
//32 C:/Documents and Settings/当前用户/Local Settings/Temporary Internet Files
//33 C:/Documents and Settings/当前用户/Cookies
//34 C:/Documents and Settings/当前用户/Local Settings/History
//35 C:/Documents and Settings/All Users/Application Data
//36 C:/WINDOWS
//37 C:/WINDOWS/system32
//38 C:/Program Files
//  
//39 C:/Documents and Settings/当前用户/My Documents/My Pictures
//40 C:/Documents and Settings/当前用户
//43 C:/Program Files/Common Files
//45 C:/Documents and Settings/All Users/Templates
//46 C:/Documents and Settings/All Users/Documents
//47 C:/Documents and Settings/All Users/「开始」菜单/程序/管理工具
//48 C:/Documents and Settings/当前用户/「开始」菜单/程序/管理工具
//53 C:/Documents and Settings/All Users/Documents/My Music
//54 C:/Documents and Settings/All Users/Documents/My Pictures
//55 C:/Documents and Settings/All Users/Documents/My Videos
//56 C:/WINDOWS/resources
//59 C:/Documents and Settings/当前用户/Local Settings/Application Data/Microsoft/CD Burning
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值