다음을 통해 공유


Using the Windows Media Services Primary Interop Assembly

The Windows Media Services primary interop assembly (PIA) provides a single shared assembly for the type definitions of the COM components exposed by the Windows Media Services SDK. The PIA is digitally signed by Microsoft and automatically registered and installed in the global assembly cache when you install Windows Media Services.

It is important that you use the PIA for the following reasons:

  • The shared assembly ensures type compatibility between applications.

  • The single shared assembly eliminates the proliferation of separate assemblies that have no differences other than the publisher's identity.

  • The type definitions of some of the interfaces contained in the PIA have been customized so that you can use them more easily in the Microsoft Windows .NET Framework.

To add a reference to the PIA, perform the following steps:

  1. Open your project in Visual Studio® .NET.

  2. On the Project menu, click Add Reference.

  3. In Add Reference, click the .NET tab, click Microsoft.WindowsMediaServices, and then click OK.

If you are programmatically creating and manipulating playlists, you must also add a reference to the Interop_msxml assembly.

To access the objects in the Windows Media Services PIA, you must add the following statement to the top of your code:

using Microsoft.WindowsMediaServices.Interop;

If you want to use the MSXML interop assembly, you must add the following statement to the top of your code:

using interop_msxml;

See Also

Concepts

Getting Started