Milestone 5: deliver embedded RDP sessions and lifecycle hardening
This commit is contained in:
22
third_party/FreeRDP/winpr/libwinpr/wtsapi/test/TestWtsApiExtraLogoffSession.c
vendored
Normal file
22
third_party/FreeRDP/winpr/libwinpr/wtsapi/test/TestWtsApiExtraLogoffSession.c
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/error.h>
|
||||
#include <winpr/wtsapi.h>
|
||||
|
||||
int TestWtsApiExtraLogoffSession(int argc, char* argv[])
|
||||
{
|
||||
|
||||
WINPR_UNUSED(argc);
|
||||
WINPR_UNUSED(argv);
|
||||
|
||||
HANDLE hServer = WTS_CURRENT_SERVER_HANDLE;
|
||||
BOOL bSuccess = WTSLogoffSession(hServer, WTS_CURRENT_SESSION, FALSE);
|
||||
|
||||
if (!bSuccess)
|
||||
{
|
||||
printf("WTSLogoffSession failed: %" PRIu32 "\n", GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user