XMLHttpRequest in C++ using WinHttp


My decision to use WinInet to implement my XMLHttpRequest class turned out to be a mistake! I went back to the drawing-board, and reimplemented the class using WinHttp, the more modern alternative from Microsoft. Here’s the code, the CPeteHttpRequest class that implements the classic XMLHttpRequest interface together with an app to test its use. It’s available for reuse with no restrictions.

Here’s the differences between this new version and the old WinInet-based one:

  • It no longer crashes when under heavy multi-thread use
  • The interface is now entirely in wide character strings
  • WinHttp is only available on Windows 2000, XP and Vista, so use the WinInet code for legacy support

More posts on porting Firefox add-ons to IE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: