advanced wrapping functions for __stdcall conventions