Jump to content
Sign in to follow this  
musicstashall

List of strings from the DLL

Recommended Posts

musicstashall

All the best.
I want to get an array of strings from the Windows library. Actually the question is, how to list all the lines ?? I can get any string, knowing its ID in the file, for example:

$hInstance = _WinAPI_LoadLibraryEx("netman.dll", $LOAD_LIBRARY_AS_DATAFILE)
$NetTitle = _WinAPI_LoadString($hInstance, 109)

$hInstance = _WinAPI_LoadLibraryEx("twinui.dll", $LOAD_LIBRARY_AS_DATAFILE)
$RunAsAdminString = _WinAPI_LoadString($hInstance, 8504)

But how do I get a list of strings without having a row ID?

Share this post


Link to post
Share on other sites
musicstashall

Can someone know how to get an enumeration of all string resources in the DLL? I tried to implement as follows, but the resulting row names are different from the actual ones:

#include <APIResConstants.au3>
#include <Array.au3>
#include <WinAPIRes.au3>

Local $aData = _WinAPI_EnumResourceNames(@SystemDir & '\shell32.dll', $RT_STRING)
Local $hInstance = _WinAPI_LoadLibraryEx(@SystemDir & '\shell32.dll', $LOAD_LIBRARY_AS_DATAFILE)
Local $StringData[0][2]
;_ArrayDisplay($aData, '_WinAPI_EnumResourceNames')
For $i = 2 To $aData[0]
    _ArrayAdd($StringData, $aData[$i] & '|' & _WinAPI_LoadString($hInstance, $aData[$i]))
Next
_ArrayDisplay($StringData)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.