Hello Tassilo,
Tassilo von Parseval wrote:
On Tue, Aug 16, 2005 at 09:04:22AM +1000 Sisyphus wrote:
----- Original Message -----
From: "Reinhard Pagitsch" <[EMAIL PROTECTED]>
[snip]
Sure, but what have I to do to get it in my XSUB? In a pure Perl
script/module it is no problem, but what are the functions I have to use
in my C/C++ function?
Yuk .... I would probably have a pure perl subroutine perform the task, and
have the XSUB access that subroutine via a callback. (See the examples in
perldoc perlcall).
Perhaps there's a better way - if there is, I'm unaware of it.
It can be done from XS just as easily:
HV *config;
eval_pv("require Config;", FALSE);
config = get_hv("Config::Config", FALSE);
The fact that %Config::Config is a tied hash shouldn't make a
difference.
It seems that this does not work with my Perl version 5.6.1, because if
I use HvKEYS on config I get 0 keys.
I tried it also in an other way: creating a sub in my .pm file which
returns the value I want, and than call the sub from my XSUB.
But this is not what I want because on installing the module and runing
make test it will return the path where the perl modules are installed
and not the path where I am trying to compile the module. Therefor make
test will aways fail not finding the files which are located in the dll
directory.
I hope I am clear enough?
I also tryed it with the Win32 API but than I have to have the handle of
the loaded dll to get the path where the dll is located and that is not
possible as I understand the API.
regards,
Reinhard