
In rewriting a plugin interface I use, which for language portability uses C function pointers as the entry points, I came up with a "make_c_function" utility. I use it to translate C++ functions, any of objects, binds, function, members, et. to _real_ C function pointers. For example: class P { public: int foo(int); }; P p; extern "C" { void * get_plugin_call(int n) { if (1 == n) { return make_c_function<P,int(int)>( boost::bind(&p,p::foo,_1)); } else { return 0; } } } [example much abbreviated from real life use] -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org