Click here to Skip to main content
15,569,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What Windows Message is send to windows in the system, when Control Alternative Delete buttons where pressed?
Posted

There isn't one.

The system never sees this keyboard combination as it is intercepted by GINA on Windows XP and below and (I believe) WinLogon in Windows Vista and above.

If your'e trying to intercept this key combination, you can't - for a very obvious reason.
 
Share this answer
 
Comments
Pravin Patil, Mumbai 15-Feb-11 8:29am    
I think this is a very logical answer.
I agree with you dave.
Sandeep Mewara 15-Feb-11 9:23am    
Comment from OP:
I need to handle this combination. Every Direct 3D game handles this combination
Dave Kreskowiak 15-Feb-11 9:27am    
No, they don't. What makes you think they do?
[no name] 15-Feb-11 9:30am    
They restore display, game data.
Andrew Brock 15-Feb-11 10:37am    
If you are trying to use this for a game:
When the full screen game window is minimised or the graphics drivers are reset a call to Direct3D::Present will fail with a lost device return code. This is how games know that a CAD has occurred, or anything else that would cause the device to be lost (like Alt+Tab in full screen).

They then watch the WM_ACTIVATE message and attempt to restore or reset the state of the device when the window is re-activated.
It is not possible to intercept the CTRL-ALT-DELETE keyboard sequence in a user mode application. The "limitation" is intentional and is designed to stop applications spoofing the logon process. In short, the system is superior for not allowing it (it's more serure). See this link to learn about the SAS[^].
 
Share this answer
 
v2
Comments
Sandeep Mewara 15-Feb-11 9:23am    
Comment from OP:
I need to handle this combination. Every Direct 3D game handles this combination
Stephen Hewitt 15-Feb-11 9:52am    
No, they don't handle the key combination. They handle the "device lost" event. This can occur for many reasons, only one of which is CTRL-ALT-DELETE, and even then it's only a by-product of the process.
I don't think the Direct3D games (you mentioned in your comment) handle Ctrl-Alt-Del directly. But they have code that will handle an interruption elegantly. So if the game's running fullscreen and is interrupted by Ctrl-Alt-Del, the game does not know this but when control resumes, it somehow detects the interruption (perhaps from keyboard or mouse input, or a timer, and then elegantly restores the game surface to it's last known state - although some games don't do this properly and will just crash, but that's an implementation error.
 
Share this answer
 
Comments
[no name] 15-Feb-11 9:32am    
Is there any windows message, that is send to all windows in the system?
Direct 3D games (DX9) handles D3DERR_DEVICELOST which occures after "three kings"...
 
Share this answer
 
Comments
[no name] 15-Feb-11 9:34am    
In what way do they handle D3DERR_DEVICELOST? Now i handle it as silent fail returning S_OK code. I got this result of TestCooperativeLevel.

// Test the cooperative level to see if it's okay to render
if( FAILED( hr = m_pd3dDevice->TestCooperativeLevel() ) )
{
// If the device was lost, do not render until we get it back
if( D3DERR_DEVICELOST == hr )
{
return S_OK;
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900