Adam Nathan's Old Blog

Please visit http://adamnathan.net instead!

Browse by Tags

Tagged Content List
  • Blog Post: .NET and COM: Available once again in non-electronic form

    As I mentioned in my earlier post , my .NET and COM book is now being printed on-demand and can be purchased only at the following location (and perhaps only for a limited time?): http://www.samspublishing.com/title/067232170X Enjoy!
  • Blog Post: This just in: .NET and COM is coming back in print!

    A few months ago I mentioned that my .NET and COM book went out of print . Well, after getting regular streams of e-mail from people who still wanted to get a copy (which I forwarded on to the publisher), I can now happily say that they are planning to print more! I believe it's going to be some kind...
  • Blog Post: The passing of one book and the birth of another

    It's official... I got a letter informing me that .NET and COM , almost four years after its release, is out of print. Of course, it still lives on in PDF form . Like Luke , I've sometimes been baffled by the apparent lack of supply. I've been told many times about someone that wanted to get a copy of...
  • Blog Post: Light up on Windows Vista: The "Top 10" List

    PDC attendees got a "top 10" poster, but the details are now live on MSDN: " 10 things you can do to make your application shine when it runs on Windows Vista ." They are, in no particular order: 1. Follow the Windows Vista style guidelines 2. Enrich the user experience 3. Enable users to visualize...
  • Blog Post: Announcing www.winfxhearts.com!

    To correspond with my PDC talk about making an application "light up" on Windows Vista, I've created www.winfxhearts.com . This site has a ClickOnce link that enables you can play a version of my new & improved Internet Hearts game. Here's a "before & after" look: This is still the good...
  • Blog Post: Migrating from VC6 to VC8: Resources

    In order to update Internet Hearts with WinFX features , I'm going to leverage C++ Interop and recompile at least some of the source code with /clr so I can start using managed APIs. Therefore, my first step was to get the source code (which hadn't been touched in about 6 years) building with Visual...
  • Blog Post: Internet Hearts: 112,000 Lines of Code

    On Monday I asked for guesses on the size of the Internet Hearts source base , and the highest (public) one was 45,000 lines of code. The answer: approximately 112,000 lines of code! 51,000 are client-specific, 35,000 are server-specific, and 26,000 are shared by both. Higher than you expected? Well...
  • Blog Post: 2005 Products: Why Upgrade?

    Yesterday at TechEd, someone asked me if we had one-page documents that explained: What's new in SQL Server 2005? What's new in Visual Studio 2005? What's new in the .NET Framework 2.0? In other words, what are the features that will make her team beg to move from SQL Server 2000 and Visual...
  • Blog Post: pinvoke.net is one year old!

    In a recent meeting, I got the opportunity to meet Ward Cunningham , David Ornstein , and Korby Parnell . Naturally, afterwards I had wikis on the brain. They (not intentionally) made me feel guilty about pinvoke.net being on such an old version of FlexWiki. Then I realized that pinvoke.net turned one...
  • Blog Post: Migrating Internet Hearts to WinFX

    Last year, Chris Sells wrote a series of articles in which he set out to rewrite Solitaire using Avalon. The lack of scaling graphics in the Win32 version (and lack of access to its source code, I suppose) forced him down the road of rewriting the app from scratch. Plus, the point was to explore "the...
  • Blog Post: .NET Framework 2.0 and app compat

    Jason Zander , head of the CLR, does a great job explaining application compatibility issues that the team is focused on. I'm curious to hear about managed apps and components that have been released, whether they're " 100% managed code " or even 1% managed code. And have you tried installing & running...
  • Blog Post: Help us help you!

    [Update: This program is no longer available.] Do you write managed apps or components? Then you should run them on a special edition of the .NET Framework 2.0 Beta 1 . With this, you can now give Microsoft direct feedback on what portions of the .NET Framework and Win32 you're dependent on! This...
  • Blog Post: 'Introducing' PINVOKE.NET and its Visual Studio Add-In!

    I guess I'm not cut out to be a journalist. Two weeks ago when I decided to spend my weekend creating the PINVOKE.NET wiki, I had a great opportunity to awaken my blog from its deep slumber by announcing it to the world. But Ben , Brad , Brian , Charlie , Chris , Corrado , Darth , Duncan...
  • Blog Post: CLR SPY: Feature requests for the next version

    Now that I'm set up at my new blogging home, I'd like to get some feedback from anyone who has used the CLR SPY tool that I've uploaded to gotdotnet.com and blogged a lot about in the past. We're investigating shipping the tool in the .NET Framework SDK, and would like some feedback on what you do...
  • Blog Post: An Overview of Managed/Unmanaged Code Interoperability

    I promised I'd post this link on my blog. PDC attendees can also find it on their Longhorn DVD (Disk #2). It's a document called "The Developer's Guide to Migration and Interoperability in Longhorn: Alpha Patterns and Practices".
  • Blog Post: IsManaged

    I'm about to catch my flight for the PDC, but I wanted to archive the following before I go: In one of our session 's demos on Tuesday, I'll be briefly mentioning C# code that determines whether a given file is a managed or unmanaged binary by inspecting its PE header. Here is the C++ code it's based...
  • Blog Post: GUID Generation and VB6 Binary Compatibility

    When exposing managed types as COM types, your classes must have CLSIDs, your interfaces must have IIDs, and so on. System.Runtime.InteropServices provides a custom attribute (GuidAttribute) that enables you to be explicit about these GUIDs. But the CLR also has a reasonable algorithm for generating...
  • Blog Post: CLR SPY and Customer Debug Probes: The QueryInterface Failure Probe

    It has taken awhile, but with this entry I will have described all 11 probes that exist in v1.1 of the CLR. When an RCW queries its underlying COM object for a specific interface, the QueryInterface call could fail for a variety of reasons. The QueryInterface Failure probe doesn't report every failed...
  • Blog Post: Suggestions for future CDPs?

    In my next blog entry, I'll explain the 11th and final Customer Debug Probe (CDP) that exists in the v1.1 product. But for the next version of the product (code-named Whidbey), we're looking at adding additional probes, and not just in the area of Interop. The goal is to help you find, prevent, and/or...
  • 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: CLR SPY and Customer Debug Probes: The Thread Changing Apartment State Probe

    The last blog touched on apartment states of managed threads, which the CLR tracks for COM interoperability purposes. But if an application changes the apartment state of a thread being tracked by the CLR (via unmanaged code or direct calls to CoUninitialize/CoInitialize), the runtime won't be aware...
  • Blog Post: Gotcha with STAThreadAttribute and Managed C++

    Managed thread objects have an ApartmentState property that can be set to STA or MTA. But setting this property on the main thread doesn't work reliably because the CLR might set the apartment state to MTA (by calling CoInitializeEx (NULL, COINIT_MULTITHREADED)) before your first line of code executes...
  • Blog Post: CLR SPY and Customer Debug Probes: The Disconnected Context and Unmarshalable Interface Probes

    When managed code interacts with COM objects via RCWs, the CLR handles the COM plumbing for you. An important part of this plumbing involves marshaling wrapped interface pointers across contexts. When a COM interface pointer needs to be marshaled from one context to another, the CLR calls CoMarshalInterface...
  • 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 Invalid IUnknown and Invalid VARIANT Probes

    Whereas probes like Collected Delegate or Object Not Kept Alive catch coding mistakes in managed code, the Invalid IUnknown and Invalid VARIANT probes typically inform you when you're attempting to interoperate with a broken COM component. Either that, or the metadata you've got for the unmanaged API...
Page 1 of 2 (38 items) 12