S_UINT32 tmp_size = S_UINT32(0);
for (unsigned int i=0; i<m_eventDataCount; i++)
{
- tmp_size += S_UINT32(m_pEventData[i]->Size);
+ tmp_size += S_UINT32((*m_pEventData)[i].Size);
}
if (tmp_size.IsOverflow())
unsigned int offset = 0;
for(unsigned int i=0; i<m_eventDataCount; i++)
{
- memcpy(pDst + offset, (BYTE*)m_pEventData[i]->Ptr, m_pEventData[i]->Size);
- offset += m_pEventData[i]->Size;
+ memcpy(pDst + offset, (BYTE*)(*m_pEventData)[i].Ptr, (*m_pEventData)[i].Size);
+ offset += (*m_pEventData)[i].Size;
}
}
}
public SimpleEventSource() : base(true) { }
[Event(1)]
- internal void Message(string msg) { this.WriteEvent(1, msg); }
+ internal void MathResult(int x, int y, int z, string formula) { this.WriteEvent(1, x, y, z, formula); }
}
class EventPipeSmoke
{
int x = generator.Next(1,1000);
int y = generator.Next(1,1000);
- string result = String.Format("{0} + {1} = {2}", x, y, x+y);
+ string formula = String.Format("{0} + {1} = {2}", x, y, x+y);
- eventSource.Message(result);
+ eventSource.MathResult(x, y, x+y, formula);
}
Console.WriteLine("\tEnd: Messaging.\n");