Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read registry resource string e.g. "@filename,resource"?

Tags:

windows

winapi

I have a registry entry e.g. LocalizedString=@%programfiles%\Internet Explorer\iexplore.exe,-702
Is there a known API to extract the path and the string other than custom-ally parse it (and use LoadString)?

And then I have a defult value e.g. (default)="%programfiles%\Internet Explorer\iexplore.exe" (including the double-quotes, but without the @);

How does Windows handle this stuff?

like image 941
kobik Avatar asked Mar 23 '12 19:03

kobik


1 Answers

The API function you need is called RegLoadMUIStringW. This is a Vista API so if you want to support XP you'll need to parse the registry entry manually.

Update: Actually, SHLoadIndirectString looks like it could be your XP saviour.

like image 200
David Heffernan Avatar answered Nov 15 '22 09:11

David Heffernan