473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

SHGetSpecialFolderLocation/SHGetSpecialFolderPath

Hi,

I'm using VS 2005 and dotNet 2.0.

Is there an easier way to obtain MyDocuments (and related special folders)
than through the shell ??
The Shell way:
Win32Assist.SHGetSpecialFolderLocation(IntPtr.Zero ,
Win32Assist.CSIDL.CSIDL_MYDOCUMENTS, ref pidl);

I guess there are some nice functions in dotNet, right ??

Thank you in advance.
BR
Peter
Jul 31 '06 #1
2 2938
Hello, Peter!

PLI'm using VS 2005 and dotNet 2.0.

PLIs there an easier way to obtain MyDocuments (and related special
PLfolders) than through the shell ??
PLThe Shell way:
PLWin32Assist.SHGetSpecialFolderLocation(IntPtr.Ze ro,
PLWin32Assist.CSIDL.CSIDL_MYDOCUMENTS, ref pidl);

PLI guess there are some nice functions in dotNet, right ??

Yep, there are :8-)
Look at Environment class, method GetFolderPath.

To get folders that you've retrieved above you can write
Environment.GetFolderPath(Environment.SpecialFolde r.MyDocuments);

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Jul 31 '06 #2
Hi Vadym and thanks !!

Yep, there are :8-)
Look at Environment class, method GetFolderPath.

To get folders that you've retrieved above you can write
Environment.GetFolderPath(Environment.SpecialFolde r.MyDocuments);

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Aug 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zoool | last post by:
Hi, Is there a way to know the main directory path of a user session? I mean the "C:\Documents and Settings\username" Directory of the user logged into a windows session. In .NET you can do...
8
by: Dutchy | last post by:
Dear reader, In an attempt to obtain the path to the quick-launch-folder in order to create a shortcut to my application-updates during installation , I thought to: 1- check if quick launch...
1
by: Frank Meng | last post by:
Hi. I wrote a program to get the directory of "Recycle Bin" with SHGetSpecialFolderLocation . It works for "Recent", "SendTo", etc. but it doesn't work for "Recycle Bin". At...
1
by: Stephan Steiner | last post by:
Hi Is there a way to get the generic documents and settings path like there is for the program files path, or the windows/system32 path? Stephan
1
by: Elga | last post by:
How can I find the Program Files directory, independent of the language of Windows version ? Thanks, Elga.
4
by: Just Me | last post by:
I tried the "A" version and Auto They all crash Anyone have a suggestion as to what else I could try??
3
by: DCC | last post by:
I need to resolve Windows special folders. From what I have read it would seem that using CSIDL's and SHGetSpecialFolderPath and SHGetFolderPath was the way to accomplish that in VB6 and VB.NET. ...
2
by: Dixie | last post by:
In a network situation, if you write files to the My Documents folder, would it go to a different folder for each person's logon? If so, how do I send a text file to My Documents with...
9
by: Jerry West | last post by:
I installed VB6 onto a Vista system to check some legacy code. When I run my project, the code where shell folders are determined, I get the following error when using the API:SHGetFolderPath ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.