-
Changing system time in VC++ program
I'd like to change my local computer's (NT) time in my C++ program using system("net
time \\[computer name] /set /y");
But it doesn't work, seems that I dun have such privilege to change the system
time. But I don't know how to use the function
BOOL AdjustTokenPrivileges(HANDLE TokenHandle, BOOL Privileges,
PTOKEN_PRIVILEGES NewState, DWORD BufferLength,
PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength);
I just dun know what i should pass in TokenHandle? How to I get the access
token?
or anyone know a way to change the system time in C++ program? pls tell me
if you know, thank you very much~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|