Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions WindowsAppRuntime.sln
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StoragePickers", "dev\Inter
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StoragePickersTests", "test\StoragePickersTests\StoragePickersTests.vcxproj", "{85C86306-46D1-4563-8303-0A79DF923586}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GraphicsCapture", "GraphicsCapture", "{D4A5B891-C623-4E8F-B3D7-2A1F0E9C6847}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GraphicsCapture", "dev\Interop\GraphicsCapture\GraphicsCapture.vcxitems", "{6A3E8D92-F5B4-4C8E-B2D7-1A9F0E3C5D71}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GraphicsCaptureTests", "test\GraphicsCaptureTests\GraphicsCaptureTests.vcxproj", "{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.Graphics.Capture.Projection", "dev\Projections\CS\Microsoft.Windows.Graphics.Capture.Projection\Microsoft.Windows.Graphics.Capture.Projection.csproj", "{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Decimal", "Decimal", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Decimal", "Decimal", "{5012149E-F09F-4F18-A03C-FFE597203821}"
Expand Down Expand Up @@ -2457,6 +2465,38 @@ Global
{85C86306-46D1-4563-8303-0A79DF923586}.Release|x64.Build.0 = Release|x64
{85C86306-46D1-4563-8303-0A79DF923586}.Release|x86.ActiveCfg = Release|Win32
{85C86306-46D1-4563-8303-0A79DF923586}.Release|x86.Build.0 = Release|Win32
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|Any CPU.ActiveCfg = Debug|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|Any CPU.Build.0 = Debug|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|ARM64.ActiveCfg = Debug|ARM64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|ARM64.Build.0 = Debug|ARM64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|x64.ActiveCfg = Debug|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|x64.Build.0 = Debug|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|x86.ActiveCfg = Debug|Win32
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Debug|x86.Build.0 = Debug|Win32
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|Any CPU.ActiveCfg = Release|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|Any CPU.Build.0 = Release|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|ARM64.ActiveCfg = Release|ARM64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|ARM64.Build.0 = Release|ARM64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|x64.ActiveCfg = Release|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|x64.Build.0 = Release|x64
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|x86.ActiveCfg = Release|Win32
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B}.Release|x86.Build.0 = Release|Win32
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|Any CPU.ActiveCfg = Debug|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|Any CPU.Build.0 = Debug|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|ARM64.ActiveCfg = Debug|arm64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|ARM64.Build.0 = Debug|arm64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|x64.ActiveCfg = Debug|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|x64.Build.0 = Debug|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|x86.ActiveCfg = Debug|x86
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Debug|x86.Build.0 = Debug|x86
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|Any CPU.ActiveCfg = Release|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|Any CPU.Build.0 = Release|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|ARM64.ActiveCfg = Release|arm64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|ARM64.Build.0 = Release|arm64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|x64.ActiveCfg = Release|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|x64.Build.0 = Release|x64
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|x86.ActiveCfg = Release|x86
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B}.Release|x86.Build.0 = Release|x86
{8EBA8758-19D5-AE31-FD9C-86BBA3BFF6CA}.Debug|Any CPU.ActiveCfg = Debug|x64
{8EBA8758-19D5-AE31-FD9C-86BBA3BFF6CA}.Debug|Any CPU.Build.0 = Debug|x64
{8EBA8758-19D5-AE31-FD9C-86BBA3BFF6CA}.Debug|ARM64.ActiveCfg = Debug|arm64
Expand Down Expand Up @@ -2873,6 +2913,10 @@ Global
{8E01AA4F-A16A-4E3F-A59F-6D49422B4410} = {716C26A0-E6B0-4981-8412-D14A4D410531}
{A39E7B2F-5F67-47DD-8443-531D095CA7F3} = {06AA7FD7-36BE-41AC-9008-56919D1612C6}
{85C86306-46D1-4563-8303-0A79DF923586} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
{D4A5B891-C623-4E8F-B3D7-2A1F0E9C6847} = {3B706C5C-55E0-4B76-BF59-89E20FE46795}
{6A3E8D92-F5B4-4C8E-B2D7-1A9F0E3C5D71} = {D4A5B891-C623-4E8F-B3D7-2A1F0E9C6847}
{2F8B4A1C-9D3E-4F7A-B5E6-0C1D2E3F4A5B} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
{E3F7B8A9-D5C4-4F6E-A1B2-0D9C8E7F6A5B} = {716C26A0-E6B0-4981-8412-D14A4D410531}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
{5012149E-F09F-4F18-A03C-FFE597203821} = {448ED2E5-0B37-4D97-9E6B-8C10A507976A}
{8EBA8758-19D5-AE31-FD9C-86BBA3BFF6CA} = {716C26A0-E6B0-4981-8412-D14A4D410531}
Expand Down Expand Up @@ -2920,6 +2964,7 @@ Global
test\inc\inc.vcxitems*{8e52d7ea-a200-4a6b-ba74-8efb49468caf}*SharedItemsImports = 4
dev\Interop\CameraCaptureUI\CameraCaptureUI\CameraCaptureUI.vcxitems*{95409d1e-843f-4316-8d8e-471b3e203f94}*SharedItemsImports = 9
dev\Interop\StoragePickers\StoragePickers.vcxitems*{a39e7b2f-5f67-47dd-8443-531d095ca7f3}*SharedItemsImports = 9
dev\Interop\GraphicsCapture\GraphicsCapture.vcxitems*{6a3e8d92-f5b4-4c8e-b2d7-1a9f0e3c5d71}*SharedItemsImports = 9
dev\AppNotifications\AppNotifications.vcxitems*{b4824897-88e0-4927-8fb9-e60106f01ed9}*SharedItemsImports = 9
test\inc\inc.vcxitems*{b567fe2e-3a03-48d0-b2b5-760cdec35891}*SharedItemsImports = 9
dev\ApplicationData\ApplicationData.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
Expand Down
6 changes: 6 additions & 0 deletions build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@
<Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(_FoundationRuntimesFrameworkFolder)\Microsoft.WindowsAppRuntime.dll</Implementation>
<IsWinMDFile>true</IsWinMDFile>
</Reference>
<Reference Include="Microsoft.Windows.Graphics.Capture.winmd"
Condition="Exists('$(_FoundationMetadataFolder)\Microsoft.Windows.Graphics.Capture.winmd')">
<HintPath>$(_FoundationMetadataFolder)\Microsoft.Windows.Graphics.Capture.winmd</HintPath>
<Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(_FoundationRuntimesFrameworkFolder)\Microsoft.WindowsAppRuntime.dll</Implementation>
<IsWinMDFile>true</IsWinMDFile>
</Reference>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions dev/Interop/GraphicsCapture/GraphicsCapture.vcxitems
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<ItemsProjectGuid>{6a3e8d92-f5b4-4c8e-b2d7-1a9f0e3c5d71}</ItemsProjectGuid>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="SourceItemsFromImports" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)GraphicsCaptureItem.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)GraphicsCaptureItem.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)Microsoft.Windows.Graphics.Capture.idl" />
</ItemGroup>
</Project>
47 changes: 47 additions & 0 deletions dev/Interop/GraphicsCapture/GraphicsCaptureItem.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.

