11BOOL APIENTRY
DllMain (HMODULE hModule, DWORD dwReasonForCall, LPVOID lpvReserved)
13 switch (dwReasonForCall)
15 case DLL_PROCESS_ATTACH:
16 OutputDebugString (_T (
"WindowsLibrary.dll DLL_PROCESS_ATTACH.\n"));
18 case DLL_THREAD_ATTACH:
19 OutputDebugString (_T (
"WindowsLibrary.dll DLL_THREAD_ATTACH.\n"));
21 case DLL_THREAD_DETACH:
22 OutputDebugString (_T (
"WindowsLibrary.dll DLL_THREAD_DETACH.\n"));
24 case DLL_PROCESS_DETACH:
25 OutputDebugString (_T (
"WindowsLibrary.dll DLL_PROCESS_DETACH.\n"));
34 return ::GetLastError ();
43 ZeroMemory (tszMsg,
sizeof (tszMsg));
45 wsprintf (tszMsg, _T (
"%04d/%02d/%02d %02d:%02d:%02d.%03d %s\n"),
46 T.wYear, T.wMonth, T.wDay,
47 T.wHour, T.wMinute, T.wSecond, T.wMilliseconds, lpctszMsg);
49 OutputDebugString (tszMsg);
54 TCHAR tszResult[MAX_PATH];
57 DWORD dwRet = ::GetPrivateProfileString (lpctszSection, lpctszKeyword,
70 return ::GetPrivateProfileInt (lpctszSection, lpctszKeyword, nDefault,
_profile.
Ctr ());
78 if (!isExist)
return FALSE;
89 wsprintf (dateTime.
Ptr (), _T (
"%04d/%02d/%02d %02d:%02d:%02d.%03d"),
90 systemTime.wYear, systemTime.wMonth, systemTime.wDay,
91 systemTime.wHour, systemTime.wMinute, systemTime.wSecond,
92 systemTime.wMilliseconds);
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID lpvReserved)
MiddleLibraryプロジェクトのメインクラス
static BOOL APIENTRY IsExist(LPCTSTR name)
ディレクトリ・ファイルの存在確認
BOOL SetProfile(LPCTSTR lpctszFileName)
virtual VOID debug(LPCTSTR lpctszMsg)
TString GetFormattedDateTime(SYSTEMTIME &systemTime)
UINT GetProfileValue(LPCTSTR lpctszSection, LPCTSTR lpctszKeyword, UINT nDefault=UINT_MAX)
TString GetProfileStr(LPCTSTR lpctszSection, LPCTSTR lpctszKeyword)
文字列に関するWindowsAPIを集約したクラス
LPCTSTR APIENTRY Ctr() const
内部で確保している文字列ポインタを取得します。
LPTSTR APIENTRY Ptr() const
内部で確保している文字列ポインタを取得します。