Well, it's seems that property that is using a getter function are not managed
well by CBuilder.
So the getter funzion should be used directly.
I made the change reported belowe to file OverbyteIcsWSocketS.pas and now
GetClientCount work without crash.
Enzo
TCustomWSocketServer = class(TWSocket)
{ How many active clients we currently have }
property ClientCount : Integer read GetClientCount;
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{* *}
{* TWSocketServer *}
{* *}
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{ get number of connect clients }
function TWSocketServer.GetClientCount : Integer;
begin
Result := inherited GetClientCount;
end;
________________________________
Da: Enzo Arlati
Inviato: martedì 9 ottobre 2012 11:06
A: [email protected]
Oggetto: TWSocketServer ClientCount : Function call terminated by unhandled
On CbuilderXE if I create a TWSocketServer and the I call the ClientCount
method I get an access violation.
If The debugger query the method fSrvWSocket->ClientCount give the following
error:
E2122 Function call terminated by unhandled exception 0xc0000005 at address
0x6f4c7363
Belowe the sample code I used for the example.
FClientClass = __classid(TClientWSocket);
fSrvWSocket = new Overbyteicswsockets::TWSocketServer(NULL);
fSrvWSocket->Name = "AppServer_WSocket";
fSrvWSocket->ClientClass = FClientClass;
int nClient = fSrvWSocket->ClientCount;
Any suggestions or ideas about that ?
Regards, Enzo
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be