trillich has asked for the wisdom of the Perl Monks concerning the following question:
long version:
we're stuck, trying to grapple with the interface to a .NET application (blackbaud). it has a well-documented API and some sample scripts (VB) that come with it, which are VB version 6; we only have VStudio 2003pro, so when we upgrade the scripts there's a glitch -- the same exact problems that our perl attempts have (namely "Startup Error: Failed to load control 'WebHost'") we managed to get a fix working from inside VB, but we don't know how to replicate that fix using perl... any ideas?the fix: here's the declaration added to the VB code:
Private Declare Function OleInitialize Lib "ole32" (ByVal reserved As Integer) As Integerthen we can call it before the rest of our app starts up:
OleInitialize(0) 'only needed if no UI shown before initthe minimal perl script we're using -- complete with error dialog -- is:
use Win32::OLE;
use strict;
my $appid = 'AFNAPI7.FE_API';
my $app = Win32::OLE->new($appid)
or die "Canna create new object for $appid";
$app->{SignOutOnTerminate} = 1;
my $login = $app->Init(''); # error dialog here
print "Login results: $login\n\n";
the ideal situation would be to PULL the data from blackbaud on request using perl, instead of PUSHING it from within blackbaud using visual basic, which is, um, not quite as robust a language.
but how to mimic that fix from within perl? using Win32 no doubt, but how? any pointers?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: wrestling with .NET application via perl
by Corion (Patriarch) on Sep 28, 2007 at 06:36 UTC | |
by trillich (Sexton) on Sep 28, 2007 at 11:38 UTC | |
|
Re: wrestling with .NET application via perl
by Errto (Vicar) on Sep 28, 2007 at 03:31 UTC |