Home > Archive > PERL Beginners > October 2007 > New to PerlNET
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| TonyShirt@gmail.com 2007-10-24, 4:00 am |
| I'm trying to build a .Net dll that I can call from VBA from some
perl. I've fiddled around with the PerlNet application and docs and I
just cant seem to get it to work. Here is the object I'm trying to
convert:
package SNPutils;
#Constructor
sub new
{
my($package) = @_;
return bless {}, $package;
}
sub rComp
{
my $self = shift;
my $seq = shift;
my $reversed = "";
$reversed = reverse $seq;
$reversed =~ tr/ACTGRYMKBVDHactgrymkbvdh/TGCAYRKMVBHDtgcayrkmvbhd/;
#TGCAYRKMVBHDtgcayrkmvbhd
return $reversed;
}
1;
when I run perlNET it seems to work. I get no errors. When I try and
register the dll. I get "DLL registerserver entry point could not be
found." when I try and access the DLL through the references I get
"Cant add a reference to the specified file"
Could some one help me out here? I'm obviously doing something wrong
or I don't understand something critical.
Thanks! Tony!
| |
| Jenda Krynicky 2007-10-24, 7:01 pm |
| From: TonyShirt@gmail.com
> I'm trying to build a .Net dll that I can call from VBA from some
> perl.
>
> <snipped>
>
> When I try and
> register the dll. I get "DLL registerserver entry point could not be
> found." when I try and access the DLL through the references I get
> "Cant add a reference to the specified file"
>
> Could some one help me out here? I'm obviously doing something wrong
> or I don't understand something critical.
Are you sure you want a .Net DLL? Looks to me like you need a COM DLL
instead. How do you try to register it? Via regsvr32? If yes then you
most definitely need a COM DLL. And need to look at PerlCtrl, not
PerlNET.
Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
| |
| TonyShirt@gmail.com 2007-10-26, 7:01 pm |
|
> Are you sure you want a .Net DLL? Looks to me like you need a COM DLL
> instead. How do you try to register it? Via regsvr32? If yes then you
> most definitely need a COM DLL. And need to look at PerlCtrl, not
> PerlNET.
>
> Jenda
> ===== Je...@Krynicky.cz ===http://Jenda.Krynicky.cz=====
> When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
> -- Terry Pratchett in Sourcery
I thought that Perl Ctrl was for active X controls. I found and
example that looks like what I need in the samples for Perl.NET that's
why I went with it.
I'm really not sure what I want. I know that I would like to access
my Perl package like a DLL library from Excel. ie make a call to the
DLL from VBA. The only way I know how to do this is to register the
DLL so that I can reference it in my code. Is there another way to do
this? I'm all ears.
If I can't do it that way, I was thinking about using the VS.net to
compile the perl. I know that this is technically possible but have
no experience with it. Is this a better way to go? Or should I just
rewrite it C#?
thanks for the help!
| |
| Jenda Krynicky 2007-10-26, 7:01 pm |
| On 26 Oct 2007 at 17:15, TonyShirt@gmail.com wrote:
>
> I thought that Perl Ctrl was for active X controls. I found and
> example that looks like what I need in the samples for Perl.NET that's
> why I went with it.
Well, the nomenclature is a bit due to Microsoft renaming
their stuff a few times. If by ActiveX controls you mean the things
included in web pages in place of Java applets then the answer is, no
it's not.
> I'm really not sure what I want. I know that I would like to access
> my Perl package like a DLL library from Excel. ie make a call to the
> DLL from VBA. The only way I know how to do this is to register the
> DLL so that I can reference it in my code. Is there another way to do
> this? I'm all ears.
How do you register it? What version of Excel? Unless it's a very
very new version (2007?) I do believe you do need a COM DLL and thus
PerlCtrl, not PerlNET. Could you show me a snippet of VBA that uses
such a registered object?
> If I can't do it that way, I was thinking about using the VS.net to
> compile the perl. I know that this is technically possible but have
> no experience with it.
Well, it is (or at least was) possible to install something into
VS.net to be able to do that. That something was made by ActiveState
and included PerlNET.
Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
|
|
|
|
|