Skip to content

Commit

Permalink
Windows 10 Version 1903 - August 2020 Samples Update
Browse files Browse the repository at this point in the history
* DisablingScreenCapture; Add AppCapture scenario, archive C++/CX.
* DisplayOrientation: Port to C++/WinRT, clarify OS treatment of preferences.
* HolographicMRCapture: Update for HoloLens 2. Demonstrate VideoConferencing profile and new video and audio properties.
* LinguisticServices: Fix build of runtime component, update README.
* TouchKeyboard: Add emoji keyboard scenario.
* WiFiDirect: Fix reverse-sense test in PIN acceptance.
* Various C++/WinRT samples: Use `IBuffer.data()` instead of `IBufferByteAccess`; add missing `get_strong()` calls.
* Fix `DependentUpon` in C++/WinRT sample scenario templates.
* Add PR and issue templates.
* New C++/WinRT samples: BasicFaceDetection, BasicFaceTracking, HttpClient, IoT-GPIO, IoT-I2C, IoT-SPI, TextSegmentation,  TouchKeyboard, UserCertificateStore, UserConsentVerifier, XmlLite.
* Archived: BasicFaceDetection (C++/CX, VB), BasicFaceTracking (C++/CX, VB), HttpClient (C++/CX), VoIP, TouchKeyboard (C++/CX), UserCertificateStore (C++/CX).
  • Loading branch information
oldnewthing committed Aug 20, 2020
1 parent a58c5d9 commit 622b285
Show file tree
Hide file tree
Showing 537 changed files with 17,423 additions and 1,889 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
<td><a href="Samples/SimpleCommunication">Real-time communication</a></td>
<td><a href="Samples/SmsSendAndReceive">SMS send and receive</a></td>
</tr>
<tr>
<td><a href="Samples/VoIP">Voice over IP (VoIP)</a></td>
</tr>
</table>

### Contacts and calendar
Expand Down
6 changes: 3 additions & 3 deletions Samples/3DPrinting/cppwinrt/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Identity Name="Microsoft.SDKSamples.3DPrinting.CPPWINRT" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0"/>
<mp:PhoneIdentity PhoneProductId="33a5dc7a-1df4-459c-94de-1623f37aaedf" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>_3DPrinting C++/WinRT Sample</DisplayName>
<DisplayName>3DPrinting C++/WinRT Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\storelogo-sdk.png</Logo>
</Properties>
Expand All @@ -21,10 +21,10 @@
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="App">
<uap:VisualElements
DisplayName="_3DPrinting C++/WinRT Sample"
DisplayName="3DPrinting C++/WinRT Sample"
Square150x150Logo="Assets\squareTile-sdk.png"
Square44x44Logo="Assets\smallTile-sdk.png"
Description="_3DPrinting C++/WinRT Sample"
Description="3DPrinting C++/WinRT Sample"
BackgroundColor="#00B2F0"
>
<uap:SplashScreen Image="Assets\splash-sdk.png"/>
Expand Down
5 changes: 1 addition & 4 deletions Samples/3DPrinting/cppwinrt/Scenario1_Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ namespace
#pragma region Buffer, stream, and string helpers
void SetBufferBytes(IBuffer const& buffer, void const* data, uint32_t size)
{
byte* bytes;
auto byteAccess = buffer.as<::Windows::Storage::Streams::IBufferByteAccess>();
winrt::check_hresult(byteAccess->Buffer(&bytes));
memcpy_s(bytes, buffer.Length(), data, size);
memcpy_s(buffer.data(), buffer.Length(), data, size);
}

IAsyncOperation<hstring> StreamToStringAsync(IRandomAccessStream stream)
Expand Down
2 changes: 2 additions & 0 deletions Samples/3DPrinting/cppwinrt/Scenario2_Launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ namespace winrt::SDKTemplate::implementation

