// Прототипы функций
BOOL	CALLBACK _export DlgProc(HWND, UINT, WPARAM, LPARAM);

int	InitLine(void);
int	DialPhone(void);
int	CloseLine(void);
int	HangUpPhone(void);
void	ShowError(int iErr);
void	Idle(void);
int	WaitModemAnswer(int idComDev, LPSTR *szWaitDest,
							 LPSTR szModemAnswer, int nLength,
							 DWORD dwTimeOut);


// Определение констант

#define	WM_CONNECT WM_USER

#define	ERR_NO_OPEN		(-1)	
#define	ERR_DCB_BUILD	(-2)	
#define	ERR_DCB_SET		(-3)
#define	ERR_WRITE		(-4)
#define	ERR_TIMEOUT		(-5)
#define	ERR_READ			(-6)

#define ID_0 100
#define ID_1 101
#define ID_2 102
#define ID_3 103
#define ID_4 104
#define ID_5 105
#define ID_6 106
#define ID_7 107
#define ID_8 108
#define ID_9 109
#define ID_REPEAT 111
#define ID_CLEAR	130
#define ID_BACK	123
#define ID_NUMBER	120
#define ID_DIAL	122

// Определение массивов строк szOkString и szAnswer

char *szOkString[] = {	"OK", 	NULL };

char *szAnswer[] =   {
								"OK",		"CONNECT",
								"RING",	"NO CARRIER",
								"ERROR",	"NO DIAL TONE",
								"BUSY",	"NO ANSWER",
								NULL
							};						

