PDA

View Full Version : adding to import tables


roozbeh
04-20-2005, 04:15 AM
Hi

i have problems adding my dll and functions to my windows ce exe file using iidking.
i like to know how can i manually do this,for example by using lordpe and puting it in the sections

and how can i know more about those thunkfirst,thunkvalues and ......

regards

AndreaGeddon
04-21-2005, 07:28 AM
Originally posted by roozbeh@Apr 20 2005, 08:15 AM
Hi

i have problems adding my dll and functions to my windows ce exe file using iidking.
i like to know how can i manually do this,for example by using lordpe and puting it in the sections

and how can i know more about those thunkfirst,thunkvalues and ......

regards
1003


LordPe allows you to add every dll/import function you want. If you want to do it by hand you should study documents about the PE structure. I've found a nice document:
http://elfz.laacz.lv/ms_exe_spec.html
there are also a lot of other good documents (O'Leary, Luevelsmeyer and so on), however it is just a strcture, and you find its definitions in winnt.h include file (search IMAGE_NT_HEADERS).
When you add a dll/import by hand you just have to modify and probably relocate the import table pointed by the data directory
Bye!
AndreaGeddon

sna
04-27-2005, 09:53 AM
Hello.

For future reference, the PE specification is available from Microsoft:
Microsoft Portable Executable and Common Object File Format Specification (http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx)

Having not worked with CE myself I am unable to say anything about the actual format used. I did however find references to something called Common Executable Format (CEF) which appears to be a CE module with no native code in it, only byte code. I only barely skimmed the article though, so I wouldn't know how CEF relates to the PE format or if they are at all related. Any input on this would be appreicated...

Regards, sna