flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
afw2004 24 Jan 2006, 09:22
How can I include compiled type library (tlb file) in my resource section?
In microsoft resource script it look like this: Code: 1 TYPELIB "typelib.tlb" |
|||
![]() |
|
Tomasz Grysztar 24 Jan 2006, 10:19
The hardcoded resource might look like this:
Code: section '.rsrc' resource data readable macro resource type,address { dd type,address-resource_root } macro subdirectory type,address { dd type,80000000h+address-resource_root } resource_root: dd 0,0,0 dw 1,2 ; 1 Name, 3 ID items subdirectory 80000000h+(_typelib-resource_root),dir_typelib subdirectory RT_ICON,dir_icon subdirectory RT_GROUP_ICON,dir_groupicon _typelib du 7,'TYPELIB' align 4 dir_typelib: dd 0,0,0 dw 0,1 ; 1 ID item subdirectory 1,typelib_1 dir_icon: dd 0,0,0 dw 0,1 ; 1 ID item subdirectory 2,icon_2 dir_groupicon: dd 0,0,0 dw 0,1 ; 1 ID item subdirectory 10,groupicon_10 typelib_1: dd 0,0,0 dw 0,1 ; 1 item resource 0,resource_1 ; language 0 icon_2: dd 0,0,0 dw 0,1 ; 1 item resource 0,resource_2 ; language 0 groupicon_10: dd 0,0,0 dw 0,1 ; 1 item resource 0,resource_10 ; language 0 resource_1: dd rva typelib,typelib_size,0,0 resource_2: dd rva icon_data,icon_size,0,0 resource_10: dd rva icon_header,icon_header_size,0,0 typelib: file 'typelib.tlb' typelib_size = $ - typelib align 4 icon_data: file 'myapp.ico':16h,744 ; icon data only icon_size = $ - icon_data align 4 icon_header: file 'myapp.ico',12h ; icon header only dw 1 ; ID of icon data resource icon_header_size = $ - icon_header align 4 it includes also an icon, to show better the overall resource structure. |
|||
![]() |
|
afw2004 24 Jan 2006, 10:28
Thanks
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.