|
|
|
как получить список строк в ресурсах?
|
|||
|---|---|---|---|
|
#18+
доброго времени суток надо прочитать все строки в string table в dll. Когда известны id cтрок тогда прочитать строку не проблема. Но вот как получить этот список id? когда использую EnumResourceTypes/EnumResourceNames получаю что-то неудобоваримое. Список диалогов я получил но вот вместо списка id строк получил нечто типа (type=6, name=7). Может быть это нечто типа id строковой таблицы? но тогда как оттуда получить список строк? Заранее спасибо ЗЫ пишу на VC++ :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.11.2005, 03:53 |
|
||
|
как получить список строк в ресурсах?
|
|||
|---|---|---|---|
|
#18+
нашел я как получить этот список. вот описание String Table Resources These tables are constructed in blocks of 16 strings. The organization of these blocks of 16 is determined by the IDs given to the various strings. The lowest four bits of the ID determine a string's position in the block. The upper twelve bits determine which block the string is in. Each block of 16 strings is stored as one resource entry. Each string or error table resource block is stored as follows: [Normal resource header (type = 6 for strings)] [Block of 16 strings. The strings are Pascal style with a WORD length preceding the string. 16 strings are always written, even if not all slots are full. Any slots in the block with no string have a zero WORD for the length.] It is important to note that the various blocks need not be written out in numerical order in the resource file. Each block is assigned an ordinal ID. This ID is the high 12 bits of the string IDs in the block plus one (ordinal IDs can't be zero). The blocks are written to the .RES file in the order the blocks are encountered in the .RC file, while the CVTRES utility will cause them to become ordered in the COFF object, and hence the image file. так что просто берем имя с типом RT_STRING, вычитаем 1 (не знаю откуда берется эта единица, но работает - получаются правильные id) и сзади добавляем 4 бита, потом пытаемся загрузить все 16 возможных строк. Некоторые могут оказаться пустыми но как минимум одна - то что надо. :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.11.2005, 19:47 |
|
||
|
|

start [/forum/topic.php?fid=57&tid=2032511]: |
0ms |
get settings: |
10ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
86ms |
get topic data: |
9ms |
get forum data: |
3ms |
get page messages: |
30ms |
get tp. blocked users: |
1ms |
| others: | 250ms |
| total: | 414ms |

| 0 / 0 |
