blocking alt+ctrl+del

hi
  any one know that how can i block alt+ctrl+del
using vc++(API).and how can i get adminstrator access in kernal mode using windows
arehman_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fantasy1001Commented:
There is NO WAY to block alt+ctrl+del!

Thanks,
~ fantasy ~
0
bhagyeshtCommented:
make window indentify your program as a screensaver.
http://www.experts-exchange.com/Hardware/Q_10231761.html
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

OHDev2004Commented:
There is a way of blocking access to the Task Manager ;
it's by using the windows registry ,, so u can access the windows registry within your app
and add this item as following :

you should check for this Key :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
if any of the above Keys don't exists , just create it ,
(because by default the last key "System" does not exists)

then add an Dword Item with the following name "DisableTaskMgr"
with a value of "1"      '(dword:00000001)
0
OHDev2004Commented:
by the way ,,, in case u don't know the way to access the windows registry ,,:


(1) from windows : click Start ,, Run ,, then type REGEDIT.exe
(2) from within ur Program : you must call Api Functions to access and write to the registry ,,
     i know these functions but for Vb not in vc++ ,, but u'll find it every where

0
Peter SkovCommented:
A quick Googlesearch for
Disable "ctrl-alt-del"

gave me 15900 hits. On the first page, though, this link occurs:
http://forums.free2code.net/view.php?tid=579

It seems there are ways to do it after all.

Peter
0
rabi9634Commented:
I'll assume you want to block a specific function.  If you explore the registry a bit more, you can add or disable specific functions in the Task Manager.. (or in the little Windows Security box that comes up in W2K).  
0
R_RajeshCommented:
to block specific function click start->run type gpedit.msc you will find local coumputer policy here goto userconfiguration->administrativetemplates->system->ctrl+alt+del option you can disable various features by setting values on the right hand pane. browse through other sections aswell you may find something usefil

this ofcourse does not work on win98, in 98 as  bhagyesht mentioned you can set screensaver running to true.

also check this out
http://www.codeproject.com/useritems/preventclose.asp
0
vinnyd79Commented:
The only way to disable ctrl-alt del on an NT based OS is to write a replacement msgina.dll which cannot be done in VB.
0
vinnyd79Commented:
uh,sorry. I was thinking this was a vb question.
0
vinnyd79Commented:
0
bhagyeshtCommented:
vinny: not vb but vc ("using vc++(API).")
0
cybermoonlightCommented:
Vinny is correct in saying that to disable ctrl-alt-del on windowsNT based OS's, you must write a replacement GINA dll stub. This must be done   in c as vb cannot create standard dll's. But it is a simple concept, all you have to code is a simple extansion, whose function is to prevent the SAS sequence being passed on to the winlogon process, that hooks into the existing GINA in order to process other events. To get the OS to call this dll you must change the filepath in the registry
check thislink forloadsofinfo on replacingtheGINA
http://www.microsoft.com/windows2000/docs/msgina.doc

this is an example i found while searching through google ..search phrase : GINA Winlogon CTRL-ALT-DEL

-------------------------------- mygina.c --------------------------------
#include <windows.h>
#include <winwlx.h>

struct {
      HMODULE hDll;
      BOOL (WINAPI *WlxNegotiate)();
      BOOL (WINAPI *WlxInitialize)();
      VOID (WINAPI *WlxDisplaySASNotice)();
      int (WINAPI *WlxLoggedOutSAS)();
      BOOL (WINAPI *WlxActivateUserShell)();
      int (WINAPI *WlxLoggedOnSAS)();
      VOID (WINAPI *WlxDisplayLockedNotice)();
      int (WINAPI *WlxWkstaLockedSAS)();
      BOOL (WINAPI *WlxIsLockOk)();
      BOOL (WINAPI *WlxIsLogoffOk)();
      VOID (WINAPI *WlxLogoff)();
      VOID (WINAPI *WlxShutdown)();
      BOOL (WINAPI *WlxScreenSaverNotify)();
      BOOL (WINAPI *WlxStartApplication)();
      BOOL (WINAPI *WlxNetworkProviderLoad)();
} MsGina;

