Search code examples
c#.netspecial-folders

How to show elements from MyComputer folder?


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".


Solution

  • 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.