3

MyComputer folder doesn't have any object in file system. But i need show elements from this folder into ListView (WinForms).

I think, it's imposible to get System.IO.DirectoryInfo that represents MyComputer folder. Is it true?

I can get disks collection but i can't get shortcuts like "NokiaPhoneBrowser" or "ControlPanel".

Eugene Maksimov
  • 1,504
  • 17
  • 36
  • According to [this tutorial](http://inversekarma.in/technology/tips/remove-the-nokia-phone-browser-icon-from-my-computer/) on how to remove said icon, it's apparent the icon is added by the 'phonebrowser.dll'. Maybe if you find how to add shortcuts yourself, it will help you query a list of other items – Jay Wick May 26 '13 at 21:35

2 Answers2

1

The NokiaPhoneBrowser is not a file, so it cannot be used with the System.IO.File class. Though I don't have a Nokia phone, if it appears like an iPhone (as a camera), you can use the Picture Transfer Protocol (http://msdn.microsoft.com/en-us/library/ms630344(v=VS.85).aspx), or, if it appears as a media player, then you can use the appropriate API for that as well.

foxy
  • 7,599
  • 2
  • 30
  • 34
0

Maybe Environment.GetFolderPath(Environment.SpecialFolder.MyComputer); will do the trick

Note: Sorry, I just realized that this won't work, since MyComputer indeed does not have a folder representation.

Stephan Bauer
  • 9,120
  • 5
  • 36
  • 58
  • See MSDN (GetFolderPath()): The path to the specified system special folder, if that folder physically exists on your computer; otherwise, an empty string (""). A folder will not physically exist if [...] the folder is a virtual directory, such as My Computer, which does not correspond to a physical path. – Stephan Bauer Aug 01 '11 at 08:09