<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Maarten's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/maartenb/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/maartenb/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:18:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Stream Analytics: batching events and trigger on "last"</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/stream-analytics-batching-events-and-trigger-on-last</link>
      <pubDate>Fri, 10 Aug 2018 21:43:26 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/?p=515</guid>
      <description><![CDATA[For a side project, I had to write a few Azure Stream Analytics queries. Not being a SQL -- let...]]></description>
      <content:encoded><![CDATA[<span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"><span style="color: #000000">For a side project, I had to write a few Azure Stream Analytics queries. Not being a SQL -- let alone Stream Analytics -- person, it required some effort and substantial assistance. Hope it helps. </span></span>

<span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"><span style="color: #000000">The goal of this first query is to collect all incoming events from an eventhub over a duration of 10 seconds and then forward the collection to another eventhub as output. </span></span>
<pre><span style="margin: 0px;color: black;font-family: 'Courier New'"><span>SELECT i1.Id, Collect() as messages
INTO output
FROM input 
group by i1.id, SessionWindow(second, 10, 15)</span>
</span><span style="margin: 0px;font-family: 'Courier New'"></span></pre>
<span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"><span style="color: #000000">The second one is a bit more interesting. The purpose is to wait for a “last” event in a stream. If no event with a specific ID arrives within 15 seconds, the query needs to trigger an output. Here it is:</span></span>
<pre><span><span style="color: #000000">SELECT i1.Id, i1.EventEnqueuedUtcTime as t
</span></span><span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"></span><span><span style="color: #000000">into output
</span></span><span><span style="color: #000000">FROM Input as i1 TIMESTAMP BY EventEnqueuedUtcTime
</span></span><span><span style="color: #000000">LEFT outer JOIN Input as i2 TIMESTAMP BY EventEnqueuedUtcTime
</span></span><span><span style="color: #000000">ON i1.Id = i2.Id 
</span></span><span><span style="color: #000000">AND DATEDIFF(second,i1,i2) BETWEEN 0 AND 15
</span></span><span><span style="color: #000000">and i2.EventEnqueuedUtcTime &gt; i1.EventEnqueuedUtcTime
</span></span><span><span style="color: #000000">WHERE i2 IS NULL

</span></span><span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"></span></pre>
<span style="margin: 0px;font-family: 'Arial',sans-serif;font-size: 12pt"><span style="color: #000000">There is something counter intuitive about the last line, but it works beautifully. It is important to put the time comparison in the ON clause and not in the WHERE clause. In the last case, you won't get any output. </span></span>]]></content:encoded>
    </item>
    <item>
      <title>Missing default 200% logos and Appx3210</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/missing-default-200-logos-and-appx3210</link>
      <pubDate>Tue, 06 Oct 2015 18:08:56 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2015/10/06/missing-default-200-logos-and-appx3210/</guid>
      <description><![CDATA[Last week, I got this error when building my app that I ported from Windows 8.1 Universal app to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Arial; font-size:12pt">Last week, I got this error when building my app that I ported from Windows 8.1 Universal app to UWP. 
</span></p><p>
 </p><p><span style="font-family:Consolas; font-size:12pt">error APPX3210: App manifest references the image 'Assets\Logo.png' which does not have a candidate in main app package.
</span></p><p>
 </p><p><span style="font-family:Arial; font-size:12pt">The manifest referenced Logo.png indeed. But the file in the package was logo.scale-100.png. When I renamed logo.scale-100.png to logo.png (what the manifest asked for), the manifest errored out with a red cross. When I then used the manifest editor to point to logo.png, Visual Studio renamed it to logo.scale-100.png. So back to square 1: build the store package and error happens.
</span></p><p><span style="font-family:Arial; font-size:12pt">Sooo. It appears that the default scale has changed to 200%. OK. Fine. And? Why does that matter? 
</span></p><p><span style="font-family:Arial; font-size:12pt">It matters because the main app package contains resources for whatever the default scale is. And for UWP, the default is 200. Since I use app bundles, my Logo-100.png ended up in a satellite app package, and the main package does not have any logo (since I didn't provide the default 200). Hence, my app would not be installable on a system that requires scale-200. 
</span></p><p><span style="font-family:Arial; font-size:12pt">When I renamed the file to Logo.png, the editor complained because it assumed that images without qualifiers were in the default scale (200), and my logo didn't have the correct dimensions for that scale.
</span></p><p><span style="font-family:Arial; font-size:12pt">There is an explanation for this in the <a href="https://msdn.microsoft.com/en-us/library/mt148501.aspx">porting doc</a>, but it is a little buried:
</span></p><p><span style="font-family:Arial; font-size:12pt"><em>"The default asset scale for Universal Windows apps is 200. If your project includes assets not scaled at 200, you will need to add a &lt;UapDefaultAssetScale&gt; element with the value of the scale of your assets to this PropertyGroup. Learn more about <a href="https://msdn.microsoft.com/library/jj679352.aspx"><span style="color:#0563c1">assets and scales</span></a>."
</em></span></p><p><span style="font-family:Arial; font-size:12pt">[Thanks to Srdjan Jovcic for his explanation.]
</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Handling system and app back button</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/handling-system-and-app-back-button</link>
      <pubDate>Tue, 06 Oct 2015 13:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2015/10/06/handling-system-and-app-back-button/</guid>
      <description><![CDATA[This question came up a few times recently. How can a UWP app handle navigation with continuum for...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Arial; font-size: 12pt;">This question came up a few times recently. How can a UWP app handle navigation with continuum for tablets. This is the setting at the bottom of Action Center that allows you to switch between tablet (touch) and PC mode (mouse). </span></p>
<p><span style="font-family: Arial; font-size: 12pt;">When the system is in tablet mode, a back button appears on the left in the task bar. However, if the app is in PC mode, the app might need to have its own back button. You might not want both. This means that your app: </span></p>
<p><span style="font-family: Arial; font-size: 12pt;">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Needs to detect whether it is in tablet or pc-mode </span></p>
<p><span style="font-family: Arial; font-size: 12pt;">2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If in tablet mode, don't show a back button since the system already has one in the taskbar </span></p>
<p><span style="font-family: Arial; font-size: 12pt;">3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If in PC mode, show the back button (if there is something on the back stack.) </span></p>
<p><span style="font-family: Arial; font-size: 12pt;">In order to detect 1) you should use this: </span></p>
<p style="padding-left: 30px;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse;//or Touch</span></span></p>
<p><span style="font-family: Arial; font-size: 12pt;"><span style="font-family: courier new,courier;">Mouse</span> indicates PC mode; <span style="font-family: courier new,courier;">Touch</span> indicates tablet mode. Depending on the outcome, you can hide or show your app's back button in the title bar by setting <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.systemnavigationmanager.appviewbackbuttonvisibility.aspx"><span style="color: #0563c1;">AppViewBackButtonVisibility</span></a> to <span style="font-family: courier new,courier;">Visible</span> or <span style="font-family: courier new,courier;">Collapsed.</span></span></p>
<p><span style="font-family: Arial; font-size: 12pt;">You then need to handle one event for both </span></p>
<p style="padding-left: 30px;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">SystemNavigationManager.GetForCurrentView().BackRequested</span></span></p>
<p><span style="font-size: 12pt;"><span style="font-family: Arial;">And don't forget to set</span><span style="font-family: Consolas;"> BackRequestedEventArgs.Handled </span><span style="font-family: Arial;">to <span style="font-family: courier new,courier;">true</span> if you're handling the back navigation. Otherwise the system will also navigate away from your app. </span></span></p>
<p><span style="font-family: Arial; font-size: 12pt;">Complete code: </span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">protected override void OnNavigatedTo(NavigationEventArgs e)</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">{</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse) ?</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;</span></span></p>
<p style="margin-left: 36pt;">&nbsp;</p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; SystemNavigationManager.GetForCurrentView().BackRequested += SettingsPage_BackRequested;</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">}</span></span></p>
<p style="margin-left: 36pt;">&nbsp;</p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">{</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; SystemNavigationManager.GetForCurrentView().BackRequested -= SettingsPage_BackRequested;</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">}</span></span></p>
<p style="margin-left: 36pt;">&nbsp;</p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">private void SettingsPage_BackRequested(object sender, BackRequestedEventArgs e)</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">{</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; App.RootFrame.Navigate(typeof(MainPage));</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">&nbsp;&nbsp;&nbsp; e.Handled = true;</span></span></p>
<p style="margin-left: 36pt;"><span style="font-size: 12pt;"><span style="font-family: Consolas;">}</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>WinRT API for Windows Phone 8.1</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/winrt-api-for-windows-phone-8-1</link>
      <pubDate>Mon, 21 Jul 2014 06:00:23 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2014/07/21/winrt-api-for-windows-phone-8-1/</guid>
      <description><![CDATA[A little over a year ago, I worked on the last revisions of our book "Windows Runtime via C#." At...]]></description>
      <content:encoded><![CDATA[<p>A little over a year ago, I worked on the last revisions of our book "<a href="https://www.microsoftpressstore.com/store/windows-runtime-via-c-sharp-9780735679276">Windows Runtime via C#."</a> At the time, you could use the WinRT API to write Windows Store apps for tablets and PCs. Now you can use the same API to target apps for Windows Phone 8.1 as well. So, Jeffrey and I went over all the chapters in the book and wrote a blog post about the differences between the two target platforms. Thanks to Jeffrey's foresight and experience, the book is general in nature and hence the differences are minimal. You can find the blog post on the <a href="https://blogs.msdn.com/b/microsoft_press/archive/2014/07/16/windows-phone-updates-for-windows-runtime-via-c.aspx">MS-Press web-site here</a>. Jeffrey also ported all the <a href="https://www.wintellect.com/Resources">sample code </a>to Universal apps so that you can run them on both Windows 8.1 as well as Windows Phone 8.1. Enjoy.</p>]]></content:encoded>
    </item>
    <item>
      <title>Finding "black-listed" Win32 APIs in your DLLs</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/finding-black-listed-win32-apis-in-your-dlls</link>
      <pubDate>Thu, 03 Jul 2014 15:33:41 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2014/07/03/finding-black-listed-win32-apis-in-your-dlls/</guid>
      <description><![CDATA[&nbsp;
When you want to use Win32 or COM APIs in your Windows Store app, there is a subset of APIs...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>When you want to use Win32 or COM APIs in your Windows Store app, there is a <a href="https://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx">subset of APIs</a> you can use. <a href="https://wpdev.uservoice.com/forums/253374-missing-platform-apis">Microsoft recently asked</a> what Win32 API or functionality you as developers are missing from the list. I think this is a great initiative to expand the reach and capabilities of WinRT apps. This has obviously tickled your interest as well.&nbsp;Finally you can seriously look at that old VB6 app that uses some utility C DLLs you couldn&rsquo;t justify porting to WinRT. And with universal apps, you might even be able to turn it into a Windows Phone app as well.</p>
<p>So here is your chance to let us know what you need. Problem is, you&rsquo;re not quite sure what that is. You want to find out what APIs you&rsquo;re actually using in those old C/C++ DLLs you haven't touched in a while.</p>
<p>You have several options here. You can add the WINAPI_FAMILY=WINAPI_PARTITION_APP preprocessor flag and try to build your binaries. Alternatively, you can build a new Windows Store app, link the DLLs in, and test your app with Windows Application Certification Tool (WACK). It turns out there is an even easier way to find those offending APIs. Here&rsquo;s how to go about it.</p>
<ol>
<li>Create a Windows Store app from a template. Any template is fine.</li>
<li>Don&rsquo;t do anything to the app itself. Hit F5 to deploy your app. Just make sure you build the release app, otherwise you'll get false positives for APIs that are only found in debug builds.&nbsp;</li>
<li>Now here&rsquo;s the trick. You'll want to drop your legacy DLLs into this location: <strong>\myapp\bin\Release\AppX\. </strong>This will be a folder where you find myapp.exe and the AppxManifest.xml</li>
<li>Start WACK&nbsp; and select your app.</li>
<li>Run through WACK and it will flag all the APIs you&rsquo;re using that are not on the "approved" Win32 and COM API list.</li>
</ol>
<p>Note that you'll&nbsp;get a lot of errors if you have an older version of the CRT that is not compatible with Windows RT.</p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging with VMWare</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/debugging-with-vmware</link>
      <pubDate>Thu, 03 Feb 2011 08:52:54 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2011/02/03/debugging-with-vmware/</guid>
      <description><![CDATA[I normally use Windows Virtual PC for demos of Kernel debug scenarios. For a special occasion I...]]></description>
      <content:encoded><![CDATA[<p>I normally use Windows Virtual PC for demos of Kernel debug scenarios. For a special occasion I needed to use VMWare. There are plenty of articles how to set it up and it is almost identical to Virtual PC. You basically connect over COM1 through a named pipe. But after hours of struggling I could not get it to work. 
</p><p>In the VM settings it says "Serial Port 2" which was somewhat weird already. Also in Device Manager on the VM it mentioned that the COM1 was already in use. Then I hit <a href="https://driverentry.com.br/blog/?p=943">this article</a>. Now I don't read Portuguese but the pictures are quite self-explanatory. Apparently when you have a printer connected to your machine, the first port is used by your printer. Adjusting the bcdedit settings fixed the problem. 
</p>]]></content:encoded>
    </item>
    <item>
      <title>ProcExp and XPerf tracing</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/procexp-and-xperf-tracing</link>
      <pubDate>Tue, 01 Feb 2011 17:59:29 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2011/02/01/procexp-and-xperf-tracing/</guid>
      <description><![CDATA[I was trying to run some XPerf traces to prepare for a training, when it all of a sudden stopped...]]></description>
      <content:encoded><![CDATA[<p>I was trying to run some XPerf traces to prepare for a training, when it all of a sudden stopped working. The error I got was this:
</p><p><span style="font-family:Consolas">xperf: error: NT Kernel Logger: Cannot create a file when that file already exists. (0xb7).
</span></p><p>Weird because I ran the same command successfully multiple times before. Trying to stop a potentially conflicting session by using:
</p><p><span style="font-family:Consolas">Xperf –d blah.etl
</span></p><p>Failed with this error:
</p><p><span style="font-family:Consolas">xperf: error: Merge ETL: The specified path is invalid. (0xa1).
</span></p><p>And the event log contained this: 
</p><p><span style="font-family:Segoe UI; font-size:9pt">Session "NT Kernel Logger" failed to start with the following error: 0xC0000035
</span></p><p><span style="font-family:Segoe UI; font-size:9pt">What has changed was that I had started ProcMon.exe. That uses the NT Kernel Logger. Exiting that process cleared the way for my first command. 
</span></p>]]></content:encoded>
    </item>
    <item>
      <title>NX dependency on PAE</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/nx-dependency-on-pae</link>
      <pubDate>Thu, 06 Jan 2011 16:18:57 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2011/01/06/nx-dependency-on-pae/</guid>
      <description><![CDATA[Hardware supported NX is dependent on PAE (Windows Internals chapter 9. Memory). But why would that...]]></description>
      <content:encoded><![CDATA[<p>Hardware supported NX is dependent on PAE (Windows Internals chapter 9. Memory). But why would that be? 
</p><p>The AMD64 Architecture Programmer's Manual (Volume 2: System Programming) mentions this:
</p><p style="margin-left: 36pt"><strong>No Execute (NX) Bit. </strong>Bit 63. This bit is present in the translation-table entries defined for PAE paging, with the exception that the legacy-mode PDPE does not contain this bit. This bit is not supported by non-PAE paging. 
</p><p>Again from Windows Internals we know that PTEs with PAE enabled are 64 bits long; without PAE they are only 32 bits long.  There simply is no bit 63 for non-PAE paging. We can see it in the debugger. 
</p><p>Here is a call stack from the non-PAE crash dump:
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">0: kd&gt; k
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">ChildEBP RetAddr  
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">8292dc0c 968a1160 nt!KeBugCheckEx+0x1e
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">8292dc3c 968a1768 i8042prt!I8xProcessCrashDump+0x251
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">8292dc88 82840d4d i8042prt!I8042KeyboardInterruptService+0x2ce
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">8292dc88 8286449a nt!KiInterruptDispatch+0x6d
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">8292dd24 00000000 nt!KiIdleLoop+0x1a
</span></p><p>
 </p><p>If we dump out the the ChildEBP for the 2<sup>nd</sup> frame:
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">0: kd&gt; !pte 8292dc3c 
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">                 VA 8292dc3c
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">PDE at C0300828         PTE at C020A4B4
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">contains 001BF063       contains 0292D963
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">pfn 1bf   ---DA--KWEV   pfn 292d  -G-DA—KWEV
</span></p><p>
 </p><p>You see that the PTE contains a 32 bit value (0292D963). 
</p><p>The same exercise on a PAE enabled system gives us this call stack:
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">1: kd&gt; k
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">ChildEBP RetAddr  
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">807e1c0c 928bd160 nt!KeBugCheckEx+0x1e
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">807e1c3c 928bd768 i8042prt!I8xProcessCrashDump+0x251
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">807e1c88 828587cd i8042prt!I8042KeyboardInterruptService+0x2ce
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">807e1c88 8288101a nt!KiInterruptDispatch+0x6d
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">807e1d24 00000000 nt!KiIdleLoop+0x1a
</span></p><p>
 </p><p>The PTE here is 64 bit:
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">1: kd&gt; !pte 807e1c3c 
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">                    VA 807e1c3c
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">PDE at C0602018            PTE at C0403F08
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">contains 000000007A986863  contains <strong>800000002D21F963</strong>
		</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">pfn 7a986     ---DA--KWEV   pfn 2d21f     -G-DA--KW-V
</span></p><p>
 </p><p>We would expect bit 63 on the ChildEBP to be set (EBP is on the stack and we would not want to execute any code from the stack: NX should be 1).
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">1: kd&gt; .formats 800000002D21F963
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">Evaluate expression:
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Hex:     80000000`2d21f963
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Decimal: -9223372036097574557
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Octal:   1000000000005510374543
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Binary:  <strong>1</strong>0000000 00000000 00000000 00000000 00101101 00100001 11111001 01100011
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">…
</span></p><p style="margin-left: 36pt">
 </p><p>How about the return address of that same frame?
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">1: kd&gt; !pte 928bd768 
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">                    VA 928bd768
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">PDE at C06024A0            PTE at C04945E8
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">contains 0000000023615863  contains 000000007B9CD121
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">pfn 23615     ---DA--KWEV   pfn 7b9cd     -G--A—KREV
</span></p><p>
 </p><p>There the bit is not set:
</p><p style="margin-left: 36pt"><span style="font-family:Consolas">1: kd&gt; .formats 000000007B9CD121
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">Evaluate expression:
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Hex:     7b9cd121
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Decimal: 2073874721
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Octal:   17347150441
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">  Binary:  01111011 10011100 11010001 00100001
</span></p><p style="margin-left: 36pt"><span style="font-family:Consolas">…
</span></p><p>
 </p><p>Note that .formats truncates the preceding 0s.
</p>]]></content:encoded>
    </item>
    <item>
      <title>Install history in Reliability Monitor</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/install-history-in-reliability-monitor</link>
      <pubDate>Wed, 15 Dec 2010 12:27:00 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2010/12/15/install-history-in-reliability-monitor/</guid>
      <description><![CDATA[Yesterday I was running into a problem with Visual Studio 2010 and SilverLight 4. I asked for help...]]></description>
      <content:encoded><![CDATA[<p>Yesterday I was running into a problem with Visual Studio 2010 and SilverLight 4. I asked for help internally. There was some suspician that this history might have something&nbsp;to do with my problem, but I had installed all kinds of tools on my machine over the last couple of weeks. Visual Studio 2008, 2010, Silverlight, Silverlight for Phone, etc. So I was grilled on when I installed what, and what order etc. I had no idea. </p>
<p>So I ask my friend <a href="https://blogs.msdn.com/patricka">Pat</a>. He mentioned Reliability Monitor. So I type Windows key, "reliability", I select "View Reliability History"&nbsp;and I got this:</p>
<p>&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/92/29/7701.relmon.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-92-29/7701.relmon.jpg" border="0" /></p>
<p>The nice thing is that it gives you a full history what went wrong, but also what is installed and when on the machine. You can even export an xml file and send it over or ask for it. This might come in handy when your mon/dad/aunt/neighbor claims that her/his machine magically became very sluggish without any user interaction. </p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging Pool Leaks with X-Perf</title>
      <link>https://docs.microsoft.com/archive/blogs/maartenb/debugging-pool-leaks-with-x-perf</link>
      <pubDate>Tue, 07 Dec 2010 19:56:00 GMT</pubDate>
      <dc:creator><![CDATA[Maarten van de Bospoort MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/maartenb/2010/12/07/debugging-pool-leaks-with-x-perf/</guid>
      <description><![CDATA[The WDK has a tool called poolmon and you can use it to find leaks as is described in the Windows...]]></description>
      <content:encoded><![CDATA[<p>The WDK has a tool called poolmon and you can use it to find leaks as is described in the Windows Internals book. You can use the NotMyFault demo app (<a href="https://technet.microsoft.com/en-us/sysinternals/bb963901.aspx">here</a>) to demo it. </p>
<p>Instead of PoolMon you can also use WPT and X-Perf. Once installed, you run it like so:</p>
<p style="padding-left: 30px;">xperf -on diageasy+pool -stackwalk PoolAlloc</p>
<p>Then you repro the leak. Once done you stop the trace with this:</p>
<p style="padding-left: 30px;">xperf -d leaker.etl. </p>
<p>When you then open the trace in XPerfView, you will see four pool graphs in the fly-out:</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/92/29/6131.poolflyout.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-92-29/6131.poolflyout.jpg" border="0" /></p>
<p>&nbsp;</p>
<p>When you go to one of the graphs, you'll see a nice jagged line in there. Hovering the mouse over the graph will show the pool tag associated with the pool allocations. </p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/92/29/5305.leakgraph.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-92-29/5305.leakgraph.jpg" border="0" /></p>
<p>&nbsp;</p>
<p>But there is more. When you select the jagged line in the graph, right-click and get the summary table you can actuall get the call stack. You have to rearrange the columns a bit. Pooltag first, then call stack will be good. Throw the type column to the right. Of course you need to have symbols loaded. But here is what you'll get:</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/92/29/4621.leakstack.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-92-29/4621.leakstack.jpg" border="0" /></p>
<p>This is obviously a convoluted scenario with a large frequent leak from NotMyFault. Nevertheless, it is easy to get to the culprit. If you have symbols for myfault.sys available, then you would right there and then have the function and source line. </p>]]></content:encoded>
    </item>
  </channel>
</rss>