0

I'm referring to this page. I tried the code on a 64bit Win7 (and it worked fine) but was wondering what are the requirement for this method of getting the data? Will it work on both 64 and 32 bit systems? Will it work on Windows XP? Vista? 8?

1
  • it compiles on windows xp so i guess it will work fine as minimum supported OS for most API's in windows XP
    – kunal
    Dec 3, 2013 at 10:40

1 Answer 1

2

The code can be compiled to either a 32-bit or a 64-bit executable.

The 32-bit executable can run on either a 32-bit or a 64-bit system. A 64-bit executable can (of course) only run on a 64-bit system.

If you use a 32-bit executable on a 64-bit system, it will only "see" other 32-bit processes, not any 64-bit processes. If you use a 64-bit executable on a 64-bit system, it will see both 32-bit and 64-bit processes.

I haven't tried to go through that exact code in detail to be sure about every function it uses, but ToolHelp32 has been around since (at least) NT 4, so at least the majority of it should be fine on XP, and is definitely fine on newer systems. If you really need to target older systems (NT 3.5/3.51) you can use PSAPI instead, but I can hardly imagine that being a requirement anymore.

Not the answer you're looking for? Browse other questions tagged or ask your own question.