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

  1. /* sna_cnst.h */
  2.  
  3. /*****************************************************************************/
  4. /* Constants for use by IHV's via sna_dlc.h or by internal builds via        */
  5. /* direct #include                                                           */
  6. /*****************************************************************************/
  7.  
  8. #ifndef SNA_CNSTH_INCLUDED
  9. #define SNA_CNSTH_INCLUDED
  10.  
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14.  
  15. /*****************************************************************************/
  16. /* Routine to get value of a configuration parameter                         */
  17. /*****************************************************************************/
  18. #ifdef WIN32_SUPPORT
  19.   USHORT WINAPI SNAGetPerfValues(int * pPerfObject, int * pFirstCounter);
  20.   USHORT WINAPI SNAGetPNodePerfVals(int * pPerfObject, int * pFirstCounter);
  21.   #ifdef OLD_IHV_PROTOS
  22.     USHORT WINAPI sepdgetcf(UCHAR *, VOID *, ULONG, UCHAR, ULONG *);
  23.   #else
  24.     USHORT WINAPI SNAGetConfigValue(UCHAR *, VOID *, ULONG, UCHAR, ULONG *);
  25.   #endif
  26.  
  27. #else
  28.   USHORT far sepdgetcf(UCHAR far *, VOID far *, ULONG, UCHAR, ULONG far *);
  29. #endif
  30.  
  31. #define TYPELONG '\000'
  32. #define TYPESTRING '\001'
  33.  
  34. #define ERBADCFG  1
  35. #define ERNOTFND  2
  36. #define ERTOOLONG 3
  37. #define ERBADTYPE 4
  38.  
  39. /*****************************************************************************/
  40. /* Structure of version information block                                    */
  41. /*****************************************************************************/
  42.  
  43. struct cs_info {
  44.   unsigned short    length;            /* length of this struct (bytes)      */
  45.                                        /* (supplied parameter)               */
  46.   unsigned char     major_ver;         /* CS major ver CS1.1->1, CS2.0->2    */
  47.   unsigned char     minor_ver;         /* CS minor ver CS1.1->10 (dec)       */
  48.   unsigned char     config_share[80];  /* name of share point of current     */
  49.                                        /* config file = default location for */
  50.                                        /* style file \\box\share\ (null      */
  51.                                        /* terminated)                        */
  52.   unsigned short    nos;               /* NOS that the LAN is running        */
  53. #define Workstation 0
  54. #define LANMan      1      /* Also LAN Server, unless we can differentiate   */
  55. #define NetWare     2
  56. } CS_INFO;
  57.  
  58. /*****************************************************************************/
  59. /* Routine to get version information                                        */
  60. /*****************************************************************************/
  61. #ifdef WIN32_SUPPORT
  62.  
  63.   #ifdef OLD_IHV_PROTOS
  64.     USHORT WINAPI sepdgetinfo(struct cs_info * );
  65.   #else
  66.     USHORT WINAPI SNAGetSystemInfo(struct cs_info * );
  67.   #endif
  68.  
  69. #else
  70.   USHORT far sepdgetinfo(struct cs_info far * );
  71. #endif
  72.  
  73. /*****************************************************************************/
  74. /* Routine to return the name of the SNALink                                 */
  75. /*****************************************************************************/
  76. #ifdef WIN32_SUPPORT
  77.  
  78.   #ifdef OLD_IHV_PROTOS
  79.     VOID WINAPI sepdlknm(UCHAR *);
  80.   #else
  81.     VOID WINAPI SNAGetLinkName(UCHAR *);
  82.   #endif
  83.  
  84. #else
  85.   VOID far sepdlknm(UCHAR far *);
  86. #endif
  87.  
  88. /*****************************************************************************/
  89. /* Routine to send a message to the local node                               */
  90. /*****************************************************************************/
  91. #ifdef WIN32_SUPPORT
  92.  
  93.   #ifdef OLD_IHV_PROTOS
  94.     extern VOID WINAPI sbpgsend(PTRBFHDR *);
  95.   #else
  96.     extern VOID WINAPI SNASendMessage(PTRBFHDR *);
  97.   #endif
  98.  
  99. #else
  100.   extern VOID     far  sbpgsend(PTRBFHDR *);
  101. #endif
  102.  
  103. /*****************************************************************************/
  104. /* Routine to send an NMVT Alert to NetView                                  */
  105. /*****************************************************************************/
  106. #ifdef WIN32_SUPPORT
  107.  
  108.   #ifdef OLD_IHV_PROTOS
  109.     extern VOID WINAPI sbpgnmvt(PTRBFHDR, INTEGER);
  110.   #else
  111.     extern VOID WINAPI SNASendAlert(PTRBFHDR, INTEGER);
  112.   #endif
  113.  
  114. #else
  115.   extern VOID     far  sbpgnmvt(PTRBFHDR, INTEGER);
  116. #endif
  117.  
  118. /*****************************************************************************/
  119. /* Function prototypes for routines which must be supplied by IHV DLL        */
  120. /*****************************************************************************/
  121. #ifdef WIN32_SUPPORT
  122.  
  123.   #ifdef OLD_IHV_PROTOS
  124.     VOID WINAPI slpginit(HANDLE);
  125.     VOID WINAPI slpgdisp(PTRBFHDR, INTEGER, INTEGER);
  126.     VOID WINAPI slpwrkmg();
  127.   #else
  128.     VOID WINAPI SNALinkInitialize(HANDLE);
  129.     VOID WINAPI SNALinkDispatchProc(PTRBFHDR, INTEGER, INTEGER);
  130.     VOID WINAPI SNALinkWorkProc();
  131.   #endif
  132.  
  133. #else
  134.   VOID     far  slpginit(HSEM);
  135.   VOID     far  slpgdisp(PTRBFHDR, INTEGER, INTEGER);
  136.   VOID     far  slpwrkmg();
  137. #endif
  138.  
  139. /*****************************************************************************/
  140. /* Constants used by slpgdisp                                                */
  141. /*****************************************************************************/
  142. #define SBTICK 253
  143. #define SBLOST 254
  144.  
  145. #ifdef __cplusplus
  146. }
  147. #endif
  148.  
  149. #endif
  150.