View Single Post
  #1  
Old 12-02-2004, 18:12
amigo amigo is offline
Friend
 
Join Date: Dec 2002
Posts: 30
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
amigo Reputation: 0
adding code to kernel32.dll

Hi
I have following problem: I write 'extension' to kernel32.dll (XP). There's not enough free space inside the file for my code so I tried to add a new section. But it failed - there is kernel error during XP loading (4C, c000007B - "bad image"; info from XP DDK - "this kind of error occurs very infrequently" ).
The total size of original image is ED000h. I tried to increase the last existing section (.reloc), I tried to create the new one - both failed. It failes when total size is above ED000.
Kernel32 is located in memory just before ntdll.dll and there is 3000h b free space between them - so theoretically there is the space for my bigger image. As QUERY and MAP32 says, this space belongs to noone.
Is there any free space needed for system after the ring3 dll image ? used temporarly for something ?
If anyone can help, it will be nice

Regards
amigo

PS Of course I can remove some original code or resource to make space for my code , but I'd like to leave original image intact.
Reply With Quote