Adam Nathan's Old Blog

Please visit http://adamnathan.net instead!

Browse by Tags

Tagged Content List
  • Blog Post: Quiz: Searching in a managed array

    Sorry for my recent lack of blogging. There's been a lot going on these days! As the banner on my blog now indicates, you'll be able to catch me at two upcoming conferences. As with TechEd in June, Sonja Keserovic and I will be giving an Interop presentation at this year's PDC in October. This presentation...
  • Blog Post: Quiz: Gotcha with Exceptions and HRESULTs

    The C# code below, when executed, prints the following: 0x80004002 0x80004002 Who can figure out why the second line printed isn't 0x80004003 ? using System; using System.Runtime.InteropServices; public class Quiz { const int E_NOINTERFACE = unchecked((int)0x80004002); const...
  • Blog Post: CLR SPY and Customer Debug Probes: The Object Not Kept Alive and Buffer Overrun Probes (A Quiz)

    The Object Not Kept Alive and Buffer Overrun probes are unlike any other CDPs, because they do not output any messages to report bugs in your code. Instead, they change general CLR behavior with the goal of forcing non-deterministic bugs that can be almost impossible to reproduce into bugs that will...
  • Blog Post: Quiz: What's wrong with the following code?

    The following C# code has the goal of enabling managed code to call CreateDC , but it's incorrect. Calling all Interop aficionados... Can you see what's wrong? using System; using System.Runtime.InteropServices; internal class DeviceContext { [DllImport("gdi32.dll", CharSet=CharSet...
Page 1 of 1 (4 items)