PDA

Click to See Complete Forum and Search --> : Replacing shell32.dll & kernel32.dll in code?


hall
Aug 21st, 2000, 04:02 PM
Is there a way to replace the shell32.dll and kernel32.dll files (et al.) on the windows system disk from within code for a PC using NT4.0? Since these files and others are in use when windows is running, they can't be replaced. By the same token, I've tried renaming them and then registering them using the LoadLibraryRegister function in the kernel32.dll and then calling the renamed shell in my code. For some reason, I can't even get the renamed dll registered. Any help would be greatly appreciated.

Thanks,
KB Hall

crispin
Aug 22nd, 2000, 08:46 AM
http://msdn.microsoft.com/library/psdk/winbase/filesio_9oe0.htm

Use the MoveFileEx Function it allows you to replace files on reboot.