PC Review


Reply
Thread Tools Rate Thread

Directory identifier

 
 
=?Utf-8?B?QXJpcw==?=
Guest
Posts: n/a
 
      25th Feb 2004
How can I declare the path \My Documents using an identifier to avoid the following

string path= @"\My Documents"

?
 
Reply With Quote
 
 
 
 
Neil Cowburn [MVP]
Guest
Posts: n/a
 
      25th Feb 2004
Aris,

Check out the OpenNETCF.EnvironmentEx class. It has the GetFolderPath
method which will allow you to do something like this:

string path =
EnvironmentEx.GetFolderPath(EnvironmentEx.SpecialFolder.Personal);

Alternatively, you can P/Invoke SHGetSpecialFolderPath yourself using
CSIDL_PERSONAL.

Note: this is not supported on Pocket PC 2002 or earlier.

HTH
Neil

--
Neil Cowburn, MVP
Co-founder, OpenNETCF.org
Technologist, Content Master Ltd
Microsoft .NET Compact Framework MVP

www.opennetcf.org | www.contentmaster.com


Aris wrote:
> How can I declare the path \My Documents using an identifier to avoid the following:
>
> string path= @"\My Documents";
>
> ?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The directory Service was unable to allocate a relative identifier Mark Microsoft Windows 2000 Active Directory 2 16th Aug 2004 12:49 AM
Active Directory Query with unique identifier DJ Dev Microsoft Dot NET 2 24th Mar 2004 05:01 PM
Active Directory Query with unique identifier DJ Dev Microsoft ASP .NET 2 24th Mar 2004 05:01 PM
Active Directory Query with unique identifier DJ Dev Microsoft Dot NET Framework 2 24th Mar 2004 05:01 PM
Re: Directory was unable to allocate a relative identifier Paul McGuire Microsoft Windows 2000 Active Directory 3 11th Sep 2003 02:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:14 AM.