473,804 Members | 3,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get the message of delete files using hook?

Sorry for my poor english.
In windows2000, I want to disable users' ability to delete directories or
files in explorer. I want to use hook to catch the message when user click
"Yes" in the prompt dialog.
I am confusing which kind of hook to use,WH_GETMESSA GE or WH_SYSMSGFILTER ?
And I don't know how to find the message that is created when user click
"delete".
I didn't find related code examples in my msdn.
Can anyone give me suggestion on how to do it and give code example?
Thank you very much.

Nov 17 '05 #1
4 1340
On Wed, 19 Jan 2005 01:17:06 -0800, "Liao_xf" <sc***@163.co m> wrote:
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete directories or
files in explorer. I want to use hook to catch the message when user click
"Yes" in the prompt dialog.
I am confusing which kind of hook to use,WH_GETMESSA GE or WH_SYSMSGFILTER ?
And I don't know how to find the message that is created when user click
"delete".
I didn't find related code examples in my msdn.
Can anyone give me suggestion on how to do it and give code example?
Thank you very much.


Why not just give them a limited acount., that doesn't have permission
to delete the files/directories in question?

--
Sev
Nov 17 '05 #2
Liao_xf wrote:
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete
directories or files in explorer. I want to use hook to catch the
message when user click "Yes" in the prompt dialog. That's not the right way to achieve this goal, since the user :
- can delete via a command prompt.
- can have desactivated the confirmation box on it's explorer.
I am confusing which kind of hook to use,WH_GETMESSA GE or
WH_SYSMSGFILTER ? And I don't know how to find the message that is
created when user click "delete".

Use Spy++ to se what happens to the dialog box, but once more time it's not
the right solution to your problem.

Arnaud
MVP - VC
Nov 17 '05 #3
Thank you,Serverian.
I know that NTFS can prevent the user from deleting the directory or file.
But it may have trouble if I use Ghost on a disk of NTFS format.
"Severian" wrote:
On Wed, 19 Jan 2005 01:17:06 -0800, "Liao_xf" <sc***@163.co m> wrote:
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete directories or
files in explorer. I want to use hook to catch the message when user click
"Yes" in the prompt dialog.
I am confusing which kind of hook to use,WH_GETMESSA GE or WH_SYSMSGFILTER ?
And I don't know how to find the message that is created when user click
"delete".
I didn't find related code examples in my msdn.
Can anyone give me suggestion on how to do it and give code example?
Thank you very much.


Why not just give them a limited acount., that doesn't have permission
to delete the files/directories in question?

--
Sev

Nov 17 '05 #4
Thanks, Arnaud.
1. I can hide the cmd prompt from the user.
2. You mentioned disactived the confirmation dialog in Explorer.
Can you give me advice what way to disactive it?

"Arnaud Debaene" wrote:
Liao_xf wrote:
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete
directories or files in explorer. I want to use hook to catch the
message when user click "Yes" in the prompt dialog.

That's not the right way to achieve this goal, since the user :
- can delete via a command prompt.
- can have desactivated the confirmation box on it's explorer.
I am confusing which kind of hook to use,WH_GETMESSA GE or
WH_SYSMSGFILTER ? And I don't know how to find the message that is
created when user click "delete".

Use Spy++ to se what happens to the dialog box, but once more time it's not
the right solution to your problem.

Arnaud
MVP - VC

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1884
by: ½£¾ªºè | last post by:
Give an example:When user pressed "B" or "b",HOOK get that message and let TextBox1.text display "a". The executing founction is as following: **************************************** IntPtr MyHookProc(int code, IntPtr wparam, IntPtr lparam) { if( code < 0 ) return CallNextHookEx(_nextHookPtr,code, wparam, lparam); if( wparam.ToInt32() == 98 || wparam.ToInt32() == 66 ) {
9
2300
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web browser. What is the issue? Thanks, Jim Server Error in '/psnRequest' Application. ----------------------------------------------------------------------------
8
3594
by: hugh | last post by:
Hi there, Is there any way to make a DeleteFileDialog that works similar with OpenFileDialog? Thanks very much. Hugh
0
10337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.