ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

api.h
Go to the documentation of this file.
00001 #ifndef __SM_API_H
00002 #define __SM_API_H
00003 
00004 #include <sm/ns.h>
00005 
00006 /*** DATA TYPES ******************************************************/
00007 
00008 #define SM_SB_NAME_MAX_LENGTH 120
00009 
00010 #include <pshpack4.h>
00011 
00012 /* SmConnectApiPort (SS->SM) */
00013 typedef struct _SM_CONNECT_DATA
00014 {
00015   USHORT SubSystemId;
00016   WORD   Unused;
00017   WCHAR  SbName [SM_SB_NAME_MAX_LENGTH];
00018 
00019 } SM_CONNECT_DATA, *PSM_CONNECT_DATA;
00020 
00021 /* SmpConnectSbApiPort (SM->SS) */
00022 typedef struct _SB_CONNECT_DATA
00023 {
00024   ULONG SmApiMax;
00025 } SB_CONNECT_DATA, *PSB_CONNECT_DATA;
00026 
00027 
00028 /*** SM API ***/
00029 
00030 /*** 1 ****************************************************************/
00031 
00032 #define SM_API_COMPLETE_SESSION 1   /* complete a session initialization */
00033 
00034 typedef struct _SM_PORT_MESSAGE_COMPSES
00035 {
00036     HANDLE  hApiPort;
00037     HANDLE  hSbApiPort;
00038 
00039 } SM_PORT_MESSAGE_COMPSES, *PSM_PORT_MESSAGE_COMPSES;
00040 
00041 /*** 2 ****************************************************************/
00042 
00043 #define SM_API_2 2
00044 
00045 /* obsolete */
00046 
00047 /*** 3 ****************************************************************/
00048 
00049 #define SM_API_3 3
00050 
00051 /* unknown */
00052 
00053 /*** 4 ****************************************************************/
00054 
00055 #define SM_API_EXECUTE_PROGRAMME    4   /* start a subsystem (server) */
00056 
00057 #define SM_EXEXPGM_MAX_LENGTH   32      /* max count of wide string */
00058 
00059 typedef struct _SM_PORT_MESSAGE_EXECPGM
00060 {
00061   ULONG  NameLength;
00062   WCHAR  Name [SM_EXEXPGM_MAX_LENGTH];
00063 
00064 } SM_PORT_MESSAGE_EXECPGM, *PSM_PORT_MESSAGE_EXECPGM;
00065 
00066 /*** 5 ****************************************************************/
00067 
00068 #define SM_API_QUERY_INFORMATION    5   /* ask SM to send back some data */
00069                         /* Note: this is not in NT */
00070 #define SM_QRYINFO_MAX_SS_COUNT 8
00071 #define SM_QRYINFO_MAX_ROOT_NODE 30
00072 
00073 typedef enum {
00074     SmBasicInformation     = 0,
00075     SmSubSystemInformation = 1,
00076 } SM_INFORMATION_CLASS;
00077 
00078 typedef struct _SM_BASIC_INFORMATION
00079 {
00080     USHORT SubSystemCount;
00081     WORD Unused;
00082     struct {
00083         WORD Id;
00084         WORD Flags;
00085         DWORD ProcessId;
00086     } SubSystem [SM_QRYINFO_MAX_SS_COUNT];
00087 } SM_BASIC_INFORMATION, *PSM_BASIC_INFORMATION;
00088 
00089 typedef struct _SM_SUBSYSTEM_INFORMATION
00090 {
00091     WORD  SubSystemId;
00092     WORD  Flags;
00093     DWORD ProcessId;
00094     WCHAR NameSpaceRootNode [SM_QRYINFO_MAX_ROOT_NODE];
00095 } SM_SUBSYSTEM_INFORMATION, *PSM_SUBSYSTEM_INFORMATION;
00096 
00097 typedef struct _SM_PORT_MESSAGE_QRYINFO
00098 {
00099     SM_INFORMATION_CLASS SmInformationClass;
00100     ULONG DataLength;
00101     union {
00102         SM_BASIC_INFORMATION BasicInformation;
00103         SM_SUBSYSTEM_INFORMATION SubSystemInformation;
00104     };
00105 } SM_PORT_MESSAGE_QRYINFO, * PSM_PORT_MESSAGE_QRYINFO;
00106 
00107 /*** | ****************************************************************/
00108 
00109 typedef struct _SM_PORT_MESSAGE
00110 {
00111     /*** LPC common header ***/
00112     PORT_MESSAGE Header;
00113     union
00114     {
00115         struct
00116         {
00117             /*** SM common header ***/
00118             struct
00119             {
00120                 DWORD       ApiIndex;
00121                 NTSTATUS    Status;
00122             } SmHeader;
00123             /*** SM per API arguments ***/
00124             union
00125             {
00126                 union
00127                 {
00128                     SM_PORT_MESSAGE_COMPSES      CompSes;
00129                     SM_PORT_MESSAGE_EXECPGM      ExecPgm;
00130                     SM_PORT_MESSAGE_QRYINFO      QryInfo;
00131                 } Request;
00132                 union
00133                 {
00134                     SM_PORT_MESSAGE_COMPSES      CompSes;
00135                     SM_PORT_MESSAGE_EXECPGM      ExecPgm;
00136                     SM_PORT_MESSAGE_QRYINFO      QryInfo;
00137                 } Reply;
00138             };
00139         };
00140         SM_CONNECT_DATA ConnectData;
00141     };
00142 } SM_PORT_MESSAGE, * PSM_PORT_MESSAGE;
00143 
00144 #include <poppack.h>
00145 
00146 /*** MACRO ***********************************************************/
00147 
00148 #define SM_CONNECT_DATA_SIZE(m)  ((m).Header.u1.s1.DataLength-sizeof(USHORT)-sizeof(WORD))
00149 #define SM_PORT_DATA_SIZE(c)     (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c))
00150 #define SM_PORT_MESSAGE_SIZE     (sizeof(SM_PORT_MESSAGE))
00151 
00152 
00153 #endif /* !def __SM_API_H */

Generated on Fri May 25 2012 04:31:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.