WinInet and doubtful assertion in FTP_Connect

Krzysztof Foltman kfoltman at portal.onet.pl
Sat Sep 4 09:02:36 CDT 2004


For some reason, FTP connections in WININET crash on assertion:

     assert( hIC->hdr.htype != WH_HINIT );

However, it seems the assertion is either wrong, or confusing (if its 
intention was to point out that FTP code is unimplemented).

FTP_Connect is called from two places, InternetConnectW and 
InternetOpenUrlW.

As for InternetConnectW, it won't call FTP_Connect unless htype is set 
to WH_HINIT.

As for InternetOpenUrlW, I'm not sure what htype does it expect. 
However, it's supposed to use HINTERNET handles coming out of 
InternetOpen, which sets htype to WH_HINIT.

After changing != to ==, InternetConnect works (to a degree). Don't know 
about InternetOpenUrl, but theoretically it should too.

Chris



More information about the wine-devel mailing list