I am trying to access the method Connect, in the  PGFAPI.exe unsuccessfully.
The code is what follows:
 
#!/usr/bin/perl
 
use Win32::API;
use Win32::Process;
 
#first I check that I am able to create the process:
Win32::Process::Create($obj, "C:\\Program Files\\PFG\\PFGAPI\\PFGAPI.exe",
                                "pddfg",
                                0,
                                NORMAL_PRIORITY_CLASS,
                                ".");
my $pid = $obj->GetProcessID();
print "pid : $pid\n";
#up here everything works fine. It returns a PID
#now I try to call the API method Connect:
 
$obj = new Win32::API('C:\\Program Files\\PFG\\PFGAPI\\PFGAPI.exe', 'Connect()', 'PPPPP', 'V');
$answer = $obj->Call(Ale, 444, 765, 11.123.45.95, 2000);
   
if(not defined $obj) {print "It is not working, sorry...";}
The error says:
 
Can't call method "Call" on an undefined value at...
 
Anybody can help? Which can be the reason of not being able to define the object $obj?
 
 
 
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to