Does ntdll.dll come standard with windows xp and windows vista?
Does ntdll.dll come standard with windows XP and Windows Vista? I know that I have it on my windows XP machine, but am not sure that is standard with every machine.
The reason I am curious is for the NTQuerySystemInformation
function to get CPU usage of a windows XP and/or Windows Vista s开发者_如何学Pythonystem.
Yes, but the function you want to use doesn't might not. According to MSDN, NTQuerySystemInformation may be altered or unavailable in future versions of Windows. You should use GetSystemInfo instead, which is in Kernel32.dll and available from Windows 2000 and up.
You really should learn to check MSDN regarding API calls before you use them. And, if you did so, you should learn to listen, as once it's deprecated MS is free to remove it from future NTDLL files in updates (although they don't typically do so). Choosing to intentionally use a deprecated function when there is a viable and supported alternative is always a bad idea.
Why use undocumented ntdll.dll functions? You can use WMI to get the CPU usage. For example using Win32_Process should be able to help.
According to the site below, "this is a file required by Windows and deleting the file will cause errors with Windows." With that said, I think it's safe to assume all machines will have it.
http://www.computerhope.com/issues/ch000960.htm
精彩评论