home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / srvconst.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  6KB  |  241 lines

  1. //
  2. // Symbol types.  These are passed to srv_symbol to translate Open Data Services
  3. // symbols.
  4. //
  5. #define SRV_ERROR      0
  6. #define SRV_DONE       1
  7. #define SRV_DATATYPE   2
  8. #define SRV_EVENT      4
  9.  
  10. // define srv_symbol() SRV_ERRORs
  11. //
  12. #define SRV_ENO_OS_ERR     0
  13. #define SRV_INFO           1
  14. #define SRV_FATAL_PROCESS  10
  15. #define SRV_FATAL_SERVER   19
  16.  
  17. // define event values
  18. //
  19. #define SRV_CONTINUE       0
  20. #define SRV_LANGUAGE       1
  21. #define SRV_CONNECT        2
  22. #define SRV_RPC            3
  23. #define SRV_RESTART        4
  24. #define SRV_DISCONNECT     5
  25. #define SRV_ATTENTION      6
  26. #define SRV_SLEEP          7
  27. #define SRV_START          8
  28. #define SRV_STOP           9
  29. #define SRV_EXIT           10
  30. #define SRV_CANCEL         11
  31. #define SRV_SETUP          12
  32. #define SRV_CLOSE          13
  33. #define SRV_PRACK          14
  34. #define SRV_PRERROR        15
  35. #define SRV_ATTENTION_ACK  16
  36. #define SRV_SKIP       17
  37. #define SRV_TRANSMGR       18
  38. #define SRV_INSERTEXEC       19
  39. #define SRV_OLEDB       20
  40.  
  41. #define SRV_INTERNAL_HANDLER 99
  42. #define SRV_PROGRAMMER_DEFINED  100
  43.  
  44. // define configuration values
  45. //
  46. #define SRV_SERVERNAME          0   // not a configuration option
  47. #define SRV_CONNECTIONS         1
  48. #define SRV_LOGFILE             2
  49. #define SRV_STACKSIZE           3
  50. #define SRV_PRINT_RECV          4
  51. #define SRV_PRINT_SEND          5
  52. #define SRV_VERSION             6
  53. #define SRV_REMOTE_ACCESS       7
  54. #define SRV_REMOTE_SITES        8
  55. #define SRV_REMOTE_CONNECTIONS  9
  56. #define SRV_MAX_PACKETS         10
  57. #define SRV_MAXWORKINGTHREADS    11
  58. #define SRV_MINWORKINGTHREADS    12
  59. #define SRV_THREADTIMEOUT    13
  60. #define SRV_CONCURRENTTHREADS    14
  61. #define SRV_LOCAL_ONLY        15
  62. #define SRV_UNPACK_RPC        16
  63. #define SRV_MAX_PACKETSIZE    17
  64. #define SRV_THREADPRIORITY    18
  65. #define SRV_ANSI_CODEPAGE    19
  66. #define SRV_REMOTENAME        20
  67. #define SRV_TDS_VERSION     21
  68. #define SRV_PROG_VERSION    22
  69. #ifdef BRIDGE
  70.   #define SRV_CONNECTION_NAMES    23
  71.   #define SRV_CURRENT_CONNECTS    24
  72.   #define SRV_AUDIT_CONNECTS    25
  73. #endif
  74. #define    SRV_DEFAULT_PACKETSIZE    26
  75. #define SRV_PASSTHROUGH        27
  76. #define SRV_THREADAFFINITY    28
  77.  
  78. // define thread priority values
  79. //
  80. #define SRV_PRIORITY_LOW      THREAD_PRIORITY_LOWEST
  81. #define SRV_PRIORITY_NORMAL   THREAD_PRIORITY_NORMAL
  82. #define SRV_PRIORITY_HIGH     THREAD_PRIORITY_HIGHEST
  83. #define SRV_PRIORITY_CRITICAL THREAD_PRIORITY_TIME_CRITICAL
  84.  
  85. // define server values
  86. //
  87. #if !defined( NULL )
  88.  
  89. #define NULL        0   // The null character
  90.  
  91. #endif
  92.  
  93. #if !defined( TRUE )
  94.  
  95. #define TRUE        1   // Boolean true value
  96.  
  97. #endif
  98.  
  99. #if !defined( FALSE )
  100.  
  101. #define FALSE       0   // Boolean false value
  102.  
  103. #endif
  104.  
  105. #if !defined( SUCCEED )
  106.  
  107. #define SUCCEED     1   // Successful return value
  108.  
  109. #endif
  110.  
  111. #if !defined( FAIL )
  112.  
  113. #define FAIL        0   // Unsuccessful return value
  114.  
  115. #endif
  116.  
  117. #if !defined( SRV_DUPLICATE_HANDLER )
  118.  
  119. #define SRV_DUPLICATE_HANDLER    2
  120.  
  121. #endif
  122.  
  123. #define SRV_NULLTERM   -1   // Indicates a null terminated string
  124.  
  125. #if !defined( STDEXIT)
  126.  
  127. #define STDEXIT     0   // Normal exit valule
  128.  
  129. #endif
  130.  
  131. #if !defined( ERREXIT)
  132.  
  133. #define ERREXIT     1   // Error exit value
  134.  
  135. #endif
  136.  
  137. //  Message types
  138. //
  139. #define SRV_MSG_INFO    1
  140. #define SRV_MSG_ERROR   2
  141.  
  142.  
  143. // define SRV_PROC->status values
  144. //
  145. #define SRV_LOGGING_IN 0x1   // slot is free for used
  146. #define SRV_FREE       0x2   // slot is free for used
  147. #define SRV_SUSPENDED  0x4   // thread is in suspended state
  148. #define SRV_DEAD       0x8   // thread is dead
  149. #define SRV_KILL       0x10   // thread needs to be killed
  150. #define SRV_RUNNING    0x20   // thread is running
  151. #define SRV_ATTN       0x40   // client has sent an attention signal for this thread
  152. #define SRV_WAITING    0x80   // waiting for next command
  153. #define SRV_IOERROR    0x100    // io error occured
  154. #define SRV_QUEUED     0x200    // srvproc has been placed on command queue
  155. #define SRV_INEXEC     0x400    // inserting data into local table
  156. #ifdef BRIDGE
  157. #define SRV_ATTN_MIMIC 0x800      // client side does not support OOB
  158. #endif
  159.  
  160. //  Done packet status fields.
  161. //
  162. #define SRV_DONE_FINAL  (DBUSMALLINT) 0x0000
  163. #define SRV_DONE_MORE   (DBUSMALLINT) 0x0001
  164. #define SRV_DONE_ERROR  (DBUSMALLINT) 0x0002
  165. #define SRV_DONE_INXACT (DBUSMALLINT) 0x0004
  166. #define SRV_DONE_PROC   (DBUSMALLINT) 0x0008
  167. #define SRV_DONE_COUNT  (DBUSMALLINT) 0x0010
  168. #define SRV_DONE_ATTN   (DBUSMALLINT) 0x0020
  169. #define SRV_DONE_RPC_IN_BATCH   (DBUSMALLINT) 0x0080
  170.  
  171. //  RPC return parameter type
  172. //
  173. #define SRV_PARAMRETURN 0x0001
  174.  
  175. //  Event types
  176. //
  177. #define SRV_EQUEUED (BYTE) 0x1
  178. #define SRV_EIMMEDIATE (BYTE) 0x2
  179.  
  180. //  Field types used as field argument to srv_pfield().
  181. //
  182. //#define SRV_LANGUAGE 1   already defined above
  183. //#define SRV_EVENT    4   already defined above
  184.  
  185. #define SRV_SPID       10
  186. #define SRV_NETSPID    11
  187. #define SRV_TYPE       12
  188. #define SRV_STATUS     13
  189. #define SRV_RMTSERVER  14
  190. #define SRV_HOST       15
  191. #define SRV_USER       16
  192. #define SRV_PWD        17
  193. #define SRV_CPID       18
  194. #define SRV_APPLNAME   19
  195. #define SRV_TDS        20
  196. #define SRV_CLIB       21
  197. #define SRV_LIBVERS    22
  198. #define SRV_ROWSENT    23
  199. #define SRV_BCPFLAG    24
  200. #define SRV_NATLANG    25
  201. #define SRV_PIPEHANDLE 26
  202. #define SRV_NETWORK_MODULE        27
  203. #define SRV_NETWORK_VERSION     28
  204. #define SRV_NETWORK_CONNECTION 29
  205. #define SRV_LSECURE      30
  206. #define SRV_SAXP      31
  207.  
  208. // define the different TDS versions.
  209. //
  210. #define SRV_TDS_NONE   0
  211. #define SRV_TDS_2_0    1
  212. #define SRV_TDS_3_4    2
  213. #define SRV_TDS_4_2    3
  214. #define SRV_TDS_6_0    4
  215.  
  216. // define initial number of network threads
  217. // to start when ODS is started.
  218.  
  219. #define SRV_INITIALNETTHREADCNT 1
  220.  
  221. // define RPC_ACTIVE flags
  222.  
  223. #define SRV_RPC_ACTIVE              1
  224. #define SRV_RPC_DISABLE_OUTPARAMS   2
  225.      
  226. // define the ENV_CHANGE types
  227. #define SRV_ENV_PACKETSIZE     4
  228.  
  229. //
  230. // Flush status for write_buffer
  231. //
  232. #define SRV_NO_FLUSH    0
  233. #define SRV_FLUSH_EOM    1
  234. #define SRV_FLUSH_MORE    2
  235.  
  236. //
  237. // Numeric array to convert precision to internal length.
  238. //
  239. extern unsigned char SrvPrecToLen[];
  240. extern unsigned char SrvLenToPrec[];
  241.