ReactOS  0.4.14-dev-552-g2fad488
api.h
Go to the documentation of this file.
1 #ifndef __SM_API_H
2 #define __SM_API_H
3 
4 #include <sm/ns.h>
5 
6 /*** DATA TYPES ******************************************************/
7 
8 #define SM_SB_NAME_MAX_LENGTH 120
9 
10 #include <pshpack4.h>
11 
12 /* SmConnectApiPort (SS->SM) */
13 typedef struct _SM_CONNECT_DATA
14 {
18 
20 
21 /* SmpConnectSbApiPort (SM->SS) */
22 typedef struct _SB_CONNECT_DATA
23 {
26 
27 
28 /*** SM API ***/
29 
30 /*** 1 ****************************************************************/
31 
32 #define SM_API_COMPLETE_SESSION 1 /* complete a session initialization */
33 
35 {
38 
40 
41 /*** 2 ****************************************************************/
42 
43 #define SM_API_2 2
44 
45 /* obsolete */
46 
47 /*** 3 ****************************************************************/
48 
49 #define SM_API_3 3
50 
51 /* unknown */
52 
53 /*** 4 ****************************************************************/
54 
55 #define SM_API_EXECUTE_PROGRAMME 4 /* start a subsystem (server) */
56 
57 #define SM_EXEXPGM_MAX_LENGTH 32 /* max count of wide string */
58 
60 {
63 
65 
66 /*** 5 ****************************************************************/
67 
68 #define SM_API_QUERY_INFORMATION 5 /* ask SM to send back some data */
69  /* Note: this is not in NT */
70 #define SM_QRYINFO_MAX_SS_COUNT 8
71 #define SM_QRYINFO_MAX_ROOT_NODE 30
72 
73 typedef enum {
77 
78 typedef struct _SM_BASIC_INFORMATION
79 {
82  struct {
88 
90 {
96 
98 {
101  union {
104  };
106 
107 /*** | ****************************************************************/
108 
109 typedef struct _SM_PORT_MESSAGE
110 {
111  /*** LPC common header ***/
113  union
114  {
115  struct
116  {
117  /*** SM common header ***/
118  struct
119  {
122  } SmHeader;
123  /*** SM per API arguments ***/
124  union
125  {
126  union
127  {
131  } Request;
132  union
133  {
137  } Reply;
138  };
139  };
141  };
143 
144 #include <poppack.h>
145 
146 /*** MACRO ***********************************************************/
147 
148 #define SM_CONNECT_DATA_SIZE(m) ((m).Header.u1.s1.DataLength-sizeof(USHORT)-sizeof(WORD))
149 #define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c))
150 #define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE))
151 
152 
153 #endif /* !def __SM_API_H */
SM_BASIC_INFORMATION BasicInformation
Definition: api.h:102
NTSTATUS Status
Definition: api.h:121
DWORD ApiIndex
Definition: api.h:120
WCHAR NameSpaceRootNode[SM_QRYINFO_MAX_ROOT_NODE]
Definition: api.h:94
struct _SM_CONNECT_DATA * PSM_CONNECT_DATA
struct _SM_SUBSYSTEM_INFORMATION * PSM_SUBSYSTEM_INFORMATION
LONG NTSTATUS
Definition: precomp.h:26
#define SM_SB_NAME_MAX_LENGTH
Definition: api.h:8
SM_INFORMATION_CLASS SmInformationClass
Definition: api.h:99
#define SM_QRYINFO_MAX_SS_COUNT
Definition: api.h:70
struct _SM_SUBSYSTEM_INFORMATION SM_SUBSYSTEM_INFORMATION
DWORD ProcessId
Definition: api.h:85
struct _SM_PORT_MESSAGE * PSM_PORT_MESSAGE
struct _SM_PORT_MESSAGE_EXECPGM * PSM_PORT_MESSAGE_EXECPGM
SM_PORT_MESSAGE_QRYINFO QryInfo
Definition: api.h:130
struct _SM_PORT_MESSAGE_COMPSES SM_PORT_MESSAGE_COMPSES
SM_SUBSYSTEM_INFORMATION SubSystemInformation
Definition: api.h:103
WCHAR SbName[SM_SB_NAME_MAX_LENGTH]
Definition: api.h:17
SM_CONNECT_DATA ConnectData
Definition: api.h:140
USHORT SubSystemId
Definition: api.h:15
WORD Unused
Definition: api.h:16
struct _SM_PORT_MESSAGE_QRYINFO SM_PORT_MESSAGE_QRYINFO
union _SM_PORT_MESSAGE::@3391::@3393::@3396::@3398 Request
USHORT SubSystemCount
Definition: api.h:80
struct _SB_CONNECT_DATA SB_CONNECT_DATA
__wchar_t WCHAR
Definition: xmlstorage.h:180
SM_PORT_MESSAGE_COMPSES CompSes
Definition: api.h:128
unsigned short WORD
Definition: ntddk_ex.h:93
SM_INFORMATION_CLASS
Definition: api.h:73
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _SM_PORT_MESSAGE_QRYINFO * PSM_PORT_MESSAGE_QRYINFO
#define SM_QRYINFO_MAX_ROOT_NODE
Definition: api.h:71
struct _SM_PORT_MESSAGE_COMPSES * PSM_PORT_MESSAGE_COMPSES
ULONG SmApiMax
Definition: api.h:24
struct _SM_BASIC_INFORMATION * PSM_BASIC_INFORMATION
struct _SM_BASIC_INFORMATION::@3388 SubSystem[SM_QRYINFO_MAX_SS_COUNT]
unsigned short USHORT
Definition: pedump.c:61
PORT_MESSAGE Header
Definition: api.h:112
unsigned int ULONG
Definition: retypes.h:1
struct _SM_PORT_MESSAGE::@3391::@3393::@3395 SmHeader
struct _SM_PORT_MESSAGE SM_PORT_MESSAGE
struct _SM_PORT_MESSAGE_EXECPGM SM_PORT_MESSAGE_EXECPGM
union _SM_PORT_MESSAGE::@3391::@3393::@3396::@3399 Reply
struct _SM_BASIC_INFORMATION SM_BASIC_INFORMATION
SM_PORT_MESSAGE_EXECPGM ExecPgm
Definition: api.h:129
struct _SM_CONNECT_DATA SM_CONNECT_DATA
#define SM_EXEXPGM_MAX_LENGTH
Definition: api.h:57
struct _SB_CONNECT_DATA * PSB_CONNECT_DATA