Link to home
Start Free TrialLog in
Avatar of psycho_cat_69
psycho_cat_69

asked on

Windows file access

I need to find a way to put restrictions on some files via Delphi a runtime!  If someone try to change the name of a file on the C drive, i want to be able to validate the access (homemade database) of the user and prevent the user to do this action if he don't have permission!

Code example if it's possible!

Thanx!
Avatar of Madshi
Madshi

You have 3 possibilities:

(1) Use winNT/2k or XP professional. There this functionality is built in.
(2) Write drivers for win9x (not really possible in Delphi).
(3) Hook all file APIs systemwide. That's *very* difficult to do, but possible. This solution will work for most 32bit processes. But file accesses of a 16bit process will not get cought. I guess that is not good enough?

Regards, Madshi.
I think that this question is for about 5 000 points at least. :-)

Ivan
Avatar of psycho_cat_69

ASKER

IPCH:

sorry!  Cannot give more than 300 points!  I would have give like 2500 points if it was possible... but i'm not registered as a member right now! So the system limit me at 300!

Madshi:

With the API call of FindFirstChangeNotification, FindNextChangeNotification, WaitForSingleObject, it's quite easy to know if a file or any file on the drive has been changed.  But the tricky part is that i want to put some restrictions on the files.  No rename, no delete, No copy, etc...  i don't know how to access those properties!

Hope it's a little more clear!

Thanx to both of you!
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
psycho_cat_69:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

accept Madshi's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thanks,

geobul
EE Cleanup Volunteer