--Variables-- ComCom : Automation : 'Navision Communication Component version 2'.CommunicationComponent InStr : InStream TempXMLRec : Record : "XML Data" TempOutStr : OutStream --Variables-- ComCom::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") InMsg := InMessage; InStr := InMsg.GetStream(); TempXMLRec."XML Request".CREATEOUTSTREAM(TempOutStr); COPYSTREAM(TempOutStr, InStr); //<----LOCK here!!!!!!!!!!!!!!!!!!!!