18#pragma comment(user, "T-Coverage Disable")
39 DWORD dwLength = MAX_COMPUTERNAME_LENGTH + 1;
60 DWORD dwRc = ::GetModuleFileName(NULL, str.
GetBuffer(MAX_PATH), MAX_PATH);
88 DWORD dwRc = ::GetModuleFileName(NULL, str.
GetBuffer(MAX_PATH), MAX_PATH);
98 return str.
Mid(
static_cast<INDEX
>(p + 1));
126 int r = ::LoadString(hInst, nID, str.
GetBuffer(iLen), iLen);
166 int iRc = ::LCMapStringA(::GetUserDefaultLCID(),
200 int iRc = ::LCMapStringW(::GetUserDefaultLCID(),
283 LPTSTR lpBuffer = NULL;
284 const DWORD dwFlag = FORMAT_MESSAGE_ALLOCATE_BUFFER
285 | FORMAT_MESSAGE_FROM_SYSTEM
286 | FORMAT_MESSAGE_IGNORE_INSERTS;
287 DWORD r = ::FormatMessage(
292 reinterpret_cast<LPTSTR
>(&lpBuffer),
298 strErrMessage = _T(
"Unknown");
302 strErrMessage = lpBuffer;
304 ::LocalFree(lpBuffer);
308 strErrMessage +=
CStr::Fmt(_T(
"(%d)"), dwError);
310 return strErrMessage;
320#pragma comment(user,"T-Coverage Enable")
INT_PTR ReverseFindOneOf(const TYP *lpsz) const
[確認] 検索(後ろから)
CStrT Left(size_t iSize) const
[作成] 範囲取得.
void ReleaseBuffer(void)
[操作] 割り当てたバッファを開放.
static CStrT Fmt(const TCHAR *lpszFormat,...)
[作成] 書式付き文字列作成
CStrT & TrimRight(TYP t=' ')
[処理] 末尾から文字をトリム.
CStrT Mid(INDEX iOffset, size_t iSize=INVALID_SIZE) const
[作成] 範囲取得.
TYP * GetBuffer(size_t iLength=0)
[操作] 書き込みバッファ要求.
CStr GetComputerName(void)
[取得] PC名取得
size_t GetLen(LPCSTR lpsz)
[計算] 文字列長計算(ASCII/SJIS用)
TNB::CStrT< char > CAscii
ASCII文字列クラス
TNB::CStrT< WCHAR > CUnicode
UNICODE文字列クラス
CAscii UpperString(LPCSTR lpsz)
[変換] 大文字変換(ASCII/SJIS用)
CAscii LowerString(LPCSTR lpsz)
[変換] 小文字変換(ASCII/SJIS用)
CStr GetProcessName(void)
[取得] プロセスネーム取得.
CAscii LocalMapString(LPCSTR lpsz, DWORD dwFlags)
[変換] 文字変換(ASCII/SJIS用)
CStr GetProcessPath(void)
[取得] プロセスのパス取得.
int ToInt(LPCSTR lpsz, int iBase=10)
[変換] INT変換(ASCII/SJIS用).
CStr LoadStr(UINT nID, HINSTANCE hInst=NULL)
[取得] リソース文字列取得
void SystemErrorToMessageText(CSimpleStr &_str, DWORD dwError)
[変換] SystemErrorコード文字列化.
HINSTANCE GetInstanceHandleByTnb(EInstanceType type=EI_Process)
[取得] インスタンスハンドル取得.