I know a lot has already been said about COM interop in .NET, and VB.NET, but I wanted to share a little bit of information that a co-worker told me a few days ago. In my last post, I announced my ScRap.NET program as being available for download.
I have actually had this program almost ready to go for a couple of months now, but was never really ready to release because of a small issue. I use a Microsoft Wireless Natural keyboard and mouse at work... this particular keyboard has a row of special feature buttons on it for things like email, media player control, log off, etc. The problem I was running into, is that whenever I would run my ScRap.NET program, these special function keys would stop working. As soon as I exited ScRap.NET, though, they would all work fine.
As it turns out, I had my method signatures for the COM Interop wrong on a fine detail... I was passing structure parameters as ByVal, when I should have been passing them as ByRef. As soon as I made that change, my keyboard's special keys immediately began working while ScRap.NET was running.