using the winHTTP.dll

Started by
5 comments, last by tarscher 20 years, 11 months ago
hi all, I need some functionality of winHTTP which is embedded in the winHTTP.DLL . How do I include the winHTTP.DLL in my project. Do I have to use some sort of #include (like a header )?? regards Stijn
Advertisement
two seconds with google and msdn.microsoft.com

quote:
Note If you want to compile this sample code, you must include Windows.h, Winhttp.h, and Stdio.h. Also, you must link to WinHttp.lib and have WinHttp.dll installed on your system.
I can't find where I have to add the dll to my project. Google and msdn didnt help me.

regards
Stijn

PS: I guess this applies to all DLL and not just the winHTTP.DLL

[edited by - Tarscher on May 6, 2003 11:38:36 AM]
quote:...you must link to WinHttp.lib and have WinHttp.dll installed on your system.


put winhttp.lib in the object/libraries modules option under project->settings->link tab

it should automatically find the dll for you at runtime.
The problem is I only have the dll file (winHTTP.dll) not the lib file . Since winHTTP 5.1 comes standard with win 2000 SP 3 (which i m running) it doesn''t seem to be that I can download that lib somewhere...

What am I missing here?

regards
Stijn
You need to download the WinHTTP 5.1 SDK..which I think is part of the Feb2003 Plafform SDK.

Also, are you trying to use the DLL exported functions or the COM component WinHttpRequest, which is contained in the dll too?

If you''re trying to use the exports then you need the lib file - so get the SDK.

Otherwise you just need to create the component using CoCreateInstance (or CoCreateInstanceEx) depending on your needs.

If you don''t know which one you want to use then this might help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/choosing_a_winhttp_interface.asp

thanks for the clear reply. The first time someone told me that winHTTP is included in that SDK. I could find it anywhere else.

It all works fine now and I m using the COM interface.

thanks again and regards
Stijn

This topic is closed to new replies.

Advertisement