Feeds:
Posts
Comments

Archive for March, 2007

Keywords: Excel COM Error, 8008005

As a follow on to my amusing misadventures with Excel COM running server side, I did some more digging and found out more interesting details on this situation. For starters, it’s not supported:KB257757. That doesn’t really bother me so much, it’s stable enough to run a few reports. And I firmly believe that if you’re not getting outside of your safe zone from time to time, then you’re probably not accomplishing very much. (That’s a corollary of Toback’s Law: If you never miss any flights, then you’re spending too much time in airports.)

(more…)

Read Full Post »

Ten Miles and a Flat Tire

I knew I was pushing my luck going for a ride today. Though it was a balmy 60 degrees with less than 10 MPH winds, it was wet and foggy. Plus the trails were in bad shape. I live near the Illinois Prairie Path, which is mostly limestone screenings, and at this time of year you usually sink instead of glide. However, the legs were aching for a good ride, so I figured I’d give the trails a try, and if they were really bad I’d find some surface streets to ride on.
(more…)

Read Full Post »

Bike The Drive 2007

Registration is open for for the 2007 Bike the Drive tour on May 27. It’s an annual 30-mile tour along Chicago’s lake front, and they close down Lake Shore Drive for the duration. For those not in the know, Lake Shore Drive is a 6 to 8 lane thoroughfare in downtown Chicago. I’ve ridden in it for the past several years in a row, and it’s wonderful! It’s always nice, easy and relaxed. I’ll post some pictures later.
(more…)

Read Full Post »

Keywords: Excel in C#, COM Interop, Primary Interop Assemblies (PIA), Errors

I don’t even know where to begin.

I recently had a report project that called for reports to be generated in an Excel spreadsheet. To figure out how to write Excel from C#, I drew on plenty of resources on the web, for example here, here and here. Any of these can get you started, and especially the last one by Bromberg needs attention for how to clean up COM objects accessed from inside a .Net managed application. So here’s the 5 minute synopsis good enough for my bug story.
(more…)

Read Full Post »

Project Name Too Long

Keywords: Microsoft.Net, Visual Studio, -1073741819, file path name length

While developing a simple console application recently in Visual Studio, I encountered the error

The program '[3952] LongNamedApplicationRpt.vshost.exe:

             Managed' has exited with code -1073741819 (0xc0000005).

The application builds fine, but when trying to run the application within the Visual Studio debugger (“F5”), it fails immediately and produces the above cryptic error. I am using Visual Studio 2005 (8.0) and the .Net Framework 2.0.50727, and the project output was for a Console Application in the Active(Debug) configuration. However, the application runs just fine from a command line.
(more…)

Read Full Post »

Using “internal” (2)

It turns out that the device introduced in my last post on this subject doesn’t really work with interfaces. In that solution, the class itself is satisfying two “logical interfaces”: the property’s getter is a public interface that clients can use to read and it’s setter is an internal interface that services can use to set up or configure objects for use. So naturally, to express this in a single interface, what you want is something like this:

public interface IWhatever {
    long WhateverID { get; internal set; }
}

But you can’t have it because access modifiers cannot be applied to individual members of a C# interface! (more…)

Read Full Post »

Interfaces and Attributes

I’ve been thinking a lot about interfaces lately. When I’m writing code, I often find myself slipping back and forth between several ways of thinking about interfaces. And if I’m not careful the result is a big mess!

The first way of thinking is “interface as contract”, and the second is “interface as behavior”, which is what we’re usually thinking of when we’re using interfaces to do modeling. The third way is “interface as marker”. (This brings new meaning to the phrase “overloaded interfaces!”)
(more…)

Read Full Post »

Older Posts »