והנה הפונקציה שמפעיל הTHREAD
UINT transcom(LPVOID pavar) { COMMWND *pr=(COMMWND*)pavar; int i; CByteArray a,b,c,d,e,f,g,h,head; head.Add(72); for(i=0;i<480;i++) { a.Add(hexarray); b.Add(hexarray[i+480]); c.Add(hexarray[i+960]); d.Add(hexarray[i+1440]); e.Add(hexarray[i+1920]); f.Add(hexarray[i+2400]); g.Add(hexarray[i+2880]); h.Add(hexarray[i+3360]); } pr->m_Comm->SetOutput(COleVariant(head)); pr->m_Comm->SetOutput(COleVariant(a)); pr->m_Comm->SetOutput(COleVariant(b)); pr->m_Comm->SetOutput(COleVariant(c)); pr->m_Comm->SetOutput(COleVariant(d)); pr->m_Comm->SetOutput(COleVariant(e)); pr->m_Comm->SetOutput(COleVariant(f)); pr->m_Comm->SetOutput(COleVariant(g)); pr->m_Comm->SetOutput(COleVariant(h)); return 1; }