Getting the type (x64 or x86) of a running process in vb.net macro code -


To automate the process of enclosing the IIS worker process (w3wp.exe, Windows Server 2k8) The problem with Visual Studio is that I often have two app pools running in one mode and one in 86 mode at any time in x64 mode. This means there are two processes running W3wp.exe at any time, and the only way to distinguish between them is the mode in which they are running. When I use the "Attach in Process" dialog, a "type" column shows that the information that I know is attached to W3wp.exe, but I do not understand how in my macro To get that information.

Based on the information here, I was able to come up with the following:

  Function AttachToProcess (ByVal processName as string) Boolean dim proc EnvDTE.Process dim As in the form of boolean for each proc attached in DTE.Debugger.LocalProcesses then proc.Name = "w3wp as .exe" then add proc.Attach () enclosed = true termination next return enclosed end function  

But in the mean time it just grabs the wrong process. I need one another to check the mode / type of process. I have spelunked through QuickWatch classes using the best I can, but just can not figure out where the information is. Can anyone help? Thanks!

"text" itemprop = "text">

There is not enough information in the process class to tell you the address. You can only obtain processID for the process from there, you will have to go to P / O to handle the process, and to find out whether it is a 32-bit process IWow64Process () stop the process CloseHandle () is actually not certain that P / Invoke is possible in Macro, to get the announcements, go to pinvoke.net.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -