相關主題
商品描述
- Features how to write .NET applications using C++ and mix unmanaged C++ and managed C++ code in the same application
- Shows when and why to use unmanaged code in .NET development
- All chapters include code samples with detailed explanations
The Essential Guide to Managed Extensions for C++ provides a comprehensive guide for programmers writing code in Managed Extensions for C++ (MC++). The information in this book comes straight from the horse’s mouth—both authors have been key members of the Visual C++ .NET compiler development team and have spent most of their time implementing the language and educating others about managed C++. Managed Extensions for C++ are extensions added to the Visual C++ .NET compiler to allow developers access to the functionality provided by the .NET Framework. Visual C++ .NET is the only .NET language that can generate both native and managed code, and it has a rich set of features to let you write managed applications for the .NET platform.
The book is divided into two parts. Part One covers the basics of MC++. It starts with an introduction to MC++. Then it gives a brief introduction to the .NET Framework. Next, it goes directly into the various features of MC++, including managed classes, interfaces, value types, properties, enumerations, pointers, arrays, operators, delegates, attributes, events, and exceptions.
Part Two of the book is devoted to the transition between the managed and unmanaged worlds. It starts with a general introduction to interoperability between managed and unmanaged code. The following chapters describe the Platform Invoke service, interoperability between COM and .NET, and various data marshaling techniques. The last chapter of Part Two shows how MC++ can be used to write interoperability layers over existing components with minimal overhead.
Contents
商品描述(中文翻譯)
- 介紹如何使用 C++ 撰寫 .NET 應用程式,並在同一應用程式中混合使用非管理的 C++ 和管理的 C++ 代碼
- 說明在 .NET 開發中何時以及為何使用非管理代碼
- 所有章節均包含詳細解釋的代碼範例
《C++ 管理擴展的基本指南》提供了針對使用管理擴展 (Managed Extensions) 撰寫 C++ 代碼的程式設計師的全面指南。本書中的資訊來自於兩位作者的第一手經驗——他們都是 Visual C++ .NET 編譯器開發團隊的關鍵成員,並花費大部分時間實現該語言並教育他人有關管理 C++ 的知識。管理擴展是添加到 Visual C++ .NET 編譯器中的擴展,允許開發人員訪問 .NET Framework 提供的功能。Visual C++ .NET 是唯一能夠生成本地代碼和管理代碼的 .NET 語言,並擁有豐富的功能集,讓您能夠為 .NET 平台撰寫管理應用程式。
本書分為兩個部分。第一部分涵蓋 MC++ 的基礎知識。它從 MC++ 的介紹開始,然後簡要介紹 .NET Framework。接下來,直接進入 MC++ 的各種特性,包括管理類別、介面、值類型、屬性、列舉、指標、陣列、運算子、委派、屬性、事件和例外。
本書的第二部分專注於管理和非管理世界之間的轉換。它首先介紹管理代碼和非管理代碼之間的互操作性。接下來的章節描述了平台調用服務、COM 和 .NET 之間的互操作性以及各種數據封送技術。第二部分的最後一章展示了如何使用 MC++ 撰寫互操作層,以最小的開銷覆蓋現有組件。
內容