Kernel32.dll
-
Hey, i have my own kernel32.dll and i also have a test program which should use it! How do i tell the program that it should load my Kernel32.dll and not the Windows Kernel32.dll ? Has someone an idea ? Thanks in advance!
what!!! One of the reason for creating COM was to eliminate the accidental versioning problem, and you want to purposely create the version prob,you must be out of ur head. Peace The World is getting smaller and so are the people.
-
what!!! One of the reason for creating COM was to eliminate the accidental versioning problem, and you want to purposely create the version prob,you must be out of ur head. Peace The World is getting smaller and so are the people.
-
ok, Which program are you talking about that wants to use ur kernel32.dll if its ur kernel32.dll then you should gives its full path from where you are trying to load the dll. If its other applications that you want to load ur dll then simple copy ur kernel32.dll into system32 folder in ur windows directory. Hope i answered ur question. cheers. The World is getting smaller and so are the people.
-
Hey, i have my own kernel32.dll and i also have a test program which should use it! How do i tell the program that it should load my Kernel32.dll and not the Windows Kernel32.dll ? Has someone an idea ? Thanks in advance!
Kernel32 is very, very tightly linked to the version of Windows that it's installed with. You'll notice how whenever Microsoft make a patch to NTOSKRNL.EXE or CSRSS.EXE on Windows 2000/XP/Server 2003, they also ship a new version of kernel32.dll. DO NOT DO THIS. Normally you can redirect a DLL by copying it into the same directory as your application, but this won't work for kernel32.dll because that's where Windows starts your process: in the
BaseProcessStart
function in kernel32.dll (see Inside Windows 2000 [Solomon & Russinovich, MS Press]). Once a DLL is loaded, Windows will use the one it's already got rather than loading a different version with the same name (IIRC). It might help if you explained the effect you're actually after - perhaps you're trying to inject some code into a different process? If you explain that, you might get more help. -
Hey, i have my own kernel32.dll and i also have a test program which should use it! How do i tell the program that it should load my Kernel32.dll and not the Windows Kernel32.dll ? Has someone an idea ? Thanks in advance!
-
Kernel32 is very, very tightly linked to the version of Windows that it's installed with. You'll notice how whenever Microsoft make a patch to NTOSKRNL.EXE or CSRSS.EXE on Windows 2000/XP/Server 2003, they also ship a new version of kernel32.dll. DO NOT DO THIS. Normally you can redirect a DLL by copying it into the same directory as your application, but this won't work for kernel32.dll because that's where Windows starts your process: in the
BaseProcessStart
function in kernel32.dll (see Inside Windows 2000 [Solomon & Russinovich, MS Press]). Once a DLL is loaded, Windows will use the one it's already got rather than loading a different version with the same name (IIRC). It might help if you explained the effect you're actually after - perhaps you're trying to inject some code into a different process? If you explain that, you might get more help.good! here's what i want to do: I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed! Is there a way at all?
-
good! here's what i want to do: I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed! Is there a way at all?
hph wrote: good! here's what i want to do: I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed! Exactly: Kernel32.dll is part of the OS. You can't use another one. You'd only be able to do this by bundling the whole OS with your app. That's it. Also, several other DLLs won't work too, although they may seem to work at first sight: all related to winsock, printing, GDI, sound subsystem, DirectX, etc. There is a place (sorry, I don't recall where right now) on MSDN that lists which DLLs you shouldn't mess with. What you want could theoretically be accomplished with Linux, but not with Windows. Trying to make bits uncopyable is like trying to make water not wet. -- Bruce Schneier By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
-
good! here's what i want to do: I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed! Is there a way at all?
OK, let's take another step back: why do you want to load this extra DLL into the process? What are you trying to achieve? You might find this useful: Three Ways to Inject Your Code into Another Process[^]. On NT-based versions of Windows, you can use the AppInit_DLLs registry value to load a DLL into every process. However, there are some severe limitations with this: see http://support.microsoft.com/?id=197571[^].