Who Can Use This Book

In writing this book, I assumed that readers are familiar with the Windows API (primarily the Win32 API) because OLE itself, unlike Win32, is not a technology for writing a complete application (although you could build one out of OLE components). I don't describe how to use Windows API functions, nor do I describe any of the intricate details of Windows itself. The focus of this book is strictly on OLE.

I also assume that readers are at least somewhat familiar with object-oriented programming because I can spend only a paragraph or two defining terms such as polymorphism and encapsulation. (Entire books could be written about these terms.) In addition, I assume a working familiarity with C++; almost all the samples are written using basic C++ constructs. If you are a C programmer, I've included some material on the companion CD that should help you understand enough C++ to understand the samples.

This book, however, is not intended only for programmers. In fact, the chapter organization allows a designer to gain architectural knowledge of OLE without having to wade through pages of source code listings. The first half or so of each chapter (except for Chapters 1 and 2) is devoted to architectural and theoretical concepts. The latter half of each chapter contains primarily programming details, plus a detailed look at the samples and a discussion of implementation issues.

The samples are written to work on systems with Windows 95, Windows NT 3.51, and Windows 3.1x (if you're still doing 16-bit work). They compile to 16-bit systems (with a couple of exceptions) as well as 32-bit systems (both ANSI and Unicode). To that end, you'll need the following development software on your system to work with the samples in this book:

Let me also mention that the OLE documentation is indispensable for working with this technology. In it you'll find all the OLE API functions and interfaces fully documented, which is not possible to do in a book such as this one. Typically, I just mention an API function, sometimes providing all the arguments but never providing the complete documentation. The same is true for OLE interfaces and their member functions.

In this book, I refer to the documentation simply as the OLE Programmer's Reference. At the time of writing, the documentation was actually named the OLE 2 Programmer's Reference and was published in two volumes. (The second contains OLE Automation topics separately.) Over time, the organization of these volumes might change, new volumes might be added, or the documentation might be called something different. So when I point you to the OLE Programmer's Reference, I mean you should look in your development kit for the latest documentation.

One last note about writing conventions before I gush with acknowledgments. OLE interfaces are sets of member functions, and I always present them in a C++ notation. When I refer to an interface as a whole, I use a notation such as IDataObject. In references to a member function of an interface, I use a C++ double colon, as in IDataObject::GetData. Once I've introduced the interface and have established the context, I often drop the interface name and refer to the function simply as GetData, for example. In this case, I am not referring to a global API function named GetData but to a member function of the interface under discussion.