> I don't know what the reason is, but I suspect the large_integer (64
bits).
> In each case, using 1.9.X, your sources didn't compile at all.
> I changed them and now the program works correctly as far as I can
> see (at least, it reports no error).
> 
> Michael.

The source you sent doesn't compile with 1.0.10:
test.pas(20,49) Error: Incompatible type for arg no. 3: Got INT64, expected
PLUID
test.pas(25,27) Error: Incompatible types: got "INT64" expected
"LARGE_INTEGER"
test.pas(33) Fatal: There were 2 errors compiling module, stopping

(1)
I added the typecasts, uncommented the ExitWindowsEx line, then could
compile it.
But didn't work.

There is no error message: AdjustTokenPrivileges() returns TRUE, assuming no
error, but GetLastError still returns error 1300.


(2)
I tried using variables with absolute address:

var
  luid_LUID: LUID absolute Shutdown_LUID;
  large_LUID: large_integer absolute Shutdown_LUID;

This compiles, too and runs with the same results. :-(

And the best: both compile and run with 1.0.4!

I'll analise the generated assembly source, to find something.

Andras



Ezen uzenet es annak barmely csatolt anyaga bizalmas, jogi vedelem alatt all, a 
nyilvanos kozlestol vedett.
Az uzenetet kizarolag a cimzett, illetve az altala meghatalmazottak hasznalhatjak fel. 
Ha On nem az uzenet cimzettje, ugy kerjuk, hogy telefonon, vagy e-mail-ben ertesitse 
errol az uzenet kuldojet es torolje az uzenetet, 
valamint annak osszes csatolt mellekletet a rendszerebol. Ha On nem az uzenet 
cimzettje, abban az esetben tilos az 
uzenetet vagy annak barmely csatolt mellekletet lemasolnia, elmentenie, az uzenet 
tartalmat barkivel kozolnie 
vagy azzal visszaelnie.


This message and any attachment are confidential and are legally privileged. It is 
intended solely for the use of 
the individual or entity to whom it is addressed and others authorised to receive it. 
If you are not the intended 
recipient, please telephone or email the sender and delete this message and any 
attachment from your system. 
Please note that any dissemination, distribution, copying or use of or reliance upon 
the information contained in 
and transmitted with this e-mail by or to anyone other than the recipient designated 
above by the sender is 
unauthorised and strictly prohibited.



_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to