Hm thanks for all your help. I knew that my function cast was wrong but I tried to do this in that way because VC6 SP5 does not allow me using the predefined macros, if i do i get a type mismatch error... since (VALUE)(*)(...)) is different from (VALUE)(*)()) which all rb_define methods want ..... does anybody know a workaround for this .. To the first answer, I do not need an InitXXY Method or export because i am embedding ruby in my application so the extension module is built-in... Thanks Bernhard Glk