Re: Windows: Perl:Inline




"Sankaran" <psankarv@xxxxxxxxx> wrote in message
news:1120707545.470423.227100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> My requirement is to call specific DLL (Written in C++ / MFC) functions
> from an available perl module. This DLL is responsible to create
> registry entries in the given Machine. Since we have a requirement of
> creating Registry Entries (some flat files) in Unix, this DLL of
> capable of doing that, currently my perl module is capable of creating
> registry entries in Windows, but not in Unix, so I am trying to extend
> this perl module by using the DLL, so that I can create Registry (or
> equivalent) in Unix too. I hope the requirement is clear.

Not really ..... but that could be my fault, not yours :-)
Are you trying to use the DLL (on the Windows machine) to alter files on the
Unix machine over a network connection ?
Or are you wanting to create an equivalent of the DLL that you can place on
the Unix machine (ie an SO), and have that SO do things on the Unix machine
?
Or .... something else again ?

> For that I
> was trying Inline by downloading "Inline-0.44". As of now I know that
> installing Inline is copying the entire directory. Or is it something
> different? Also I got few replies doing the same in UNIX, but my
> requirement is using Inline in windows.
>

The installation procedure for Inline-0.44 is the same on both Unix and
Windows. I still don't know how far you have got, so I'll go through the
procedure required. (Sorry if you already know all of this.)

Download Inline-0.44.tar.gz from cpan. Extract the files to some (any)
location and then cd to the folder that now contains the Inline-0.44
Makefile.PL.

Run:
perl Makefile.PL
(You'll be prompted on whether you want to install Inline::C as well as
Inline. Answer yes.)

Then run:
nmake test

and if there are no errors, run:
nmake install

Then copy the below code into a file and try running it. After it has
compiled (which will take a few seconds) it should print "Hello, world".

use Inline C => <<'END_C';

void greet() {
printf("Hello, world\n");
}

END_C

greet;
__END__

If you strike errors at any stage, let us know what the errors are (and at
what part they occurred). I assume you're using MSVC++ 6.0 as your compiler.
Let us know if that is not the case - and if it's not the case could you
also supply the output of running 'perl -V'.

After you have installed Inline you can find other examples by running:
perldoc Inline::C-Cookbook

And there's also an inline mailing list that you can subscribe to. See
http://lists.perl.org for details.

Cheers,
Rob


.



Relevant Pages

  • Re: Windows: Perl:Inline
    ... My requirement is to call specific DLL functions ... registry entries in the given Machine. ... currently my perl module is capable of creating ... registry entries in Windows, but not in Unix, so I am trying to extend ...
    (comp.lang.perl.modules)
  • Re: Windows: Perl:Inline
    ... My requirement is to call specific DLL functions ... registry entries in the given Machine. ... currently my perl module is capable of creating ... registry entries in Windows, but not in Unix, so I am trying to extend ...
    (comp.lang.perl.modules)
  • Re: Redirecting stderr
    ... programming newsgroup. ... There's no DLL support in the Unix version I use, ... If the code uses DLLs on Windows and shared libraries ...
    (comp.lang.c)
  • Re: Linux, X, ld, gcc, linking, shared libraries and stuff
    ... "Cygwin"; This is a general project to make UNIX software run on Windows, ... a pretty simple idea...the Cygwin programs use the DLL as if it ...
    (alt.lang.asm)
  • Re: Windows: Perl:Inline
    ... > One more Doubt: My requirement is: Calling few functions in a DLL ... > from Perl module. ... Win32::API provides the capability to access dll ...
    (comp.lang.perl.modules)