special folder locations

special folder locations

Post by robipet » Wed, 09 Jul 2003 02:06:11



I have only seen how to get special folder locations (My
Documents, etc) using win32 API calls wrapped up in a C#
class, are there no dotnet SDK functions which do the same?
 
 
 

special folder locations

Post by Jim Barr » Fri, 11 Jul 2003 08:12:28



> I have only seen how to get special folder locations (My
> Documents, etc) using win32 API calls wrapped up in a C#
> class, are there no dotnet SDK functions which do the same?

You can use COM interop to access "Microsoft Shell Controls and Automation" from Shell32.dll. After adding a reference to your project, you can do something like this:

  Shell32.Shell shell = new Shell32.Shell();
  Shell32.Folder2 mydocs = (Shell32.Folder2)shell.NameSpace(
    Shell32.ShellSpecialFolderConstants.ssfPERSONAL);
  String path = mydocs.Self.Path;

--
Jim Barry, MVP for Windows SDK

 
 
 

1. Question re: wireless remote control/transceivers--location, location, location???

I set up the wireless remote control/transceiver combo which came in
my ActiveHome kit, and found that, depending on which outlet the
transceiver was plugged into, certain switches were controllable and
others weren't.  It I bought a second transceiver, found an outlet for
each which covered half the outlets, and now they seem to all work.
Some outlets work partially, occasionally, or not at all as
transceiver locations.

Is this just because I have noisy lines, or need a coupler on my
fusebox?  Is there something I'm missing as a solution?  I'd rather
not have these two boxes with antennae sitting where the kids can get
'em.  Thanks!  {Jonathan}
Jonathan Ezor

Economy Recapitulates Technology

2. Stingray Interference Problem Improved

3. how to change location of auto created adobe folder

4. CodeVisionAVR delays

5. Watched folders location

6. How to make the double quotes appears as in a normal book?

7. Folder Locations

8. Avenue: read shapefiles from a folder location

9. Get Special Folder - SHGetSpecialFolderLocation

10. Special Folders (History) CSIDL_HISTORY

11. linking to objects in special folders (ie, dun)