<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Blog: Rafael Rivera</title>
  <subtitle>Forward engineer by day, reverse engineer by night. Windows Development MVP. Le Cordon Bleu alumnus.</subtitle>
  <link href="https://withinrafael.com/feed.xml" rel="self"/>
  <link href="https://withinrafael.com/"/>
  <updated>2023-11-17T00:00:00Z</updated>
  <id>https://withinrafael.com/</id>
  <author>
    <name>Rafael Rivera</name>
    <email>rafael@withinwindows.com</email>
  </author>
  
  <entry>
    <title>Device Region and Integrated Services Region Policy in Windows</title>
    <link href="https://withinrafael.com/2023/11/17/device-region-and-integrated-services-region-policy-in-windows/"/>
    <updated>2023-11-17T00:00:00Z</updated>
    <id>https://withinrafael.com/2023/11/17/device-region-and-integrated-services-region-policy-in-windows/</id>
    <content type="html">&lt;p&gt;Microsoft is actively rolling out &lt;a href=&quot;https://blogs.windows.com/windows-insider/2023/11/16/previewing-changes-in-windows-to-comply-with-the-digital-markets-act-in-the-european-economic-area/&quot;&gt;an update for Windows 11&lt;/a&gt; to comply with the &lt;a href=&quot;https://en.wikipedia.org/wiki/Digital_Markets_Act&quot;&gt;Digital Markets Act (DMA)&lt;/a&gt; in the European Economic Area (EEA). A crucial part of this implementation involves regional settings. &lt;em&gt;Officially&lt;/em&gt;, Windows will use the region selected during the initial setup to determine if the PC is in the EEA.&lt;/p&gt;
&lt;p&gt;The component responsible for integrated services region policy resides in &lt;code&gt;SystemSettings.DataModel.dll&lt;/code&gt;. This component retrieves the device region through a multi-step process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It first attempts to retrieve the device&#39;s &lt;a href=&quot;https://learn.microsoft.com/windows/win32/intl/table-of-geographical-locations&quot;&gt;geographical location identifier&lt;/a&gt; &lt;code&gt;DeviceRegion&lt;/code&gt; stored in the Registry at &lt;code&gt;HKLM&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Control Panel&lt;/code&gt;. If this attempt fails, it resorts to calling the Win32 API &lt;code&gt;GetUserGeoID&lt;/code&gt; with a geographical location class of &lt;code&gt;GEOCLASS_NATION&lt;/code&gt; and caches the result in the aforementioned location.&lt;/li&gt;
&lt;li&gt;It then resolves the geographical location identifier to a two-letter ISO 3166-1 code or UN M.49 code for the geographic region using the &lt;code&gt;GetGeoInfoW&lt;/code&gt; Win32 API.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The state of the integrated services region policy depends on the evaluation of the policy&#39;s default state (enabled/disabled) and conditional rules (e.g., device region). The system stores these policies on disk in a system directory (&lt;code&gt;&#92;System32&#92;IntegratedServicesRegionPolicySet.json&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Here&#39;s an example of one such policy:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;$comment&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Edge is uninstallable.&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;guid&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{1bca278a-5d11-4acf-ad2f-f9ab6d7f93a6}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;defaultState&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;disabled&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;conditions&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;region&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token property&quot;&gt;&quot;enabled&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;AT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;BE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;BG&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;CH&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;CY&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;CZ&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;DE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;DK&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;EE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;ES&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;FI&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;FR&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;GF&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;GP&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;GR&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;HR&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;HU&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;IE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;IS&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;IT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;LI&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;LT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;LU&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;LV&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;MT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;MQ&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;NL&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;NO&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;PL&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;PT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;RE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;RO&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;SE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;SI&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;SK&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;YT&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can reconfigure a PC to appear as if it&#39;s in the EEA region, in the context of integrated services region policy. This can be done by adjusting the value mentioned earlier in the Registry. Here&#39;s an example of a Registry Entries file changing the cached geographical location identifier to 94 (Germany):&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Control Panel&#92;DeviceRegion]&lt;br /&gt;&quot;DeviceRegion&quot;=dword:0000005e&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also replace the component responsible for integrated services region policy with your own. I&#39;ve provided a &lt;a href=&quot;https://github.com/riverar/regionpolicyevaluator-skeleton&quot;&gt;skeleton project on GitHub&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Windows Insider Program channel programming update</title>
    <link href="https://withinrafael.com/2023/03/06/windows-insider-program-channel-programming-update/"/>
    <updated>2023-03-06T00:00:00Z</updated>
    <id>https://withinrafael.com/2023/03/06/windows-insider-program-channel-programming-update/</id>
    <content type="html">&lt;p&gt;Microsoft &lt;a href=&quot;https://blogs.windows.com/windows-insider/2023/03/06/whats-coming-for-the-windows-insider-program-in-2023/&quot;&gt;announced changes to its Windows Insider channel line-up today&lt;/a&gt;. That is, the program added a Canary channel to deliver Windows builds for folks to &amp;quot;preview platform changes that require longer-lead time before getting released to customers&amp;quot;. And the Dev channel, which previously held that responsibility, has been &amp;quot;rebooted&amp;quot; to instead deliver &amp;quot;new long-lead features and experiences in development&amp;quot;...&lt;/p&gt;
&lt;p&gt;Confused and unimpressed with the blog post, I asked some Microsoft folks to clarify the situation. Here&#39;s the outcome of those discussions--a summary of what to expect, per channel:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Canary channel - This is where deep or high-risk Windows changes may be made (e.g. kernel changes). These changes need a lot of iteration and test time and are &lt;strong&gt;not guaranteed to ship in any version of Windows&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dev channel - This is where shallow or lower-risk Windows changes may be made. These changes also need some iteration and test time and are &lt;strong&gt;not guaranteed to ship in any version of Windows&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Beta channel - This is where changes shipping with the next release of Windows are tested.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Release Preview - This is where changes shipping with the next release of Windows are tested very broadly and are scheduled to become generally available very soon.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Generating metadata for use with the windows crate for Rust</title>
    <link href="https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate/"/>
    <updated>2023-01-18T00:00:00Z</updated>
    <id>https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate/</id>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;https://github.com/microsoft/windows-rs&quot;&gt;windows crate for Rust&lt;/a&gt; has reached a sweet spot. It ships with pre-generated bindings for the entire Windows API surface and a code generator that can be used to generate your own bindings and create dependent crates. And if you pair the crate with the &lt;a href=&quot;https://www.nuget.org/packages/Microsoft.Windows.WinmdGenerator&quot;&gt;Windows Metadata Generator&lt;/a&gt;, you can transform all of your favorite C and C++ headers into Rust bindings. In fact, I already generated a few crates, such as the &lt;a href=&quot;https://github.com/microsoft/dia-rs&quot;&gt;Microsoft Debug Interface Access (DIA) SDK&lt;/a&gt;, &lt;a href=&quot;https://github.com/riverar/directstorage-rs&quot;&gt;Microsoft DirectStorage SDK&lt;/a&gt; and the &lt;a href=&quot;https://github.com/microsoft/windows-app-rs&quot;&gt;Microsoft Windows App SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&#39;s walk through using the metadata generator to recreate most of the DIA SDK crate from scratch.&lt;/p&gt;
