首页  编辑  

怎样发现是否有 SOFTICE在运行?

Tags: /超级猛料/Shareware.共享软件开发/   Date Created:

怎样发现是否有 SOFTICE在运行?

----------一个有意思的话题

I am trying to figure out how can I check if NuMega SoftIce is running? Any API calls?

function SoftIce95Running : Boolean;

var

hFile : THandle;

begin

Result := False;

hFile := CreateFile ('\\.\SICE',

GENERIC_READ or GENERIC_WRITE,

FILE_SHARE_READ or FILE_SHARE_WRITE,

nil,

OPEN_EXISTING,

FILE_ATTRIBUTE_NORMAL,

0);

if hFile <> INVALID_HANDLE_VALUE then begin

CloseHandle (hFile);

Result := True;

end;

end;

function SoftIceNTRunning : Boolean;

var

hFile : THandle;

begin

Result := False;

hFile := CreateFile ('\\.\NTICE',

GENERIC_READ or GENERIC_WRITE,

FILE_SHARE_READ or FILE_SHARE_WRITE,

nil,

OPEN_EXISTING,

FILE_ATTRIBUTE_NORMAL,

0);

if hFile <> INVALID_HANDLE_VALUE then begin

CloseHandle (hFile);

Result := True;

end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

 if IsSoftIce95Loaded or IsSoftIceNTLoaded then

 begin

   //Do something if Softice is loaded

 end;

end;