#include "pch.h"
#include "GraphicsCaptureItem.h"
#include "Microsoft.Windows.Graphics.Capture.GraphicsCaptureItem.g.cpp"
#include <winrt/Windows.Graphics.Capture.h>
#include <windows.graphics.capture.interop.h>

namespace winrt::Microsoft::Windows::Graphics::Capture::implementation
{
winrt::Windows::Graphics::Capture::GraphicsCaptureItem GraphicsCaptureItem::TryCreateFromWindowId(
winrt::Microsoft::UI::WindowId const& windowId)
{
auto hwnd{ reinterpret_cast<HWND>(windowId.Value) };
if (!hwnd)
{
return nullptr;
}

auto factory{ winrt::get_activation_factory<winrt::Windows::Graphics::Capture::GraphicsCaptureItem, IGraphicsCaptureItemInterop>() };
winrt::Windows::Graphics::Capture::GraphicsCaptureItem item{ nullptr };
if (FAILED(factory->CreateForWindow(hwnd, winrt::guid_of<winrt::Windows::Graphics::Capture::GraphicsCaptureItem>(), winrt::put_abi(item))))
{
return nullptr;
}
return item;
}

winrt::Windows::Graphics::Capture::GraphicsCaptureItem GraphicsCaptureItem::TryCreateFromDisplayId(
winrt::Microsoft::UI::DisplayId const& displayId)
{
auto hmonitor{ reinterpret_cast<HMONITOR>(displayId.Value) };
if (!hmonitor)
{
return nullptr;
}

auto factory{ winrt::get_activation_factory<winrt::Windows::Graphics::Capture::GraphicsCaptureItem, IGraphicsCaptureItemInterop>() };
winrt::Windows::Graphics::Capture::GraphicsCaptureItem item{ nullptr };
if (FAILED(factory->CreateForMonitor(hmonitor, winrt::guid_of<winrt::Windows::Graphics::Capture::GraphicsCaptureItem>(), winrt::put_abi(item))))
{
return nullptr;
}
return item;
}
}
23 changes: 23 additions & 0 deletions dev/Interop/GraphicsCapture/GraphicsCaptureItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.

