Sign in
|
Join
|
Help
Pavel's Blog
Pavel is a software guy that is interested in almost everything
software related... way too much for too little time
Home
Contact
About
RSS
Atom
Comments RSS
Go
Tags
.NET
.NET 4
.NET 4.0
.NET 4.5
.NET2
64 bit
AI
AJAX
ASP.NET
Audio
Azure
BigInteger
C#
C# 3.0
C# 4.0
C# 5.0
C++
C++0X
C++11
CLR
CLR Explorer
COM
COM Apartments
Console
courses
D&D
Debugging
DEV
Developer Academy 2
Developer Academy 3
Device Drivers
DirectCompute
DirectX
food
Fun
Games
Graphics
HPC
HPC Server 2008
IIS
Intel
Intellisense
Internals
Interop
ITPRO
LINQ
LINQ to SQL
LINQ to XML
Media Foundation
Memory Map Viewer
MFC
Multithreading
MVC
Native API
Native Development
NLP
Numerics
OFFTOPIC
OpenDay
PARSING
PDC2008
ReSharper
Robotics
Shaders
SharePoint 2010
Silverlight
Silverlight 2
Task Parallel Library
TECH
teched
teched_il
TechEd2010
TechedIsrael2008
thoughts
Threading
Tips
TopoEdit
Tutorial
video
Vista
Visual Basic
Visual Studio
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
VS 2010
WebTech
Win32
WinDbg
Windows Devices User Group
Windows Media Player
Windows Phone
Windows Phone User Group
Windows Platfrom User Group
Windows7
WPF
XAML
XNA
מכללת הי-טק
Archives
February 2012 (3)
January 2012 (6)
December 2011 (6)
November 2011 (5)
October 2011 (5)
September 2011 (5)
August 2011 (5)
July 2011 (3)
June 2011 (3)
May 2011 (3)
April 2011 (3)
March 2011 (8)
February 2011 (4)
January 2011 (5)
December 2010 (5)
November 2010 (13)
October 2010 (4)
September 2010 (5)
August 2010 (7)
July 2010 (1)
June 2010 (3)
May 2010 (4)
April 2010 (1)
March 2010 (2)
February 2010 (2)
January 2010 (3)
December 2009 (1)
November 2009 (4)
October 2009 (5)
September 2009 (3)
August 2009 (1)
July 2009 (4)
June 2009 (3)
May 2009 (2)
April 2009 (3)
March 2009 (2)
February 2009 (5)
January 2009 (3)
December 2008 (2)
November 2008 (4)
October 2008 (7)
September 2008 (6)
August 2008 (5)
July 2008 (6)
June 2008 (3)
May 2008 (5)
April 2008 (2)
March 2008 (9)
February 2008 (4)
January 2008 (9)
December 2007 (6)
Navigation
Home
All Posts
RSS
Popular Tags
Browse by Tags
All Tags
»
COM
(
RSS
)
.NET
.NET 4
.NET Profiling API
64 bit
ATL
C#
C++
CLR
COM Apartments
DEV
Fun
Internals
Interop
Media Foundation
MFC
MS Agent
Vista
Visual Studio 2005
Win32
Windows Platfrom User Group
Windows7
מכללת הי-טק
More Media Info with Media Foundation
28 March 11 07:07 PM
|
pavely
| with
no comments
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...
Getting Media File Info
20 March 11 11:55 AM
|
pavely
|
3 comment(s)
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...
Introduction to Windows Media Foundation
07 March 11 11:26 PM
|
pavely
|
3 comment(s)
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...
COM Fun with Microsoft Agent
25 February 11 03:44 PM
|
pavely
|
1 comment(s)
Whenever I teach COM interoperability in .NET, I try to show some nice demo for this. The classic is to use one of the Office applications (such as Word) to do some automation by creating a document, adding some text, etc. This is effective enough but not really fun. A much more fun way is to use the Microsoft Agent technology. MS Agent is discontinued as far as further development is concerned, but it’s still fun and great for (at least) learning purposes. What is MS Agent? Its most well known appearance...
Windows Platform Developers User Group meeting
06 October 10 10:45 PM
|
pavely
|
3 comment(s)
This evening was a WPDUG meeting on CLR hosting and CLR profiling. Thank you all for coming! It was a pleasure to see so many of you there. My session was on CLR hosting, using the new CLR 4 hosting API. This is done using native code (C++) that uses COM for communication between the CLR and the host, both ways. I showed how to enumerate the installed runtimes, how to load a specific CLR (a new feature of CLR 4 – the ability to host multiple CLRs in a single process), how to create an application...
How To Be a Cool C++ Programmer / Developer
13 September 10 10:28 PM
|
pavely
|
1 comment(s)
A few weeks ago I blogged about how to be a cool C# programmer. if you are a C++ programmer, you can be cool, too. The next C++ standard, dubbed C++0x promises many enhancements and cool abilities, but in this post I’ll stick with the current C++ standard. Here are some ways of being a cool C++ programmer (in no particular order): 1. Zeroing out a structure and setting its first field in one swoop One of the common needs in a native Windows applications is setting up structures in preparation for...
ROT Object Invisible When Hosted in a Service
11 November 08 11:23 AM
|
pavely
| with
no comments
This will not interest any .NET developers… One of my customers wanted to create a system-wide singleton COM object hosted in a Windows service. However, the object implementation must be in a DLL. The service should start and create an instance of the object and make it available from other client processes. A simple approach would be to use the RegisterActiveObject function to register that instance as the class moniker of its kind. A client can get a proxy to the same instance by using GetActiveObject...
Writing a .NET Profiler
20 May 08 09:36 AM
|
pavely
|
2 comment(s)
I was recently asked how a managed application can know the actual size of managed objects it allocates. Although there exists a Marshal.SizeOf method that seemingly can do the trick, this only works for value types, as the method is intended to be used in interop scenarios where some unmanaged memory must be allocated in managed code and passed to some unmanaged function. This question, and others like it can best be answered by using a the .NET profiling API. The .NET profiling API allows the ...
.NET, COM and Apartments Tips
21 February 08 06:18 PM
|
pavely
|
1 comment(s)
We all know that when we use COM interop with .NET we get some RCW (Runtime Callable Wrapper) CLR object representing and controlling access to the underlying COM object. When we call the C# new operator, under the hood the RCW calls the CoCreateInstance API to create the actual COM object, etc. What may not be apparent, is that there may exist another proxy to the COM object, even if the COM server is a DLL (in-process server). The reason this may happen is related to COM apartments. an Apartment...
COM without registration
06 January 08 09:36 AM
|
pavely
|
20 comment(s)
Those still using COM know that COM components must be registered in the Windows Registry to be workable. Sometimes this may not be acceptable. Sometimes you might want to run an application that may be using many COM DLLs, but don't want or can't (because of some policies) to register the components. Sometimes you want to run an application on some client's machine without any setup. Can this be done? Off the bat, that seems impossible. But there is actually a way. What I've done...