Accessing Resources from an MSG file

  • Thread starter Thread starter Ken Allen
  • Start date Start date
K

Ken Allen

We are attempting to replace one of our legacy services (developed in C++)
with one that is developed as a C# service. The problem that I am
encountering is dealing with the resources that are generated from the MSG
file. These resources are used both by the existing service code (to format
strings for internal use) and by the Event Viewer when entries are written
to the Event Log to be associated with this source.

1. Can I access an existing resource file inside an existing EXE (built from
a VC++ 6 source) from a C# service? I have tried the
CreateFileBasedResoruceManager() call, but either I have the parameters
wrong or this is not possible. The method call actually works, but when I
attempt to retrieve a string, I get an MissingManifestResourceException
error.

2. If I create the resources in a satellite assembly, will the Event Viewer
still be able to use the contents?

-Ken
 
Even worse, I notice that the .Net ResourceManager.GetString wants to
retrieve a string by means of a string name (another string), but the
traditional resource manager accessed the strings by means of a numeric
identifier! How does this get rationalized?

-Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top