about this book

This book is targeted at intermediate or higher-level Win32/VC++ developers with basic .NET awareness who are writing new managed apps or enhancing existing VC++ apps with managed technologies like the .NET Framework, Windows Forms, WPF, or WCF. Other targets for the book include MC++ developers looking to move to the new syntax, and C# or VB.NET developers who want to write mixed-mode code and leverage the more powerful features available in C++/CLI.

The book covers the following topics:

This book will not do the following:

Roadmap

The book is divided into three parts. The first part (chapters 1 through 3) introduces you to C++/CLI. The next two chapters cover mixed-mode programming, and the last part of the book (chapters 6 though 8), is devoted to how to use managed networks from native applications.

Source code

All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. Annotations accompany many of the listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing.

Source code for all of the working examples in this book is available for download from http://www.manning.com/sivakumar or http://www.manning.com/C++/CLIinAction.

Author Online

Purchase of C++/CLI in Action includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum and subscribe to it, point your web browser to http://www.manning.com/sivakumar. This page provides information on how to get on the forum once you are registered, what kind of help is available, and the rules of conduct on the forum.

Manning’s commitment to our readers is to provide a venue where a meaningful dialog between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the AO remains voluntary (and unpaid). We suggest you try asking the author some challenging questions, lest his interest stray!

The Author Online forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

About the author

Nishant Sivakumar is a software developer living in Atlanta who has been coding since 1990. Originally from sunny Trivandrum in India, he recently moved to Atlanta from Toronto and is just a little sad that he won’t be able to play in snow anymore.

Nish has several years of experience in Visual C++ and .NET technologies and has been a Microsoft Visual C++ MVP since October 2002. Nish has also been named CodeProject MVP for 2005, 2006, and 2007. He maintains an MVP tips-and-tricks website (http://www.voidnish.com) where you can find a consolidated list of his articles, writings, and ideas about VC++, MFC, .NET, and C++/CLI. Nish blogs about technology and his life at blog.voidnish.com.

About the title

By combining introductions, overviews, and how-to examples, the In Action books are designed to help learning and remembering. According to research in cognitive science, the things people remember are things they discover during self-motivated exploration.

Although no one at Manning is a cognitive scientist, we are convinced that for learning to become permanent it must pass through stages of exploration, play, and, interestingly, re-telling of what is being learned. People understand and remember new things, which is to say they master them, only after actively exploring them. Humans learn in action. An essential part of an In Action guide is that it is example-driven. It encourages the reader to try things out, to play with new code, and explore new ideas.

There is another, more mundane, reason for the title of this book: our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily and learn just what they want just when they want it. They need books that aid them in action. The books in this series are designed for such readers.

About the cover illustration

The figure on the cover of C++/CLI in Action is a “Member of the Divan,” the Turkish Council of State or governing body. The illustration is taken from a collection of costumes of the Ottoman Empire published on January 1, 1802, by William Miller of Old Bond Street, London. The title page is missing from the collection and we have been unable to track it down to date. The book’s table of contents identifies the figures in both English and French, and each illustration bears the names of two artists who worked on it, both of whom would no doubt be surprised to find their art gracing the front cover of a computer programming book...two hundred years later.

The collection was purchased by a Manning editor at an antiquarian flea market in the “Garage” on West 26th Street in Manhattan. The seller was an American based in Ankara, Turkey, and the transaction took place just as he was packing up his stand for the day. The Manning editor did not have on his person the substantial amount of cash that was required for the purchase and a credit card and check were both politely turned down. With the seller flying back to Ankara that evening the situation was getting hopeless. What was the solution? It turned out to be nothing more than an old-fashioned verbal agreement sealed with a handshake. The seller simply proposed that the money be transferred to him by wire and the editor walked out with the bank information on a piece of paper and the portfolio of images under his arm. Needless to say, we transferred the funds the next day, and we remain grateful and impressed by this unknown person’s trust in one of us. It recalls something that might have happened a long time ago.

The pictures from the Ottoman collection, like the other illustrations that appear on our covers, bring to life the richness and variety of dress customs of two centuries ago. They recall the sense of isolation and distance of that period—and of every other historic period except our own hyperkinetic present.

Dress codes have changed since then and the diversity by region, so rich at the time, has faded away. It is now often hard to tell the inhabitant of one continent from another. Perhaps, trying to view it optimistically, we have traded a cultural and visual diversity for a more varied personal life. Or a more varied and interesting intellectual and technical life.

We at Manning celebrate the inventiveness, the initiative, and, yes, the fun of the computer business with book covers based on the rich diversity of regional life of two centuries ago‚ brought back to life by the pictures from this collection.