Read data

void CSPCDemoDlg::OnReceiveFtspccontrol1(unsigned long Count)
{
	CHAR *Buffer = new CHAR[Count];
	LONG ReadCnt;

	try
	{
		ReadCnt = m_SPCControl1.Read((LONG)Buffer, Count);
	}
	catch (COleDispatchException* E)
	{
		MessageBox(E->m_strDescription, mbCaption, 
			MB_OK | MB_ICONERROR);
	}

	for (int i = 0; i < ReadCnt; i++)
	{
		PCHAR P = (PCHAR)Buffer + i;

		// Todo: add your code
	}
}