Simple HTTP Requests

First, let's look at writing code to make simple HTTP requests such as requesting an HTML page from an Internet server. To do this the following calls should be made:

  1. InternetOpen to initialize the Windows CE Internet functions and return a handle to access other Internet functions

  2. InternetOpenUrl to send a request to open a resource on a server and return a request handle

  3. InternetReadFile repeatedly until all the data has been read from the server

  4. InternetCloseHandle on each handle returned from steps 1 and 2

InternetOpen need only be called once, typically when the application is started or the first HTTP request is made. The handle returned by InternetOpen should eventually be closed, for example when the application terminates. ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.