[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

.NET equivalent to Message Compiler files?

Nicholas A. Piazza

10/18/2002 2:09:00 AM

Prior to .NET it was possible to create
eventmessagefile.dll and categorymessagefile.dll for use
in event logging by creating a .MC text file and compiling
it with the Message Compiler utility. What is the
approved .NET way of accomplishing the same thing? I have
looked at all of the EventLog related classes, and
although there are methods (or properties) to get
information such as Event Id, Category Id, Category
String, and insertion strings, I could find no way of
creating the appropriate file and associating it with an
event log file and source.
3 Answers

(Xin Huang [MS])

10/18/2002 4:36:00 AM

0

Hi Nicholas,

You still need the tools from Platform SDK to build the resource file.

The message files are registered in the registry so you can use
Microsoft.Win32.Registry class to register the message files. Since this is
usually done at application setup time, you can also modify the registry
using script language in the MSI file.

Regards,
Xin

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. (c) 2002 Microsoft Corporation. All
rights
reserved.

Richard Grimes [MVP]

12/11/2002 8:01:00 PM

0

Nicholas,

By all means do use message resource files, the way that EventLog creates
messages is _really_ bad and IMHO should never have been allowed to get out
of the beta. Effectively .NET did just what VB6 did and that was bad. The
tool you need is mc.exe you can get it with the Platform SDK or with VC.NET.
Perhaps if enough people continue to use this rather than the lame excuse in
EventLog Microsoft might fix EventLog.

Richard

"Nicholas A. Piazza" <npiazza1@san.rr.com> wrote in message
news:641501c27642$fe588b50$3bef2ecf@TKMSFTNGXA10...
> Prior to .NET it was possible to create
> eventmessagefile.dll and categorymessagefile.dll for use
> in event logging by creating a .MC text file and compiling
> it with the Message Compiler utility. What is the
> approved .NET way of accomplishing the same thing? I have
> looked at all of the EventLog related classes, and
> although there are methods (or properties) to get
> information such as Event Id, Category Id, Category
> String, and insertion strings, I could find no way of
> creating the appropriate file and associating it with an
> event log file and source.


Microsoft DotNet

12/13/2002 8:23:00 AM

0

If anyone would like, I have an EventLog class that extends the one provided
with .NET to include sources, message file manipulation and so forth.
Handles writing parameters & byte data to the event log as well. Comes w/ a
fairly rough message compiler that I wrote as well - if you'd like it, you
can email me @ nsmith_removethissoidontgetspammed@insario.com


"Richard Grimes [MVP]" <richardg@mvps.org> wrote in message
news:#jWRIfUoCHA.2360@TK2MSFTNGP09...
> Nicholas,
>
> By all means do use message resource files, the way that EventLog creates
> messages is _really_ bad and IMHO should never have been allowed to get
out
> of the beta. Effectively .NET did just what VB6 did and that was bad. The
> tool you need is mc.exe you can get it with the Platform SDK or with
VC.NET.
> Perhaps if enough people continue to use this rather than the lame excuse
in
> EventLog Microsoft might fix EventLog.
>
> Richard
>
> "Nicholas A. Piazza" <npiazza1@san.rr.com> wrote in message
> news:641501c27642$fe588b50$3bef2ecf@TKMSFTNGXA10...
> > Prior to .NET it was possible to create
> > eventmessagefile.dll and categorymessagefile.dll for use
> > in event logging by creating a .MC text file and compiling
> > it with the Message Compiler utility. What is the
> > approved .NET way of accomplishing the same thing? I have
> > looked at all of the EventLog related classes, and
> > although there are methods (or properties) to get
> > information such as Event Id, Category Id, Category
> > String, and insertion strings, I could find no way of
> > creating the appropriate file and associating it with an
> > event log file and source.
>
>