SM & SMDLL definitions
[reactos.git] / reactos / include / sm / api.h
1 /* $Id$ */
2 #ifndef __SM_API_H
3 #define __SM_API_H
4
5 #define SM_API_PORT_NAME L"\\SmApiPort"
6 #define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort"
7 #define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort"
8
9 #pragma pack(push,4)
10
11 /*** 1 ****************************************************************/
12
13 #define SM_API_COMPLETE_SESSION 1 /* complete a session initialization */
14
15 typedef struct _SM_PORT_MESSAGE_COMPSES
16 {
17 HANDLE hApiPort;
18 HANDLE hSbApiPort;
19
20 } SM_PORT_MESSAGE_COMPSES, *PSM_PORT_MESSAGE_COMPSES;
21
22 /*** 2 ****************************************************************/
23
24 #define SM_API_2 2
25
26 /* obsolete */
27
28 /*** 3 ****************************************************************/
29
30 #define SM_API_3 3
31
32 /* unknown */
33
34 /*** 4 ****************************************************************/
35
36 #define SM_API_EXECUTE_PROGRAMME 4 /* start a subsystem (server) */
37
38 #define SM_EXEXPGM_MAX_LENGTH 32 /* max count of wide string */
39
40 typedef struct _SM_PORT_MESSAGE_EXECPGM
41 {
42 ULONG NameLength;
43 WCHAR Name [SM_EXEXPGM_MAX_LENGTH];
44
45 } SM_PORT_MESSAGE_EXECPGM, *PSM_PORT_MESSAGE_EXECPGM;
46
47 /*** | ****************************************************************/
48
49 typedef struct _SM_PORT_MESSAGE
50 {
51 /*** LPC common header ***/
52 LPC_MESSAGE Header;
53 /*** SM common header ***/
54 DWORD ApiIndex;
55 NTSTATUS Status;
56 /*** SM per API arguments ***/
57 union {
58 SM_PORT_MESSAGE_COMPSES CompSes;
59 SM_PORT_MESSAGE_EXECPGM ExecPgm;
60 };
61
62 } SM_PORT_MESSAGE, * PSM_PORT_MESSAGE;
63
64 #pragma pack(pop)
65
66 /*** MACRO ***********************************************************/
67
68 #define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c))
69 #define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE))
70
71
72 #endif /* !def __SM_API_H */