Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2006

Tip: Looking for answers? Try searching our database.

Exception occurs when getting ProcessName

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patriot - 17 Apr 2006 21:38 GMT
I am having this error quite often, but not every time.
I have looked around some of these forums and don't seem to find any
post with the similar problem. Could someone point out what could be
the problem?

Dim myProcesses() As Diagnostics.Process
Dim myProcess As Diagnostics.Process
Dim sProcName As String

myProcesses = Diagnostics.Process.GetProcesses

For Each myProcess In myProcesses
      With myProcess
              sProcName = .ProcessName       'Exception here.
              console.writeline(sProcName)
      End With
Next

System.ComponentModel.Win32Exception: Unable to enumerate the process
modules.
at System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId)
at System.Diagnostics.Process.get_Modules()
at System.Diagnostics.Process.get_MainModule()
at System.Diagnostics.Process.get_ProcessName()
at Process_Controller.ProcessKiller.Main() in C:\My
Projects\VB.Net\WindowsUtils\Process Killer\ProcessKiller.vb:line 41
Kevin Spencer - 17 Apr 2006 22:04 GMT
It is possible that processes are being started and/or stopped during
execution.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

>I am having this error quite often, but not every time.
> I have looked around some of these forums and don't seem to find any
[quoted text clipped - 22 lines]
> at Process_Controller.ProcessKiller.Main() in C:\My
> Projects\VB.Net\WindowsUtils\Process Killer\ProcessKiller.vb:line 41

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.