summaryrefslogtreecommitdiff
path: root/src/vm/hostexecutioncontext.h
blob: d67c734755441ceb068c3ede7bf8abfcffd327ec (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
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//



#ifndef __hostexecutioncontext_h__
#define __hostexecutioncontext_h__

#ifdef FEATURE_CAS_POLICY

class HostExecutionContextManager
{
public:
#ifdef FEATURE_INCLUDE_ALL_INTERFACES
    static IHostSecurityContext*  m_pRestrictedHostContext;
#endif // FEATURE_INCLUDE_ALL_INTERFACES
    static void InitializeRestrictedContext();
    static void SetHostRestrictedContext();
    	
    static FCDECL0(FC_BOOL_RET, HostPresent);	
    static FCDECL1(HRESULT, ReleaseSecurityContext, LPVOID handle);
    static FCDECL1(HRESULT, CaptureSecurityContext, SafeHandle* hTokenUNSAFE);	
    static FCDECL2(HRESULT, CloneSecurityContext, SafeHandle* hTokenUNSAFE, SafeHandle* hTokenClonedUNSAFE);	
    static FCDECL3(HRESULT, SetSecurityContext, SafeHandle* hTokenUNSAFE, CLR_BOOL fReturnPrevious, SafeHandle* hTokenPreviousUNSAFE);	    
};
#endif // #ifdef FEATURE_CAS_POLICY
#endif // __hostexecutioncontext_h__