 |
Web Demo.
Unintentionally and unknowingly (and probably illegally), sponsored by The Daily Bikini.
Here's a demo of using the WinInet API asynchronously. Download the code and laugh at my feeble attempts
to be a Web programmer.
If you want the executable to work you'll need to download the JPEG library from
this site and put the DLL from it somewhere sensible. If you get it working (it seems to follow
that if Internet Explorer can connect to the web then this can) then it'll automatically download a random
picture from The Daily Bikini every time you run it, and set the downloaded image as your wallpaper. Top tip;
in the office (I connect to the Web via a WAN) I've got this in my StartUp group so every time I start my PC I get
a new picture on my desktop. Ooh, impresses the bosses no end.
This program uses loads of the techniques that you can find in other parts of this site like; JPEG code,
progress bar usage, setting the wallpaper and setting the icon for dialog boxes. If you can't understand
the explainations of those things that are on the Web, have a butcher's through this code. It might help.
If you (like me) connect to the web through a proxy server (if you don't know what this means then you don't)
then you'll have to change the code before it'll work. Alter the 'strcpy(config.szProxy,"\0");' and
'strcpy(config.szBypass,"\0");' lines to include the name of your proxy server and the sites that don't need
proxy verification. There's some examples just above these lines of my proxy server 'internet.gecm.com:80' and
the sites that end in 'gecm.com' which don't need us to go through the server. You'll also have to set the
'config.dwAccess' to 'INTERNET_OPEN_TYPE_PROXY' as shown in a commented out line so that this information gets
used.
This is a really ropey bit of Web code, look how it pretends to be Netscape Navigator v3 so that it can get
out of the firewall I use! If you check back here sometime in the future I might even update it so's it works
properly.
|
  |