Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
MSWindowsSession.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2013 - 2016 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#define WIN32_LEAN_AND_MEAN
10#include <Windows.h>
11
12#include <Tlhelp32.h>
13
15{
16public:
18 ~MSWindowsSession() = default;
19
25
26 bool isProcessInSession(const wchar_t *name, PHANDLE process);
27 HANDLE getUserToken(LPSECURITY_ATTRIBUTES security);
29
31 {
32 return m_activeSessionId;
33 }
34
35private:
36 BOOL nextProcessEntry(HANDLE snapshot, LPPROCESSENTRY32 entry);
37
38private:
39 DWORD m_activeSessionId;
40};
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:28
static const WSAEVENT FAR DWORD
Definition ArchNetworkWinsock.cpp:55
static const WSAEVENT FAR BOOL
Definition ArchNetworkWinsock.cpp:55
~MSWindowsSession()=default
HANDLE getUserToken(LPSECURITY_ATTRIBUTES security)
Definition MSWindowsSession.cpp:102
bool isProcessInSession(const wchar_t *name, PHANDLE process)
Definition MSWindowsSession.cpp:19
MSWindowsSession()
Definition MSWindowsSession.cpp:15
DWORD getActiveSessionId()
Definition MSWindowsSession.h:30
BOOL hasChanged()
Definition MSWindowsSession.cpp:123
void updateActiveSession()
Definition MSWindowsSession.cpp:128