Access Win32 String Resource DLL

  • Thread starter Thread starter Arne Schittenhelm
  • Start date Start date
A

Arne Schittenhelm

Hello,

How can I get access and read strings from a Win32 String Resource DLL
with C#?
 
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.
 
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 said:
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

Hello,

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