I
I
Ivan Komarov2011-06-21 09:55:55
Windows
Ivan Komarov, 2011-06-21 09:55:55

winapi: getting string from res file with messages for EventLog

1. Made a .mc file: etc.; 2. compiled it into .rc and two .bins for each language; 3. compiled it into .res. And now the question is, my application will have two launch options: from the console and as a Windows service. How can I get these messages from the res file in the console version?

LanguageNames=(English=0x409:MSG00409)
LanguageNames=(Russian=0x419:MSG00419)

MessageId=0x0
Language=English
Fast-CGI Server is started.
.
Language=Russian
Fast-CGI Server запущен.
.




Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rasa, 2011-06-21
@rasa

Maybe this code
will help you . The description says: The example project is a simple Win32 console application that includes message resources and shows how to use them with FormatMessage() and ReportEvent(). It also shows how to register an event source for the NT event log. And the best thing: it does all of this with less than 100 lines of code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question