Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Windows Event Log fails to translate event description.

Reply
 
Old 12-15-2006   #1 (permalink)
Deepak Jha


 
 

Windows Event Log fails to translate event description.

Actually I want the events description not in XML but in text format. I was
able to translate all the logs, say, Security, System and application;
including the event description part in text format in VISTA Beta2. But the
moment I installed the publicly released Windows VISTA Business, downloaded
from MSDN subscriber downloads, I am getting all event properties like event
id, source name, username, system name etc., but fails to get the event
description which I used to get when using EvtFormatMessage function in old
Vista Beta2. I am getting the error code 1815, which says, The specified
resource language ID cannot be found in the image file.

The code, which I used to get event description, is given below:

In VISTA Beta2:

EvtFormatMessage(hpublisherConfig, hEvent, NULL, dwPropertyCount, valArray,
EvtFormatMessageEvent, dwBuffSize, wcBuf, &dwBuffUsed);

In VISTA Release:

As the same code which I was using in VISTA Beta was not working, I thought
of replacing the third para of EvtFormatMessage, which is, DWORD MessageId,
with publisher's message resource, instead of NULL as given above. But still
its not working for me. Can you please shed some light into this problem.

The new code, which I discussed, is given below:

EvtGetPublisherMetadataProperty(
hpublisherConfig, EvtPublisherMetadataPublisherMessageID,
0, bufferSize, metadataProperty, &bufferSize);

EvtFormatMessage(hpublisherConfig, hEvent, (*metadataProperty).UInt32Val,
dwPropertyCount, valArray, EvtFormatMessageEvent, dwBuffSize, wcBuf,
&dwBuffUsed);


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
HELP need to solve this problem asap - Unable to start event viewer/event log service Software
Boot up Issues - Critical Event Log errors - Event ID = 100, 200, 400, 307, 402 General Discussion
MMC fails to load event viewer Vista installation & setup
Insalling most programs now fails with Event ID 1000 Vista installation & setup
Unable to fetch the Event Log - Event Description Vista security


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46