Asynchronous Programming with C# v.Next

March 29, 2011

Today I delivered a session on asynchronous programming with the Async CTP (note that it currently works with Visual Studio 2010 RTM and not SP1). Thank you all for coming! It was very interesting for me, probably as much at it was for you! I’ve attached the presentation and demos. The recording will probably up in a few days. I’ll discuss some of the things in the session in upcoming posts, so stay tuned. Thanks again! Presentation Demos
no comments

More Media Info with Media Foundation

March 28, 2011

Getting information on media files is possible through Media Foundation, as we’ve seen, using the various “descriptors”. If we look at Windows Explorer, we can see other information presented, such as artist, title and other metadata. This information is also accessible through media foundation, without resorting to the (mostly) dreadful shell API. To get to these properties, we can query the media source for the IMFGetService, which is conceptually similar to IServiceProvider used in various APIs – that is, an interface that allows getting another interface that is easier to implement as a separate object. We’ll query for...

Asynchronous Programming with C# v.Next Event

March 26, 2011

This upcoming Tuesday (March 29th), I’ll be giving a lecture on some of the new features expected in C# 5.0 regarding asynchronous programming, in Microsoft offices in Ra’anana. These features were first revealed in the Microsoft PDC 2010 conference. A CTP version is available for download here, although beware that it currently does not work with Visual Studio 2010 with SP1 installed, but requires an earlier version, such as the RTM version of VS 2010. An updated CTP will probably be released soon that would work with VS 2010 SP1. The registration link is, and although technically...
tags: , , ,
one comment

Getting Media File Info

March 20, 2011

So, what can we do with Media Foundation? One of the simplest things, perhaps, is getting information on some media file, somewhat similar to what we see in Windows Explorer, but we can dig deeper if we like. Let’s get started. First, we’ll create a simple Win32 console application named MediaInfo (I check the box to include ATL headers, we’ll use ATL smart pointers). We then add some Media Foundation includes (e.g. in StdAfx.h): #include <mfidl.h> #include <mfapi.h>   These are the basic header files for...

Introduction to TopoEdit

March 11, 2011

In Windows Media Foundation, TopoEdit is the equivalent of DirectShow’s GraphEdit tool. Using a simple graphic interface, one can build topologies (the equivalent of a DirectShow filter graph), and “run” them, that is, start the flow of data, from a source node towards one or more output nodes. We’ll see that in a minute. To open TopoEdit, the Windows SDK should be installed. Navigate using Windows Explorer to something like C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin and run TopoEdit.Exe. You should see something like this: Not too exciting at this point. We have a blank working area where...

Introduction to Windows Media Foundation

March 7, 2011

I’ve been writing a new course on this technology, so I thought I’d share some of my experiences with the Windows Media Foundation. What is Windows Media Foundation? The Windows Media Foundation is technically the successor of DirectShow (which is still around and very much supported), introduced in Windows Vista and enhanced in Windows 7. It’s a multimedia platform, capable of playing, analyzing, writing and otherwise transforming media (mostly video & audio, but can technically be anything). It’s based on similar principles as DirectShow, such as interface based programming using COM, which naturally lends...

Technology Radio show that I participated in

March 2, 2011

Last week I was invited to a radio show called “Technofobia” (origin in Hebrew) in the Interdisciplinary Center (IDC) in Hertzliya (Israel) (106.4 FM). This was a “special” talk about development technologies. There was a Ruby guy, a Python guy, a C++ guy (actually a girl), an iPhone guy (the famous Yossi Taguri) and myself, as the “Microsoft guy”. I had to repeatedly (and during the music breaks) tell the hosts that I don’t work at Microsoft, I just use, teach, mostly like and develop with those technologies. It simply didn’t take. Oh well… You can hear a...