On Mon, Oct 4, 2010 at 2:18 PM, Rudolf Mayerhofer rm@eightyfive.net wrote:
I don't know much about kernel32/ntdll, but I'm pretty sure that you could get this to work through ntdll. NtQuerySystemInformation with SystemProcessorInformation/SystemLogicalProcessorInformation (see http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/System...) should help. http://native-nt-toolkit.googlecode.com/svn/trunk/ndk/extypes.h (read, don't copy) seems to have a pretty exhaustive set of definitions, but even that's not complete. Some tests for the NT version would be useful.
Mike.
SystemLogicalProcessorInformation seems to be the right SystemClass for NtQuerySystemInformation. But here's the Problem. I don't have any idea how i could any information about the struct returned by calling NtQuerySystemInformation with SystemLogicalProcessorInformation (= 73).
The only windows machine i have access to a the moment keeps throwing status 0xC0000005 (ACCESS_VIOLATION) at me which doesn't help at all and i'm pretty much stuck right now. If i could get my hands on the struct returned by NtQuerySystemInformation it should be easy to change the patch to do the parsing in ntdll and just call that from kernel32.
Have you checked that it doesn't just return a SYSTEM_LOGICAL_PROCESSOR_INFORMATION ? It seems to be the right "format" for the name anyway. I'd play with the size argument or try using NtQuerySystemInformationEx (some new thing in win7). You could just find a case that passes and implement it for wine (i.e. play with parameters in tests until it passes on windows), since there doesn't seem to be any public docs for the api anyway. We can worry about "correct" implementation once someone figures it out (or uses it at least).
Mike.