Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencompses.c
Go to the documentation of this file.
00001 /* $Id: compses.c 37763 2008-11-30 11:42:05Z sginsberg $ 00002 * 00003 * COPYRIGHT: See COPYING in the top level directory 00004 * PROJECT: ReactOS system libraries 00005 * FILE: lib/smlib/compses.c 00006 * PURPOSE: Call SM API SM_API_COMPLETE_SESSION 00007 */ 00008 #include "precomp.h" 00009 00010 #define NDEBUG 00011 #include <debug.h> 00012 00013 /********************************************************************** 00014 * NAME EXPORTED 00015 * SmCompleteSession/3 00016 * 00017 * DESCRIPTION 00018 * This function is called by an environment subsystem server to 00019 * tell the SM it finished initialization phase and is ready to 00020 * manage processes it registered for (SmConnectApiPort). 00021 * 00022 * ARGUMENTS 00023 * hSmApiPort: port handle returned by SmConnectApiPort; 00024 * hSbApiPort: call back API port of the subsystem (handle); 00025 * hApiPort : API port of the subsystem (handle). 00026 * 00027 * RETURN VALUE 00028 * Success status as handed by the SM reply; otherwise a failure 00029 * status code. 00030 */ 00031 NTSTATUS WINAPI 00032 SmCompleteSession (IN HANDLE hSmApiPort, 00033 IN HANDLE hSbApiPort, 00034 IN HANDLE hApiPort) 00035 { 00036 NTSTATUS Status; 00037 SM_PORT_MESSAGE SmReqMsg; 00038 00039 DPRINT("SMLIB: %s called\n", __FUNCTION__); 00040 00041 /* Marshal Ses in the LPC message */ 00042 SmReqMsg.Request.CompSes.hApiPort = hApiPort; 00043 SmReqMsg.Request.CompSes.hSbApiPort = hSbApiPort; 00044 00045 /* SM API to invoke */ 00046 SmReqMsg.SmHeader.ApiIndex = SM_API_COMPLETE_SESSION; 00047 00048 /* Port message */ 00049 SmReqMsg.Header.u2.s2.Type = LPC_NEW_MESSAGE; 00050 SmReqMsg.Header.u1.s1.DataLength = SM_PORT_DATA_SIZE(SmReqMsg.Request); 00051 SmReqMsg.Header.u1.s1.TotalLength = SM_PORT_MESSAGE_SIZE; 00052 Status = NtRequestWaitReplyPort (hSmApiPort, (PPORT_MESSAGE) & SmReqMsg, (PPORT_MESSAGE) & SmReqMsg); 00053 if (NT_SUCCESS(Status)) 00054 { 00055 return SmReqMsg.SmHeader.Status; 00056 } 00057 DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); 00058 return Status; 00059 } 00060 00061 /* EOF */ Generated on Sun May 27 2012 04:37:03 for ReactOS by
1.7.6.1
|