summaryrefslogtreecommitdiffstats
path: root/winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c
diff options
context:
space:
mode:
Diffstat (limited to 'winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c')
-rw-r--r--winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c b/winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c
new file mode 100644
index 0000000..4d04e59
--- /dev/null
+++ b/winpr/libwinpr/wtsapi/test/TestWtsApiExtraDisconnectSession.c
@@ -0,0 +1,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;
+}