Index: include/reactos/subsys/win/conmsg.h =================================================================== --- include/reactos/subsys/win/conmsg.h (revision 62685) +++ include/reactos/subsys/win/conmsg.h (working copy) @@ -674,6 +674,11 @@ UINT CodePage; } CONSOLE_GETSETINPUTOUTPUTCP, *PCONSOLE_GETSETINPUTOUTPUTCP; +typedef struct +{ + HANDLE ConsoleHandle; +} CONSOLE_NOTIFYLASTCLOSE, *PCONSOLE_NOTIFYLASTCLOSE; + typedef struct _CONSOLE_API_MESSAGE { PORT_MESSAGE Header; @@ -765,6 +770,9 @@ /* Input and Output Code Pages */ CONSOLE_GETSETINPUTOUTPUTCP ConsoleCPRequest; + + /* Miscellaneous */ + CONSOLE_NOTIFYLASTCLOSE NotifyLastCloseRequest; } Data; } CONSOLE_API_MESSAGE, *PCONSOLE_API_MESSAGE; Index: dll/win32/kernel32/client/console/console.c =================================================================== --- dll/win32/kernel32/client/console/console.c (revision 62685) +++ dll/win32/kernel32/client/console/console.c (working copy) @@ -2496,14 +2496,21 @@ } /* - * @unimplemented + * @implemented */ -BOOL +NTSTATUS // DWORD WINAPI SetLastConsoleEventActive(VOID) { - STUB; - return FALSE; + CONSOLE_API_MESSAGE ApiMessage; + PCONSOLE_NOTIFYLASTCLOSE NotifyLastCloseRequest = &ApiMessage.Data.NotifyLastCloseRequest; + + NotifyLastCloseRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle; + + return CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepNotifyLastClose), + sizeof(*NotifyLastCloseRequest)); } /* EOF */