&lt;h2 id=&quot;scaffolding&quot; tabindex=&quot;-1&quot;&gt;Scaffolding&lt;/h2&gt;
&lt;p&gt;First, create a new crate using a library template (&lt;code&gt;cargo init --lib&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Now, create the &lt;code&gt;.windows&#92;winmd&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;This directory will store &lt;em&gt;metadata&lt;/em&gt;—Common Language Runtime (CLR) assemblies (as defined in ECMA-335) that provide a bunch of information about the Windows APIs. This information is useful to developers looking to generate bindings for different programming languages. (This path is historically where Rust for Windows stored its libraries, metadata, etc. This can be changed.)&lt;/p&gt;
&lt;p&gt;Create a &lt;code&gt;.metadata&lt;/code&gt; folder as well to store the Microsoft Build (MSBuild) project and supporting files needed to generate metadata. (This can also be changed.)&lt;/p&gt;
&lt;pre class=&quot;language-treeview&quot;&gt;&lt;code class=&quot;language-treeview&quot;&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-name dir&quot;&gt;dia-rs&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-h&quot;&gt;|-- &lt;/span&gt;&lt;span class=&quot;token entry-name ext-gitignore&quot;&gt;.gitignore&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-h&quot;&gt;|-- &lt;/span&gt;&lt;span class=&quot;token entry-name inserted ext-metadata/&quot;&gt;.metadata/&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-h&quot;&gt;|-- &lt;/span&gt;&lt;span class=&quot;token entry-name inserted ext-windows/&quot;&gt;.windows/&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-v&quot;&gt;|   &lt;/span&gt;&lt;span class=&quot;token entry-line line-v-last&quot;&gt;`-- &lt;/span&gt;&lt;span class=&quot;token entry-name inserted&quot;&gt;winmd/&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-h&quot;&gt;|-- &lt;/span&gt;&lt;span class=&quot;token entry-name ext-toml&quot;&gt;Cargo.toml&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-v-last&quot;&gt;`-- &lt;/span&gt;&lt;span class=&quot;token entry-name dir&quot;&gt;src&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token treeview-part&quot;&gt;&lt;span class=&quot;token entry-line line-v-gap&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;token entry-line line-v-last&quot;&gt;`-- &lt;/span&gt;&lt;span class=&quot;token entry-name ext-rs&quot;&gt;lib.rs&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;metadata-project&quot; tabindex=&quot;-1&quot;&gt;Metadata project&lt;/h2&gt;
&lt;p&gt;Create &lt;code&gt;.metadata&#92;generate.proj&lt;/code&gt; and populate it with some minimal XML:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the start of a MSBuild project.&lt;/p&gt;
&lt;p&gt;Add the &lt;code&gt;Sdk&lt;/code&gt; attribute to the root node. Set its value to &lt;code&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;/code&gt;. (The version suffix is required as the package is not marked as stable.)&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted language-xml&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the start of a &lt;a href=&quot;https://docs.microsoft.com/dotnet/core/project-sdk/overview?WT.mc_id=WD-MVP-5002756&quot;&gt;Software Development Kit (SDK)-style MSBuild project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Microsoft.Windows.WinmdGenerator&lt;/code&gt; refers to a &lt;a href=&quot;https://docs.microsoft.com/nuget/reference/nuspec?WT.mc_id=WD-MVP-5002756#id&quot;&gt;NuGet package identifier&lt;/a&gt; tied to the Microsoft &lt;a href=&quot;https://www.nuget.org/packages/Microsoft.Windows.WinmdGenerator&quot;&gt;Windows Metadata Generator&lt;/a&gt; SDK. This &lt;a href=&quot;https://docs.microsoft.com/dotnet/core/project-sdk/overview?WT.mc_id=WD-MVP-5002756#project-files&quot;&gt;project SDK&lt;/a&gt; contains a bunch of actions that will execute on what we put into this project file moving forward.&lt;/p&gt;
&lt;p&gt;Next, add a few global properties that the winmd generator needs:&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;PropertyGroup&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Globals&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;../.windows/winmd/Microsoft.Dia.winmd&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;255.255.255.255&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;PropertyGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;OutputWinmd&lt;/code&gt; specifies where the generator will write its output to.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;WinmdVersion&lt;/code&gt; indicates the version number that will be attached to the output.&lt;/p&gt;
&lt;p&gt;Its value is not important for this crate, so it is set to its maximum value to make that clear. (If you want to share metadata externally, you may want to swap this out with a value that is consistent with &lt;a href=&quot;https://semver.org/&quot;&gt;Semantic Versioning&lt;/a&gt;.)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, define a partition to group together all the DIA APIs and their respective sources:&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;PropertyGroup&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Globals&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;../.windows/winmd/Microsoft.Dia.winmd&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;255.255.255.255&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;PropertyGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;...&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Partition&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main.cpp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;@(Headers)&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Microsoft.Dia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Partition&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The partition &lt;code&gt;Include&lt;/code&gt; attribute points to the C/C++ file used as the generator tooling starting point. This file must be syntactically correct. That is, it must effectively &lt;em&gt;compile&lt;/em&gt; without errors.&lt;/p&gt;
&lt;p&gt;The partition contains several elements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;TraverseFiles&lt;/code&gt; points to one or more headers that will be scraped for content.&lt;/p&gt;
&lt;p&gt;These headers should be reachable (directly or otherwise) from the &lt;code&gt;Include&lt;/code&gt; starting point.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;Headers&lt;/code&gt; property used here is not specific to the winmd generator. It is simply a &lt;a href=&quot;https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-properties?view=vs-2022&amp;amp;WT.mc_id=WD-MVP-5002756&quot;&gt;MSBuild property&lt;/a&gt; our future include string and keep the project file tidy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Namespace&lt;/code&gt; assigns a name to the logical grouping of functions and constants pulled out of the inputs provided.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DIA APIs are primarily described in an Interface Definition Language (IDL) file &lt;code&gt;dia2.idl&lt;/code&gt; and an ancillary header &lt;code&gt;cvconst.h&lt;/code&gt;. (The DIA SDK ships with a C/C++ header &lt;code&gt;dia2.h&lt;/code&gt; but it&#39;s outdated.) These files are located at &lt;code&gt;%VSINSTALLDIR%&#92;DIA SDK&#92;idl&lt;/code&gt; and &lt;code&gt;%VSINSTALLDIR%&#92;DIA SDK&#92;include&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Create and add additional MSBuild properties to point to those locations:&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;PropertyGroup&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Globals&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;../.windows/winmd/Microsoft.Dia.winmd&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;255.255.255.255&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(VsInstallDir)&#92;DIA SDK&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;idl&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;include&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;PropertyGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;...&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Partition&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main.cpp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;           &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;@(Headers)&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;           &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Microsoft.Dia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Partition&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then specify the input files using these new properties.&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;PropertyGroup&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Globals&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;../.windows/winmd/Microsoft.Dia.winmd&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;255.255.255.255&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(VsInstallDir)&#92;DIA SDK&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;idl&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;include&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;PropertyGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted language-xml&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;...&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;$(DiaIncRoot)&#92;cvconst.h;...&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Partition&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main.cpp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;@(Headers)&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Microsoft.Dia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Partition&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But wait, you need a way to handle &lt;code&gt;dia2.idl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To compile the IDL, add a reference to one or more IDL files with the &lt;code&gt;Idl&lt;/code&gt; element. The winmd generator will send these files to the IDL compiler and write out headers to the location pointed to by the built-in property &lt;code&gt;CompiledHeadersDir&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Add the DIA include root to the additional includes property so that &lt;a href=&quot;https://learn.microsoft.com/windows/win32/midl/-i&quot;&gt;midl&lt;/a&gt; can find these headers. Then add that &lt;em&gt;auto-generated&lt;/em&gt; &lt;code&gt;dia2.h&lt;/code&gt; header as an input:&lt;/p&gt;
&lt;pre class=&quot;language-diff-xml&quot;&gt;&lt;code class=&quot;language-diff-xml&quot;&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Project&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Sdk&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Microsoft.Windows.WinmdGenerator/0.59.13-preview&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;PropertyGroup&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Globals&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;../.windows/winmd/Microsoft.Dia.winmd&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;OutputWinmd&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;255.255.255.255&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;WinmdVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(VsInstallDir)&#92;DIA SDK&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaSdkRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;idl&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIdlRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(DiaSdkRoot)&#92;include&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;DiaIncRoot&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;AdditionalIncludes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;$(CompiledHeadersDir);$(DiaIncRoot)&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;AdditionalIncludes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;PropertyGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Idls&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;$(DiaIdlRoot)&#92;dia2.idl&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted language-xml&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;$(DiaIncRoot)&#92;cvconst.h;...&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-xml&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Headers&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;$(CompiledHeadersDir)&#92;dia2.h;$(DiaIncRoot)&#92;cvconst.h&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged language-xml&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Partition&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Include&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;main.cpp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;@(Headers)&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;TraverseFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Microsoft.Dia&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Namespace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Partition&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;ItemGroup&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;Project&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And, create the partition&#39;s &lt;code&gt;main.cpp&lt;/code&gt; and include the header files to be associated with the partition. Also add all dependent headers to ensure compilation succeeds:&lt;/p&gt;
&lt;pre class=&quot;language-cpp&quot;&gt;&lt;code class=&quot;language-cpp&quot;&gt;&lt;span class=&quot;token macro property&quot;&gt;&lt;span class=&quot;token directive-hash&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;token directive keyword&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&amp;lt;windows.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token macro property&quot;&gt;&lt;span class=&quot;token directive-hash&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;token directive keyword&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&amp;lt;dia2.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token macro property&quot;&gt;&lt;span class=&quot;token directive-hash&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;token directive keyword&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&amp;lt;cvconst.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We&#39;re almost done, but we need to address a bug we&#39;ll hit later. DIA (cvconst.h) has an unscoped &lt;code&gt;SymTagEnum&lt;/code&gt; enum declaration containing a symbolic constant with the same name. This is not possible to model in Rust and will break our crate. So add a winmd generator response file named &lt;code&gt;emitter.rsp&lt;/code&gt; and exclude this annoyance for now:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;--exclude&lt;br /&gt;SymTagEnum::SymTagEnum&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, in a Windows Terminal, issue a &lt;code&gt;dotnet build&lt;/code&gt; command. You should see something similar to the below. (You may need to launch a Visual Studio Command Prompt &lt;a href=&quot;https://github.com/microsoft/win32metadata/issues/1429&quot;&gt;due to a bug&lt;/a&gt; at the moment.)&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Determining projects to restore...&lt;br /&gt;...&lt;br /&gt;Compiling idl files...&lt;br /&gt;Scraping headers for crossarch...&lt;br /&gt;Microsoft.Dia:common - Scanning to C:&#92;Sources&#92;dia-rs&#92;.metadata&#92;obj&#92;generated&#92;common&#92;Microsoft.Dia.cs...&lt;br /&gt;Scraping constants and enums...&lt;br /&gt;Writing winmd...&lt;br /&gt;Winmd emitted at: C:&#92;Sources&#92;dia-rs&#92;.windows&#92;winmd&#92;Microsoft.Dia.winmd&lt;br /&gt;&lt;br /&gt;Build succeeded.&lt;br /&gt;  0 Warning(s)&lt;br /&gt;  0 Error(s)&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;rust-crate%3A-tooling&quot; tabindex=&quot;-1&quot;&gt;Rust Crate: Tooling&lt;/h2&gt;
&lt;p&gt;With freshly generated metadata now available, let&#39;s work on the Rust crate.&lt;/p&gt;
&lt;p&gt;First, edit &lt;code&gt;Cargo.toml&lt;/code&gt; and change the crate name to &lt;code&gt;dia-rs&lt;/code&gt;. Let&#39;s also add a &lt;em&gt;build&lt;/em&gt; dependency on &lt;code&gt;windows-bindgen&lt;/code&gt;. This crate has tooling to automatically generate Rust bindings from Windows metadata.&lt;/p&gt;
&lt;pre class=&quot;language-diff-text&quot;&gt;&lt;code class=&quot;language-diff-text&quot;&gt;[package]&lt;br /&gt;name = &quot;dia-rs&quot;&lt;br /&gt;version = &quot;0.1.0&quot;&lt;br /&gt;edition = &quot;2021&quot;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token deleted-sign deleted language-text&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-text&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;[build-dependencies.windows-bindgen]&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;version = &quot;0.56&quot;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;[dependencies]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Time to write some code!&lt;/p&gt;
&lt;p&gt;Create &lt;code&gt;build.rs&lt;/code&gt; and call into the &lt;code&gt;windows_bindgen::bindgen&lt;/code&gt; function with your metadata input path, output path, and instruct bindgen to filter out anything that isn&#39;t in the Microsoft.Dia namespace:&lt;/p&gt;
&lt;pre class=&quot;language-rust&quot;&gt;&lt;code class=&quot;language-rust&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;fn&lt;/span&gt; &lt;span class=&quot;token function-definition function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token namespace&quot;&gt;windows_bindgen&lt;span class=&quot;token punctuation&quot;&gt;::&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;bindgen&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;--in&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;.windows/winmd/Microsoft.Dia.winmd&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;--out&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;src/bindings.rs&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;--filter&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token string&quot;&gt;&quot;Microsoft.Dia&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;unwrap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let&#39;s also tell Cargo to only run this script if the inputs have changed:&lt;/p&gt;
&lt;pre class=&quot;language-diff-rust&quot;&gt;&lt;code class=&quot;language-diff-rust&quot;&gt;fn main() {&lt;br /&gt;&lt;span class=&quot;token inserted-sign inserted language-rust&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &lt;span class=&quot;token macro property&quot;&gt;println!&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;cargo:rerun-if-changed=.windows/winmd/Microsoft.Dia.winmd&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &lt;span class=&quot;token macro property&quot;&gt;println!&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;cargo:rerun-if-changed=build.rs&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token unchanged language-rust&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &lt;span class=&quot;token namespace&quot;&gt;windows_bindgen&lt;span class=&quot;token punctuation&quot;&gt;::&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;bindgen&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;--in&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;.windows/winmd/Microsoft.Dia.winmd&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;--out&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;src/bindings.rs&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;--filter&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;token string&quot;&gt;&quot;Microsoft.Dia&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;unwrap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Navigate to the crate root if you&#39;re not already there and build the crate (&lt;code&gt;cargo build&lt;/code&gt;). After a few moments, you should now have a bunch of automatically generated code in &lt;code&gt;src&#92;bindings.rs&lt;/code&gt;!&lt;/p&gt;
&lt;h2 id=&quot;rust-crate%3A-dia-sdk&quot; tabindex=&quot;-1&quot;&gt;Rust Crate: DIA SDK&lt;/h2&gt;
&lt;p&gt;Let&#39;s now complete some chores to finish off the DIA crate.&lt;/p&gt;
&lt;p&gt;First, we need to add dependencies &lt;code&gt;windows&lt;/code&gt; and &lt;code&gt;windows-core&lt;/code&gt;. The &lt;code&gt;windows&lt;/code&gt; crate contains our core Windows API definitions and types. &lt;code&gt;windows-core&lt;/code&gt; houses foundational plumbing and tooling. (More information can be found in the &lt;a href=&quot;https://github.com/microsoft/windows-rs/pull/2475&quot;&gt;original pull request&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;Open &lt;code&gt;Cargo.toml&lt;/code&gt; and add the &lt;code&gt;windows&lt;/code&gt; and &lt;code&gt;windows-core&lt;/code&gt; crates as dependencies. Enable the &lt;code&gt;implement&lt;/code&gt; and &lt;code&gt;Win32_Foundation&lt;/code&gt; features on the former:&lt;/p&gt;
&lt;pre class=&quot;language-ini&quot;&gt;&lt;code class=&quot;language-ini&quot;&gt;&lt;span class=&quot;token section&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token section-name selector&quot;&gt;dependencies.windows&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;version&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token value attr-value&quot;&gt;&quot;&lt;span class=&quot;token inner-value&quot;&gt;0.56&lt;/span&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;features&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token value attr-value&quot;&gt;[&lt;/span&gt;&lt;br /&gt;    &quot;implement&quot;,&lt;br /&gt;    &quot;Win32_Foundation&quot;,&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token section&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token section-name selector&quot;&gt;dependencies.windows-core&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;version&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token value attr-value&quot;&gt;&quot;&lt;span class=&quot;token inner-value&quot;&gt;0.56&lt;/span&gt;&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then remove everything in &lt;code&gt;lib.rs&lt;/code&gt;, add the &lt;code&gt;bindings&lt;/code&gt; module, &lt;em&gt;use&lt;/em&gt; the newly generated bindings, and finally &lt;em&gt;&lt;a href=&quot;https://doc.rust-lang.org/reference/items/use-declarations.html?highlight=pub%20mod#use-visibility&quot;&gt;re-export&lt;/a&gt;&lt;/em&gt; all the types within the &lt;code&gt;bindings&lt;/code&gt; module. This last part remove an awkward level of indirection. That is, instead of typing &lt;code&gt;use dia-rs::bindings::IDiaAddressMap&lt;/code&gt; you can now type &lt;code&gt;use dia-rs::IDiaAddressMap&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-diff-rust&quot;&gt;&lt;code class=&quot;language-diff-rust&quot;&gt;extern crate windows;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token inserted-sign inserted language-rust&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;pub&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;mod&lt;/span&gt; &lt;span class=&quot;token module-declaration namespace&quot;&gt;bindings&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;pub&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;token namespace&quot;&gt;bindings&lt;span class=&quot;token punctuation&quot;&gt;::&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Attempt to build the crate (&lt;code&gt;cargo build&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;You will receive quite a few build errors. That&#39;s because we haven&#39;t brought in enough of the &lt;code&gt;windows&lt;/code&gt; crate to satisfy the needs of our crate. The Windows API surface is huge and to keep build times under control, the types and APIs are grouped together and tied to &lt;em&gt;features&lt;/em&gt; in the &lt;code&gt;windows&lt;/code&gt; crate. To simplify development, the feature names match the type&#39;s namespace. So, for example, the &lt;code&gt;::windows::Win32::System::Com::VARIANT&lt;/code&gt; type lives in the &lt;code&gt;Win32::System::Com&lt;/code&gt; namespace and is tied to a feature named &lt;code&gt;Win32_System_Com&lt;/code&gt;. Alternatively, you can also look up a type or API &lt;a href=&quot;https://microsoft.github.io/windows-docs-rs/doc/windows/&quot;&gt;in the documentation&lt;/a&gt; or via the &lt;a href=&quot;https://microsoft.github.io/windows-rs/features/&quot;&gt;feature search web app&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using the above knowledge, resolve the build errors by addding the missing &lt;code&gt;windows&lt;/code&gt; features.&lt;/p&gt;
&lt;pre class=&quot;language-diff-text&quot;&gt;&lt;code class=&quot;language-diff-text&quot;&gt;[dependencies.windows]&lt;br /&gt;version = &quot;0.56&quot;&lt;br /&gt;features = [&lt;br /&gt;&lt;span class=&quot;token unchanged language-text&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &quot;implement&quot;,&lt;br /&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;   &quot;Win32_Foundation&quot;,&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted language-text&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &quot;Win32_System_Com_StructuredStorage&quot;,&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &quot;Win32_System_LibraryLoader&quot;,&lt;br /&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;   &quot;Win32_System_Ole&quot;,&lt;br /&gt;&lt;/span&gt;]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Attempt to build the crate again (&lt;code&gt;cargo build&lt;/code&gt;). Success!&lt;/p&gt;
&lt;h2 id=&quot;additional-tasks&quot; tabindex=&quot;-1&quot;&gt;Additional Tasks&lt;/h2&gt;
&lt;p&gt;At this point, you have built nearly everything in the official Microsoft DIA SDK Rust crate!&lt;/p&gt;
&lt;p&gt;Some remaining tasks include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;creating a helper to instantiate a DIA COM class that implements &lt;code&gt;IDiaDataSource&lt;/code&gt; (&lt;a href=&quot;https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate/&quot;&gt;hint&lt;/a&gt;: &lt;code&gt;diaguids.lib&lt;/code&gt; in the SDK has a &lt;a href=&quot;https://github.com/microsoft/dia-rs/blob/master/src/helpers.rs&quot;&gt;NoRegCoCreate&lt;/a&gt; function))&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/microsoft/dia-rs/blob/master/.metadata/dia.manual.cs&quot;&gt;adding some missing constants&lt;/a&gt; (e.g. E_PDB_INVALID_SIG) and types (e.g. SymTagEnum)&lt;/li&gt;
&lt;li&gt;writing sample crates&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;see-also&quot; tabindex=&quot;-1&quot;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Rust for Windows (&lt;a href=&quot;https://github.com/microsoft/windows-rs&quot;&gt;https://github.com/microsoft/windows-rs&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Rust for Windows crate documentation (&lt;a href=&quot;https://microsoft.github.io/windows-docs-rs/doc/windows/&quot;&gt;https://microsoft.github.io/windows-docs-rs/doc/windows/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Rust for Windows feature search tool (&lt;a href=&quot;https://microsoft.github.io/windows-rs/features&quot;&gt;https://microsoft.github.io/windows-rs/features&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Microsoft Q&amp;amp;A - Windows API - Win32 (&lt;a href=&quot;https://learn.microsoft.com/en-us/answers/tags/224/windows-api-win32&quot;&gt;https://learn.microsoft.com/en-us/answers/tags/224/windows-api-win32&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Stack Overflow Rust tag (&lt;a href=&quot;https://stackoverflow.com/questions/tagged/rust&quot;&gt;https://stackoverflow.com/questions/tagged/rust&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Win32 Metadata (&lt;a href=&quot;https://github.com/microsoft/win32metadata&quot;&gt;https://github.com/microsoft/win32metadata&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;revision-history&quot; tabindex=&quot;-1&quot;&gt;Revision history&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://web.archive.org/web/20230119063130/https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate/&quot;&gt;January 18, 2023&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initial publish&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://web.archive.org/web/20240224181521/https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate/&quot;&gt;January 3, 2024&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Minor changes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://web.archive.org/web/20240308082425/https://withinrafael.com/2023/01/18/generating-metadata-for-the-windows-crate&quot;&gt;February 24, 2024&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Major changes to Rust section to account for new and simpler bindgen tooling&lt;/li&gt;
&lt;li&gt;Added SymTagEnum workaround to Metadata section&lt;/li&gt;
&lt;li&gt;Other minor changes and corrections&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;May 15, 2024&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added reference to feature search web app&lt;/li&gt;
&lt;li&gt;Updated dependencies&lt;/li&gt;
&lt;li&gt;Other minor changes and corrections&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Programmatically determining if your UWP app can use WLAN data in China</title>
    <link href="https://withinrafael.com/2021/12/12/programmatically-determining-uwp-app-can-use-wlan-data-china/"/>
    <updated>2021-12-06T00:00:00Z</updated>
    <id>https://withinrafael.com/2021/12/12/programmatically-determining-uwp-app-can-use-wlan-data-china/</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/img/2021/12/cta-wlan-data.png&quot;&gt;&lt;img src=&quot;https://withinrafael.com/img/2021/12/cta-wlan-data.png&quot; alt=&quot;Windows 11 Settings window showing Wi-Fi &amp;gt; WLAN data section&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To comply with telecommunications regulations in China, all supported desktop editions of Windows include controls to manage which UWP apps have access to WLAN (e.g. Wi-Fi) data. Unfortunately, these controls don&#39;t appear in all installations of Windows. Instead, they only show up if Windows has been configured with a China-specific &lt;a href=&quot;https://docs.microsoft.com/windows-hardware/customize/desktop/unattend/microsoft-windows-deviceaccess-setregionspecificprivacyaccesspolicy?WT.mc_id=WD-MVP-5002756&quot;&gt;privacy access policy&lt;/a&gt;. In other words, on machines sold and operated in China and its territories.&lt;/p&gt;
&lt;p&gt;To enable this policy manually, navigate to &lt;code&gt;HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;DeviceAccess&lt;/code&gt; and create or set &lt;code&gt;ActivePolicyCode&lt;/code&gt; (&lt;code&gt;REG_SZ&lt;/code&gt;) to &lt;code&gt;zh&lt;/code&gt;. A reboot is required for this policy to take full effect.&lt;/p&gt;
&lt;p&gt;App developers looking to detect if their app has WLAN data access—presumably to re-negotiate with the user—can do so by checking for the undocumented &lt;code&gt;wifiData&lt;/code&gt; &lt;a href=&quot;https://docs.microsoft.com/windows/uwp/packaging/app-capability-declarations?WT.mc_id=WD-MVP-5002756&quot;&gt;capability&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;AppCapability&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Create&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;wifiData&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;CheckAccess&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; AppCapabilityAccessStatus&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;DeniedByUser&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; AppCapabilityAccessStatus&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;DeniedBySystem&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token comment&quot;&gt;// Do something&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token keyword&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The WLAN data controls do nothing if the PC doesn&#39;t also have &lt;em&gt;cellular&lt;/em&gt; radio hardware installed. (It doesn&#39;t need to be connected to anything.) This will manifest as &lt;code&gt;CheckAccess&lt;/code&gt; returning &lt;code&gt;Allowed&lt;/code&gt; (and the app having WLAN data access) regardless of the toggle switch value.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>ECS LIVA Mini Box QC710 technical details</title>
    <link href="https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/"/>
    <updated>2021-11-15T00:00:00Z</updated>
    <id>https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/</id>
    <content type="html">&lt;p&gt;Microsoft is now selling a &lt;a href=&quot;https://www.microsoft.com/en-us/d/ecs-liva-mini-box-qc710-desktop/8z247h1h3skp&quot;&gt;ECS LIVA Mini Box QC710 Desktop&lt;/a&gt; PC in its Store to facilitate &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm&quot;&gt;Windows on ARM&lt;/a&gt; development. (You may remember this machine by its former name--the &lt;a href=&quot;https://developer.qualcomm.com/hardware/windows-on-snapdragon/snapdragon-developer-kit&quot;&gt;Snapdragon Development Kit&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;Unfortunately, there isn&#39;t a lot of information on the Internet about this machine in one spot and the manufacturer is not very forthcoming with information. So I ordered one and opened it up, so you don&#39;t have to.&lt;/p&gt;
&lt;h2 id=&quot;help-wanted&quot; tabindex=&quot;-1&quot;&gt;Help wanted&lt;/h2&gt;
&lt;p&gt;If you have any information about the QSIP7180P platform, ECS QC710 test points, or entering emergency download (EDL) mode, please reach out.&lt;/p&gt;
&lt;p&gt;如果您有任何关于QSIP7180P平台、ECS QC710 测试点或进入紧急下载 （EDL） 模式的信息，请联系我们。&lt;/p&gt;
&lt;h2 id=&quot;photos&quot; tabindex=&quot;-1&quot;&gt;Photos&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gist.github.com/riverar/a1aef6224e1e24783596f7e35a9e4103&quot;&gt;https://gist.github.com/riverar/a1aef6224e1e24783596f7e35a9e4103&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;documentation&quot; tabindex=&quot;-1&quot;&gt;Documentation&lt;/h2&gt;
&lt;h3 id=&quot;quick-start&quot; tabindex=&quot;-1&quot;&gt;Quick Start&lt;/h3&gt;
&lt;p&gt;Scanned paper copy (&lt;a href=&quot;https://withinrafael.com/files/QC710_QuickStart_11182021_600.pdf&quot;&gt;QC710_QuickStart_11182021_600.pdf&lt;/a&gt;). Not worth slicing up or reading.&lt;/p&gt;
&lt;h3 id=&quot;manual&quot; tabindex=&quot;-1&quot;&gt;Manual&lt;/h3&gt;
&lt;p&gt;Digital copy (&lt;a href=&quot;https://withinrafael.com/files/QC710_UM_11242020.2.pdf&quot;&gt;QC710_UM_11242020.2.pdf&lt;/a&gt;). ECS assures me this is applicable to the ECS LIVA Mini Box QC710.&lt;/p&gt;
&lt;h2 id=&quot;specifications&quot; tabindex=&quot;-1&quot;&gt;Specifications&lt;/h2&gt;
&lt;h3 id=&quot;external&quot; tabindex=&quot;-1&quot;&gt;External&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dimensions&lt;/td&gt;
&lt;td&gt;119mm width x 116.6mm height x 35mm depth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weight&lt;/td&gt;
&lt;td&gt;220g&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Power&lt;/td&gt;
&lt;td&gt;SunWard 30W USB-C Wall Charger with Power Delivery (PD) (&lt;a href=&quot;https://productiq.ulprospector.com/en/profile/243457/qqjq.e486176&quot;&gt;UL Listed&lt;/a&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Energy Star&lt;/td&gt;
&lt;td&gt;Energy Star Computers Specification Version 8.0&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn1&quot; id=&quot;fnref1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt; (&lt;a href=&quot;https://www.energystar.gov/productfinder/product/certified-computers/results?formId=4441-55-492-005-9345572356&amp;amp;scrollTo=290&amp;amp;search_text=QC710&amp;amp;type_filter=&amp;amp;brand_name_isopen=0&amp;amp;minimum_processor_speed_filter=&amp;amp;processor_name_isopen=0&amp;amp;minimum_system_memory_filter=&amp;amp;markets_filter=United+States&amp;amp;zip_code_filter=&amp;amp;product_types=Select+a+Product+Category&amp;amp;sort_by=tec_of_model_kwh&amp;amp;sort_direction=asc&amp;amp;page_number=0&amp;amp;lastpage=0&quot;&gt;not certified&lt;/a&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FCC ID&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://fccid.io/WL6-7180PQC710&quot;&gt;WL6-7180PQC710&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Case Screws&lt;/td&gt;
&lt;td&gt;4 x Phillips 4mm x 6mm, under rubber ring&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&quot;internal&quot; tabindex=&quot;-1&quot;&gt;Internal&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Processor&lt;/td&gt;
&lt;td&gt;Qualcomm SC7180 (7c)&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn2&quot; id=&quot;fnref2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Graphics&lt;/td&gt;
&lt;td&gt;Adreno 618&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn2&quot; id=&quot;fnref2:1&quot;&gt;[2:1]&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;LPDDR4X Dual-channel 16-bit (32-bit) @ 2133 MHz&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn2&quot; id=&quot;fnref2:2&quot;&gt;[2:2]&lt;/a&gt;&lt;/sup&gt;, up to 4GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modem&lt;/td&gt;
&lt;td&gt;X15 LTE (800 Mbit/s down, 150 Mbit/s up, theoretical)&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn2&quot; id=&quot;fnref2:3&quot;&gt;[2:3]&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connectivity&lt;/td&gt;
&lt;td&gt;Bluetooth 5, 802.11a/b/g/n/ac/ad/ax, GPS, GLONASS, Beidou, Galileo, QZSS, SBAS, NavIC; USB 3.1; eMMC 5.1, UFS 3.0&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fn2&quot; id=&quot;fnref2:4&quot;&gt;[2:4]&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;eMMC 5.1, up to 64GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ethernet&lt;/td&gt;
&lt;td&gt;10/100/1000M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;software&quot; tabindex=&quot;-1&quot;&gt;Software&lt;/h2&gt;
&lt;p&gt;The ECS LIVA Mini Box QC710 Desktop ships with customized Windows 10 Home (19043.928) out of the box and requires the out-of-box experience to be completed before use.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://archive.org/details/ecs_liva_qc710_driver_package&quot;&gt;Extracted driver package (86 drivers)&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;windows-recovery&quot; tabindex=&quot;-1&quot;&gt;Windows Recovery&lt;/h2&gt;
&lt;h3 id=&quot;mount-windows-partition&quot; tabindex=&quot;-1&quot;&gt;Mount Windows Partition&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Plug a USB keyboard into the secondary USB port on the side of the box.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Plug a Windows PC (host) into the rear of the box (target) via the primary USB-A port.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Power on the box and hold &lt;kbd&gt;ESC&lt;/kbd&gt; until the Boot Device Selection (BDS) menu appears.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &lt;code&gt;3&lt;/code&gt; or use the keyboard arrow keys to select Enter Shell.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At the shell, issue the command: &lt;code&gt;FS1:&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At the shell, issue the command: &lt;code&gt;UsbfnMsdApp.efi -m &amp;quot;Basic data partition&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You should see the output below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;UEFI Interactive Shell v2.1
EDK II
UEFI v2.70 (Qualcomm Technologies, Inc., 0x00000000)
Shell&amp;gt; FS1:&#92;UsbfnMsdApp.efi -m &amp;quot;Basic data partition&amp;quot;
ProcessCmdLineArgs:  Setting Basic data partition  on 0
SelectCmdLinePartitions: CmdLine Mounting!
SelectCmdLinePartitions: Mounting 49 and 65535
MountSelection: Mounting Basic data partition On Lun 0
MountSelection:  Press Any Key To Unmount
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At this point, the USB keyboard connected to the box will no longer be functional. That&#39;s normal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the host PC, you should see a new driver letter assigned to the target Windows volume.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;replace-windows-installation&quot; tabindex=&quot;-1&quot;&gt;Replace Windows Installation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Using File Explorer, right-click the mounted target Windows volume and click Format. Be careful and select the right volume!&lt;/li&gt;
&lt;li&gt;Use the following options to format the volume:
&lt;ul&gt;
&lt;li&gt;File system: NTFS&lt;/li&gt;
&lt;li&gt;Allocation unit size: 4096&lt;/li&gt;
&lt;li&gt;Volume label: &lt;code&gt;Windows&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Format options: Quick Format (checked)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Obtain a Windows (Arm) installation ISO and double-click it to mount in File Explorer.&lt;/li&gt;
&lt;li&gt;Open an elevated command prompt and issue the command: &lt;code&gt;dism /Apply-Image /ImageFile:X:&#92;Sources&#92;install.wim /ApplyDir:Y:&#92;&lt;/code&gt;, replacing &lt;code&gt;X:&lt;/code&gt; with the letter assigned to the mounted installation media and &lt;code&gt;Y:&lt;/code&gt; with the letter assigned to the target Windows partition.&lt;/li&gt;
&lt;li&gt;Download and extract the &lt;a href=&quot;https://archive.org/details/ecs_liva_qc710_driver_package&quot;&gt;QC710 driver package&lt;/a&gt; to a temporary location.&lt;/li&gt;
&lt;li&gt;Issue the command: &lt;code&gt;dism /Image:Y:&#92; /Add-Driver /Driver:C:&#92;Path&#92;To&#92;Extracted&#92;Driver&#92;Package /Recurse&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use the Safely remove hardware and eject media icon in the system tray to eject the mass storage device.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;complete-windows-installation&quot; tabindex=&quot;-1&quot;&gt;Complete Windows Installation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Hold the power button to turn off the box. (It is highly recommended you eject the device first!)&lt;/li&gt;
&lt;li&gt;Turn on the box.&lt;/li&gt;
&lt;li&gt;Wait until Windows finishes its installation stages and presents the out-of-box experience (OOBE). This will take approximately 15-30 minutes.&lt;/li&gt;
&lt;li&gt;Complete OOBE and set up your PC, as normal.&lt;/li&gt;
&lt;li&gt;Open Device Manager and verify it is clean.&lt;/li&gt;
&lt;/ol&gt;
&lt;!-- 

BROKEN

Upgrading to Windows 11 Pro requires you to lie to Windows Setup about the edition of Windows you are currently using. To do so, open the Registry Editor, navigate to `HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows NT&#92;CurrentVersion` and change the value `EditionID` to read `Professional`.

Windows 11 ISOs targeting ARM64 can be generated using [UUPMediaCreator](https://github.com/gus33000/UUPMediaCreator/) or [via UUPDump](https://uupdump.ml/). A sample script (`prepare.cmd`) using UUPMediaCreator has been provided below.

```
uupdownload -s Professional -v 10.0.22504.1000 -y -r External -b Dev -c co_release -t arm64 -o dlfolder -e Professional -l en-US

for /f %%f in (&#39;dir /b .&#92;dlfolder&#92;&#39;) do uupmediaconvertercli %CD%&#92;dlfolder&#92;%%f 22504_arm64.iso en-US Professional
```

--&gt;
&lt;hr class=&quot;footnotes-sep&quot; /&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn1&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://www.energystar.gov/products/spec/computers_version_8_0_pd&quot;&gt;Energy Star Computers Specification Version 8.0 - Energy Star, 2019&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref1&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;fn2&quot; class=&quot;footnote-item&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_processors#Snapdragon_835,_850,_7c,_7c_Gen_2,_8c,_8cx_and_8cx_Gen_2_5G&quot;&gt;List of Qualcomm Snapdragon processors - Wikipedia, 2021&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref2&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref2:1&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref2:2&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref2:3&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt; &lt;a href=&quot;https://withinrafael.com/2021/11/18/ecs-liva-mini-qc710-technical-details/#fnref2:4&quot; class=&quot;footnote-backref&quot;&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content>
  </entry>
  
  <entry>
    <title>Pairing a stubborn Reolink RLC-511W camera with Windows 10</title>
    <link href="https://withinrafael.com/2021/04/24/pairing-a-stubborn-reolink-rlc-511w-camera-with-windows-10/"/>
    <updated>2021-04-24T00:00:00Z</updated>
    <id>https://withinrafael.com/2021/04/24/pairing-a-stubborn-reolink-rlc-511w-camera-with-windows-10/</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/img/2021/04/reolink-01.png&quot;&gt;&lt;img src=&quot;https://withinrafael.com/img/2021/04/reolink-01.png&quot; alt=&quot;Windows 10 Camera Settings window&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Microsoft added &lt;a href=&quot;https://blogs.windows.com/windows-insider/2021/04/07/announcing-windows-10-insider-preview-build-21354/&quot;&gt;a new Camera Settings page&lt;/a&gt; to Windows 10 build 21354 a few weeks ago. But I wasn&#39;t able to get it working with my &lt;a href=&quot;https://reolink.com/product/rlc-511w/&quot;&gt;Reolink RLC-511W&lt;/a&gt; camera. I filed a bug and was about to move on but curiosity set in.&lt;/p&gt;
&lt;h2 id=&quot;diagnosis&quot; tabindex=&quot;-1&quot;&gt;Diagnosis&lt;/h2&gt;
&lt;p&gt;To take a peek at the communication between Windows 10 and the camera, I installed &lt;a href=&quot;https://www.wireshark.org/&quot;&gt;Wireshark&lt;/a&gt; and began capturing traffic. After clicking the &amp;quot;Add a network camera&amp;quot; button in Windows, &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/wsdapi/probe-message?WT.mc_id=WD-MVP-5002756&quot;&gt;Web Services on Devices Discovery (WS-Discovery) Probe messages&lt;/a&gt; were immediately broadcast across the local network. The messages looked like this:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;[...]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;To&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;urn:schemas-xmlsoap-org:ws:2005:04:discovery&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;To&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Action&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Action&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;MessageID&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      urn:uuid:7c206a7a-baba-4e7e-b8c2-1dec6fd798f4&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;MessageID&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsd:&lt;/span&gt;Probe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsd:&lt;/span&gt;Types&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;dn:NetworkVideoTransmitter&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsd:&lt;/span&gt;Types&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsd:&lt;/span&gt;Probe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;soap:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The camera correctly recognized that someone was looking for an &lt;a href=&quot;https://www.onvif.org/specs/DocMap-2.4.2.html#overDiv:~:text=Network%20Video%20Transmitter%20%2D%20NVT&quot;&gt;ONVIF network video transmitter&lt;/a&gt; and replied with a &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/wsdapi/probematches-message?WT.mc_id=WD-MVP-5002756&quot;&gt;ProbeMatches message&lt;/a&gt;. That message looked like this:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;[...]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;MessageID&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;      uuid:2419d68a-2dd2-21b2-a205-ec:71:db:8c:14:92&lt;/mark&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;MessageID&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;RelatesTo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      urn:uuid:516be46d-86ae-4c0c-b852-a93954ffade0&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;RelatesTo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;To&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;mustUnderstand&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;1&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;To&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Action&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      http://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Action&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;ProbeMatches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;ProbeMatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;EndpointReference&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Address&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;            urn:uuid:2419d68a-2dd2-21b2-a205-ec:71:db:8c:14:92&lt;/mark&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;Address&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;ReferenceProperties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;ReferenceProperties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;ReferenceParameters&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;ReferenceParameters&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;PortType&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;ttl&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;PortType&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsa:&lt;/span&gt;EndpointReference&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;Types&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;tdn:NetworkVideoTransmitter&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;Types&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;Scopes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/type/video_encoder&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/location/country/china&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/type/network_video_transmitter&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/hardware/IPC-122&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/Profile/Streaming&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          onvif://www.onvif.org/name/IPC-BO&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;Scopes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;XAddrs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          http://192.168.1.191:8000/onvif/device_service&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;XAddrs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;MetadataVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;1&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;MetadataVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;ProbeMatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;wsdd:&lt;/span&gt;ProbeMatches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unfortunately, the response contained a few errors. I&#39;ve highlighted those in yellow. Let&#39;s take a closer look at them, starting from the top:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;MessageID: The camera provided &lt;code&gt;2419d68a-2dd2-21b2-a205-ec:71:db:8c:14:92&lt;/code&gt;, which is not a &lt;a href=&quot;https://tools.ietf.org/html/rfc4122#page-3:~:text=The%20formal%20definition%20of%20the%20UUID%20string%20representation&quot;&gt;valid UUID&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In subsequent tests, the camera also reused this value in repeated conversations. That&#39;s not good. Windows 10 will ignore messages with reused MessageID values, &lt;a href=&quot;https://specs.xmlsoap.org/ws/2005/04/discovery/ws-discovery.pdf#page=30&quot;&gt;following good security practice&lt;/a&gt; to prevent &lt;a href=&quot;https://en.wikipedia.org/wiki/Replay_attack&quot;&gt;replay attacks&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Address: The camera provided another invalid UUID.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PortType: The camera provided an unqualified value that doesn&#39;t map to anything that makes sense.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/img/2021/04/reolink-04.png&quot;&gt;&lt;img src=&quot;https://withinrafael.com/img/2021/04/reolink-04.png&quot; alt=&quot;Windows 10 Camera Settings window showing an unknown camera device named IPC-BO&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After fixing these issues (described later), I rescanned for cameras. The Camera Settings page found the camera, but clicking &amp;quot;Add device&amp;quot; just threw an &amp;quot;Couldn&#39;t add the device. Try again.&amp;quot; error.&lt;/p&gt;
&lt;p&gt;So I continued my review of the message traffic.&lt;/p&gt;
&lt;p&gt;The earlier ProbeResponse message contained a transport address (XAddr), meaning Windows 10 didn&#39;t have to search the network for the camera by name (with &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/wsdapi/resolve-message?WT.mc_id=WD-MVP-5002756&quot;&gt;Resolve messages&lt;/a&gt;). It immediately jumped to calling methods on the camera via its transport address (&lt;code&gt;http://192.168.1.191:8000/onvif/device_service&lt;/code&gt;) using SOAP over HTTP.&lt;/p&gt;
&lt;p&gt;Windows 10 called the camera&#39;s ONVIF Device Service method &lt;a href=&quot;https://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf?#page=33&quot;&gt;GetServiceCapabilities&lt;/a&gt; to get an idea of what it can and can&#39;t do:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;POST /onvif/device_service HTTP/1.1&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Pragma: no-cache&lt;br /&gt;[...]&lt;br /&gt;User-Agent: MS-WebServices/1.0&lt;br /&gt;Content-Length: 164&lt;br /&gt;Host: 192.168.1.191:8000&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;s&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.w3.org/2003/05/soap-envelope&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;GetServiceCapabilities&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;xmlns&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.onvif.org/ver10/device/wsdl&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The camera responded with:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;HTTP/1.1 200 OK&lt;br /&gt;Server: gSOAP/2.8&lt;br /&gt;[...]&lt;br /&gt;Content-Length: 3694&lt;br /&gt;Connection: close&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;[...]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;GetServiceCapabilitiesResponse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Capabilities&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Network&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;NTP&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;1&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;HostnameFromDHCP&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Dot11Configuration&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;DynDNS&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;IPVersion6&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;ZeroConfiguration&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;IPFilter&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Network&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Security&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;RELToken&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;HttpDigest&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;UsernameToken&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;KerberosToken&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;SAMLToken&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;X.509Token&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;RemoteUserHandling&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;Dot1X&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;AccessPolicyConfig&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;OnboardKeyGeneration&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;TLS1.2&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;TLS1.1&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;TLS1.0&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Security&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;System&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;HttpSupportInformation&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;HttpSystemLogging&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;HttpSystemBackup&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;HttpFirmwareUpgrade&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;FirmwareUpgrade&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;SystemLogging&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;SystemBackup&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;false&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token attr-name&quot;&gt;RemoteDiscovery&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;DiscoveryBye&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;DiscoveryResolve&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;System&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;Capabilities&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;GetServiceCapabilitiesResponse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Windows then requested the camera date and time, for time synchronization purposes. (Authentication requires reasonably synchronized time.)&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;POST /onvif/device_service HTTP/1.1&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Pragma: no-cache&lt;br /&gt;[...]&lt;br /&gt;User-Agent: MS-WebServices/1.0&lt;br /&gt;Content-Length: 162&lt;br /&gt;Host: 192.168.1.191:8000&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;s&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.w3.org/2003/05/soap-envelope&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;GetDeviceInformation&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;xmlns&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.onvif.org/ver10/device/wsdl&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The camera responded with:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;HTTP/1.1 200 OK&lt;br /&gt;Server: gSOAP/2.8&lt;br /&gt;[...]&lt;br /&gt;Content-Length: 3611&lt;br /&gt;Connection: close&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;[...]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;GetSystemDateAndTimeResponse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;SystemDateAndTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;DateTimeType&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Manual&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;DateTimeType&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;DaylightSavings&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;false&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;DaylightSavings&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;TimeZone&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;TZ&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            GMT+8:00:00DST+7:00:00,M3.2.0/01:59:00,M11.1.0/01:59:00&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;TZ&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;TimeZone&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;UTCDateTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Hour&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;6&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Hour&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Minute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;16&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Minute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Second&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;32&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Second&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Year&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;2021&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Year&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Month&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;4&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Month&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Day&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;23&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Day&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;UTCDateTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;LocalDateTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Hour&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;23&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Hour&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Minute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;16&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Minute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Second&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;32&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Second&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Year&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;2021&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Year&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Month&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;4&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Month&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Day&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;22&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Day&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;LocalDateTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Extension&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tt:&lt;/span&gt;Extension&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;SystemDateAndTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;tds:&lt;/span&gt;GetSystemDateAndTimeResponse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, Windows 10 called the camera&#39;s ONVIF Device Service method &lt;a href=&quot;https://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf?#page=51&quot;&gt;GetDeviceInformation&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;POST /onvif/device_service HTTP/1.1&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Pragma: no-cache&lt;br /&gt;[...]&lt;br /&gt;User-Agent: MS-WebServices/1.0&lt;br /&gt;Content-Length: 162&lt;br /&gt;Host: 192.168.1.191:8000&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;s&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.w3.org/2003/05/soap-envelope&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;GetDeviceInformation&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;xmlns&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.onvif.org/ver10/device/wsdl&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;s:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The camera responded with:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;HTTP/1.1 400 Bad Request&lt;/mark&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;Server: gSOAP/2.8&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;Content-Type: application/soap+xml; charset=utf-8&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;Content-Length: 3232&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;Connection: close&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;SOAP-ENV&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.w3.org/2003/05/soap-envelope&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;[...]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;mark class=&quot;highlight-line highlight-line-active&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Fault&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;encodingStyle&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;[...]&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/mark&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Code&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;SOAP-ENV:Sender&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Subcode&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;ter:NotAuthorized&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Value&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Subcode&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Code&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Reason&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Text&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xml:&lt;/span&gt;lang&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;en&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Sender not Authorized&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Text&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Reason&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Fault&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;highlight-line&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token namespace&quot;&gt;SOAP-ENV:&lt;/span&gt;Envelope&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oh dear. As before, I&#39;ve highlighted problem areas in yellow. Starting from the top:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;HTTP/1.1 400 response code: Per the &lt;a href=&quot;https://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf#page=25&quot;&gt;ONVIF Core Specification&lt;/a&gt;, the camera—claiming to support both token and digest authentication—must respond with a 401 error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If server supports both digest authentication [...] and the user name token profile [...] the following behavior shall be adapted: [...] If a client does not supply authentication credentials along with a web service request, the server shall assume that the client intends to use digest authentication [RFC 2617], if required. Hence, if a client does not provide authentication credentials when requesting a service that requires authentication, &lt;mark&gt;it will receive an HTTP 401 error according to [RFC 2617]&lt;/mark&gt;. &lt;mark&gt;Note that this behaviour on the server’s side differs from the case of supporting only username token profile, which requires for this case an HTTP 400 error on the HTTP level&lt;/mark&gt; and a SOAP:Fault env:Sender ter:NotAuthorized error on the WS level.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;encodingStyle: This attribute is not supported on the Fault element. The &lt;a href=&quot;https://www.w3.org/TR/soap12-part1/#soapencattr&quot;&gt;SOAP 1.2 specification&lt;/a&gt; makes this explicitly clear:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The encodingStyle attribute information item MAY appear on the following:&lt;/p&gt;
&lt;p&gt;[...] A child element information item of the SOAP Body element information item (see 5.3.1 SOAP Body child Element) &lt;mark&gt;if that child is not a SOAP Fault element information item&lt;/mark&gt; (see 5.4 SOAP Fault). [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/img/2021/04/reolink-05.png&quot;&gt;&lt;img src=&quot;https://withinrafael.com/img/2021/04/reolink-05.png&quot; alt=&quot;Windows 10 Camera Settings window showing camera device configured successfully&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/img/2021/04/reolink-06.png&quot;&gt;&lt;img src=&quot;https://withinrafael.com/img/2021/04/reolink-06.png&quot; alt=&quot;Windows 10 Camera Settings window showing camera device configured successfully&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After I patched the camera&#39;s GetServiceCapabilities response, dropping HTTP digest authentication support and the invalid attribute, Windows 10 authenticated and paired with the camera successfully.&lt;/p&gt;
&lt;h2 id=&quot;quick-fix-engineering&quot; tabindex=&quot;-1&quot;&gt;Quick Fix Engineering&lt;/h2&gt;
&lt;p&gt;The camera is already running the &lt;a href=&quot;https://support.reolink.com/hc/en-us/articles/900004823943-12-11-2020-Firmware-for-Reolink-IP-Cameras-IPC-51516M5M-&quot;&gt;latest firmware&lt;/a&gt; available (&lt;code&gt;20121804&lt;/code&gt;) so hoping to address the problems via an update was out.&lt;/p&gt;
&lt;p&gt;And I wasn&#39;t particularly interested in modifying the firmware and/or &lt;em&gt;rooting&lt;/em&gt; the camera either.&lt;/p&gt;
&lt;p&gt;So because I already had a utility Linux PC with multiple Ethernet ports lying around in my homelab, I opted to use it as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Man-in-the-middle_attack&quot;&gt;monkey-in-the-middle&lt;/a&gt;, correcting the camera message traffic on-the-fly.&lt;/p&gt;
&lt;p&gt;I created a simple network bridge on the Linux PC using &lt;a href=&quot;http://ebtables.netfilter.org/documentation/bridge-nf.html&quot;&gt;bridge-nf&lt;/a&gt;. I then added a few &lt;a href=&quot;https://en.wikipedia.org/wiki/Iptables&quot;&gt;iptables&lt;/a&gt; rules to forward camera-specified traffic into a queue (&lt;a href=&quot;https://netfilter.org/projects/libnetfilter_queue/doxygen/html/&quot;&gt;NFQUEUE&lt;/a&gt;) that is accessible via user-mode software.&lt;/p&gt;
&lt;p&gt;Using Python, &lt;a href=&quot;https://scapy.readthedocs.io/en/latest/introduction.html#about-scapy&quot;&gt;Scapy&lt;/a&gt; (a packet manipulation multi-tool), and &lt;a href=&quot;https://pypi.org/project/NetfilterQueue/&quot;&gt;NetFilterQueue&lt;/a&gt; (Python bindings for libnetfilter_queue), I was able to quickly patch up those camera errors with a simple script:&lt;/p&gt;
&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; scapy&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;all&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; IP&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; TCP&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; UDP&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Raw&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; netfilterqueue &lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; NetfilterQueue&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; collections &lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; namedtuple&lt;br /&gt;&lt;br /&gt;camera_ip &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;192.168.1.191&#39;&lt;/span&gt;&lt;br /&gt;replacement &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; namedtuple&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;replacement&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;old&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;new&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;# The replacements are crafted to avoid changing the&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;# original packet length. This ensures we don&#39;t&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;# interfere with IP fragmentation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;replacements &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;br /&gt;  replacement&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;wsa:MessageID&gt;&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;uuid:2419d68a-2dd2-21b2-a205-ec:71:db:8c:14:92&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;/wsa:MessageID&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;wsa:MessageID&gt;&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;uuid:2419d68a-2dd2-21b2-a205-ec71db8c1492&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;/wsa:MessageID&gt;&#39;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  replacement&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;wsa:Address&gt;&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;urn:uuid:2419d68a-2dd2-21b2-a205-ec:71:db:8c:14:92&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;/wsa:Address&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;wsa:Address&gt;&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;urn:uuid:2419d68a-2dd2-21b2-a205-ec71db8c1492&#39;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;/wsa:Address&gt;&#39;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  replacement&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;wsa:PortType&gt;ttl&amp;lt;/wsa:PortType&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;&amp;lt;!--                         --&gt;&#39;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  replacement&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;HttpDigest=&quot;true&quot;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;                 &#39;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  replacement&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;SOAP-ENV:encodingStyle=&quot;http://www.w3.org/2003/05/soap-encoding&quot;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token string&quot;&gt;b&#39;                                                                &#39;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;zero_checksum_and_length&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token comment&quot;&gt;# Resetting the length of the packet forces a&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token comment&quot;&gt;# recalculation of the checksum.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;haslayer&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;TCP&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;        packet&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;TCP&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;chksum &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;br /&gt;        packet&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;TCP&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;haslayer&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;UDP&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;        packet&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;UDP&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;chksum &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;br /&gt;        packet&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;UDP&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;br /&gt;    packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;chksum &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;callback&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;nfpacket&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;    packet &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; IP&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;nfpacket&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;get_payload&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;haslayer&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Raw&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;        payload &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; packet&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;Raw&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;load&lt;br /&gt;&lt;br /&gt;        &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;src &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; camera_ip&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; replacement &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; replacements&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;                payload &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; payload&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;replace&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;replacement&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;old&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; replacement&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;new&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token keyword&quot;&gt;elif&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;dst &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; camera_ip&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; replacement &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; replacements&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;                payload &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; payload&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;replace&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;replacement&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;new&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; replacement&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;old&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        zero_checksum_and_length&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;        nfpacket&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;set_payload&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;bytes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;packet&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;    nfpacket&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;accept&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;nfqueue &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; NetfilterQueue&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;nfqueue&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;bind&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; callback&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;    nfqueue&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;run&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;except&lt;/span&gt; KeyboardInterrupt&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;Exiting.&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;nfqueue&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;unbind&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;While the script is far from perfect (e.g. manual rotation of the MessageID is needed), it worked well enough to get the camera paired with Windows 10.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Generating valid tokens to access Limited Access Features in Windows 10</title>
    <link href="https://withinrafael.com/2021/01/04/generating-valid-tokens-to-access-limited-access-features-in-windows-10/"/>
    <updated>2021-01-04T00:00:00Z</updated>
    <id>https://withinrafael.com/2021/01/04/generating-valid-tokens-to-access-limited-access-features-in-windows-10/</id>
    <content type="html">&lt;p&gt;Microsoft ships a number of Windows 10 features that require &lt;a href=&quot;https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.limitedaccessfeatures&quot;&gt;&amp;quot;specific approval to be used in an application&amp;quot;&lt;/a&gt;. Windows Calculator, for example, taps into &lt;a href=&quot;https://github.com/microsoft/calculator/blob/c97f1c6430b29b2f16040c91ec34307806cdbb2b/src/Calculator/Controls/MathRichEditBox.cpp#L50-L54&quot;&gt;private math functionality&lt;/a&gt; tucked away in the RichEdit control. It isn&#39;t clear how one would request access to these APIs, but it is clear that part of the response is an app-specific token that must be provided at runtime.&lt;/p&gt;
&lt;p&gt;More specifically, unlocking a Limited Access Feature via the &lt;code&gt;LimitedAccessFeatures.TryUnlockFeature&lt;/code&gt; API requires several bits of information:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;It needs to know which feature you&#39;re trying to unlock (e.g. &lt;code&gt;com.microsoft.windows.richeditmath&lt;/code&gt;) and an associated key data (e.g. &lt;code&gt;RDZCQjY2M0YtQkFDMi00NkIwLUI3NzEtODg4NjMxMEVENkFF&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;A list of features can be found in the Windows Registry at &lt;code&gt;HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;AppModel&#92;LimitedAccessFeatures&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It needs a very specific string containing some scarecrow legalese and your application&#39;s &lt;a href=&quot;https://www.withinrafael.com/2018/01/28/whats-that-gobbledygook-in-my-package-family-name/&quot;&gt;Publisher ID&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[publisher id] has registered their use of [feature id] with Microsoft&lt;br /&gt;and agrees to the terms of use.&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It needs a special token, generated and provided by Microsoft.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After some quick sluething with friends &lt;a href=&quot;https://twitter.com/ntauthority&quot;&gt;@NTAuthority&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/thebookisclosed&quot;&gt;@thebookisclosed&lt;/a&gt;, we all converged on the token validation routines in &lt;code&gt;Windows.ApplicationModel.dll&lt;/code&gt; and reverse engineered the scheme:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Token = Base64(SHA256(&quot;FeatureId!FeatureKey!PackageFamilyName&quot;)[0..16])&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Creating a token generator is an exercise left for the reader.&lt;/p&gt;
&lt;p&gt;Windows Calculator example:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Base64(SHA256(&quot;com.microsoft.windows.richeditmath!RDZCQjY2M0YtQkFDMi00NkIwLUI3NzEtODg4NjMxMEVENkFF!Microsoft.WindowsCalculator_8wekyb3d8bbwe&quot;)&lt;br /&gt;=&gt; &quot;pfanNuxnzo+mAkBQ3N/rGQ==&quot;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Tips for IKEA NORDLI Headboard Installation</title>
    <link href="https://withinrafael.com/2020/11/28/tips-ikea-norli-headboard-installation/"/>
    <updated>2020-11-28T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/11/28/tips-ikea-norli-headboard-installation/</id>
    <content type="html">&lt;p&gt;I recently purchased an IKEA NORDLI bed (&lt;a href=&quot;https://www.ikea.com/us/en/p/nordli-bed-with-headboard-and-storage-white-s69241422&quot;&gt;003.498.49&lt;/a&gt;, &lt;a href=&quot;https://www.ikea.com/us/en/p/nordli-bed-with-headboard-and-storage-white-s69241422&quot;&gt;103.729.76&lt;/a&gt;) and want to document some missing information regarding the installation of its headboard (on drywall).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Manual: &lt;a href=&quot;https://www.ikea.com/us/en/assembly_instructions/nordli-headboard-white__AA-2059279-6-100.pdf&quot;&gt;https://www.ikea.com/us/en/assembly_instructions/nordli-headboard-white__AA-2059279-6-100.pdf&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Weight: The headboard, fully assembled, weighs 70 lbs., rounded up.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Screws: The headboard support bars can take a variety of screw gauges, ranging from #8 to #12.&lt;/p&gt;
&lt;p&gt;Some specific drywall guidance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For holes that &lt;strong&gt;don&#39;t&lt;/strong&gt; line up with a wall stud:&lt;/p&gt;
&lt;p&gt;You will need ~75 lbs. rated anchors. Do not cheap out here or you&#39;ll regret it. &lt;a href=&quot;https://amzn.to/37khXBU&quot;&gt;E-Z Ancor Twist-N-Lock&lt;/a&gt; (affiliate link) anchors work great. The included screws are #8 x 1-5/8&amp;quot;. These anchors are compatible with both 1/2&amp;quot; and 5/8&amp;quot; thick drywall, so you&#39;re covered.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For holes that &lt;strong&gt;do&lt;/strong&gt; line up with a wall stud:&lt;/p&gt;
&lt;p&gt;I recommend using a #12 x 2&amp;quot; screw, to cover both 1/2&amp;quot; and 5/8&amp;quot; thick drywall cases, and clear the thickness of the support bars.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wall clearance: After the headboard is mounted onto the wall, the remaining gap/wall clearance will be 1.5&amp;quot;. This is not enough room for power strips, but is plenty of room for routing AWG #16 (thick) electrical cables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Download Windows Admin Center directly from Microsoft</title>
    <link href="https://withinrafael.com/2020/08/03/download-windows-admin-center-directly/"/>
    <updated>2020-08-02T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/08/03/download-windows-admin-center-directly/</id>
    <content type="html">&lt;p&gt;Skip the Microsoft Evaluation Center. Direct download link: &lt;a href=&quot;https://aka.ms/WACdownload&quot;&gt;https://aka.ms/wacdownload&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>How To: Specify Application-Specific Direct3D Flags</title>
    <link href="https://withinrafael.com/2020/07/11/specify-application-specific-direct3d-flags/"/>
    <updated>2020-07-11T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/07/11/specify-application-specific-direct3d-flags/</id>
    <content type="html">&lt;p&gt;In some application compatibility scenarios, you may wish to control Direct3D flags (e.g. ForceDriverFlagsOff) on a per-user and per-application basis. To do so, create a registry key for the application at &lt;code&gt;HKEY_CURRENT_USER&#92;SOFTWARE&#92;Microsoft&#92;Direct3D&#92;&lt;/code&gt; (e.g. &lt;code&gt;SolitaireOverrides&lt;/code&gt;). Under this new key, create the following values:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Name&lt;/code&gt; (string) - Full path to the executing image. (This path must match the result of &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew&quot;&gt;GetModuleFileName&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Size&lt;/code&gt; (dword) - Size of executing image in bytes.&lt;/li&gt;
&lt;li&gt;Any additional Direct3D specific values.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Full example:&lt;/p&gt;
&lt;pre class=&quot;language-ini&quot;&gt;&lt;code class=&quot;language-ini&quot;&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token section&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token section-name selector&quot;&gt;HKEY_CURRENT_USER&#92;SOFTWARE&#92;Microsoft&#92;Direct3D&#92;SolitaireOverrides&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;&quot;Name&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token value attr-value&quot;&gt;&quot;&lt;span class=&quot;token inner-value&quot;&gt;C:&#92;&#92;Games&#92;&#92;Solitaire.exe&lt;/span&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;&quot;Size&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token value attr-value&quot;&gt;dword:0141f4e8&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token key attr-name&quot;&gt;&quot;ForceDriverFlagsOff&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token value attr-value&quot;&gt;dword:1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bonus: Flags normally specified at &lt;code&gt;HKEY_LOCAL_MACHINE&#92;Software&#92;Microsoft&#92;Direct3D&#92;Drivers&lt;/code&gt; and &lt;code&gt;HKEY_LOCAL_MACHINE&#92;System&#92;CurrentControlSet&#92;Control&#92;GraphicsDrivers&#92;Scheduler&lt;/code&gt; can also be overridden using the above scheme. Simply create the subkeys under &lt;code&gt;HKEY_CURRENT_USER&lt;/code&gt; and follow the same steps above.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>How To: Get Consumer GPUs Working In Hyper-V Virtual Machines</title>
    <link href="https://withinrafael.com/2020/06/06/how-to-get-consumer-gpus-working-in-hyperv-virtual-machines/"/>
    <updated>2020-06-06T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/06/06/how-to-get-consumer-gpus-working-in-hyperv-virtual-machines/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;—Thanks Tomas N., for testing and your patience while I wrote this all up.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;you-will-need&quot; tabindex=&quot;-1&quot;&gt;You will need&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;At least one PCI Express consumer graphics card. Some good options:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://amzn.to/2YoFDSV&quot;&gt;NVIDIA GeForce GTX 1650&lt;/a&gt;(affiliate link)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://amzn.to/2yiLG0L&quot;&gt;AMD Radeon 5500&lt;/a&gt;(affiliate link)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://amzn.to/3aVnoHt&quot;&gt;Dummy HDMI plug&lt;/a&gt;(affiliate link)&lt;/li&gt;
&lt;li&gt;An AMD processor
&lt;ul&gt;
&lt;li&gt;with &lt;a href=&quot;https://developer.amd.com/wordpress/media/2012/10/NPT-WP-1%201-final-TM.pdf&quot;&gt;Nested Page Tables&lt;/a&gt; (NPT)&lt;/li&gt;
&lt;li&gt;with an &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware#AMD_based&quot;&gt;Input/Output Memory Management Unit (IOMMU)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;with &lt;a href=&quot;https://pcisig.com/what-other-features-are-introduced-pcie-20-specification#:~:text=Access%20Control%20Services&quot;&gt;Access Control Services&lt;/a&gt; (ACS) on PCI Express root ports (recommended, workaround available if needed)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Or an Intel processor
&lt;ul&gt;
&lt;li&gt;with an &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware#Intel_based&quot;&gt;Input/Output Memory Management Unit (IOMMU)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;with &lt;a href=&quot;https://www.intel.com/content/www/us/en/virtualization/virtualization-technology/intel-virtualization-technology.html&quot;&gt;Extended Page Tables&lt;/a&gt; (EPT)&lt;/li&gt;
&lt;li&gt;with Intel Virtualization Technology for Directed I/O (VT-d) and &lt;a href=&quot;https://software.intel.com/content/www/us/en/develop/articles/intel-virtualization-technology-for-directed-io-vt-d-enhancing-intel-platforms-for-efficient-virtualization-of-io-devices.html&quot;&gt;Interrupt Remapping&lt;/a&gt; and Queued Invalidations capabilities&lt;/li&gt;
&lt;li&gt;with &lt;a href=&quot;https://pcisig.com/what-other-features-are-introduced-pcie-20-specification#:~:text=Access%20Control%20Services&quot;&gt;Access Control Services&lt;/a&gt; (ACS) on PCI Express root ports (recommended, workaround available if needed)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Windows Server 2016+ with Hyper-V role already installed and working (basic virtual machine support)&lt;/li&gt;
&lt;li&gt;DDA support on Windows 10 has been blocked by Microsoft and is &lt;strong&gt;not&lt;/strong&gt; supported&lt;/li&gt;
&lt;li&gt;A generation 2 virtual machine with a guest operating system installed&lt;/li&gt;
&lt;li&gt;GPU drivers for Windows&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/riverar/Remove-HypervisorChecks&quot;&gt;Remove-HypervisorChecks.ps1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#enterprise-wdk-ewdk-for-windows-10-version-1903&quot;&gt;Enterprise WDK (EWDK) for Windows 10&lt;/a&gt; (~12GB)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rweverything.com/download/&quot;&gt;Read &amp;amp; Write Utility&lt;/a&gt; (optional, see below)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;check-for-iommu-support&quot; tabindex=&quot;-1&quot;&gt;Check for IOMMU support&lt;/h2&gt;
&lt;p&gt;The following tests on the host machine will provide &lt;em&gt;hints&lt;/em&gt; to whether or not an IOMMU is present and available.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Execute the following PowerShell command on the host machine:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Get-VMHost&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;IovSupport&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Get-VMHost&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;IovSupportReasons&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This cmdlet will return &lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt; if Single-Root Input/Output Virtualization (SR-IOV) is supported. This is &lt;strong&gt;not&lt;/strong&gt; required but tends to be supported on hardware that also hosts an IOMMU.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;a href=&quot;http://rweverything.com/download/&quot;&gt;Read &amp;amp; Write Utility&lt;/a&gt; to check ACPI structures for IOMMU related tables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;AMD: I/O Virtualization Reporting Structure (IVRS) table&lt;/li&gt;
&lt;li&gt;Intel: DMA Remapping Table (DMAR) table&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the Read &amp;amp; Write Utility, click the ACPI button then check for an IVRS/DMAR tab. It should appear to contain data, if present, and not be zeroed out.&lt;/p&gt;
&lt;h2 id=&quot;set-up-hyper-v-discrete-device-assignment-(dda)&quot; tabindex=&quot;-1&quot;&gt;Set up Hyper-V Discrete Device Assignment (DDA)&lt;/h2&gt;
&lt;p&gt;Installation and general configuration of Hyper-V is out of scope. The following steps will configure DDA for selected GPUs and should all be executed on the host machine. A virtual machine with the name &amp;quot;vm-aa2baf5d3ccbe840&amp;quot; is assumed. Change as needed.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Shutdown the virtual machine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execute the following PowerShell command to prepare the virtual machine for DDA:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Set-VM&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;VMName &lt;span class=&quot;token string&quot;&gt;&quot;vm-aa2baf5d3ccbe840&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;LowMemoryMappedIoSpace 3Gb &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;HighMemoryMappedIoSpace 33280Mb &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;GuestControlledCacheTypes &lt;span class=&quot;token boolean&quot;&gt;$true&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;AutomaticStopAction TurnOff&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execute the following PowerShell command to retrieve all GPU locations in the device tree:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Get-PnpDevice&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;Class&lt;/span&gt; Display &lt;span class=&quot;token punctuation&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;ForEach-Object&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Write-Output&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&lt;span class=&quot;token function&quot;&gt;$&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;FriendlyName&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; has a device id of &lt;span class=&quot;token function&quot;&gt;$&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;DeviceId&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; and is located at $(&lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt; | Get-PnpDeviceProperty DEVPKEY_Device_LocationPaths | Select-Object -ExpandProperty Data | Where-Object { &lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt; -like &quot;&lt;/span&gt;PCIROOT*&lt;span class=&quot;token string&quot;&gt;&quot; })&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example output:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;NVIDIA GeForce GTX 980 has a device id of PCI&#92;VEN_10DE&amp;DEV_13C0&amp;SUBSYS_85181043&amp;REV_A1&#92;4&amp;1C3D25BB&amp;0&amp;0019 and&lt;br /&gt;is located at PCIROOT(0)#PCI(0301)#PCI(0000)&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Disable and dismount the GPU that will be assigned to the virtual machine by executing the following PowerShell commands (using information from the earlier steps):&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Disable-PnpDevice&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;PCI&#92;VEN_10DE&amp;amp;DEV_13C0&amp;amp;SUBSYS_85181043&amp;amp;REV_A1&#92;4&amp;amp;1C3D25BB&amp;amp;0&amp;amp;0019&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;Dismount-VMHostAssignableDevice&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;LocationPath &lt;span class=&quot;token string&quot;&gt;&quot;PCIROOT(0)#PCI(0301)#PCI(0000)&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Force&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Assign the GPU (and related audio device) to the virtual machine by executing the following PowerShell command:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Add-VMAssignableDevice&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;LocationPath &lt;span class=&quot;token string&quot;&gt;&quot;PCIROOT(0)#PCI(0301)#PCI(0000)&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;VmName &lt;span class=&quot;token string&quot;&gt;&quot;vm-aa2baf5d3ccbe840&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;Add-VMAssignableDevice&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;LocationPath &lt;span class=&quot;token string&quot;&gt;&quot;PCIROOT(0)#PCI(0301)#PCI(0001)&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;VmName &lt;span class=&quot;token string&quot;&gt;&quot;vm-aa2baf5d3ccbe840&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start the virtual machine.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;disable-access-control-services-(acs)-and-unique-rid-checks-(optional)&quot; tabindex=&quot;-1&quot;&gt;Disable Access Control Services (ACS) and unique RID checks (optional)&lt;/h2&gt;
&lt;p&gt;If a particular GPU doesn&#39;t &lt;a href=&quot;https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/dispmprt/ns-dispmprt-_dxgkarg_getvirtualgpuprofile#members&quot;&gt;advertise support for unique requestor IDs or ACS&lt;/a&gt;, GPU assignment will fail. Execute the following commands (in an elevated PowerShell instance) on the host machine to disable these checks:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Set-ItemProperty&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Path &lt;span class=&quot;token string&quot;&gt;&quot;HKLM:&#92;SOFTWARE&#92;Policies&#92;Microsoft&#92;Windows&#92;HyperV&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Name &lt;span class=&quot;token string&quot;&gt;&quot;RequireSecureDeviceAssignment&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Type&lt;/span&gt; DWORD &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Value 0 &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Force&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;Set-ItemProperty&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Path &lt;span class=&quot;token string&quot;&gt;&quot;HKLM:&#92;SOFTWARE&#92;Policies&#92;Microsoft&#92;Windows&#92;HyperV&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Name &lt;span class=&quot;token string&quot;&gt;&quot;RequireSupportedDeviceAssignment&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Type&lt;/span&gt; DWORD &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Value 0 &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Force&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;patch-graphic-card-drivers&quot; tabindex=&quot;-1&quot;&gt;Patch graphic card drivers&lt;/h2&gt;
&lt;p&gt;The following steps will patch your graphic card drivers, removing hypervisor checks.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Mount the Enterprise WDK (EWDK) for Windows 10 ISO.&lt;/li&gt;
&lt;li&gt;Execute &lt;code&gt;[mount]:&#92;LaunchBuildEnv.cmd&lt;/code&gt;, then execute the &lt;code&gt;powershell&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Navigate to the location containing the Remove-HypervisorChecks.ps1 script and execute the following PowerShell commands:&lt;br /&gt;
&lt;code&gt;./Remove-HypervisorChecks.ps1 -Nvidia -DriverPath &amp;quot;path&#92;to&#92;driver&#92;package.exe&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Wait for script completion.&lt;/li&gt;
&lt;li&gt;Copy the patched driver (patched-driver.zip) to the guest virtual machine (&lt;a href=&quot;https://docs.microsoft.com/en-us/windows-hardware/drivers/install/the-testsigning-boot-configuration-option#enable-or-disable-use-of-test-signed-code&quot;&gt;running in test mode&lt;/a&gt;) and install.&lt;/li&gt;
&lt;/ol&gt;
</content>
  </entry>
  
  <entry>
    <title>Typing text on a virtual machine keyboard via PowerShell CIM Cmdlets</title>
    <link href="https://withinrafael.com/2020/03/14/typing-text-on-a-virtual-machine-keyboard-via-powershell-cim-cmdlets/"/>
    <updated>2020-03-13T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/03/14/typing-text-on-a-virtual-machine-keyboard-via-powershell-cim-cmdlets/</id>
    <content type="html">&lt;p&gt;Retail Windows media contains a boot loader that requires keyboard input before setup begins. In automation scenarios, you can use CIM Cmdlets to &lt;em&gt;type&lt;/em&gt; keys over WinRM. (This is preferred over deprecated WMI Cmdlet use.)&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$CimSession&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;New-CimSession&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;ComputerName &lt;span class=&quot;token variable&quot;&gt;$VmHost&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Credential &lt;span class=&quot;token variable&quot;&gt;$VmHostCredentials&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$CimInstance&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;Get-CimInstance&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;CimSession &lt;span class=&quot;token variable&quot;&gt;$CimSession&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Namespace &lt;span class=&quot;token string&quot;&gt;&quot;root&#92;virtualization&#92;v2&quot;&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;ClassName Msvm_ComputerSystem `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;Filter&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;ElementName = &#39;&lt;span class=&quot;token variable&quot;&gt;$VmName&lt;/span&gt;&#39;&quot;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$Keyboard&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;Get-CimAssociatedInstance&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$CimInstance&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;CimSession &lt;span class=&quot;token variable&quot;&gt;$CimSession&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;ResultClassName Msvm_Keyboard&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;Invoke-CimMethod&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$Keyboard&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;CimSession &lt;span class=&quot;token variable&quot;&gt;$CimSession&lt;/span&gt; `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;MethodName TypeText `&lt;br /&gt;  &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Arguments @&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; asciiText = &lt;span class=&quot;token string&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>CVE-2020-0765: Quick proof of concept</title>
    <link href="https://withinrafael.com/2020/03/12/quick-example-to-test/"/>
    <updated>2020-03-11T00:00:00Z</updated>
    <id>https://withinrafael.com/2020/03/12/quick-example-to-test/</id>
    <content type="html">&lt;p&gt;Remote Desktop Connection Manager (RDCMan) spins up ancient XmlReader and XmlTextReader instances without considering DTD and entity handling, resulting in a bag of &lt;a href=&quot;https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0765&quot;&gt;information disclosure&lt;/a&gt; (and denial of service) vulnerabilities. Here&#39;s a quick .rdg I put together to test against.&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token doctype&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;token doctype-tag&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;token name&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token internal-subset&quot;&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;!ELEMENT&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;(#PCDATA)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;!ENTITY foo SYSTEM &quot;http://localhost:11223/&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;RDCMan&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;programVersion&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;2.7&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;schemaVersion&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;3&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;file&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;credentialsProfiles&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;properties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;expanded&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;True&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;expanded&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;test&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;junk&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token entity named-entity&quot; title=&quot;&amp;foo;&quot;&gt;&amp;amp;foo;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;junk&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;properties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;server&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;properties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;test&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;properties&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;server&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;file&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;connected&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;favorites&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;recentlyUsed&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;RDCMan&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Detect if your process is running in a Remote Desktop Services client session</title>
    <link href="https://withinrafael.com/2019/12/10/detect-if-your-process-is-running-in-a-remote-desktop-services-client-session/"/>
    <updated>2019-12-10T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/12/10/detect-if-your-process-is-running-in-a-remote-desktop-services-client-session/</id>
    <content type="html">&lt;p&gt;You could attempt to follow Microsoft&#39;s &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/termserv/detecting-the-terminal-services-environment&quot;&gt;confusing guidance on this&lt;/a&gt;, use the &lt;code&gt;Windows.System.RemoteDesktop.InteractiveSession.IsRemote&lt;/code&gt; WinRT API (Windows 10), or just call the &lt;code&gt;WinStationIsCurrentSessionRemoteable&lt;/code&gt; Terminal Server API directly (Windows 8+).&lt;/p&gt;
&lt;p&gt;Example declaration in C#:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token attribute&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;DllImport&lt;/span&gt;&lt;span class=&quot;token attribute-arguments&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;winsta.dll&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token attribute&quot;&gt;&lt;span class=&quot;token target keyword&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;MarshalAs&lt;/span&gt;&lt;span class=&quot;token attribute-arguments&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;UnmanagedType&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Bool&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;token return-type class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;bool&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;WinStationIsCurrentSessionRemoteable&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token attribute&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;MarshalAs&lt;/span&gt;&lt;span class=&quot;token attribute-arguments&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;UnmanagedType&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Bool&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;out&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;bool&lt;/span&gt;&lt;/span&gt; isRemoteable&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Enumerating registered WSL distributions</title>
    <link href="https://withinrafael.com/2019/11/09/enumerating-registered-wsl-distributions/"/>
    <updated>2019-11-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/11/09/enumerating-registered-wsl-distributions/</id>
    <content type="html">&lt;p&gt;Consuming the &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/api/wslapi/&quot;&gt;WSL API&lt;/a&gt; requires developers to provide the name of a distribution to action on. For example, here&#39;s the definition for &lt;code&gt;WslLaunchInteractive&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-c&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;HRESULT &lt;span class=&quot;token function&quot;&gt;WslLaunchInteractive&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;br /&gt;  PCWSTR distributionName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  PCWSTR command&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  BOOL   useCurrentWorkingDirectory&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  DWORD  &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt;exitCode&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confusingly, Microsoft does not provide an API to retrieve a list of registered (i.e. installed) distribution names to pass into this function. When I confronted Microsoft about this omission, one engineer suggested I parse the output of &lt;code&gt;wsl --list&lt;/code&gt;. Another deflected, noting &amp;quot;&lt;em&gt;there is a non-zero cost for creating and maintaining an API&lt;/em&gt;&amp;quot; and that perhaps when &amp;quot;&lt;em&gt;WSL becomes more of a platform, a more robust set of APIs would probably make sense&lt;/em&gt;&amp;quot;. &lt;a href=&quot;https://github.com/microsoft/WSL/issues/4644&quot;&gt;I&#39;m still discussing this on GitHub.&lt;/a&gt;&lt;a href=&quot;https://twitter.com/WithinRafael/status/1191214964427476994&quot;&gt;And Twitter.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the meantime, you could utilize the private &lt;code&gt;LxssUserSession&lt;/code&gt; COM class–&lt;a href=&quot;https://github.com/Biswa96/WslReverse/blob/0c542ef41a4bb3a318028551fdf8386cda1dc351/common/LxssUserSession.h&quot;&gt;thanks Biswapriyo&lt;/a&gt;. Or just read the backing data store directly. (You&#39;re going down that undocumented road anyway.) As of &lt;strong&gt;Windows 10, build 19013.1&lt;/strong&gt;, installed distribution data lives in the Windows Registry, specifically &lt;code&gt;HKEY_CURRENT_USER&#92;Software&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Lxss&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;At its root, the Lxss key contains a helpful &lt;code&gt;DefaultDistribution&lt;/code&gt; REG_SZ value pointing to the distribution sub-key currently configured as the user&#39;s &lt;em&gt;default&lt;/em&gt; distribution. Each sub-key represents a single installed distribution. And each sub-key contains a &lt;code&gt;DistributionName&lt;/code&gt; REG_SZ value. That is the distribution name the WSL API expects.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Determine if your app is in a Focus Assist profile&#39;s priority list</title>
    <link href="https://withinrafael.com/2019/09/19/determine-if-your-app-is-in-a-focus-assist-profiles-priority-list/"/>
    <updated>2019-09-19T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/09/19/determine-if-your-app-is-in-a-focus-assist-profiles-priority-list/</id>
    <content type="html">&lt;p&gt;There&#39;s no public API for manipulating Focus Assist, so I reverse engineered IQuietHoursSettings and IQuietHoursProfile (from Windows 10 1903). The standard using-reverse-engineered-information disclaimer applies here.&lt;/p&gt;
&lt;p&gt;C++ and C# examples:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/riverar/085d98ffb1343e92225a10817109b2e3.js&quot;&gt;&lt;/script&gt;</content>
  </entry>
  
  <entry>
    <title>Notes From Reverse Engineering A Mono AOT Compiled App On iOS</title>
    <link href="https://withinrafael.com/2019/07/09/notes-from-reverse-engineering-a-mono-aot-compiled-app-on-ios/"/>
    <updated>2019-07-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/07/09/notes-from-reverse-engineering-a-mono-aot-compiled-app-on-ios/</id>
    <content type="html">&lt;p&gt;To document the &lt;a href=&quot;https://withinrafael.com/2019/07/08/microsoft-seeing-ai-api-v1/&quot;&gt;Microsoft Seeing AI API&lt;/a&gt; in my last blog post, I had to reverse engineer a Xamarin Mono full-AOT compiled app written for iOS, using a few of my favorite tools: &lt;a href=&quot;https://mitmproxy.org/&quot;&gt;mitmproxy&lt;/a&gt;, &lt;a href=&quot;https://github.com/0xd4d/dnSpy&quot;&gt;dnSpy&lt;/a&gt;, and &lt;a href=&quot;https://www.frida.re/&quot;&gt;Frida&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are the challenges I faced and how I overcame them.&lt;/p&gt;
&lt;h2 id=&quot;challenge%3A-application-package-(ios-app-store-package)-is-fairplay-drm-encrypted&quot; tabindex=&quot;-1&quot;&gt;Challenge: Application package (iOS App Store Package) is FairPlay DRM encrypted&lt;/h2&gt;
&lt;p&gt;I jailbroke an iPhone with the semi-tethered solution &amp;quot;&lt;a href=&quot;https://www.theiphonewiki.com/wiki/DoubleH3lix&quot;&gt;DoubleH3lix&lt;/a&gt;&amp;quot; and installed OpenSSH and &lt;a href=&quot;https://github.com/KJCracks/Clutch&quot;&gt;Clutch&lt;/a&gt;, an iOS executable/package dumper. This gave me access to the app binaries for static analysis.&lt;/p&gt;
&lt;h2 id=&quot;challenge%3A-application-is-fully-aot-compiled-down-to-armv7%2Farm64&quot; tabindex=&quot;-1&quot;&gt;Challenge: Application is &lt;a href=&quot;https://docs.microsoft.com/en-us/xamarin/ios/internals/architecture&quot;&gt;fully aot-compiled&lt;/a&gt; down to armv7/arm64&lt;/h2&gt;
&lt;p&gt;I wasn&#39;t familiar with &lt;a href=&quot;https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-jit&quot;&gt;Apple&#39;s policies&lt;/a&gt; around JIT-compiled code, so this one caught me off-guard. I was expecting a bunch of managed Mono code and instead had nearly empty assemblies with some scaffolding and metadata. The rest was AOT compiled down to ARM instructions and stuffed into &lt;a href=&quot;https://www.mono-project.com/docs/advanced/runtime/docs/aot/&quot;&gt;AOTData files&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Skimming strings, I discovered the web service endpoint but otherwise skipped static analysis and opt&#39;ed for dynamic analysis instead.&lt;/p&gt;
&lt;h2 id=&quot;challenge%3A-application-does-not-consume-system-proxy-configuration&quot; tabindex=&quot;-1&quot;&gt;Challenge: Application does not consume system proxy configuration&lt;/h2&gt;
&lt;p&gt;The application did not consume the proxy I configured on the phone. I suspect this is related to questionable Mono HttpClient or WebClient defaults.&lt;/p&gt;
&lt;p&gt;So I altered &lt;code&gt;/etc/hosts&lt;/code&gt; on the iPhone and redirected the web service endpoint to my PC. There, I used mitmproxy in the Windows Subsystem for Linux to configure a reverse proxy. (The Windows native version of mitmproxy is missing components and is difficult to work with.)&lt;/p&gt;
&lt;p&gt;I ferried the mitmproxy CA root certificate to the phone via OneDrive; the &lt;a href=&quot;https://docs.mitmproxy.org/stable/concepts-certificates/#quick-setup&quot;&gt;mitm.it magic domain&lt;/a&gt; does not work in this configuration.&lt;/p&gt;
&lt;h2 id=&quot;challenge%3A-application-signs-all-outgoing-requests-%2F-web-service-validates-all-signatures&quot; tabindex=&quot;-1&quot;&gt;Challenge: Application signs all outgoing requests / web service validates all signatures&lt;/h2&gt;
&lt;p&gt;Observation of outbound traffic flowing through the reverse proxy revealed the application *signed *all outbound requests and transmitted the signature to the web service endpoint via an HTTP header. The signature was 32 bytes in length, prior to base-64 encoding.&lt;/p&gt;
&lt;p&gt;Browsing the disassembled managed assemblies in the package (with dnSpy), I found a &lt;code&gt;SignatureHelper&lt;/code&gt; class definition (no implementation) with a &lt;code&gt;static readonly byte[] Secret&lt;/code&gt; field. This strongly suggested a keyed hash algorithm was in play.&lt;/p&gt;
&lt;p&gt;To get the secret, I wrote a Frida agent (consuming the &lt;a href=&quot;https://github.com/freehuntx/frida-mono-api&quot;&gt;frida-mono-api&lt;/a&gt; module) to access the static field and dump its value. (I used &lt;a href=&quot;https://github.com/frida/frida-compile&quot;&gt;frida-compile&lt;/a&gt; to transpile the agent code to a Frida-compatible ECMAScript 6. I also had to fill some gaps in the frida-mono-api module.)&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://gist.github.com/riverar/b9e0013e3ff6f1e34b2a2f62eaaf5cc1&quot;&gt;Frida agent script&lt;/a&gt; I wrote and injected into the app:&lt;/p&gt;
&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; MonoApi &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;frida-mono-api&#39;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; domain &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_get_root_domain&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Get a handle to the SeeingAI.Core assembly&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; coreAssembly &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_assembly_load_with_partial_name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Memory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;allocUtf8String&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;SeeingAI.Core&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; coreImage &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_assembly_get_image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;coreAssembly&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Retrieve class metadata&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; helperClass &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ClassFromName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;coreImage&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;SeeingAI.Network.SignatureHelper&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Retrieve field metadata and value&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; secretField &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ClassGetFieldFromName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;helperClass&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Secret&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; secretValue &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;FieldGetValueObject&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;secretField&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; domain&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Dump array to screen&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; secretValueLength &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_array_length&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;secretValue&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;hexdump&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_array_addr_with_size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;secretValue&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; secretValueLength &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With the 30-byte secret in hand, I built a quick C# app around &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.hmacsha256?view=netframework-4.8&quot;&gt;HMACSHA256&lt;/a&gt;, as it fit the constraints perfectly (e.g. keyed input, 32-byte output). I passed in the request body as input, my secret and ... it produced the wrong hash.&lt;/p&gt;
&lt;p&gt;I revisited the network analysis and recognized &lt;strong&gt;despite varying inputs, the signature remained the same.&lt;/strong&gt; So my request body-based input was provably wrong. I had to get the real input.&lt;/p&gt;
&lt;p&gt;I made &lt;a href=&quot;https://gist.github.com/riverar/6b856be60541b3663ea33c2570fc5041&quot;&gt;modifications to the earlier agent script&lt;/a&gt; to intercept the input argument of the AOT-compiled method:&lt;/p&gt;
&lt;pre class=&quot;language-js&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; MonoApi &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;frida-mono-api&#39;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; domain &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_get_root_domain&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Get a handle to the SeeingAI.Core assembly&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; coreAssembly &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_assembly_load_with_partial_name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Memory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;allocUtf8String&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;SeeingAI.Core&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; coreImage &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_assembly_get_image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;coreAssembly&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Retrieve class metadata&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; helperClass &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ClassFromName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;coreImage&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;SeeingAI.Network.SignatureHelper&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Get pointer to AOT compiled method&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; methodInfo &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ClassGetMethodFromName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;helperClass&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;GenerateSignature&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; monoError &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Memory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;alloc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// Allocate enough memory for MonoError initialization&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; nativeMethodPtr &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MonoApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;mono_aot_get_method&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;domain&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; methodInfo&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; monoError&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token comment&quot;&gt;// Attach interceptor and fish out the first method argument&lt;/span&gt;&lt;br /&gt;Interceptor&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;attach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;nativeMethodPtr&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token function-variable function&quot;&gt;onEnter&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;GenerateSignature called&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;    console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;args[1] =&gt; &quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; MonoApiHelper&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;StringToUtf8&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;args&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Interceptor attached and ready.&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As suspected, the input was not the request body but rather ... the query component of the endpoint URI. (It&#39;s not clear what value this signature scheme adds to the overall solution.)&lt;/p&gt;
&lt;p&gt;The formula was completed and produced valid signatures: &lt;strong&gt;base64(HMACSHA256(uri-query-component))&lt;/strong&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Microsoft Seeing AI API v1</title>
    <link href="https://withinrafael.com/2019/07/09/microsoft-seeing-ai-api-v1/"/>
    <updated>2019-07-08T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/07/09/microsoft-seeing-ai-api-v1/</id>
    <content type="html">&lt;p&gt;This API was reverse engineered from the Microsoft &lt;a href=&quot;https://apps.apple.com/us/app/seeing-ai/id999062298&quot;&gt;Seeing AI app available for iOS&lt;/a&gt;, version 3.0.0.0 and 4.1.1.0.&lt;/p&gt;
&lt;h2 id=&quot;endpoints&quot; tabindex=&quot;-1&quot;&gt;Endpoints&lt;/h2&gt;
&lt;p&gt;https://seeingai.trafficmanager.net&lt;br /&gt;
https://seeingai.azurewebsites.net&lt;br /&gt;
https://waws-prod-bay-071.vip.azurewebsites.windows.net&lt;/p&gt;
&lt;h2 id=&quot;get-product-name-from-barcode-digits&quot; tabindex=&quot;-1&quot;&gt;Get product name from barcode digits&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/v1/query?intent=Product&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Required headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;signature&lt;/code&gt;: &lt;code&gt;gvoKXKGmEO7YhqzQWaXoN/v1ieHQ00mh2vnKKEFpQ0o=&lt;/code&gt; (This is produced via Base64(HMAC-SHA256(&amp;quot;intent=Product&amp;quot;)).)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;: &lt;code&gt;application/json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example request:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;&quot;barcode&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;07895502&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example response:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;Product&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Content&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Diet Dr Pepper Cherry&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Format&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Text&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Metadata&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;MoreInfo&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Amazingly Smooth Zero calories. Zero calories Amazingly Smooth One 6-pack of 12 fluid ounce cans&quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;get-text-content-from-document-photo&quot; tabindex=&quot;-1&quot;&gt;Get text content from document photo&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/v1/query?intent=Document&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Required headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;signature&lt;/code&gt;: &lt;code&gt;/y2bpHR6XIbBr7ZKUFjehmY6btoq8x4BjzahWwN26n0=&lt;/code&gt; (This is produced via Base64(HMAC-SHA256(&amp;quot;intent=Document&amp;quot;)).)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;: &lt;code&gt;image/jpeg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example request:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[JPEG image bytes]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example response:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;Document&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Content&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&amp;lt;?xml version=&#92;&quot;1.0&#92;&quot; encoding=&#92;&quot;UTF-8&#92;&quot; standalone=&#92;&quot;yes&#92;&quot;?&gt;&#92;r&#92;n&amp;lt;html xmlns=&#92;&quot;http://www.w3.org/XML/XMLSchema/v1.1&#92;&quot;&gt;&#92;r&#92;n  &amp;lt;head&gt;&#92;r&#92;n&amp;lt;meta http-equiv=&#92;&quot;Content-Type&#92;&quot; content=&#92;&quot;text/html; charset=utf-8&#92;&quot; /&gt;&#92;r&#92;n&amp;lt;style type=&#92;&quot;text/css&#92;&quot;&gt;body{font-family: arial; font-size: 12pt}&amp;lt;/style&gt;&amp;lt;/head&gt;&#92;r&#92;n&amp;lt;body&gt;&#92;r&#92;n&amp;lt;p style=&#92;&quot;font-size:54px;margin-top:0px;margin-bottom:2px;line-height:56px;text-indent:2px;text-align:justify&#92;&quot;&gt;IMPORTANT INFORMATION: This product subject to terms &amp;amp;amp; conditions (including an arbitration agreement); if you open the package, ...&amp;lt;/p&gt;&#92;r&#92;n&#92;r&#92;n&amp;lt;/body&gt;&#92;r&#92;n&amp;lt;/html&gt;&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Format&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;HTML&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;get-facial-attributes-from-image-of-face(s)&quot; tabindex=&quot;-1&quot;&gt;Get facial attributes from image of face(s)&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/v1/query?intent=Person&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Required headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;signature&lt;/code&gt;: &lt;code&gt;b8IJ82rIZW9sw7tILmKyalgbTMfLDSezi3L6T0rlXJ0=&lt;/code&gt; (This is produced via Base64(HMAC-SHA256(&amp;quot;intent=Person&amp;quot;)).)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;: &lt;code&gt;image/jpeg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example request:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[JPEG image bytes]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example response:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;Person&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Content&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;34 year old man with Brown hair wearing glasses looking happy.&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Format&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Text&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Regions&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Height&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;335&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Properties&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;age&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;34&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;emotion&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;happy&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;gender&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;male&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;glasses&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;glasses&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;hairColor&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Brown&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;label&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;34 year old man with Brown hair wearing glasses looking happy.&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Width&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;335&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;X&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Y&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;197&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;get-text-content-from-handwritten-text&quot; tabindex=&quot;-1&quot;&gt;Get text content from handwritten text&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/v1/query?intent=Handwriting&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Required headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;signature&lt;/code&gt;: &lt;code&gt;sBmjwvbhtvXsLKyJsIZ/Mrodp9To4rWPQrlRHWWzSog=&lt;/code&gt; (This is produced via Base64(HMAC-SHA256(&amp;quot;intent=Handwriting&amp;quot;)).)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;: &lt;code&gt;image/jpeg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example request:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[JPEG image bytes]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example response:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;Handwriting&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Content&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Elephant&#92;nShoe&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Format&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Text&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Regions&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Height&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Properties&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;label&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Elephant&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Width&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;X&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;113&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Y&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Height&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Properties&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span class=&quot;token property&quot;&gt;&quot;label&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Shoe&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Width&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;X&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;237&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;        &lt;span class=&quot;token property&quot;&gt;&quot;Y&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;12&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;token property&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;                                   &lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;get-text-description-of-a-scene&quot; tabindex=&quot;-1&quot;&gt;Get text description of a scene&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/v1/query?intent=Scene&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Required headers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;signature&lt;/code&gt;: &lt;code&gt;AfrBqBu/F0Tteqm94TQtQ5XBojxhhzcPh7ln5Orcanc=&lt;/code&gt; (This is produced via Base64(HMAC-SHA256(&amp;quot;intent=Scene&amp;quot;)).)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Content-Type&lt;/code&gt;: &lt;code&gt;image/jpeg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example request:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;[JPEG image bytes]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example response:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token property&quot;&gt;&quot;Scene&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token property&quot;&gt;&quot;Content&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Probably a white square on a black wall&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token property&quot;&gt;&quot;Format&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Text&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;token property&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Detect when a TV is no longer connected to the Xbox via WinRT</title>
    <link href="https://withinrafael.com/2019/04/16/detect-when-a-tv-is-no-longer-connected-to-the-xbox-via-winrt/"/>
    <updated>2019-04-15T00:00:00Z</updated>
    <id>https://withinrafael.com/2019/04/16/detect-when-a-tv-is-no-longer-connected-to-the-xbox-via-winrt/</id>
    <content type="html">&lt;p&gt;Given the Xbox display interface is HDMI-based, your first thought may be to attach to the &lt;a href=&quot;https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display.core.hdmidisplayinformation.displaymodeschanged&quot;&gt;HdmiDisplayInformation.DisplayModesChanged&lt;/a&gt; event. Don&#39;t. It doesn&#39;t provide enough information to solve this problem. Instead, turn to &lt;a href=&quot;https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.deviceinformation.createwatcher&quot;&gt;DeviceInformation.CreateWatcher&lt;/a&gt; and an &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/desktop/search/-search-3x-advancedquerysyntax&quot;&gt;Advanced Query String&lt;/a&gt; with the following selector:&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Devices&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;InterfaceClassGuid&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;{E6F07B5F-EE97-4a90-B076-33F57BF4EAA7}&quot;&lt;/span&gt; AND&lt;br /&gt;    System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Devices&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;InterfaceEnabled&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;StructuredQueryType&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Boolean#True&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;https://docs.microsoft.com/en-us/windows-hardware/drivers/install/guid-devinterface-monitor&quot;&gt;display device interface&lt;/a&gt; will toggle between enabled and disabled states and fire the appropriate watcher events.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Uncontrolled Search Path Element in Windows 10 IoT Dashboard</title>
    <link href="https://withinrafael.com/2018/12/27/uncontrolled-search-path-element-in-windows-10-iot-dashboard/"/>
    <updated>2018-12-27T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/12/27/uncontrolled-search-path-element-in-windows-10-iot-dashboard/</id>
    <content type="html">&lt;h2 id=&quot;tl%3Bdr&quot; tabindex=&quot;-1&quot;&gt;tl;dr&lt;/h2&gt;
&lt;p&gt;An attacker can boot up a laptop with a hostname of &lt;code&gt;redmond&lt;/code&gt; and man-in-the-middle all Windows 10 IoT Core Dashboard users on the same network. This gives the attacker full control of the software being flashed onto a Windows 10 IoT device.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot; tabindex=&quot;-1&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;An uncontrolled search path element issue exists in the Windows 10 IoT Dashboard (1.0.1808.9002) app. Later versions were untested and may still be vulnerable. A successful exploit of this vulnerability requires an attacker to connect a machine to an adjacent network with a DNS/WINS/NetBIOS name of &lt;code&gt;redmond&lt;/code&gt; and host a publicly accessible network share of &lt;code&gt;1windows&lt;/code&gt; containing an easily craftable JSON file. The application will automatically seek out and load this file and populate the UI with Windows IoT images under the attacker’s control. These images, ultimately just miniature forms of Windows OS, can be customized by the attacker for an infinite number of IoT scenarios.&lt;/p&gt;
&lt;p&gt;Proposed NVD Category: &lt;a href=&quot;https://cwe.mitre.org/data/definitions/427.html&quot;&gt;CWE-427 (Uncontrolled Search Path Element)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Proposed CVSS Score: &lt;strong&gt;8.3&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Proposed CVSS Vector:&lt;br /&gt;
&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:A/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:F/RL:W/RC:C/CR:H/IR:H/AR:H/MAV:A/MAC:L/MPR:N/MUI:R/MS:C/MC:H/MI:H/MA:H&quot;&gt;AV:A/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:F/RL:W/RC:C/CR:H/IR:H/AR:H/MAV:A/MAC:L/MPR:N/MUI:R/MS:C/MC:H/MI:H/MA:H&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;details&quot; tabindex=&quot;-1&quot;&gt;Details&lt;/h2&gt;
&lt;p&gt;The Windows 10 IoT Dashboard is a graphical tool used by customers to provision IoT devices and IoT media (e.g. SD and USB Mass Storage). The tool was designed to present officially supported builds of Windows IoT OS via a OS Build drop down. Selecting a build from this drop down results in a download of official media from Microsoft secure servers.&lt;/p&gt;
&lt;p&gt;The tool also supports populating the OS Build drop down via a special LKGFilePath key in its on-disk configuration file (&lt;code&gt;Windows10IoTCoreDashboard.exe.config&lt;/code&gt;). This key value represents a path on the network where Last Known Good Windows IoT OS build configuration data can be retrieved. This LKG manifest contains data that the Windows IoT Dashboard processes to also populate the aforementioned OS Build drop down. This location is uncontrolled.&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2018/12/image-1.png&quot; alt=&quot;&quot; /&gt;Figure 1 – Do you know which image is under attacker control?&lt;br /&gt;
Windows IoT images presented and delivered via the LKG manifest can be in ISO+MSI or FFU format, are not required to be digitally signed, and are indistinguishable from the official Microsoft Windows IoT images in the UI (Figure 1).&lt;/p&gt;
&lt;h2 id=&quot;repro-steps&quot; tabindex=&quot;-1&quot;&gt;Repro Steps&lt;/h2&gt;
&lt;h3 id=&quot;attacker-machine-preparation&quot; tabindex=&quot;-1&quot;&gt;Attacker Machine Preparation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set up a Windows or Linux machine (Samba) with a configured hostname of &lt;code&gt;redmond&lt;/code&gt; and a Guest-accessible share named &lt;code&gt;1windows&lt;/code&gt;. (This may require some loosening of security on the attacker&#39;s machine, if it&#39;s running Windows.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the folder structure at the root of the &lt;code&gt;1windows&lt;/code&gt; share: &lt;code&gt;&#92;Teams&#92;IOT&#92;Client&#92;AthensDrop&#92;LKG&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a text file named &lt;code&gt;iot_lkg_v2.txt&lt;/code&gt; and populate it with the following JSON data:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;AllPlatforms&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;CheckedForInsiderBuild&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;LkgBuilds&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;Build&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Windows 10 IoT Core&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;BuildNumber&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;17145&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;Path&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&#92;&#92;&#92;&#92;redmond&#92;&#92;1windows&#92;&#92;my.iso&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;&quot;Platform&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;MBM&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;victim-machine-preparation%3A&quot; tabindex=&quot;-1&quot;&gt;Victim Machine Preparation:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Ensure attacker machine is accessible via &lt;code&gt;redmond&lt;/code&gt; hostname (e.g. &lt;code&gt;ping redmond&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Download and execute the Windows IoT Dashboard (&lt;a href=&quot;https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/iotdashboard&quot;&gt;https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/iotdashboard&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Set up a new device&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Change Device Type to &lt;code&gt;Intel MinnowBoard Turbot/MAX&lt;/code&gt;. (Our example JSON above only targets this device but can be rewritten to affect all devices listed in this app.) Take note that the OS Build contains two builds (Figure 1). The 17145 build is attacker controlled.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;Windows 10 IoT Core (17145)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Insert a mass storage device to prepare for Windows IoT use (will be erased!)&lt;/li&gt;
&lt;li&gt;Specify an Administrator password (e.g. password)&lt;/li&gt;
&lt;li&gt;Click I Accept checkbox&lt;/li&gt;
&lt;li&gt;Click Download and Install. The attacker controlled &lt;code&gt;my.iso&lt;/code&gt; file will be downloaded, unpacked, and installed onto the media inserted into the machine at this time.&lt;/li&gt;
&lt;li&gt;Install media in IoT device and power on.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;mitigation&quot; tabindex=&quot;-1&quot;&gt;Mitigation&lt;/h2&gt;
&lt;p&gt;Locate the &lt;code&gt;Windows10IoTCoreDashboard.exe.config&lt;/code&gt; file and remove the following configuration element within:&lt;/p&gt;
&lt;pre class=&quot;language-xml&quot;&gt;&lt;code class=&quot;language-xml&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;add&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;LKGFilePath&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&#92;&#92;redmond&#92;1windows&#92;Teams&#92;IOT&#92;Client&#92;AthensDrop&#92;LKG&#92;iot_lkg_v2.txt&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;timeline%3A&quot; tabindex=&quot;-1&quot;&gt;Timeline:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Aug 16 1:17PM: Sent report to MSRC&lt;/li&gt;
&lt;li&gt;Aug 16 5:58PM: MSRC asked if attacker required DNS access&lt;/li&gt;
&lt;li&gt;Aug 16 6:55PM: I clarified DNS is not needed thanks to NetBIOS/LLMNR&lt;/li&gt;
&lt;li&gt;Aug 17 5:50PM: MSRC closed issue (&amp;quot;[...] we have determined that this submission does not meet the bar for security servicing&amp;quot;)&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Windows 10 User Initiated Feedback (UIF) On Demand (OD) Diagnostic Scenarios</title>
    <link href="https://withinrafael.com/2018/11/20/windows-10-user-initiated-feedback-uif-on-demand-od-diagnostic-scenarios/"/>
    <updated>2018-11-20T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/11/20/windows-10-user-initiated-feedback-uif-on-demand-od-diagnostic-scenarios/</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://1drv.ms/u/s!AnjdAnZZcu-GpKMOCijYJDfJA1a5Tw&quot;&gt;Download zip of all scenarios (3.9MB)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;532 scenarios downloaded &lt;code&gt;11/20/2018&lt;/code&gt;, pulled from:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;https://settings-win.data.microsoft.com/settings/v3.0/windows/uif_ondemand?expId=...&amp;sku=48&amp;deviceClass=Windows.Desktop&amp;sampleId=...&amp;app=utc&amp;appVer=10.0.17763.55&amp;isRetailOS=1&amp;locale=en-US&amp;ms=0&amp;osVer=10.0.17763.134.amd64fre.rs5_release.180914-1434&amp;deviceId=...&amp;os=windows&amp;ring=WIF&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scenario names:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;UIF OD Desktop Xbox App Feedback Logs V2&lt;br /&gt;{00288807-0136-411a-881a-e37ed07da43c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop InputCore_Pen V6&lt;br /&gt;{00595011-c473-41db-894c-7078e2690edb}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Remote Access Diagnostics for V10&lt;br /&gt;{00ffbf58-0e1d-4321-baa6-3d105b338be5}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop LogInkSamples V1&lt;br /&gt;{013d9420-d7c4-4b32-a698-22c2ca38416d}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop MPT logs V1&lt;br /&gt;{01a6cd09-487d-4571-92c3-d6f8e8c0d7fd}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Windows Hello V3&lt;br /&gt;{01b7fcc9-7db2-45cf-80b5-680a284fbe77}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop WER Diagnostics&lt;br /&gt;{020fb61d-8e91-4616-a92c-dd31d35afb92}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro MFTracing Desktop V6&lt;br /&gt;{0241c79a-abb8-4d16-aca2-6e6f866b916b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Miracast V7&lt;br /&gt;{0248398f-f7c7-4600-b383-e900e33056af}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop actioncenter and notification proc dumps V2&lt;br /&gt;{02cd6e73-7d75-4383-b0ed-ad41069e1eab}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Networks All other issues Diag V1&lt;br /&gt;{02d2d2c0-d34c-4e30-b208-f2e042fa0779}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro AltTabTaskView Desktop V1&lt;br /&gt;{03969690-b971-478d-b272-1849a3a89b93}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Remote Access Diagnostics for V10&lt;br /&gt;{055ffe1b-bb41-449e-b25c-55c04ba27dbb}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop CS Diagnostics V6&lt;br /&gt;{062ec5bd-6e78-4fe2-beda-11e41a89784f}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Unistack Diagnostics V5_OdD&lt;br /&gt;{0895224f-d8e9-4b7e-ae61-5b2239e9b151}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop GPU Selection Detach V2&lt;br /&gt;{09057ca0-4af7-4a1c-886c-3ef696666cb8}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro VirtualDesktop Desktop V1&lt;br /&gt;{0962c159-731e-445e-bdc3-f3a10e321156}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Messaging Diagnostics V4&lt;br /&gt;{097c0587-1e30-498a-a8fc-31668a8c2e29}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Capture Repo V1&lt;br /&gt;{0981c602-002e-4133-bfa5-57a7c47fd8f4}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro for WDAG Office V5&lt;br /&gt;{0a42728c-d891-4886-bdb2-8418951f5cd7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop InputCore_Touchpad V6&lt;br /&gt;{0aeee917-0e0c-4560-b518-311a88b7988a}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Battery Diagnostic V1&lt;br /&gt;{0b131d89-9e38-45e3-866c-587f37ce4e60}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop DirectAccess Diagnostics V5&lt;br /&gt;{0c2d6c17-93d6-42e2-b070-a26d73ecfea8}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Holograms Desktop V2&lt;br /&gt;{0c2f3c2e-82d8-4a81-841e-0172cbdba863}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Screen Sketch Diagnostics V1&lt;br /&gt;{0c349d08-9c20-41c1-9372-2a966788e532}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Testing Push Context V1&lt;br /&gt;{0c98f224-e628-4909-95f3-889fcef285a7}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop IME Dictionary via Language FoD V1&lt;br /&gt;{0caa7275-aaf9-4d5a-9f93-8845f1b679bd}&lt;br /&gt;&lt;br /&gt;UIF Action Center and Shell start repro OdD V5&lt;br /&gt;{0d3f6b84-7dda-47bd-be84-08c33be1bb66}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop XIHDashboardLogs V1&lt;br /&gt;{0e02b7de-67e7-4b9c-9f7f-dbc3eafe0858}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro My People Desktop V1&lt;br /&gt;{0ea0b67c-cfa1-435f-af85-49ac82136312}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Capture Logs V2&lt;br /&gt;{10006efe-36a5-4684-80f4-21790f3250b6}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop DxgDiag and Game Perf V10&lt;br /&gt;{1008c1f8-4a76-497a-8768-bb19bea7ca61}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Windows Defender Desktop V3&lt;br /&gt;{111703ef-6c1c-481c-8de8-9d9b9b7b65a6}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop testing context authoring site V1&lt;br /&gt;{11b6fe1a-e6c4-4e6b-aff5-645f4b330df6}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Oasis Single Escalation Second Default V04&lt;br /&gt;{11f6c160-0898-41be-adf9-51ea8da40133}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Global Power V3&lt;br /&gt;{11f990cf-05a7-4e4a-a05f-f96548eb39c0}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Timeline V2&lt;br /&gt;{121d1c87-820c-4120-a81a-d332bda1dca0}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Bitlocker Desktop V2&lt;br /&gt;{123e24c8-b66b-47cd-abd2-b47dfa7cbc4c}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Office Centennial Desktop V3&lt;br /&gt;{1262b19a-d850-4dcc-a02d-e288744fcca5}&lt;br /&gt;&lt;br /&gt;UIF Start Repro for WDAG Office V5&lt;br /&gt;{13057a1f-bbc7-434d-8b17-cf998cc6b99a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Notifications and App Services Desktop V2&lt;br /&gt;{14d55668-7eee-4047-bfaa-f1c0a81ba77c}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro for WDAG Edge V6&lt;br /&gt;{15be0ea1-a3ad-4177-862c-9ea6c8db6add}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop WindowsShellCoreOperational V1&lt;br /&gt;{16055107-efd6-451b-bcaa-3e74c034f484}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro RemoteDesktop Settings Desktop V3&lt;br /&gt;{17ef9ef3-74ac-402a-a3ce-4918639a1f1e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Speech Desktop V2&lt;br /&gt;{181c1a19-effa-43e2-8397-f2a4dedef6bf}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Global Power V3&lt;br /&gt;{1839940e-1681-467c-ab3e-e209112cec04}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Network Diagnostics V6&lt;br /&gt;{185a2f0a-d5d9-4e85-82cc-cdbca09a5b73}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Default Diagnostics V13&lt;br /&gt;{1881a45e-01fd-4452-ace4-4a23666e66e3}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop OneDrive Preview Collect Logs V1&lt;br /&gt;{188c67d7-efa9-4605-ade7-494885a92872}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Whiteboard Desktop V1&lt;br /&gt;{1b6314b5-231d-4097-9064-88ca676f93ad}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop GMD Diag V1&lt;br /&gt;{1bb2f338-4e2d-4159-b304-84f99c02a25e}&lt;br /&gt;&lt;br /&gt;UIF Performance WindowsDesktop Start Repro V4&lt;br /&gt;{1c120547-115a-45c9-b579-4e24a6f78e35}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Speech Desktop V3&lt;br /&gt;{1c3a2eb0-0077-431d-bf33-7d05c349119c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Smart Card Desktop V1&lt;br /&gt;{1c45f0b8-ebd0-4e5c-9e2a-b23f63a13827}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Bitlocker Desktop V2&lt;br /&gt;{1c86afce-75f9-4bc0-b713-b4104fac0488}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Skype UWP Diagnostics V4&lt;br /&gt;{1c965046-510b-4c31-9828-67c4ee0d4760}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro for Edge with Barcelona V1_3_1&lt;br /&gt;{1d4abb03-7950-4a32-985d-7879a8a8da14}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Remote Desktop Preview V3&lt;br /&gt;{1dc2c7fd-4473-4725-8e89-b91b711103d2}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop EDP_EnterpriseDataProtection V41&lt;br /&gt;{1dc92743-5246-4aae-9353-a0d49b42b629}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Start Repro WER  Traces&lt;br /&gt;{1dfc5f3a-7311-45c6-a069-770c003769e1}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Near Share Desktop V3&lt;br /&gt;{1e7e5adf-14c2-453f-befb-73b7a0713f25}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop InputCore_Pen V6&lt;br /&gt;{1eb6a114-22dc-4e1a-84cc-f8f5e8ac1c5b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Skype UWP Diagnostics V4&lt;br /&gt;{219d1166-eed8-4033-afb8-7d1cb6d5853e}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro EDP_EnterpriseDataProtection Desktop V4_Upd_OdD&lt;br /&gt;{2201c13c-94bb-4213-9ce5-4d74c71e7d4d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Capture Repo V1&lt;br /&gt;{2332f476-6f79-449f-ab99-011549cc76a3}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro for WDAG Office V5&lt;br /&gt;{23eea7a0-1c03-4ef4-939b-fc63e252f156}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop CS Diagnostics V6&lt;br /&gt;{24c6158a-cdf0-4184-8b9c-2df864404bba}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Microsoft Remote Desktop Preview Desktop V2&lt;br /&gt;{256c59bc-7554-4ffe-bbb1-1412db525782}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop DxgDiag GamePerf GameDVR V2&lt;br /&gt;{25c62e2d-baf4-4138-aebc-62b9f117aa00}&lt;br /&gt;&lt;br /&gt;UIF Fonts Desktop Issues Filed V2&lt;br /&gt;{2684b26c-1b56-4d29-b70f-3e652d239e64}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Oasis WebVR V1&lt;br /&gt;{27464e7b-6bbd-4dd9-907b-505e135c79e8}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro ShareUX Desktop V2&lt;br /&gt;{2789ee0e-b1cb-4a06-94f0-da258bf8826c}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Print Single Escalation V8&lt;br /&gt;{28307021-add4-41b1-aa26-451a9bc66bf5}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro ClockFlyout Desktop V2&lt;br /&gt;{28cc4618-d47f-4741-a0cf-fa2280b3eb55}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro WindowsDesktop Global Networking V6&lt;br /&gt;{2a315a4e-edaa-499d-b2ea-97ddb280e5c7}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Hello V7&lt;br /&gt;{2a35c8cb-f511-4711-8f1b-5ff95208b270}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Appv Logs collection V5&lt;br /&gt;{2ab22cf2-dfe3-487a-a4a5-40bf48b53492}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop InputCore_Touchpad V6&lt;br /&gt;{2b233d1f-8f15-42e4-b549-a395cb237aec}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Smart Card Desktop V1&lt;br /&gt;{2b27037f-df1d-4014-8ebf-04fbadadd60a}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Clipboard Diagnostics V8&lt;br /&gt;{2bb1afd3-28c4-48f6-a415-3b86a09647a7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Hello V7&lt;br /&gt;{2bb4a23f-50ea-491d-9138-872a062f90ed}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop StorageDiagnostic V9&lt;br /&gt;{2be6cace-b216-4bc5-8dd3-97bfb7284074}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Start HeT v01&lt;br /&gt;{2c29b83f-49bc-4931-a845-8f2566c14762}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Collect_Search_Core_Logs V1&lt;br /&gt;{2c4e6b7b-6bc2-4444-96e7-4d4689eb1108}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect Sim3PO log V4&lt;br /&gt;{2cead317-bfff-4ccd-a238-818ad7a42e37}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Bluetooth QP reg keys V1&lt;br /&gt;{2ceb6281-1563-459b-aadf-c200bfbbff61}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Whiteboard Desktop V1&lt;br /&gt;{2cfdd8ce-3145-4625-9649-348a7035b0ac}&lt;br /&gt;&lt;br /&gt;UIF MoviesAndTV Desktop Repro Start V1_1&lt;br /&gt;{2ded18a3-1605-49a2-a507-3f0bee6d2e71}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Your Phone UWP App V4&lt;br /&gt;{2df31df9-fb4c-48b7-8aee-b69e88f7d55b}&lt;br /&gt;&lt;br /&gt;UIF_OD_All_Devices_Notifications_and_App_Services_V6&lt;br /&gt;{2e2b4727-6e6c-467f-819c-e23af0dabb6e}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop CS Diagnostics V6&lt;br /&gt;{2e7c0a4c-8800-46f0-ab9b-7c8c74923d22}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Pdf Load Failed V1&lt;br /&gt;{2eeed608-7e8b-4013-b806-b2fe46760651}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Magnifier Diagnostics V1&lt;br /&gt;{2f4fd0ff-1cd6-4764-92a1-37e41cd49ac1}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop LanguageOverlay and  Settings V1&lt;br /&gt;{2f8a19e9-d733-4c60-918a-9706053afa7b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Wireless Network V9&lt;br /&gt;{302782a6-2deb-4ab8-b770-d7ea6554600d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop audio V1&lt;br /&gt;{304979f7-4edd-4070-899d-70f5328abbfe}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop UEV Logs collection V4&lt;br /&gt;{3196d9db-78a5-4bb7-be49-fa9c9bf695e5}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Virtual Desktop Desktop V1&lt;br /&gt;{324bb387-1a15-4c44-92b9-e3ebcd804c59}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop RemoteDesktop V5&lt;br /&gt;{32de8ae2-9341-4769-9ad9-285552432d27}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Office Desktop V4&lt;br /&gt;{332f3a67-8f9e-4117-bba9-dbc09cf556fe}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Wireless Network V9&lt;br /&gt;{34fa25e3-5233-4ea3-82e4-1e9e21302a1b}&lt;br /&gt;&lt;br /&gt;UIF Oasis Single Escalation First Default V13&lt;br /&gt;{350beef9-5686-4a4a-ae08-3c840cf5ab3a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop WDSC Device Security V1&lt;br /&gt;{3542aa6c-e827-48bb-b433-6e4322910c1b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro QuickActions Desktop V1&lt;br /&gt;{35ec26d2-886c-4228-801b-654910aa0660}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop ConnectingToCellularNetwork V3&lt;br /&gt;{3650bfa4-8d2f-4629-9577-0582b0e85f51}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Stop Apps V04&lt;br /&gt;{369674f2-db17-4214-bde7-e4c29d4764c7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro AltTabTaskView Desktop V2&lt;br /&gt;{36f5e5c1-4a06-40bc-8b45-fbbbfe8b8f0b}&lt;br /&gt;&lt;br /&gt;UIF Start Repro for WDAG Edge V6&lt;br /&gt;{372086cf-1336-4914-9424-6eb865b39ebc}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Game Controller Desktop V1&lt;br /&gt;{377b8431-520f-48ed-b0ce-f1d91fd95225}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop USBLKD V1&lt;br /&gt;{37ef212d-02f0-4eb3-a7f0-f09040016e6e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro QuickActions Desktop V1&lt;br /&gt;{38370199-4f8a-48b5-bbd3-25c346504dc3}&lt;br /&gt;&lt;br /&gt;UIF Desktop Single Escalation GSE v01&lt;br /&gt;{386499b3-084b-45f9-9971-2e4d0b470fb5}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Single Escalation Night Light V1&lt;br /&gt;{38cb58c1-bca1-48e6-99b5-7f895c261d73}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Capture Repo V1&lt;br /&gt;{390344df-28f6-4b94-9e78-b5684ea6e5a5}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Console Desktop V1&lt;br /&gt;{396c9f16-978f-43d1-80bc-fa4b6c2c5c83}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Legacy Taskbar V2&lt;br /&gt;{3b0880bf-57a1-4520-9dc6-5c7a95872d64}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop NFC Diagnostics V1&lt;br /&gt;{3c504df2-b5d0-4737-8ec0-71a5a92ad9d6}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect DDODiag V1&lt;br /&gt;{3ce5ba90-b988-4e96-b5f4-548088aba115}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Store Logs V6&lt;br /&gt;{3cee264a-916d-48ad-a64e-fc0e6d570c6c}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Point of Service Desktop V2&lt;br /&gt;{3d21d210-08ee-45b1-abd2-302f40b1065f}&lt;br /&gt;&lt;br /&gt;UIF GatherLogs for InPrivate Desktop V1&lt;br /&gt;{3de1ff26-72de-46bf-b63e-a24f4e9be5fd}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Camera_Desktop_RS4 V1a&lt;br /&gt;{3f1b37ed-4c6f-4f8b-bea8-34041b8c6c13}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro VirtualDesktop Desktop V1&lt;br /&gt;{3f63ac0d-91c4-4721-af78-d730e5b798cd}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop edge perf and reliability B V18&lt;br /&gt;{404d7895-6690-4c31-817e-fdea01bd62fb}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Network Troubleshooter V1&lt;br /&gt;{40d02040-8e40-4c22-806c-8a0a6094a6c0}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop UIF Windows AutoPilot V1&lt;br /&gt;{411dbe5e-70fe-42e7-b7e1-5650dface6e1}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Appv Logs collection V5&lt;br /&gt;{41366b51-d01b-4b9b-8161-62a4b0a96a82}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop MMX Single Escalation V1_1&lt;br /&gt;{416461cd-ebf6-4c9b-831e-0e6a0e34e6d8}&lt;br /&gt;&lt;br /&gt;UIF Start Repro AAD Desktop V4&lt;br /&gt;{4181bd04-e0ce-4c20-92a5-1aaf225c59e1}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Battery Diagnostic V1&lt;br /&gt;{418d79eb-3225-477b-9e06-b5123dfb7bf9}&lt;br /&gt;&lt;br /&gt;UIF_FeedbackHub_Diagnostics_Desktop_V6_OdD&lt;br /&gt;{41d42eec-864d-4fbe-9236-2c558c5f3933}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop InputCore_UifReproMode V3&lt;br /&gt;{42b5cc74-5039-4aa1-8bfd-c498e4335f6d}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Sensors and DxgDiagnostics  V6&lt;br /&gt;{42ce5a79-cc32-46cd-b033-2ec7d20d6b40}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Console Desktop V1&lt;br /&gt;{430259e4-b04a-412b-ac7a-d15bfddf2cc4}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Miracast V7&lt;br /&gt;{4307415e-1fb4-4f9a-a90a-bdb255cef642}&lt;br /&gt;&lt;br /&gt;UIF GatherLogs for DisposableVm_v2&lt;br /&gt;{43836084-f739-49a9-984b-a27fa3024c1a}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Windows Defender Desktop V3_3&lt;br /&gt;{43ab589c-f98a-42c9-b4a4-b3d2822801f6}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Windows Hello V3&lt;br /&gt;{44453b04-0c8d-4e91-ba38-80c5591525de}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop InputCore V6&lt;br /&gt;{44ba82a6-4b1f-4a97-a99e-1c3aa23e3511}&lt;br /&gt;&lt;br /&gt;UIF Feedback Exploit Protection Get MpSupportFile V0b&lt;br /&gt;{44e925d9-6228-4e6f-8776-9f9dec919808}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Speech Desktop V2&lt;br /&gt;{45395588-d8ec-4fe6-940a-f6879d10fbfe}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Start Apps V04&lt;br /&gt;{45938623-f12a-4168-8593-51d168104154}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Fax V1&lt;br /&gt;{45bc6753-5cdf-4c20-bb8e-5dc6434539b7}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop collect bluetooth peripherals V1&lt;br /&gt;{45df0ae7-322b-44c7-8260-9e24777facfb}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop RemoteDesktop V5&lt;br /&gt;{4603b00d-b86d-44cb-9fad-0941fb530957}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Networking Diagnostics for V4&lt;br /&gt;{46756d5a-090b-4f5f-8b2b-a84b3359e2b6}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop GameMode Performance V3&lt;br /&gt;{46d7bbda-a31c-41c2-9d31-44e2697fc211}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro DesktopEnv_AllOtherIssues Desktop V1&lt;br /&gt;{46ecb3ca-354a-448d-b337-f2633e2402c2}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Cancel Mixed Reality App Perf&lt;br /&gt;{4749367c-76ae-4275-ba2d-0da410e973ae}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop LogInkSamples V1&lt;br /&gt;{47709416-ec87-446d-85e6-19555e7d507c}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Sensors Traces Desktop V1&lt;br /&gt;{477a7dc6-43dd-4532-a60f-1c2fc357078c}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Hello Face V2&lt;br /&gt;{487be920-855e-4c9b-9e37-8d6b5668b542}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop ProjectRome V5&lt;br /&gt;{490e85ce-db07-49fe-9a56-7e4478c51028}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Storage Sense RS2 V2&lt;br /&gt;{49e09ca9-3a9c-468e-b64c-11814a3417fc}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Stop HeT v01&lt;br /&gt;{4ba47043-f5eb-4180-a442-f58e32d59ae9}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Sensors with power and display V2&lt;br /&gt;{4c098fd5-ff8a-44da-a889-d5fe185a59f9}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Holograms Desktop V2&lt;br /&gt;{4c3d2c61-d97b-4e8d-b70e-fd40e6885b2d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Office Centennial Desktop V3&lt;br /&gt;{4c496748-62c5-45e9-8b4b-4bf23df891ae}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop DotNET Performance V2&lt;br /&gt;{4c8c404c-e979-465c-8469-1952d971fb88}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Dynamic Lock Desktop V1&lt;br /&gt;{4d68f605-3981-44a2-b61b-6f1783e10850}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop TextInput V3&lt;br /&gt;{4dadfc12-15e2-4015-abe3-e72a2b18b308}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro for InPrivate Desktop V1&lt;br /&gt;{4e1a6093-7b86-4cfc-8489-d76522361a5d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Adapter Selection and Detach V2&lt;br /&gt;{4e24f853-ec05-4c59-b600-5986cf78ac5a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop EDP_EnterpriseDataProtection V41&lt;br /&gt;{4fd01fc5-43a5-432e-a472-24011dde28fd}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Storage Sense RS2 V2&lt;br /&gt;{50414862-17a3-4a4a-aa95-69c68fa98b58}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Speech Desktop V3&lt;br /&gt;{504c24e7-2d26-4844-8c15-bd90d22d51e4}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro DesktopEnv_AllOtherIssues Desktop V1&lt;br /&gt;{507a6d12-ccd8-46f1-a626-712f84af08c7}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Point of Service Desktop V2&lt;br /&gt;{50fc13bc-d15f-4ded-b6cc-b2f27a6860aa}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Single Escalation Scan V2&lt;br /&gt;{512ee513-4604-459a-bb4a-fbac94c94096}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Notifications and App Services Desktop V2&lt;br /&gt;{52b2b567-b9c1-4284-8212-3e1ce431129e}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Point of Service Desktop V2&lt;br /&gt;{535621d9-1c91-4e94-8731-856c0737b6c7}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Layout Import Tool Preview  V1&lt;br /&gt;{54449682-190f-443d-887d-b2d75d44c228}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect Console Configuration V1&lt;br /&gt;{553031ca-2598-4414-9e2a-7a83544a0497}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Windows Hello Face V1&lt;br /&gt;{5566f15d-a8cb-42b4-a77a-51b92a2cb6ed}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop InputCore V6&lt;br /&gt;{55e90a32-8e05-4022-9746-78cc8d345c4e}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Dynamic Lock Desktop V1&lt;br /&gt;{5694b10f-be95-4a0c-8c3d-b3024195ceba}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro BingNews Desktop V2&lt;br /&gt;{56ed2b41-771c-4a05-b22f-b1f937d381dc}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Screen Sketch Diagnostics V1&lt;br /&gt;{57689d94-ef8f-45a5-a293-e8d8feb54c87}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop StartTpmTracing V1&lt;br /&gt;{5831a485-8c8f-407e-a290-c15319e3a59d}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Import Tool Preview V1&lt;br /&gt;{583a7efc-30b5-4515-90bf-fec0d9303328}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop EDP_EnterpriseDataProtectionOnSubmit V3&lt;br /&gt;{598947cb-e4ed-4861-b10e-f07500d8a0b0}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro RemoteDesktop Settings Desktop V3&lt;br /&gt;{59b91f8d-a9b6-42c8-b1a2-9810047c3bdf}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro TabletMode Desktop V1&lt;br /&gt;{59bbf79d-c7d1-4b59-8838-a32b227c8abb}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop TextInput V3&lt;br /&gt;{59bdd866-9382-400b-b05b-512791110ee9}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Legacy Taskbar V2&lt;br /&gt;{59fe570d-88ae-4dd5-bb75-82b3b63fb9f4}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Print V8&lt;br /&gt;{5a28d3fd-486e-4b8e-bcae-823940081825}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop MMX V5&lt;br /&gt;{5b85f6d7-2aa5-4479-afab-b84f52563304}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Print V8&lt;br /&gt;{5bac69db-fb12-4db9-b92e-2cfc7e3489d0}&lt;br /&gt;&lt;br /&gt;UIF Start Repro EDP_EnterpriseDataProtection Desktop V4_Up_OdD&lt;br /&gt;{5bad3c4b-a76a-4329-bb3c-7b75aa2698a5}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop CollectWebAuthNTracing V1&lt;br /&gt;{5bbf4656-cfd2-4104-83a9-2f05fe4b8800}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Default Collect WER ETW_V5&lt;br /&gt;{5c1dd6f3-5183-4bdc-bbb9-83b4f81db454}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Mobile Plans repro mode V1&lt;br /&gt;{5cb49c2e-7d31-426d-920d-4d9552b24797}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop GMD Diag V1&lt;br /&gt;{5dde1a8e-9aa4-4d1c-8bc2-05b5e195ce35}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro My People Desktop V1&lt;br /&gt;{5e173904-98ae-49f2-b8a2-d9924218cbf5}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Near Share Desktop V3&lt;br /&gt;{5e69551d-4961-4368-b0c9-adbc70b1b312}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro File Explorer Desktop V8&lt;br /&gt;{5f4997fc-df3f-44b8-b2b8-1949c9f332c8}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Wireless Network V9&lt;br /&gt;{5fe33936-3a83-4d8e-94ae-fddee53896c7}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Unistack Diagnostics V5_OdD&lt;br /&gt;{603c8b2b-c686-4453-861f-61bbfeaff515}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Groove Desktop V7_1&lt;br /&gt;{6230e2ac-1788-44ed-8db6-c859e12fc1a4}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collection SetupAPI logs V1&lt;br /&gt;{6330bba1-2637-4af7-b6f0-d7e7dadc1e08}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Sensors and DxgDiagnostics  V6&lt;br /&gt;{63fceabd-5917-4471-a566-0a681787beff}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Edge Feedback Diagnostics Collector V18&lt;br /&gt;{647053dd-1610-4571-8a5f-18003b32a8f9}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop SenseReproMode V1&lt;br /&gt;{6494da14-d4e9-4ab2-b75e-35dfdc1bc9c9}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro ShareUX Desktop V2&lt;br /&gt;{65f82437-c684-436d-ab69-4b4a1676c28d}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Stop Apps V03&lt;br /&gt;{66bff480-0d11-4708-99f8-991f2f96e294}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Oasis Drivers V1&lt;br /&gt;{67b194a6-d520-4bb7-baa1-bbe5af6fd1c1}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Your Phone UWP App V4&lt;br /&gt;{680c1ca0-e71f-4d22-980a-92fcd7e4abac}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop SenseReproMode V1&lt;br /&gt;{68d5fd28-8b81-4fad-af16-13ba1a85358c}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Appv Logs collection V5&lt;br /&gt;{68e0a643-8d92-440e-ba43-8383550dd0d7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop hard buttons and all USB V6&lt;br /&gt;{69323674-f859-452b-aafa-ac5d91b933f0}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop GameMode Performance V3&lt;br /&gt;{6950b52e-c374-4347-92d4-844610358b2a}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Cortana BT Speech Audio Traces V18&lt;br /&gt;{69f818ba-d102-40ee-b9d1-b2b331375d2c}&lt;br /&gt;&lt;br /&gt;UIF Desktop Repro Stop GSE v03&lt;br /&gt;{6a223731-19f0-4d58-a628-1ac8e487875d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Microsoft Remote Desktop Preview Desktop V2&lt;br /&gt;{6a446886-c41a-4ee7-ba24-e48c2a105c46}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro for InPrivate Desktop V1&lt;br /&gt;{6a8b218d-035b-4e37-b1b2-70c45d681d65}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Layout Preview V1&lt;br /&gt;{6af8d922-9630-4f86-86f7-5f84533d4dfd}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Get TPM Logs V1&lt;br /&gt;{6b046470-9e2c-4a29-b605-235e4aec2ac6}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop hard buttons and all USB on V3&lt;br /&gt;{6bb71eec-ee62-4bce-a8d3-077408519e34}&lt;br /&gt;&lt;br /&gt;UIF Graphics Desktop Issues Filed V15&lt;br /&gt;{6d130442-a44c-4426-8919-0568f1f4bd44}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Cortana BT Speech Audio Traces V18&lt;br /&gt;{6da1003e-02f9-47e7-9547-6dc010b438f3}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Smart Card Single Escalation V2&lt;br /&gt;{6db66a01-e05e-4677-b08d-b42831ad5e88}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro File Explorer Desktop V8&lt;br /&gt;{6e78b688-c88b-4661-8a35-9198014cbf43}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Import Tool Preview V1&lt;br /&gt;{6ea555a5-a6b5-4f82-aeee-c649d4515f00}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop VisualDebuggerScenario V1&lt;br /&gt;{6ed0e80f-2d94-4242-ba24-96501c52feb2}&lt;br /&gt;&lt;br /&gt;UIF Desktop Repro Cancel GSE v03&lt;br /&gt;{6eea31d8-2c02-47db-bb1f-1c9e969eb89b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop WindowsUpdateClientVerboseLog V1&lt;br /&gt;{6f0e3ac3-33e5-4136-8e8e-432649da3a2a}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Cortana OnDemand V1&lt;br /&gt;{6f206459-9d46-4616-b676-68227ad385b4}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop USB Panther and SetupAPI Logs V1&lt;br /&gt;{6f96bdf1-caa1-481a-828f-084c0f117e2c}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Sensors Traces Desktop V1_5&lt;br /&gt;{6fc373cd-8aac-44bb-84a3-c9e63e46f20d}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Plans OnSubmit V2&lt;br /&gt;{6fe8d13c-4384-404c-8663-3f1a145681f6}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Themes Desktop V1&lt;br /&gt;{70eecf2c-797a-4e19-8dbc-9d72f6f543da}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Notifications and App Services Desktop V2&lt;br /&gt;{7158e8cc-2aa4-4ba1-b6ab-8c5101132542}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop InputCore_Touchpad V6&lt;br /&gt;{7161313c-e5ab-4c54-89b6-8706718d49eb}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Edge Favorites Diagnostics Collector V1&lt;br /&gt;{71c8902e-980d-42a9-a712-f65acc008289}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Themes Desktop V1&lt;br /&gt;{71f2397e-d2aa-4e17-88af-ea54b75c60bb}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Near Share Desktop V3&lt;br /&gt;{740e0614-7c9b-4678-9c01-cdebc09b9a2f}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro My People Desktop V1&lt;br /&gt;{7416a24f-7e07-4f6c-9eda-0750f5e94142}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Defender Smartscreen V1&lt;br /&gt;{74b9f03a-fc5d-4c9f-8c4e-f4c610f1ea99}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Oasis WebVR V1&lt;br /&gt;{74ca3dd5-697a-4cca-9086-937860306512}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Tabbed Sets Repro Mode V2&lt;br /&gt;{74d095a6-85c2-45a1-9b58-c33a2b286187}&lt;br /&gt;&lt;br /&gt;UIF Connecting to a Wireless Network General V16 _OdD&lt;br /&gt;{75453872-9f44-49e5-8256-2db7ab478eb3}&lt;br /&gt;&lt;br /&gt;UIF Desktop Repro Start GSE v03&lt;br /&gt;{755272b3-ebe1-4eae-853c-45fd554296c0}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop hard buttons and all USB V6&lt;br /&gt;{755f80b9-171f-4d07-8c7b-21ace9ec8c60}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Photos Diagnostics V5&lt;br /&gt;{7578ce91-cbb4-4201-be11-1632c0a5577e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop CollectWebAuthNTracing V1&lt;br /&gt;{759a8cb2-8f24-4b7b-8483-ba4a9416309d}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Spaces Test V1&lt;br /&gt;{76046e63-d450-40c8-aebb-8689a9a9743d}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro BingNews Desktop V2&lt;br /&gt;{7885b7cc-ec00-4e8a-820a-0e3fe9ffa9bf}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro_Camera_PC_RS2_V2&lt;br /&gt;{79041b4a-f2e4-42be-b594-6393ae3b2a89}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Update WSD EUP Logs V17&lt;br /&gt;{79689e5c-819f-4654-a67d-2eb5325c216b}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Start Apps V03&lt;br /&gt;{7a623c54-8953-4035-a8f7-efd77b454753}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop ProjectRome V5&lt;br /&gt;{7b105433-0ba4-46cb-9214-c1b40776b9bd}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Legacy Taskbar V2&lt;br /&gt;{7b71f8c9-9349-4d46-845c-48a8ae4fc8c0}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Networks All other issues Diag V3&lt;br /&gt;{7befe0af-eb07-4fd8-868c-46d81e306ca7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Networks All other issues Diag V3&lt;br /&gt;{7c5e1a01-bbc3-47be-9225-68036b8bb827}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Testing Push Context V1&lt;br /&gt;{7d23a0ce-7925-4749-bc9c-b584e97591aa}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop edge perf and reliability V13_A&lt;br /&gt;{7d37b0d3-7e4c-4d06-b87e-aa63775126f4}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Unistack Diagnostics V5_OdD&lt;br /&gt;{7de98bcc-94f3-44de-b82d-01197a1f3502}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Single Escalation Whiteboard V1&lt;br /&gt;{7e21a1db-8ff9-42dd-96a5-0b611a01eeea}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Unlock V2&lt;br /&gt;{7e3ca239-625b-4926-9630-8350a5d72025}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Developer Mode V1&lt;br /&gt;{7e7b49a3-ec9c-4fdb-ace8-839bdf3c4263}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Power diagnostics V18&lt;br /&gt;{7ed6dade-6bc1-41b8-b1bc-28d00baeda00}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect WU and Setup Logs V1&lt;br /&gt;{7f3cc013-760b-4ed1-bf6d-88757f242d34}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Start Mixed Reality App Perf&lt;br /&gt;{7f48bb27-398f-4e69-9bb0-4c8401ed48e2}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop RS 3D Print V2&lt;br /&gt;{8014092e-5ed2-4829-b8bf-6a03aeab75f8}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop SendFeedback V1&lt;br /&gt;{8056b1db-7dda-47b8-9bf7-a292458e0328}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Adapter Selection and Detach V2&lt;br /&gt;{81069b84-3e6f-420f-9a56-b5aebbc38bcf}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Apps V6&lt;br /&gt;{81a7e156-2197-45a5-bea4-84638c6714d1}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Layout Preview V1&lt;br /&gt;{81d7a140-4cc2-4641-b1f5-e1452da063c1}&lt;br /&gt;&lt;br /&gt;UIF Collect WER Registry Keys Desktop&lt;br /&gt;{825ee27c-329f-48b0-9c14-3828bbe8e8ce}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Location Diagnostics V3&lt;br /&gt;{82b7a4f8-e91f-4a8c-8343-37a8a5b84f2d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro StartMenu Desktop v2&lt;br /&gt;{82e7ce3f-8f47-44ad-b168-5877285714ac}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop InputCore_Touch V6&lt;br /&gt;{833a5ac0-0633-472c-aa6d-dd2113ffc11c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Groove Desktop V7_1&lt;br /&gt;{840a2e33-5905-483d-8687-865d9cc58fc0}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Testing Push Context V1&lt;br /&gt;{840dadb1-0b74-4d94-bf1f-58c8ba78da10}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop GameMode Performance V3&lt;br /&gt;{84560595-a3a4-4329-946d-0568882d9dcf}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop CollectWebAuthNEventLogs V1&lt;br /&gt;{84cd16b7-20b5-46a4-97e3-3598d649c43c}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Battery Diagnostic V1&lt;br /&gt;{8580df8a-8225-427e-a909-16f46fdd39c9}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Photos Etl Diagonostics V1&lt;br /&gt;{85d05dc8-53b8-4af2-81d3-2082a605f03d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Sensors and DxgDiagnostics  V6&lt;br /&gt;{85ff9604-a9ff-4db4-874f-13204490922b}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Mobile Plans repro mode V1&lt;br /&gt;{861ff344-d4f4-45da-991e-60fa170430eb}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop WER Diagnostics&lt;br /&gt;{86309b89-6f35-4d59-be20-ca75c25c399e}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Remote Access Diagnostics for V10&lt;br /&gt;{866e77f0-ae8f-48ed-bc48-101764ddea38}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Theme Data Retrieval Other Context V3&lt;br /&gt;{8689af5c-60d4-4e45-addc-01055cd21af0}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro AAD Desktop V4&lt;br /&gt;{872c6eef-b523-4405-9e7b-758546ed6b8d}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Desktop Media V4&lt;br /&gt;{87314986-c507-474e-aca6-43a92da2850b}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop ConnectingToCellularNetwork V3&lt;br /&gt;{88164236-3601-444d-891a-a3f726a85eb6}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Flight Settings Fix Me V1&lt;br /&gt;{88ee8bff-5a9e-401a-bdcf-e6ad1c638baf}&lt;br /&gt;&lt;br /&gt;UIF Client State Roaming desktop v08_RSTrig_OdD&lt;br /&gt;{89ab9b87-5b60-41a6-bc0a-5c39feaa59b2}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Spaces Test V1&lt;br /&gt;{89ed3f06-9040-43f8-97d0-0df1030667be}&lt;br /&gt;&lt;br /&gt;UIF MoviesAndTV Desktop Repro Stop V1_1&lt;br /&gt;{8a54ab04-0d7a-449a-a605-d838f07f82a9}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Apps V6&lt;br /&gt;{8a737dda-9fe5-4a10-a8b0-0ac42c6a28be}&lt;br /&gt;&lt;br /&gt;UIF Game Bar Dxdiag and Regkeys Desktop V4&lt;br /&gt;{8aa39e8c-762a-4984-a1ce-6f1a1ff7b2c5}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop HxOutlook_GetLogsOnSubmit_Desktop V1&lt;br /&gt;{8ad145a2-96af-4273-b242-3c7d077cc653}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Edge Feedback Diagnostics IEDiag V3&lt;br /&gt;{8c7a598f-3b32-4d4e-9954-b48472ec78e4}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop ES Collect Logs&lt;br /&gt;{8c8d0e45-7248-4c79-a13c-dececdc514d7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop TextInput V3&lt;br /&gt;{8ce3638a-5c7b-40de-b6fc-5af77ec9e1b3}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Tips App V1&lt;br /&gt;{8da8bc0e-e7c5-4c97-807f-85b0a7096981}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop hard buttons and all USB on V3&lt;br /&gt;{8dbfd931-6f65-4d6f-9a1d-0e24c300bb3a}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Photos Diagnostics V5&lt;br /&gt;{8ddd18a8-64a0-4389-92b1-6f443b934fd1}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop audio V1&lt;br /&gt;{8e1773fa-336a-421d-b51d-bb1168875cfe}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Oasis Default V11&lt;br /&gt;{8e8b9bdf-6f58-4135-8d8d-7088a92d9dd8}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Language Region V2&lt;br /&gt;{8e950476-e85c-4d3c-a7ac-1bb8fc402373}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Smart Card Desktop V1&lt;br /&gt;{8eb569e8-e3c3-4187-a85a-619fe751c54e}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Holograms App V3&lt;br /&gt;{8ee8e62d-a7fc-4fda-ab77-eed40da60300}&lt;br /&gt;&lt;br /&gt;UIF Start Repro_Camera_PC_RS2_V2&lt;br /&gt;{8f45f11c-713f-4d91-b5b8-bb915e8f16e6}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop hard buttons and all USB on V3&lt;br /&gt;{8f9783fe-fab7-4c64-9e5e-1d0cf4690cc0}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Desktop Media V4&lt;br /&gt;{9048e233-50f5-42cc-8a04-88b377279aa7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop MMX V5&lt;br /&gt;{904cddba-c129-42b2-9bec-868f82ac8056}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Flight Settings Fix Me V1&lt;br /&gt;{9073516e-7e4d-4065-b8ae-6cf492d716d5}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop DxgDiag and Game Perf V10&lt;br /&gt;{90c294f2-ebb3-4d1d-9507-14f2e5857929}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Whiteboard Performance V1&lt;br /&gt;{9103f7c1-b3c2-4ae7-9150-e8dfd048abbe}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro Desktop Media V4&lt;br /&gt;{91c9b277-9afc-4f78-b903-6b75e47430be}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop InputCore_UifReproMode V3&lt;br /&gt;{91f753cb-8818-4a05-9931-c2824bda93cc}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Speech Desktop V2&lt;br /&gt;{9230dcec-6978-4aed-ad29-956b8309117a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Your Phone UWP App V4&lt;br /&gt;{92584cde-0f07-40ed-8146-480c2bfe1f3a}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Clipboard Diagnostics V8&lt;br /&gt;{92df99eb-f573-4591-80de-fa4e8ff9d76d}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Defender AV GetMpSupportFile V10&lt;br /&gt;{9306c13c-4cc1-48a3-b6ed-3ace76d25e7e}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop DeveloperInsightTools V1&lt;br /&gt;{94173fca-4a53-40b5-925d-64cb5f911fcb}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Windows Hello Face V1&lt;br /&gt;{941aca7f-add6-4004-ae45-f05e9109f3c6}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop DotNET Performance V2&lt;br /&gt;{94d418ad-05ad-470b-b701-ac55b783f61b}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Timeline V2&lt;br /&gt;{9687d1bd-d317-4e02-b85a-8c3a1f660695}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Scan Desktop V1&lt;br /&gt;{96da630d-8e96-48a4-863d-e7e4bb45dbc9}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop hard buttons and all USB V6&lt;br /&gt;{96fc46a3-62f5-4785-9562-cd7b323d805a}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Bitlocker Desktop V2&lt;br /&gt;{975e4762-5e34-465c-9867-9c45ac2fab55}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop System Settings V3&lt;br /&gt;{978e9adf-cd74-47db-ba2c-c6e30065d8b5}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop DeveloperInsightTools V1&lt;br /&gt;{97b5defe-5c23-4b46-894e-4290d517539d}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro AAD Desktop V4&lt;br /&gt;{982a79f5-2695-4eff-a7e2-192e15dc3e3d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop InputCore_Touch V6&lt;br /&gt;{98b043da-e712-45d1-8a67-1985a89df3d3}&lt;br /&gt;&lt;br /&gt;UIF Start Repro AppDepQ DESKTOP Redstone&lt;br /&gt;{991e8e5e-0b03-4f8e-adb6-734c90c29b94}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop LogInkSamples V1&lt;br /&gt;{9a01313d-7140-486d-8d9e-48e0212d581e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop UEV Logs collection V4&lt;br /&gt;{9a4db8c5-cb51-4d6d-9a50-dc24b4a9b2f2}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro for DisposableVm_v2&lt;br /&gt;{9a96ce93-ffcc-4cf5-beaa-6cdf292c5078}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop System Settings V3&lt;br /&gt;{9b5d2e39-b2e7-4e32-9cf3-611ca859e52f}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Location Diagnostics V3&lt;br /&gt;{9b82e2b9-d7fa-4138-bbf7-aea4b42f5247}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro for DisposableVm_v2&lt;br /&gt;{9bb0f66a-2641-4585-973d-feafaf8b1e00}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro ShareUX Desktop V2&lt;br /&gt;{9c6db627-471d-43d6-86e6-b44253bb16b2}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop ProjectRome V5&lt;br /&gt;{9c6f882c-2caf-4ce2-968f-67b0e6c94f79}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop action center repro mode diag V1&lt;br /&gt;{9cb4add8-129a-4c4c-9de8-1b806a5c3574}&lt;br /&gt;&lt;br /&gt;UIF GatherLogs for WDAG Edge V8&lt;br /&gt;{9cd7a4a5-a671-4fae-af46-c7cfd1e5c20c}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Network Diagnostics V6&lt;br /&gt;{9cdf0394-6c72-4239-87e5-1db95ebf6b6f}&lt;br /&gt;&lt;br /&gt;UIF Performance WindowsDesktop Cancel Repro V4&lt;br /&gt;{9d4fc3a5-16b2-41bc-a3cf-d542a0a89fd4}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop edge perf and reliability V10_1&lt;br /&gt;{9ddb675a-8714-401f-a753-01621640c268}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Whiteboard Performance V1&lt;br /&gt;{9e718a16-27da-42e2-bb37-8808bea5cebe}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Scan Desktop V1&lt;br /&gt;{9e9f97fc-e57b-4091-a380-a5818af21c40}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Mobile Plans repro mode V1&lt;br /&gt;{9ed50621-8678-460f-b94f-0fcf210633b9}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro AltTabTaskView Desktop V1&lt;br /&gt;{9fcf743d-3ffc-4aef-b8c8-4c8120d3e25a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop UEV Logs collection V4&lt;br /&gt;{a18188cd-008e-47fb-a708-7936433d1e03}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Collect_Search_Core_Logs V1&lt;br /&gt;{a1d4f111-a57d-45cc-8c10-1ebde5caa270}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop NFC Diagnostics V1&lt;br /&gt;{a21385da-2b0d-4747-8eb3-f9a909dcfdc5}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Screen Sketch Diagnostics V1&lt;br /&gt;{a236cdfd-2fd3-4130-8f7b-fd4968695eb1}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Get general VPN client diagnostics V1&lt;br /&gt;{a25f0350-39c9-4eeb-8bb7-7ac0a202d198}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Windows Hello Face V1&lt;br /&gt;{a4e23a93-ae98-443b-8e30-e9a542680260}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop TDP File Collection V2&lt;br /&gt;{a530b39c-beb7-4d05-9e19-007bddfdee45}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Windows Defender Desktop V3&lt;br /&gt;{a63103b9-de28-470e-bffb-5e4cfb35b50b}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro TabletMode Desktop V1&lt;br /&gt;{a6389291-2132-4cc9-b561-9edc800f55c8}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop SenseSnapshotMS_V4_1&lt;br /&gt;{a6513534-5935-4d48-9260-257aa6621d09}&lt;br /&gt;&lt;br /&gt;UIF Groove Desktop Diagnostics V5 RS&lt;br /&gt;{a68a4d0d-ccf1-44e4-8a4e-107cd2916860}&lt;br /&gt;&lt;br /&gt;UIF Start Repro for InPrivate Desktop V1&lt;br /&gt;{a6d18f0e-9670-4997-935e-9ab9b8f7034e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Pdf Load Fail V1&lt;br /&gt;{a6e8574a-50a8-4f7d-93fc-c6effdb65dd9}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Stop Mixed Reality App Perf&lt;br /&gt;{a6f6e005-f53b-444b-825c-1611faf61c47}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Themes Desktop V1&lt;br /&gt;{a7598155-7875-4450-b66f-ff6723b174e8}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop System Settings V3&lt;br /&gt;{a7b0d03a-54b5-476f-980a-7bce579a1eac}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Cancel Apps V03&lt;br /&gt;{a7bab404-15b8-4ea8-9c6b-7d4f9bd39f9c}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop MDM And AAD V4&lt;br /&gt;{a7bb2eb2-4259-4b26-9662-4be06d8262c6}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro x86AppsOnARM64 Desktop V1&lt;br /&gt;{a861c789-6a8c-4e9c-899c-3edf8c20fcc9}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Language Region V2&lt;br /&gt;{a9318d60-dc0b-4ac9-8a7c-5371f869a98b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop DirectAccess Diagnostics V5&lt;br /&gt;{aaaa71ad-9cd3-48de-b063-420f4d028aa3}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop IoT Diagnostic Logs V4&lt;br /&gt;{ab44810c-eb2c-4c18-86fd-2ab6ac92eca3}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop LanguageOverlay and Settings V1&lt;br /&gt;{acbf8dfe-dbe1-4cfa-86dc-c02372afce20}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Diagnostic AppDepQ Redstone V3&lt;br /&gt;{acfa69eb-9aa9-4d0f-97a2-3ad4a3bb63ef}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop OneDrive Collect Logs V5&lt;br /&gt;{ad40d38f-15b0-44a9-a7bd-6b56d45d77ad}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect Info V1&lt;br /&gt;{ad4aad20-df48-4391-87dd-ebd8e7f305ab}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop EDP_EnterpriseDataProtection V41&lt;br /&gt;{af245430-a187-4906-bc8e-cf83e86bfe27}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Layout GA V1&lt;br /&gt;{af57bddf-7b92-4b49-8ed5-41106647e723}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Layout Preview V1&lt;br /&gt;{b0066f4a-af90-4997-a40a-35c369181050}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Microsoft Remote Desktop Preview Desktop V2&lt;br /&gt;{b03d559d-f48c-436e-bc11-3cdf2c79bc33}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Game Controller Desktop V1&lt;br /&gt;{b0dca884-31b0-47a6-92b6-59915fdf41c6}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Desktop SCOOBE log collection V1&lt;br /&gt;{b138be2f-ae3d-42c0-9a98-1a88e4b6bc6b}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Tabbed Sets Repro Mode V2&lt;br /&gt;{b215ab08-0d0a-4574-820e-4950dffc6fc3}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Networking Diagnostics for V4&lt;br /&gt;{b24ac9ba-1702-47b4-8115-b7fbd6bed174}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Speech Desktop V3&lt;br /&gt;{b2aa558f-36e1-498d-90d3-3c60f749f2aa}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Magnifier Diagnostics V1&lt;br /&gt;{b2c86636-1188-4b2f-9deb-d7e237a4c95b}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Unlock V2&lt;br /&gt;{b2d566e8-0509-4639-b2fa-1b4e2ca5b310}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop audio V1&lt;br /&gt;{b3db13b0-8527-4acf-a74f-5bac67a0e3f5}&lt;br /&gt;&lt;br /&gt;UIF Start Repro Clipboard Diagnostics V8&lt;br /&gt;{b3ee9dcd-6edb-4ec3-8fe7-73d028c95aab}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop ON UWP_ Auto attach diagnostic files V1 V1&lt;br /&gt;{b49ebc69-c303-4793-9801-afda5aef503d}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro AppDepQ DESKTOP Redstone&lt;br /&gt;{b4c09d5a-476f-45f9-bf2c-72852adb5963}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro MFTracing Desktop v6&lt;br /&gt;{b528d8cf-7edc-4190-a06f-0eea9cbe0e32}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro StartMenu Desktop v2&lt;br /&gt;{b5320401-2c8d-41cf-b507-9d497a422e35}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Gather Device Security Data V1&lt;br /&gt;{b553ccbf-233b-4246-a115-fbd8923db2b3}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Groove Desktop V7_1&lt;br /&gt;{b62f1625-7a07-4cd9-be3c-3f9ae4928431}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Tabbed Sets Repro Mode V2&lt;br /&gt;{b6c13d07-eaf6-424e-8f95-34f9556beecf}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop InputCore_Touch V6&lt;br /&gt;{b74d44a3-24b3-46fe-af0c-893e6bece7e2}&lt;br /&gt;&lt;br /&gt;UIF Action Center and Shell stop repro OdD V5&lt;br /&gt;{b82ed50d-471f-443a-aded-f0c7fa889eaa}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Pdf Load Failed V1&lt;br /&gt;{b85be7f2-925d-4b8c-b965-39a0da9227be}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop UIF_Touchpad_V1 V1&lt;br /&gt;{b8ab6952-7357-4d46-8168-ca94f1e598f9}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Messaging Diagnostics V4&lt;br /&gt;{b8daab27-985a-4ae2-b65f-1212ccbd6a67}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Cancel HeT v01&lt;br /&gt;{b955c1d0-6a9f-45b6-8f99-a662aadf509d}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro StartMenu Desktop v2&lt;br /&gt;{b9be84a0-e4b2-4cdc-b025-aad57145954f}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop WindowsUpdateClientVerboseLog V1&lt;br /&gt;{baaffcff-6cc8-4548-bb70-48afb252a701}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop StartMenu Performance V1&lt;br /&gt;{bb2bf37d-1292-4dcb-a754-df92e6511c92}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Layout Preview V1&lt;br /&gt;{bb4b7db6-9265-410a-8be7-46ae7487e415}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop DxgDiag GamePerf GameDVR V2&lt;br /&gt;{bc42529a-e96e-4c5f-9815-213481ffe730}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop GMD Diag V1&lt;br /&gt;{bd10949b-d5c9-4da6-aeaf-66d13cdf2cb4}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro x86AppsOnARM64 Desktop V1&lt;br /&gt;{bef04658-aa4b-4273-8dd1-d9f829ebff85}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Legacy Taskbar Single Escalation V2&lt;br /&gt;{bef8798f-26de-46a2-a469-0e0676567947}&lt;br /&gt;&lt;br /&gt;UIF Oasis Repro Cancel Apps V04&lt;br /&gt;{bf36f76d-df1c-4d76-9f31-aed7eae383df}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop edge perf and reliability V13_A&lt;br /&gt;{bf8de646-8ef0-433b-b11e-44ae48b33241}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Enterprise Management Issues V6&lt;br /&gt;{c0166ed0-715f-42d6-b0d1-1915938e32ce}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Timeline V2&lt;br /&gt;{c0c4a0e0-c6fa-4249-a132-4fc9544c40af}&lt;br /&gt;&lt;br /&gt;UIF MoviesAndTV Desktop Repro Cancel V1_1&lt;br /&gt;{c160b624-aa09-4caa-82f7-ef5bcd725690}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop MMX V5&lt;br /&gt;{c28b6216-95cb-4ead-977d-edd696e078a8}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro MFTracing Desktop V6&lt;br /&gt;{c3296ff1-b6b5-4c87-9647-99849fe789d8}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop GameBar UWP Repro Diagnostics V1&lt;br /&gt;{c3862933-978a-4584-9291-96c725869d2e}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Network Diagnostics V6&lt;br /&gt;{c3ae7a25-ac58-45ee-995d-88bda7e36462}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Game Controller Single Escalation V1_1&lt;br /&gt;{c40e7a36-cece-4d55-b917-1cf37f71c88f}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Hello V7&lt;br /&gt;{c49eeb4d-eeb3-40ee-9312-47d569d21937}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Unlock V2&lt;br /&gt;{c4c2ec19-1e7d-498c-bc7a-4bd9dd44f609}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Deployment Issues TH V6&lt;br /&gt;{c4db569b-1095-481f-9ec6-4af7a1069d9b}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro for WDAG Edge V6&lt;br /&gt;{c5fddbab-11b4-4ae5-af98-01b88ffdc515}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro TabletMode Desktop V1&lt;br /&gt;{c633b5bc-5e27-480e-856f-b8a15d416384}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Dynamic Lock Desktop V1&lt;br /&gt;{c66e8fad-5989-4028-a0cc-0f52f5cc2cb0}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop SurfaceCheck V1&lt;br /&gt;{c78421b4-b67f-42f7-9d18-3a6e4fca9afd}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop HDR Collect DxDiag and DispDiag V2&lt;br /&gt;{c786566f-515d-45c4-b823-c3d980c9671a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop NFC Diagnostics V1&lt;br /&gt;{c8262517-2d73-4cb3-b42b-8c65c7f7d61f}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro WindowsDesktop Global Networking V6&lt;br /&gt;{c857a05e-e95c-4168-96a5-93e7943c0f72}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Console Desktop V1&lt;br /&gt;{c88c1383-a684-47e7-a0e0-b7e6302e1740}&lt;br /&gt;&lt;br /&gt;UIF Performance WindowsDesktop Stop Repro V4&lt;br /&gt;{c902d3f3-3fe6-4ea7-8453-efe441e64f76}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop RS 3D Print V2&lt;br /&gt;{c9710607-2759-4796-960f-9d6bb1f3e7ae}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Adapter Selection and Detach V2&lt;br /&gt;{c9a35f75-d72c-461a-bfa2-83df2842493c}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Game Controller Desktop V1&lt;br /&gt;{ca6da57b-e115-4510-9289-bfeb73b87f65}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Miracast V7&lt;br /&gt;{cafdee3f-474c-4f02-bd42-da8146cbe984}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Network Troubleshooter V1&lt;br /&gt;{cc163d39-ac1a-4498-befa-e3fc7c12495a}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop ConnectingToCellularNetwork V3&lt;br /&gt;{cd94a470-582f-4acc-94f3-28c19f2b7117}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Networks All other issues Diag V1&lt;br /&gt;{cddb3ea5-632e-4a7d-ad2f-5f3897d2630b}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop StartTpmTracing V1&lt;br /&gt;{cf2fe1b5-289c-4892-bbed-8425cedf1925}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Networks All other issues Diag V1&lt;br /&gt;{d0c9776e-8ca6-41a5-90ef-43ccce7d8701}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Audio Diagnostic V13&lt;br /&gt;{d18be997-4f7a-4029-85e6-96d3ab2754a9}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro ClockFlyout Desktop V2&lt;br /&gt;{d1d27cf4-1a0e-4b4d-af92-c0e305c03189}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Oasis Default V11&lt;br /&gt;{d1faab09-dc7f-498f-b4a5-02ec44cb36aa}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Your Phone App Diagnostics V1&lt;br /&gt;{d20014a4-d534-437c-bcb7-1cbf6105f181}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop CSM Log Files V1&lt;br /&gt;{d247f41e-80c3-48f7-9b56-7ed3986052b7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Spaces Test V1&lt;br /&gt;{d264eb60-4d7d-49a1-93fe-67406944fcd1}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Networking Diagnostics for V4&lt;br /&gt;{d276621e-a5a2-4c05-a9db-22062a52ba26}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Cortana BT Speech Audio Traces V18&lt;br /&gt;{d28ba84b-5797-462f-84fc-c11778df4a2d}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop InputCore V6&lt;br /&gt;{d446cc65-367b-4996-a46d-1bc79404b047}&lt;br /&gt;&lt;br /&gt;UIF Start Repro for DisposableVm_v2&lt;br /&gt;{d4936d47-9699-4da1-b38e-a21e7cfa0462}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop InputCore_Pen V6&lt;br /&gt;{d5661737-85e7-459d-922d-c801dd02d626}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Photos Diagnostics V5&lt;br /&gt;{d5b19b27-c241-4acc-b080-27e877fe35d7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop GameBar UWP Repro Diagnostics V1&lt;br /&gt;{d6922317-8469-4532-86b8-6c94c8bc6004}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Networks All other issues Diag V3&lt;br /&gt;{d6eefc6c-a337-4c30-a057-c3656e726d71}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Sensors with power and display V2&lt;br /&gt;{d76b409b-e8a7-4058-997c-912db78db83e}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Language Region V2&lt;br /&gt;{d82ecb96-b474-4820-ad79-cf4304a26440}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Oasis Default V11&lt;br /&gt;{d868898b-e8e2-4733-b947-41fdea17da02}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Skype UWP Diagnostics V4&lt;br /&gt;{d86e156d-ee99-43c1-9b67-16638ac5565c}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop DirectAccess Diagnostics V5&lt;br /&gt;{d8a7ab3d-f11a-4979-b67d-3b64ee83a7b3}&lt;br /&gt;&lt;br /&gt;UIF Action Center and Shell cancel OdD V5&lt;br /&gt;{d8c3fbc7-9034-42cc-a183-50c7554370f3}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop DotNET Performance V2&lt;br /&gt;{d8df50d9-03dc-4042-8f31-5bf4d4ce1a63}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop action center repro mode diag V1&lt;br /&gt;{d8edf88a-0509-4e83-8339-04e7ebf0fbca}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Flight Settings Fix Me V1&lt;br /&gt;{d8f16bcb-500b-4d89-8edb-db45e6756540}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop CSS_Troubleshooter_Cab V4&lt;br /&gt;{d97721b8-300c-4399-9fb6-30b136b061bb}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Hello V3&lt;br /&gt;{da0e2dd2-34a5-4526-868c-7b7338f36af0}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Print V8&lt;br /&gt;{db229b98-9889-4e18-8878-4c5102b1af1f}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Office Desktop V4&lt;br /&gt;{dbb2227d-a8d1-40cc-8d5a-3fa9cb356c3b}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Office Desktop V4&lt;br /&gt;{dbb29802-9974-48c0-b000-c8fcfa8ac6d0}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Import Tool GA V1&lt;br /&gt;{dbdd472c-0647-470b-8cb2-acb3443f19dc}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop DxgDiag and Game Perf V10&lt;br /&gt;{dd4e2d7f-0265-4c33-9d8c-f24fb2657300}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop LanguageOverlay and Settings V1&lt;br /&gt;{ddecd228-59aa-41b3-9cae-2fb85d2c086b}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Out Of Box Experience Scenario V2&lt;br /&gt;{de0ab5d5-45bd-4274-87ba-996947aaeceb}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Office Centennial Desktop V3&lt;br /&gt;{de1dca7b-a116-46a0-a47b-994d42f9d3ad}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Basic Time Sync Data Collection V1&lt;br /&gt;{debcfefd-024a-42e8-9210-84a595d5da91}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Global Power V3&lt;br /&gt;{decaac9e-82e3-4e6d-a05c-e443bae5b996}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Collect_Search_Core_Logs V1&lt;br /&gt;{ded98a94-da65-4739-ac6c-ba5a0cbe9424}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Sensors with power and display V2&lt;br /&gt;{dfb764a1-2434-4b6f-9ce1-7a734ca847e9}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Remote Desktop Preview V3&lt;br /&gt;{e04528a4-6a96-4527-b130-b8224de4bfcd}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro WindowsDesktop Global Networking V6&lt;br /&gt;{e08f713c-2719-4974-b2f8-4a603e0465fc}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro EDP_EnterpriseDataProtection Desktop V4_Upd_OdD&lt;br /&gt;{e10b4cdd-0d7b-4a28-b5c8-6c276fd3bb27}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop DxgDiag GamePerf GameDVR V2&lt;br /&gt;{e17178d4-f2cf-4f40-a8f2-359a8aa91b37}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Sensors Traces Desktop V1&lt;br /&gt;{e25127f2-27eb-40e4-8fc6-59239dd54552}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop edge perf and reliability B V18&lt;br /&gt;{e426288e-bffc-4507-a26e-6e98afbb5777}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Bitlocker diagnostics V2&lt;br /&gt;{e4bd6fc4-adfc-49c7-b5d2-8e5fd8fb4c4c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop StartMenu Performance V1&lt;br /&gt;{e5ba9adb-9c47-4a2b-b96f-2350da935edf}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro RemoteDesktop Settings Desktop V3&lt;br /&gt;{e68b3a07-cb46-472f-b321-c0acd6506c48}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Skype UWP Collect logs V6&lt;br /&gt;{e6958e7b-d6f7-4932-a511-2cc5b1bfe252}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Camera_Desktop_RS4 V1_a&lt;br /&gt;{e6a2caa1-54ec-45dd-a922-f0a184049c6f}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop DeveloperInsightTools V1&lt;br /&gt;{e6cb3c03-f0bd-4628-bc3d-f8d0bd5f472c}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro ClockFlyout Desktop V2&lt;br /&gt;{e8dc44ff-028f-463e-89e3-106388956794}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop CollectWebAuthNTracing V1&lt;br /&gt;{e930868d-44e6-4022-a8e4-119d56f7e87a}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop StartTpmTracing V1&lt;br /&gt;{e952feb4-8a76-45ad-a274-3c02f08c6fdf}&lt;br /&gt;&lt;br /&gt;UIF GatherLogs for WDAG Office V3&lt;br /&gt;{ea001d0d-0aba-4e9a-92fb-8c949fca4901}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop edge perf and reliability V13_A&lt;br /&gt;{ea049fca-7f94-4586-9c70-dd0fae65ac9c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop SenseReproMode V1&lt;br /&gt;{eb17ef9a-83e5-4729-89f6-0e7f44263dd4}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro File Explorer Desktop V8&lt;br /&gt;{ecb8d6c8-8abd-44cc-8fa1-7e4fc87a7c79}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop RemoteDesktop V5&lt;br /&gt;{ecbf14c5-c3c2-4537-831c-57a3d80cb1c1}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Network Troubleshooter V1&lt;br /&gt;{ed2939bf-089c-4b9f-be83-f13848d8b2eb}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop StartMenu Performance V1&lt;br /&gt;{ed50f08f-0139-47b8-aeb7-9f855a2d32c7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop action center repro mode diag V1&lt;br /&gt;{ed7a59e2-2d84-4b7f-87e7-c03b339eaa5c}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop AAD V4&lt;br /&gt;{ed88bc31-6b73-4c68-bd41-cce25ecccba4}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Scan Desktop V1&lt;br /&gt;{ee5ee336-07c1-4cfc-8326-a2717a08e8cb}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Start Diagnostic Scenario V11&lt;br /&gt;{eee51ef3-0e7c-4717-8c9e-1ef800264f56}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Storage Sense RS2 V2&lt;br /&gt;{ef0228a0-cadd-4e22-9ef0-e9ce6820e1e7}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro QuickActions Desktop V1&lt;br /&gt;{f0b55b5a-9564-49f7-ac94-6b1ca222a7c8}&lt;br /&gt;&lt;br /&gt;UIF Cancel Repro AppDepQ DESKTOP Redstone&lt;br /&gt;{f0cef3c9-c6dc-4a8e-9b87-4f392326890d}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Magnifier Diagnostics V1&lt;br /&gt;{f0e0d177-6a1d-4e63-9019-5f98f4eb7cbd}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop WDSC Device Security V1&lt;br /&gt;{f10e299c-5cbd-43dd-ac3f-bda4ab94834a}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Collect BT reg keys V2&lt;br /&gt;{f13a2d4a-2c76-485d-a333-2651d1760e85}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro x86AppsOnARM64 Desktop V1&lt;br /&gt;{f1593276-9b9d-4ece-a8d5-ddee0ab37fc5}&lt;br /&gt;&lt;br /&gt;UIF Stop Repro Oasis WebVR V1&lt;br /&gt;{f163a067-8cf3-4db3-98e2-47538dc51ecb}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Apps V6&lt;br /&gt;{f17db946-e6f4-4639-b8e6-4d411330a39a}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop WDSC Device Security V1&lt;br /&gt;{f264738c-25ed-41bb-a6af-b4e7d1cccb3a}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Whiteboard Performance V1&lt;br /&gt;{f367a64d-9176-4ab0-8dae-4307e7c1fb17}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop WindowsUpdateClientVerboseLog V1&lt;br /&gt;{f58f64bc-c1b1-4701-889a-9001d0e3c8a7}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro BingNews Desktop V2&lt;br /&gt;{f5c885b9-6673-4572-a897-b300687beeda}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Location Diagnostics V3&lt;br /&gt;{f676dd4d-a7a6-4c68-9bfe-2ff924886838}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Holograms Desktop V2&lt;br /&gt;{f6f6702c-3254-4c02-80b4-11c61dde54be}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop RS 3D Print V2&lt;br /&gt;{f7a8e6ae-05ad-4dd2-a9b4-c0f7bbbc5204}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro DesktopEnv_AllOtherIssues Desktop V1&lt;br /&gt;{f81f70f4-d137-4db0-b38a-6badbc0ba257}&lt;br /&gt;&lt;br /&gt;UIF Copy Repro_OdD&lt;br /&gt;{f82052cc-aff5-4db8-8964-be01419b2f56}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Windows Activation V2&lt;br /&gt;{f828261f-bcaf-4ed5-a54c-898dca2141f6}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Outlook Diagnostics V13&lt;br /&gt;{f8547925-ebd1-4003-a5d9-6bffcef4079f}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop additional logging V2&lt;br /&gt;{f99a933e-3359-4fe5-9715-113f767240ce}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Desktop Remote Desktop Preview V3&lt;br /&gt;{fa37efb3-9895-41e5-a436-03ec082d3fc8}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Import Tool Preview V1&lt;br /&gt;{faefaa1f-839d-4673-8db3-de359bfd9e78}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Messaging Diagnostics V4&lt;br /&gt;{faf6fe51-aa75-4925-a7e8-b42e64d531d5}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop LanguageOverlay V12&lt;br /&gt;{fb1945ea-3c12-4f66-ae28-5af9cbd7ac1f}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop edge perf and reliability B V18&lt;br /&gt;{fc15dd07-14c9-49b8-bcd0-58ffe584f843}&lt;br /&gt;&lt;br /&gt;UIF OD Start Repro Whiteboard Desktop V1&lt;br /&gt;{fc4c0cae-2c7c-4a4a-ba38-8cc7494e4bd6}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop Camera_Desktop_RS4 V1a&lt;br /&gt;{fd01cfe5-c5be-4804-9a71-15be68859088}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop My People UIF Collection V1&lt;br /&gt;{fda25513-7f57-4338-a32f-d3f00260e90c}&lt;br /&gt;&lt;br /&gt;UIF OD Desktop Hyper V Single Escalation V1&lt;br /&gt;{fe25d779-8d5d-4715-b86d-2374d272e77c}&lt;br /&gt;&lt;br /&gt;UIF OD Cancel Repro Desktop Windows Hello V3&lt;br /&gt;{ff7f9aaf-6f1c-42c5-b219-71b0d4a2b889}&lt;br /&gt;&lt;br /&gt;UIF OD Stop Repro Desktop GameBar UWP Repro Diagnostics V1&lt;br /&gt;{ffead55c-0239-421a-aad4-61e20bbd388f}&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Monitoring DiagTrack HTTPS traffic</title>
    <link href="https://withinrafael.com/2018/11/20/monitoring-diagtrack-http-traffic/"/>
    <updated>2018-11-20T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/11/20/monitoring-diagtrack-http-traffic/</id>
    <content type="html">&lt;p&gt;DiagTrack on Windows 10 checks for a Microsoft root in the certificate chain before downloading its configuration data. This can be bypassed with a test hook conveniently left inside the component. Simply create:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;HKLM&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Diagnostics&#92;DiagTrack&#92;TestHooks&#92;Volatile&#92;SkipMicrosoftRootCertCheck&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and set it to 1.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Unblock NVIDIA Control Panel Store App</title>
    <link href="https://withinrafael.com/2018/10/09/napkin-notes-unblock-nvidia-control-panel-store-app/"/>
    <updated>2018-10-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/10/09/napkin-notes-unblock-nvidia-control-panel-store-app/</id>
    <content type="html">&lt;p&gt;I wanted to get an early look at &lt;a href=&quot;https://www.microsoft.com/en-us/p/nvidia-control-panel/9nf8h0h7wmlt&quot;&gt;NVIDIA&#39;s Control Panel app in the Microsoft Store&lt;/a&gt; and ran into the error: &amp;quot;Supported NVIDIA Driver is not installed on your system.&amp;quot;&lt;/p&gt;
&lt;p&gt;It appears this experience is currently bound to OEM machines, but can be turned on with a registry tweak.&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;HKEY_LOCAL_MACHINE&#92;SYSTEM&#92;CurrentControlSet&#92;Services&#92;nvlddmkm&#92;FTS&#92;EnableRID69527=0x1&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Import Your Own MP4s Into GoPro Quik</title>
    <link href="https://withinrafael.com/2018/09/15/napkin-notes-manage-gopro-quik/"/>
    <updated>2018-09-15T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/09/15/napkin-notes-manage-gopro-quik/</id>
    <content type="html">&lt;p&gt;GoPro Quik scans your MP4 media and refuses to load them into the app if they didn&#39;t originate from a GoPro device. You can fake out Quik by adding GoPro metadata to your MP4 metadata.&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;ffmpeg &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;i unsupported_input&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;mp4 &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;c:v &lt;span class=&quot;token function&quot;&gt;copy&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;c:a &lt;span class=&quot;token function&quot;&gt;copy&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;metadata:s:v:0 handler=&lt;span class=&quot;token string&quot;&gt;&quot;GoPro AVC&quot;&lt;/span&gt; supported_output&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;mp4`&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Enable Windows Kernel Debugger During Setup</title>
    <link href="https://withinrafael.com/2018/09/08/napkin-notes-enable-windows-kernel-debugger-during-setup/"/>
    <updated>2018-09-08T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/09/08/napkin-notes-enable-windows-kernel-debugger-during-setup/</id>
    <content type="html">&lt;p&gt;Run &lt;code&gt;setup.exe&lt;/code&gt; with &lt;code&gt;/netdebug:hostip=1.2.3.4,port=55555,key=a.b.c.d&lt;/code&gt;. (Additional information regarding the KdNet parameters &lt;a href=&quot;https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-a-network-debugging-connection&quot;&gt;can be found on Docs&lt;/a&gt;.) Windows will apply this configuration to the BCD store for each stage during boot.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Troubleshooting Appx/Msix Signing with Appx Subject Interface Package (SIP) logging</title>
    <link href="https://withinrafael.com/2018/08/25/napkin-notes-troubleshooting-appx-msix-signing-with-appx-subject-interface-package-logging/"/>
    <updated>2018-08-24T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/08/25/napkin-notes-troubleshooting-appx-msix-signing-with-appx-subject-interface-package-logging/</id>
    <content type="html">&lt;p&gt;Troubleshooting Appx/Msix signing errors can be a real pain in the butt.&lt;/p&gt;
&lt;p&gt;Here&#39;s an example of &lt;strong&gt;unhelpful&lt;/strong&gt; output from signtool:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;SignTool Error: An unexpected internal error has occurred.&lt;br /&gt;Error information: &quot;Error: SignerSign() failed.&quot; (-2147024885/0x8007000b)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Trace logging can be controlled via one of two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set DWORD &lt;code&gt;HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;AppxSip&#92;LogLevel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set environment variable &lt;code&gt;APPXSIP_LOG=&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Valid values for both methods range from 0 to 3:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;0 - None&lt;/li&gt;
&lt;li&gt;1 - Info&lt;/li&gt;
&lt;li&gt;2 - Error&lt;/li&gt;
&lt;li&gt;3 - Trace&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&#39;s &lt;strong&gt;helpful&lt;/strong&gt; output from signtool:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;...&lt;br /&gt;ERROR: [Appx::Packaging::SipFunctionHelper::VerifyManifestPublisherName] failed because signing certificate subject name (CN=&quot;Foo&quot;) does not match package manifest publisher (CN=&quot;Package Foo&quot;)&lt;br /&gt;&lt;br /&gt;ERROR: [AppxSipPutSignedDataMsg] SipFunctionHelper::VerifyManifestPublisherName( manifestPackageId.Get(), signatureSize, signature, false) failed with HR=0x8007000b.&lt;br /&gt;SignTool Error: An unexpected internal error has occurred.&lt;br /&gt;&lt;br /&gt;Error information: &quot;Error: SignerSign() failed.&quot; (-2147024885/0x8007000b)&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Enable Acrylic Effects in Hyper-V VM</title>
    <link href="https://withinrafael.com/2018/08/17/napkin-notes-enable-acrylic-effects-in-hyper-v-vm/"/>
    <updated>2018-08-17T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/08/17/napkin-notes-enable-acrylic-effects-in-hyper-v-vm/</id>
    <content type="html">&lt;p&gt;Merge:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;Microsoft&#92;Windows&#92;Dwm]&lt;br /&gt;&quot;ForceEffectMode&quot;=dword:00000002&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And restart dwm.exe.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Fixing Meson Packaging to Generate Launcher Executable</title>
    <link href="https://withinrafael.com/2018/08/10/napkin-notes-fixing-meson-to-generate-on-windows/"/>
    <updated>2018-08-10T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/08/10/napkin-notes-fixing-meson-to-generate-on-windows/</id>
    <content type="html">&lt;p&gt;⚠ Note: This has been &lt;a href=&quot;https://github.com/mesonbuild/meson/pull/4004&quot;&gt;fixed upstream&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pip download meson&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Extract tarball and edit &lt;code&gt;setup.py&lt;/code&gt;, adding following item to setup(...) blob:&lt;/p&gt;
&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;entry_points&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;token string&quot;&gt;&#39;console_scripts&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;meson=mesonbuild.mesonmain:main&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;pip install &amp;lt;path to extracted tarball&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;meson -v&lt;/code&gt; to confirm executable is correctly generated and pathing set up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content>
  </entry>
  
  <entry>
    <title>Conversion of Teradata Express VMware Image for Hyper-V use</title>
    <link href="https://withinrafael.com/2018/07/24/notes-conversion-of-teradata-express-vmware-disks-to-vhdx/"/>
    <updated>2018-07-23T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/07/24/notes-conversion-of-teradata-express-vmware-disks-to-vhdx/</id>
    <content type="html">&lt;ol&gt;
&lt;li&gt;Download and extract the latest &lt;a href=&quot;https://downloads.teradata.com/download/database/teradata-express-for-vmware-player&quot;&gt;Teradata Express package&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download and install &lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=42497&quot;&gt;Microsoft Virtual Machine Converter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download and extract &lt;a href=&quot;http://members.ozemail.com.au/~nulifetv/freezip/freeware/&quot;&gt;dsfok&lt;/a&gt;. You can use a similar tool (e.g. dd) but the instructions are aligned with dsfok.&lt;/li&gt;
&lt;li&gt;Start downloading latest &lt;a href=&quot;https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-Rescue-CD-x86_64-Current.iso&quot;&gt;openSUSE Recovery CD image&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dump each disk&#39;s header (&lt;code&gt;dsfo.exe &amp;quot;TDExpress16.20_Sles11-disk1.vmdk&amp;quot; 512 1024 descriptor1.txt&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Edit each descriptor, commenting out the &lt;code&gt;ddb.toolsInstallType&lt;/code&gt; property with a &lt;code&gt;#&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Save each descriptor back into its respective vmdk file (&lt;code&gt;dsfi.exe &amp;quot;TDExpress16.20_Sles11-disk1.vmdk&amp;quot; 512 1024 descriptor1.txt&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Convert all disks (&lt;code&gt;ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath path&#92;to&#92;TDExpress16.20_Sles11-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat Vhdx -DestinationLiteralPath path&#92;to&#92;disk1.vhdx&lt;/code&gt;, etc)&lt;/li&gt;
&lt;li&gt;Create an older Hyper-V Generation 1 machine. Attach disks 1 and 2 to IDE Channel 0, and disk 3 to IDE Channel 1. Give the machine at least 8GB of RAM and a few processors. Attach openSUSE Recovery CD image to remaining IDE Channel 1 slot.&lt;/li&gt;
&lt;li&gt;Boot from Recovery CD&lt;/li&gt;
&lt;li&gt;Edit /etc/sysconfig/kernel and clean out old vmware modules (i.e. change to read &lt;code&gt;INITRD_MODULES=&amp;quot;mptspi ata_piix ata_generic hv_vmbus hv_netvsc hv_storvsc hv_blkvsc&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Build a new initial ramdisk using the steps below.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mount --bind /dev /run/media/linux/ROOT-BE1/dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mount --bind /sys /run/media/linux/ROOT-BE1/sys&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mount --bind /mnt /run/media/linux/ROOT-BE1/mnt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chroot /run/media/linux/ROOT-BE1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(chrooted) &lt;code&gt;mkinitrd -k /boot/vmlinux-3.0.101-0.166.TDC.1.R.0-default.gz -i /boot/initrd-3.0.101-0.166.TDC.1.R.0-default&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reboot. X will fail to start.&lt;/li&gt;
&lt;li&gt;SSH into the machine (or reboot and enter single user mode).&lt;/li&gt;
&lt;li&gt;Stash the old X configuration &lt;code&gt;mv /etc/X11/xorg.conf /etc/X11/xorg.conf.vmware&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run SaX2 to redetect the correct hardware (&lt;code&gt;sax2 -r&lt;/code&gt;) and confirm everything looks okay in the Hyper-V Console window.&lt;/li&gt;
&lt;li&gt;Reboot. Teradata Express UI should appear.&lt;/li&gt;
&lt;li&gt;Optional: Use YaST to enable remote administration (VNC).&lt;/li&gt;
&lt;/ol&gt;
</content>
  </entry>
  
  <entry>
    <title>Using Remote Desktop Services in Containers</title>
    <link href="https://withinrafael.com/2018/03/09/using-remote-desktop-services-in-containers/"/>
    <updated>2018-03-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/03/09/using-remote-desktop-services-in-containers/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;[01/21/2019: Microsoft made a change sometime after  &lt;code&gt;microsoft/windowsservercore:1709_KB4074588&lt;/code&gt;, breaking RDS. I&#39;m looking into this and will post a new article/edit this one when more information is available.]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/welcome-to-rds&quot;&gt;Remote Desktop Services&lt;/a&gt; (RDS) is not officially supported in Windows Containers. Nano Server-based containers, for example, don’t contain the required bits on disk. On the flip side, Windows Server Core-based containers do but the feature is deactivated for a few technical and political reasons. In these containers, you can reactivate those bits with an easy registry value.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2018/03/Remoted-Into-Container.png&quot; alt=&quot;Remoted-Into-Container&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The value to twiddle is &lt;code&gt; HKLM&#92;System&#92;CurrentControlSet&#92;Control&#92;Terminal Server&#92;TemporaryALiC&lt;/code&gt;. (ALiC =&amp;gt; Allow Listeners in Container.) Set this REG_DWORD to &lt;code&gt;1&lt;/code&gt; sometime before TermService startup and you’re all set. RDS defaults will kick in and spin up a RDP-Tcp transport for you to connect to as normal.&lt;/p&gt;
&lt;p&gt;Quick and dirty Dockerfile:&lt;/p&gt;
&lt;pre class=&quot;language-dockerfile&quot;&gt;&lt;code class=&quot;language-dockerfile&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;#escape=`&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;FROM&lt;/span&gt; microsoft/windowsservercore:1709_KB4074588&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;RUN&lt;/span&gt; net user /add Rafael&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;RUN&lt;/span&gt; net user Rafael !QAZ2wsx&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;RUN&lt;/span&gt; net localgroup &lt;span class=&quot;token string&quot;&gt;&quot;Remote Desktop Users&quot;&lt;/span&gt; Rafael /add&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;RUN&lt;/span&gt; net localgroup &lt;span class=&quot;token string&quot;&gt;&quot;Administrators&quot;&lt;/span&gt; Rafael /add&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token instruction&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;RUN&lt;/span&gt; cmd /k reg add &lt;span class=&quot;token string&quot;&gt;&quot;HKLM&#92;System&#92;CurrentControlSet&#92;Control&#92;Terminal Server&quot;&lt;/span&gt; /v TemporaryALiC /t REG_DWORD /d 1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;warnings&quot; tabindex=&quot;-1&quot;&gt;Warnings&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Only tested with Windows Server containers (silos).&lt;/li&gt;
&lt;li&gt;May interfere with the host machine&#39;s listener. Jiggling of the &lt;code&gt;TermService&lt;/code&gt; on the host machine before/after container startup may be required.&lt;/li&gt;
&lt;li&gt;Remote Applications Integrated Locally (RAIL) scenarios will require additional configuration (future blog post)&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Booting ARM64 builds of Windows 10 in QEMU</title>
    <link href="https://withinrafael.com/2018/02/12/boot-arm64-builds-of-windows-10-in-qemu/"/>
    <updated>2018-02-11T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/02/12/boot-arm64-builds-of-windows-10-in-qemu/</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2018/02/qemu-booting-Windows-10--arm64-.png&quot; alt=&quot;QEMU boot Windows 10... on ARM(64)&quot; /&gt;&lt;/p&gt;
&lt;p&gt;As you may know, the venerable &lt;a href=&quot;https://www.qemu.org/&quot;&gt;Quick Emulator (QEMU)&lt;/a&gt; supports emulation of the AArch64/ARM64 architecture. With some fiddling over the weekend, I was able to boot and install arm64 builds of Windows 10.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2018/02/qemu-running-Windows-10--arm64-.png&quot; alt=&quot;QEMU actually running Windows 10... on ARM(64)&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here&#39;s how I did it (feedback welcome):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Warning: This is slow as dirt on an Intel Core i7 4770K&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Warning: I have not yet compiled the VirtIO drivers for network and other ancillary devices. That means these machines don&#39;t support networking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download and install &lt;a href=&quot;https://qemu.weilnetz.de/w64/&quot;&gt;QEMU for Windows&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the Windows 10 (arm64) ESDs from &lt;a href=&quot;https://uup.rg-adguard.net/index.php&quot;&gt;adguard&#39;s whizzbang download page&lt;/a&gt; and glue them together using UUPtoISO (&lt;a href=&quot;https://1drv.ms/u/s!AgL8o-XSp9z8jKAr_qTCbSSbLEhEJA&quot;&gt;patched for arm64&lt;/a&gt;) to create a usable ISO&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;a href=&quot;https://1drv.ms/f/s!AnjdAnZZcu-GpIJqZ9-B_jSpmDw3Ng&quot;&gt;my hand-crafted UEFI firmware and recompiled/signed arm64 storage drivers&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a system.vhdx that&#39;s around 23GB or larger (fixed size, not expanding, initialized using GPT partitioning scheme)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generally glue all the above together in a folder somewhere and create a &lt;code&gt;windows.cmd&lt;/code&gt; with the following contents:&lt;/p&gt;
 &lt;script src=&quot;https://gist.github.com/riverar/9a7983a6cd6debada801b67a0ea35e76.js&quot;&gt;&lt;/script&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the script.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;During setup, you will need to provide VirtIO drivers (browse to the mounted disk).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Complete setup as usual. (This will take a long time.)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For those curious, here&#39;s the break down of the QEMU arguments, in order of appearance:&lt;br /&gt;
- virtualize a Cortex A57 CPU (with 3 cores)&lt;br /&gt;
- set up 4GiB of RAM&lt;br /&gt;
- use my recompiled &lt;a href=&quot;https://github.com/tianocore/edk2/tree/master/ArmVirtPkg&quot;&gt;TianoCore EDKII ArmVirtPkg firmware&lt;/a&gt;, with minor edits to re-enable VGA support and include a &lt;a href=&quot;https://withinrafael.com/img/2018/02/qemu-booting-Windows-10--arm64-.png&quot;&gt;whimsical boot logo&lt;/a&gt; to discourage serious usage. (This is &lt;a href=&quot;https://github.com/Googulator/edk2/commits/NonKVM&quot;&gt;similar to the build provided by Googulator&lt;/a&gt; in that I reverted two VGA commits. No other changes were made. Latest master.)&lt;br /&gt;
- use some scratch space for UEFI variable storage (e.g. boot order)&lt;br /&gt;
- use VGA for graphics needs&lt;br /&gt;
- set up a &lt;a href=&quot;https://github.com/qemu/qemu/blob/master/docs/usb2.txt&quot;&gt;NEC USB XHCI Host Controller&lt;/a&gt;&lt;br /&gt;
- ... and plug four virtualized USB devices into it&lt;br /&gt;
- a USB keyboard&lt;br /&gt;
- a USB mouse&lt;br /&gt;
- a CDROM hosting our install media&lt;br /&gt;
- a removable hard drive hosting the VirtIO driver package vhdx&lt;br /&gt;
- set up a &lt;a href=&quot;https://wiki.libvirt.org/page/Virtio&quot;&gt;VirtIO Block Device&lt;/a&gt; hosting the main system vhdx&lt;/p&gt;
&lt;p&gt;I encourage you to &lt;a href=&quot;https://qemu.weilnetz.de/doc/2.11/qemu-doc.html&quot;&gt;read the QEMU documentation&lt;/a&gt; for additional options.&lt;/p&gt;
&lt;h2 id=&quot;tips&quot; tabindex=&quot;-1&quot;&gt;Tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;--accel tcg,thread=multi&lt;/code&gt; for &lt;a href=&quot;https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/devel/multi-thread-tcg.txt;hb=HEAD&quot;&gt;additional per-core performance gains&lt;/a&gt; (Thanks &lt;a href=&quot;https://twitter.com/never_released/status/963115266736566272&quot;&gt;@never_released&lt;/a&gt;!)&lt;/li&gt;
&lt;li&gt;The Windows guest may panic at device detection. Click skip when given the option and you should slowly get through.&lt;/li&gt;
&lt;li&gt;The Windows guest may intermittently panic with a Kernel Security Check Failure.&lt;/li&gt;
&lt;li&gt;At first boot, the Windows guest&#39;s Compatibility Telemetry runner process will spin up and eat all your CPU cores. Kill the process and performance should greatly increase.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Adding Acrylic Blur to your Windows 10 (Redstone 4) desktop apps</title>
    <link href="https://withinrafael.com/2018/02/02/adding-acrylic-blur-to-your-windows-10-apps-redstone-4-desktop-apps/"/>
    <updated>2018-02-01T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/02/02/adding-acrylic-blur-to-your-windows-10-apps-redstone-4-desktop-apps/</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://withinrafael.com/2015/07/08/adding-the-aero-glass-blur-to-your-windows-10-apps/&quot;&gt;Back in July 2015&lt;/a&gt;, I provided a code sample for turning on what, at the time, I called &amp;quot;Aero Glass&amp;quot; for Windows 10 desktop apps. (Since then, its name was revealed to be Acrylic.) This code was circulated to &lt;a href=&quot;https://www.google.com/search?q=WCA_ACCENT_POLICY+WindowCompositionAttributeData&amp;amp;hs=udT&amp;amp;ei=XxdqWo_pCYn0jwO23ay4BQ&amp;amp;start=0&amp;amp;sa=N&amp;amp;biw=1213&amp;amp;bih=797&quot;&gt;the far corners of the Internet&lt;/a&gt; and even made it into a shipping product at a very large company.&lt;/p&gt;
&lt;p&gt;That&#39;s pretty cool.&lt;/p&gt;
&lt;p&gt;But the underlying undocumented API has now changed and the sample code I provided early no longer functions correctly on late Redstone 4 builds.&lt;/p&gt;
&lt;p&gt;Let&#39;s talk about what changed.&lt;/p&gt;
&lt;p&gt;First, the &lt;code&gt;AccentState&lt;/code&gt; enumeration changed, gaining a new constant specifically designed for Acrylic Blur use.&lt;/p&gt;
&lt;p&gt;Second, the Accent Policy &lt;code&gt;GradientColor&lt;/code&gt; member is now expected to be non-zero. Despite its unfortunate name (pulled straight from Windows symbols), this member controls the &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/uwp/design/style/images/acrylicrecipe_diagram.jpg&quot;&gt;Acrylic tint/overlay&lt;/a&gt; and must be set to an &lt;a href=&quot;https://en.wikipedia.org/wiki/RGBA_color_space&quot;&gt;RGBA value&lt;/a&gt; stored in little-endian word order (ABGR).&lt;/p&gt;
&lt;p&gt;With some minor tweaks &lt;a href=&quot;https://github.com/riverar/sample-win10-aeroglass&quot;&gt;to the original sample&lt;/a&gt;, Acrylic is back. You can find &lt;a href=&quot;https://github.com/riverar/sample-win32-acrylicblur&quot;&gt;an updated sample app on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2018/02/acrylicblur_sample-1.png&quot; alt=&quot;acrylicblur_sample-1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Reminder: This API is not supported and can change at any time.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;(02/02/2018: Thanks &lt;a href=&quot;https://twitter.com/StartIsBack/status/959336941111185412&quot;&gt;@StartIsBack&lt;/a&gt; for hitting me over the head and clarifying a revision of this post that initially discussed a two-word GradientColor.)&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>What&#39;s That Gobbledygook in my Package Family Name?</title>
    <link href="https://withinrafael.com/2018/01/28/whats-that-gobbledygook-in-my-package-family-name/"/>
    <updated>2018-01-27T00:00:00Z</updated>
    <id>https://withinrafael.com/2018/01/28/whats-that-gobbledygook-in-my-package-family-name/</id>
    <content type="html">&lt;p&gt;Appx applications have a notion of a &amp;quot;package family&amp;quot; in which all the individual packages belong to. For example, the Windows Photos app may ship on x86, x64, ARM32, ARM64, and IA64 platforms and each package belongs to the overall &amp;quot;Microsoft.Windows.Photos_8wekyb3d8bbwe&amp;quot; family.&lt;/p&gt;
&lt;p&gt;A package family name consists of two parts, separated by an underscore: A &lt;strong&gt;Name&lt;/strong&gt; (e.g. Microsoft.Windows.Photos) and a &lt;strong&gt;Publisher ID&lt;/strong&gt; (e.g. 8wekyb3d8bbwe).&lt;/p&gt;
&lt;p&gt;The Name is typically derived from a common Package Name (specified in the Appx Manifest) or specified manually by a developer.&lt;/p&gt;
&lt;p&gt;The Publisher ID is a &lt;a href=&quot;https://www.crockford.com/wrmg/base32.html&quot;&gt;Crockford Base32-encoded&lt;/a&gt; representation of the first 8 bytes of the SHA-256 hash of the &lt;strong&gt;Publisher&lt;/strong&gt; UTF-16 encoded string. Phew.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Publisher: &lt;code&gt;CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;SHA-256 hash: &lt;code&gt;471D3F2C6D42D7C7FACEEF1ADD20881817082D593D8B7B3E229B3617E4CD2A18&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;... first 8 bytes: &lt;code&gt;47 1D 3F 2C 6D 42 D7 C7&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Crockford Base32 encoded (no padding bytes): &lt;code&gt;8wekyb3d8bbwe&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the Base3264-UrlEncoder package available on Nuget (Eric Lau, Mhano Harkness), you can write a few lines of code to calculate this yourself.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Access host COM ports from a Windows Server container</title>
    <link href="https://withinrafael.com/2017/10/24/windows-container-app-compat-access-com-ports-from-windows-server-container/"/>
    <updated>2017-10-24T00:00:00Z</updated>
    <id>https://withinrafael.com/2017/10/24/windows-container-app-compat-access-com-ports-from-windows-server-container/</id>
    <content type="html">&lt;p&gt;I field many questions from folks trying to containerize messy legacy apps. Some of the more interesting apps have been line-of-business apps with arcane licensing requirements (e.g. physical dongle) and radio communication apps (e.g. those requiring a GPS).&lt;/p&gt;
&lt;p&gt;Windows Server does not ship in a configuration that allows for Windows Server containers to access host COM ports.&lt;/p&gt;
&lt;p&gt;But you can change that.&lt;/p&gt;
&lt;p&gt;Unlike Hyper-V containers, which rely on a special virtual machine for kernel-level isolation, Windows Server containers simply use Windows Server Silos to isolate processes from the host machine. Windows Server ships with a default silo configuration that aligns it with container mantras around container ephemerality, immutability, scability, etc. You can tweak that configuration to meet your needs.&lt;/p&gt;
&lt;p&gt;For example, here&#39;s a step-by-step to bring in a COM port:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Take ownership of &#92;Windows&#92;System32&#92;Containers&#92;wsc.def and give yourself write access. (Make a backup copy!)&lt;/li&gt;
&lt;li&gt;Open up wsc.def with your favorite text editor.&lt;/li&gt;
&lt;li&gt;COM port symlinks typically live in the Global?? object directory, so add the appropriate symlink under &lt;code&gt;&amp;lt;objdir name=&amp;quot;GLOBAL??&amp;quot; ...&amp;gt;&lt;/code&gt;. (For example, using &lt;a href=&quot;https://live.sysinternals.com/winobj.exe&quot;&gt;WinObj&lt;/a&gt;, I determined my COM1 is a symlink to &lt;code&gt;&#92;Device&#92;Serial0&lt;/code&gt; and added &lt;code&gt;&amp;lt;symlink name=&amp;quot;COM1&amp;quot; path=&amp;quot;&#92;Device&#92;Serial0&amp;quot; scope=&amp;quot;Global&amp;quot; /&amp;gt;&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;Add the appropriate symlink for the device under &lt;code&gt;&amp;lt;objdir name=&amp;quot;Device&amp;quot; ...&amp;gt;&lt;/code&gt;. (Continuing the example above, I added &lt;code&gt;&amp;lt;symlink name=&amp;quot;VCP0&amp;quot; path=&amp;quot;&#92;Device&#92;VCP0&amp;quot; scope=&amp;quot;Global&amp;quot; /&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Save the file and relaunch your container. (The vmcompute process reads the rules at container startup.)&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;mode&lt;/code&gt; at the command prompt to verify your COM port is now visible.&lt;/li&gt;
&lt;li&gt;Brace yourself for disappointment when updates come down from WU in the far future and blow away your changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As you&#39;ve probably figured out by now, you can expose way more than just COM ports -- almost anything can be exposed to containers. Be careful.&lt;/p&gt;
&lt;p&gt;I did some limited testing on my end with a FTDI serial cable connected to a radio. Shoot me an email if this worked (or failed) for you.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>opencv-python on Windows Server Core</title>
    <link href="https://withinrafael.com/2017/09/09/windows-container-app-compat-opencv-python/"/>
    <updated>2017-09-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2017/09/09/windows-container-app-compat-opencv-python/</id>
    <content type="html">&lt;p&gt;When attempting to install and load the opencv-python package, you may run into the following error on Windows Server Core images (e.g. python:2.7-windowsservercore):&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Traceback (most recent call last):&lt;br /&gt;  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;&lt;br /&gt;  File &quot;C:&#92;Python&#92;lib&#92;site-packages&#92;cv2&#92;__init__.py&quot;, line 9, in &lt;module&gt;&lt;br /&gt;    from .cv2 import *&lt;br /&gt;ImportError: DLL load failed: The specified module could not be found.&lt;/module&gt;&lt;/module&gt;&lt;/string&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This error pops up because opencv &lt;a href=&quot;https://github.com/opencv/opencv/blob/2eb3c020596f75705ce3fecd9b42f7dce1e3cc22/cmake/OpenCVFindLibsVideo.cmake#L273&quot;&gt;relies on ancient Video for Windows, Microsoft AVI, and Microsoft ACM Audio components&lt;/a&gt;, none of which ship with the Windows Server Core base image.&lt;/p&gt;
&lt;p&gt;If you need to use parts of opencv that &lt;em&gt;don&#39;t&lt;/em&gt; rely on these components, copy the following libraries from your container host into the container&#39;s &#92;System32 folder (assuming 64-bit usage here, adjust accordingly).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;msacm32.dll&lt;/li&gt;
&lt;li&gt;avifil32.dll&lt;/li&gt;
&lt;li&gt;avicap32.dll&lt;/li&gt;
&lt;li&gt;msvfw32.dll&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Docker Recipe: Media Foundation on Windows Server Core</title>
    <link href="https://withinrafael.com/2017/09/04/docker-recipe-media-foundation/"/>
    <updated>2017-09-03T00:00:00Z</updated>
    <id>https://withinrafael.com/2017/09/04/docker-recipe-media-foundation/</id>
    <content type="html">&lt;p&gt;Applications, like Plex Media Server, rely on the &lt;a href=&quot;https://withinrafael.com/2017/09/04/docker-recipe-media-foundation/msdn.microsoft.com/en-us/library/windows/desktop/ms694197.aspx&quot;&gt;Media Foundation Platform&lt;/a&gt; for access to codecs, hardware devices, and DirectX Video Acceleration. Media Foundation is built into consumer versions of Windows, but is an optional bolt on for Windows Server for obvious attack surface/footprint reasons.&lt;/p&gt;
&lt;p&gt;Installing MF in optional environments like Server Core is typically easy enough. A simple &lt;code&gt;PS&amp;gt; Install-WindowsFeature&lt;/code&gt;, a reboot, and you&#39;re done. Container authors, however, will struggle with Media Foundation for several reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Media Foundation packaging is marked with &#39;reboot required&#39; metadata&lt;/li&gt;
&lt;li&gt;Component Based Servicing (CBS) respects this metadata and goes down the path of configuring the system for pending service operations (e.g. &#92;WinSxS&#92;pending.xml) to run at power on/off&lt;/li&gt;
&lt;li&gt;Of course, servicing the base image isn&#39;t a supported scenario, so the components involved (&lt;code&gt;poqexec.exe&lt;/code&gt;) fail (e.g. &lt;code&gt;NtFsControlFile&lt;/code&gt; failures in &lt;code&gt;Windows::Rtl::TxfLogExpander::GetCurrentContainerCountMax&lt;/code&gt;) and CBS never gets to finish&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Media Foundation package authors clearly had a reason to mark this package as &amp;quot;reboot required&amp;quot; but that may have been before the advent of containers and the minimal subsystem within.&lt;/p&gt;
&lt;p&gt;If you want to experiment with the Media Foundation Platform package in a container (unsupported), you will need to modify the package metadata to not require a reboot &lt;strong&gt;prior&lt;/strong&gt; to installing the package.&lt;/p&gt;
&lt;p&gt;Here&#39;s a contrived PowerShell example you can execute in your Dockerfile:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Get-ChildItem&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&lt;span class=&quot;token variable&quot;&gt;$Env&lt;/span&gt;:SystemRoot&#92;Servicing&#92;Packages&#92;*Media*.mum&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;|&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;ForEach-Object&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Get-Content&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-replace&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;required&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;no&#39;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Set-Content&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$_&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you prefer to be explicit (recommended), you&#39;ll want to patch up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Microsoft-Windows-Media-Format-Package~31bf3856ad364e35~amd64~~10.0.14393.0.mum&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Microsoft-Windows-Server-Media-Foundation~31bf3856ad364e35~amd64~~10.0.14393.0.mum&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Feel free to reach out if you run into any other snags. You can find me in the &lt;a href=&quot;https://social.msdn.microsoft.com/Forums/en-US/home?forum=windowscontainers&quot;&gt;Windows Containers forum on MSDN&lt;/a&gt; or contact me using the links on the blog.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Office apps and the Mso::ChecksumRegistry::Data algorithm</title>
    <link href="https://withinrafael.com/2017/09/01/office-apps-and-mso-checksumregistry-data-algorithm/"/>
    <updated>2017-09-01T00:00:00Z</updated>
    <id>https://withinrafael.com/2017/09/01/office-apps-and-mso-checksumregistry-data-algorithm/</id>
    <content type="html">&lt;p&gt;Nearly all Microsoft apps have experimentation code built-in these days. This code is typically used to facilitate A/B testing externally but internally, it can problematic if left on. (Imagine trying to reproduce a bug in a feature that&#39;s turning itself on/off or behaving differently across machines.) This is why most apps also house a feature or experiment control panel, hidden to all except those typically on the owning team.&lt;/p&gt;
&lt;p&gt;Story Remix has a panel, for example, that appears when a specifically named .json file is present on disk and populated with specific values. Groove Music relies instead on specialty registry values locked down to specific geographic markets. Office apps also use the registry, but with an added obfuscation twist.&lt;/p&gt;
&lt;p&gt;I haven&#39;t fully mapped out how Office apps store all their experimental settings, but we&#39;re going to talk about one area today:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;LocalState&#92;HKCU&#92;Software&#92;Microsoft&#92;Office&#92;16.0&#92;Common&#92;ExperimentTas&#92;[app]&#92;Flights&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The registry value names are straightforward -- they represent an arbitrary name assigned to an experiment or feature and hardcoded into the app. The registry value data represents a structure, serialized to a UTF-16 string, in the form &lt;code&gt;[field]|[fieldType]|[fieldValue];[settingType]|[settingValue]&lt;/code&gt;. (This is then stuffed into a &lt;a href=&quot;https://docs.microsoft.com/en-us/uwp/api/Windows.Storage.ApplicationDataCompositeValue&quot;&gt;composite value&lt;/a&gt;, hence the 0x5f5e10c type and extra bits at the end that are out of scope for the blog post.)&lt;/p&gt;
&lt;p&gt;A more concrete example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Value: &lt;code&gt;Microsoft.Office.Experimentation.ABC&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Data: &lt;code&gt;Mso::ChecksumRegistry::Data|uint64_t|9215221962101605702;bool|1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;signed&lt;/strong&gt; (yes, despite the declaration) 64-bit checksum value is computed by taking the value name, setting type, and setting value, concatenating them together,  and running it through the &lt;a href=&quot;https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash&quot;&gt;Fowler–Noll–Vo (variant 1a) hashing function&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using our example data above, let&#39;s walk through this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Glue the pieces together: &lt;code&gt;Microsoft.Office.Experimentation.ABCbool|1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run it through once with hardcoded initial offset basis: &lt;code&gt;step2 = FNV1a(string_bytes, 0xCBF29CE484222325)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Use that as the initial offset basis for another run, with a hardcoded chunk of data this time:&lt;br /&gt;
&lt;code&gt;hash = FNV1a([0xb7, 0x3c, 0x75, 0x96, 0xd5, 0x79, 0x13, 0xa5, 0xc8, 0xe5, 0xb2, 0xa2, 0xaf, 0x2b, 0x44, 0xff], step2)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Serialize the hash and stuff it into the pattern above&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you implement this correctly, with say the &lt;code&gt;Microsoft.Office.Experimentation.ShowExperimentSettings&lt;/code&gt; registry value, you&#39;ll end up with a hash of &lt;code&gt;2507011508917168823&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And a shiny new control panel to play with.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/09/hxmail_experiments_panel.png&quot; alt=&quot;hxmail_experiments_panel&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Registry values in the &lt;code&gt;LocalState&#92;HKEY_CURRENT_USER&#92;Software&#92;Microsoft&#92;Office&#92;16.0&#92;Common&#92;ExperimentEcs&#92;[app]&#92;Flights&lt;/code&gt; key use a different type of obfuscation that I&#39;ll cover in the next post.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Notes on swapping the internal Xbox One hard disk for a solid-state disk</title>
    <link href="https://withinrafael.com/2016/12/12/notes-on-swapping-the-internal-xbox-one-hard-disk-for-a-solid-state-disk/"/>
    <updated>2016-12-12T00:00:00Z</updated>
    <id>https://withinrafael.com/2016/12/12/notes-on-swapping-the-internal-xbox-one-hard-disk-for-a-solid-state-disk/</id>
    <content type="html">&lt;p&gt;In a desperate effort to improve the Xbox One user experience (UX), I experimented with swapping out the &lt;a href=&quot;https://www.ifixit.com/Teardown/Xbox+One+Teardown/19718#s55242&quot;&gt;Samsung Spinpoint M8 5400 RPM&lt;/a&gt; hard disk for a solid-state disk (SSD). My hypothesis at the time was that the disk, because of its slow speed, must be very busy and that swapping it out would yield a noticeable performance boost to the operating system and improve overall UX.&lt;/p&gt;
&lt;p&gt;It didn&#39;t.&lt;/p&gt;
&lt;p&gt;But a few folks on Twitter expressed interest in reproducing the experiment so here are my notes. (Thanks for your patience, Stefán!)&lt;/p&gt;
&lt;h2 id=&quot;hardware-considerations&quot; tabindex=&quot;-1&quot;&gt;Hardware Considerations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;All Xbox consoles ship in storage configurations (e.g. 500GB, 1TB) that have this configuration burnt into its flash memory. This configuration is used to rebuild the partition layout on the internal disk in recovery scenarios, presenting an obstacle for a quick and easy disk swap.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That means an Xbox One 500GB will always want to restore a partition layout compatible with a 500GB disk.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All Xbox consoles ship with a SATA2 controller. The Xbox One S ships with a SATA3 drive but the same controller, limiting the drive to theoretical SATA2 speeds. This part swap was likely due to the scarcity and current cost of SATA2 disks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The wireless chipset reports antenna status to the operating system. If this is not plugged in, you will not be able to complete the out-of-box-experience (OOBE), even in a wired configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;software-considerations&quot; tabindex=&quot;-1&quot;&gt;Software Considerations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Encrypted&lt;/em&gt; container use is common on this platform. This presents a hypothetical hardware configuration data persistence problem when migrating data from one disk to another.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The boot loader appears to maintain state about previous successful/unsuccessful boots, which could lead to unexpected behavior when swapping disks. (More testing is needed in this area.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Anti-rollback protection is present and used, preventing use of older versions of the OS after an update. This can invalidate hard disk backups very quickly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The disks are set up with a standard GUID Partition Table layout, with strict validation of &lt;a href=&quot;https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_table_header_.28LBA_1.29&quot;&gt;both header and partition array CRC32 checksums&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All partitions must also be assigned a &lt;a href=&quot;https://github.com/JW0914/Wikis/blob/master/XboxOne/Xbox%20One%20HDD%20Replacement.txt#L13-L20&quot;&gt;well-known GUID&lt;/a&gt;. This should not be confused with the partition type GUID.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I did not test if the disk identifier was also used/validated, but it&#39;s not unreasonable to assume such.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I did not test if the backup GPT header (backup LBA) was used/validated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The GUID Partition Table entry order is not validated. You can re-order partitions, given you continue to meet the requirements above.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As the Temp and User partitions are likely to be most busy, it makes sense to stuff those on the larger, outer hard disk tracks. Their adjacency also allows for short disk head travel for the inevitable back and forth.&lt;/p&gt;
&lt;p&gt;But programmatically generating the User partition on non-standard disks can be tricky due to being positioned in the middle of the table. Some opted for simplicity and &lt;a href=&quot;https://github.com/JW0914/Wikis/blob/master/XboxOne/Scripts/xboxonehdd.py#L90&quot;&gt;round to the nearest gibibyte and ignore what&#39;s left&lt;/a&gt;. PowerShell made this &lt;a href=&quot;https://gist.github.com/riverar/dc634b58683a78d0a682dc765544b413#file-prepare_xbox_disk-ps1-L256&quot;&gt;easy to implement accurately&lt;/a&gt; but it&#39;s not necessary.&lt;/p&gt;
&lt;p&gt;It&#39;s possible I missed the one application that retrieves an enumerable list of partitions and selects a partition using a hard-coded index. But the odds of that kind of code surviving a code review at Microsoft are high.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Software updates to the Xbox One OS may not be compatible with the new storage, I have yet to receive an update to my test device. I did, however, enable dev mode successfully with no side effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;tools-used&quot; tabindex=&quot;-1&quot;&gt;Tools Used&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10&lt;/li&gt;
&lt;li&gt;My &lt;a href=&quot;https://gist.github.com/riverar/dc634b58683a78d0a682dc765544b413&quot;&gt;Xbox partitioning PowerShell script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I used an inexpensive &lt;a href=&quot;http://amzn.to/2g0DEuq&quot;&gt;StarTech USB 3.0 to SATA adapter&lt;/a&gt; to read and write to the external disks.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.disk-editor.org/&quot;&gt;Active@ Disk Editor&lt;/a&gt;, &lt;a href=&quot;https://mh-nexus.de/en/hxd/&quot;&gt;HxD&lt;/a&gt;, and &lt;a href=&quot;http://hddguru.com/software/HDD-Raw-Copy-Tool/&quot;&gt;HDD Raw Copy Tool&lt;/a&gt; were handy during script development.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;procedure&quot; tabindex=&quot;-1&quot;&gt;Procedure&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Disassemble the Xbox One and remove the disk.&lt;/li&gt;
&lt;li&gt;Use a USB to SATA bridge to copy the contents of the disk to the PC.&lt;/li&gt;
&lt;li&gt;Use partitioning script to ready a blank SSD for Xbox One use.&lt;/li&gt;
&lt;li&gt;Copy the contents of the disk (i.e. each partition) to the newly prepared SSD&lt;/li&gt;
&lt;li&gt;Plug the SSD into the Xbox One and boot.&lt;br /&gt;
The Xbox One may exhibit odd behavior at this point. It may boot but report free space incorrectly, or it may not boot at all. This is the hypothetical hardware configuration data persistence problem I was referring to. To fix this, I reset the console.&lt;/li&gt;
&lt;li&gt;Restore the Xbox One to its factory defaults. Be sure to complete OOBE and gracefully shut down the Xbox One after that&#39;s completed.&lt;br /&gt;
At this point, Xbox One has restored the original partition layout on the disk, which is not what you want. (See considerations above.) But the characteristics of our disk should be implanted within a container somewhere, which is great.&lt;/li&gt;
&lt;li&gt;Remove the SSD from the Xbox One.&lt;/li&gt;
&lt;li&gt;Use a USB to SATA bridge to copy the contents of the SSD to the PC.&lt;/li&gt;
&lt;li&gt;Use partitioning script to wipe and ready the SSD for Xbox One use again.&lt;/li&gt;
&lt;li&gt;Copy the contents of the SSD back to the prepared blank SSD.&lt;/li&gt;
&lt;li&gt;Plug the SSD into the Xbox One and boot.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Xbox One should now report the available free space correctly and everything should be functioning normally. Be sure to read the considerations above for potential future gotchas.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Adding the &quot;Aero Glass&quot; blur to your Windows 10 apps</title>
    <link href="https://withinrafael.com/2015/07/08/adding-the-aero-glass-blur-to-your-windows-10-apps/"/>
    <updated>2015-07-08T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/07/08/adding-the-aero-glass-blur-to-your-windows-10-apps/</id>
    <content type="html">&lt;p&gt;(Update: At the time of writing, Fluent had not yet been fully revealed. We now know this to be the start of &lt;a href=&quot;https://withinrafael.com/2018/02/01/adding-acrylic-blur-to-your-windows-10-apps-redstone-4-desktop-apps/&quot;&gt;Acrylic Blur work&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://blogs.windows.com/bloggingwindows/2015/04/29/new-windows-10-insider-preview-build-10074-now-available/&quot;&gt;Since the reintroduction of Aero Glass in Windows 10&lt;/a&gt;, I&#39;ve been receiving questions on how to incorporate that functionality into 3rd party applications. A few nights ago I looked into it and here&#39;s my guidance:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Abandon code that uses &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/desktop/aa969508(v=vs.85).aspx&quot;&gt;DwmEnableBlurBehindWindow&lt;/a&gt;. This function hasn&#39;t been deprecated, oddly enough, but is effectively dead on Windows 10. Stop using it. (Also consider abandoning &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/desktop/aa969512(v=vs.85).aspx&quot;&gt;DwmExtendFrameIntoClientArea&lt;/a&gt;.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start using SetWindowCompositionAttribute directly. It&#39;s not &lt;em&gt;officially&lt;/em&gt; documented but here&#39;s the plumbing you need, if you&#39;re writing C# utilizing Interop Services tooling:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the view side, you don&#39;t need to worry about chroma keys anymore! Simply ensure your window uses a (background) brush with an alpha channel and the compositor will handle the rest.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The sample project I used to create the screenshot above &lt;a href=&quot;https://github.com/riverar/sample-win10-aeroglass&quot;&gt;can be found on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Running your own app at the click of the Surface Pen button</title>
    <link href="https://withinrafael.com/2015/05/09/running-your-own-app-at-the-click-of-the-surface-pen-button/"/>
    <updated>2015-05-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/05/09/running-your-own-app-at-the-click-of-the-surface-pen-button/</id>
    <content type="html">&lt;p&gt;Thursday, I picked up a &lt;a href=&quot;http://www.amazon.com/gp/product/B00VGNZ4PG/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00VGNZ4PG&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=XFTY4DO2WLTOUJP6&quot;&gt;Surface 3&lt;/a&gt; — my first Surface with pen input — and was surprised at the lack of customization options for the pen&#39;s top button. Searching around, I found some &lt;a href=&quot;https://superuser.com/questions/777199/is-it-possible-to-change-the-application-opened-by-the-surface-pro-3s-pen-butto&quot;&gt;clever hacks&lt;/a&gt; using AutoHotkey and EventGhost but I wasn&#39;t really interested in installing middleware. So I took a peek under the hood and found an inbox solution instead.&lt;/p&gt;
&lt;p&gt;Thankfully, Microsoft was nice enough to bake in some overrides for which app gets launched. These overrides, unsurprisingly, live in the Lockscreen &lt;em&gt;ClickNote&lt;/em&gt; component (lockscreencn.dll).&lt;/p&gt;
&lt;p&gt;Upon every &lt;em&gt;click&lt;/em&gt; of the pen button, this component reaches out to a registry key, specifically &lt;code&gt;&#92;Software&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Authentication&#92;LogonUI&#92;CN&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It looks for an &lt;strong&gt;&lt;code&gt;AppID&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;DesktopAppPath&lt;/code&gt;&lt;/strong&gt; value and if one is found, retrieves its data and executes an immersive or desktop app accordingly. Otherwise, OneNote is launched via a built-in AppID: &lt;code&gt;Microsoft.Office.OneNote_8wekyb3d8bbwe!Microsoft.OneNoteIm&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Before you go stuffing Notepad or your app into the &lt;strong&gt;&lt;code&gt;DesktopAppPath&lt;/code&gt;&lt;/strong&gt; value, be aware that the path is passed through &lt;a href=&quot;https://withinrafael.com/2015/05/09/running-your-own-app-at-the-click-of-the-surface-pen-button/msdn.microsoft.com/en-us/library/windows/desktop/aa364944.aspx&quot;&gt;GetFileAttributes&lt;/a&gt; to test for existence. And before passing through &lt;a href=&quot;https://withinrafael.com/2015/05/09/running-your-own-app-at-the-click-of-the-surface-pen-button/msdn.microsoft.com/en-us/library/windows/desktop/bb762154.aspx&quot;&gt;ShellExecuteEx&lt;/a&gt;, a command line argument of &lt;strong&gt;&lt;code&gt;/screenclip&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;/fromlockscreen&lt;/code&gt;&lt;/strong&gt;, or &lt;strong&gt;&lt;code&gt;/hardwareinvoke&lt;/code&gt;&lt;/strong&gt; is tacked on, depending on how the button is clicked or the state of the Surface at time of click. So, for example, if you want to avoid Notepad complaining about the lack of a /hardwareinvoke.txt, you will want to wrap it in a script.&lt;/p&gt;
&lt;p&gt;I haven&#39;t spent much time on the immersive app side, so am eager to see what folks do in that space. I plugged in FreshPaint&#39;s AppID, for example: &lt;code&gt;Microsoft.FreshPaint_8wekyb3d8bbwe!Microsoft.FreshPaint&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;... and had mixed (but mostly positive) results.&lt;/p&gt;
&lt;p&gt;Free idea corner: PowerPoint could benefit from button-based slide navigation. An app-aware button remapping hub would be cool too.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Microsoft is embracing and extending Wi-Fi Display</title>
    <link href="https://withinrafael.com/2015/03/30/microsoft-is-embracing-and-extending-wi-fi-display/"/>
    <updated>2015-03-30T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/03/30/microsoft-is-embracing-and-extending-wi-fi-display/</id>
    <content type="html">&lt;p&gt;As part of a recent open specifications update, Microsoft has revealed it&#39;s extending the &lt;a href=&quot;https://www.wi-fi.org/wi-fi-display-technical-specification-v11&quot;&gt;Wi-Fi Display specification&lt;/a&gt; to improve a number of wireless display scenarios. These extensions are described in the &lt;a href=&quot;http://download.microsoft.com/download/C/6/C/C6C3C6F1-E84A-44EF-82A9-49BD3AAD8F58/Windows/%5BMS-WFDPE-Preview%5D.pdf&quot;&gt;MS-WFDPE-Preview&lt;/a&gt; and &lt;a href=&quot;http://download.microsoft.com/download/C/6/C/C6C3C6F1-E84A-44EF-82A9-49BD3AAD8F58/Windows/%5BMS-WDHCE-Preview%5D.pdf&quot;&gt;MS-WDHCE-Preview&lt;/a&gt; specifications and include additions like a low-latency stream to carry mouse cursor data, a method of managing desired latency, and better error reporting.&lt;/p&gt;
&lt;p&gt;Let&#39;s take a look at each of the additions.&lt;/p&gt;
&lt;h2 id=&quot;dynamic-resolution-and-refresh-rate&quot; tabindex=&quot;-1&quot;&gt;Dynamic resolution and refresh rate&lt;/h2&gt;
&lt;p&gt;In scenarios where the source device changes video stream resolution or refresh rate -- think gaming -- devices normally require Real-Time Streaming Protocol (RTSP) renegotiation or, more often, freak the hell out and require you to restart your streaming experience. To smooth that over, Microsoft is introducing a method of detecting these changes (and a way for devices to report they support such). More specifically, devices that report support for this feature will monitor the H.264 stream&#39;s &lt;a href=&quot;http://en.wikipedia.org/wiki/Network_Abstraction_Layer#Parameter_Sets&quot;&gt;sequence parameter set/picture parameter set (SPS/PPS)&lt;/a&gt; for changes in resolution and frame rate and will adapt seamlessly.&lt;/p&gt;
&lt;h2 id=&quot;latency-management&quot; tabindex=&quot;-1&quot;&gt;Latency management&lt;/h2&gt;
&lt;p&gt;When it comes to latency, we typically think lower is better. But that&#39;s not always the case. For example, gamers require low latency to minimize input lag. Because video frames are pumped through as fast as possible, it&#39;s common for some tearing or artifacts to appear. But movie viewers don&#39;t care about latency. They want a pixel perfect jitter-free viewing experience. To achieve that, devices may extend their input buffer and hold onto video frames longer, a method that introduces a measurable but completely acceptable amount of latency.&lt;/p&gt;
&lt;p&gt;The device manufacturer&#39;s dilemma surfaces here: Do they optimize for gaming? Or for casual movie viewers? Or do they release two SKUs of the same hardware with slightly tweaked software?&lt;/p&gt;
&lt;p&gt;To overcome this huge pain point, Microsoft is introducing a capability for devices to receive a &amp;quot;latency mode&amp;quot; from source devices. The idea is that the source will have the context and responsibility of communicating the user&#39;s intended use of the wireless display. For example, the source could detect which app is in use (e.g. Windows Media Player or Microsoft PowerPoint) and send the appropriate latency mode (e.g. high or low, respectively).&lt;/p&gt;
&lt;h2 id=&quot;separate-mouse-stream&quot; tabindex=&quot;-1&quot;&gt;Separate mouse stream&lt;/h2&gt;
&lt;p&gt;Wi-Fi Display is pretty simple in terms of its inputs. It supports one stream that is chock full of audio and video data. That works great for movies but not so much for scenarios involving input. And that&#39;s especially true for a mouse.&lt;/p&gt;
&lt;p&gt;Microsoft is introducing a capability that will eliminate the move-the-mouse-and-wait game by decoupling the mouse from the video completely. This works by enabling a source device to send a separate mouse stream to a target device. The receiving side would then be responsible for combining the mouse cursor data with whatever is being displayed on the screen at the time.&lt;/p&gt;
&lt;p&gt;If this sounds familiar, that&#39;s because Microsoft already does something &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/cc240572.aspx&quot;&gt;very similar as part of its Remote Desktop Protocol (RDP)&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;error-reporting&quot; tabindex=&quot;-1&quot;&gt;Error reporting&lt;/h2&gt;
&lt;p&gt;You&#39;re streaming a game then poof, the stream is dead. What happened? From the perspective of the source device, you lost connection to the target. It knows &lt;em&gt;something&lt;/em&gt; happened. But that&#39;s all the information you&#39;re going to get. Good luck troubleshooting that.&lt;/p&gt;
&lt;p&gt;Microsoft is introducing a more formal method of reporting error details back to the source device. Supported devices will be on guard for &amp;quot;teardown&amp;quot; requests and provide reasons to enhance diagnostics and improve overall usability.&lt;/p&gt;
&lt;h2 id=&quot;richer-metadata&quot; tabindex=&quot;-1&quot;&gt;Richer metadata&lt;/h2&gt;
&lt;p&gt;Microsoft is also opening up some metadata enhancements made by Intel for its &lt;a href=&quot;http://www.intel.com/content/www/us/en/architecture-and-technology/intel-wireless-display.html&quot;&gt;Intel Wireless Display (WiDi) solution&lt;/a&gt;. (These enhancements are listed in the tightly controlled Intel WiDi Specification.) Devices can use Intel-defined fields to report back rich metadata such as a friendly name, support URL, version, and logo.&lt;/p&gt;
&lt;h2 id=&quot;device-support&quot; tabindex=&quot;-1&quot;&gt;Device support&lt;/h2&gt;
&lt;p&gt;From an operating system perspective, most of these features are available for use in &lt;a href=&quot;https://insider.windows.com/&quot;&gt;Windows 10 Technical Preview&lt;/a&gt;. But my testing indicates no devices currently implement the new capabilities. This is likely a sign of a &lt;a href=&quot;http://www.amazon.com/gp/product/B00J9C2JDG/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00J9C2JDG&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=DGY3S2E6ZNIRF6U7&quot;&gt;Microsoft Wireless Display Adapter&lt;/a&gt; update on the horizon.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Wi-Fi Display dongles and associated latencies table</title>
    <link href="https://withinrafael.com/2015/02/27/raw-wi-fi-display-dongles-and-associated-latencies/"/>
    <updated>2015-02-27T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/02/27/raw-wi-fi-display-dongles-and-associated-latencies/</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2015/02/wifi_display_dongles_roundup.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://withinwindows.com/blog/2013/6/30/windows-81-features-miracast-wireless-display-tech-and-it-works-well&quot;&gt;I&#39;ve written about&lt;/a&gt; the Wi-Fi Certified Miracast program (and related Wi-Fi Display specification) before, so I&#39;ll spare you the intro. But what you may not know is that for about two years now, I&#39;ve been testing and collecting wireless display dongles, an esoteric hobby for sure. Per request, I put together a chart of my devices and associated latency observations and am sharing that today.&lt;/p&gt;
&lt;p&gt;When I refer to latency, I&#39;m talking about the time it takes for an image on a source device (e.g. a Surface Pro) to appear on the target device (e.g. TV).&lt;/p&gt;
&lt;p&gt;My test parameters are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source device: Surface Pro&lt;/li&gt;
&lt;li&gt;Target device: LG 47LG70&lt;/li&gt;
&lt;li&gt;Distance between devices: 3ft&lt;/li&gt;
&lt;li&gt;Resolution: 1080p @ 30fps&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Testing involves running a simple program that displays a counter and loops through a movie trailer that covers over 90% of the screen to exercise motion compensation algorithms and observe quality and latency hits, if present. I then take a picture with a DSLR of both the source and target (in the same frame) and subtract the counts to determine latency.&lt;br /&gt;
CostFirmwareAvg. Latency (ms)Works with WindowsMiracast Certified&lt;a href=&quot;http://www.actiontec.com/303.html&quot;&gt;Actiontec ScreenBeam Pro&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00CZ6WAEQ/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00CZ6WAEQ&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&quot;&gt;$68.99&lt;/a&gt;&lt;a href=&quot;http://www.actiontec.com/303.html#soft&quot;&gt;1.1.1.10&lt;/a&gt;83Yes&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA16716&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;http://mocreo.com/ipush-miracast-airplay-dlna-wifi-hdmi.html&quot;&gt;MOCREO iPush&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00ENEU1NK/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00ENEU1NK&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&quot;&gt;$41.80&lt;/a&gt;&lt;a href=&quot;http://cdn.mocreo.com:6689/up_cdn/e/userguide/vieocast_update_v03.zip&quot;&gt;3.0.0-rc1&lt;/a&gt;NoNo&lt;a href=&quot;http://www.netgear.com/home/products/connected-entertainment/wireless-display-adapters/PTV3000.aspx&quot;&gt;Netgear Push2TV (PTV3000)&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00904JILO/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00904JILO&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&quot;&gt;$48.99&lt;/a&gt;&lt;a href=&quot;http://downloadcenter.netgear.com/en/product/PTV3000&quot;&gt;2.4.53&lt;/a&gt;116.3Yes&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA17046&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;http://www.samsung.com/us/mobile/cell-phones-accessories/EAD-T10JDEGSTA&quot;&gt;Samsung Wi-Fi AllShare Cast Hub&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/offer-listing/B00JXO5TAU/?ie=UTF8&amp;amp;camp=1789&amp;amp;condition=new&amp;amp;creative=390957&amp;amp;keywords=Samsung%20Wi-Fi%20AllShare%20Cast%20Hub&amp;amp;linkCode=ur2&amp;amp;qid=1425054061&amp;amp;s=electronics&amp;amp;sr=1-1&amp;amp;tag=withwind0b-20&amp;amp;linkId=KZOR3ZKU7SAED7HD&quot;&gt;$68.98&lt;/a&gt;LJ02NoNo&lt;a href=&quot;http://shop.lenovo.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/integration.workflow:ProductDisplayItem?IsBundle=false&amp;amp;GroupID=460&amp;amp;Code=888015926&amp;amp;sb=:000001CC:000056F0:&amp;amp;hide_menu_area=yes&amp;amp;CA_6C15C=600003960000006620&quot;&gt;Lenovo Wireless Display Adapter (WD100-SL)&lt;/a&gt;&lt;a href=&quot;http://shop.lenovo.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/catalog.workflow:show-category-with-items?category-id=47B0A53B7C0142B8BD73BD4C017677DA&amp;amp;item-eol=1&amp;amp;redir=y#overview&quot;&gt;$29.51&lt;/a&gt;Unknown143.5YesNo&lt;a href=&quot;http://www.belkin.com/us/support-product?pid=01t80000003JiEmAAK&quot;&gt;Belkin Miracast Video Adapter (F7D7501)&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00HFAEBWG/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00HFAEBWG&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&quot;&gt;$59.99&lt;/a&gt;&lt;a href=&quot;http://www.belkin.com/us/support-article?articleNum=80312&quot;&gt;2.51&lt;/a&gt;376Yes, but unstable&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA20296&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/mobile/support/product/hd-10/&quot;&gt;Microsoft Screen Sharing for Lumia Phones (HD-10)&lt;/a&gt;&lt;a href=&quot;http://www.microsoftstore.com/store/msusa/en_US/pdp/Microsoft-HD-10-Miracast-Adapter/productID.309288100&quot;&gt;$69.99&lt;/a&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/mobile/support/product/hd-10/softwareupdate/&quot;&gt;2.0&lt;/a&gt;149.8Yes&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA55947&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00GDQ0RMG/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00GDQ0RMG&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=OGNSDBPNIAE3RAOO&quot;&gt;Amazon Fire TV Stick&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00GDQ0RMG/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00GDQ0RMG&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=OGNSDBPNIAE3RAOO&quot;&gt;$39.99&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/help/customer/display.html/ref=hp_left_v4_sib?ie=UTF8&amp;amp;nodeId=201636990&quot;&gt;54.1.1.0&lt;/a&gt;2971.13Yes, but unstable&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA56838&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;https://www.microsoft.com/hardware/en-us/p/wireless-display-adapter&quot;&gt;Microsoft Wireless Display Adapter&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/offer-listing/B00J9C2JDG/?ie=UTF8&amp;amp;camp=1789&amp;amp;condition=new&amp;amp;creative=390957&amp;amp;linkCode=ur2&amp;amp;tag=withwind0b-20&amp;amp;linkId=WYJFS775SNYEAPPZ&quot;&gt;$57.98&lt;/a&gt;1.083.16Yes&lt;a href=&quot;http://certifications.prod.wi-fi.org/pdf/certificate/public/download?cid=WFA53141&quot;&gt;Yes&lt;/a&gt;&lt;a href=&quot;http://www.tronsmart.com/products/miracastadapter/tronsmart-t1000.html&quot;&gt;Tronsmart T1000 Mirror2TV&lt;/a&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00H2D3N0M/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00H2D3N0M&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=A5KOPTIZINRBDG6E&quot;&gt;$29.99&lt;/a&gt;13414176.66YesNo&lt;a href=&quot;http://www.xbox.com/en-us/xbox-one/&quot;&gt;Xbox One&lt;/a&gt; 🔧&lt;a href=&quot;http://www.amazon.com/gp/product/B00TY9KYKE/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00TY9KYKE&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=LY5ATGEM6XQODIZH&quot;&gt;$345.99&lt;/a&gt;6.2.12815.0106.8Yes, but unstableNoHDMI cable reference&lt;a href=&quot;http://www.amazon.com/gp/product/B003L1ZYYM/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B003L1ZYYM&amp;amp;linkCode=as2&amp;amp;tag=withwind0b-20&amp;amp;linkId=YTFBNT2A4H6ROKQZ&quot;&gt;$5.09&lt;/a&gt;32YesNo&lt;br /&gt;
🔧 Xbox One latency was measured with different hardware (Surface 3), so its number isn&#39;t directly comparable to the other devices. This will be fixed when all devices are re-tested with new hardware.&lt;/p&gt;
&lt;h6 id=&quot;changes&quot; tabindex=&quot;-1&quot;&gt;Changes&lt;/h6&gt;
&lt;p&gt;&lt;em&gt;03/31/2015 - Amazon Fire TV Stick now works with Windows, measured latency added&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;05/01/2015 - Added preliminary latency for Xbox One&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;05/15/2015 - Modified latency for Xbox One using new Surface 3 hardware&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;jQuery(document).ready(function(){&lt;br /&gt;
$(&#39;#raw_data&#39;).dataTable({&lt;br /&gt;
&amp;quot;bPaginate&amp;quot;: false,&lt;br /&gt;
&amp;quot;bFilter&amp;quot;: false,&lt;br /&gt;
&amp;quot;bInfo&amp;quot;: false&lt;br /&gt;
}&lt;br /&gt;
);&lt;br /&gt;
});&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Building a Microsoft Wireless Display Adapter base image</title>
    <link href="https://withinrafael.com/2015/02/22/building-a-microsoft-wireless-display-adapter-base-image/"/>
    <updated>2015-02-22T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/02/22/building-a-microsoft-wireless-display-adapter-base-image/</id>
    <content type="html">&lt;p&gt;After I picked up (and disassembled) a &lt;a href=&quot;http://www.amazon.com/gp/offer-listing/B00J9C2JDG/?ie=UTF8&amp;amp;camp=1789&amp;amp;condition=new&amp;amp;creative=390957&amp;amp;linkCode=ur2&amp;amp;tag=withwind0b-20&amp;amp;linkId=LGX4LDQGL5D6CLHM&quot;&gt;Microsoft Wireless Display Adapter&lt;/a&gt;, I started bugging Microsoft for the source code to the Linux-powered &lt;em&gt;base image&lt;/em&gt; -- the underlying host operating system and support infrastructure. After &lt;strong&gt;three months&lt;/strong&gt; of back and forth, the Source Code Compliance Team finally uploaded a &lt;a href=&quot;http://buildroot.uclibc.org/&quot;&gt;buildroot&lt;/a&gt; that can be used to generate a base image. Unfortunately, it came with zero documentation.&lt;/p&gt;
&lt;p&gt;Here&#39;s my general step-by-step on building the base image with Hyper-V and &lt;a href=&quot;https://www.centos.org/download/&quot;&gt;CentOS 7&lt;/a&gt;. Feedback is welcome.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a virtual machine and install CentOS 7.&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2015/01/baseimage_centos.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you choose to go down the Generation 2 VM route (recommended), don&#39;t forget to shut off Secure Boot.&lt;/li&gt;
&lt;li&gt;Ensure you create a non-root administrative user during install. Mine will be &lt;em&gt;rafael&lt;/em&gt; and will be used for all commands henceforth.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href=&quot;http://3rdpartysource.microsoft.com/release?id=%5CMicrosoft%20Wireless%20Display%20Adapter%201.0%5CSeptember%202014&quot;&gt;buildroot&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You only need the buildroot package from the Third Party Source Code Disclosures website.&lt;/p&gt;
&lt;p&gt;A little background: Initially, Microsoft uploaded a bunch of smaller buildroot output artifacts. But after some back and forth, I was able to convince them to upload the buildroot itself, making the other files less useful.&lt;/p&gt;
&lt;p&gt;You&#39;ll also want to get the zip &lt;a href=&quot;http://winscp.net/eng/index.php&quot;&gt;copied over&lt;/a&gt; and unzipped in the virtual machine. The following instructions will assume you unzipped the buildroot folder in the user&#39;s home directory (~/buildroot).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install some prerequisites.&lt;/p&gt;
&lt;p&gt;Buildroot requires a few packages to operate. They can be installed easily via one command:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; yum &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; net-tools flex &lt;span class=&quot;token function&quot;&gt;which&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;make&lt;/span&gt; bison binutils gcc gcc-c++ &lt;span class=&quot;token function&quot;&gt;bash&lt;/span&gt; patch &lt;span class=&quot;token function&quot;&gt;gzip&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;bzip2&lt;/span&gt; texinfo perl &lt;span class=&quot;token function&quot;&gt;tar&lt;/span&gt; cpio &lt;span class=&quot;token function&quot;&gt;unzip&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;rsync&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;wget&lt;/span&gt; ncurses-devel cvs &lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; mercurial subversion python bzr&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you decide to use 64-bit version of CentOS, you&#39;ll also need some 32-bit support packages. They, too, can be installed easily via one command:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; yum &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; compat-libstdc++-33.i686 libstdc++.i686 libstdc++-devel.i686&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build an old ldconfig&lt;/p&gt;
&lt;p&gt;Due to a bug in newer versions of the GNU C Library, &lt;a href=&quot;https://patchwork.ozlabs.org/patch/255486/&quot;&gt;ldconfig has trouble with ARM architectures&lt;/a&gt;. So we need to grab a working copy and recompile ldconfig for the toolchain. (Alternatively, we could downgrade the entire OS.)&lt;/p&gt;
&lt;p&gt;Let&#39;s first set up the required root folder then download and extract the software:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; glibc-build&lt;br /&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; glibc-build&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;wget&lt;/span&gt; http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;tar&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-zxvf&lt;/span&gt; glibc-2.15.tar.gz&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, still in the root folder we created, issue the commands:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;./glibc-2.15/configure &lt;span class=&quot;token parameter variable&quot;&gt;--prefix&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;/usr&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compilation will take a few minutes. When it&#39;s done, copy the replacement ldconfig into the buildroot toolchain:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;cp&lt;/span&gt; ./elf/ldconfig ~/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-ldconfig&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure Buildroot 2012.02&lt;/p&gt;
&lt;p&gt;Before we can build the toolchain and packages, we need to write out a .config file. First, enter the buildroot folder and issue the command:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;make&lt;/span&gt; menuconfig&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2015/02/menuconfig-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;In the configurator that appears, select &lt;strong&gt;Load an Alternate Configuration File&lt;/strong&gt; and provide the following configuration file: &lt;code&gt;~/buildroot/microsoft.buildroot_config&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(Microsoft has provided a slew of configuration files but none of them perfectly match the retail device configuration. For our purposes, however, it&#39;s good enough. You&#39;re free to select more packages for compilation.)&lt;/p&gt;
&lt;p&gt;Exit the configurator and save your changes.&lt;/p&gt;
&lt;p&gt;Now let&#39;s quickly fix up some missing execute permissions and we&#39;ll be ready to go:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;chmod&lt;/span&gt; +x ~/buildroot/support/scripts/*&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;chmod&lt;/span&gt; +x ~/buildroot/support/gnuconfig/config.guess&lt;br /&gt;&lt;span class=&quot;token function&quot;&gt;chmod&lt;/span&gt; +x ~/buildroot/support/dependencies/*.sh&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build a base image&lt;/p&gt;
&lt;p&gt;This part is easy. Still in the buildroot folder, simply issue the command:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2015/02/build-started.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And wait.&lt;/p&gt;
&lt;p&gt;My virtual machine was configured with a mere 1GB of RAM and 4 virtual processors clocking in at 3.4ghz. The build completed in about 10 minutes.&lt;/p&gt;
&lt;p&gt;After the build completes, you&#39;ll have a &lt;em&gt;nearly&lt;/em&gt; complete root filesystem for the adapter stored in the &lt;strong&gt;target&lt;/strong&gt; folder.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deployment?&lt;/p&gt;
&lt;p&gt;Microsoft hasn&#39;t provided the scripts or steps necessary to create an actual image to flash onto the Microsoft Wireless Display Adapter, so the instructions must come to abrupt end here.&lt;/p&gt;
&lt;p&gt;If you have root on the device -- coming in a later post -- you can use the toolchain to compile packages and transfer them over to the device.&lt;/p&gt;
&lt;p&gt;Know how to take this further? Or how to connect to/reflash NAND? Or have experience building jigs? Email me. I&#39;d love to pick your brain.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content>
  </entry>
  
  <entry>
    <title>How to set up synthetic kernel debugging for Hyper-V virtual machines</title>
    <link href="https://withinrafael.com/2015/02/01/how-to-set-up-synthetic-kernel-debugging-for-hyper-v-virtual-machines/"/>
    <updated>2015-02-01T00:00:00Z</updated>
    <id>https://withinrafael.com/2015/02/01/how-to-set-up-synthetic-kernel-debugging-for-hyper-v-virtual-machines/</id>
    <content type="html">&lt;p&gt;Windows 8 (and Windows Server 2012) introduced a new debugging transport called KDNET. As the name implies, it allows kernel debugging over a network and can be faster and easier to set up than its predecessors (e.g. COM and IEEE 1394).&lt;/p&gt;
&lt;p&gt;MSDN has great background information on setting up kernel debugging via &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/hardware/hh439376.aspx&quot;&gt;Visual Studio&lt;/a&gt; and &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/hardware/hh439378.aspx&quot;&gt;by hand&lt;/a&gt;, however, Microsoft&#39;s &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/hardware/ff538143.aspx&quot;&gt;official stance on virtual machine debugging&lt;/a&gt; is to continue using the old and slow serial port. Even on &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/windows/hardware/ff538143.aspx#generation_2_virtual_machines&quot;&gt;generation 2 virtual machines&lt;/a&gt;. This makes some tasks, like dumping memory or resolving symbols, a slow and tedious task.&lt;/p&gt;
&lt;p&gt;But unofficially you can instead use what&#39;s internally referred to as &amp;quot;synthetic debugging&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2015/02/hv_synthetic_simplified.png&quot; alt=&quot;Figure 1 - Simplified Synthetic Debugging Architecture&quot; /&gt;&lt;br /&gt;
Figure 1 - Simplified Synthetic Debugging Architecture&lt;/p&gt;
&lt;p&gt;To understand how it works, first consider a common KDNET scenario on a physical machine. When KDNET is enabled, the Microsoft Kernel Debug Network Adapter built into Windows takes over (and shares) the physical network device installed in the machine. Communication to and from the machine (and kernel debugger) occurs over the network as expected and life is grand. But virtualized environments (in child partitions) add another layer of abstraction to the underlying hardware that presents a problem -- the Kernel Debug Network Adapter cannot latch directly onto the physical network device.&lt;/p&gt;
&lt;p&gt;Cue the magic behind synthetic debugging.&lt;/p&gt;
&lt;p&gt;To overcome the inability to directly control network hardware, KDNET was built with smarts to detect virtualized environments and switch to communicating over VMBus -- a inter-partition communication mechanism -- with the host operating system (in the parent partition), as shown in Figure 1. The parent then exposes a KDNET endpoint for you to communicate with the virtualized environment over the network. With this set up, the virtualized environment doesn&#39;t require network connectivity!&lt;/p&gt;
&lt;p&gt;To set up synthetic debugging (for Windows), you need to be running:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 8 or Windows Server 2012+ on the host side&lt;/li&gt;
&lt;li&gt;Windows 8 or Windows Server 2012+ on the guest side (generation 1 or 2)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&#39;s the step-by-step:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On the guest machine, open an elevated command prompt and issue the commands:&lt;/p&gt;
&lt;pre class=&quot;language-batch&quot;&gt;&lt;code class=&quot;language-batch&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;bcdedit&lt;/span&gt; &lt;span class=&quot;token parameter attr-name&quot;&gt;/dbgsettings&lt;/span&gt; NET HOSTIP:&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;.&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;.&lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;.&lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt; PORT:&lt;span class=&quot;token number&quot;&gt;55555&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;bcdedit&lt;/span&gt; &lt;span class=&quot;token parameter attr-name&quot;&gt;/debug&lt;/span&gt; on&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When KDNET kicks in and detects the virtualized environment,&lt;br /&gt;
the HOSTIP and PORT parameter values are ignored, in favor of the&lt;br /&gt;
VMBus.&lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;
&lt;p&gt;Copy the key value displayed and keep it handy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the host machine, open an elevated Powershell instance and run the following script after adjusting the VMName and DesiredDebugPort values:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;$VMName&lt;/span&gt; = &lt;span class=&quot;token string&quot;&gt;&quot;Virtual Machine name here&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$DesiredDebugPort&lt;/span&gt; = 55555&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$MgmtSvc&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;gwmi&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;Class&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Msvm_VirtualSystemManagementService&quot;&lt;/span&gt; `&lt;br /&gt;    &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Namespace &lt;span class=&quot;token string&quot;&gt;&quot;root&#92;virtualization&#92;v2&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$VM&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;Get-VM&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;VMName &lt;span class=&quot;token variable&quot;&gt;$VMName&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$Data&lt;/span&gt; = &lt;span class=&quot;token function&quot;&gt;gwmi&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Namespace &lt;span class=&quot;token string&quot;&gt;&quot;root&#92;virtualization&#92;v2&quot;&lt;/span&gt; `&lt;br /&gt;    &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; Msvm_VirtualSystemSettingData `&lt;br /&gt;    &lt;span class=&quot;token punctuation&quot;&gt;|&lt;/span&gt; ? ConfigurationID &lt;span class=&quot;token operator&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$VM&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Id&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$Data&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;DebugPort = &lt;span class=&quot;token variable&quot;&gt;$DesiredDebugPort&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$Data&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;DebugPortEnabled = 1&lt;br /&gt;&lt;span class=&quot;token variable&quot;&gt;$MgmtSvc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;ModifySystemSettings&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;$Data&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;GetText&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Be sure to specify an open ephermeral (49152-65535) UDP port here.&lt;/p&gt;
&lt;p&gt;When the machine is powered on (or reset), the virtual machine&#39;s specific Virtual Machine Worker Process (vmwp.exe) will attempt to bind to that port on all (management) interfaces.&lt;/p&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;
&lt;p&gt;Power cycle the guest machine. A reset is not sufficient as it doesn&#39;t tear down the Virtual Machine Worker Process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On any machine on the network, connect a debugger to the Hyper-V host machine with the port and key from earlier. For example, to connect with WinDbg, issue the following command:&lt;/p&gt;
&lt;pre class=&quot;language-batch&quot;&gt;&lt;code class=&quot;language-batch&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;windbg&lt;/span&gt;.exe &lt;span class=&quot;token parameter attr-name&quot;&gt;-k&lt;/span&gt; net:target=hyperv-host,port=&lt;span class=&quot;token number&quot;&gt;55555&lt;/span&gt;,key=a.b.c.d&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When not configured correctly, synthetic debugging can be quite a pain to troubleshoot. Here are some tips if you run into problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ensure the guest is running Windows 8 or above and the active BCD entry is configured correctly (via bcdedit).&lt;/li&gt;
&lt;li&gt;Ensure the guest&#39;s Virtual Machine Worker Process has bound to the port you specified with &lt;a href=&quot;https://technet.microsoft.com/en-us/sysinternals/bb897437.aspx&quot;&gt;TcpView&lt;/a&gt; or &lt;a href=&quot;http://www.nirsoft.net/utils/cports.html&quot;&gt;CurrPorts&lt;/a&gt;. This can be extremely problematic if your Hyper-V host &lt;a href=&quot;https://support2.microsoft.com/kb/956188/en-us&quot;&gt;is also a DNS server&lt;/a&gt; like mine.&lt;/li&gt;
&lt;li&gt;Ensure no other virtual machines are configured to use the same port.&lt;/li&gt;
&lt;li&gt;Ensure any firewalls in the way are configured to allow UDP traffic through via specified debug port.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Happy debugging!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>New experimental console features in Windows &quot;Threshold&quot;</title>
    <link href="https://withinrafael.com/2014/09/30/new-experimental-console-features-in-windows-threshold/"/>
    <updated>2014-09-30T00:00:00Z</updated>
    <id>https://withinrafael.com/2014/09/30/new-experimental-console-features-in-windows-threshold/</id>
    <content type="html">&lt;p&gt;Microsoft is expected to deliver its first technical preview release of Windows codenamed &amp;quot;Threshold&amp;quot; &lt;a href=&quot;http://winsupersite.com/windows/coming-soon-threshold-public-preview&quot;&gt;tomorrowish&lt;/a&gt;. And while the usual outlets will be covering the big changes, I wanted to document a relatively smaller set of welcome changes to the Command Prompt (and the underlying Console Host).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Sep/New-Experimental-Tab-1.png&quot; alt=&quot;Experimental Tab in the new Command Prompt&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here&#39;s the new experimental tab in Threshold&#39;s Command Prompt properties window. This tab exposes switches that turn on and off new experimental features that apply to all console windows -- including the one that hosts PowerShell.&lt;/p&gt;
&lt;p&gt;Let&#39;s go over them.&lt;/p&gt;
&lt;h4 id=&quot;enable-line-wrapping-selection&quot; tabindex=&quot;-1&quot;&gt;Enable line wrapping selection&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Sep/Wrapping-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;In previous versions of the Command Prompt, selecting text for copy involved crudely painting a selection box on the screen and hitting the Enter key. But you weren&#39;t done. You also had to paste that text into a text editor to correct the abrupt line endings. It was a terribly slow and error-prone process.&lt;/p&gt;
&lt;p&gt;But that&#39;s all in the past now.&lt;/p&gt;
&lt;p&gt;In Threshold, you can now select and copy text as you would expect to in any text editor.&lt;/p&gt;
&lt;h4 id=&quot;filter-clipboard-contents-on-paste&quot; tabindex=&quot;-1&quot;&gt;Filter clipboard contents on paste&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Sep/Clipboard-Filtering-3.png&quot; alt=&quot;Pasted text void of fancy quotes and tabs in the new Command Prompt&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Ever pasted in a command only to realize (after it errored out) it was peppered with tabs and fancy quotation marks? I have. And I won&#39;t ever again, thanks to a new paste filter in Threshold.&lt;/p&gt;
&lt;p&gt;Now when pasting text, fancy quotation marks are converted into their straighter equivalents and stray tabs are removed.&lt;/p&gt;
&lt;h4 id=&quot;wrap-text-output-on-resize&quot; tabindex=&quot;-1&quot;&gt;Wrap text output on resize&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Sep/Resize-Wrapping.png&quot; alt=&quot;Text resized in new Command Prompt&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Resizing the Command Prompt window has always been an alien task. If you somehow managed to get the window to shrink, a horizontal scrollbar would appear and text would remain static and not reflow or wrap given the new constraints.&lt;/p&gt;
&lt;p&gt;With this feature enabled, however, the window and its text behave the way you expect.&lt;/p&gt;
&lt;h4 id=&quot;enable-new-ctrl-key-shortcuts&quot; tabindex=&quot;-1&quot;&gt;Enable new Ctrl key shortcuts&lt;/h4&gt;
&lt;p&gt;Some handy new keyboard shortcuts have found their way into the new Command Prompt as well. I say &lt;em&gt;some&lt;/em&gt; because I can&#39;t be sure I covered them all. We&#39;ll have to wait for the &lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkId=507549&quot;&gt;official documentation&lt;/a&gt; to come online.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CTRL + A - Select all&lt;/li&gt;
&lt;li&gt;CTRL + C - Copy&lt;/li&gt;
&lt;li&gt;CTRL + F - Find&lt;/li&gt;
&lt;li&gt;CTRL + M - Mark&lt;/li&gt;
&lt;li&gt;CTRL + V - Paste&lt;/li&gt;
&lt;li&gt;CTRL + ↑/↓ - Scroll (line) up/down&lt;/li&gt;
&lt;li&gt;CTRL + PgUp/PgDn - Scroll (page) up/down&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;extended-edit-keys&quot; tabindex=&quot;-1&quot;&gt;Extended edit keys&lt;/h4&gt;
&lt;p&gt;There&#39;s not a lot of information available on extended edit keys. This feature has existed in Windows for quite some time but has never really been exposed to users until Threshold.&lt;/p&gt;
&lt;p&gt;We&#39;ll have to wait for the official word on this feature.&lt;/p&gt;
&lt;h4 id=&quot;trim-leading-zeros-on-selection&quot; tabindex=&quot;-1&quot;&gt;Trim leading zeros on selection&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Sep/Leading-Zeroes.png&quot; alt=&quot;Leading zeros selected in the new Command Prompt&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you find yourself working with a lot of numerical data in the Command Prompt, you may want to turn this on.&lt;/p&gt;
&lt;p&gt;When selecting a number with leading zeros (e.g. via double-click), the selection box will begin &lt;em&gt;after&lt;/em&gt; any insignificant zeros present. For example, 000001234 becomes 1234. Hexadecimal and decimal prefaced numbers, however, override this rule. That is, 0x1234 and 0n1234 remain selectable in their entirety.&lt;/p&gt;
&lt;h4 id=&quot;opacity&quot; tabindex=&quot;-1&quot;&gt;Opacity&lt;/h4&gt;
&lt;p&gt;This one is an oddball.&lt;/p&gt;
&lt;p&gt;This slider ranges from a ghostly 30% all the way up to 100% (default). But it affects all console windows on your system and &lt;em&gt;the entire host window&lt;/em&gt;, not just the background. (That color is still tweakable via the Properties window, mind you.)&lt;/p&gt;
&lt;p&gt;As translucency increases, text readability decreases, so it&#39;s not immediately clear who would ever use this. But it&#39;s a neat technical demo and nods at the Windows enthusiast crowd that has undoubtly been asking for this for years.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Taking a peek at Xbox One-formatted disks in Windows</title>
    <link href="https://withinrafael.com/2014/06/25/taking-a-peek-at-xbox-one-formatted-disks-in-windows/"/>
    <updated>2014-06-24T00:00:00Z</updated>
    <id>https://withinrafael.com/2014/06/25/taking-a-peek-at-xbox-one-formatted-disks-in-windows/</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://news.xbox.com/2014/06/xbox-one-june-update-available-starting-today&quot;&gt;A few weeks ago&lt;/a&gt; Microsoft pushed out an update to Xbox One, enabling support for external storage via its USB 3.0 ports. It works as you would expect -- you plug in a disk, it gets formatted, and away you go. But you lose the ability to use that disk on other PCs and devices. Let&#39;s take a look at why.&lt;/p&gt;
&lt;p&gt;Here&#39;s what an Xbox One-formatted disk looks like on a Windows PC via Disk Management:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Jun/xbox_disk_mgmt.png&quot; alt=&quot;Unknown disk in Disk Management&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Windows clearly has no idea what&#39;s going on here, which isn&#39;t surprising. The &lt;em&gt;Not Initialized&lt;/em&gt; state here indicates the disk doesn&#39;t have the expected &lt;a href=&quot;https://en.wikipedia.org/wiki/Master_Boot_Record&quot;&gt;Master Boot Record&lt;/a&gt; (MBR) at the beginning (sector 0) of the disk.&lt;/p&gt;
&lt;p&gt;Here&#39;s what the beginning of the disk looks like in a hex editor:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Jun/sector0_hex_editor-1.jpg&quot; alt=&quot;A slice of the disk&#39;s sector 0 in a hex editor&quot; /&gt;&lt;/p&gt;
&lt;p&gt;On a traditional disk, the first 446 bytes of this sector would contain &lt;em&gt;bootstrap code&lt;/em&gt; used for boot purposes. The Xbox One isn&#39;t booting from the disk so this area is blanked out with the exception of some placeholder bytes near the end.&lt;/p&gt;
&lt;p&gt;The bytes that follow represent various disk and partition parameters.&lt;/p&gt;
&lt;p&gt;The EE byte sits in the &lt;a href=&quot;https://en.wikipedia.org/wiki/Partition_type&quot;&gt;partition type&lt;/a&gt; slot and is used by Microsoft to indicate a &lt;a href=&quot;https://en.wikipedia.org/wiki/GUID_Partition_Table&quot;&gt;GUID Partition Table&lt;/a&gt; (GPT) partitioning scheme is in use. Windows should have no problem recognizing this.&lt;/p&gt;
&lt;p&gt;The last two bytes of sector 0 signify what&#39;s called the &lt;em&gt;boot signature&lt;/em&gt; -- an arbitrary but known marker to indicate that this sector represents a MBR structure and isn&#39;t just a bunch of random data. Windows (and most systems) expect these two bytes to be 55 AA (0xAA55). The Xbox One, however, opted for 99 CC (0xCC99). This is why Windows thinks the disk is uninitialized.&lt;/p&gt;
&lt;p&gt;Overwriting the boot signature with the expected bytes and unplugging/replugging the drive results in a happier Disk Management tool.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Jun/xbox_disk_mgmt_tweaked-1.png&quot; alt=&quot;Recognized disk in Disk Management&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And here&#39;s a view from File Explorer:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2014/Jun/xbox_disk_explorer.png&quot; alt=&quot;Recognized disk in File Explorer&quot; /&gt;&lt;/p&gt;
&lt;p&gt;(That file with the GUID represents the Netflix app that I copied onto the disk.)&lt;/p&gt;
&lt;p&gt;Presumably, you could write some code to swap the boot signature bytes to flip-flop between PC and Xbox One disk compatibility. But I&#39;d be weary of relying on any data stored on this file system given Windows still thinks &amp;quot;there&#39;s a problem with this drive&amp;quot;. I suspect, like &lt;a href=&quot;https://en.wikipedia.org/wiki/File_Allocation_Table#FATX&quot;&gt;FAT on Xbox 360&lt;/a&gt;, the NTFS filesystem structure was tweaked to meet the needs of Xbox One.&lt;/p&gt;
&lt;p&gt;Maybe we should start calling this NTFSX.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>The WinX Menu and its hashing algorithm</title>
    <link href="https://withinrafael.com/2014/04/05/the-winx-menu-and-its-hashing-algorithm/"/>
    <updated>2014-04-04T00:00:00Z</updated>
    <id>https://withinrafael.com/2014/04/05/the-winx-menu-and-its-hashing-algorithm/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This post first appeared on Within Windows on April 4, 2012.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Last week, a reader – &amp;quot;Windows Fan&amp;quot; – tipped me off to an article on &lt;a href=&quot;http://www.askvg.com/exclusive-how-to-add-new-shortcuts-in-quick-access-menu-win-x-menu-of-windows-8/&quot;&gt;Vishal Guptas blog&lt;/a&gt; indicating how to customize the new WinX menu in Windows 8. (You know, the menu that appears when you right-click the lower-left Start tip.) Not happy with hacking core system files and peeling back file system security, I dug a little deeper to understand what&#39;s going on and came up with a simpler solution.&lt;/p&gt;
&lt;p&gt;So let&#39;s start at the top. The WinX menu is a simple context menu that appears when you right-click the Start tip that appears when you squish the mouse into the lower-left corner of the screen. The purpose of the menu is &lt;strong&gt;not to act as a Start Menu replacement&lt;/strong&gt; but rather as a springboard to perform advanced system functions that are slightly out of reach. For example, if you’re trying to kill a runaway system process, you will probably need quick access to Task Manager, an elevated Command Prompt, and perhaps Programs and Features to uninstall the culprit app. Launching those applications in succession via the Start Screen would be a pain in the rump.&lt;/p&gt;
&lt;p&gt;The entries on the menu are driven by shortcut (.lnk) files present in each Group folder located at %LocalAppData%&#92;Microsoft&#92;Windows&#92;WinX. But you can’t manipulate the shortcuts within or add new ones. That’s because at first invocation (e.g. a fresh boot), the menu scans for and only adds approved shortcuts. Why? Again, Microsoft doesn’t want this becoming another Start Menu or, worse, an icon landfill for installers a la Quick Launch back in Windows Vista.&lt;/p&gt;
&lt;p&gt;But an argument could be made for that small sliver of folks who genuinely want to lightly extend the menu, perhaps with utilities such as Process Monitor and DebugView. So let’s talk about what makes an approved shortcut.&lt;/p&gt;
&lt;p&gt;An approved shortcut – a moniker I made up – is a .lnk file that has the appropriate markings to indicate to Windows “Hey, I’m special.” The marking is a simple 4-byte hash of several pieces of information. From the .lnk itself, two points are collected:&lt;/p&gt;
&lt;p&gt;The link’s target application path/file (e.g. C:&#92;Games&#92;Minecraft.exe)&lt;/p&gt;
&lt;p&gt;The link’s target application arguments (e.g. –windowed)&lt;/p&gt;
&lt;p&gt;The third ingredient is simply a hard-coded chunk of text, or a salt if you will, to keep things interesting. That string is, literally, “Do not prehash links.  This should only be done by the user.”&lt;/p&gt;
&lt;p&gt;With these three strings in hand, Windows then glues them together, lowercases everything, and runs them through the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/desktop/bb759853.aspx&quot;&gt;HashData function&lt;/a&gt;. But you’re probably wondering at this point, what does it compare to?&lt;/p&gt;
&lt;p&gt;Let’s shift our focus to .lnk files. We know them as shortcuts to things. But they’re officially called &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd871305(v=prot.13).aspx&quot;&gt;Shell Links&lt;/a&gt; and can store a lot of information on other data objects in Windows. More specifically, they support storing a structure of data called a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd871335(v=prot.13).aspx&quot;&gt;PropertyStoreDataBlock&lt;/a&gt; that acts as a container for arbitrary string or numeric key/value pairs. Yep, the “WinX hash” is stored in here. If you’re curious, the key can be defined as such:&lt;/p&gt;
&lt;p&gt;DEFINE_PROPERTYKEY(PKEY_WINX_HASH,&lt;/p&gt;
&lt;p&gt;0xFB8D2D7B, 0x90D1, 0x4E34, 0xBF, 0x60, 0x6E, 0xAC, 0x09, 0x92, 0x2B, 0xBF, 0x02);&lt;/p&gt;
&lt;p&gt;So to tie it all together, Windows – the Shell specifically – iterates through the .lnk files in each GroupN folder; opens them up; pulls out and concatenates the target path, args, and an arbitrary string; then finally hashes the result. This hash is then compared with the one stored in the .lnk to determine if it’s approved. Rinse and repeat.&lt;/p&gt;
&lt;p&gt;If you’re interested in stuffing items into that menu, I wrote a tool to mark your shortcuts as approved. (&lt;a href=&quot;https://github.com/riverar/hashlnk&quot;&gt;The source code is on Github&lt;/a&gt;, if you&#39;re interested.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The WinX menu doesn’t seem to handle architecture-dependent environment string expansion very well, so shortcuts to %ProgramFiles% may not work (e.g. Internet Explorer 64-bit). I suspect this is a WONTFIX given it’s not designed to work with your own shortcuts.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Tinkering with uncertified Play To devices on Windows 8</title>
    <link href="https://withinrafael.com/2013/02/03/tinkering-with-uncertified-play-to-devices-on-windows-8/"/>
    <updated>2013-02-02T00:00:00Z</updated>
    <id>https://withinrafael.com/2013/02/03/tinkering-with-uncertified-play-to-devices-on-windows-8/</id>
    <content type="html">&lt;p&gt;Microsoft supports a feature in Windows called &lt;a href=&quot;http://windows.microsoft.com/en-US/windows7/products/features/play-to&quot;&gt;Play To&lt;/a&gt; that allows you to stream music, video, and photos from your computer to TVs or speakers on your home network. But anyone who has tried using Play To knows it can be an extremely frustrating experience, thanks in part to brittle OEM implementations of the underlying Digital Living Network Alliance (DLNA) spec.&lt;/p&gt;
&lt;p&gt;As part of its continuing DLNA compliance push, Windows 8 now requires that Play To devices be certified before use in the new Windows Store application model. (But not via desktop applications.) That is, an uncertified device will not appear in the Devices charm from a Windows Store app (e.g. Video). But for those of us geeks with flaky sort-of-working DLNA devices, we&#39;re out of luck.&lt;/p&gt;
&lt;p&gt;Or were, anyway.&lt;/p&gt;
&lt;p&gt;As part of a Powershell learning experience, I wrote a script that suspends the aforementioned checks in Windows 8 and offers facilities to generate the required device metadata.&lt;/p&gt;
&lt;p&gt;Here&#39;s a quick run through:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Read the readme, just in case.&lt;/li&gt;
&lt;li&gt;Download the latest playto-tools script + dependencies from my repository.&lt;/li&gt;
&lt;li&gt;Open an administrative instance of Powershell, in the directory holding all the downloaded files.&lt;/li&gt;
&lt;li&gt;Dot source the script. (. .&#92;playto-tools.ps1)&lt;/li&gt;
&lt;li&gt;Call Suspend-CertifiedDeviceChecks to patch the Device Property Manager to accept unsigned metadata.&lt;/li&gt;
&lt;li&gt;Call Get-MediaRenderers to list the media renderers on your network. You need to grab the hardware ID of the device you wish to enable Play To for.&lt;/li&gt;
&lt;li&gt;Pass this hardware ID (and the -Install switch) to New-DeviceMetadata to generate and install metadata into the Device Metadata Store.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In my case, I was testing with one device and was able to string everything together:&lt;/p&gt;
&lt;pre class=&quot;language-powershell&quot;&gt;&lt;code class=&quot;language-powershell&quot;&gt;&lt;span class=&quot;token function&quot;&gt;New-DeviceMetadata&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Get-MediaRenderers&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Select&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;First 1 &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;exp HardwareID&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;Install&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively, you could also boot Windows in test mode.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Dissecting the //build/ Badge (Part 2)</title>
    <link href="https://withinrafael.com/2012/12/07/dissecting-the-build-badge-part-2/"/>
    <updated>2012-12-07T00:00:00Z</updated>
    <id>https://withinrafael.com/2012/12/07/dissecting-the-build-badge-part-2/</id>
    <content type="html">&lt;p&gt;A little under a month ago, I dissolved Paul Thurrott&#39;s //build/ badge to reveal an embedded NFC integrated circuit (IC). But I had to stop short of actually reading its data due to the lack of a proper NFC reader. (Windows Phone 8 doesn&#39;t give you raw NFC access.) I purchased an ACS ACR122T and after weeks of waiting and experimenting I can now complete the story.&lt;/p&gt;
&lt;p&gt;So, let&#39;s start off with a correction. In Part 1, I incorrectly guessed that the IC was a MIFARE Ultralight. Turns out, it&#39;s an older MIFARE Classic 1K complete with key-based security. But before I wrote the IC off as encrypted and inaccessible, I learned that these ICs were &lt;a href=&quot;http://www.cs.ru.nl/~flaviog/publications/Security_Flaw_in_MIFARE_Classic.pdf&quot;&gt;compromised back in 2008&lt;/a&gt; -- with a &lt;a href=&quot;http://eprint.iacr.org/2009/137&quot;&gt;card-only attack following in early 2009&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&#39;s take a brief moment to talk about these keys.&lt;/p&gt;
&lt;p&gt;Without getting too technical, these NFC ICs have chunks of data. Each chunk of data can be secured via a pair of keys -- A and B. Each of these keys can be used separately to access the data it protects. (For example, you may give a read-only key A to conference vendors, while maintaining the read-write key B for administrative purposes.)&lt;/p&gt;
&lt;p&gt;Back to the badge.&lt;/p&gt;
&lt;p&gt;Without access to an authorized //build/ badge reader, I had to use a &lt;a href=&quot;http://code.google.com/p/mfcuk/&quot;&gt;software implementation (mfcuk)&lt;/a&gt; of the card-only attack I mentioned earlier to recover keys A and B. After weeks of painfully fiddling with the timings of the attack, I successfully recovered key B on one chunk of data. (I then made quick work of the rest of the keys/chunks &lt;a href=&quot;http://code.google.com/p/nfc-tools/&quot;&gt;using another attack [mfoc]&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key A&lt;/strong&gt; was recovered but isn&#39;t worth sharing because it appears to be unique per badge. (Tested with two badges.) Key A is usually programmed as a read-only key -- presumably for vendors on the conference floor. But given its uniqueness I&#39;m confused as to how vendors would obtain a valid key at scan time. Perhaps the readers were networked to a key management system? Or maybe Key A is computed at runtime using a mash of the badge unique ID and a shared secret? Or maybe there&#39;s a handful of keys per attendee group (e.g. media, student, presenter). What do you think?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key B&lt;/strong&gt; is static, thankfully. On two badges I examined, Key B was given write permissions card-wide. So I named it The //build/ Badge Administrative Key. That key is &lt;code&gt;f4a9ef2afc6d&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Using the Badge Administrative Key, I dumped out the entire //build/ badge. Surprisingly, it&#39;s not empty! It contains the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two sets of identifiers(?) (6 digit, 4 digit) (e.g. 756552, 1269)&lt;/li&gt;
&lt;li&gt;Badge Full Name&lt;/li&gt;
&lt;li&gt;Badge Title&lt;/li&gt;
&lt;li&gt;Full address&lt;/li&gt;
&lt;li&gt;Phone number&lt;/li&gt;
&lt;li&gt;Email address&lt;/li&gt;
&lt;li&gt;Affiliation label, if applicable (e.g. Media)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So if you&#39;re planning to toss the badge into the trash, you may want first wipe the IC. But if you&#39;re a developer looking to dip into NFC, you may want to salvage the tag and format it to NDEF specs so you have something Windows Phone compatible to play with.&lt;/p&gt;
&lt;p&gt;Regardless, case closed.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Dissecting the //build/ Badge (Part 1)</title>
    <link href="https://withinrafael.com/2012/11/09/dissecting-the-build-badge-part-1/"/>
    <updated>2012-11-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2012/11/09/dissecting-the-build-badge-part-1/</id>
    <content type="html">&lt;p&gt;If you were at //build/ this year, you probably remember tapping your badge on a reader before picking up your free Surface and Nokia Lumia 920 devices. It turns out, the badge hides NFC tech as opposed to that boring ol&#39; RFID stuff.&lt;/p&gt;
&lt;p&gt;Tear down photos follow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/08/8168776248_f443bae6f7.jpg&quot; alt=&quot;8168776248_f443bae6f7&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I managed to steal a badge from some random chump.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/08/8168777656_033c190f0c.jpg&quot; alt=&quot;8168777656_033c190f0c&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Acetone made quick work of the plastic badge... Wait, what&#39;s that?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/08/8168778444_876ea786b7.jpg&quot; alt=&quot;8168778444_876ea786b7&quot; /&gt;&lt;/p&gt;
&lt;p&gt;NXP MIFARE Ultralight NFC IC&lt;/p&gt;
&lt;p&gt;But what secrets does it store within? Sadly, the tag doesn&#39;t appear to have been NDEF formatted so reading it with Windows Phone is out. (It is detected just fine, though.) I ordered an ACR122T reader/writer to lend a hand so check back in a week or so for the big reveal.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Disabling animations in Office 2013</title>
    <link href="https://withinrafael.com/2012/07/21/disabling-animations-in-office-2013/"/>
    <updated>2012-07-21T00:00:00Z</updated>
    <id>https://withinrafael.com/2012/07/21/disabling-animations-in-office-2013/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This is a legacy post imported from my previous Within Windows blog.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Back in April, &lt;a href=&quot;http://www.winsupersite.com/article/office/awful-typing-animation-word-15-video-142738&quot;&gt;Paul Thurrott wrote about an awful typing animation&lt;/a&gt; present in Office -- particularly Word -- &amp;quot;15&amp;quot; Technical Preview. While this animation has been tweaked and improved in the new Office 2013 Customer Preview, some of you may wish to turn it off.&lt;/p&gt;
&lt;p&gt;You can do so by navigating to &lt;code&gt;HKCU&#92;Software&#92;Microsoft&#92;Office&#92;15.0&#92;Common&#92;Graphics&lt;/code&gt; and creating a DWORD value named &lt;code&gt;DisableAnimations&lt;/code&gt;. Set its data to &lt;code&gt;1&lt;/code&gt; and you&#39;re set.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>The WinX Menu and its hashing algorithm revisited</title>
    <link href="https://withinrafael.com/2012/06/02/the-winx-menu-and-its-hashing-algorithm-revisited/"/>
    <updated>2012-06-01T00:00:00Z</updated>
    <id>https://withinrafael.com/2012/06/02/the-winx-menu-and-its-hashing-algorithm-revisited/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This post first appeared on Within Windows on June 1, 2012.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In an April post, I covered the new &amp;quot;Win-X&amp;quot; menu, named after the keyboard shortcut used to access it, and how it features a hashing algorithm to determine if a shortcut was approved for display. I also offered &lt;a href=&quot;https://github.com/riverar/hashlnk&quot;&gt;a tool that would sign shortcuts&lt;/a&gt;, upgrading them the to coveted approved status.&lt;/p&gt;
&lt;p&gt;This won&#39;t be a regurgitation of all that again. Instead, I will simply cover some changes made to the menu in Windows 8 Release Preview. (And more importantly, offer an updated version of hashlnk!)&lt;/p&gt;
&lt;p&gt;First of the notable changes to the WinX menu in Windows 8 Release Preview is the unfortunate removal of the Network Connections shortcut. This shortcut provided a sneaky backdoor to the legacy Network Connections area, offering immediate access to network interfaces -- you know, the very items we stumble around looking for in that abhorrent Network and Sharing Center. But on the flip side, Network Connections is becoming less and less useful, thanks to better software (e.g. Windows, network drivers/stack) and the cluttering up of pseudo-interfaces like Virtual Wifi NICs, VMware and Hyper-V virtual switches and complex VPN thingamajigs. No worries.&lt;/p&gt;
&lt;p&gt;The more important change, however, was to its hashing algorithm that sussed out whether a shortcut was approved for display in the menu. I created a tool for folks to upgrade their own shortcut files (.lnk) however it broke with the new Windows release. Let&#39;s dig a little deeper into why.&lt;/p&gt;
&lt;p&gt;In previous versions of Windows 8, WinX would grab a shortcut, pull out the target path and arguments, hash it, and compare with an embedded value in the shortcut. This worked great, until shortcuts with environment variables were used. (I noted this as a bug in my previous post.)&lt;/p&gt;
&lt;p&gt;For example, let&#39;s consider a shortcut pointing to %SystemRoot%&#92;Explorer.exe. In the process of examining the shortcut, the WinX menu would expand this path -- that is replace any variables present with values fed from the OS. On a 64-bit system, the path would likely expand to C:&#92;Windows. In some rare cases, however, this could expand to possibly C:&#92;Winnt or even C:&#92;Winderz for the haters out there. (The drive letter in previous versions of the algorithm was ignored.) This means the hash could be viewed as invalid and not render in the WinX menu; that kind of runtime inconsistency just won&#39;t fly in Windows.&lt;/p&gt;
&lt;p&gt;So it was fixed.&lt;/p&gt;
&lt;p&gt;But how?&lt;/p&gt;
&lt;p&gt;Nothing magic really. WinX now takes the path and runs it through a quick search and replace function. It looks for matches using &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb762584.aspx&quot;&gt;OS backed &amp;quot;folder IDs&amp;quot;&lt;/a&gt;, specifically FOLDERID_ProgramFiles, FOLDERID_System, and FOLDERID_Windows. On a typical 64-bit system, these IDs would point to the values &amp;quot;C:&#92;Program Files&amp;quot;, &amp;quot;C:&#92;Windows&#92;System32&amp;quot;, and &amp;quot;C:&#92;Windows&amp;quot;. If a match is found, WinX strips this part of the path out and replaces it with the folder ID&#39;s GUID.&lt;/p&gt;
&lt;p&gt;To continue our example above, %SystemRoot%&#92;Explorer.exe would expand to C:&#92;Windows&#92;Explorer. Having FOLDERID_System in the path, it would then ultimately transmogrify to {F38BF404-1D43-42F2-9305-67DE0B28FC23}&#92;Explorer.exe.&lt;/p&gt;
&lt;p&gt;That&#39;s it.&lt;/p&gt;
&lt;p&gt;If you want to re-sign your shortcuts to now work on Windows 8 Release Preview, I updated the hashlnk tool bringing it to 0.2.0.0. &lt;a href=&quot;https://github.com/riverar/hashlnk/tree/winrp&quot;&gt;Both the binaries and code at on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Feedback is very welcome.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>The case of the broken Hello Kitty IZMO toy (Part 2 of 2)</title>
    <link href="https://withinrafael.com/2011/08/13/the-case-of-the-broken-hello-kitty-izmo-toy-part-2-of-2/"/>
    <updated>2011-08-13T00:00:00Z</updated>
    <id>https://withinrafael.com/2011/08/13/the-case-of-the-broken-hello-kitty-izmo-toy-part-2-of-2/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This post first appeared on Within Windows on August 13, 2011&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Recap&lt;/p&gt;
&lt;p&gt;So, back in Part 1, I managed to find software for the obscure Hello Kitty IZMO USB toy and patched it to sort of work on Windows 7. While the toy lit up at start, it didn’t quite function correctly – that is, every time I pressed keys on the keyboard, nothing happened. (This worked just fine on my Windows XP virtual machine.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Y U NO SEE MY KEYS?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before I could move on, I had to figure out how this software captured keystrokes. Scanning through the executable’s imports, I came across SetWindowsHookEx. SetWindowsHook is an old school API used to tap into various system events; it supports a number of hook types including those involving the keyboard (WH_KEYBOARD) and mouse (WH_MOUSE).&lt;/p&gt;
&lt;p&gt;I set a few breakpoints, all on calls to SetWindowsHookEx, and only one was actually used. It looked like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SetWindowsHookExA(WH_JOURNALRECORD, myJournalRecordProc, GetModuleHandle(NULL), 0 /* dwThreadId */);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I was puzzled by the use of WH_JOURNALRECORD here, given the toy only monitors keyboard input. Perhaps the developers, at some point, were looking to capture mouse input as well. Or maybe this was a cut/paste job. Regardless, I wasn’t going to spend time changing it. (It would have required some manual assembly writing work.) Instead I focused on the GetLastError value being returned to me -- ERROR_ACCESS_DENIED.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We need more power&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Elevating the application did no good. I was stuck. Out of options at the time, I decided to disable User Account Control (UAC) on my system. The program started working, holy assembler Batman! But, I was confused – why was this thing working with UAC off, but not when elevated? It turns out, disabling UAC also has a collateral impact on the state of another Windows feature called User Interface Privilege Isolation (UIPI). Introduced back in Windows Vista days, along with UAC, UIPI acts as an insulating layer of protection for processes with higher privileges. In other words, this layer prevents the little guys like Calculator from sending special messages to security-critical processes like an elevated Command Prompt preventing a specific type of evil – shatter attacks. (This insulting layer is what prevents you from dragging files onto an elevated Notepad instance, for example.)&lt;/p&gt;
&lt;p&gt;Additional research into UIPI led to me a blurb on MSDN explaining what breaks with UIPI turned on:&lt;/p&gt;
&lt;p&gt;A lower privilege process cannot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perform a window handle validation of higher process privilege.&lt;/li&gt;
&lt;li&gt;SendMessage or PostMessage to higher privilege application windows. These application programming interfaces (APIs) return success but silently drop the window message.&lt;/li&gt;
&lt;li&gt;Use thread hooks to attach to a higher privilege process.&lt;/li&gt;
&lt;li&gt;Use Journal hooks to monitor a higher privilege process.&lt;/li&gt;
&lt;li&gt;Perform dynamic link-library (DLL) injection to a higher privilege process.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Okay, so I knew UIPI was the culprit here... but I thought: How do I workaround this? Or more importantly, promote the Hello Kitty application to a first class Windows citizen? After hours of stumbling around on MSDN, I came across a useful attribute you can throw into your application’s manifest – uiAccess. You may have seen a manifest before, with a segment that looked something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;requestedExecutionLevel uiAccess=&amp;quot;false&amp;quot; level=&amp;quot;requireAdministrator&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It turns out, uiAccess is a special attribute that whitelists the application, letting it pass through UIPI’s gates system-wide. (This is typically reserved for rare UI assistive technology, like screen readers.) Okay, so I created a plain manifest, set uiAccess to true, and fired up Hello Kitty.exe. Still nothing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RTFM&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The software still didn’t work, with my skim of the documentation to blame. I re-read the page, this time with a discerning eye, and came across the following warning (emphasis mine):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Applications with the uiAccess flag set to true must be Authenticode signed to start properly. In addition, the application must reside in a protected location in the file system. &#92;Program Files&#92; and &#92;windows&#92;system32&#92; are currently the two allowable protected locations.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I remember thinking, could they have made this more difficult? Thankfully, I already had a legit code-signing certificate ready to rock and roll. (I&#39;ve signed various titles, including Geosense for Windows.) A few minutes with signtool.exe and the binary was digitally signed. I copied the relevant binaries (executable, library, sound file) to a new folder, as the instructions stated, within &#92;Program Files (x86), crossed my fingers, and tried again. (Actually, the documentation claims Program Files&#92; and &#92;System32 were the only two valid folders. This is not the case on x64 systems. Both Program Files&#92; and Program Files (x86)&#92; work in this case.)&lt;/p&gt;
&lt;p&gt;It worked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this case, I:&lt;/p&gt;
&lt;p&gt;... came across supporting software bundled with InstallShield 3.0 (16-bit executable)&lt;/p&gt;
&lt;p&gt;... unpacked the InstallShield special cabinets manually&lt;/p&gt;
&lt;p&gt;... virtualized Windows XP to ensure the device worked&lt;/p&gt;
&lt;p&gt;... disassembled TenxHID.dll, to discover there was a change to Windows that affected the way we interact with HID devices&lt;/p&gt;
&lt;p&gt;... disassembled Hello Kitty.exe to discover its use of Journal Hooks to receive keyboard/mouse input&lt;/p&gt;
&lt;p&gt;... nearly gave up and disabled UAC on my system, revealing its impact on the application&lt;/p&gt;
&lt;p&gt;... discovered UIPI shuts down if UAC is disabled&lt;/p&gt;
&lt;p&gt;... discovered uiAccess whitelists applications for UIPI pass-through and requires you follow a very specific set of rules for use&lt;/p&gt;
&lt;p&gt;... learned more about solving application compatibility problems&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>The case of the broken Hello Kitty IZMO toy (Part 1 of 2)</title>
    <link href="https://withinrafael.com/2011/08/10/the-case-of-the-broken-hello-kitty-izmo-toy-part-1-of-2/"/>
    <updated>2011-08-09T00:00:00Z</updated>
    <id>https://withinrafael.com/2011/08/10/the-case-of-the-broken-hello-kitty-izmo-toy-part-1-of-2/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This post first appeared on Within Windows on August 9, 2011.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting your feet wet&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A month or so ago, my girlfriend pinged me about a toy her sister had collected from a yard sale. The toy was a USB-based Hello Kitty figurine that made noise when you typed. She had plugged it into her Windows 7 PC and encountered a slight problem: It didn’t do anything. This thing needed software. After an Internet deep dive, I discovered and downloaded the drivers on Cables Unlimited cached site at about 1 kilobyte/second. I carefully extracted the ZIP and ran Setup...&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/08/incompatible.png&quot; alt=&quot;incompatible&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I remember experiencing a number of emotions at this point, but the only one that made an impression (on my desk) was rage. Someone had packaged the software using an old school version of InstallShield (3.0) that produces 16-bit stubs. After calming down, I decided to go ahead and rip out the binaries from its cabinet files using an equally as old tool called WinPack.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://withinrafael.com/img/2017/08/winpack.png&quot; alt=&quot;winpack&quot; /&gt;&lt;/p&gt;
&lt;p&gt;With files in hand, I was surprised at what little there was to play with. There was a documentation attempt, an icon, a little notification area program, a sound file, and a supporting DLL. I plugged the toy into the PC and ran the program. Other than putting a cutesy icon in my notification area, nothing happened. Sweet. Time to debug!&lt;/p&gt;
&lt;p&gt;I first threw the executable into IDA Pro. It was immediately obvious it only handled UI operations. The actual work was delegated to TenxHID.dll. I then started analyzing the library. TenxHID.dll contained three exported functions (four if you count DllEntryPoint):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DeviceIni&lt;/li&gt;
&lt;li&gt;ReadBuffer&lt;/li&gt;
&lt;li&gt;WriteBuffer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Focusing first on DeviceIni, I followed the various calls around and drew a mental picture of how this thing worked. It first looked for the HID device using HidD_GetHidGuid, SetupDiGetClassDevsA, SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetailA APIs. Then, using WriteFile, it communicated with the device over a pipe. With my debugger, I set a breakpoint on various calls to determine a] if the library was finding the device and b] if WriteFile succeeded.&lt;/p&gt;
&lt;p&gt;Surprisingly, the library was finding the device just fine. No problems there. But WriteFile was failing, due to an invalid HANDLE (hFile) being passed in. Tracing my way backwards, I found and set a breakpoint on the related CreateFile. A re-run through the debugger confirmed CreateFile was failing with an ERROR_ACCESS_DENIED.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Whoa, hold on there&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before I continued, I decided to take a few steps back. I had broken one of my rules when dissecting software – observe the software in an operating manner first. I set this rule because more often than not, the very software I’m tinkering with doesn’t work in the intended environment, let alone mine.&lt;/p&gt;
&lt;p&gt;I fired up VMWare and installed Windows XP. After fighting VMWare’s broken Windows 7 SP1/USB support (a story for another day), I was up and running. (Any virtualization software would have worked here, although I haven’t tested Hyper-V w/ RemoteFX and USB redirection yet.) I plugged in the device, installed the software and the device was spinning around making lots of noise. Okay, cool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Back to digging&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I shifted my focus back to why this call was failing. The call looked similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CreateFileA(lpFileName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, 0, OPEN_EXISTING, 0, 0);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Although the inputs worked on Windows XP, I decided to start playing with the parameters. I set a breakpoint on CreateFile and started altering values before the call. Removing the GENERIC_READ did the trick, but why?! I couldn’t find any documentation on this but I suspect Microsoft made a tweak to the way Windows handles communication to and from HID devices. Using USBView, I verified the toy exposed two USB endpoints that were both receive-only.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Endpoint Descriptor:
bEndpointAddress:    0x81  IN
Transfer Type:       Interrupt
wMaxPacketSize:      0x0008 (8)
bInterval:           0x0A

Endpoint Descriptor:
bEndpointAddress:    0x82  IN
Transfer Type:       Interrupt
wMaxPacketSize:      0x0008 (8)
bInterval:           0x0A
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So it makes sense that Windows would prevent READ operations to occur here; there isn’t an OUT endpoint available to accommodate a READ request. But I’m not sure why Microsoft wouldn’t just let ReadFile fail – &lt;strong&gt;the very behavior the library was looking to handle.&lt;/strong&gt; (Insight into this change would be appreciated.)&lt;/p&gt;
&lt;p&gt;Anyway, having confirmed the toy has no outputs I simply altered the library’s assembly (with a hex editor) and changed the flags from 0xC0000000 (GENERIC_READ | GENERIC_WRITE) to 0x40000000 (GENERIC_WRITE). I re-loaded the executable and the device spun up and made its introductory noise!&lt;/p&gt;
&lt;p&gt;But wait, I pressed a few keys on my keyboard and nothing happened... (to be continued)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Crash course on authoring Windows 7 Troubleshooting Packs</title>
    <link href="https://withinrafael.com/2009/01/12/crash-course-on-authoring-windows-7-troubleshooting-packs/"/>
    <updated>2009-01-12T00:00:00Z</updated>
    <id>https://withinrafael.com/2009/01/12/crash-course-on-authoring-windows-7-troubleshooting-packs/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;This post first appeared on Within Windows on January 12, 2009.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;New to Windows 7 is the Windows Troubleshooting platform. This platform allows software developers to develop Troubleshooting Packs that automate the troubleshooting and resolution of problems without having to resort to painful technical support queues or documentation runs. In a nut shell, a software developer writes a bunch of PowerShell scripts to identify and resolve problems then packages them up and distributes the pack to end-users.&lt;/p&gt;
&lt;p&gt;At the end of this step-driven course, you will have used the Microsoft Troubleshooting Pack Builder (TSPBuilder), written some PowerShell scripts, and learned of a way to distribute your compiled pack.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 0: Watch PC50 presentation, learn some PowerShell&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Rather than rewrite everything covered by Ricky Buch, a Program Manager on the Windows Instrumentation Team, I’m going to make watching/listening to &lt;a href=&quot;http://channel9.msdn.com/pdc2008/PC50/&quot;&gt;this presentation&lt;/a&gt; a &lt;strong&gt;mandatory&lt;/strong&gt; prerequisite. I apologize in advance to the hearing impaired, Microsoft isn’t in the habit of captioning their video content.&lt;/p&gt;
&lt;p&gt;If you have existing coding experience, truck on. If you don’t, you may want to take a time out and &lt;a href=&quot;http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032321618&amp;amp;CountryCode=US&quot;&gt;watch a webcast on PowerShell.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Get the right tools&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You will need to install the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=a91dc12a-fc94-4027-b67e-46bab7c5226c&amp;amp;DisplayLang=en&quot;&gt;Windows 7 beta SDK&lt;/a&gt; and be on &lt;a href=&quot;http://technet.microsoft.com/en-us/evalcenter/dd353205.aspx&quot;&gt;Windows 7&lt;/a&gt;. Pretty standard stuff, both free. A number two pencil will be provided for the final exam.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Identify the problem(s) you want to fix automatically&lt;/strong&gt;&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/card-1.png&quot; alt=&quot;Problems identified on paper&quot; /&gt;&lt;br /&gt;
Don’t make the same mistake I did and jump right into the building process without having a clear and written understanding of the problems you want to detect and fix. This will save you hours of frustration later and make you feel warm and fuzzy for having a plan on paper.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Carve out the package&lt;/strong&gt;&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/createoropentroubleshootingpack.png&quot; alt=&quot;Create or Open Troubleshooting Pack window.&quot; /&gt;&lt;br /&gt;
Fire up TSPBuilder.exe, located in [SDK Installation Path]&#92;Bin&#92;TSPBuilder. You will be presented with a Create/Open dialog. Unfortunately, in this build of TSPBuilder, there is no blank template so we will build off of the provided sample project. Review and change the package name and location, then click the Create button.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; The name of this package should reference the overall goal of your Troubleshooting Pack, not a specific problem you will be resolving. This generalization will allow you to extend the supported problem list without search and replace headaches later.&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexamplewindowstroubleshootingpackbuilder-2.png&quot; alt=&quot;Project properties/values&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexamplewindowstroubleshootingpackbuilder2-2.png&quot; alt=&quot;Root Cause properties/values&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexamplewindowstroubleshootingpackbuilder4-1.png&quot; alt=&quot;Verifier properties/values&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexamplewindowstroubleshootingpackbuilder7-1.png&quot; alt=&quot;Resolver properties/values&quot; /&gt;&lt;br /&gt;
This is the main user interface that lets you specify all the logic and metadata to be associated with the pack. &lt;strong&gt;On the left&lt;/strong&gt;, you have the Project Explorer pane. This pane displays the root project node, all the root causes (or problems) this pack supports, the associated Troubleshooter and finally any Interactions we need to make with the user. I won’t be getting into Interactions this go around. &lt;strong&gt;On the right&lt;/strong&gt;, you have properties and values relative to the selected node on the left.&lt;/p&gt;
&lt;p&gt;So what the heck is all this?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Project&lt;/strong&gt; – This is your Troubleshooting Pack. You will specify authoring metadata, such as versioning, supported platforms, and a description on this node.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Root Cause&lt;/strong&gt; – Each Troubleshooting Pack has N number of root causes (of failure). You can think of these as problems, too. During the execution of our Troubleshooter script, we will alert the Troubleshooting Engine of root causes we detect via a fictitious alpha-numeric identifier. Each Root Cause has an associated resolution, or Resolver, and steps to verify the problem was resolved, or a Verifier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;... Resolver&lt;/strong&gt; – An action/script that will resolve the associated root cause of failure.&lt;/li&gt;
&lt;li&gt;**... Verifier – **An action/script that will verify the associated root cause of failure was resolved. Confusingly, Verifiers are also used to detect Root Causes. It is easier to think of Verifiers as “detectors”.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Troubleshooter&lt;/strong&gt; – This is the entry point of your Troubleshooting Pack. A Troubleshooter script will house logic to execute N number of Verifiers to detect Root Causes. Detected Root Causes will be presented to the user and ultimately be resolved via Resolvers and verified via Verifiers again.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Terminology out of the way, go ahead and delete/modify the sample project nodes ensuring you have at least one Root Cause. I recommend customizing the package in the order of its execution -- that is Troubleshooter, Root Cause(s), Verifier, and finally Resolver. Don’t worry about creating script files right now. Just specify the filenames.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Specify IDs with the proper prefix to ensure things are easier to script later. &lt;strong&gt;TS&lt;/strong&gt; for Troubleshooters/Verifiers, &lt;strong&gt;RS&lt;/strong&gt; for Resolvers, and &lt;strong&gt;RC&lt;/strong&gt; for Root Causes. Verifiers are the odd ball here because they’re executed by the main Troubleshooting script at multiple times (to detect and to verify). Changes in the naming would be welcome before RTM.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Write the scripts&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Troubleshooter Script&lt;/strong&gt;&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/ts-ps-2.png&quot; alt=&quot;Troubleshooter script in PowerShell Integrated Scripting Environment (ISE)&quot; /&gt;&lt;br /&gt;
With the package metadata out of the way, we can now focus on writing the logic behind our Troubleshooting Pack. Start with our entry point, the Troubleshooter, and click the Launch Script Editor button. Notepad will launch and ask if you would like to create the script. Click the Yes button &lt;strong&gt;then close Notepad.&lt;/strong&gt; Afterwards, click the Launch Script Editor button again and the proper PowerShell Integrated Scripting Environment (ISE) will fire up.&lt;/p&gt;
&lt;p&gt;As mentioned several times already, the Troubleshooter is our entry point in this pack. This script should be relatively simple; it should execute each Verifier script to determine if there’s a problem or not. In this case, I wrote a line of code that just executes the Verifier that detects whether or not Programming Mode is enabled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Verifier Script&lt;/strong&gt;&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/verifier-ps-1.png&quot; alt=&quot;Verifier script in PowerShell Integrated Scripting Environment (ISE)&quot; /&gt;&lt;br /&gt;
Following the flow of execution, move on to the first Verifier script. This script will detect a single problem and report to the Troubleshooting Engine whether or not a problem was detected and should be presented to the user for resolution. Important PowerShell cmdlets in this script are &lt;code&gt;Write-DiagProgress&lt;/code&gt; and &lt;code&gt;Update-DiagRootCause&lt;/code&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Write-DiagProgress&lt;/code&gt;- This cmdlet allows you to provide status information back to the user via the Troubleshooting Wizard UI.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Update-DiagRootCause&lt;/code&gt; - This cmdlet is used to report back to the Troubleshoot Engine whether or not a particular problem (identified by ID) was detected.&lt;/p&gt;
&lt;p&gt;In my project, the script is pretty simple. I simply inform the user as to what I’m doing, check the value of the layout DWORD in the registry, and report back whether or not it’s set to the value 2. The expression in parenthesis is evaluated to either &lt;code&gt;$true&lt;/code&gt; or &lt;code&gt;$false&lt;/code&gt; and is passed in as the value of the Detected argument.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Resolver Script&lt;/strong&gt;&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/resolver-ps-1.png&quot; alt=&quot;Resolver script in PowerShell Integrated Scripting Environment (ISE)&quot; /&gt;&lt;br /&gt;
Finally, move on to the Resolver script. This script will only execute if the Troubleshooting Engine was informed the associated Root Cause was detected &lt;strong&gt;and&lt;/strong&gt; if the user specifies to fix the problem via the Troubleshooting Wizard &lt;em&gt;(the default is yes)&lt;/em&gt;. In my project, the script simply reports a status to the user and sets the registry DWORD value’s data to 2. After execution of this script, the Troubleshooting Engine will re-run the Verifier script to verify the fix.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Build and test&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At this point, you have created a Troubleshooting Pack project, specified metadata to be associated with the pack, and created scripts to detect Root Causes that will be corrected with Resolvers and verified with Verifiers. At this point, all the hard work is done.&lt;/p&gt;
&lt;p&gt;Compiling and testing Troubleshooting Packs in TSPBuilder is easy. Simply click &lt;strong&gt;Build &lt;strong&gt;-&amp;gt;&lt;/strong&gt; Compile&lt;/strong&gt;. TSPBuilder will automatically gather all your scripts and digitally sign your pack with a test signature (required).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; After you verify and validate (V&amp;amp;V) your Troubleshooting Pack, make sure you re-build the pack with a real certificate. Deploying packs with test signatures is embarrassingly sloppy, requires users to manually trust certificates, and may not be supported in Windows 7 final.&lt;br /&gt;
&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexample2-1.png&quot; alt=&quot;Troubleshooting Pack Wizard, welcome page&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexample7-1.png&quot; alt=&quot;Troubleshooting Pack Wizard, detailed report&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexample6-1.png&quot; alt=&quot;Troubleshooting Pack Wizard, fixes to apply&quot; /&gt;&lt;img src=&quot;https://withinrafael.com/img/2019/05/calculatortweaksexample9-1.png&quot; alt=&quot;Troubleshooting Pack Wizard, completion summary&quot; /&gt;&lt;br /&gt;
If all goes well, click **Build **-&amp;gt; **Run **to test your shiny new pack (or manually double-click the output package). The Troubleshooting Wizard UI should appear with the metadata you specified in Step 3.&lt;/p&gt;
&lt;p&gt;Congratulations, you’ve built your first Troubleshooting Pack! Sadly, everything you just learned will be completely changed in the final product... just kidding.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loose end #1: Debugging scripts&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As your Troubleshooting Packs become more and more complex, the need to test scripts on-demand, in the PowerShell ISE, increases. Out of the box, the Troubleshooting Engine cmdlets do not exist. Thankfully, you can add them in by executing &lt;code&gt;TestModeSetup.ps1&lt;/code&gt; in an elevated Powershell environment, an exercise left for readers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loose end #2: Testing/deploying onto other machines&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As mentioned above, TSPBuilder automatically generates a test certificate and signs your pack with it. Behind the scenes it also imports this certificate into your trusted certificate store enabling you to test the pack immediately. If you want to test the pack separately on another Windows 7 machine, you will need to fish out the generated .cer, deploy it with your package, and &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc730989.aspx&quot;&gt;import it into the trusted store manually&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loose end #3: Documentation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As with most pre-release/beta software, documentation is scarce. In fact, there is no documentation whatsoever in the SDK regarding TSPBuilder or Troubleshooting Pack authoring in general so you will need to adopt the figure-things-out-by-clicking-buttons approach until &lt;a href=&quot;http://msdn.microsoft.com/en-us/default.aspx&quot;&gt;MSDN&lt;/a&gt; is refreshed.&lt;/p&gt;
</content>
  </entry>
</feed>