From 8c33d0b44a5407d6bd40df767968ce3c49cb60d5 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 27 六月 2024 17:41:46 +0800
Subject: [PATCH] update  win api

---
 jrj/xframe/wobject/xutil.hpp |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/jrj/xframe/wobject/xutil.hpp b/jrj/xframe/wobject/xutil.hpp
index e20ef30..b7a6e4d 100644
--- a/jrj/xframe/wobject/xutil.hpp
+++ b/jrj/xframe/wobject/xutil.hpp
@@ -2,6 +2,8 @@
 
 #include "xbase.hpp"
 #include "kobject/kutil.hpp"
+#include "wobject/xaserver.hpp"
+#include "win32/win.hpp"
 
 using kutil = Hxsoft::XFrame::IXFUtil;
 class xutil
@@ -53,4 +55,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