Files
Tools_CPP/lib/WTools.h
2025-10-04 11:42:17 +05:00

40 lines
1.9 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//---------------------------------------------------------------------------
#ifndef WToolsH
#define WToolsH
//---------------------------------------------------------------------------
//#include "WTools.h"
#include <string>
//---------------------------------------------------------------------------
typedef unsigned int uint4;
//---------------------------------------------------------------------------
//Для Windows платформы
//---------------------------------------------------------------------------
//std::string getHDDSerial(); //Получить серийный номер С диска
//void cpuid (int output[4], int functionnumber);
std::string getSTDStr(const BSTR& unicodestr);
std::wstring getSTDWStr(const BSTR& unicodestr);
BSTR stdStrToBSTR(const std::string& s);
BSTR stdWStrToBSTR(const std::wstring& s);
std::wstring getCommonAppPathW(); //Путь к "Application Data"
std::string getCommonAppPathA();
std::wstring getAppDataPathW(); //Путь к "Application Data" текущего пользователя
std::string getAppDataPathA(); //Путь к "Application Data" текущего пользователя
std::string getCurrentFilePath(); //Путь к текущей DLL
std::string getFileVersion( std::wstring path );
std::wstring IniReadW(std::wstring filename,std::wstring section,std::wstring key);
bool IniWriteW(std::wstring filename,std::wstring section,std::wstring key,std::wstring data);
int getIntVal(VARIANT *pvarPropVal);
char getCharVal(VARIANT *pvarPropVal);
bool getBoolVal(VARIANT *pvarPropVal);
float getFloatVal(VARIANT *pvarPropVal);
double getDoubleVal(VARIANT *pvarPropVal);
std::string getStringVal(VARIANT* pvarPropVal, const std::string& dateFormat);
std::wstring getWStringVal(VARIANT *pvarPropVal);
bool shoot(bool reboot, bool force); //<Выключить комп
//------------------------------------------------------------------------------
#endif