>Any warnings ?
Nope, no warnings, no errors, no problems, except for that little "not" in
the test output.
>Can you get some idea of what the
>problem is by doing a "print" of the variables ?
I tried printing the two values that seem to be causing the problem. It
just created more questions :)
That entire test program is only 24 lines with comments. Short enough I
included all of it below if anyone wants to look at it, but...
The key seems to be the last line,
print "" . ($PID != $$ ? "not " : "") . "ok 2\n";
that would be where the "not" ok 2 is coming from. So I put this line on
the end:
print "\n mydd = $$ mypid = $PID\n\n";
as you suggested to get a look at the values it's comparing. Which produced
this output:
1..2
ok 1
not ok 2
mydd = 1748833 mypid = -1748833
The two process ID's are the same, except the PERL $$ variable is positive,
and the PID coming out of the WIN32-API from my kernel32.dll is negative.
Which answers one question and brings up another. It is working to some
extent to come up with anything. I would think it would have a null value,
if it wasn't working at all, certainly not a negative of the same number.
But How? I can't even come up with a decent speculation as to how it
"might" happen.
And it just keeps getting stranger and stranger :)
I just can't believe it's serious. I'm going to give it a try, see if the
rest of it works. I'm not interested in PID's anyway. If it comes down to
it, I can remove a negative sign myself if I have to in order to get things
going.
ms
######## entire test program for Win32-API follows #####
#!perl -w
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
use strict;
use vars qw( $loaded $GetPID $PID);
######################### We start with some black magic to print on failure.
BEGIN { $| = 1; print "1..2\n"; }
END {print "not ok 1\n" unless $loaded;}
use Win32::API;
$loaded = 1;
print "ok 1\n";
######################### End of black magic.
$GetPID = new Win32::API("kernel32", "GetCurrentProcessId", "", "N");
$PID = $GetPID->Call();
print "" . ($PID != $$ ? "not " : "") . "ok 2\n";
At 22:56 6/16/02 +1000, you wrote:
>----- Original Message -----
>From: "Michael D. Smith" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Sunday, June 16, 2002 9:08 PM
>Subject: Re: Test ? after module installed?
>
>
> >
> > I just installed the Win32-API, and as Jan said it must, it installed with
> > no errors.
> >
> > But when I ran the test, it printed:
> >
> > 1..2
> > ok 1
> > not ok 2
> >
>
>Should *not* print that.
>Any warnings ?
>What's the code for the second test ? Can you get some idea of what the
>problem is by doing a "print" of the variables ?
>
>Cheers,
>Rob
>
>
>_______________________________________________
>Perl-Win32-Users mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs