diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln index d36b1388a6..0f3084b9f9 100644 --- a/WindowsAppRuntime.sln +++ b/WindowsAppRuntime.sln @@ -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}" @@ -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 @@ -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} @@ -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 diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props b/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props index 6420ff56d8..8ff45c98de 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props +++ b/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props @@ -97,6 +97,12 @@ $(_FoundationRuntimesFrameworkFolder)\Microsoft.WindowsAppRuntime.dll true + + $(_FoundationMetadataFolder)\Microsoft.Windows.Graphics.Capture.winmd + $(_FoundationRuntimesFrameworkFolder)\Microsoft.WindowsAppRuntime.dll + true + diff --git a/dev/Interop/GraphicsCapture/GraphicsCapture.vcxitems b/dev/Interop/GraphicsCapture/GraphicsCapture.vcxitems new file mode 100644 index 0000000000..bb5e048ed4 --- /dev/null +++ b/dev/Interop/GraphicsCapture/GraphicsCapture.vcxitems @@ -0,0 +1,25 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {6a3e8d92-f5b4-4c8e-b2d7-1a9f0e3c5d71} + + + + %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + diff --git a/dev/Interop/GraphicsCapture/GraphicsCaptureItem.cpp b/dev/Interop/GraphicsCapture/GraphicsCaptureItem.cpp new file mode 100644 index 0000000000..72f49612b6 --- /dev/null +++ b/dev/Interop/GraphicsCapture/GraphicsCaptureItem.cpp @@ -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 +#include + +namespace winrt::Microsoft::Windows::Graphics::Capture::implementation +{ + winrt::Windows::Graphics::Capture::GraphicsCaptureItem GraphicsCaptureItem::TryCreateFromWindowId( + winrt::Microsoft::UI::WindowId const& windowId) + { + auto hwnd{ reinterpret_cast(windowId.Value) }; + if (!hwnd) + { + return nullptr; + } + + auto factory{ winrt::get_activation_factory() }; + winrt::Windows::Graphics::Capture::GraphicsCaptureItem item{ nullptr }; + if (FAILED(factory->CreateForWindow(hwnd, winrt::guid_of(), 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(displayId.Value) }; + if (!hmonitor) + { + return nullptr; + } + + auto factory{ winrt::get_activation_factory() }; + winrt::Windows::Graphics::Capture::GraphicsCaptureItem item{ nullptr }; + if (FAILED(factory->CreateForMonitor(hmonitor, winrt::guid_of(), winrt::put_abi(item)))) + { + return nullptr; + } + return item; + } +} diff --git a/dev/Interop/GraphicsCapture/GraphicsCaptureItem.h b/dev/Interop/GraphicsCapture/GraphicsCaptureItem.h new file mode 100644 index 0000000000..8dda59e312 --- /dev/null +++ b/dev/Interop/GraphicsCapture/GraphicsCaptureItem.h @@ -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 + { + }; +} diff --git a/dev/Interop/GraphicsCapture/Microsoft.Windows.Graphics.Capture.idl b/dev/Interop/GraphicsCapture/Microsoft.Windows.Graphics.Capture.idl new file mode 100644 index 0000000000..66e5bb577c --- /dev/null +++ b/dev/Interop/GraphicsCapture/Microsoft.Windows.Graphics.Capture.idl @@ -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); + }; +} diff --git a/dev/Projections/CS/Microsoft.Windows.Graphics.Capture.Projection/Microsoft.Windows.Graphics.Capture.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.Graphics.Capture.Projection/Microsoft.Windows.Graphics.Capture.Projection.csproj new file mode 100644 index 0000000000..78b4590d0e --- /dev/null +++ b/dev/Projections/CS/Microsoft.Windows.Graphics.Capture.Projection/Microsoft.Windows.Graphics.Capture.Projection.csproj @@ -0,0 +1,59 @@ + + + net6.0-windows10.0.17763.0 + 10.0.17763.0 + x64;x86;arm64 + AnyCPU + false + + + + true + true + + + + + 8305 + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + Microsoft.Windows.Graphics.Capture + 10.0.17763.0 + false + + + + + pdbonly + true + + + + + + + + + + + + + $(OutDir)..\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.Graphics.Capture.winmd + true + + + diff --git a/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj b/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj index 444615c099..50a902468e 100644 --- a/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj +++ b/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj @@ -107,6 +107,7 @@ + diff --git a/dev/WindowsAppRuntime_DLL/pch.h b/dev/WindowsAppRuntime_DLL/pch.h index 8dcd8e87ea..e3dbc18421 100644 --- a/dev/WindowsAppRuntime_DLL/pch.h +++ b/dev/WindowsAppRuntime_DLL/pch.h @@ -50,6 +50,7 @@ #include #include #include +#include #include diff --git a/test/GraphicsCaptureTests/APITests.cpp b/test/GraphicsCaptureTests/APITests.cpp new file mode 100644 index 0000000000..b22b2a5502 --- /dev/null +++ b/test/GraphicsCaptureTests/APITests.cpp @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" +#include +#include + +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); + } + }; +} diff --git a/test/GraphicsCaptureTests/GraphicsCapture-AppxManifest.xml b/test/GraphicsCaptureTests/GraphicsCapture-AppxManifest.xml new file mode 100644 index 0000000000..b330197f13 --- /dev/null +++ b/test/GraphicsCaptureTests/GraphicsCapture-AppxManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + WindowsAppRuntime.Test.GraphicsCapture for tests + Windows APP SDK + taef.png + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/GraphicsCaptureTests/GraphicsCapture.testdef b/test/GraphicsCaptureTests/GraphicsCapture.testdef new file mode 100644 index 0000000000..d2b3ef69ff --- /dev/null +++ b/test/GraphicsCaptureTests/GraphicsCapture.testdef @@ -0,0 +1,11 @@ +{ + "Tests": [ + { + "Description": "GraphicsCapture API", + "Filename": "GraphicsCaptureTests.dll", + "Parameters": "", + "Architectures": ["x64", "x86", "arm64"], + "Status": "Enabled" + } + ] +} diff --git a/test/GraphicsCaptureTests/GraphicsCaptureTests.vcxproj b/test/GraphicsCaptureTests/GraphicsCaptureTests.vcxproj new file mode 100644 index 0000000000..dc59096c12 --- /dev/null +++ b/test/GraphicsCaptureTests/GraphicsCaptureTests.vcxproj @@ -0,0 +1,270 @@ + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + + + 17.0 + Win32Proj + {2f8b4a1c-9d3e-4f7a-b5e6-0c1d2e3f4a5b} + GraphicsCaptureTests + 10.0 + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + false + + + DynamicLibrary + false + v143 + Unicode + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;GRAPHICSCAPTURETESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + + + Windows + true + true + true + false + + + + + + + + + Create + Create + Create + Create + Create + Create + + + + + + + + $(OutDir)\..\WindowsAppRuntime_DLL\Microsoft.Windows.Graphics.Capture.winmd + true + + + + + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + diff --git a/test/GraphicsCaptureTests/packages.config b/test/GraphicsCaptureTests/packages.config new file mode 100644 index 0000000000..0ab4bae708 --- /dev/null +++ b/test/GraphicsCaptureTests/packages.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test/GraphicsCaptureTests/pch.cpp b/test/GraphicsCaptureTests/pch.cpp new file mode 100644 index 0000000000..a77728ba07 --- /dev/null +++ b/test/GraphicsCaptureTests/pch.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/test/GraphicsCaptureTests/pch.h b/test/GraphicsCaptureTests/pch.h new file mode 100644 index 0000000000..e453e02391 --- /dev/null +++ b/test/GraphicsCaptureTests/pch.h @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here + +#ifndef INLINE_TEST_METHOD_MARKUP +#define INLINE_TEST_METHOD_MARKUP +#endif + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include + +#include "WexTestClass.h" +#include +#include +#include +#include + +#include +#endif //PCH_H