文件夹路径 - SHGetFolderPath已弃用 [英] Folder path - SHGetFolderPath Deprecated
本文介绍了文件夹路径 - SHGetFolderPath已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码构建路径和文件名(用于存储日志):
if (SUCCEEDED(SHGetFolderPath(NULL,CSIDL_LOCAL_APPDATA, // FOLDERID_LocalAppData
NULL, 0 ,szFldrPth)))
wsprintf(szFileName, %s \\%s,szFldrPth,szSaveFile);
else szFileName [ 0 ] = NULL;
我需要使用已知文件夹系统进行简单替换
解决方案
我在 MSDN 并发现该文档命名为替换函数。请参阅 SHGetKnownFolderPath函数 [ ^ ]
I have used the following code to build a path and file name (used to store a log):
if(SUCCEEDED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA,//FOLDERID_LocalAppData
NULL, 0, szFldrPth)))
wsprintf(szFileName,"%s\\%s", szFldrPth, szSaveFile);
else szFileName[0] = NULL;
I need a simple replacement using the known folder system
解决方案
I looked up the SHGetFolderPath function on MSDN and found that the documentation named the replacement function. See SHGetKnownFolderPath function[^]
这篇关于文件夹路径 - SHGetFolderPath已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文