Link to home
Start Free TrialLog in
Avatar of rbasurto
rbasurto

asked on

File saving filter?

I want to restrict some kind of files to be saved on my computer so I think I need something like a driver which listens to some kind of windows message and if I detect that a someone is trying to save a restricted file (for example an MP3 file) my driver musn't let him do it. I don't want to monitor if someone already has done that. I want to prevent the writing process to the disk.
Avatar of f15iaf
f15iaf

add
   uses clipbrd;
and write this procedure in ontimer event in Ttimer object


procedure TForm1.Timer1Timer(Sender: TObject);
var
        f:pchar;
begin
        getmem(f,50);
        clipboard.GetTextBuf(f,50);
        {check if f is a filename,if it's a filename check extention}
        {sometimes clipboard contains other text messages not necesary file}
end;
it's only works when user do copy and paste option in windows 98
in NT/W2K you could use ReadDirectoryChangesW to check for new files by dir and kill them when saved. Unfortunatly, I am not aware of a like method for W9x.


ASKER CERTIFIED SOLUTION
Avatar of joseph_schuler
joseph_schuler

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
there's a free component "dirmon" from francoise piette


http://www.rtfm.be/fpiette/indexuk.htm

i suggest you check that out cause it's really good and fits your needs perfectly.

regards,

BlackDeath.
ok, here's the direct link to the download:

http://sme.belgium.eu.net/~vip107/dirmon.zip