Hello,
If I understand what you are asking, the answer is that you can't using jus=
t=20
C code. If we move the example into the literal word, lets say we have=20
papers in boxes. So now take your papers and boxes, you need to put them=20
somewhere, say the table. So now you need something that can take your=20
papers out of the boxes and do something with them. So how does that=20
'something' take the papers? It goes to the table and picks up the boxes or=
=20
papers, but anything else can also go to the table and pickup the boxes or=
=20
papers.
So you really need to put some lock on the table so that ONLY your somethin=
g=20
can touch the papers and boxes and not anything else, but that isn't=20
something that you can do do within your something. Now, you could have you=
r=20
something '(en/de)crypt' the papers but that would only stop someone else's=
=20
something from making scence of your papers but not changing them.
Taking it back to your example, you may be able to take your files and=20
folders and put them under a 'user' so that ONLY that user can access them=
=20
(using windows protection). They after your create your application, you ge=
t=20
it blessed by the OS (windows) so that it runs as the user that can access=
=20
your files and folders. Then only your code with be able to access the file=
s=20
and folders, unless someone else gets their code to run as that user, etc..=
.
Hope this helps,
Robert
On 8/30/05, LETCHUMANAN SAMINADAN <arl...@ya...> wrote:
>=20
> Dear all,
> I would like to protect my files and folders using c source code. I don'=
t=20
> want other users to change or delete my folders and files. I have tried=
=20
> using Windows protection, but it doesn't work properly with c.=20
> I'm now trying to put my program in a Server directory and then create a=
=20
> Shortcut icon on the desktop.If I try to execute my program from the=20
> Desktop, I can't do it. Because the folders all are blocked, and no=20
> permission at all.
> That is the reason, I would like to protect my files and folders using c=
=20
> source code and I don't want other users to change or delete my folders a=
nd=20
> files.
> Can anyone please help me on this matter. I really need your help.
> Thank you,
> Letchu...
>=20
> ------------------------------
> Meet your soulmate!
> *Yahoo! Asia presents Meetic*<http://us.rd.yahoo.com/prm/pers/mt/yma_sg/t=
gl/*http://asia.yahoo.com/meetic>- where millions of singles gather=20
>=20
>
|