HTTPOpenRequest always give error code 87

Hi all,

I am stuck with one so called irritating problem, I have written one HTTP client to upload one text file to my local server.

And the upload works without fail if I run my application in Debug Mode.. i.e. HTTPOpenRequest always passes, but for some reason HTTPSendRequest always fails in Release Mode with error code (87).

Dont know where I am doing wrong. I compared the project settings for both Debug and Release, but couldnt short out the issue.

Please help me, I am stuck with this problem since quite a few days.

Thanks in advance...

Regards,
Manish Raj
[630 byte] By [manishraj] at [2007-11-20 11:39:49]
# 1 Re: HTTPOpenRequest always give error code 87
When you say it returns "error code (87)", is that the value returned by a call to GetLastError()? And is GetLastError() called immediately (i.e. on the very next line of code) after the call to HTTPSendRequest()?

Error code 87 is ERROR_INVALID_PARAMETER. Are you certain that all parameters are the same as between debug and release versions?

Mike
MikeAThon at 2007-11-9 13:55:49 >
# 2 Re: HTTPOpenRequest always give error code 87
thanks for your reply..

yeah error code(87) is returned by GetLastError() and I call this immediately after HTTPOpenRequest... " I am sorry it was not HTTPSendRequest, I mean control never reaches till HTTPSendRequest but fails just after calling HTTPOpenRequest in debug mode "...

And I am very much sure that all parameters are same in both debug and release versions? As I run the same code in debug and release mode without any modification, and it runs without fail in Debug mode and fails consistently in Release mode.

Its really strange... :(

-Manish Raj
manishraj at 2007-11-9 13:56:50 >