xj qian
2024-06-27 8c33d0b44a5407d6bd40df767968ce3c49cb60d5
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;
    }
};