Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrading Program from Borland C++ 3 to 6, need socket help

Status
Not open for further replies.

InquisitorOthello

Programmer
Jul 1, 2003
3
0
0
US
I have to upgrade a project written in Borland C++ Builder 3.0 using dWinsock.hpp into a project using BCB 6.0 borland sockets. The poblem I'm running into is this:

in the original code he does:
HAServerSocket->Listen(__classid(TStreamSocket));

then 200 lines later does:
GetPrivateProfileString("ServerInfo", "HA_Port", "0", buf, 5, "COMDIALR.INI");
HAServerSocket->Port = buf;
HAPort->Caption = buf;

If I immediately change the code to an Open() and the GetPrivateProfileString to GetPrivateProfileInt, I get an error that I can't change teh port number on a socket that's already open. but if I don't open until after I get the port number, it doesn't seem to open correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top