From 081778e12cea4c7953412db579c75827aa04ec5a Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 31 Mar 2022 18:14:43 +0800 Subject: [PATCH] added GetOSLibraryPath function. --- src/Win/ProgramPath.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Win/ProgramPath.cpp b/src/Win/ProgramPath.cpp index a73f828..b80bb12 100644 --- a/src/Win/ProgramPath.cpp +++ b/src/Win/ProgramPath.cpp @@ -6,6 +6,20 @@ namespace hgl { namespace filesystem { + bool GetOSLibararyPath(OSString &result) + { + wchar_t dllfn[MAX_PATH]; + UINT size; + + size=::GetSystemDirectoryW(dllfn,MAX_PATH); + + if(size==0) + return(false); + + result.SetString(dllfn,size); + return(true); + } + bool GetLocalAppdataPath(OSString &result) { os_char fn[HGL_MAX_PATH];