C++ WinHttp wrapper class

by tsachi 14. March 2009 14:57

The source code for WinHttp wrapper covers the followings methods:

BOOL AddRequestHeaders( LPCWSTR pwszHeaders, DWORD dwHeadersLength, DWORD dwModifiers );

static BOOL CheckPlatform(void);

BOOL CloseSession();

BOOL CloseConnection();

BOOL CloseRequest();

BOOL Connect( LPCWSTR pswzServerName, INTERNET_PORT nServerPort );

BOOL CrackUrl( LPCWSTR pwszUrl, DWORD dwUrlLength, DWORD dwFlags, LPURL_COMPONENTS lpUrlComponents );

BOOL CreateUrl( LPURL_COMPONENTS lpUrlComponents, DWORD dwFlags, LPWSTR pwszUrl, LPDWORD lpdwUrlLength );

BOOL DetectAutoProxyConfigUrl( DWORD dwAutoDetectFlags, LPWSTR* ppwszAutoConfigUrl );

static BOOL GetDefaultProxyConfiguration( WINHTTP_PROXY_INFO* pProxyInfo );static BOOL GetIEProxyConfigForCurrentUser( WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* pProxyConfig );

BOOL GetProxyForUrl( LPCWSTR lpcwszUrl, WINHTTP_AUTOPROXY_OPTIONS* pAutoProxyOptions, WINHTTP_PROXY_INFO* pProxyInfo );

BOOL Open( LPCWSTR pwszUserAgent, DWORD dwAccessType, LPCWSTR pwszProxyName, LPCWSTR pwszProxyBypass, DWORD dwFlags );

BOOL OpenRequest( LPCWSTR pwszVerb, LPCWSTR pwszObjectName, LPCWSTR pwszVersion, LPCWSTR pwszReferrer, LPCWSTR* ppwszAcceptTypes, DWORD dwFlags );

BOOL QueryAuthSchemes( LPDWORD lpdwSupportedSchemes, LPDWORD lpdwFirstScheme, LPDWORD pdwAuthTarget );

BOOL QueryDataAvailable( LPDWORD lpdwNumberOfBytesAvailable );

BOOL QueryHeaders( DWORD dwInfoLevel, LPCWSTR pwszName, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex );

BOOL QuerySessionOption( DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength );

BOOL QueryRequestOption( DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength );

BOOL ReadData( LPVOID lpBuffer, DWORD dwNumberOfBytesToRead, LPDWORD lpdwNumberOfBytesRead );

BOOL ReceiveResponse( );

BOOL SendRequest( LPCWSTR pwszHeaders, DWORD dwHeadersLength, LPVOID lpOptional, DWORD dwOptionalLength, DWORD dwTotalLength, DWORD_PTR dwContext );

BOOL SetCredentials( DWORD AuthTargets, DWORD AuthScheme, LPCWSTR pwszUserName, LPCWSTR pwszPassword, LPVOID pAuthParams );

BOOL SetDefaultProxyConfiguration( WINHTTP_PROXY_INFO* pProxyInfo );

BOOL SetSessionOption( DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength );

BOOL SetRequestOption( DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength );

WINHTTP_STATUS_CALLBACK SetStatusCallback( WINHTTP_STATUS_CALLBACK lpfnInternetCallback, DWORD dwNotificationFlags);

BOOL SetTimeouts(
int dwResolveTimeout, int dwConnectTimeout, int dwSendTimeout, int dwReceiveTimeout );

static BOOL TimeFromSystemTime( SYSTEMTIME* pst, LPWSTR pwszTime );

static BOOL TimeToSystemTime( LPCWSTR pwszTime, SYSTEMTIME* pst );

BOOL WriteData( LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite, LPDWORD lpdwNumberOfBytesWritten );

 

 

WinHttp.cpp (6.92 kb)

WinHttp.h (2.83 kb)

 

 

Tags: , , , , ,

C/C++

Comments

5/28/2010 7:53:47 PM #

live chat with strippers

My boss just yelled at me cause i didn't do it right just a few moments ago. I'm trying to wrap my mind around this and find an easy solution out but i guess i'll have to outsource it in the end cause i'm just to early now. Well watever, there has to be something to work...

live chat with strippers United States

5/30/2010 9:26:28 PM #

Bronwyn Sowders

Im no expert, but I feel you just made the best point.  You clearly know a lot about what youre talking about, and I can truly get behind that.  Thanks for getting so upfront and so honest in regards to the theme matter.  I really sense like We've a greater understanding now.

Bronwyn Sowders United States

6/4/2010 5:24:25 PM #

modern decorative pillows

I really love your blog, Its wonderful to spot not everyone is just posting a bunch of waste these days!

modern decorative pillows United States

6/12/2010 5:43:27 AM #

Premium Web Directory

Extremely Good Blogpost. Would you thoughts if I take a tiny snippets of the write-up and obviously link it to your blogposts??

Premium Web Directory United States

6/18/2010 7:51:45 AM #

alex

