Export (0) Print
Expand All

Categorical List of Managed Extensions for C++ Samples

Visual Studio .NET 2003

The Managed Extensions for C++ samples include the following categories:

Interoperability

The interoperability samples show communication between managed and unmanaged code. The samples listed in the following table are in the Visual C++ documentation. For additional interoperability samples, see Interop in the .NET Framework SDK.

Sample Description
Data Performs a query on an existing database and displays the results.
JrnlPost Demonstrates basic concepts of accessing business logic from both COM and .NET Framework clients.
MCppWrapper Demonstrates the wrapping of an unmanaged class using Managed Extensions for C++.
MECalculator Demonstrates using .NET components in native C++ code.
MEDriver Demonstrates COM eventing using .NET Framework support within a managed application.
QStat Demonstrates how to create a DLL that wraps access to a COM object and exposes its functionality to .NET Framework clients.
TilePuzzle An interactive sliding tile puzzle that demonstrates the interoperability of managed and unmanaged components.
WinFormsView Demonstrates using .NET Framework Windows Forms controls as MFC views.

Language Features

The language features samples demonstrate arrays, delegates, and other features. They also include samples that demonstrate exception handling.

Language Features — General

Sample Description
Arrays Implements single-dimensional and multidimensional arrays in a managed context.
CustomAttributes Implements two custom attributes.
Delegates Implements single-cast and multicast delegates in a managed application.
PinningPtrs Demonstrates various characteristics and features of pinned pointers.
Properties Implements standard and indexed properties for a managed class.
SetILOnly Sets the ILONLY bit in an image. Using the .exe produced by this sample is a required step in the procedure described in Producing Verifiable Components with Managed Extensions for C++.
UsingMCppGCRoot Demonstrates embedding __gc pointers in unmanaged classes.
ValueTypes Implements a value class and then demonstrates various boxing and unboxing schemes.

Language Features — Exception Handling

Sample Description
BoxedValue Demonstrates how to throw and catch an instance of a value class.
DivideBy0 Catches an exception of type DivideByZero.
InteropEHinC Throws an exception from a managed component to an unmanaged C component.
InteropEHinCPP Throws an exception from a managed component to an unmanaged C++ component.
Mixed Throws managed and unmanaged exceptions in the same process.
NDPExceptions Demonstrates throwing and catching unmanaged and managed exceptions in various situations
Properties Implements standard and indexed properties for a managed class.
Rethrow Rethrows a common language runtime exception and catches it as a C++ exception.
SEHCleanup Demonstrates cleanup code using common language runtime exceptions and the __finally keyword.
SimpleEH Throws a simple exception and performs cleanup operations with the __finally keyword.
Unspecified Throws and catches an unmanaged exception.

Windows Forms

The Windows Forms samples show how to use controls, menus, and other features of Windows Forms.

Sample Description
BirthdayPicker Demonstrates the usage of .NET Framework resources (Windows Forms and other resources) with a managed application.
ButtonCtl Demonstrates the basic functionality of a Button control.
Calculator A simple pocket calculator that demonstrates Windows Forms classes, managed arrays, delegates/events, enums, and conversions between String, Double, and Char classes.
CheckedListBoxCtl Demonstrates the basic functionality of a CheckedListBox control.
ComboBoxCtl Demonstrates the basic functionality of combo boxes.
DockMan Demonstrates the docking and anchoring of Windows Forms and the Button control.
mNotepad Implements a simple text editor using the .NET Framework class TextBox and demonstrates areas of Managed Extensions for C++.
ProgressBarCtl Demonstrates the basic functionality of a ProgressBar control.
Scribble Demonstrates a managed MDI drawing application using Windows Forms.
TabControlCtl Demonstrates the basic functionality of a TabControl control.
TrackBarCtl Demonstrates the basic functionality of a TrackBar control.
TreeViewCtl Demonstrates the basic functionality of a TreeView control.
UpDownCtl Demonstrates the basic functionality of several up-down controls.

See Also

Managed Extensions for C++ Samples | Alphabetical List of Managed Extensions for C++ Samples

Show:
© 2014 Microsoft