Solved

API call for Windows2000 to lock the keyboard

Posted on 2004-08-16
2
312 Views
Last Modified: 2013-11-13
Hi,
I have created a VB application to lock the computer (VB6) using the
following APIS:
clipcursor
getwindowrect
systemparamtersinfo (SPI_SCREENSAVERRUNNING)

The mechanism is that when the user locks the windows, the getwindowrect API gets the rectangular region of the form and clips the cursor so that it cannot move on the desktop. The Systemparamtersinfo API then locks the keyboard until the user enters the required password in the vb6 application. This app works fine under windows 98. However, under windows 2000 the systemparametersinfo(SPI_SCREENSAVERRUNNING) doesnot work. As a result,
the keyboard shortcuts such as CTL-ALT-DEL and CTL-TAB work even when
my VB6 application has locked the cursor within the rectangular region
of the form. Is there any alternative to the Systemparametersinfo API
that can do the lock the keyboard (not to the application but to
the rest of the windows)

THnaks
Rafay
0
Comment
Question by:rbali2004
2 Comments
 
LVL 11

Expert Comment

by:Jase-Coder
ID: 11813218
0
 
LVL 2

Accepted Solution

by:
zonaltech earned 125 total points
ID: 11830677
Here's an example project that uses the keyboard hooking and mouse restriction you are talking about:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=54463&lngWId=1

It disables low level keys in NT, 2000, and XP.

Hope it helps!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
dividesSelf challange 15 77
sumHeights2  challenge 7 75
find a node in VST 2 46
What is Python programming? 3 62
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

708 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

16 Experts available now in Live!

Get 1:1 Help Now