nki00
unread,Jan 26, 2012, 7:42:34 PM1/26/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I was wondering why the following happens?
I need to log off users and then put computer to sleep. I do the following:
(Calling the following from the local system service):
WTSLogoffSession(WTS_CURRENT_SERVER_HANDLE, dwUserSessionID, TRUE);
SetSuspendState(FALSE, TRUE, FALSE);
But when I run this code on Windows Vista, SetSuspendState() hangs up and
never returns. At the same time the system does not enter sleep mode either.