Solved

File saving filter?

Posted on 2000-04-25
6
154 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

20 Experts available now in Live!

Get 1:1 Help Now