• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision06ebe0ef34da8ba86bbf5f2e14e2852d06ed9551 (tree)
Time2012-02-27 01:02:13
Authorqwerty2501 <riot313@gmai...>
Commiterqwerty2501

Log Message

クッキー結果判定を修正
クッキー取得時失敗時にエラーコードを出力するように修正

Change Summary

Incremental Difference

Binary files a/nlite.suo and b/nlite.suo differ
--- a/shareCookie/shareCookie.c
+++ b/shareCookie/shareCookie.c
@@ -3,6 +3,7 @@
33 #define WINDEBUGER_NOPRINTING
44 #define _CRT_SECURE_NO_WARNINGS 1 //vc++のおせっかいな警告を消す
55 #define _CRT_NON_CONFORMING_SWPRINTFS 1 //vc++のおせっかいな警告を消す
6+#define DEBUG
67 #include <shlobj.h>
78 #include <Wininet.h>
89 #include <Iepmapi.h>
@@ -303,15 +304,12 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
303304 //取得した値が0だった場合、保護モードフラグをTRUEにする
304305 isProtectedMode = data == 0;
305306
306-
307307 break;
308308
309309
310310 //保護モード取得に失敗した場合でもレジストリ値が見つからないエラーであれば、XP以前のOSと判定され、保護モードはFALSEのままにする
311311 case ERROR_FILE_NOT_FOUND:
312312
313-
314-
315313 break;
316314
317315 //上記エラー以外のエラーが発生した場合、クッキー取得を失敗とする
@@ -355,11 +353,11 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
355353
356354 }
357355
358-
356+
359357
360358
361359 //結果コード判定
362- if(cookieResult == ERROR_SUCCESS){
360+ if(SUCCEEDED(cookieResult) == TRUE){
363361
364362
365363 //取得したクッキーのサイズが0より大きければ、resultsに正常終了の値を設定
@@ -376,7 +374,8 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
376374 //結果コードが正常終了ではない場合resultsにエラーの詳細を設定
377375 } else {
378376
379-
377+
378+ errprint(TEXT("ieCookieGetError,hresult:%d"),cookieResult);
380379 switch(cookieResult){
381380 //バッファ長が足りない場合のエラーwinerror.hに設定されていなかったのでそのままの値で飛ぶようにしてあるどこかに定義されているかもしれないので見つけたら定義マクロに置き換える
382381 case 0x8007007a:
@@ -388,7 +387,7 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
388387 //未定義のエラーが発生した場合
389388
390389
391- case INTERNET_COOKIE_HTTPONLY:
390+
392391 default:
393392
394393 wincheck(cookieResult);