更新GetLocalAppdataPath函数,使其风格和其它函数一致

This commit is contained in:
2020-10-09 18:23:30 +08:00
parent be71d3b818
commit 5dca9ae3a5
4 changed files with 17 additions and 8 deletions

View File

@@ -6,9 +6,15 @@ namespace hgl
{
namespace filesystem
{
void GetLocalAppdataPath(os_char fn[HGL_MAX_PATH])
bool GetLocalAppdataPath(OSString &result)
{
SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, fn);
os_char fn[HGL_MAX_PATH];
if(SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, 0, fn)!=S_OK)
return(false);
result=fn;
return(true);
}
/**