Solved

How to track Ctrl+Alt+Del and Ctrl+Break?

Posted on 1998-05-18
6
322 Views
Last Modified: 2006-11-17
I believe u may have read about my question on how to use DDE to communicate with Word 97. I have manage to solve the problem by using DDE to open the template with the visual basic commands  that I have record in Word 97. My objectives of inserting a picture as a watermark in a word document and printing it out are achieved.

However, this picture that is inserted must not be available or accessed by the user. This picture resides in the Oracle database and password to access the picture must be specified before a word document can be printed with this picture as a watermark in it.

In the macro that is used to print the watermark, I include a statement to exit Word 97 without saving the document so that the picture that inserted in the document will not be available when the document is retrieve again. However, users can still hack the program and obtain the picture file. They can do so by performing the Ctrl+Alt+Del key strokes during the process of printing the watermark. The task manager will be activated and the user can force the word document to open and thus obtain the picture file which is already inserted in the document. The user can also control break to open the word document while the program is in the progress of printing the watermark.

My question is how to trap these key strokes and quit Word 97 on detecting them. Thus, the user will have no chance to open the word document.
 
0
Comment
Question by:rosetalk
6 Comments
 
LVL 3

Expert Comment

by:Norbert
ID: 1164227
If you are using win 95
SystemParametersInfo (SPI_SCREENSAVERRUNNING, 1,nOldVal, 0);//Turns keys off
SystemParametersInfo (SPI_SCREENSAVERRUNNING, 0, &nOldVal, 0);//Turns keys on

This would disable..all alt+tab. ctrl+alt+Del...etc. etc.
I hope that helps
    Norbert
0
 

Author Comment

by:rosetalk
ID: 1164228
Thanks Norbert for answering my question. However, my program will be running on Windows NT.
0
 

Expert Comment

by:unmeshv
ID: 1164229
I have a solution for trapping Ctrl+Break  using Interrupt Service Routine in C++. But I havent read about ur previous question and hence I am not sure wether u are carrying out implementation in visual basic or C++. If in C++ please write back accordingly.
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

Expert Comment

by:ElmerFud
ID: 1164230
rosetalk, I'm sorry to inform you that this is impossible.  On Windows NT, the Ctrl + Alt + Delete keys are burried so fa into the OS that the eveent dosen't even go into a single message queue.  Ctrl + Break however isn't sush a key stoke.  I have a program "keyboard express" which run under NT and I use to automate a lot of tasks.  It can not pass Ctrl + Alt + delete because of this very same reason.  Do a net search for Keyboard express, find the author, drop him an e-mail and i'm sure he could go into the detail of why this is impossible.
0
 

Author Comment

by:rosetalk
ID: 1164231
Thanks to Elmerfud and unmeshv for your comments. I won't be doing the Ctrl + Alt + Delete problem. I heard that it is still possible to trap the keystrokes. It got to do with the gina.dll file. I also heard that it is very difficult to do and it is not mean for normal programmers. Anyway, I really appreciate you guys for trying to help.  
0
 
LVL 1

Accepted Solution

by:
Arkadiy earned 100 total points
ID: 1164232
Check out if this helps:
-------------------------------
By giving a macro a special name, you can run it automatically when you perform an operation such as starting Word or opening a document. Word recognizes the following names as automatic macros, or "auto" macros.

Macro name      When it runs
AutoExec      When you start Word
AutoNew      Each time you create a new document
AutoOpen      Each time you open an existing document
AutoClose      Each time you close a document
AutoExit      When you quit Word
----------------------------------
This is from Word 95 help. Word 97 probably has something even more elaborate in its VBA.
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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

911 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

22 Experts available now in Live!

Get 1:1 Help Now