| Revision | 7e80c1182a6bca69dde156f43fa9783901c0afef (tree) |
|---|---|
| Time | 2012-03-13 23:28:31 |
| Author | qwerty2501 <qwerty2501@user...> |
| Commiter | qwerty2501 |
IEクッキー失敗時の最後の手段を追加
| @@ -482,6 +482,13 @@ public: | ||
| 482 | 482 | |
| 483 | 483 | |
| 484 | 484 | |
| 485 | + | |
| 486 | + /// | |
| 487 | + ///テスト用関数 | |
| 488 | + /// | |
| 489 | + VOID NLIB_Test(); | |
| 490 | + | |
| 491 | + | |
| 485 | 492 | #pragma comment(lib,"Wininet.lib") |
| 486 | 493 | #pragma comment(lib,"WinHttp.lib") |
| 487 | 494 | #pragma comment(lib,"Iepmapi.lib") |
| @@ -255,4 +255,12 @@ networkerr: | ||
| 255 | 255 | goto end; |
| 256 | 256 | |
| 257 | 257 | |
| 258 | + } | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + VOID NLIB_Test(){ | |
| 263 | + | |
| 264 | + ShareCookieUnitTest(); | |
| 265 | + | |
| 258 | 266 | } |
| \ No newline at end of file |
| @@ -131,7 +131,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, | ||
| 131 | 131 | |
| 132 | 132 | InitializeNlite(); |
| 133 | 133 | |
| 134 | - | |
| 134 | + /* | |
| 135 | 135 | int count = 0; |
| 136 | 136 | BugTrail bugtrail; |
| 137 | 137 | bugtrail.function = TEXT("testfunction"); |
| @@ -149,7 +149,10 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, | ||
| 149 | 149 | vcassert(_heapchk() == _HEAPOK,TEXT("ヒープエラーです")); |
| 150 | 150 | |
| 151 | 151 | nRet = 0; |
| 152 | + */ | |
| 153 | + | |
| 152 | 154 | |
| 155 | + NLIB_Test(); | |
| 153 | 156 | |
| 154 | 157 | FreeLibrary(hRich); |
| 155 | 158 |
| @@ -306,9 +306,9 @@ err: | ||
| 306 | 306 | throw AppInitException(__LINE__,TEXT(__FILE__),TEXT(__FUNCTION__)); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | - | |
| 310 | 309 | |
| 311 | - | |
| 310 | + | |
| 311 | + | |
| 312 | 312 | |
| 313 | 313 | |
| 314 | 314 | if(SHGetFolderPathW(0,CSIDL_APPDATA,0,SHGFP_TYPE_CURRENT,appFolderPath) != S_OK){ |
| @@ -16,17 +16,19 @@ | ||
| 16 | 16 | #define _WTL_NO_CSTRING |
| 17 | 17 | |
| 18 | 18 | #ifndef NDEBUG |
| 19 | -//#define NLITE_UNIT_TEST //単体テストモード | |
| 20 | -//#define USE_STUB //スタブを使用する場合はコメントアウトを解除する | |
| 19 | +#define NLITE_UNIT_TEST //単体テストモード | |
| 20 | +#define USE_STUB //スタブを使用する場合はコメントアウトを解除する | |
| 21 | 21 | #endif |
| 22 | 22 | // Windows ヘッダー ファイル: |
| 23 | 23 | #include <windows.h> |
| 24 | 24 | #include <WindowsX.h> |
| 25 | 25 | #include <WinSock2.h> |
| 26 | + | |
| 26 | 27 | #include <ShellAPI.h> |
| 27 | 28 | #include <shlobj.h> |
| 28 | 29 | #include <Iphlpapi.h> |
| 29 | 30 | #include <wincrypt.h> |
| 31 | + | |
| 30 | 32 | // C ランタイム ヘッダー ファイル |
| 31 | 33 | #include <stdlib.h> |
| 32 | 34 | #include <malloc.h> |
| @@ -37,6 +37,12 @@ extern VOID FinalizeShareCookie(); | ||
| 37 | 37 | extern COOKIE_RESULT GetCookie(BROWSERTYPE browserType,LPWSTR cookie,SIZE_T bufSize, LPCWSTR key,LPCWSTR domein); |
| 38 | 38 | |
| 39 | 39 | |
| 40 | + | |
| 41 | +/// | |
| 42 | +///単体テスト用の関数 | |
| 43 | +/// | |
| 44 | +extern VOID ShareCookieUnitTest(); | |
| 45 | + | |
| 40 | 46 | #ifdef __cplusplus |
| 41 | 47 | } |
| 42 | 48 | #endif |