blob: 4d04e5987d66a2d670df5b19c15be5d93a97e7a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <winpr/crt.h>
#include <winpr/error.h>
#include <winpr/wtsapi.h>
int TestWtsApiExtraDisconnectSession(int argc, char* argv[])
{
BOOL bSuccess;
HANDLE hServer;
hServer = WTS_CURRENT_SERVER_HANDLE;
bSuccess = WTSDisconnectSession(hServer, WTS_CURRENT_SESSION, FALSE);
if (!bSuccess)
{
printf("WTSDisconnectSession failed: %" PRIu32 "\n", GetLastError());
return -1;
}
return 0;
}
|