Jump to content
Sign in to follow this  
pixels75

SHLoadIndirectString

Recommended Posts

pixels75

Hi Folks,

I'm trying to read MUI strings from DLL.

It's the purpose of the SHLoadIndirectString function.

I'm trying this kind of code

Local $data = "@%SystemRoot%\System32\SysClass.Dll,-3001"
Local $indata = DllStructCreate("char[" & StringLen($data) + 1 & "]")
DllStructSetData($indata, 1, $data)

$rc = DllCall("Shlwapi.dll", "int", "SHLoadIndirectString", _
    "ptr", DllStructGetPtr($indata), _
    "ptr", DllStructGetPtr($indata), _
    "int", StringLen($data), _
    "int", 0)

MsgBox(0,"", $indata)

But with no success.

Any idea ?

Thanks !

Share this post


Link to post
Share on other sites
Authenticity

;~ Opt("ExpandEnvStrings", 1)


$rc = DllCall("shlwapi.dll", "int", "SHLoadIndirectString", _
    "wstr", "@%SystemRoot%\System32\SysClass.dll,-3001", _
    "wstr", "", _
    "int", 1024, _
    "ptr", 0)


MsgBox(0x40, "Title", $rc[2])

Share this post


Link to post
Share on other sites
pixels75

Perfect, thanks a lot !

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  

×