Apply Alex Peshkov patch to fix return of void* and forward declare interfaces in C++. Did myself the equivalent for C and Pascal.