Don't put your DLL into the System32 directory!

You've come to this page because you've said something to the effect that you intend to put, or that you are putting, or that it is a good idea to put, one of your own DLLs in the %SystemRoot%\System32 directory.

This is the Frequently Given Answer to such statements.

Don't put your DLL into the System32 directory.

The fact that every man and his dog arrogantly thinks that his DLL is important enough to be placed in the operating system directory is part of the reason why Windows is in the mess that it is in now.

And always remember not to hard-code names such as "\Program Files" or "\Program Files\Common Files", and especially not to hard-code drive letters. Use the various available helper DLLs that export functions to look up these names. Or if that isn't possible, try to use the values of the %PROGRAMFILES% and %COMMONPROGRAMFILES% environment variables.

© Copyright 2000–2001 Jonathan de Boyne Pollard. "Moral" rights asserted.
Permission is hereby granted to copy and to distribute this web page in its original, unmodified form as long as its last modification datestamp is preserved.