Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Vista Community > Windows Vista

Windows Vista Discuss the different versions of Windows Vista, Fuji, or Vienna

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-02-2007, 11:06 AM
Deepak Jha
Newsgroup Contributor
 
Posts: n/a
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);

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-02-2007, 11:06 AM
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Off
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Viewer - Send e-mail after an event id is logged. techjohnny@gmail.com Windows XP 2 10-12-2007 02:40 PM
Re: Event Viewer fails to start ( Vista 64 ) R. C. White Windows Vista 0 09-25-2007 02:40 PM
Re: Event Viewer fails to start ( Vista 64 ) MICHAEL Windows Vista 0 09-24-2007 08:00 AM
Re: Event Viewer fails to start ( Vista 64 ) R. C. White Windows Vista 0 09-19-2007 01:19 AM
Event ID: 333 - Event Source:Application Popup SF Windows XP 0 01-04-2007 03:31 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 06:43 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0