blob: 5d6b522a2712041b4994f0427ce6a79a64a2ae90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#pragma once
// keep in sync with windowsidentity.cs
#define WINSECURITYCONTEXT_THREAD 1
#define WINSECURITYCONTEXT_PROCESS 2
#define WINSECURITYCONTEXT_BOTH 3
#ifndef FEATURE_PAL
class COMPrincipal
{
public:
#ifndef FEATURE_CORECLR
static
INT32 QCALLTYPE ImpersonateLoggedOnUser(HANDLE hToken);
static FCDECL3(INT32, OpenThreadToken, DWORD dwDesiredAccess, DWORD dwOpenAs, SafeHandle** phThreadTokenUNSAFE);
static
INT32 QCALLTYPE RevertToSelf();
static
INT32 QCALLTYPE SetThreadToken(HANDLE hToken);
#endif // !FEATURE_CORECLR
static void CLR_ImpersonateLoggedOnUser(HANDLE hToken);
};
#endif // FEATURE_PAL
|