#pragma once

#include "Microsoft.Windows.Graphics.Capture.GraphicsCaptureItem.g.h"

namespace winrt::Microsoft::Windows::Graphics::Capture::implementation
{
struct GraphicsCaptureItem
{
GraphicsCaptureItem() = default;

static winrt::Windows::Graphics::Capture::GraphicsCaptureItem TryCreateFromWindowId(winrt::Microsoft::UI::WindowId const& windowId);
static winrt::Windows::Graphics::Capture::GraphicsCaptureItem TryCreateFromDisplayId(winrt::Microsoft::UI::DisplayId const& displayId);
};
}
namespace winrt::Microsoft::Windows::Graphics::Capture::factory_implementation
{
struct GraphicsCaptureItem : GraphicsCaptureItemT<GraphicsCaptureItem, implementation::GraphicsCaptureItem>
{
};
}
24 changes: 24 additions & 0 deletions dev/Interop/GraphicsCapture/Microsoft.Windows.Graphics.Capture.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.

namespace Microsoft.Windows.Graphics.Capture
{
[contractversion(1)]
apicontract GraphicsCaptureContract {};

/// Provides factory methods for creating Windows.Graphics.Capture.GraphicsCaptureItem objects
/// using WinAppSDK interop types, bridging the gap between Microsoft.UI.WindowId /
/// Microsoft.UI.DisplayId and the Windows.UI.WindowId / Windows.UI.DisplayId types
/// expected by the Windows.Graphics.Capture APIs.
[contract(GraphicsCaptureContract, 1)]
static runtimeclass GraphicsCaptureItem
{
/// Creates a GraphicsCaptureItem for the window identified by the given WindowId.
/// Returns null if the WindowId is invalid or the window cannot be captured.
static Windows.Graphics.Capture.GraphicsCaptureItem TryCreateFromWindowId(Microsoft.UI.WindowId windowId);

/// Creates a GraphicsCaptureItem for the display identified by the given DisplayId.
/// Returns null if the DisplayId is invalid or the display cannot be captured.
static Windows.Graphics.Capture.GraphicsCaptureItem TryCreateFromDisplayId(Microsoft.UI.DisplayId displayId);
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<Platforms>x64;x86;arm64</Platforms>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<!-- Suppress CS8305: Feature is for evaluation purposes only and is subject to change or removal in future updates. -->
<PropertyGroup>
<NoWarn>8305</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage" />
<PackageReference Include="Microsoft.SourceLink.Common">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
</ItemGroup>

<PropertyGroup>
<CSWinRTIncludes>Microsoft.Windows.Graphics.Capture</CSWinRTIncludes>
<CSWinRTWindowsMetadata>10.0.17763.0</CSWinRTWindowsMetadata>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>

<!-- Configure the release build binary to be as required by internal API scanning tools. -->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<CsWinRTInputs Include="$(OutDir)/**/*.winmd" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(RepoRoot)\build\VersionInfo\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Windows.Graphics.Capture">
<HintPath>$(OutDir)..\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.Graphics.Capture.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
</Reference>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<Import Project="..\Notifications\BaseNotifications\BaseNotifications.vcxitems" Label="BaseNotifications" />
<Import Project="..\RuntimeCompatibilityOptions\RuntimeCompatibilityOptions.vcxitems" Label="Shared" />
<Import Project="..\Interop\StoragePickers\StoragePickers.vcxitems" />
<Import Project="..\Interop\GraphicsCapture\GraphicsCapture.vcxitems" />
<Import Project="..\Decimal\Decimal.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down
1 change: 1 addition & 0 deletions dev/WindowsAppRuntime_DLL/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <winrt/Windows.Storage.h>
#include <winrt/Windows.Storage.Streams.h>
#include <winrt/Windows.System.h>
#include <winrt/Windows.Graphics.Capture.h>

#include <MsixDynamicDependency.h>

Expand Down
75 changes: 75 additions & 0 deletions test/GraphicsCaptureTests/APITests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.

#include "pch.h"
#include <winrt\Microsoft.Windows.Graphics.Capture.h>
#include <winrt\Windows.Graphics.Capture.h>

using namespace WEX::Common;
using namespace WEX::Logging;
using namespace WEX::TestExecution;

namespace TB = ::Test::Bootstrap;
namespace TP = ::Test::Packages;

namespace GraphicsCaptureTests
{
class APITests
{
public:
BEGIN_TEST_CLASS(APITests)
TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA")
TEST_CLASS_PROPERTY(L"RunFixtureAs:Class", L"RestrictedUser")
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
TEST_CLASS_PROPERTY(L"UAP:AppxManifest", L"GraphicsCapture-AppxManifest.xml")
END_TEST_CLASS()

TEST_CLASS_SETUP(ClassInit)
{
::Test::Bootstrap::SetupPackages();
return true;
}

TEST_CLASS_CLEANUP(ClassUninit)
{
::Test::Bootstrap::CleanupPackages();
return true;
}

TEST_METHOD_SETUP(MethodInit)
{
VERIFY_IS_TRUE(TP::IsPackageRegistered_WindowsAppRuntimeFramework());
return true;
}

TEST_METHOD_CLEANUP(MethodUninit)
{
VERIFY_IS_TRUE(TP::IsPackageRegistered_WindowsAppRuntimeFramework());
return true;
}

TEST_METHOD(TryCreateFromWindowId_NullWindowId_ReturnsNull)
{
// Arrange: use an invalid (null) WindowId
winrt::Microsoft::UI::WindowId nullWindowId{ 0 };

// Act
auto item{ winrt::Microsoft::Windows::Graphics::Capture::GraphicsCaptureItem::TryCreateFromWindowId(nullWindowId) };

// Assert: TryCreate should return null for an invalid WindowId
VERIFY_IS_NULL(item);
}

TEST_METHOD(TryCreateFromDisplayId_NullDisplayId_ReturnsNull)
{
// Arrange: use an invalid (null) DisplayId
winrt::Microsoft::UI::DisplayId nullDisplayId{ 0 };

// Act
auto item{ winrt::Microsoft::Windows::Graphics::Capture::GraphicsCaptureItem::TryCreateFromDisplayId(nullDisplayId) };

// Assert: TryCreate should return null for an invalid DisplayId
VERIFY_IS_NULL(item);
}
};
}
Loading