|
Fair enough - you're an expert in this side, but you did state quite clearly that "there is NO process that will NOT be listed in task manager". That's pretty unequivocal, and perhaps you've got some nuance that I'm not aware of, but we've gone from no process to no unpatched kernel process, which is not the same thing (yes I appreciate that you clarified in your original answer, but the fact remains that there is are processes that will not be listed - and a bald first statement like that leads to people assuming this is true in all cases). I know it seems like I'm splitting hairs here, but there is a difference, and I am nothing if not anal about these things.
|
|
|
|
|
Well, my point is that after you patch the kernel, it is not Windows anymore - it's not task manager anymore. The OS itself is a virus, because all the calls to the kernel are intercepted and can be "adjusted" by the patch code.
OK, may be I should have said: "On a machine with kernel that hasn't been patched or infected by malicious code, it's impossible for a process to hide from the task manager".
And, you sir are anal about things. But there's nothing wrong with it, because serious programmers WILL BE anal about things. As a fellow-nerd, I can appreciate it.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
By what method have they been hidden?
|
|
|
|
|
It's not method that hides. There are two games KnightOnline and Metin2 that are not shown in Processes list and task manager. So, as I can't see them in Processes I can't close them.
|
|
|
|
|
Yes, I meant method as in "way" instead of "function".
How do KnightOnline and Metin2 hide their process?
|
|
|
|
|
David1987 wrote: How do KnightOnline and Metin2 hide their process?
I don't know how they do it. All I know and want is to close them
|
|
|
|
|
I am trying to connect to a tcp listener, after I hit the clint.Connect(server, port) it throughts a SocketException
public void Connect(String server, String message)
{
try
{
StreamWriter sw;
StreamReader sr;
int port = 5000;
TcpClient client = new TcpClient(server, port);
client.Connect(server, port);
sw = new StreamWriter(client.GetStream());
sr = new StreamReader(client.GetStream());
sw.WriteLine(message);
sw.Flush();
string rtnMsg = sr.ReadToEnd().Trim();
}
catch (ArgumentNullException e)
{
Console.WriteLine("ArgumentNullException: {0}", e);
}
catch (SocketException e)
{
Console.WriteLine("SocketException: {0}", e);
}
catch (IOException e)
{
}
catch (NullReferenceException e)
{
}
Console.WriteLine("\n Press Enter to continue...");
Console.Read();
}
Any help would be really helpful.
|
|
|
|
|
The reason this happens is because you've already attempted to establish a connection in your constructor. The exception you're getting will be indicating that the port's already in use.
|
|
|
|
|
It is just a method which is call by a thread, the method is passed the server IP to connect to.
It throws an exception even when connecting only to one IP
|
|
|
|
|
Did you read what I said carefully? Basically, when you call new TcpClient(address, port) you are establishing a connection at that point. You can remove the Connect call as you've already established your connection. See this[^] for more details.
|
|
|
|
|
Just let it go Pete...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
|
I think you link should help him out. I went thru it and msdn is always helpful
|
|
|
|
|
Paul Harsent wrote: TcpClient client = new TcpClient(server, port); client.Connect(server, port);
I'm with Pete here; you basically have provided the same information (server, port) twice; that would not make much sense, would it?
The documentation[^] provides an example, it does not have a Connect() call.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I have a program that I'm trying to multithread. It works correctly on a single processor. All I had to do was change the for loop to Parallel.For and add ");" at the end. Basically, the structure is as follows:
Variables (V) that do not get modified inside the loop, including a LinkedList<BigInteger> that does.
Parallel.For (0, 5, j => {
BigInteger Variable that relies on j and another from (V - outside loop).
foreach (BigInteger k in numbers) {
Local Variables.
{
Add k to LinkedList.
Console.WriteLine(k and other data.);
}
Console.WriteLine(Summary count per loop.);
}); This parallel loop is missing a few values when multithreaded. However, if I put a write statement just before the IF to capture everything (commented out), it works. The summary count comes up accurate every time. If I comment it out, it fails, every time starting at higher values of k across all j. Basically, it starts working and slowly degrades. It seems to be that the write statement is slowing it down for it to work.
Do I need a more threaded way of adding to the LinkedList array or am I missing something else? Any suggestions would be appreciated.
NB - Can't submit code and this is console programming without the use of Visual Studio. Don't ask!
|
|
|
|
|
Bassam Abdul-Baki wrote: LinkedList array
What?
Anyway you may have a problem there, adding to a linked list is not an atomic operation.
|
|
|
|
|
I'm using AddLast. After exhausting all other options, I had a feeling this might be it, but I wasn't sure. So any suggestions on how to fix or work around it?
|
|
|
|
|
David1987 wrote: adding to a linked list is not an atomic operation.
Neither is any operation on a BigInteger!
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Aghhh! That explains it and crap.
|
|
|
|
|
Indeed, I didn't see any problems with that though, the bigint is a local variable..
|
|
|
|
|
locals are fine; however when there is one BigInteger, there is bound to be more, and the code looked rather abstract and incomplete, so I mentioned it just in case it would ring a bell.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Yep, it's the add to the collection that's causing the problem. I'm guessing this is a vast oversimplification because what's posted there is not worth parallelising anyway.
Assuming the stuff inside the loop (calculating what's to be put in the list) is the expensive part, have a thread-local list (a local variable to the lambda) and merge them all at the end.
If it's actually adding millions of simple things to a list then you'll need to be cleverer about how you put things in there, for example creating an array large enough for everything beforehand and interleaving the results into well defined indices so they can't collide.
|
|
|
|
|
BobJanova wrote: creating an array large enough for everything beforehand and interleaving the results into well defined indices so they can't collide
I had never thought of that before.
|
|
|
|
|
BobJanova wrote: If it's actually adding millions of simple things to a list
It is, but it's all done inside a while loop that I didn't show. However, my inner array grows by an order of 4*3^(n-1) for each while loop and goes on for a while (pardon the pun).
|
|
|
|
|
if your loop iterations have data dependencies (e.g. you are trying to calculate the overall sum in one accumulator), then parallellized code would require synchronization, which could throw away most if not all of your potential performance gains.
The normal way to efficiently calculate an overall sum would be to have explicit threads, each thread holding its own accumulator, summing the data entrusted on it; then in a sequential way adding all accumulators together.
As always, simple solutions only work well in simple situations...
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|