Welcome to NeoTekSystems Blog Sign in | Join | Help

.NET compact frameword 2.0 New Features (From the MSDN)

Framework Support and New Features

The .NET Compact Framework version 2.0 Beta introduces new features and provides more support for .NET Framework classes. It also provides better performance in several feature areas, including just-in-time (JIT) compilation, garbage collection, XML Web services, and data access.

Support for full .NET Framework features

The following table summarizes the increased framework support of the .NET Compact Framework:

Expanded support

Description

Application Domains

Support is provided for unloading an application domain.

Cryptographic support

Cryptography and X509Certificates are supported.

System.Data.DataSet improvements

The System.Data.DataSet.GetChanges method is supported along with more classes in the System.Data namespace.

Events

Internal improvements have been made in raising events.

Exceptions

Improved exception handling by the following:

Globalization

Additional encodings are now supported.

Assemblies

Friend Assemblies (C#) are supported

Networking

Support for NTLM authentication and support for IPv6, the next generation of the Internet protocol .

System.Net.CredentialCache is now supported.

Message Queuing (MSMQ)

Support for System.Messaging classes.

Because journaling can make heavy demands use on system resources, the .NET Compact Framework provides an overload for the Create method of the System.Messaging.MessageQueue class to specify journaling.

For an example, see MSMQ Book Order Application Sample.

Registry Keys

You can now set registry keys by using the Microsoft.Win32.RegistryKey class.

An open RegistryKey and its open child RegistryKey objects have to be explicitly closed prior to successful deletion of the key.

The maximum depth of registry keys is 15. This is a Windows CE limitation.

Serial Ports

You can now access serial ports as you can in the full .NET Framework. For an example see, Serial Communication Application Sample.

SQL Server

See What's New in SQL Mobile

Strings

The System.String.Substring method now throws an exception if the startIndex parameter is greater than the length parameter.

String.Empty.Substring(0, 1) throws an System.ArgumentException.

Threading

Support for the System.Windows.Forms.Control.BeginInvoke, System.Windows.Forms.Control.EndInvoke method, and using parameters with the System.Windows.Forms.Control.Invoke method.

XML support

XML support now includes:

New Features

The following table summaries new device-specific features in the .NET Compact Framework:

Feature

Description

Stand-alone development

Although command line compilation was supported in the .NET Compact Framework version 1.0, the .NET Compact Framework now provides greater stand-alone compiling and debugging support. The .NET Compact Framework SDK is included in the .NET Framework stand-alone SDK. For more information, see How to: Compile at the Command Line.

Force an earlier .NET Compact Framework version application to run on version 2.0

See Configuring Runtime Version

New controls in Microsoft.WindowsCE.Forms

See Windows Forms and Graphics

Interoperability Enhancements

The .NET Compact Framework now supports calling COM objects from managed code; however, the ability to call a managed object from COM is planned but not implemented in this beta release. Current COM interoperability support allows you to program the Pocket Outlook Objects Model (POOM) and other native objects on a mobile device. Calls can be late-bound through System.Runtime.InteropServices.UnmanagedType.IDispatch, or early-bound.

Although the .NET Compact Framework supports only a subset of the System.Runtime.InteropServices namespace, advanced marshaling capabilities are available with the support of the System.Runtime.InteropServices.MarshalAsAttribute attribute; in addition, the .NET Compact Framework supports several new members in the System.Runtime.InteropServices.Marshal class. You can now marshal a wide range of types through COM into the .NET Compact Framework, including all OLE Automation types.

You can set a registry key to record marshaling of function calls in a log file.

You can also use the .NET Framework SDK type library import tool (Tlbimp.exe), with the .NET Compact Framework. In Visual Studio, you can add a reference a COM type library in a device project.

The COM Single-Threaded Apartment threading model is not supported.

For more information see Interoperability and the .NET Compact Framework.

Resource File Change

Starting with the .NET Compact Framework version 2, the resx format is the same as the full .NET Framework, therefore the same resource file generator, resgen.exe, can be used for both framework. The cfresgen.exe utility has been removed.

Published Wednesday, June 08, 2005 9:34 AM by bparker

Comments

No Comments

Anonymous comments are disabled