or you can just use managed C++, or simply COM which are far more flexible, rather than to rely on hacks