This if test doesn't seem to do anything?  It does the same append operation either way, and "pEventInfo.dwEventType" doesn't seem to do anything (unless it is a property?).  Either way you shouldn't need the append operation in the if test.