DWORD WINAPI Server( LPVOID Parameter )
{
Message = new QueueMessageClass() ;
Message->InitiateQueueTestMode( NULL , QueueMode, OutputFileName, FileMode) ;
MessageCode = RESP_NO_MESSAGE ;
while ( MessageCode != STATUS_SERVICE_STOPPED )
{
Message->ReceiveQueueMessage() ;
Message->GetMessageCode(&MessageCode) ;
if ( MessageCode != RESP_NO_MESSAGE )
{
PrintMessage("Server: ", Message) ;
Message->SendQueueMessage() ;
}
}
Message->TerminateQueueTestMode() ;
delete Message ;
}
|