From 51faca7cff4ce6b848fcbd8f7fe881f6fc59b4f3 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期四, 27 六月 2024 16:06:03 +0800 Subject: [PATCH] add xfile --- jrj/xframe/wobject/xutil.hpp | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/jrj/xframe/wobject/xutil.hpp b/jrj/xframe/wobject/xutil.hpp index e20ef30..8ce0f0e 100644 --- a/jrj/xframe/wobject/xutil.hpp +++ b/jrj/xframe/wobject/xutil.hpp @@ -53,4 +53,20 @@ return Hxsoft::XUtil::FormatDecimalString(str, format, bfree); } +public: + static xstring GetModulePath() + { + wchar_t buf[255]; + GetModuleFileName(0, buf, 255); + PathRemoveFileSpec(buf); + return xstring(buf); + } + + static xstring GetModuleTmpPath() + { + xstring tmp = GetModulePath() + L"\\Temp"; + xaserver::CreateDirectory(tmp); + return tmp; + } + }; \ No newline at end of file -- Gitblit v1.9.3