f71b6b46e8
- fixed invalid, missing or additional arguments - removed all type casts from arguments - added missing (void*) typecasts for %p arguments - use inttypes defines where appropriate
25 lines
427 B
C
25 lines
427 B
C
|
|
#include <winpr/crt.h>
|
|
#include <winpr/error.h>
|
|
#include <winpr/wtsapi.h>
|
|
|
|
int TestWtsApiExtraLogoffSession(int argc, char* argv[])
|
|
{
|
|
BOOL bSuccess;
|
|
HANDLE hServer;
|
|
DWORD sessionId;
|
|
|
|
sessionId = 123;
|
|
hServer = WTS_CURRENT_SERVER_HANDLE;
|
|
|
|
bSuccess = WTSLogoffSession(hServer, WTS_CURRENT_SESSION, FALSE);
|
|
|
|
if (!bSuccess)
|
|
{
|
|
printf("WTSLogoffSession failed: %"PRIu32"\n", GetLastError());
|
|
return -1;
|
|
}
|
|
|
|
return 0;
|
|
}
|