ReactOS  0.4.15-dev-1070-ge1a01de
compses.c File Reference
#include "precomp.h"
#include <debug.h>
Include dependency graph for compses.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS WINAPI SmCompleteSession (IN HANDLE hSmApiPort, IN HANDLE hSbApiPort, IN HANDLE hApiPort)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file compses.c.

Function Documentation

◆ SmCompleteSession()

NTSTATUS WINAPI SmCompleteSession ( IN HANDLE  hSmApiPort,
IN HANDLE  hSbApiPort,
IN HANDLE  hApiPort 
)

Definition at line 32 of file compses.c.

35 {
37  SM_PORT_MESSAGE SmReqMsg;
38 
39  DPRINT("SMLIB: %s called\n", __FUNCTION__);
40 
41  /* Marshal Ses in the LPC message */
42  SmReqMsg.Request.CompSes.hApiPort = hApiPort;
43  SmReqMsg.Request.CompSes.hSbApiPort = hSbApiPort;
44 
45  /* SM API to invoke */
46  SmReqMsg.SmHeader.ApiIndex = SM_API_COMPLETE_SESSION;
47 
48  /* Port message */
49  SmReqMsg.Header.u2.s2.Type = LPC_NEW_MESSAGE;
50  SmReqMsg.Header.u1.s1.DataLength = SM_PORT_DATA_SIZE(SmReqMsg.Request);
51  SmReqMsg.Header.u1.s1.TotalLength = SM_PORT_MESSAGE_SIZE;
52  Status = NtRequestWaitReplyPort (hSmApiPort, (PPORT_MESSAGE) & SmReqMsg, (PPORT_MESSAGE) & SmReqMsg);
53  if (NT_SUCCESS(Status))
54  {
55  return SmReqMsg.SmHeader.Status;
56  }
57  DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status);
58  return Status;
59 }
struct _SM_PORT_MESSAGE::@3482::@3484::@3486 SmHeader
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
Definition: send.c:695
LONG NTSTATUS
Definition: precomp.h:26
#define SM_API_COMPLETE_SESSION
Definition: api.h:32
#define SM_PORT_DATA_SIZE(c)
Definition: api.h:149
void DPRINT(...)
Definition: polytest.cpp:61
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
union _SM_PORT_MESSAGE::@3482::@3484::@3487::@3489 Request
HANDLE hSbApiPort
Definition: init.c:32
PORT_MESSAGE Header
Definition: api.h:112
#define SM_PORT_MESSAGE_SIZE
Definition: api.h:150
#define __FUNCTION__
Definition: types.h:112