Solved

File saving filter?

Posted on 2000-04-25
6
156 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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