InquisitorOthello
Programmer
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.
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.