Sign In
dimeby8
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
C#
Misc
MTP
WPD
Archive
Archives
November 2011
(1)
June 2009
(1)
May 2007
(1)
January 2007
(2)
December 2006
(9)
November 2006
(2)
October 2006
(14)
September 2006
(6)
August 2006
(6)
December, 2006
MSDN Blogs
>
dimeby8
>
December, 2006
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
dimeby8
Connecting to a WPD device in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
2
Comments
This is the C# equivalent of an earlier C++ post on connecting to a WPD device. We'll concentrate on the implementation here - you may refer back to that earlier post for further explanation. // Create our client information collection PortableDeviceApiLib...
dimeby8
Marshalling variant properties in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
3
Comments
This post is a continuation of the one covering WPD property retrieval in C# . That post explained how to marshal strings and the basic int properties. Handling other types such as VT_DATE and VT_BOOL is trickier so I'll try to cover them here. VT_DATE...
dimeby8
WPD Content Enumeration in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
0
Comments
WPD content enumeration in C# is pretty close to the C++ style. Here's a basic example that enumerates the object IDs of the objects present on the device. static void Enumerate( ref PortableDeviceApiLib.IPortableDeviceContent pContent, string parentID...
dimeby8
Setting WPD properties in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
0
Comments
Since setting a WPD property requires manipulating a PROPVARIANT structure through interop, we must make use of the marshalling rules we set in our last post . We'll take a look at a function that allows string properties to be set. static void SetStringValue...
dimeby8
WPD property retrieval in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
7
Comments
WPD property values are retrieved as PROPVARIANTs through the WPD API. Unfortunately there is no native support for PROPVARIANTs in C#. To correctly retrieve the property values (or anything that is in a PROPVARIANT) through the WPD API in C#, we must...
dimeby8
Where are the WPD property keys in C#?
Posted
over 6 years ago
by
Darene Lewis [MSFT]
4
Comments
If you followed the exercise from our first C# post , you must have noticed that the PortableDeviceApi and PortableDeviceTypes typelibs don't expose the WPD property keys such as WPD_OBJECT_ID, WPD_OBJECT_FORMAT, etc. This can be a major blocker since...
dimeby8
Flying Wiimotes
Posted
over 6 years ago
by
Darene Lewis [MSFT]
1
Comments
I just bought a Wii and it has totally changed my gamer attitude, and I wasn't even a gamer to start with. No more button mashing anymore - arm-swinging and flailing with some actual hand-eye coordination is what it's all about. Of course with all the...
dimeby8
Enumerating WPD devices in C#
Posted
over 6 years ago
by
Darene Lewis [MSFT]
14
Comments
Let's take a look at how we can enumerate WPD devices in C#. This post assumes that you already have a project set up using these instructions . (Update: You will also need to follow the disassembly/reassembly instructions below for this to work correctly...
dimeby8
C# and the WPD API
Posted
over 6 years ago
by
Darene Lewis [MSFT]
2
Comments
There currently is no managed/C# flavor of the WPD API. This, of course, doesn't mean that you are locked out from using the WPD API if you want to use C#. Since the API is a set of COM interfaces, we simply have to interop across from C#. Granted it...
Page 1 of 1 (9 items)