SetThreadAffinityMask issue

delphi package - easy access to kernel objects etc.
Post Reply
Posts: 1
Joined: Mon Apr 28, 2008 11:53 am

SetThreadAffinityMask issue

Post by pvl »


madKernel uses Delphi's SetThreadAffinityMask, but we've discovered this kernel32 API is imported with a wrong signature up to XE5 (see The effect is that on any machine with 32 or more cores, the call can (and will) fail.

Just a heads up for anyone encountering unexplainable crashes.
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetThreadAffinityMask issue

Post by madshi »

Thanks for the heads-up. FWIW, madKernel doesn't officially support 64bit compilation yet, so it's not really an issue right now. The DWORD_PTR is the same as DWORD when compiling in 32bit.

Got some 64bit modifications for madKernel from a user, though, so there might be a 64bit version available soon, though.
Post Reply