flat assembler
Message board for the users of flat assembler.

Index > Windows > Who can support "string table" resource macro?

Author
Thread Post new topic Reply to topic
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
Dear All:
The "string table" resource macro doesn't present in resource.inc, But it is a important method for converted multi language on win32 platform. Of course, I don't think to use the "res from" syntax, It will limit the programer to understand truly the pe file format.
Who can support it through macro define?
Question Thank you.
Post 12 Feb 2004, 11:47
View user's profile Send private message MSN Messenger Reply with quote
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
Dear All:
I have finished the reqest myself. In the last week, I studed the PE format and maked some macors for studed it. Razz
The string table resource is only one on the pe file, it's individed by 16 units. Sorry for my bad english. I have an example for descrition it:
In the rc file:
Code:
STRINGTABLE DISCARDABLE 
BEGIN
   17             "ZHW1"
END    

It will build an string table directory (ID=2) , data_entry (ID=0) , but build 1 word 0 before the unicode string, the prefix word 0 is the offset string .

Please see the belowing macro:
Code:
;============================================================================
;
;ID of stringtab should be between 0-15.
;For example: (17,'String') ===> (ID of resource)=2,(ID of stringtab)=1
;                  Why? 17=(2-1)*16+(17 mod 16)
;                               
macro stringtab group,[id,label]
{ 
common       
  local data,size,str_offset
  group dd RVA data,size,0,0
  data = $
  str_offset=0
forward
  local str_length,str_id
  str_id = id mod 16
  IF  str_offset<>str_id
          times (str_id-str_offset) dw 0
      str_offset = str_id
  END IF
  str_offset = str_offset+1
  
  virtual at 0
    db label
    str_length=$
  end virtual
  dw     str_length
  du      label
common  
  size = $ - data
  align 4 }    

Ok, Do you understand? I writed a string table resource program, Please see it.

Dear Privilov:
I think that it maybe add in the resource.inc, Do you think it?
Thanks.


Description:
Download
Filename: stringtable.zip
Filesize: 18.66 KB
Downloaded: 158 Time(s)

Post 17 Feb 2004, 04:08
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.