Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 1998-05-18
6
324 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

791 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