preface

I have been using C++/CLI ever since Microsoft made the early Alpha versions of the compiler available to Beta testers and MVPs in 2003, and at some point back then, I knew I wanted to write a book about it. Having co-authored a book on its predecessor, Managed C++, a few years ago, I thought that writing a book on a subject I was very familiar with, and one that was dear to my heart in a quasi-geeky sort of way, would be an excellent thing to do. Because my life and my career managed to keep me busy, I kept postponing the book idea until Mike Stephens from Manning Publications asked if I would be interested in writing for Manning. We discussed some issues with C++ experts, including several MVPs and Microsoft VC++ team members, and we finally decided on a tentative table of contents. The next half year saw me working on the book, and the result is what you’re holding in your hands (unless you’re reading the e-book, in which case the previous sentence would definitely sound a tad silly).

As most authors of technical books would concur, writing each chapter—nay, each section—was an intensely stimulating process. I discovered at least one exciting new feature, technique, or idea every few days, and I would then put it into writing. As I went along, I became more convinced of the powerful capabilities of C++/CLI as a means of native-managed interop; and the fact that many developers around the world don’t seem to be fully aware of what they can achieve with it spurred me on.

I have tried my best to use minimal examples that demonstrate a specific technique or set of techniques that can be applied to larger and more complex real-life development scenarios. It’s my hope that I have managed to portray the power and flexibility of the C++/CLI language in the few hundred pages of this book, and that you’ll derive as much information and gratification out of reading this book as I did in writing it.