Share via


AppCapability Class

Definition

Creates an AppCapability object for the app's user and the current process.

public ref class AppCapability sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 524288)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppCapability final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 524288)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppCapability
Public NotInheritable Class AppCapability
Inheritance
Object Platform::Object IInspectable AppCapability
Attributes

Windows requirements

Device family
Windows 10, version 1903 (introduced in 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v8.0)

Remarks

Created through the static methods Create and CreateWithProcessIdForUser.

Note: Create is callable only by SUA apps.

Properties

CapabilityName

Accesses the stored capability.

DisplayMessage

The purpose of why the capability is being accessed.

User

The user under which the AppCapability is created.

Methods

CheckAccess()

Checks access for the object's stored capability and user.

Create(String)

Creates an AppCapability object.

CreateWithProcessIdForUser(User, String, UInt32)

Creates an AppCapability object for the specified process and user.

RequestAccessAsync()

Requests access for the object's stored capability and user.

RequestAccessForCapabilitiesAsync(IIterable<String>)

Requests access to multiple capabilities simultaneously.

RequestAccessForCapabilitiesForUserAsync(User, IIterable<String>)

Requests access to multiple capabilities simultaneously.

Events

AccessChanged

Raised when there is a change to access status.

Applies to