473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Access Win32 String Resource DLL

Hello,

How can I get access and read strings from a Win32 String Resource DLL
with C#?
Nov 16 '05 #1
2 6853
Hello Arne,

Given you are ready to full-fledged P/Invoke, use the following Win32 APIs:

LoadLibrary to load the DLL and get its module handle
LoadStringW to load a resource string from the DLL. Use the module handle as
the handle passed to LoadString.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

<Arne Schittenhelm> wrote in message
news:df********************************@4ax.com...
Hello,

How can I get access and read strings from a Win32 String Resource DLL
with C#?


Nov 16 '05 #2
Sorry for late response but there was a lot to do in the last weeks. So -
strings are working fine but there are html entries I want to read too and I
am not able. My LoadString command looks like

StringBuilder sb = new StringBuilder(256);
int len = LoadString(hModule, resID, sb, sb.Capacity);

Thanks for your help
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> schrieb
im Newsbeitrag news:ef**************@TK2MSFTNGP15.phx.gbl...
Hello Arne,

Given you are ready to full-fledged P/Invoke, use the following Win32 APIs:
LoadLibrary to load the DLL and get its module handle
LoadStringW to load a resource string from the DLL. Use the module handle as the handle passed to LoadString.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

<Arne Schittenhelm> wrote in message
news:df********************************@4ax.com...
Hello,

How can I get access and read strings from a Win32 String Resource DLL
with C#?

Nov 16 '05 #3

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

Similar topics

3
by: tlviewer | last post by:
hello, The script below is a prototype for loading playing card images from the bitmap resource in cards.dll (WinXP) I like the idea of not keeping copies of the images as files. I'm able...
3
by: Christopher Burr | last post by:
I'm trying to retrieve a string resource from a Win32 file. In win32 world I would just use LoadLibrary and LoadString. What do I use in the .NET world? -- Chris Burr cburr@kcc.com
2
by: Brent Burkart | last post by:
I am trying to send an email using SMTP server through IIS. I am recieving the following error. Access is denied. Description: An unhandled exception occurred during the execution of the...
12
by: Nak | last post by:
Hi there, This might sound like a dumb question but how would I use a Win32 resource DLL in VB.NET? I presumed there were API's for this purpose but am unsure which ones, my API guide has...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
0
by: Mythran | last post by:
I wrote some code that is supposed to enumerate through the specified file's win32 resources and return a string-array of all icon names. When it runs, it returns a string-array with a bunch of...
1
by: Mythran | last post by:
I am attempting to read all of the resources from a Win32 executable, and load each of them to display them on a screen. So, please help figure out why I can't seem to get it right :) First...
0
by: =?Utf-8?B?Q29saXZpZXI=?= | last post by:
If anyone can help me with this I would really appreciate it: I have an assembly into which I have linked a manifest file as a Win32 resource. This is necessary since I want to use a class in this...
4
by: Christopher | last post by:
I am surprised this hasn't come up for me more in the past, but the situation is: I need to have an interface that is usable for all I need to have an interface that is only usable for some I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.