Einzelnen Beitrag anzeigen

hoika

Registriert seit: 5. Jul 2006
Ort: Magdeburg
8.270 Beiträge
 
Delphi 10.4 Sydney
 
#7

Re: SetSystemTime unter Windows VISTA?

  Alt 20. Jan 2010, 08:58
Hallo,

1

Dort steht bei Return Values

Zitat:
If the function succeeds, the return value is nonzero.
To determine whether the function adjusted all of the specified privileges, call GetLastError, which returns one of the following values when the function succeeds
Ich würde also danach mit GetLastError prüfen.


Und ausserdem

Zitat:
The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges.
d.h. du musst das Recht zur System-Zeit schon vorher haben (z.B. als Admin).

Du hast nicht geschrieben, ob du das Programm als Admin gestartet hast.


Heiko
Heiko
  Mit Zitat antworten Zitat