The DLL you are trying to call (e.g., sqlmap.dll for XML procedures) might be present, but it might rely on other DLLs (dependencies) that are missing. This is common in "clean" modern server installations that lack the Visual C++ Redistributables or older system libraries that were standard in the Windows 2000/Server 2003 era.
If this fails, the problem is external to SQL Server.
This is the most common cause. SQL Server 2000 runs under a specific Windows Service Account. This account needs explicit "Read and Execute" permissions on the DLL file being called. In modern Windows Server environments (2012, 2016, 2019), security defaults are much tighter than they were in the year 2000. If the service account cannot read the DLL, the engine throws an internal error because it assumes the file is corrupt or inaccessible.
dumpbin /headers <DLLName>.dll | find "machine"