> There is more reliable way. For example.
>
> h = GetProcessWindowStation();
> if (h==NULL) fatal error; /* or return "runs as service" */
> if (GetUserObjectInformationW (h,UOI_NAME,NULL,0,NULL,&len) ||
> GetLastError() != ERROR_INSUFFICIENT_BUFFER)
>fatal error; /* or return "runs a
Jeff:
In fact, it is sufficient to call the supplied function as described in
my last mail: IsService(EXENAME_SERVICES,EXENAME_WINLOGON,SYSTEM_SID)
The three arguments are just three #define's (refer to svccheck.h).
The function's prototype requires three params because I cloned the
stuff from ano
At 11:28 11/08/03 +0200, you wrote:
>Hi,
>
>to make things clear, how to check if a Win32 exe is currently running
>as a NT service:
>1.) Check if the SID (security ID) of the current process is "S-1-5-18",
>i.e. the so called LOCALSYSTEM account. This changes if you configure
>your service (in the
> to make things clear, how to check if a Win32 exe is currently running
> as a NT service:
> 1.) Check if the SID (security ID) of the current process is "S-1-5-18",
> i.e. the so called LOCALSYSTEM account. This changes if you configure
> your service (in the services control panel) to run on a d
chricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Richard Levitte -
VMS Whacker
Gesendet: Sonntag, 10. August 2003 11:39
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: Re: AW: AW: BUG: CreateToolhelp32Snapshot, check if running as
NT service
In message <[EMAIL PR