BOOL WINAPI WlxNegotiate(DWORD dwWinlogonVersion, PDWORD pdwDllVersion)
{
      MsGina.hDll = LoadLibrary("msgina.dll");
      if(MsGina.hDll == NULL) return FALSE;

      MsGina.WlxActivateUserShell = GetProcAddress(MsGina.hDll, "WlxActivateUserShell");
      MsGina.WlxDisplayLockedNotice = GetProcAddress(MsGina.hDll, "WlxDisplayLockedNotice");
      MsGina.WlxDisplaySASNotice = GetProcAddress(MsGina.hDll, "WlxDisplaySASNotice");
      MsGina.WlxInitialize = GetProcAddress(MsGina.hDll, "WlxInitialize");
      MsGina.WlxIsLockOk = GetProcAddress(MsGina.hDll, "WlxIsLockOk");
      MsGina.WlxIsLogoffOk = GetProcAddress(MsGina.hDll, "WlxIsLogoffOk");
      MsGina.WlxLoggedOnSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOnSAS");
      MsGina.WlxLoggedOutSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOutSAS");
      MsGina.WlxLogoff = GetProcAddress(MsGina.hDll, "WlxLogoff");
      MsGina.WlxNegotiate = GetProcAddress(MsGina.hDll, "WlxNegotiate");
      MsGina.WlxScreenSaverNotify = GetProcAddress(MsGina.hDll, "WlxScreenSaverNotify");
      MsGina.WlxShutdown = GetProcAddress(MsGina.hDll, "WlxShutdown");
      MsGina.WlxStartApplication = GetProcAddress(MsGina.hDll, "WlxStartApplication");
      MsGina.WlxWkstaLockedSAS = GetProcAddress(MsGina.hDll, "WlxWkstaLockedSAS");

      return MsGina.WlxNegotiate(dwWinlogonVersion, pdwDllVersion);
}

BOOL WINAPI WlxInitialize(
      LPWSTR lpWinsta,
      HANDLE hWlx,
      PVOID pvReserved,
      PVOID pWinlogonFunctions,
      PVOID *pWlxContext)
{
      return MsGina.WlxInitialize(
            lpWinsta,
            hWlx,
            pvReserved,
            pWinlogonFunctions,
            pWlxContext);
}

VOID WINAPI WlxDisplaySASNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplaySASNotice(pWlxContext);
}

int WINAPI WlxLoggedOutSAS(
      PVOID pWlxContext,
      DWORD dwSasType,
      PLUID pAuthenticationId,
      PSID pLogonSid,
      PDWORD pdwOptions,
      PHANDLE phToken,
      PWLX_MPR_NOTIFY_INFO pNprNotifyInfo,
      PVOID *pProfile)
{
      return MsGina.WlxLoggedOutSAS(
            pWlxContext,
            dwSasType,
            pAuthenticationId,
            pLogonSid,
            pdwOptions,
            phToken,
            pNprNotifyInfo,
            pProfile);
}

BOOL WINAPI WlxActivateUserShell(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PWSTR pszMprLogonScript,
      PVOID pEnvironment)
{
      return MsGina.WlxActivateUserShell(
            pWlxContext,
            pszDesktopName,
            pszMprLogonScript,
            pEnvironment);
}

int WINAPI WlxLoggedOnSAS(PVOID pWlxContext, DWORD dwSasType, PVOID pReserved)
{
      HANDLE hMutex;

      if(dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL) {
            hMutex = OpenMutex(MUTANT_QUERY_STATE, FALSE, "mygina mutex");
            if(hMutex != NULL) {
                  CloseHandle(hMutex);
                  return WLX_SAS_ACTION_NONE;
            }
      }

      return MsGina.WlxLoggedOnSAS(pWlxContext, dwSasType, pReserved);
}

VOID WINAPI WlxDisplayLockedNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplayLockedNotice(pWlxContext);
}

int WINAPI WlxWkstaLockedSAS(PVOID pWlxContext, DWORD dwSasType)
{
      return MsGina.WlxWkstaLockedSAS(pWlxContext, dwSasType);
}

BOOL WINAPI WlxIsLockOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLockOk(pWlxContext);
}

BOOL WINAPI WlxIsLogoffOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLogoffOk(pWlxContext);
}

VOID WINAPI WlxLogoff(PVOID pWlxContext)
{
      MsGina.WlxLogoff(pWlxContext);
}

VOID WINAPI WlxShutdown(PVOID pWlxContext, DWORD ShutdownType)
{
      MsGina.WlxShutdown(pWlxContext, ShutdownType);
}

BOOL WINAPI WlxScreenSaverNotify(PVOID pWlxContext, BOOL *pSecure)
{
      return MsGina.WlxScreenSaverNotify(pWlxContext, pSecure);
}

BOOL WINAPI WlxStartApplication(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PVOID pEnvironment,
      PWSTR pszCmdLine)
{
      return MsGina.WlxStartApplication(pWlxContext, pszDesktopName, pEnvironment, pszCmdLine);
}

BOOL WINAPI WlxNetworkProviderLoad(PVOID pWlxContext, PWLX_MPR_NOTIFY_INFO pNprNotifyInfo)
{
      return MsGina.WlxNetworkProviderLoad(pWlxContext, pNprNotifyInfo);
}

-------------------------------- mygina.def --------------------------------
EXPORTS
      WlxActivateUserShell
      WlxDisplayLockedNotice
      WlxDisplaySASNotice
      WlxInitialize
      WlxIsLockOk
      WlxIsLogoffOk
      WlxLoggedOnSAS
      WlxLoggedOutSAS
      WlxLogoff
      WlxNegotiate
      WlxScreenSaverNotify
      WlxShutdown
      WlxStartApplication
      WlxWkstaLockedSAS

This should give you all the info you need in order to solve your problem. Thanks

Mark
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.