473,785 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing Resources from an MSG file

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
CreateFileBased ResoruceManager () 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 MissingManifest ResourceExcepti on
error.

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

-Ken
Nov 16 '05 #1
1 1469
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

"Ken Allen" <ke******@sympa tico.ca> wrote in message
news:uf******** ******@TK2MSFTN GP12.phx.gbl...
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
CreateFileBased ResoruceManager () 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 MissingManifest ResourceExcepti on
error.

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

-Ken

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
2909
by: Lamberti Fabrizio | last post by:
Hi all, I've to access to a network file from an asp pages. I've red a lot of things on old posts and on Microsoft article but I can't still solve my problem. I've got two server inside the same NT domain, each one has its own web server. The web server is always IIS 5.0.
1
2067
by: Sreekanth | last post by:
Hi, I am trying to globalize my application by separating out all the strings into resource files. For testing purpose, I have created two resource files. MyApp.resx, MyApp.en-US.resx. These resx files are built into binary resource files(.resources) and embedded into MyApp.exe by my make script. The problem, Even after setting my machine culture to English -United states, my application is always picking from the nuetral resource file....
2
1179
by: Roger Helliwell | last post by:
Hi gang, I'm loving the new Resource features in Whitbey. No longer are there any Button1.Text = "Click Here" lines in my code-behinds. All have been replaced with Resources.Labels.ClickHere (Our site is in 3 languages). But, is there a way to access the Resources namespace from another class library? I've searched all through the HttpContext class for a mention of it but no luck.
0
2266
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization involves reading and writing some text and xml files using simple streamreader and streamwriter...
4
3782
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For testing purposes, the secure place is setup on the client machine. The client (window app) calls the web service (on a different machine) and connects successfully to the web service. However, when client calls a method that copies the file from...
0
12088
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the likelihood of CRM success from less than 20 percent to 60 percent. WHITEPAPER :
1
2908
by: dkunha | last post by:
I have an resources only assembly. string1 = Resources.Resource1.String1 string2 = Resources.Resource1.String2 image1 = Resources.Resource1.Image1 But using this assembly in another project I can't get to them because these properties are private.
4
2451
by: accyboy1981 | last post by:
Hi, I'm looking to create a simple application that will copy files from a folder on one PC on the network to another PC on the network but I am having a bit of difficulty doing this. The problem is that the network is not active directory and there is not a common username and password between the PCs. The only way I can transfer files is if I first open Windows Explorer and navigate manually to the PC enter the username and password...
0
1775
by: ramesh.nrk | last post by:
Hi, I am developing a windows application which should support different language for this I am using "Resource Manager" default in .net framework. Here I am developing dll for Resource because there are different application which can access one dll avoid duplications. Resource File Name : Resources/MyAppResource.de.resx
0
10341
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.