Re:Hiding an application totally
Antoon:
This looks remarkably like the code I posted a little while back. :) You
don't have to use LoadLibrary, you can use GetModuleHandle because
KERNEL32.DLL is guaranteed to be loaded (otherwise how would Windows be
surviving.) What's been left out is the definition of TFNRegSvcPrc:
type
TFNRegSvcPrc = function(dwProcessId: Cardinal; dwType: Cardinal):
Cardinal stdcall;
Good luck using some code and not another component ;-).
Cameron
_______________________
cameronm...@hotmail.com
Quote
Ken White wrote in message <36B78224.2247C...@westelcom.com>...
>Antoon,
>You have to use LoadLibrary() to load Kernel32 (even though it's one
>of the primary Windows DLLs) before you can use GetProcAddress(); the
>'GetModuleHandle' should be replaced with the value returned from
>LoadLibrary.
>Don't forget to use FreeLibrary() afterwards as well.
>Ken
>--
>Ken White
>Clipper Functions for Delphi
>http://members.aol.com/clipfunc
>> Antoon wrote:
>> Hi there,
>> I want to hide an application totally. That is, I don't want it to
>> come up in the Ctrl-Alt-Del Close Program List. I know it has
>> something to do with the program becoming a service ....
>> The code goes something like this
>> var
>> RegisterServiceProcess: TFNRegSvcPrc;
>> begin
>> @RegisterServiceProcess :=
>> GetProcAddress(GetModuleHandle('KERNEL32'), 'RegisterServiceProcess');
>> RegisterServiceProcess(0, 1);
>> end;
>> However, it doesn't work in Delphi 3 (the code might be for D4) .
>> Does anyone know how to do does in Delphi 3?
>> If so, please email me and write to the newsgroup so others can also
>> see
>> cant...@NOSPAMhotmail.com
>> write to this address but please remove NOSPAM