did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780201379365

Essential Winlnet Developing Applications Using the Windows Internet API with RAS, ISAPI, ASP, and COM

by
  • ISBN13:

    9780201379365

  • ISBN10:

    0201379368

  • Edition: 1st
  • Format: Paperback
  • Copyright: 1998-12-22
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
List Price: $54.99

Summary

A few years ago I found out that I would be responsible for making our Windows product capable of connecting to a client's backend system and downloading data via the Hypertext Transfer Protocol (HTTP). As is common these days, I had a very short time frame. At the time, all I knew about HTTP was that somehow it made the Internet work. After becoming familiar with the protocol, I started researching the development tools available for the task at hand.

Because our application required advanced features like the secure sockets layer (SSL), proxies, dial-up connections, and caching, right away I knew that Winsock was out of the question. Although Winsock is what most developers use in projects like this, it requires the developer to implement all of the desired protocol functionality. The time frame dictated that this was not viable.

I continued my search for the latest and greatest HTTP component. I wanted something that not only took care of the advanced protocol features, but would also allow me to work with the protocol through a high-level interface. Although I found a few ActiveX controls that claimed to do this, I found all of them lacking in major functional areas.

Just when I thought all hope was lost, I discovered Microsoft's new Windows Internet API, also known as WinInet. After immersing myself in WinInet, I was pleased to find that it provided just the layer of abstraction that I needed. I learned that WinInet elegantly simplifies all of the advanced HTTP features mentioned earlier. In short, it was the perfect development tool for the project.

As it turned out, choosing WinInet allowed us to complete the project successfully on schedule with all of the required HTTP functionality incorporated. Although I make it sound like a bed of roses, there were plenty of obstacles along the way. The biggest obstacle was the lack of WinInet documentation. Because WinInet is such a new and unheard of technology, not much WinInet documentation exists.

As a result of this lack of documentation, I struggled through the WinInet learning curve and other problematic issues that cost me many late nights. After completing the project, I decided that I could help other developers avoid the same problems that I encountered. Hence, I set out to write a few articles for Microsoft Interactive Developer and Microsoft Systems Journal on the topic. Publishing the articles was like giving a few drops of water to a parched soul. The e-mail started pouring in with follow-up questions on various WinInet topics.

Even today, the WinInet documentation only includes the online documentation, a few technical articles, and a single chapter in a couple of Visual C++/Microsoft Foundation Classes (MFC) books. After experiencing the demand and witnessing the shortage, I realized the need for a single, authoritative source for WinInet information-- Essential WinInet .

At the time of this writing, Essential WinInet is the only book on the market dedicated entirely to the Windows Internet API. Other books may cover WinInet briefly, but none of them helped me in my time of need. The purpose of this book is to help both the WinInet beginner as well as the WinInet warrior who is already battling on the front line. This book is more than an API tutorial because it's based on real-world experience. Throughout the book you'll find valuable information and basic tips that I wish someone would have told me when I first started. Hopefully, this book will not only save you time and money, but will also reduce grief and headaches.

Organization

This book is divided into five parts: WinInet Basics, WinInet Protocol-Specific Functions, MFC and Visual Basic, Advanced WinInet, and Internet Client/Server Applications. If you're a WinInet beginner, you'll benefit tremendously from Parts I and II. By the time you finish the first two parts, you'll have a complete understanding of WinInet and will be able to write WinInet programs using any of the WinInet-supported protocols.

If you're an MFC or Visual Basic programmer, you'll want to pay special attention to Part III. The two chapters that make up Part III focus on using WinInet with each of these popular development tools. The chapter on MFC not only shows you how to use the WinInet MFC classes, but also provides valuable insight into how the classes interact with the API behind the scenes.

Part IV covers advanced WinInet topics, including asynchronous WinInet, writing HTTP Component Object Model (COM) components, and establishing dial-up connections (also covering the Remote Access Service API). Each chapter in this section offers a practical sample application worth more than a thousand pages of explanation. For example, Chapter 9 walks through the process of creating a full-featured, asynchronous File Transfer Protocol client for Windows. Also, Chapter 10 demonstrates how to develop my all-time favorite sample program, Stock Watcher. Stock Watcher is a personal stock portfolio application that is capable of connecting to various stock quote providers on the Internet (Yahoo!, Quote.com, and Datek) and downloading real-time stock quotes.