fire_and_forget Scenario2_Launch::CheckIf3DBuilderIsInstalled_Click(IInspectable const&, RoutedEventArgs const&)
{
auto lifetime = get_strong();

IVectorView<AppInfo> handlers = co_await Launcher::FindFileHandlersAsync(L".3mf");
auto found = std::find_if(begin(handlers), end(handlers),
[](auto&& info) { return info.PackageFamilyName() == PackageFamilyName3DBuilder; });
Expand Down
1 change: 0 additions & 1 deletion Samples/3DPrinting/cppwinrt/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@
#include "winrt/Windows.UI.Xaml.Markup.h"
#include "winrt/Windows.UI.Xaml.Media.h"
#include "winrt/Windows.UI.Xaml.Navigation.h"
#include <robuffer.h>
5 changes: 3 additions & 2 deletions Samples/BasicFaceDetection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ page_type: sample
languages:
- csharp
- cpp
- cppcx
- vb
- cppwinrt
products:
- windows
- windows-uwp
Expand Down Expand Up @@ -56,6 +55,8 @@ The FaceDetector is intended to operate on a static image or a single frame of v

### Samples

[BasicFaceDetection](/archived/BasicFaceTracking) for C++/CX and VB (archived)

[BasicFaceTracking](/Samples/BasicFaceTracking)

[HolographicFaceTracking](/Samples/HolographicFaceTracking)
Expand Down
43 changes: 43 additions & 0 deletions Samples/BasicFaceDetection/cppwinrt/BasicFaceDetection.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicFaceDetection", "BasicFaceDetection.vcxproj", "{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|ARM.ActiveCfg = Debug|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|ARM.Build.0 = Debug|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|ARM.Deploy.0 = Debug|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x64.ActiveCfg = Debug|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x64.Build.0 = Debug|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x64.Deploy.0 = Debug|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x86.ActiveCfg = Debug|Win32
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x86.Build.0 = Debug|Win32
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Debug|x86.Deploy.0 = Debug|Win32
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|ARM.ActiveCfg = Release|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|ARM.Build.0 = Release|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|ARM.Deploy.0 = Release|ARM
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x64.ActiveCfg = Release|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x64.Build.0 = Release|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x64.Deploy.0 = Release|x64
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x86.ActiveCfg = Release|Win32
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x86.Build.0 = Release|Win32
{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B13F3350-3448-4B3D-B219-BDE8EF55A27E}
EndGlobalSection
EndGlobal
188 changes: 188 additions & 0 deletions Samples/BasicFaceDetection/cppwinrt/BasicFaceDetection.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup>
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir>
</PropertyGroup>
<PropertyGroup Label="Globals">
<MinimalCoreWin>true</MinimalCoreWin>
<ProjectGuid>{03FE0C00-0A0D-58F2-AAB1-AA9014D5DF4D}</ProjectGuid>
<ProjectName>BasicFaceDetection</ProjectName>
<RootNamespace>SDKTemplate</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>$(WindowsTargetPlatformVersion)</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);$(SharedContentDir)\cppwinrt</IncludePath>
<CppWinRTOptimized>true</CppWinRTOptimized>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<WarningLevel>Level4</WarningLevel>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="$(SharedContentDir)\cppwinrt\App.h">
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="$(SharedContentDir)\cppwinrt\MainPage.h">
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="SampleConfiguration.h" />
<ClInclude Include="Scenario1_DetectInPhoto.h">
<DependentUpon>..\shared\Scenario1_DetectInPhoto.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="Scenario2_DetectInWebcam.h">
<DependentUpon>..\shared\Scenario2_DetectInWebcam.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml">
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="$(SharedContentDir)\xaml\MainPage.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="..\shared\Scenario1_DetectInPhoto.xaml" />
<Page Include="..\shared\Scenario2_DetectInWebcam.xaml" />
<Page Include="$(SharedContentDir)\xaml\Styles.xaml">
<Link>Styles\Styles.xaml</Link>
</Page>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SharedContentDir)\cppwinrt\App.cpp">
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="$(SharedContentDir)\cppwinrt\MainPage.cpp">
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="SampleConfiguration.cpp">
<DependentUpon>SampleConfiguration.h</DependentUpon>
</ClCompile>
<ClCompile Include="Scenario1_DetectInPhoto.cpp">
<DependentUpon>..\shared\Scenario1_DetectInPhoto.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="Scenario2_DetectInWebcam.cpp">
<DependentUpon>..\shared\Scenario2_DetectInWebcam.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
<DependentUpon>pch.h</DependentUpon>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp">
<DependentUpon>Project.idl</DependentUpon>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="$(SharedContentDir)\cppwinrt\MainPage.idl">
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
</Midl>
<Midl Include="Project.idl" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Image Include="$(SharedContentDir)\media\microsoft-sdk.png">
<Link>Assets\microsoft-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Link>Assets\smallTile-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\splash-sdk.png">
<Link>Assets\splash-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Link>Assets\squareTile-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Link>Assets\storeLogo-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\tile-sdk.png">
<Link>Assets\tile-sdk.png</Link>
</Image>
<Image Include="$(SharedContentDir)\media\windows-sdk.png">
<Link>Assets\windows-sdk.png</Link>
</Image>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Assets">
<UniqueIdentifier>4416d50a-7676-4d0a-9b2c-91ff70c6047f</UniqueIdentifier>
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Page Include="$(SharedContentDir)\xaml\MainPage.xaml" />
<Page Include="$(SharedContentDir)\xaml\Styles.xaml" />
<Page Include="..\shared\Scenario1_DetectInPhoto.xaml" />
<Page Include="..\shared\Scenario2_DetectInWebcam.xaml" />
</ItemGroup>
<ItemGroup>
<Midl Include="Project.idl" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="Scenario1_ShortName.cpp" />
<ClCompile Include="Scenario2_ShortName.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="SampleConfiguration.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="Scenario1_ShortName.h" />
<ClInclude Include="Scenario2_ShortName.h" />
<ClInclude Include="SampleConfiguration.h" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<Image Include="$(SharedContentDir)\media\microsoft-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\splash-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\tile-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="$(SharedContentDir)\media\windows-sdk.png">
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml" />
</ItemGroup>
</Project>
Loading

0 comments on commit 622b285

Please sign in to comment.