Home > Net >  The.net framework change Process after class is not normal
The.net framework change Process after class is not normal

Time:10-03

The enumeration process load module information problems
Windows 7 operating system. Net4.7, test process QQProtect
The same code to create a new project execution no problem, change. The.net framework 4.0 changed, changed back again, only to establish engineering problem.

The code is as follows:

Using System;
using System.Collections.Generic;
Using System. Diagnostics;
Using System. Linq;
Using System. The Text;
Using System. The Threading. The Tasks;

The namespace testProcess2
{
Class Program
{
The static void Main (string [] args)
{
Process [] pname=Process. GetProcesses ();
//traversal process
Foreach (Process p in pname)
{
//if the process name to find back
Try
{
If (p. ainModule. FileName. ToLower (). The IndexOf (" QQProtect ". ToLower ())!=1)
{
Console. WriteLine (p. ainModule. FileName + "\ n");
Console. WriteLine (" module number "+ p. odules. Count +" \ n ");
For (int I=0; I & lt; P. odules. Count; I++)
{
Console. WriteLine (p. odules [I] FileName + "\ n");
}
Console. WriteLine (" \ n ");
}
}
The catch (Exception)
{
continue;//traversal process without access when they ran out of the abnormal
}
}
Console.ReadKey();
}
}
}

Not normal.net framework 4.0



Under the normal.net framework 4.6.1



Normal framework version

CodePudding user response:

I used the.net 4.0 made the acquisition process, didn't meet what problem,

CodePudding user response:

reference 1st floor HyoJung response:
I used. NET 4.0 made the acquisition process, didn't meet what problem,


I this is vs2017 it's really something wrong with my new engineering testing!

CodePudding user response:

Not only written in c + + a DLL call, but I had trouble with this!

CodePudding user response:

refer to the second floor Guo Guo dad reply:
Quote: refer to 1st floor HyoJung response:

I used the.net 4.0 made the acquisition process, didn't meet what problem,


I this is vs2017 it's really something wrong with my new engineering testing!

You should an administrator to run VS, and which. The.net framework not too big relations

CodePudding user response:

The administrator to run, too

CodePudding user response:

refer to the second floor Guo Guo dad reply:
Quote: refer to 1st floor HyoJung response:

I used the.net 4.0 made the acquisition process, didn't meet what problem,


I this is vs2017 it's really something wrong with my new engineering testing!

I tried your code, I don't care what the.net framework is reality you above is not normal that

CodePudding user response:

refer to 6th floor HyoJung response:
Quote: refer to the second floor Guo Guo dad reply:

Quote: refer to 1st floor HyoJung response:

I used the.net 4.0 made the acquisition process, didn't meet what problem,


I this is vs2017 it's really something wrong with my new engineering testing!

I tried your code, I don't care what the.net framework is reality you above is not normal that


I just new engineering 4.6.1 the default version is no problem
22805715 + qq test
  •  Tags:  
  • C#
  • Related