🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12990

Re: API EncryptFile, DecryptFile Function

#12990
From: Bob Gonder
Date: Sun, 02 Nov 2003 17:48
25 lines
2038 bytes
Marcello Scala wrote:

>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/encryptfile.asp

>Use this function and you'll see that it doesn't work.

What about it "doesn't work"?
I assume you mean it returns FALSE.
What does GetLastError() tell you about the problem?

Are you using XP or 2000 Professional?  If not, it "won't work".

>I want know if there is any parameters to set before call the function.

It looks like if you don't do anything special, Windows will use a
"default key" to encrypt the file.
If you don't want the default, then I think you need to use
SetUserFileEncryptionKey() and perhaps more of the functions at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/handling_encrypted_files_and_directories.asp

>For this i want a simple source.

Setting keys looks needlessly complex to me, so I don't think you are
going to get "a simple source" for it.
Technical Details
Message-ID: <rafaqvkmkop2qupllrq8lphoor2mmr7293@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fa4de7d@newsgroups.borland.com> <3fa506eb$1@newsgroups.borland.com> <3fa52d20@newsgroups.borland.com> <3fa5371b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1d61b57c27398563
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-02 10:09:04 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: API EncryptFile, DecryptFile Function
Date: Sun, 02 Nov 2003 09:48:22 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <rafaqvkmkop2qupllrq8lphoor2mmr7293@4ax.com>
References: <3fa4de7d@newsgroups.borland.com> <3fa506eb$1@newsgroups.borland.com> <3fa52d20@newsgroups.borland.com> <3fa5371b$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.177.47
X-Trace: newsgroups.borland.com 1067795302 67.31.177.47 (2 Nov 2003 09:48:22 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail