/
Crimson2/alias/
Crimson2/area.tmp/
Crimson2/area.tmp/AnomalySpaceDock/
Crimson2/area.tmp/AnomalyStation/
Crimson2/area.tmp/AntHill/
Crimson2/area.tmp/ArcticTerrarium/
Crimson2/area.tmp/BuilderCity/
Crimson2/area.tmp/Dungeon/
Crimson2/area.tmp/MiningDock/
Crimson2/area.tmp/PipeSystem/
Crimson2/area.tmp/RattArea/
Crimson2/area.tmp/RobotFactory/
Crimson2/area.tmp/SilverDale/
Crimson2/area.tmp/StarshipFearless/
Crimson2/area.tmp/StationConduits/
Crimson2/area.tmp/TerrariumAlpha/
Crimson2/area.tmp/TerrariumBeta/
Crimson2/area.tmp/TestArea/
Crimson2/area.tmp/Void/
Crimson2/area/
Crimson2/area/AnomalySpaceDock/
Crimson2/area/AnomalyStation/
Crimson2/area/MiningDock/
Crimson2/area/PipeSystem/
Crimson2/area/SilverDale/
Crimson2/area/StationConduits/
Crimson2/area/Void/
Crimson2/board/
Crimson2/clone/
Crimson2/lib/
Crimson2/mole/
Crimson2/mole/mole_src/HELP/
Crimson2/player/
Crimson2/util/
Crimson2/wldedit/
Crimson2/wldedit/res/
#include"winsock.h"

#define HO_STRLEN 50

#define HO_INI_SECT "HOSTS"

#define HO_CONNECT_STATE_OFFLINE 1
#define HO_CONNECT_STATE_LOGIN   2
#define HO_CONNECT_STATE_ONLINE  3
#define HO_CONNECT_STATE_LOGOFF  4

#define HO_INVALID_PACKET_ID 0

typedef struct HOHOSTtag {
  char hDescription[HO_STRLEN]; /* host description */
  char hIP[HO_STRLEN]; /* host name */
  long hPort;   /* host port */
  char hLoginID[HO_STRLEN]; /* login username / ID */
  char hPassword[HO_STRLEN]; /* login password */
  struct HOHOSTtag *hNext; /* next host */
  HGLOBAL hMemory; /* handle for global memory block */
  int hID; /* host unique ID - arbitrary but lets us uniquely identify hosts */
} HOHOST;

BOOL hoInitHost(void);
void hoShutdownHost(void);
void hoConnectHost(void);
void hoDisconnectHost(BOOL p_force);
void hoEncryptPassword(char *p_password,char *p_encrypted);
void hoDecryptPassword(char *p_password,char *p_decrypted);
int hoGetHostID(void);
BOOL CALLBACK _export hoDialogNewHostProc(HWND p_hWnd, UINT p_message,WPARAM p_wParam, LPARAM p_lParam);
BOOL CALLBACK _export hoDialogOpenHostProc(HWND p_hWnd, UINT p_message,WPARAM p_wParam, LPARAM p_lParam);
BOOL CALLBACK _export hoDialogConnectProc(HWND p_hWnd, UINT p_message,WPARAM p_wParam, LPARAM p_lParam);
void hoSocketHandler(WPARAM p_wParam, LPARAM p_lParam);
void hoSocketKilled(void);
BOOL hoSocketFriendlyDisconnect(void);
BOOL CALLBACK _export hoDialogLoginProc(HWND p_hWnd, UINT p_message,WPARAM p_wParam, LPARAM p_lParam);

extern char g_hoHostName[50]; /* server DNS name (if available) */
extern unsigned long g_hoHostIP; /* server IP address */
extern long g_hoHostPort; /* server port */
extern unsigned long g_hoTime; /* time connection to host was made */
extern SOCKET g_hoSock; /* socket for connection to host */
extern BOOL g_hoWSAStartup; /* startup successfully called */
extern BOOL g_hoConnectedToHost; /* set to TRUE if connected to host */
extern int g_hoConnectionState; /* connection is a state machine - offline,login,online,logoff */
extern HWND g_hoLoginWnd; /* handle of login dialog box - if it's open */