flat assembler
Message board for the users of flat assembler.
Index
> Windows > Resources |
Author |
|
RedGhost 09 Sep 2006, 20:57
You can get the resource section from the PE headers.
_________________ redghost.ca Last edited by RedGhost on 10 Sep 2006, 06:13; edited 2 times in total |
|||
09 Sep 2006, 20:57 |
|
DustWolf 09 Sep 2006, 21:37
RedGhost wrote: You can get the resource section from the PE headers. And what do I have to call "MyData" there for it to find the right thing? |
|||
09 Sep 2006, 21:37 |
|
RedGhost 10 Sep 2006, 06:12
Hi, if you read the remarks on the MSDN for FindResource you see 'MyData' is the identifier for the resource, whether it is a string or an integer identifier, so pass the ID that defines that resource, in C/C++ you would use the MAKEINTRESOURCE macro which just casts int to char * but in asm just pass the value of the ID or the address of a string.
If you don't know the ID you can find the address of the resource section (from the PE headers) and go from there. There is also EnumResourceNames. Here is an example of how to use FindResource and how to enumerate all the resources of a module. http://tinyurl.com/93xxt _________________ redghost.ca |
|||
10 Sep 2006, 06:12 |
|
Reverend 10 Sep 2006, 11:20
You call FindResource and pass the returned value to LoadResource
Code: invoke FindResource, 0, 'MyData', RT_RCDATA mov [ResourceHandle], eax invoke LoadResource, 0, eax mov [ResourceData], eax ; <-- this is what you want |
|||
10 Sep 2006, 11:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.