Topaz Filer: if you use e-mail for business, we can save you money and decrease your risk.
Disable Ctrl-Alt-Delete for Visual Basic .net
Messages   Related Types
This message was discovered on microsoft.public.dotnet.general.


Greg
I am developing an application where I need to secure a
workstation for periods of time. I can use BlockInput to
stop users from task switching or messing with the
keyboard, but I would like to disable Ctrl-Alt-Delete.

It seems there seems to be only one real way I know
about: Write a replacement Gina Driver to eat the
keyboard events I dont want. Does anyone have a good
template for this in Visual Basic .Net?

Or if there is an easier way that work in Win2K I am all
ears!

Thanks!

Reply to this message...
Vote that this is a GOOD answer...
 
Auto-following on Twitter
Ubuntu and XP on one “desktop”
 
    
Scott M.
I would think that if you could override CTL+ALT+DEL, you'd be getting
around one of Window's main security tasks.

"Greg" <Click here to reveal e-mail address> wrote in message
news:001101c3c981$4534acb0$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Outlook interop - stopping user properties appearing on Outlook message print
Seriously, why is “cut and paste” majorly newsworthy???
 
    
gregory_may@n_o_s_p_a_m_hotmail.com
Thats exactly right.

In some environments, the PC's need to be locked down tighter than normal.
Hence I need to disable this screen under certain conditions.

g.
"Scott M." <Click here to reveal e-mail address> wrote in message
news:Ov%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Scott M.
My point was, I don't think MS provides a way to defeat their first line of
defense.

<Click here to reveal e-mail address> wrote in message
news:ur1P%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Email Archiving and Email Filing - what’s the difference?
Web-based task/todo list management
 
    
gregory_may
This article seems to give a good overview if I knew C better:
http://www.codeguru.com/mfc/comments/2574.shtml

Here is a Microsoft article that tells me about a Platform SDC with the C
code that I need, but I was hoping for a VB port someplace. C is pretty
weak for me.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_and_gina.asp

Here is a guy doing it in DELPHI!:
http://rds.yahoo.com/S=2766679/K=ginastub+visual+basic/v=2/TID=DF4H_3/SID=w/l=WS1/R=3/H=0/*-http://oldlook.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20747621.html

"Scott M." <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
> My point was, I don't think MS provides a way to defeat their first line
of
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Open source windows
The Law Society’s guidelines on e-mail management
 
    
gregory_may
A reply to this thread has been made in microsoft.public.dontnet.fraimwork
(I am posting here):

Hello,

Thanks for your post. As I understand, you want to trap and disable
Ctrl-Alt-Delete programmatically in Win2K. Please correct me if there is
any misunderstanding. I reviewed your description carefully, and now I'd
like to share the following information with you:

1. As documented in the article to which you pointed, you can use
DisableTaskMgr to disable Ctrl+Alt+Del. To trap Ctrl+Alt+Del, you have
three options: write a GINA stub, write a keyboard driver, or replace
TaskMgr.exe with your own program. I recommend you create a GINA stub which
is comparatively easy to implement among these three options.

2. However, we have to use VC instead of VB to implement a GINA Stub. As
you know, a GINA Stub is a native dynamic-link library (DLL) exported to
Winlogon that requires a valid, consistent function to call into. This
requires a DLL export, which .NET Framework does not support. Managed code
(VB .NET, C#) has no concept of a consistent value for a function pointer
because these function pointers are proxies that are built dynamically.

3. There is an existing GINA Stub sample in MSDN. To trap/disable
Ctrl-Alt-Delete, you just need to replace its WlxLoggedOnSAS with the one
in my code snippet below.

GinaStub Sample: Pass-through "Stub" Gina
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/
html/vcsmpginastubsample.asp?frame=true

/*----------------------------code snippet----------------------*/
int
WINAPI
WlxLoggedOnSAS(
PVOID pWlxContext,
DWORD dwSasType,
PVOID pReserved)
{
if (dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL)
{
/* Add additional code of you own */
return WLX_SAS_ACTION_NONE;
}
else
return GWlxLoggedOnSAS( pWlxContext, dwSasType, pReserved );
}
/*-----------------------------end of--------------------------------*/

In addition, I believe the following MSDN aritcles are helpful:

WlxLoggedOnSAS
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/se
curity/wlxloggedonsas.asp

Loading and Running a GINA DLL
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/se
curity/loading_and_running_a_gina_dll.asp

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

"gregory_may" <None> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Mahesh Reddy
(Type your message here)

--------------------------------
From: Mahesh Reddy
hi Mr. gregory_may

i have written replace ment gina for MSGINA.
but it is having one problem. In winlogging mode after coming to user login mode if anybody pressed Ctrl+Alt+Delete. it is showing the error as SAS window winlogon.exe - Appliction error.
so can you tell what can be the problem or how can i disable
Ctrl+Alt+Delete in winlogging mode only. If i disable it in wlxinitialise
funtion of gina.
Ctrl+Alt+Delete will be disabled in desktop mode. so plz suggest me what can be the problem.

thanks in advance
Reply to this message...
Vote that this is a GOOD answer...
 
Google Docs… no.
Twitter Elite
 
 




Ad
BootFX
Reliable and powerful .NET application framework.
Recession Busting Bespoke Software
Get through the recession by investing in bespoke software to decrease costs and create commercial opportunities.
Other DN247 Network Sites
.NET 247
SQL Server Wins
Old Skool Developer
 
Copyright © AMX Software Ltd 2008-2009. Portions copyright © Matthew Baxter-Reynolds 2001-2009. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - .NET 247 is a member of the DN247 Network - 4.0.30129.1734