다음을 통해 공유


GameMonitor 클래스

정의

앱이 디바이스의 게임 모니터 사용 권한 상태를 가져와서 사용자에게 게임 모니터링을 사용하도록 설정하라는 메시지를 표시할 수 있습니다.

중요

Windows 10, 버전 1809(10.0; 빌드 17763) 이 API는 Windows의 공용 API 화면에서 제거됩니다.

public ref class GameMonitor sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GameMonitor final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class GameMonitor
Public NotInheritable Class GameMonitor
상속
Object Platform::Object IInspectable GameMonitor
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

다음 예제에서는 아직 사용하도록 설정되지 않은 경우 고객에게 게임 모니터링을 사용하도록 설정하는 데 동의하도록 요청합니다.

void DisplayGameMonitoringConsentUI() 
{ 
    auto gameMonitor = Windows::Gaming::UI::GameMonitor::GetDefault(); 

    if (gameMonitor != nullptr) 
    { 
        create_task(gameMonitor->RequestPermissionAsync())
            .then([this] (GameMonitoringPermission permissionState) 
            { 
                if (permissionState == GameMonitoringPermission::Allowed) 
                { 
                    // Continue with gaming experience. 
                } 
                else if (permissionState == GameMonitoringPermission::DeniedByUser
                    || permissionState == GameMonitoringPermission::DeniedBySystem) 
                { 
                    // Game has attempted mitigation. The game will likely exit. 
                }
            }); 
    } 
    else 
    { 
        // This is game-dependent - some games may proceed, others 
        // may require game monitoring for some scenarios, etc. 
    } 
} 

설명

이 클래스는 PC 게임에서 부정 행위를 방지하는 데 도움이 되는 Windows 10 시스템인 TruePlay를 사용합니다. Windows 10, 버전 1809(10.0; 빌드 17763)부터 TruePlay가 Windows에서 제거되었습니다. TruePlay에 등록한 게임은 일반적인 공격의 클래스를 완화하는 보호된 프로세스에서 실행됩니다. UWP용 TruePlay API는 Windows 10 PC에서 게임과 게임 모니터링 시스템 간의 제한된 상호 작용을 허용합니다.

gamemonitor.h의 네이티브 API와 함께 이러한 WinRT API<를 사용하여 게임 모니터링 시스템을 사용할 수 있습니다.> TruePlay에 대한 설명서는 더 이상 게시되지 않습니다.

메서드

GetDefault()

GameMonitor 클래스의 instance 가져옵니다.

중요

Windows 10, 버전 1809(10.0; 빌드 17763) 이 API는 Windows의 공용 API 화면에서 제거됩니다.

RequestPermissionAsync()

디바이스의 게임 모니터링 권한 상태를 가져옵니다.

중요

Windows 10, 버전 1809(10.0; 빌드 17763) 이 API는 Windows의 공용 API 화면에서 제거됩니다.

적용 대상

추가 정보