Lecture #24 - C++/CLI (Managed C++)

Web Resources:

CppReference.com, CPlusPlus.com, C++ TechLinks
Going Native 2013 - many experts
Herb Sutter's Blog, Herb Sutter on C++11, Herb Sutter keynote - Going Native 2012
Scott Meyer's Blog, S.M. on thread suspension, S.M.: C++11 Sampler
Stroustrup's Home Page, Code Project, Boost Library

Content:

This lecture discusses Managed C++.
  1. Syllabus
    Describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects:

    Project #4, Project4HelpS17 - new Project Statement version
    Remote Code Publisher

    Project4HelpS17
    C++\CLI WPF client that sends and gets messages using a mock channel. Also included are several diagrams that illustrate design ideas for Project #4 and some sample Socket code.

    This folder contains an example C++\CLI client built using WPF. It uses a mock channel to simulate sending and receiving messages.
    This demonstrates how to use .Net Threads in the WPF client in conjunction with C++11 threads in the channel and server, built using native code.

    The folder also contains an example C# client built with WPF. It uses a C++\CLI shim to communicate with the native C++ MockChannel. The MockChannel is built as a static library and linked to the C++\CLI shim, so the C# WPF client only has to load one dll.

    The C# interop example above uses delegates: delegate structure.

    Communication Channel, vsdx
    Diagrams for Peer-To-Peer communication, Client and Server communication processing, and Message structure

    Mock Channel Demo, vsdx
    Diagram illustrating native C++ to C++\CLI interoperation for the Project #4 GUI via a mock demo.

    Piazza post by Ammar Salman on simple ways to open a browser programmatically.

    Summer Projects:

    We will hold a "Summer Projects" meeting Friday 4/21 at 3:00pm in CST 4-201.

  3. Managed C++\CLI and .Net Framework

  4. WinForm Examples:

    C++/CLI Winform with child thread, C++/CLI Winform using FileOpen Dialog
    These two demonstrations show you how to build a WinForm interface using C++/CLI.
    Note: we will be using WPF, but some techniques used here may be helpful.
  5. Thinking about Software Design:

    Software Design
    Broad survey of ideas with examples
    Design Presentation
    Summarizes design issues for modules and classes.
    Design Guidelines
    Design rules and idioms that transcend Object Oriented Design.

    Design Summary

CST strip