Jooel,Well, I've just wasted about 2 days trying to track down a very strange COM bug (trap) with kixtart, kixforms and winhttp ... I thought it was something to do with WinHTTP and KiXforms not playing together nicely ... so i hacked and shaved at my code trying to narrow down the failure ... but no matter how hard I tried, I couldn't pin-point the problem. Then I tried to reproduce it with WinHTTP and some other COM object - so I used ADSI and was successfull. After all is said and done, I suspect that it's either a winhhtp bug or a kixtart bug.
The following script reproduces the trap. The trap only occurs if you specify a bad url in the HTTP get method. The strange thing is - is that if you play with the code, different permutations will no cause the trap. For example, this causes a trap (can you verify for me?):
break on
$user = getobject("WinNT://@LDOMAIN/@USERID,user")
$user.getinfo()
$http = createobject("winhttp.winhttprequest.5")
if @error = 0
$http.open("GET","xxx")
endif
exit 1
Now, here's a good one. Simply remove the if wrapper around winhttp and it runs fine (even with a bad url) !
break on
$user = getobject("WinNT://@LDOMAIN/@USERID,user")
$user.getinfo()
$http = createobject("winhttp.winhttprequest.5")
; if @error = 0
$http.open("GET","xxx")
; endif
exit 1
Oh yeah, it gets better. put everything back, comment out the first ADSI getinfo method, and everything works again ...
break on
$user = getobject("WinNT://@LDOMAIN/@USERID,user")
; $user.getinfo()
$http = createobject("winhttp.winhttprequest.5")
if @error = 0
$http.open("GET","xxx")
endif
exit 1
I'm about ready to pull my all my hair out because i wasted so much time trying to track this problem in kixforms. Would like to know if you've seen this weird behavior with winhttp yet ? And if you think it's a winhttp problem or a kixtart one (i think it's a kixtart bug myself, or kixtart not handling some kind of winhttp COM exception properly. i really don't know. I think this mostly because if you remove the IF statements and the error check, everything works fine.
Regards,
Baldy
[ 07 February 2002: Message edited by: Shawn ]