Solved

How to create DLL with Localized Strings and IDs for use with RegLoadMUIString

Posted on 2008-06-25
6
290 Views
Last Modified: 2010-04-21
Please refer to the following MSDN articles:
http://msdn.microsoft.com/en-us/library/ms685156(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms724890(VS.85).aspx

My question is, how do I create a DLL that can be used to hold Localized String with ID references that I can plug into a service description? I can set the service description using the ChangeServiceConfig2 function but I'd like to use the form: @[path\]dllname,-strID on W2K8 and Vista.
I just need to see and example of the DLL source code that would make this work.
Thanks
0
Comment
Question by:softbreeze
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 21872452
are you trying to make event source DLL for service application to get rid of those comments in NT Log about not being able to find event description?

ziolko.
0
 
LVL 1

Author Comment

by:softbreeze
ID: 21873067
No. I've figured that one out by creating a resource DLL. I have a 'Service Manager Application' that worked great until Vista and W2K8 came out. I now have to use the RegLoadMUIString to get the service description for those two versions. My program also allows you to install services so I'd like to be able to install the reference to the DLL for Vista and W2K8. Do you think the DLL would be build that same way as the resource DLL for event messages?
0
 
LVL 21

Expert Comment

by:ziolko
ID: 21873241
>> Do you think the DLL would be build that same way as the resource DLL for event messages?
that would be logical, but you have to test it yourself:)

>>My program also allows you to install services so I'd like to be able to install the reference to the DLL for Vista and W2K8.
you can use onbeforeinstall/onafetrinstall event handlers to make registry changes and/or RegLoadMUIString call

ziolko.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:softbreeze
ID: 21873365
Thanks I will do the testing. Currently when I install a service with my app I use the CreateService function followed by the ChangeServiceConfig2 function to add the description. I suppose that if the description is contained in a resource DLL then I could use the ChangeServiceConfig2 function to install a description that looks like:

@%SystemRoot%\System32\MyAppRes.dll,-101

where 101 is the ID of the description string.  
0
 
LVL 21

Accepted Solution

by:
ziolko earned 500 total points
ID: 21874306
yup, one thing about string ID test if it needs to be decimal or hexadecimal number, but I guess it would be decimal

ziolko.
0
 
LVL 1

Author Closing Comment

by:softbreeze
ID: 31470844
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question