Click here to Skip to main content
16,004,227 members

Comments by Stefan Erler (Top 3 by date)

Stefan Erler 1-May-15 13:40pm View    
Yes for all othe process it works -.-

here you see i tried with pskill, and taskkill and you see the process with PID in the TaskManager... But thanks again for your help.

image
Stefan Erler 1-May-15 13:01pm View    
Ah ok Thanks now i know what you mean... OK i try this only with System.Diagnostics.Process class. But i think that’s not the problem, but i will try it!

I can kill it with the Task Manager, that’s why i'm not sure why not with Process.Kill.
Thank you for the links i will try every think and let you know tomorrow
[Edit]
When i use psKill in Admin cmd i also get Access denied
Stefan Erler 1-May-15 11:58am View    
First thank you for you Answer!

I don’t know that you mean with P/Invoke, I didn’t use it.
At first I just tried get the Process and then call the Process.Kill(), the other stuff is just from trying to find a way…

I find the process by find the window like this:
[DllImport("USER32.DLL", CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
public IntPtr KalGestartet ()
{
return FindWindow("#32770", "KalOnline");
}
and pass the IntPtr to the KillKal Method if it’s not IntPtr.Zero.
And as I say the PID I get is the same as I see in the Task Manager, if I kill this with Task Manager the game is closing. So it should be the same, right?

I Run VisualStudio "as administrator", so the Program also do.

I know you should not do it, but it’s necessary because the game is kind of buggy and you can only close it with Task Manager. That’s why I need this program…

Thank you again.