Re: How to create an all-user writable file
- From: "Pavel A." <pavel_a@xxxxxxxxxxxxxxx>
- Date: Sat, 28 Oct 2006 16:20:56 +0200
Here you can find definitions of Windows API converted to Delphi
http://www.delphi-jedi.org/APILIBRARY:299920
(assuming the "pascal" of the OP is Delphi or compatible )
--PA
"Vladimir Scherbina" <vladimir.scherbina@on_gmail_com> wrote in message news:%23mndqlm%23GHA.3256@xxxxxxxxxxxxxxxxxxxxxxx
Jan,
Estimate the time you will spend to invoking API functions from Pascal plus converting structures. It might take a more time
then rewriting the task in pure C or C++. Also you should realize that 9x is already not supported. Why do you need to write
software for it?
--
Vladimir
"Jan Bruns" <testzugang_janbruns@xxxxxxxx> wrote in message news:45430faf$0$5720$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"anton bassov":
What is an easy way to have a process create a file,
having r/w-access for anyone and del-access for owner+admins?
There is only one way to do what you want - it is neither "easy" nor
"complex", but, instead, just absolutely normal way of granting access
rights under Windows NT. It lies with
getting the target file's ACL with GetSecurityInfo(), adjusting it in a
way that suits your objectives, and then passing ACL to
SetSecurityInfo()
That sound like pretty much work just to make a single Textfile
user-writable.
Besides above mentioned functions, I would advise you to check
SetEntriesInAcl(), as well as at EXPLICIT_ACCESS structure, in MSDN
documentation
Seems like I wouldn't have to deal with C-specific Objects, just plain
functions. Maybe "h2pas.exe" can do the conversion for me.
I don't have the NT-headers available (Pascal-compiler),
Well, I just don't know what to say to that.......
and the Program should run on win98/Me-systems, too.
Windows9x systems don't seem to support access control functions, do
they???? Therefore, I would say that, under Windows9x, your task is
just infeasible
Hmn, with win9X there's only one admin=user, so the job is already
done there.
But I'd need to dynlink these NT-functions. Again some more work,
just to see a user-writable Textfile.
Gruss
Jan Bruns
.
- References:
- How to create an all-user writable file
- From: Jan Bruns
- Re: How to create an all-user writable file
- From: anton bassov
- Re: How to create an all-user writable file
- From: Jan Bruns
- Re: How to create an all-user writable file
- From: Vladimir Scherbina
- How to create an all-user writable file
- Prev by Date: Re: return codes for void main() blocks
- Next by Date: Re: return codes for void main() blocks
- Previous by thread: Re: How to create an all-user writable file
- Next by thread: Re: How to create an all-user writable file
- Index(es):
Relevant Pages
|