Rabbitfacedkilla
Gawd
- Joined
- Jan 1, 2001
- Messages
- 581
Howdy,
Currently writing a few apps to try to learn VB.Net a bit better.. Yes i realize that it is a horrendous language, but i figure i should get a headstart on it as im going to have to use it in class next year.
Anyhow, i started writing a pseudo-taskmanager clone, and i've run into a few problems along the way.
First off, i'm looking to show mem-usage in kb just like it does in the task manager window, yet im at a bit of a deadend as to how, im not sure which method would be the correct one, as all seem to return different values then task manager.
And my second and final error occurs when i try to obtain the fullpath of the process, i wrote a function to do this just in case i need to call it for any other purposes. Said function is as follows, assuming that The process is being passed in.
When i try to get the fileinfo the error is as follows: "Additional Information: Unable to enumerate the process modules."
Any help is appreciated. Thanks.
Currently writing a few apps to try to learn VB.Net a bit better.. Yes i realize that it is a horrendous language, but i figure i should get a headstart on it as im going to have to use it in class next year.
Anyhow, i started writing a pseudo-taskmanager clone, and i've run into a few problems along the way.
First off, i'm looking to show mem-usage in kb just like it does in the task manager window, yet im at a bit of a deadend as to how, im not sure which method would be the correct one, as all seem to return different values then task manager.
And my second and final error occurs when i try to obtain the fullpath of the process, i wrote a function to do this just in case i need to call it for any other purposes. Said function is as follows, assuming that The process is being passed in.
Code:
Private Function GetFileInfo(ByVal newProcess as Process) As String
GetFileInfo = newProcess.MainModule.FileName.ToString
End Function
When i try to get the fileinfo the error is as follows: "Additional Information: Unable to enumerate the process modules."
Any help is appreciated. Thanks.