itamarat has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm embedding PERL into an MSVC DLL project. I know how to call a C functions from PERL (PERL --> C) and I know how to call PERL functions from C (C --> PERL).
The system scheme is: PERL --> C DLL --> PERL callback
(i.e., the PERL is calling a function from the MSVC DLL. Then, the DLL is calling a PERL callback)
The PERL callback should work in the same context (the same interpreter?) as the PERL code which called the MSVC DLL in the first place.
How should it be done? Can I choose the PERL interpreter I'm using? It seemed to me that the way of allocating a PERL interpreter is not the way (see code below).
Thank you for your help,
Best regards,
Itamar
/*============================================= * start Perl Interpreter *============================================*/ PERL_SYS_INIT3(&argc,&argv,&env); my_perl= perl_alloc(); perl_construct(my_perl); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; perl_parse(my_perl, NULL, 2, my_argv, (char **)NULL); perl_run(my_perl);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embedding PERL into an MSVC project - How to choose interpreter?
by BrowserUk (Patriarch) on Feb 16, 2014 at 18:57 UTC | |
by itamarat (Acolyte) on Feb 17, 2014 at 08:28 UTC | |
|
Re: Embedding PERL into an MSVC project - How to choose interpreter?
by syphilis (Archbishop) on Feb 17, 2014 at 00:38 UTC | |
by itamarat (Acolyte) on Feb 17, 2014 at 08:30 UTC |