Error code 1813 after calling HttpOpenRequest
I was trying to retrieve a file using the wininet library. So I did all the necessary steps, like InternetOpen, InternetConnect,etc. Then I call HttpOpenRequest like this:
hHttpOpen file doesn't return NULL so I try and call another function, either HttpAddRequestHeaders or HttpSendRequest and both of those fail. Any function called after HttpOpenRequest fails and I'm pretty sure it's because the handle returned from this function isn't correct. I did GetLastError and returned an error code of 1813. So you don't have to look it up this is what the description is on MSDN:
The specified resource type cannot be found in the image file.
I'm not doing anything with image files so why would I get this error? Am I incorrectly calling HttpOpenRequest? I used the syntax off MSDN? Thanks.