Article View: borland.public.cppbuilder.nativeapi
Article #16505Re: CreateDirectory
From: Remy Lebeau (TeamB)
Date: Sun, 11 May 2003 21:26
Date: Sun, 11 May 2003 21:26
32 lines
2212 bytes
2212 bytes
"CapStick" <lol@ljones81.fsnet.co.uk> wrote in message
news:3ebe1bab@newsgroups.borland.com...
> Is there a set format for how this
> should be done in relation to my .EXE
Although you are technically free to put your new folder wherever you want,
Microsoft's suggests that user-related data should go in the following
folder:
"C:\<documents>\<username>\Application Data"
Where <documents> is "My Documents" or "Documents and Settings" depending on
the OS you're running under, and <username> is the name of the user
currently logged in or "All Users" if the folder should be accessible to all
users rather than a specific one.
Have a look at the SHGetSpecialFolderLocation() and SHGetPathFromIDList()
functions. Use the CSIDL_APPDATA or CSIDL_COMMON_APPDATA flag when calling
SHGetSpecialFolderLocation().
> I would also Like To Password Protect this Directory
> and some or all of its contained files.
The Win32 API does not support that directly. You need to use a Shell
Namespace Extension to handle that. You would have to either write your own
from scratch (not a simple thing to do) or else find a third-party
ready-made extension.
Gambit
Technical Details
Message-ID:
<3ebebfab$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!news.linkpendium.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ebe1bab@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,603622406bfaac23 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-11 14:32:07 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ebe1bab@newsgroups.borland.com> Subject: Re: CreateDirectory Date: Sun, 11 May 2003 14:26:55 -0700 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3ebebfab$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052688299 207.175.226.26 (11 May 2003 14:24:59 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!news.linkpendium.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail