TCHAR sTemp[MAX_PATH];
//must include <shlobj.h> for the following:
LPITEMIDLIST pidl;
SHGetSpecialFolderLocation(0, CSIDL_DRIVES, &pidl);
SHGetPathFromIDList(pidl,sTemp);
but sTemp remains empty. perhaps I should link something?
-Jay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-01-25
Further to my earlier point, go to MyComputer in Explorer, and on the right hand 'file' pane, right click - note there is not 'new' item on the pop-up menu.
This is because you cannot create items here - it is a psudo-folder, it does not actually exist as a path.
Why did you want to do this in any case?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to open "My Computer" in an exlorer like app (actually: send the 'path' to Total Commander). If Explorer can open "My Computer", so should I. I know Total Commander can do it.. but how?
-Jay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-01-25
Perhaps the UNC path \\<computername> ? (but I have not tried it).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nope.. \\<computername> does not work, although that is what Total Commander shows when 'My Computer' is opened. Funny thing is the SHGetSpecialFolderLocation works fine for 'My Documents' etc, but not for CSIDL_DRIVES (My Computer).
-Jay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know how to get the paths for "My Documents" etc. from the registry, but I can't figure out how to to this for "My Computer".
Any ideas?
-Jay
"My computer" is not a device, but simply an Explorer view that shows all the file system devices available.
Since you cannot write files there, there is no path.
(I think!)
if the drives are shared, you can get the via wnetpen wnetenum commands.
Patrick
I found this:
TCHAR sTemp[MAX_PATH];
//must include <shlobj.h> for the following:
LPITEMIDLIST pidl;
SHGetSpecialFolderLocation(0, CSIDL_DRIVES, &pidl);
SHGetPathFromIDList(pidl,sTemp);
but sTemp remains empty. perhaps I should link something?
-Jay
Further to my earlier point, go to MyComputer in Explorer, and on the right hand 'file' pane, right click - note there is not 'new' item on the pop-up menu.
This is because you cannot create items here - it is a psudo-folder, it does not actually exist as a path.
Why did you want to do this in any case?
-Why did you want to do this in any case?
I want to open "My Computer" in an exlorer like app (actually: send the 'path' to Total Commander). If Explorer can open "My Computer", so should I. I know Total Commander can do it.. but how?
-Jay
Perhaps the UNC path \\<computername> ? (but I have not tried it).
Nope.. \\<computername> does not work, although that is what Total Commander shows when 'My Computer' is opened. Funny thing is the SHGetSpecialFolderLocation works fine for 'My Documents' etc, but not for CSIDL_DRIVES (My Computer).
-Jay