Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: more Win32::EventLog oddities

by Reverend Phil (Pilgrim)
on Sep 26, 2002 at 18:59 UTC ( [id://200999]=note: print w/replies, xml ) Need Help??


in reply to Re: more Win32::EventLog oddities
in thread more Win32::EventLog oddities

Ahh, either I've miswritten or you've misread, but the problem is not so much that its failing on those computers... its not failing on those computers. It is treating 2-3 valid servers the same way its treating my invalid bogus server Crackhead.. that is.. it is successfully creating a Win32::Eventlog object. My problem is that if it fails to make a connection, I don't know how to determine that.. the object seems to be successfully generated.

Thanks though,
-=rev=-

Replies are listed 'Best First'.
Re: Re: more Win32::EventLog oddities
by BrowserUk (Patriarch) on Sep 26, 2002 at 19:40 UTC

    Your right, I did mis-read. I took

    2) I don't skip to the 'next' server

    To mean that you were hanging at that point. Sorry, my mistake.

    Thinking about this further, I have, what is no more than a speculation, that the new() call doesn't actually establish communications with the remote server, but simply readies the object for that communication. If this is true, then the way to determine if the server is actually there would be to check the return code from one of the calls that would force it to actually attempt the communication. Eg.

    $handle->GetOldest($base) or die "Can't get number of oldest EventLog record\n";
    .

    Like I say, this is speculation, but worth a try.


    Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!
      I agree with your speculation. I've looked back over some event log parsing and harvesting that I did last year, and it appears that even the  GetOldest(\$base) won't necessarily give a "good" error, but  GetNumber(\$count) will.
        Thanks chief. Between the two of you, I'm cured.
        I feel as if I didn't take the simple mental step and solve this myself, so I will probably cut off a toe later tonight... but then it's been head-chopping chaos at work lately, and my department has been reduced to its size from 4 years ago as of this week. Yarg. Anyway.. done venting a little.. thanks a ton =)
        -=rev=-

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://200999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-26 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found