 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Apr 26, 2007 6:52 pm Post subject: Difference |
|
|
I use Borland C++ 6.0
This does not work:
TClientSocket *temp = ClientSocket1;
ClientSocket1 = new TClientSocket(temp->Owner);
ClientSocket1->Active = false;
ClientSocket1->ClientType = temp->ClientType;
ClientSocket1->Address = temp->Address;
ClientSocket1->Port = temp->Port;
ClientSocket1->OnConnect = ClientSocket1Connect;
ClientSocket1->OnDisconnect = ClientSocket1Disconnect;
ClientSocket1->OnRead = ClientSocket1Read;
ClientSocket1->OnError = ClientSocket1Error;
delete temp;
and next string "if (ClientSocket1->Active)" raise Access Violation
But this is working:
TClientSocket *temp;
temp = new TClientSocket(ClientSocket1->Owner);
temp->Active = false;
temp->ClientType = ClientSocket1->ClientType;
temp->Address = ClientSocket1->Address;
temp->Port = ClientSocket1->Port;
temp->OnConnect = ClientSocket1Connect;
temp->OnDisconnect = ClientSocket1Disconnect;
temp->OnRead = ClientSocket1Read;
temp->OnError = ClientSocket1Error;
delete ClientSocket1;
ClientSocket1 = temp;
Please, say me what is difference?
Sincerely,
Busya |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|