With the release of Silverlight 4, developers have the opportunity to create trusted applications that can make calls to the Windows COM subsystem. This allows you to extend the functionality of Silverlight applications in an almost unlimited way. Everything would be fine, but there are few examples of such use and implementations, and most likely they cause the most necessary things in applications, in the form of libraries they are not released. Therefore, Microsoft has released Silverlight wrappers over the most interesting features of COM.
The set of these components is called Native Extensions for Microsoft Silverlight and they are published at this address:
http://code.msdn.microsoft.com/nesl along with the source code.
The main part of these components includes the following features:
- Windows Sensor API Possibilities for the integration of sensors supported by the Windows 7 operating system. For example, such sensors as accelerometer, light sensor, compass, gyroscope, location sensor.
- Windows Speech API Text Readers (TTS) and Speech Recognition (SR).
- Windows Portalbe Devices API Tools for working with mobile devices and content on them. These are cameras, phones, players, scanners, etc.
- Windows 7 Taskbar Integration Tools for integration with Windows taskbar. Quick transitions, thumbnails, buttons, in general, all the basic functions available to Windows7 applications.
- Webcam Local Encoding and Window Capture Webcam Tools. Record the flow of the web camera to the file as well as record the screen video.
- Windows Message Interception Work with Windows low-level window messages. For example, one of the scenarios given in the NESL documentation is the implementation of the application’s response to a message about changing the screen resolution.
Installation
NESL itself comes in the form of 5 corresponding dlls that must be on the client: SLWindowsShim.dll, SLTaskbarShim.dll, SLEncodeShim.dll, SLSensorShim.dll, SLWPDShim.dll. Note that calling COM methods from a Silverlight application is available only to desktop applications (Out of Browser). But this does not mean that the user now needs to ensure that these components are installed on the local machine.
In the scenario when the user first accesses the Silverlight application containing calls to NESL, the developer has the ability to check and install the NESL components using special helpers:

Examples of using
Along with the source code, the NESL component is provided with several usage examples.
Video Travel Journal is an application that writes video from a connected video camera in H.264 format (MP4 container) to a local file. At the same time, it is also integrated with Facebook, Bing Maps and has advanced items in the Windows7 taskbar.

Where's Teddy - an animated children's book with voice control. It uses the TTS engine of Windows7 and supports navigation commands between parts of the history of the book. In addition, two sensors, an accelerometer and an illumination sensor that react to changes, are analyzed.
')

Conclusion
If you are developing a Silverlight application that will function in a desktop mode (Out of Browser), then you will probably want to use additional functions of the operating system. NESL is the component that will solve this problem in a simple way.