The final part of this book, Part V, introduces the concept of Internet client/server programming. It briefly covers the most widely used server-side technologies including Common Gateway Interface (CGI), Internet Server API (ISAPI), and Active Server Pages (ASP); then it walks you through a sample program that demonstrates how to implement a complete client/server solution using these technologies.

Appendix A contains a Transmission Control Protocol/Internet Protocol (TCP/IP) tutorial for those of you craving to know more about how the Internet works under the hood. This section covers both the TCP and IP protocols, and offers some informative diagrams to help you see through the fog. Appendixes B, C, and D contain descriptions of the most common WinInet API flags, option flags, and error messages. Finally, Appendix E contains a list of recommended supplemental reading on most of the technologies mentioned throughout the book including WinInet, Internet protocols, COM, Active Template Library (ATL), multithreading, Internet Server API (ISAPI), and Active Server Pages (ASP). If this book leaves you wanting more in one of those areas, be sure to check out my recommendations.

Tips

The tips included throughout this book are very helpful. Some are related to a problem that I encountered that cost me extra time to figure out. Other tips contain pieces of information not found anywhere in the online documentation. You can be sure that all tips found in this book are definitely tip worthy and should not be overlooked. Tips appear in a shaded box and are called out with an icon.

Web Site

If you're still wondering where the accompanying CD is, you can stop looking-- there isn't one. Because this book is about Windows Internet development, I thought it would be more than appropriate to replace the standard accompanying CD with the Essential WinInet Web site. All sample programs found throughout the book can be downloaded from the Essential WinInet Web site. As bugs surface (as I'm sure they will), I'll post regular updates to the sample code. The Essential WinInet Web site may also serve as the central location for WinInet information. It not only contains links to other WinInet sites on the Web, but also contains an up-to-date list of recommended reading.



0201379368P04062001

Author Biography

Aaron Skonnard is a member of the technical staff at DevelopMentor and a contributing editor to MSDN Magazine, where he writes "The XML Files" column.



0201379368AB05302001

Table of Contents

Contents ix(8)
Preface xvii(4)
Acknowledgments xxi
Part I WinInet Basics 1(86)
Chapter 1 WinInet Basics
3(24)
Chapter 2 WinInet General Functions
27(36)
Chapter 3 Handling URLs
63(24)
Part II WinInet Protocol-Specific Functions 87(126)
Chapter 4 HTTP Functions
89(50)
Chapter 5 FTP Functions
139(42)
Chapter 6 Gopher Functions
181(32)
Part III MFC and Visual Basic 213(70)
Chapter 7 WinInet MFC Internet Classes
215(54)
Chapter 8 WinInet in Visual Basic
269(14)
Part IV Advanced WinInet 283(132)
Chapter 9 Asynchronous WinInet
285(28)
Chapter 10 Reusable WinInet COM Components
313(64)
Chapter 11 Establishing a Dial-up Connection
377(38)
Part V Internet Client/Server Applications 415(36)
Chapter 12 Internet Client/Server Applications with WinInet, ISAPI, and ASP
417(34)
Appendix A TCP/IP Tutorial 451(10)
Appendix B API Flags 461(4)
Appendix C Internet Option Flags 465(6)
Appendix D Error Messages 471(6)
Appendix E Recommended Reading 477(4)
Index 481

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

A few years ago I found out that I would be responsible for making our Windows product capable of connecting to a client''s backend system and downloading data via the Hypertext Transfer Protocol (HTTP). As is common these days, I had a very short time frame. At the time, all I knew about HTTP was that somehow itmade the Internet work. After becoming familiar with the protocol, I started researching the development tools available for the task at hand. Because our application required advanced features like the secure sockets layer (SSL), proxies, dial-up connections, and caching, right away I knew that Winsock was out of the question. Although Winsock is what most developers use in projects like this, it requires the developer to implement all of the desired protocol functionality. The time frame dictated that this was not viable. I continued my search for the latest and greatest HTTP component. I wanted something that not only took care of the advanced protocol features, but would also allow me to work with the protocol through a high-level interface. Although I found a few ActiveX controls that claimed to do this, I found all of them lacking in major functional areas. Just when I thought all hope was lost, I discovered Microsoft''s new Windows Internet API, also known as WinInet. After immersing myself in WinInet, I was pleased to find that it provided just the layer of abstraction that I needed. I learned that WinInet elegantly simplifies all of the advanced HTTP features mentioned earlier. In short, it was the perfect development tool for the project. As it turned out, choosing WinInet allowed us to complete the project successfully on schedule with all of the required HTTP functionality incorporated. Although I make it sound like a bed of roses, there were plenty of obstacles along the way. The biggest obstacle was the lack of WinInet documentation. Because WinInet is such a new and unheard of technology, not much WinInet documentation exists. As a result of this lack of documentation, I struggled through the WinInet learning curve and other problematic issues that cost me many late nights. After completing the project, I decided that I could help other developers avoid the same problems that I encountered. Hence, I set out to write a few articles for Microsoft Interactive Developerand Microsoft Systems Journalon the topic. Publishing the articles was like giving a few drops of water to a parched soul. The e-mail started pouring in with follow-up questions on various WinInet topics. Even today, the WinInet documentation only includes the online documentation, a few technical articles, and a single chapter in a couple of Visual C++/Microsoft Foundation Classes (MFC) books. After experiencing the demand and witnessing the shortage, I realized the need for a single, authoritative source for WinInet information-- Essential WinInet. At the time of this writing, Essential WinInetis the only book on the market dedicated entirely to the Windows Internet API. Other books may cover WinInet briefly, but none of them helped me in my time of need. The purpose of this book is to help both the WinInet beginner as well as the WinInet warrior who is already battling on the front line. This book is more than an API tutorial because it''s based on real-world experience. Throughout the book you''ll find valuable information and basic tips that I wish someone would have told me when I first started. Hopefully, this book will not only save you time and money, but will also reduce grief and headaches. Organization This book is divided into five parts: WinInet Basics, WinInet Protocol-Specific Functions, MFC and Visual Basic, Advanced WinInet, and Internet Client/Server Applications. If you''re a WinInet beginner, you''ll benefit tremendously from Parts I and II. By the time you finish the first two parts, you''ll have a complete understanding of WinInet and will be able to write WinInet programs using any of the WinInet-supported protocols. If you''re an MFC or Visual Basic programmer, you''ll want to pay special attention to Part III. The two chapters that make up Part III focus on using WinInet with each of these popular development tools. The chapter on MFC not only shows you how to use the WinInet MFC classes, but also provides valuable insight into how the classes interact with the API behind the scenes. Part IV covers advanced WinInet topics, including asynchronous WinInet, writing HTTP Component Object Model (COM) components, and establishing dial-up connections (also covering the Remote Access Service API). Each chapter in this section offers a practical sample application worth more than a thousand pages of explanation. For example, Chapter 9 walks through the process of creating a full-featured, asynchronous File Transfer Protocol client for Windows. Also, Chapter 10 demonstrates how to develop my all-time favorite sample program, Stock Watcher. Stock Watcher is a personal stock portfolio application that is capable of connecting to various stock quote providers on the Internet (Yahoo!, Quote.com, and Datek) and downloading real-time stock quotes. The final part of this book, Part V, introduces the concept of Internet client/server programming. It briefly covers the most widely used server-side technologies including Common Gateway Interface (CGI), Internet Server API (ISAPI), and Active Server Pages (ASP); then it walks you through a sample program that demonstrates how to implement a complete client/server solution using these technologies. Appendix A contains a Transmission Control Protocol/Internet Protocol (TCP/IP) tutorial for those of you craving to know more about how the Internet works under the hood. This section covers both the TCP and IP protocols, and offers some informative diagrams to help you see through the fog. Appendixes B, C, and D contain descriptions of the most common WinInet API flags, option flags, and error messages. Finally, Appendix E contains a list of recommended supplemental reading on most of the technologies mentioned throughout the book including WinInet, Internet protocols, COM, Active Template Library (ATL), multithreading, Internet Server API (ISAPI), and Active Server Pages (ASP). If this book leaves you wanting more in one of those areas, be sure to check out my recommendations. Tips The tips included throughout this book are very helpful. Some are related to a problem that I encountered that cost me extra time to figure out. Other tips contain pieces of information not found anywhere in the online documentation. You can be sure that all tips found in this book are definitely tip worthyand should not be overlooked. Tips appear in a shaded box and are called out with an icon. Web Site If you''re still wondering where the accompanying CD is, you can stop looking-- there isn''t one. Because this book is about Windows Internet development, I thought it would be more than appropriate to replace the standard accompanying CD with the Essential WinInetWeb site. All sample programs found throughout the book can be downloaded from the Essential WinInetWeb site. As bugs surface (as I''m sure they will), I''ll post regular updates to the sample code. The Essential WinInetWeb site may also serve as the central location for WinInet information. It not only contains links to other WinInet sites on the Web, but also contains an up-to-date list of recommended reading. 0201379368P04062001

Rewards Program