function RegisterAsService(aktif: boolean): boolean; //menyembunyikan program klien dari tasklist (ctrl+alt+del)
const
RSP_SIMPLE_SERVICE = 1;
RSP_UNREGISTER_SERVICE = 0;
type
TRegisterServiceProcessFunction =
function (dwProcessID, dwType: Integer): Integer; stdcall;
var
module: HMODULE;
RegServProc: TRegisterServiceProcessFunction;
begin
Result := False;
module := LoadLibrary('KERNEL32.DLL');
if module <> 0 then
try
RegServProc := GetProcAddress(module, 'RegisterServiceProcess');
if Assigned(RegServProc) then
if aktif then
Result := RegServProc(0, RSP_SIMPLE_SERVICE) = 1
else
Result := RegServProc(0, RSP_UNREGISTER_SERVICE) = 1;
finally
FreeLibrary(module);
end;
end;
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.