G
Guest
Hello
As you can probably see from my code, I'm new to the Program world and VB.NET is my first language. I'm trying to use the Method from the WIN32_Process, but I don't know how to use it. I tried several syntax (could not figure it out). I Tried the following link below
http://msdn.microsoft.com/library/d...i/terminate_method_in_class_win32_process.asp (I could not figure out the syntax)
and Example in VB.NET would really help. here is the code
Function FTerminate(ByVal ComputerName As String, ByVal StrProcessName As String) As Strin
Dim strResult As Strin
Dim objectQuery As New System.Management.ObjectQuery("Select * From Win32_Process"
Dim scope As New System.Management.ManagementScope("\\" & ComputerName & "\root\cimv2"
scope.Connect(
Dim patch As New ManagementObjectSearcher(scope, objectQuery
Dim strProcess As ManagementObjec
For Each strProcess In patch.Ge
If strProcess("Caption") = StrProcessName The
_________________> "TERMINATE METHOD HERE"*********
End I
Nex
Return strResul
End Functio
End Modul
Thank yo
John
As you can probably see from my code, I'm new to the Program world and VB.NET is my first language. I'm trying to use the Method from the WIN32_Process, but I don't know how to use it. I tried several syntax (could not figure it out). I Tried the following link below
http://msdn.microsoft.com/library/d...i/terminate_method_in_class_win32_process.asp (I could not figure out the syntax)
and Example in VB.NET would really help. here is the code
Function FTerminate(ByVal ComputerName As String, ByVal StrProcessName As String) As Strin
Dim strResult As Strin
Dim objectQuery As New System.Management.ObjectQuery("Select * From Win32_Process"
Dim scope As New System.Management.ManagementScope("\\" & ComputerName & "\root\cimv2"
scope.Connect(
Dim patch As New ManagementObjectSearcher(scope, objectQuery
Dim strProcess As ManagementObjec
For Each strProcess In patch.Ge
If strProcess("Caption") = StrProcessName The
_________________> "TERMINATE METHOD HERE"*********
End I
Nex
Return strResul
End Functio
End Modul
Thank yo
John