locked
Determining if a process is 64-bit or 32-bit RRS feed

  • Question

  • I am writing an application that needs to be able to generate a list of currently running processes.  That part is easy enough, I am using System.Diagnostics.Process to retrieve the list of processes.  

    However I need a way, when running on a 64-bit architecture, to distinguish if the processes are running as 32-bit or 64-bit processes.  In task manager the 32 bit processes have a little *32 after their names... how do I figure that out programmatically?
    Wednesday, June 3, 2009 8:46 PM

Answers

  • You'll need some P/Invoke, OpenProcess, IsWow64Process and CloseHandle.  Visit pinvoke.net for the declarations.

    Hans Passant.
    • Marked as answer by RyanW2250 Wednesday, June 3, 2009 9:03 PM
    Wednesday, June 3, 2009 9:01 PM
    Moderator

All replies

  • You'll need some P/Invoke, OpenProcess, IsWow64Process and CloseHandle.  Visit pinvoke.net for the declarations.

    Hans Passant.
    • Marked as answer by RyanW2250 Wednesday, June 3, 2009 9:03 PM
    Wednesday, June 3, 2009 9:01 PM
    Moderator
  • thanks
    Wednesday, June 3, 2009 9:03 PM