views:

118

answers:

0

I am using WinHTTP (WinAPI interface) in a C program. When I'm running the relase build from outside the ide (that is, without any debugger. IDE is VS2008) it works fine.

However, if I run it inside the debugger (either the release or the debug build), or if I run the debug build from outside, WinHTTP won't work right.

The status callback will get called only three times, for

WINHTTP-CALLBACK-STATUS-RESOLVING-NAME,
WINHTTP-CALLBACK-STATUS-NAME-RESOLVED
and
WINHTTP-CALLBACK-STATUS-CONNECTING-TO-SERVER

Then it simply won't get called anymore.

How can I fix that?