如win2000下的winlogon.exe ,smss.exe,crss.exe....

解决方案 »

  1.   

    winlogon.exe ,用户登陆进程
    smss.exe,crss.exe 系统服务进程
      

  2.   

    关机算了.你结束了这些进程Windows还能运行吗?!!
      

  3.   

    为自己的应用程序启用SE_DEFUG权限.
      

  4.   

    //僵哥有点沾边,怎么散分?program Project2;uses
      windows,
      Tlhelp32,
      SysUtils;{$R *.res}
    const
      KILL_ERR = 0;
      KILL_NOTSUPPORTED = -1;
      KILL_ERR_OPENPROCESS = -2;
      KILL_ERR_TERMINATEPROCESS = -3;  ENUM_NOERR = 0;
      ENUM_NOTSUPPORTED = -1;
      ENUM_ERR_OPENPROCESSTOKEN = -2;
      ENUM_ERR_LookupPrivilegeValue = -3;
      ENUM_ERR_AdjustTokenPrivileges = -4;  SE_DEBUG_NAME = 'SeDebugPrivilege';
    function  EnableDebugPrivilegeNT : integer;var
      hToken : THANDLE;
      DebugValue : TLargeInteger;
      tkp : TTokenPrivileges ;
      ReturnLength : DWORD;
      PreviousState: TTokenPrivileges;
    begin
      if (OpenProcessToken(GetCurrentProcess, TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, hToken) = false) then
        result := ENUM_ERR_OPENPROCESSTOKEN
      else
      begin
        if (LookupPrivilegeValue(nil, SE_DEBUG_NAME, DebugValue) = false) then
          result := ENUM_ERR_LookupPrivilegeValue
        else
        begin
          ReturnLength := 0;
          tkp.PrivilegeCount := 1;
          tkp.Privileges[0].Luid := DebugValue;
          tkp.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
          AdjustTokenPrivileges(hToken, false, tkp, SizeOf(TTokenPrivileges),PreviousState , ReturnLength);
          if (GetLastError <> ERROR_SUCCESS) then
            result := ENUM_ERR_AdjustTokenPrivileges
          else
            result := ENUM_NOERR;
        end;
      end;
    end;function KillTask(ExeFileName: string): Integer;//参数为应用程序名称
    const
    PROCESS_TERMINATE = $0001;
    var
    ContinueLoop: BOOL;
    FSnapshotHandle: THandle;
    FProcessEntry32: TProcessEntry32;
    begin
    Result := 0;
    FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
    ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
    while Integer(ContinueLoop) <> 0 do
    begin
    if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
    UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
    UpperCase(ExeFileName))) then
    Result := Integer(TerminateProcess(OpenProcess(PROCESS_TERMINATE,BOOL(0),FProcessEntry32.th32ProcessID),0));
    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
    end;
    CloseHandle(FSnapshotHandle);
    end;begin
      EnableDebugPrivilegeNT();
      if ParamStr(1)<>'' then begin
        if KillTask(ParamStr(1))=KILL_ERR then
          messagebox(0,'Fail!','kill',0)
        else
          messagebox(0,'Success!','kill',0);
        end;
    end.
      

  5.   

    winlogone.exe 也可以杀,不过一杀就死
      

  6.   

    可以提升到Debug权限,然后随便那个进程都可以结束
    注意,关闭关键进程会立刻导致系统崩溃http://lysoft.7u7.net
      

  7.   

    http://community.csdn.net/Expert/topic/3658/3658170.xml?temp=.8116724这个很类似,关键都是使用 CreateToolhelp32Snapshot 。
    可以参考一下。