Crtl-C gives a new line when reading input
[reactos.git] / reactos / subsys / smss / smapiquery.c
1 /* $Id$
2 *
3 * smapiquery.c - SM_API_QUERY_INFORMATION
4 *
5 * Reactos Session Manager
6 *
7 * --------------------------------------------------------------------
8 *
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING.LIB. If not, write
21 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
22 * MA 02139, USA.
23 *
24 * --------------------------------------------------------------------
25 */
26 #include "smss.h"
27
28 #define NDEBUG
29 #include <debug.h>
30
31
32 /**********************************************************************
33 * SmQryInfo/1 API
34 */
35 SMAPI(SmQryInfo)
36 {
37 NTSTATUS Status = STATUS_SUCCESS;
38
39 DPRINT("SM: %s called\n", __FUNCTION__);
40
41 switch (Request->Request.QryInfo.SmInformationClass)
42 {
43 case SmBasicInformation:
44 if(Request->Request.QryInfo.DataLength != sizeof (SM_BASIC_INFORMATION))
45 {
46 Request->Reply.QryInfo.DataLength = sizeof (SM_BASIC_INFORMATION);
47 Request->SmHeader.Status = STATUS_INFO_LENGTH_MISMATCH;
48 }else{
49 Request->SmHeader.Status =
50 SmGetClientBasicInformation (& Request->Reply.QryInfo.BasicInformation);
51 }
52 break;
53 case SmSubSystemInformation:
54 if(Request->Request.QryInfo.DataLength != sizeof (SM_SUBSYSTEM_INFORMATION))
55 {
56 Request->Reply.QryInfo.DataLength = sizeof (SM_SUBSYSTEM_INFORMATION);
57 Request->SmHeader.Status = STATUS_INFO_LENGTH_MISMATCH;
58 }else{
59 Request->SmHeader.Status =
60 SmGetSubSystemInformation (& Request->Reply.QryInfo.SubSystemInformation);
61 }
62 break;
63 default:
64 Request->SmHeader.Status = STATUS_NOT_IMPLEMENTED;
65 break;
66 }
67 return Status;
68 }
69
70
71 /* EOF */