-CONFIGFILE cf(confFile);
-
-if (cf.Error())
- {
- strError = "Cannot read file '" + confFile + "'";
- return -1;
- }
-
-cf.ReadString("Login", &login, "/?--?--?*");
-if (login == "/?--?--?*")
- {
- strError = "Parameter 'Login' not found.";
- return -1;
- }
-
-cf.ReadString("Password", &password, "/?--?--?*");
-if (login == "/?--?--?*")
- {
- strError = "Parameter 'Password' not found.";
- return -1;
- }
-
-cf.ReadString("ServerName", &serverName, "?*?*?");
-if (serverName == "?*?*?")
- {
- strError = "Parameter 'ServerName' not found.";
- return -1;
- }
-
-cf.ReadString("ServerPort", &temp, "5555");
-if (ParseIntInRange(temp, 1, 65535, &port))
- {
- strError = "Parameter 'ServerPort' is not valid.";
- return -1;
- }
-
-cf.ReadString("LocalPort", &temp, "0");
-if (ParseIntInRange(temp, 0, 65535, &localPort))
- {
- strError = "Parameter 'LocalPort' is not valid.";
- return -1;
- }
-