Thank you for the piece of info . Add this web proxy ( http://www.notrailsurf.com ) in next post.
Thanks

alex United States

6/19/2010 11:26:10 PM #

kid lab coat

Thats awesome Post Bookmarked!!

kid lab coat United States

6/25/2010 3:45:00 AM #

Free Celebrity Wallpapers

I assumed it was heading to become some unexciting old report, nonetheless it really compensated for my time. I most unquestionably will article a link to this write-up on my web page. I'm convinced my site visitors are about to pick that realistically helpful.

Free Celebrity Wallpapers United States

7/5/2010 7:25:32 AM #

Lavelle Liebowitz

Just a heads up... your blog looks very strange in Mozilla on a Mac

Lavelle Liebowitz United States

7/5/2010 9:08:06 PM #

Kurtis Meszaros

I've signed up for your rss feed after reading this item! Would you publish more on the subject in future articles?

Kurtis Meszaros United States

7/6/2010 1:24:26 PM #

vampire

Trubloods.com is really the web site dedicated to giving you every single one regarding the many advantages because well because night together with the hit demonstrate True Blood. True Blood is actually known as as the particular manufactured blood the japanese have got developed now vampires of the actual underworld come out in the night in order to try and also exist together with humans. You stick to Sookie Stackhouse because your woman deals with the particular disarray that will be out there about the planet. There is romance, humor, actions, and many more when you notice pumpkin heads, human beings and also supernaturals clash in the town of Bon Temperatures, Louisiana. Monitor absolutely free avenues at trubloods.com!

vampire Bahrain

7/7/2010 8:14:37 AM #

Nell Halliwell

Odd... I just stumbled on your blog by searching for 'financial spreadbetting' on Bing. But I can't find any articles about that on here?

Nell Halliwell United States

7/11/2010 10:15:37 PM #

starting a salon

Cool piece of writing, thanks. Would you explain the second part in additional detail please?

starting a salon United States

7/12/2010 9:27:48 PM #

Nan Wauson

I was looking out for articles about this on Bing and came upon your piece. I found it to be nice and clear. Thanks

Nan Wauson United States

7/13/2010 11:37:30 AM #

Voucher Code

Strange... I just came across your website by searching for 'financial spreadbetting' on Bing. But I haven't found any posts on that on here?

Voucher Code United States

7/14/2010 4:44:32 AM #

Demo Forex

Hello webmaster can I use some of the information from this post if I provide a link back to your site?

Demo Forex United States

7/15/2010 8:52:37 PM #

platinum diamond rings

Hello webmaster can I use some of the information from this post if I provide a link back to your site?

platinum diamond rings United States

8/6/2010 10:22:00 AM #

Web Development

I'm not 100% sure on this , but I like your idea. I also think that most of the people  agree with you thoughts.

Web Development United States

8/7/2010 5:46:21 AM #

Driving instructors in Birmingham

By visiting your webpage, the first impression for me is strong. I can’t imagine when and why you share this great topic but don’t spread it with social bookmarking. This information can be published as reference in online journal, or even in press release site. An early improvement in your site is great, can give us more time in your website. Would you mind if I capture several screenshot as my collection, because I’ve joined several researches? General purpose for me is to tell you about this discussion. My critical question for us is the resource that you have used to manage this site. In order to make great discussion, you are great because you post new topic in several areas. But, I suggest in giving personal opinion, please refer to big or authority sites, I am sure you will be fine in giving past or future experiences. In my environment, I am sure your capability to enrich people can be strong advantage for your future.

Driving instructors in Birmingham United Kingdom

8/23/2010 5:25:37 AM #

cam sex

daar ben ik het mee eens renske gaat eens even goed uitzieken en dan kunnen we er weer tegenaan, ik kan niet wachten! (sorry for Dutch speaking)

cam sex United States

8/24/2010 4:48:06 PM #

ÿþt

Hallo im from germany and my english isnt that amazing, but i was able to understand every single word of your post. Im reading english websites to make my english better and im very euphoric to eventually find a blog, which writes clear and structured english i´m able understand. Thanks from Germany!

ÿþt United States

8/25/2010 10:32:08 PM #

Cam Girls

Renske gaat toch maar proberen te twitteren, misschien helpt het bij die keelonsteking... kakkeel. Thank Yous!

Cam Girls United States

8/28/2010 1:40:24 PM #

chat nude

Excellent post I must say.. Simple but yet interesting and engaging.. Keep up the good work!

chat nude United States

8/30/2010 6:11:55 AM #

real touch

I take pleasure in your blog, Its nice to see not every body is just posting a bunch of garbage these days!

real touch United States

9/2/2010 6:17:04 PM #

yard signs

I love your blog, Its wonderful to find not absolutely everyone is just posting a mess of crap these days!

yard signs United States

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Advertisements

About the author

9+ years experience in software, software engineering, software development, software architecture, software development methodology and practices, web, internet, intranet, distributed application, client/server, object-oriented analysis and design, requirements analysis and modeling, data modeling, and database design. Progressed through end-user application, servers and databases work to management positions. Held positions with management responsibility, including training and technological leading, for up to 5 employees. Engaged in computer applications development with focus over video streaming, web and security.