Article View: borland.public.cppbuilder.nativeapi
Article #5455Re: How Getting ptah of <C:\Documents and Settings\alluser> folder
From: Remy Lebeau (TeamB)
Date: Wed, 17 Aug 2005 18:25
Date: Wed, 17 Aug 2005 18:25
28 lines
2185 bytes
2185 bytes
"sam" <skneife3@wanadoo.fr> wrote in message
news:43033672@newsgroups.borland.com...
> CSIDL_COMMON_APPDATA can't be used if Shell and Common
> Controls Versions 5 is not installed. So How is it possible to get this
> directory path <C:\Documents and Settings\alluser\Application Data>
> on Windows 95/98 that have Shell and Common Controls Versions 4.70 ?
No such folder exists on Win9x machines under 4.7x to begin with.
You will have to dynamically retreive the version of the "Shell and Common
Controls" that is actually being used by the application before deciding
when to use CSIDL_COMMON_APPDATA. You can use GetProcAddress() to retreive
a pointer to the DllGetVersion() function that Windows' DLLs export. Refer
to the following article for more details:
Shell and Common Controls Versions
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/versions.asp
Incidently, on my Win98 machine, I have <C:\Windows\All Users\Application
Data> and <C:\Windows\Application Data> folders available, so you may
consider using GetWindowsFolder() as an alternative to
SHGetSpecialFolderPath() when needed.
Gambit
Technical Details
Message-ID:
<430381af$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43033672@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6638340ca3c38f1c X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <43033672@newsgroups.borland.com> Subject: Re: How Getting ptah of <C:\Documents and Settings\alluser> folder Date: Wed, 17 Aug 2005 11:25:44 -0700 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <430381af$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124303279 68.69.17.41 (17 Aug 2005 11:27:59 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail