OSDN Git Service

クッキー結果判定を修正
authorqwerty2501 <riot313@gmail.com>
Sun, 26 Feb 2012 16:02:13 +0000 (01:02 +0900)
committerqwerty2501 <riot313@gmail.com>
Sun, 26 Feb 2012 16:02:13 +0000 (01:02 +0900)
クッキー取得時失敗時にエラーコードを出力するように修正

nlite.suo
shareCookie/shareCookie.c

index 84d43af..e0f7f4c 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index ce5159e..a6d15f6 100644 (file)
@@ -3,6 +3,7 @@
 #define WINDEBUGER_NOPRINTING
 #define _CRT_SECURE_NO_WARNINGS 1                      //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
 #define  _CRT_NON_CONFORMING_SWPRINTFS 1       //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·
+#define DEBUG
 #include <shlobj.h>
 #include <Wininet.h>
 #include <Iepmapi.h>
@@ -303,15 +304,12 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
                        //\8eæ\93¾\82µ\82½\92l\82ª0\82¾\82Á\82½\8fê\8d\87\81A\95Û\8cì\83\82\81[\83h\83t\83\89\83O\82ðTRUE\82É\82·\82é
                        isProtectedMode = data == 0;
                        
-
                        break;
 
                
                        //\95Û\8cì\83\82\81[\83h\8eæ\93¾\82É\8e¸\94s\82µ\82½\8fê\8d\87\82Å\82à\83\8c\83W\83X\83g\83\8a\92l\82ª\8c©\82Â\82©\82ç\82È\82¢\83G\83\89\81[\82Å\82 \82ê\82Î\81AXP\88È\91O\82ÌOS\82Æ\94»\92è\82³\82ê\81A\95Û\8cì\83\82\81[\83h\82ÍFALSE\82Ì\82Ü\82Ü\82É\82·\82é
                case ERROR_FILE_NOT_FOUND:
 
-
-
                        break;
 
                        //\8fã\8bL\83G\83\89\81[\88È\8aO\82Ì\83G\83\89\81[\82ª\94­\90\82µ\82½\8fê\8d\87\81A\83N\83b\83L\81[\8eæ\93¾\82ð\8e¸\94s\82Æ\82·\82é
@@ -355,11 +353,11 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
                        
                }
                        
-               
+
                        
 
                //\8c\8b\89Ê\83R\81[\83h\94»\92è
-               if(cookieResult == ERROR_SUCCESS){
+               if(SUCCEEDED(cookieResult) == TRUE){
 
 
                        //\8eæ\93¾\82µ\82½\83N\83b\83L\81[\82Ì\83T\83C\83Y\82ª0\82æ\82è\91å\82«\82¯\82ê\82Î\81Aresults\82É\90³\8fí\8fI\97¹\82Ì\92l\82ð\90Ý\92è
@@ -376,7 +374,8 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
                //\8c\8b\89Ê\83R\81[\83h\82ª\90³\8fí\8fI\97¹\82Å\82Í\82È\82¢\8fê\8d\87results\82É\83G\83\89\81[\82Ì\8fÚ\8d×\82ð\90Ý\92è
                } else {
        
-
+                       
+                       errprint(TEXT("ieCookieGetError,hresult:%d"),cookieResult);
                        switch(cookieResult){
                                //\83o\83b\83t\83@\92·\82ª\91«\82è\82È\82¢\8fê\8d\87\82Ì\83G\83\89\81[winerror.h\82É\90Ý\92è\82³\82ê\82Ä\82¢\82È\82©\82Á\82½\82Ì\82Å\82»\82Ì\82Ü\82Ü\82Ì\92l\82Å\94ò\82Ô\82æ\82¤\82É\82µ\82Ä\82 \82é\82Ç\82±\82©\82É\92è\8b`\82³\82ê\82Ä\82¢\82é\82©\82à\82µ\82ê\82È\82¢\82Ì\82Å\8c©\82Â\82¯\82½\82ç\92è\8b`\83}\83N\83\8d\82É\92u\82«\8a·\82¦\82é
                        case 0x8007007a:
@@ -388,7 +387,7 @@ static INLINE COOKIE_RESULT GetCookieInternetExplorer(LPWSTR cookie,SIZE_T bufSi
                                //\96¢\92è\8b`\82Ì\83G\83\89\81[\82ª\94­\90\82µ\82½\8fê\8d\87
 
 
-                       case INTERNET_COOKIE_HTTPONLY:
+                       
                        default:
 
                                wincheck(cookieResult);