[阅读: 368] 2009-09-24 02:13:36
错误代码:
void __fastcall TClientHandleThread::Execute()
{
//---- Place thread code here ----
TByteDynArray buf;
try
{
while(!Terminated && Client->IOHandler->Connected())
{
Client->IOHandler->CheckForDataOnSource(10);
if(!Client->IOHandler->InputBufferIsEmpty())
{
Client->IOHandler->InputBuffer->ExtractToBytes(buf,sizeof(TCommBlock));
BytesToRaw(buf,ClientBlock, sizeof(TCommBlock));
Client->IOHandler->InputBuffer->Clear();
Synchronize(HandleInput);
把buf定义拿到while里,正常了。。。