473,806 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Environment.Get FolderPath vs SHGetFolderPath , annoying omission

I need a patch that is returned by API's SHGetFolderPath with
CSIDL_COMMON_DO CUMENTS. I expected to find it among other enums in
Environment.Spe cialFolder enumeration. But I cannot find it there.

Do I really have to PInvoke SHGetFolderPath in this case? Why someone forgot
about this one CSIDL? Is it just an annoying omission or there is a deeper
reason for this?

what's more: there's a mistake in a MSDN doc. it says:
"SpecialFolder. Personal - The directory that serves as a common repository
for documents." in fact, this path does not point to the common repository
but, rather, to
the local one. (according to the docs I expected that SpecialFolder.P ersonal
does the same job as CSIDL_COMMON_DO CUMENTS but it DOES NOT).

Can some one comment this one?
Thanks in advance.

Regards, Wiktor


Nov 15 '05 #1
0 4249

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

Similar topics

1
3384
by: Chandler Chao | last post by:
I am trying to get the path of a user's Personal folder from within a web form. When I use the call: Environment.GetFolderPath(Environment.SpecialFolder.Personal) I get absolutely nothing back. When I query for Environment.UserName, it returns ASPNET (which makes sense). The fact that the user is ASPNET and not the real local user could explain why I'm not getting anything back with my GetFolderPath calls.
3
3279
by: David Meier | last post by:
Hi, is it possible to get the environment variables for users other than the user that is currently executing the application? For example if I run a system service, how can the service find the SpecialFolder.InternetCache of a certain user? Thanks for input. Dave.
4
5439
by: Viviana Vc | last post by:
Hi all, A Windows service (which obviously starts before any user logs in) is failing to: - read something from registry from a key under the HKCU - try to find out the user path by doing the following call: SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, path) if any of these is tried before a user logs in. My question is: are these 2:
3
6160
by: Nick | last post by:
VB.Net allows the ability to find the path of special folders by calling the System.Environment.GetFolderPath function with a parameter specifying which special folder I want the path of. Unfortunately, it doesn't appear to allow finding special folders related to "All Users". For example, I am trying to determine the "All Users Start Menu" folder but am only able to find the "Start Menu" folder for the current user. How is it...
2
1530
by: Qwert | last post by:
Hello you, the Environment.SpecialFolder enumeration of .NET 1.0 doesn't have the member "MyComputer". Is there anyway to get this 'virtual folder' and its contents in another similar way? Unlike some other 'virtual folders', there is no reference in the registry to a physical directory for "MyComputer". Thanks,
1
3620
by: codejunkie | last post by:
I am porting my current project to a 64 bit machine and I am having some issues with folder paths that vary between a 64 and 32 machine for any 32 bit application. The below calls return c:\program files in a 32 bit machine and 64 bit machine. But i am looking for c:\program files X86 folder in the 64 bit machine. How can i implement this in the least number of steps. Can I modify the below call to specify that i am looking for the 32...
2
4228
by: Anil Gupte | last post by:
Why does System.Environment.SpecialFolder.Personal return "5"? How do I get the actual directory? Thanx, Anil Gupte www.keeninc.net www.icinema.com
1
4650
by: Brian Stoop | last post by:
Hi, In my ASP.NET application I want to rerieve the APPDATA folder of the logged in user. The Web Application is using C# .NET 1.1 and has Impersonation=True I use this code: "string appdata=Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString()";
3
3521
by: UKishore | last post by:
Dear All, I wrote a sample application for client/server and using the API SHGetFolderPath(). For this application most of document's Path (like MyDocuments,MyPictures,MyVideo), The API is returning the HRESULT Error value as "0x80070002 - The System cannont find the file specified" Where as the same API works with the standalone appplication.Kindly add your suggesstions or inputs to resolve this problem. Thanks in...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5683
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.