[fpc-pascal]Windows ShutDown Privilege
memsom at interalpha.co.uk
Sun Dec 8 11:36:24 CET 2002
Which version of Windows are you using? I assume a NT 4.X/NT 5.X variant. If
it's NT 4, which service pack? if it's less than 4 I'd try SP5 or SP6 first.
Just to be sure.
If you're using a Win9x variant, you probably don't need all the security
stuff because it's only NT that needs all of that.
The code was taken from Delphi, so make sure you've compiled using the
Delphi compatibility mode, just to be sure that FPC isn't ignoring
Hope that helps,
> Thanks for the Shutdown routine. I'm starting to get really annoying
> with this now as I compiled the routine and ran it and exactly the
> same problem appeared with the same error message stating I don't have
> the correct privilege.
> I added a CheckPrivilege call before and after the
> AdjustTokenPrivileges and it appears the "SeShutdownPrivilege" has not
> been altered.
> Is there something strange about the Privilege settings with Windows
> that I'm missing somehow? I've searched Google and all the routines
> are very similar to each other yet despite tweaking the function the
> error remains. I'll have to try compiling the function in Delphi just
> to prove to myself I'm not going mad!
More information about the fpc-pascal