Creating a WPD playlist object in C#

This is a C# follow-up post on the earlier C++ playlist creation post. Be sure to read the earlier post for background information on playlists and how it stores references. We will also re-use the StringToPropVariant helper function that we defined in our previous post. To create a playlist object, the objects to be referenced…

5

Creating WPD PROPVARIANTs in C# without using interop

Previous posts have covered how to create, manage and marshal PROPVARIANTs using interop. Here’s a way on how to create a PROPVARIANT without interop. The IPortableDeviceValues interface exposes a SetStringValue method that allows a regular C# string to be added into the collection. IPortableDeviceValues also exposes a GetValue method which lets us retrieve any added…

3