Using Boost::Bind and Boost::Function for Windows Procedure Functions

February 25, 2008

The experiment failed. What was I thinking? I forgot that C++ member functions have an implicit this pointer, that makes them pretty useless as function pointers. Oh well… Onto finding a good thunking library … Who woulda thunk?


Installing the Visual Studio Express Editions « Bit By Bit, Byte by Byte, Word by Word

February 13, 2008


Installing the Visual Studio Express Editions « Bit By Bit, Byte by Byte, Word by Word. After playing around with the express versions, I think I’m going to have to fork over $270 to Microsoft for the standard edition. The express versions are severely limited with what they can do, and since I use Visual Studio so much I might as well buy the damn thing.

Installing the Visual Studio Express Editions

February 12, 2008

I’m installing the express editions right now. As much as I like the environment, I’m just not willing to fork over $200+ for the standard edition. If it works, Great!! Otherwise not so great, and I will cough up the money. That $600 rebate might have come in handy right now.

I need a TypeLib viewer

January 22, 2008

Ever since I moved from Visual C++ 6.0 I’ve missed OleView. OleView was released as a sample and continued to work under Windows XP. Under Vista however, everytime I double click on something to read the type library, the application freezes up and goes into an infinite loop. I’ve tried debugging it but due to some laziness on my part and a new idea that’s been forming in my head for some time, I haven’t been able to solve it yet.

Besides there are many other things that are wrong with OleView. OleView relies exclusively for the registry, which really slows it down while it traverses the registry. With Side By Side installation, a theoretical type library viewer should be able to access the type information directly from the component itself, and should the user so desire traverse the registry.

When Returning a COM interface to a scripting client

January 20, 2008

that is not a default dual interface, always create a Standard Dispatch interface using CreateStdDispatch(…) and the IUnknown implementation, and return it as a VARIANT.

… I learned that over the weekend the hard way.

Multiple IDispatch implementations

January 5, 2008

I was designing a simple COM based scriptable DirectX framework, in C++ and ATL. I wanted to support multiple interfaces that were callable from JavaScript. Unfortunately, scripting clients cannot access interfaces that are not marked default. One way of handling this was to make my automation compatible interface a super set of all the interfaces that I was going to implement in my coclasses. that just didn’t seem right, and wouldn’t work with coclasses that were aggregated, because the scripting client couldn’t find the aggregated interface.

So I googled the problem and came across this and this that seemed to be relevant.  Chris Sells’ page about multiple IDispatch implementations listed about 5 ways to do this. However, out of all the methods listed only one of them worked without modifying the component. [Method 5 on this Page]. Unfortunately, none of the references listed on the page weren’t working. So I set out to making my own implementation. Last night I finally got it to work properly. Here’s some sample JavaScript code.

var dispqi = new ActiveXObject(“MultiDispQI.CoDualInterfaceQuery”);
var dog = new ActiveXObject(“DogCatComponent.DogCat.1”);
var cat = dispqi.QueryInterface(dog,”DogCatComponent.DogCat.1″,”ICat”);

Here is the source code.


July 28, 2007

Live Writer is out of Beta. Although I think it was designed for Windows Vista rather than Windows XP.