First I want to apologize for the length of time between posts. We had meetings with our biggest client at the end of March followed by a huge tradeshow (NAB) last week and we were frentically working to have some high impact WPF goodness to show. The good news, we succeeded. The other good news is that it was VERY well received. The bad news...well we now have to keep trucking along as we've whetted the marketplace's appetite with what we showed!
Anyhow, here is one that cost me a day and a half development time. I am working on a project that requires me to write some code in vb.net (web service calls) that I can then consume in vb6. I am doing this by creating a .net class library that is registered for com interop. This is all pretty straightforward but I got stuck on something stupid.
In .net it is acceptable to have an underscore in the name of your event. In VB6 it is not. If you declare your events in your .net class library with an underscore in them they don't work correctly in vb6. In vb6 when you select your object that has the event with an underscore on it the IDE will "flash" and change the routine from being wired up to that object to a "general" routine. Needless to say it doesn't work.
The VS 2008 IDE doesn't provide a warning or anything in this case, which I think it should if it sees that you have "register for com interop" checked. I totally forgot that an underscore is invalid in an event name in VB6 and had to disect my project piece by piece (comparing it to the working MSFT test project) to figure out that this was what is wrong. It is such a simple thing but simple things often trip up developers and cost us a lot of time.
I hope this is helpful to some other poor developer out there!
Look for more in the coming weeks. I have to dive into WCF pretty heavy now to move my project along and will be posting what I find here (expanding the topic of this blog site a bit).