FreeRDP/winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c
2019-11-07 10:53:54 +01:00

23 lines
405 B
C

#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;
}