Posts tagged ‘Marshaling’

Examples of COM Automation in Silverlight 4

In the previous lesson we talked about COM automation support introduced in Silverlight 4 and we said that COM automation is available only for Silverlight OOB (Out-of-Browser) applications that have Elevated Trust, and that’s one of the security restrictions imposed by Silverlight.

Today, we’re going to talk about COM automation in more details and give few Silverlight examples that make use of this great feature.

Introducing COM Automation in Silverlight 4

In April 2010 Silverlight 4 was released to the world with one of its great features ever, COM-automation support, that allows you to create cutting-edge applications that do everything you can imagine.

.NET Interoperability at a Glance 3 – Unmanaged Code Interoperation

This is the last article in this series, it talks about unmanaged code interoperation; that’s, interop between .NET code and other code from other technologies (like Windows API, native libraries, COM, ActiveX, etc.)

Be prepared!

.NET Interoperability at a Glance 2 – Managed Code Interoperation

In the previous article, you learnt what interoperability is and how it relates to the .NET Framework. In this article, we’re going to talk about the first form of interoperability, the Managed Code Interop. In the next article, we’ll talk about the other forms.

.NET Interoperability at a Glance 1 – Introduction

In this article and the few following it, we’ll try to take a tour in Interoperability in .NET Framework.

In this lesson, we’ll start by an introduction to the concept of Interoperability. In the next few lessons, we’ll have a look at Interoperability and how it fits into the .NET Framework and other technologies.

Since Interoperability is a very huge topic and cannot be covered in just a few articles, we’ll concentrate on Interoperability in .NET Framework (not any other technologies) and summarize its uses.

Here we go!

Setting Device Information in MCI

Like anything else in MCI, you can set device information using a MCI command (string/numeric), and this time it’s the MCI_SET command.

Serialization vs. Marshaling

Are you somewhat confused between Serialization and Marshaling? This writing would break this confusion up, it would give you a basic understanding of the process of Serialization and the process of Marshaling, and how you can get the most out of each.

Creating a Sound Recorder in C and C#

This writing will focus on how you can record sound from an input device and how you can play sound files using MCI (Media Control Interface) in C and C#.

This writing does not involve a discussion or even an introduction to MCI. Instead, it provides technical discussion of what we will need to use to record and to play sound files. If you need an introduction to MCI refer to the MSDN documentation.

We will begin by a discussion to types and functions required to accomplish our tasks. Then we will look on how you can utilize those types and functions in your C or C# application.

Our demonstration examples in this writing will be in C. In the last section we will have a look at .NET and C#. Besides this, there are sample applications written by C and C# attached with the article.

Marshaling with C# – Chapter 3: Marshaling Compound Types

Marshaling with C# Pocket Reference
Chapter 3: Marshaling Compound Types (structures, unions, etc.)

Marshaling with C# – Chapter 2: Marshaling Simple Types

Marshaling with C# Pocket Reference
Chapter 2: Marshaling Simple Types (primitives, booleans, strings, etc.)

Marshaling with C# – Chapter 1: Introducing Marshaling

Marshaling with C# Pocket Reference
Chapter 1: Introducing Marshaling

Marshaling with C# Pocket Reference

Marshaling with C# Pocket Reference (online version + direct download links)

Learn how to marshal between managed types and unmanaged types.

Marshaling Unions

If this is your first time you hear about unions or you need to know more about them, please refer to our article “A short speech about Unions” first.

You can marshal a union the same way you marshal structures. However, because of the way that unions laid-out into memory, you will need to explicitly set variable positions inside the type.