GameMonitor.RequestPermissionAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the game monitoring permission state of the device.
Important
As of Windows 10, version 1809 (10.0; Build 17763), this API is removed from the public API surface of Windows.
public:
virtual IAsyncOperation<GameMonitoringPermission> ^ RequestPermissionAsync() = RequestPermissionAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<GameMonitoringPermission> RequestPermissionAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<GameMonitoringPermission> RequestPermissionAsync();
function requestPermissionAsync()
Public Function RequestPermissionAsync () As IAsyncOperation(Of GameMonitoringPermission)
Returns
The game monitoring permission state of the device.
- Attributes
Remarks
If game monitoring is already enabled, the async result returns GameMonitoringPermission::Allowed.
If game monitoring is disabled by group policy, the async result returns GameMonitoringPermission::DeniedBySystem.
If game monitoring is not enabled, a dialog is displayed asking for consent to enable game monitoring. If the customer accepts, this method returns GameMonitoringPermission::Allowed. If not, it returns GameMonitoringPermission::DeniedByUser.
The app must have the protectedApp and gameMonitor capabilities to call this method. If not, the API returns E_UNEXPECTED.