Extending MFC Applications with the .NET Framework

Book description

“To anyone looking to augment their existing MFC code base and knowledge with the powerful .NET classes—which provide such capabilities as disconnected data, in-memory database (IMDB), regular expressions, and data encryption—Tom Archer’s book has it all.”

Erik Westermann, Lead Architect, Eidenai Innovations

Extending MFC Applications with the .NET Framework is the first book to show MFC developers how to boost productivity by incorporating .NET functionality into existing MFC applications. Tom Archer clearly illustrates how using the .NET Base Class Library (BCL)—to complement or replace MFC classes when there is a clear advantage—enables MFC developers to create elegant and robust Windows applications in the most efficient way possible.

Each chapter begins with an introduction that explains the technology, outlines its benefits, lists its pragmatic business uses, and summarizes the required syntax. As is an Archer trademark, this information is solidified with hands-on, practical demo applications.

This book answers the questions MFC developers have about .NET, including:

  • What are the key issues when combining MFC and Managed Extensions? Page 15

  • How can Regular Expressions be used to parse a document for multiple complex pattern types, such as email addresses? Page 84

  • How can hash codes be used to validate users without storing passwords? Page 161

  • How can MFC applications maintain data stored in XML format? Page 274

  • Once an ADO.NET DataSet is filled, how can the data be searched, sorted, and filtered? Page 336

  • What technique is used for reading image data from a database using ADO.NET classes? Page 363

  • What are the options for handling disconnected data concurrency issues? Page 396

  • How can Remoting be used to pass MFC objects between applications? Page 460

  • The CD-ROM supplies the complete downloadable source code, working samples, and test code from the book, as well as several productivity-enhancing utilities such as a Visual Studio .NET Custom AppWizard.


    Table of contents

    1. Copyright
    2. Praise for Extending MFC Applications with the .NET Framework
    3. Foreword
    4. Preface
    5. Acknowledgments
    6. Combining MFC and Managed Extensions
      1. Introduction
      2. Writing a Managed Extensions Application
      3. Writing an MFC Application That Accesses .NET
      4. Mixed-Mode Programming Issues
      5. Working with .NET Types
      6. Summary
    7. Regular Expressions
      1. Introduction
      2. Using the Regex Class to Split Strings
      3. Searching Strings with the Match and MatchCollection Classes
      4. Processing Groups and Captures
      5. Parsing and Replacing Strings
      6. Replacing Matches Using Groups and Substitution Patterns
      7. Putting It All Together: Writing an E-mail Parser
      8. Summary
    8. File I/O and Registry
      1. Introduction
      2. Stream, Readers, and Writers in .NET
      3. File System Classes
      4. Accessing the Registry
      5. Summary
    9. Cryptography, Hash Codes, and Data Encryption
      1. Introduction
      2. Cryptography Basics
      3. Using Hash Codes
      4. Using Symmetric (Private) Key Encryption
      5. Using Asymmetric (Public) Key Encryption
      6. Combining Symmetric Encryption, Asymmetric Encryption, and Hash Codes
      7. Using Digital Signatures
      8. Summary
    10. XML and the DOM
      1. Introduction
      2. Writing and Reading XML Documents
      3. The DOM and the XmlDocument Class
      4. Summary
    11. Disconnected Data via ADO.NET and DataSets
      1. Introduction
      2. ADO.NET Basics
      3. Basic Database Operations with ADO.NET
      4. Working in Batch
      5. Working with Row State Information
      6. Searching, Sorting, and Filtering Data
      7. Working with Typed Datasets
      8. Summary
    12. Advanced ADO.NET
      1. Introduction
      2. Working with Binary (BLOB) Data
      3. Associating Related Tables with the DataRelation Class
      4. Understanding Concurrency
      5. Summary
    13. Combining ADO.NET and XML
      1. Introduction
      2. Serializing XML from a Single DataTable or Multiple Unrelated DataTables
      3. Serializing Datasets Containing Related Data Tables
      4. Mapping DataTable Columns to XML Node Types
      5. Saving Formatted XML
      6. Writing Schema Information
      7. Generating XML from a DataTable
      8. Filling DataSet Objects from XML
      9. Working with DiffGrams
      10. Summary
    14. Remoting
      1. Introduction
      2. Issues with DCOM
      3. Remoting and Web Services
      4. Demo: Writing a Demo Remoting Application
      5. Wrapping MFC Objects for Remoting
      6. Selecting Remoting Channels
      7. Using Asynchronous Callbacks
      8. Returning Objects to the Server
      9. Using Remoting in Interprocess Communication
      10. Implementing a Remoting Server in a Windows Service
      11. Summary
    15. Event Log, Process Control, and Benchmarking
      1. Introduction
      2. Working with the Windows Event Log
      3. Process Control
      4. Monitoring System Performance
      5. Summary
    16. Managing Your Managed Objects
      1. Introduction
      2. Using .NET Collections
      3. Serializing Managed Objects to and from Disk
      4. Summary
    17. XML Overview and Syntax
    18. XPath Overview and Syntax
      1. Basic XPath Syntax
      2. Summary
    19. Article
      1. CD-ROM Warranty

    Product information

    • Title: Extending MFC Applications with the .NET Framework
    • Author(s): Tom Archer, Nishant Sivakumar
    • Release date: December 2003
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780321173522