|
Lines 36-41
Link Here
|
| 36 |
const LPSTR cLocationTypePref = "LocationType: "; |
36 |
const LPSTR cLocationTypePref = "LocationType: "; |
| 37 |
const LPSTR cLocationType = "Hostname"; |
37 |
const LPSTR cLocationType = "Hostname"; |
| 38 |
const LPSTR cMessagesPref = "Message: "; |
38 |
const LPSTR cMessagesPref = "Message: "; |
|
|
39 |
const LPSTR cSeparatorToken = "@;@"; |
| 39 |
|
40 |
|
| 40 |
const LPSTR cErrorHeader = "<ACADErrorHeader>"; |
41 |
const LPSTR cErrorHeader = "<ACADErrorHeader>"; |
| 41 |
|
42 |
|
|
Lines 243-254
Link Here
|
| 243 |
DWORD dwMSB16Zeros = 65535; // this double word variable has its first 16 bits as zero and the remaining as 1 |
244 |
DWORD dwMSB16Zeros = 65535; // this double word variable has its first 16 bits as zero and the remaining as 1 |
| 244 |
dwEventId &= dwMSB16Zeros; |
245 |
dwEventId &= dwMSB16Zeros; |
| 245 |
|
246 |
|
| 246 |
if(printf("%s%d;\t%s%d;\t%s%s;\t%s%s;\t%s%d;\t%s%08X;\t%s%s;\t%s%s;\t%s%s;\t%s%s;\n" ,cRecordNumberPref, |
247 |
if(printf("%s%d%s\t%s%d%s\t%s%s%s\t%s%s%s\t%s%d%s\t%s%08X%s\t%s%s%s\t%s%s%s\t%s%s%s\t%s%s%s\n" ,cRecordNumberPref, |
| 247 |
pevlr->RecordNumber, cEventTypePref, CBEseverity, cCreationTimePref,time, |
248 |
pevlr->RecordNumber, cSeparatorToken,cEventTypePref, CBEseverity,cSeparatorToken, cCreationTimePref,time,cSeparatorToken, |
| 248 |
cSourceComponentPref, (LPSTR) ((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)), |
249 |
cSourceComponentPref, (LPSTR) ((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)),cSeparatorToken, |
| 249 |
cEventCategoryPref, pevlr->EventCategory, cEventIDPref, dwEventId, |
250 |
cEventCategoryPref, pevlr->EventCategory,cSeparatorToken, cEventIDPref, dwEventId,cSeparatorToken, |
| 250 |
cUsernamePref, username, cComputerNamePref, compName, cLocationTypePref, cLocationType, |
251 |
cUsernamePref, username,cSeparatorToken, cComputerNamePref, compName, cSeparatorToken,cLocationTypePref, cLocationType,cSeparatorToken, |
| 251 |
cMessagesPref, stringsBuffer) < 0) |
252 |
cMessagesPref, stringsBuffer,cSeparatorToken) < 0) |
| 252 |
{ |
253 |
{ |
| 253 |
error("Failed to write event to output"); |
254 |
error("Failed to write event to output"); |
| 254 |
return FALSE; |
255 |
return FALSE; |
|
Lines 256-267
Link Here
|
| 256 |
|
257 |
|
| 257 |
|
258 |
|
| 258 |
if(fpOut) |
259 |
if(fpOut) |
| 259 |
if(fprintf(fpOut, "%s%d;\t%s%d;\t%s%s;\t%s%s;\t%s%d;\t%s%08X;\t%s%s;\t%s%s;\t%s%s;\t%s%s;\n" ,cRecordNumberPref, |
260 |
if(fprintf(fpOut, "%s%d%s\t%s%d%s\t%s%s%s\t%s%s%s\t%s%d%s\t%s%08X%s\t%s%s%s\t%s%s%s\t%s%s%s\t%s%s%s\n" ,cRecordNumberPref, |
| 260 |
pevlr->RecordNumber, cEventTypePref, CBEseverity, cCreationTimePref,time, |
261 |
pevlr->RecordNumber, cSeparatorToken,cEventTypePref, CBEseverity,cSeparatorToken, cCreationTimePref,time,cSeparatorToken, |
| 261 |
cSourceComponentPref, (LPSTR) ((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)), |
262 |
cSourceComponentPref, (LPSTR) ((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)),cSeparatorToken, |
| 262 |
cEventCategoryPref, pevlr->EventCategory, cEventIDPref, dwEventId, |
263 |
cEventCategoryPref, pevlr->EventCategory,cSeparatorToken, cEventIDPref, dwEventId,cSeparatorToken, |
| 263 |
cUsernamePref, username, cComputerNamePref, compName, cLocationTypePref, cLocationType, |
264 |
cUsernamePref, username,cSeparatorToken, cComputerNamePref, compName, cSeparatorToken,cLocationTypePref, cLocationType,cSeparatorToken, |
| 264 |
cMessagesPref, stringsBuffer) < 0) |
265 |
cMessagesPref, stringsBuffer,cSeparatorToken) < 0) |
| 265 |
{ |
266 |
{ |
| 266 |
error("Failed to write event to output file"); |
267 |
error("Failed to write event to output file"); |
| 267 |
return FALSE; |
268 |
return FALSE; |