You are previewing Programming with Managed Extensions for Microsoft® Visual C++® .NET.
O'Reilly logo
Programming with Managed Extensions for Microsoft® Visual C++® .NET

Book Description

This book thoroughly covers the Visual C++ managed extensions and how to write Microsoft .NET libraries and applications, plus features that are new to Visual C++.

Table of Contents

  1. Programming with Managed Extensions for Microsoft® Visual C++® .NET
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. Acknowledgments
    3. Introduction
      1. The Contents of This Book
        1. Chapter 1
        2. Chapter 2
        3. Chapter 3
        4. Chapter 4
        5. Chapter 5
        6. Chapter 6
        7. Chapter 7
        8. Appendix A
        9. Appendix B
      2. System Requirements
      3. Support
    4. 1. Managed Types
      1. New Keywords in Visual C++ .NET
        1. MSIL and Native Code
        2. C++ Primitive Types
      2. Managed Types and Value Types
        1. Managed Objects
          1. Methods on Managed Types
          2. Constructors
          3. Operators
        2. Value Types
          1. Enumerations
          2. Boxing
        3. Managed Pointers
          1. Pinning Pointers
        4. Passing by Reference and by Value
        5. Properties
        6. Delegates and Events
        7. Attributes
        8. Managed Interfaces
        9. Managed Strings
        10. Managed Arrays
        11. Exceptions and Managed Code
          1. Unmanaged Exceptions
      3. Implementing .NET Types
        1. Namespaces
        2. Inheritance
        3. Exporting and Importing Types
          1. Visibility
          2. Member Access
          3. Nested Types
          4. Using Types from Other Languages
        4. Casts and Conversions
          1. Cast Operators
          2. Conversion Operators
        5. Managed Operators
          1. Unary Operators
          2. Binary Operators
        6. Creating and Destroying Objects
        7. Entry Points
      4. Summary
    5. 2. Interop
      1. It Just Works!
        1. Native C++ Classes
          1. Native Types
          2. Implementation in Assemblies
          3. Inheritance and Native Classes
          4. Native Virtual Methods
          5. C++ Run-Time Type Information
          6. Templates
        2. CRT and Static-Link Libraries
        3. C++ Standard Library
        4. Managed Pointers in Unmanaged Types
        5. Global Methods
      2. Platform Invoke
        1. DllImport
        2. Platform Invoke Under the Covers
        3. Platform Invoke and Parameters
          1. Return Values and Exceptions
          2. Strings
          3. Arrays
          4. Structures
          5. Other Win32 Types
        4. Calling Win32 APIs Using IJW
        5. Marshaling
      3. Exceptions
      4. COM Interop
        1. .NET and COM Objects
          1. Interfaces
          2. COM Callable and Runtime Callable Wrappers
          3. COM Servers
        2. Tools
          1. Exporting Types
          2. Importing Types
        3. .NET COM Attributes
        4. Interfaces Defined by the .NET Framework
        5. Using COM Types in .NET
        6. Using .NET Types from COM
        7. Exceptions
        8. Marshaling .NET Objects
        9. Threading
        10. COM+ Interop
      5. Summary
    6. 3. Delegates and Events
      1. Delegates as Type-Safe Function Pointers
        1. Function Pointers with Unmanaged Code
        2. Function Pointers and Global Functions
        3. Delegates
        4. Dynamic Creation of Delegates
        5. Delegate Parameters
        6. Multicast Delegates
        7. Delegates as Smart Function Pointers
        8. Exceptions and Delegates
        9. Delegates and Interop
        10. Marshaling Delegates
      2. Asynchronous Programming
        1. Parameters and Asynchronous Delegates
        2. Calling Delegates Asynchronously
        3. Asynchronous Calls and Exceptions
        4. Asynchronous Calls and the .NET Framework Class Library
      3. Managed Events
        1. The .NET Framework and Events
        2. Unified Event Model
        3. COM Events
          1. Handling COM Events in .NET
          2. Handling .NET Events in COM
      4. Writing Multithreaded Code
        1. Managed Threads
        2. Thread States
        3. Foreground and Background Threads
        4. Thread Local Data
        5. Threads and Exceptions
        6. Synchronization Objects
        7. Thread Pool
        8. Synchronized Contexts
      5. Summary
    7. 4. User Interface Development
      1. Developing Windows Forms with C++
        1. Components and Containers
          1. Disposable Objects
          2. Components
          3. Writing Components
          4. Controls and Forms
          5. Forms as Control Containers
        2. Building GUI Applications
      2. Using GDI+
        1. Graphics Class
        2. Coordinate Structures
        3. Coordinate Transforms
        4. Clipping Regions
        5. Colors
        6. Pens
        7. Brushes
        8. Bitmaps
        9. Cursors
        10. Icons
        11. Text and Fonts
        12. Graphics Paths
        13. Regions
      3. Controls and Forms
        1. Where’s the WndProc?
        2. Standard Windows Controls
        3. Exceptions
        4. Events, Properties, and Status
        5. Controls and ActiveX Interfaces
        6. Control Handles
        7. Drag and Drop
        8. Superclassing
        9. Standard Forms
        10. Event Handling Strategies
        11. Using Windows Header Files
      4. Using Managed Resources
        1. Assemblies and Win32 Resources
        2. Managed Resources
        3. Compiled Managed Resources
        4. Localization
      5. Summary
    8. 5. Systems Programming
      1. Assemblies
        1. Portable Executable Files
        2. Metadata Directory
        3. Reading Metadata
        4. Assembly Format
          1. Version
          2. Culture
          3. Assembly Strong Name
        5. Assembly Configuration
          1. Configuration Files
          2. Application Settings
          3. Diagnostic Switches
          4. Remoting
          5. Startup
          6. Configuration Section Handlers
          7. Custom Configuration Sections
          8. Writing to Configuration Files
          9. Per-User Configuration Files
        6. Versioning and Fusion
          1. Private Assemblies
          2. Shared Assemblies
          3. PreJITted Assemblies
          4. Locating Assemblies
          5. Publisher Policy Files
      2. Security
        1. Code Access Security
        2. Role-Based Security
        3. Verifiable Code
      3. Unmanaged .NET Services API
        1. Enumerating Managed Processes
        2. Getting Information About the Garbage Collector
        3. Hosting the .NET Runtime
          1. Initializing the Runtime
      4. Summary
    9. 6. Building Code with Visual C++ .NET
      1. Visual Studio .NET IDE
        1. Commands
        2. Projects, Solutions, and Configurations
          1. Creating Projects and Solutions
          2. Solution Explorer
          3. Class View
          4. Resource View
          5. Solution Properties
          6. Project Properties
          7. Managing Configurations
        3. Visual Studio .NET Options
        4. Editing Code
          1. Text Editor
          2. Formatting Code
          3. Navigating Code
          4. Outlining
          5. IntelliSense
          6. Code Wizards
        5. Visual Studio .NET Command Line
        6. The DTE Object
        7. The Visual C++ 7 Libraries
      2. Project Types
        1. Managed Applications
        2. Managed Class Libraries
        3. Managed Object Files and Modules
        4. Makefile Projects
        5. Managed Web Services
        6. Web Service Clients
        7. Comment Web Pages
      3. Compiling Code
        1. Compiler Switches
          1. Precompiled Headers
        2. Linker Switches
        3. Optimization
        4. Build Steps
      4. Examples of Common Solutions
        1. Multiassembly Solutions
          1. Specifying a Search Order
          2. Using a Common Output Folder
        2. Multimodule Solutions
        3. Projects That Use Resources
        4. Solutions That Have Satellite Assemblies
      5. Summary
    10. 7. Debugging
      1. Writing Code for Debugging
        1. Debuggable Code
        2. .NET Conditional Code
        3. Tracing Code
          1. .NET Tracing
          2. Windows NT Event Log
          3. CRT Tracing
        4. Assertions
          1. .NET Asserts
          2. CRT Asserts
      2. Symbol Files and Managed Code
        1. Making Code Easier to Debug
      3. Using the Visual Studio .NET Debugger
        1. Locating Assemblies
        2. Starting the Debugger
          1. Debugging Through the IDE
          2. Attaching to a Running Process
          3. JIT Debugging
          4. The Exceptions Dialog Box
        3. Debugging Processes
          1. Stepping Through Code
          2. Setting Breakpoints
          3. The Call Stack Window
          4. Disassembly
          5. Memory Window
          6. Watch Window
          7. Immediate Mode
          8. Formatting Watch Variables
        4. Debugging Mixed Code
        5. Debugging Multithreaded Code
        6. Debugging Across Application Domains
        7. Remote Debugging
          1. Remote JIT Debugging
          2. Remote Debugging from the IDE
          3. Debugging .NET Remoting Applications
          4. Debugging Web Services
      4. Profiling
      5. Summary
    11. A. .NET Framework Libraries
      1. Strings
        1. Character Characterization
        2. String Routines
        3. Data Conversion
      2. Files and I/O
        1. Stream I/O
        2. Console I/O
        3. Formatted Output
        4. File Handling
        5. Directory Routines
        6. Process and Environment Control
      3. Time
      4. Containers
    12. B. Further Resources
      1. Tools
        1. ILDASM
        2. Anakrino
        3. MetaInfo
        4. Rotor
        5. DUMPBIN
        6. PEDump
        7. DbgView
        8. RegMon
      2. Tools Supplied with This Book
        1. Profiler
        2. HexDump
        3. DumpInterfaces
      3. Books
    13. C. About the Author
      1. Richard Grimes
    14. D.
      1. Drill Bits
    15. Index
    16. About the Author
    17. SPECIAL OFFER: Upgrade this ebook with O’Reilly