summaryrefslogtreecommitdiff
path: root/src/inc/appxutil.h
blob: 893c429c951e1fdf0ae5e97376eb58c7ac3f64f3 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// 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

#ifdef FEATURE_APPX

#include "clrtypes.h"
#include "appmodel.h"
#include "fusionsetup.h"

#define PACKAGE_FILTER_CLR_DEFAULT (PACKAGE_FILTER_HEAD|PACKAGE_FILTER_DIRECT)


typedef PACKAGE_INFO *              PPACKAGE_INFO;
typedef PACKAGE_INFO const *        PCPACKAGE_INFO;

//---------------------------------------------------------------------------------------------
// Forward declarations
template <typename T>
class NewArrayHolder;
BOOL WinRTSupported();


namespace AppX
{
    // Returns true if process is immersive (or if running in mockup environment).
    bool IsAppXProcess();

    // On CoreCLR, the host is in charge of determining whether the process is AppX or not.
    void SetIsAppXProcess(bool);

    inline bool IsAppXNGen()
    {
        WRAPPER_NO_CONTRACT;
        return false;
    }

#ifdef DACCESS_COMPILE
        bool DacIsAppXProcess();
#endif // DACCESS_COMPILE
};


#else // FEATURE_APPX

namespace AppX
{
    inline bool IsAppXProcess()
    {
        return false;
    }
}

#endif // FEATURE_APPX