Home > Blockchain >  For the use of the LocalizedResourceName property
For the use of the LocalizedResourceName property

Time:02-13

I wish to customize my own folder style, I tried to make the folder get remarks by modifying the LocalizedResourceName property in desktop.ini.

I try to set LocalizedResourceName to a Chinese string. But it is displayed as garbled characters when it is actually displayed.

I noticed the following code in the desktop.ini of the system folder: LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798

So I try to write a .dll file by myself, encapsulate the icon and string, and use it.

I already know how to make a resource-only dll file, but I don't know how to get a certain resource in the file. (ie, get the number -21798 in the above example code)

How should I do ?

CodePudding user response:

By convention, a positive resource number is an index (0 is the first resource etc.) and negative numbers are resource ids. In this specific case, it is the string resource with the id of abs(-21798) that Windows would pass to LoadString.

If you want to create your own .dll, add a string with an id of 2 for example (any number between 2 and 0xffff) and in your .ini you would use @c:\path\mydll.dll,-2.

Before you go to all this trouble, just try saving the .ini as UTF-16 LE (Unicode in Notepad) and use Chinese strings directly without the @.

  • Related