473,797 Members | 3,166 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 4245

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

Similar topics

1
3382
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
3619
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
4226
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
9685
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
9537
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
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10246
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
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6803
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();...
1
4135
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
2934
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.