Solved

File saving filter?

Posted on 2000-04-25
6
155 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:rbasurto
6 Comments
 
LVL 3

Expert Comment

by:f15iaf
ID: 2748635
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;
0
 
LVL 3

Expert Comment

by:f15iaf
ID: 2748645
it's only works when user do copy and paste option in windows 98
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 2748651
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.


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Accepted Solution

by:
joseph_schuler earned 200 total points
ID: 2748741
Check out File System API Hook and FileSystemApiHookFunction in the MSDM Library (Win 95 DDK).  The only gotcha is that from reading the docs the hook would need to be implemented in a VXD because you usually needs to be in ring 0.  IFSMGR_InstallFileSystemApiHook exists in the Windows 98 DDK but it also relys on Ring 0 code.  Unfortunately Delphi currently does not support generation of VXD's
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 2750636
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.
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 2750637
ok, here's the direct link to the download:

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now