[Tizen] Unify dnetmemoryenumlib terms to match the codebase (#291)
[platform/upstream/coreclr.git] / src / utilcode / appxutil.cpp
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 //
5
6
7 #include "stdafx.h"
8
9 #include <strsafe.h>
10
11 #include "utilcode.h"
12 #include "holder.h"
13 #include "volatile.h"
14 #include "clr/fs.h"
15 #include "clr/str.h"
16
17 #include "appxutil.h"
18 #include "ex.h"
19
20 #include "shlwapi.h"    // Path manipulation APIs
21
22
23 GVAL_IMPL(bool, g_fAppX);
24 INDEBUG(bool g_fIsAppXAsked;)
25
26 namespace AppX
27 {
28 #ifdef DACCESS_COMPILE
29     bool DacIsAppXProcess()
30     {
31         return g_fAppX;
32     }
33 #else
34
35     // Returns true if host has deemed the process to be appx
36     bool IsAppXProcess()
37     {
38         INDEBUG(g_fIsAppXAsked = true;)
39         return g_fAppX;
40     }
41
42
43     void SetIsAppXProcess(bool value)
44     {
45         _ASSERTE(!g_fIsAppXAsked);
46         g_fAppX = value;    
47     }
48 #endif
49 };
50