cc29d4e350768f6f7844c2c8fff460972e68949d
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS system libraries
5 * FILE: lib/smlib/compses.c
6 * PURPOSE: Call SM API SM_API_COMPLETE_SESSION
11 #include <sm/helper.h>
14 SmCompleteSession (HANDLE hSmApiPort
, HANDLE hSbApiPort
, HANDLE hApiPort
)
17 SM_PORT_MESSAGE SmReqMsg
;
19 /* Marshal Ses in the LPC message */
20 SmReqMsg
.CompSes
.hApiPort
= hApiPort
;
21 SmReqMsg
.CompSes
.hSbApiPort
= hSbApiPort
;
23 /* SM API to invoke */
24 SmReqMsg
.ApiIndex
= SM_API_COMPLETE_SESSION
;
27 SmReqMsg
.Header
.MessageType
= LPC_NEW_MESSAGE
;
28 SmReqMsg
.Header
.DataSize
= SM_PORT_DATA_SIZE(SmReqMsg
.CompSes
);
29 SmReqMsg
.Header
.MessageSize
= SM_PORT_MESSAGE_SIZE
;
30 Status
= NtRequestWaitReplyPort (hSmApiPort
, (PLPC_MESSAGE
) & SmReqMsg
, (PLPC_MESSAGE
) & SmReqMsg
);
31 if (NT_SUCCESS(Status
))
33 return SmReqMsg
.Status
;
35 DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__
, Status
);