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

  1. //=================================================================================================================//
  2. //                                                                                                                 //
  3. //  inilib.h  - Include file for buildhs.c and ini_path.c                                                          //
  4. //              These files are used to read a parsers ini file and generate the appropriate handoff               //
  5. //              set. Ini_path gets the path to the ini file given the parser dll s name and buildhs                //
  6. //              reads the ini file and builds the parsers handoff set.                                             //
  7. //                                                                                                                 //
  8. //  Created     SteveRo     11/8/93                                                                                      //
  9. //                                                                                                                 //
  10. //=================================================================================================================//
  11.  
  12. #include <bhsupp.h>
  13.  
  14. #if !defined(_INILIB_)
  15.  
  16. #define _INILIB_
  17.  
  18.  
  19. #define INI_PATH_LENGTH             256                 // Maximum path tha can be specified
  20. #define MAX_HANDOFF_ENTRY_LENGTH    80                  // Longest entry that can be specified ie.. 0x451 = NCP
  21. #define MAX_PROTOCOL_NAME           40                  // Longest name for a protoocl
  22. #define NUMALLOCENTRIES             10
  23. #define RAW_INI_STR_LEN             200
  24.  
  25. #define PARSERS_SUBDIR              "PARSERS"
  26. #define INI_EXTENSION               "INI"
  27. #define BASE10_FORMAT_STR           "%ld=%s %ld"           
  28. #define BASE16_FORMAT_STR           "%lx=%s %lx"           
  29.  
  30.  
  31. // Given "XNS" or "TCP" or whatever BuildINIPath will return fully qual. path to "XNS.INI" or "TCP.INI"
  32. extern LPSTR BuildINIPath( char     *FullPath,          // Buffer that will contain fully qual. path to ini file
  33.                            char     *IniFileName );     // DLL name
  34.  
  35.  
  36. // Builds Handoff Set
  37.  
  38. extern DWORD     WINAPI CreateHandoffTable(LPSTR               secName,
  39.                                            LPSTR               iniFile,
  40.                                            LPHANDOFFTABLE *    hTable,
  41.                                            DWORD               nMaxProtocolEntries,
  42.                                            DWORD               base);
  43.  
  44. extern HPROTOCOL WINAPI GetProtocolFromTable(LPHANDOFFTABLE  hTable, // lp to Handoff Table...
  45.                                              DWORD           ItemToFind,       // port number etc...
  46.                                              LPDWORD         lpInstData );   // inst data to give to next protocol
  47.  
  48. extern VOID      WINAPI DestroyHandoffTable( LPHANDOFFTABLE hTable );
  49.  
  50. extern BOOLEAN WINAPI IsRawIPXEnabled(LPSTR               secName,
  51.                                       LPSTR               iniFile,
  52.                                       LPSTR               CurProtocol );
  53. #endif
  54.