in reply to Re^12: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
in thread Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

As Corion says in his post, the common way to do that is to write an XS extension. That would probably make all your problems related to the Perl context go away.

If you want to stick to Win32::API, that module provides Win32::API::Callback for passing Perl subs as callbacks to C functions.

  • Comment on Re^13: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?