Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2006 Oct : Upgrade to IE7 causes error 122

www.cryer.info
Managed Newsgroup Archive

Upgrade to IE7 causes error 122

Subject:Upgrade to IE7 causes error 122
Posted by:"Jason" (jasonfi..@att.net)
Date:Fri, 20 Oct 2006 13:11:25

I have written software that uses wininet calls and verifies certificate
info. Upgrading to IE7 causes an error 122 to happening during this
sequence.  The following below is my code.

           IF
~InternetQueryOption(hRequest,INTERNET_OPTION_SECURITY_CERTIFICATE,,dwBytesAvailable)
              LastError = GetLastError()    ! --->This request gets the
buffer size needed
              Case LastError
              Of 122
                 DISPOSE(lpBuffer)
                 lpBuffer &= NEW(CSTRING(dwBytesAvailable + 1))
  ! --->Create the buffer for the response
                 IF
InternetQueryOption(hRequest,INTERNET_OPTION_SECURITY_CERTIFICATE,lpBuffer,dwBytesAvailable)
                    ReturnStr = Sub(ReturnStr,1,Len(ReturnStr)) & lpBuffer
                    Retcode = 1
                 ELSE
                    LastError = GetLastError()
                    MessageDisplay = 'Certificate Query Error: ' &
Clip(LastError); Display  ! ---> GET THE ERROR HERE
              Else
                 MessageDisplay = 'Certificate Query Error: ' &
Clip(LastError); Display
              End
           End

This code worked fine for IE6, but IE7 has the problem.  If anyone can shed
some light on why this has changed, I would greatly appreciate it.  Thanks
--
Jason Johnson
jasonfive@att.net

Replies:

www.cryer.info
Managed Newsgroup Archive