Changeset 229 for trunk/include/helpers/lan.h
- Timestamp:
- Nov 24, 2002, 9:45:05 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/lan.h
r114 r229 32 32 #define LANH_HEADER_INCLUDED 33 33 34 APIRET lanInit(VOID); 34 #ifndef SNLEN 35 #define CNLEN 15 /* Computer name length */ 36 #define UNCLEN (CNLEN+2) /* UNC computer name length */ 37 #define NNLEN 12 /* 8.3 Net name length */ 38 #define RMLEN (UNCLEN+1+NNLEN) /* Maximum remote name length */ 39 40 #define SNLEN 15 /* Service name length */ 41 #define STXTLEN 63 /* Service text length */ 42 #endif 35 43 36 44 #pragma pack(1) 45 46 /* 47 *@@ SERVER: 48 * 49 */ 50 37 51 typedef struct _SERVER 38 52 { … … 44 58 PSZ pszComment; // server comment 45 59 } SERVER, *PSERVER; 60 61 /* 62 *@@ SERVICEBUF1: 63 * 64 */ 65 66 typedef struct _SERVICEBUF1 // service_info_1 67 { 68 unsigned char svci1_name[SNLEN+1]; 69 unsigned short svci1_status; 70 unsigned long svci1_code; 71 unsigned short svci1_pid; 72 } SERVICEBUF1, *PSERVICEBUF1; 73 74 /* 75 *@@ SERVICEBUF2: 76 * 77 */ 78 79 typedef struct _SERVICEBUF2 // service_info_2 80 { 81 unsigned char svci2_name[SNLEN+1]; /* service name */ 82 unsigned short svci2_status; /* See status values below */ 83 unsigned long svci2_code; /* install code of service */ 84 unsigned short svci2_pid; /* pid of service program */ 85 unsigned char svci2_text[STXTLEN+1]; /* text area for use by services */ 86 } SERVICEBUF2, *PSERVICEBUF2; 87 46 88 #pragma pack() 89 90 #ifndef SV_TYPE_ALL 91 #define SV_TYPE_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */ 92 #endif 93 94 #ifndef SERVICE_INSTALL_STATE 95 #define SERVICE_INSTALL_STATE 0x03 96 #define SERVICE_UNINSTALLED 0x00 97 // service stopped (not running) 98 #define SERVICE_INSTALL_PENDING 0x01 99 // service start pending 100 #define SERVICE_UNINSTALL_PENDING 0x02 101 // service stop pending 102 #define SERVICE_INSTALLED 0x03 103 // service started 104 105 #define SERVICE_PAUSE_STATE 0x0C 106 #define SERVICE_ACTIVE 0x00 107 // service active (not paused) 108 #define SERVICE_CONTINUE_PENDING 0x04 109 // service continue pending 110 #define SERVICE_PAUSE_PENDING 0x08 111 // service pause pending 112 #define SERVICE_PAUSED 0x0C 113 // service paused 114 115 #define SERVICE_NOT_UNINSTALLABLE 0x00 116 // service cannot be stopped 117 #define SERVICE_UNINSTALLABLE 0x10 118 // service can be stopped 119 120 #define SERVICE_NOT_PAUSABLE 0x00 121 // service cannot be paused 122 #define SERVICE_PAUSABLE 0x20 123 // service can be paused 124 125 /* Requester service only: 126 * Bits 8,9,10 -- redirection paused/active */ 127 128 #define SERVICE_REDIR_PAUSED 0x700 129 #define SERVICE_REDIR_DISK_PAUSED 0x100 130 // redirector for disks paused 131 #define SERVICE_REDIR_PRINT_PAUSED 0x200 132 // redirector for spooled devices paused 133 #define SERVICE_REDIR_COMM_PAUSED 0x400 134 // redirector for serial devices paused 135 136 #define SERVICE_CTRL_INTERROGATE 0 137 #define SERVICE_CTRL_PAUSE 1 138 #define SERVICE_CTRL_CONTINUE 2 139 #define SERVICE_CTRL_UNINSTALL 3 140 #endif 141 142 APIRET lanInit(VOID); 47 143 48 144 APIRET lanQueryServers(PSERVER *paServers, 49 145 ULONG *pcServers); 50 146 147 APIRET lanServiceGetInfo(PCSZ pcszServiceName, 148 PSERVICEBUF2 pBuf); 149 150 APIRET lanServiceInstall(PCSZ pcszServiceName, 151 PSERVICEBUF2 pBuf2); 152 153 APIRET lanServiceControl(PCSZ pcszServiceName, 154 ULONG opcode, 155 PSERVICEBUF2 pBuf2); 51 156 #endif 52 157
Note:
See TracChangeset
for help on using the changeset viewer.