///
///recursive enumerate device in a file or folder ID, device ID
///
///
///
///
///
Private void Enumerate (ref PortableDeviceApiLib. IPortableDeviceContent pContent, string parentID, string indent, ref List
{
Indent +="";
PortableDeviceApiLib. IEnumPortableDeviceObjectIDs pEnum;
PContent. EnumObjects (0, parentID, null, out pEnum);
Uint cFetched=0;
Do
{
String objectID;
PEnum. Next (1, out objectID, ref cFetched);
PContent. Properties
If (objectID!=null & amp; & ! The objectID. Equals (" "))
{
ObjectIDs. Add (objectID);
}
If (cFetched & gt; 0)
{
Enumerate (ref pContent, objectID, indent, ref objectIDs);
}
} while (cFetched & gt; 0);
}